pickle 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,15 @@
1
+ == 0.4.3
2
+ ruby 1.9.2 compatibility fix
3
+
4
+ * 1 bugfix
5
+ * Fix can't change hash during iteration error for ruby 1.9.2 [Ian White] [#33]
6
+ (This is fixed in orm_adapter, which pickle 0.5 will be using)
7
+
8
+
1
9
  == 0.4.2
2
10
 
3
11
  * 1 bugfix
4
- * Use mongoid finder syntax, which requires a :conditions key [Mark Lee]
12
+ * Use mongoid finder syntax, which requires a :conditions key [Marc Lee]
5
13
 
6
14
 
7
15
  == 0.4.1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -170,15 +170,18 @@ module Pickle
170
170
  end
171
171
 
172
172
  def convert_models_to_attributes(ar_class, attrs)
173
+ conditions = {}
173
174
  attrs.each do |key, val|
174
175
  if ((defined?(ActiveRecord::Base) && val.is_a?(ActiveRecord::Base)) ||
175
176
  (defined?(DataMapper::Model) && val.is_a?(DataMapper::Model))) &&
176
177
  Pickle::Adapter.column_names(ar_class).include?("#{key}_id")
177
- attrs["#{key}_id"] = val.id
178
- attrs["#{key}_type"] = val.class.base_class.name if ar_class.column_names.include?("#{key}_type")
179
- attrs.delete(key)
178
+ conditions["#{key}_id"] = val.id
179
+ conditions["#{key}_type"] = val.class.base_class.name if ar_class.column_names.include?("#{key}_type")
180
+ else
181
+ conditions[key] = val
180
182
  end
181
183
  end
184
+ conditions
182
185
  end
183
186
 
184
187
  def models_by_name(factory)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pickle}
8
- s.version = "0.4.2"
8
+ s.version = "0.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ian White"]
12
- s.date = %q{2010-08-23}
12
+ s.date = %q{2010-11-04}
13
13
  s.description = %q{Easy model creation and reference in your cucumber features}
14
14
  s.email = %q{ian.w.white@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pickle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 2
10
- version: 0.4.2
9
+ - 3
10
+ version: 0.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ian White
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-23 00:00:00 +01:00
18
+ date: 2010-11-04 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency