dm-yaml-adapter 0.6 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +5 -0
- data/lib/dm-yaml-adapter.rb +4 -4
- metadata +2 -2
data/README
CHANGED
data/lib/dm-yaml-adapter.rb
CHANGED
@@ -110,13 +110,13 @@ module DataMapper::Adapters
|
|
110
110
|
case operator
|
111
111
|
# handle eql
|
112
112
|
when :eql, :like
|
113
|
-
if ! (obj.instance_variable_get("@" + property.field) == value)
|
113
|
+
if ! (obj.instance_variable_get("@" + property.field).to_s == value.to_s)
|
114
114
|
# remove from teh result set...
|
115
115
|
result_set.delete(obj)
|
116
116
|
end
|
117
117
|
# handle :not
|
118
118
|
when :not
|
119
|
-
if (obj.instance_variable_get("@" + property.field) == value)
|
119
|
+
if (obj.instance_variable_get("@" + property.field).to_s == value.to_s)
|
120
120
|
result_set.delete(obj)
|
121
121
|
end
|
122
122
|
end
|
@@ -151,7 +151,7 @@ module DataMapper::Adapters
|
|
151
151
|
# default ID
|
152
152
|
return 1
|
153
153
|
end
|
154
|
-
directory = classname_to_dir(class_name)
|
154
|
+
directory = Dir.new(classname_to_dir(class_name))
|
155
155
|
if directory.entries.size == 0
|
156
156
|
return 1
|
157
157
|
end
|
@@ -159,7 +159,7 @@ module DataMapper::Adapters
|
|
159
159
|
id = -1
|
160
160
|
until free_id != -1 do
|
161
161
|
id += 1
|
162
|
-
if ! File.exists?(File.join(directory, id.to_s + ".yaml"))
|
162
|
+
if ! File.exists?(File.join(directory.path, id.to_s + ".yaml"))
|
163
163
|
return id
|
164
164
|
end
|
165
165
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-yaml-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "0.
|
4
|
+
version: "0.7"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Harding
|
@@ -9,7 +9,7 @@ autorequire: dm-yaml-adapter
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-07-27 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|