Skip to content

Instantly share code, notes, and snippets.

View myabc's full-sized avatar

Alexander Brandon Coles myabc

  • London, England
  • 17:53 (UTC +01:00)
View GitHub Profile
class Animal
#accessor :sex
#attr_reader :sex
#attr_writer :sex
def initialize
end
def sex
From 05721dde8a1adfe34f091560a2e2bef54d2fe65e Mon Sep 17 00:00:00 2001
From: Alex Coles <alex@alexcolesportfolio.com>
Date: Tue, 3 Mar 2009 22:57:10 +0100
Subject: [PATCH] Ensure rake install command uses same Ruby interpreter/implementation
Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
---
tasks/install.rb | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
From 2d940fb0f5a5df64cde100c5fb026b1c1e9ce1d7 Mon Sep 17 00:00:00 2001
From: Alex Coles <alex@alexcolesportfolio.com>
Date: Tue, 3 Mar 2009 22:57:03 +0100
Subject: [PATCH] Ensure rake install command uses same Ruby interpreter/implementation
Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
---
Rakefile | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 3044113..3dff333 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -27,7 +27,7 @@ PRIMARY = {
'yaml' => "yaml://#{temp_db_dir}/primary_yaml",
'sqlite3' => 'sqlite3::memory:',
# 'sqlite3_fs' => "sqlite3://#{temp_db_dir}/primary.db",
- 'mysql' => 'mysql://localhost/dm_core_test',
+ 'mysql' => 'mysql://root@localhost/dm_core_test',
26)
TypeError in 'DataMapper::Adapters::MysqlAdapter with mysql conditions like should be able to search for objects that match value'
/ed/ is not a symbol
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/adapters/data_objects_adapter.rb:70:in `read_many'
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/adapters/data_objects_adapter.rb:199:in `with_connection'
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/adapters/data_objects_adapter.rb:63:in `read_many'
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/repository.rb:143:in `read_many'
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/collection.rb:919:in `initialize'
/usr/local/jruby-1.1.6/lib/ruby/gems/1.8/gems/extlib-0.9.11/lib/extlib/lazy_array.rb:373:in `[]'
/usr/local/jruby-1.1.6/lib/ruby/gems/1.8/gems/extlib-0.9.11/lib/extlib/lazy_array.rb:373:in `lazy_load'
diff --git a/config/router.rb b/config/router.rb
index e128a6a..23b9686 100644
--- a/config/router.rb
+++ b/config/router.rb
@@ -32,14 +32,23 @@ Merb::Router.prepare do
# Adds the required routes for merb-auth using the password slice
slice(:merb_auth_slice_password, :name_prefix => nil, :path_prefix => "", :path => "blog/admin")
-
+
[alexbcoles@mondiale dm-core (next)]$ ADAPTERS=mysql jruby -S rake spec
(in /Users/alexbcoles/git-repos/dm-core)
/usr/local/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
..............*....................**..........*.*.......*....*..***..................................................................................................*....*....*....*.......................*.........................................................................................................****......................................................................
DataMapper::Collection with mysql#slice with a positive offset and length
- should return the expected Resource (FAILED - 1)
1)
MySQL
122 examples, 1 failure, 1 pending
Postgres
128 examples, 6 failures, 1 pending
SQLite3
98 examples, 0 failures
diff --git a/do_jdbc/src/java/data_objects/Connection.java b/do_jdbc/src/java/data_objects/Connection.java
index bce16f2..bc4c310 100644
--- a/do_jdbc/src/java/data_objects/Connection.java
+++ b/do_jdbc/src/java/data_objects/Connection.java
@@ -8,6 +8,7 @@ import java.sql.SQLException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import java.util.Properties;
import java.util.StringTokenizer;
-- cleanup typecasting code:
currently a mess of switch statements and ifs.. needs refactoring, a cleaner
way of type "negotiation".
-- fix for null-handling:
underlying JDBC Driver expects a JDBC Type to be passed along with a NULL
-- implement parameterized types (see above)
-- unit tests / implementation testing (use JUnit, JtestR (?))