pickle 0.4.7 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pickle (0.4.7)
4
+ pickle (0.4.8)
5
5
  cucumber (>= 0.8)
6
6
  rake
7
7
 
@@ -9,104 +9,101 @@ GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
11
  abstract (1.0.0)
12
- actionmailer (3.0.5)
13
- actionpack (= 3.0.5)
14
- mail (~> 2.2.15)
15
- actionpack (3.0.5)
16
- activemodel (= 3.0.5)
17
- activesupport (= 3.0.5)
12
+ actionmailer (3.0.9)
13
+ actionpack (= 3.0.9)
14
+ mail (~> 2.2.19)
15
+ actionpack (3.0.9)
16
+ activemodel (= 3.0.9)
17
+ activesupport (= 3.0.9)
18
18
  builder (~> 2.1.2)
19
19
  erubis (~> 2.6.6)
20
- i18n (~> 0.4)
20
+ i18n (~> 0.5.0)
21
21
  rack (~> 1.2.1)
22
- rack-mount (~> 0.6.13)
22
+ rack-mount (~> 0.6.14)
23
23
  rack-test (~> 0.5.7)
24
24
  tzinfo (~> 0.3.23)
25
- activemodel (3.0.5)
26
- activesupport (= 3.0.5)
25
+ activemodel (3.0.9)
26
+ activesupport (= 3.0.9)
27
27
  builder (~> 2.1.2)
28
- i18n (~> 0.4)
29
- activerecord (3.0.5)
30
- activemodel (= 3.0.5)
31
- activesupport (= 3.0.5)
32
- arel (~> 2.0.2)
28
+ i18n (~> 0.5.0)
29
+ activerecord (3.0.9)
30
+ activemodel (= 3.0.9)
31
+ activesupport (= 3.0.9)
32
+ arel (~> 2.0.10)
33
33
  tzinfo (~> 0.3.23)
34
- activeresource (3.0.5)
35
- activemodel (= 3.0.5)
36
- activesupport (= 3.0.5)
37
- activesupport (3.0.5)
38
- arel (2.0.9)
34
+ activeresource (3.0.9)
35
+ activemodel (= 3.0.9)
36
+ activesupport (= 3.0.9)
37
+ activesupport (3.0.9)
38
+ arel (2.0.10)
39
39
  builder (2.1.2)
40
- capybara (0.4.1.2)
41
- celerity (>= 0.7.9)
42
- culerity (>= 0.2.4)
40
+ capybara (1.0.0)
43
41
  mime-types (>= 1.16)
44
42
  nokogiri (>= 1.3.3)
45
43
  rack (>= 1.0.0)
46
44
  rack-test (>= 0.5.4)
47
- selenium-webdriver (>= 0.0.27)
48
- xpath (~> 0.1.3)
49
- celerity (0.8.8)
50
- childprocess (0.1.8)
45
+ selenium-webdriver (~> 0.2.0)
46
+ xpath (~> 0.1.4)
47
+ childprocess (0.1.9)
51
48
  ffi (~> 1.0.6)
52
- cucumber (0.10.2)
49
+ cucumber (1.0.1)
53
50
  builder (>= 2.1.2)
54
51
  diff-lcs (>= 1.1.2)
55
- gherkin (>= 2.3.5)
52
+ gherkin (~> 2.4.5)
56
53
  json (>= 1.4.6)
57
54
  term-ansicolor (>= 1.0.5)
58
- cucumber-rails (0.4.0)
59
- cucumber (>= 0.10.1)
60
- nokogiri (>= 1.4.4)
61
- rack-test (>= 0.5.7)
62
- culerity (0.2.15)
63
- database_cleaner (0.6.6)
55
+ cucumber-rails (1.0.2)
56
+ capybara (>= 1.0.0)
57
+ cucumber (~> 1.0.0)
58
+ nokogiri (>= 1.4.6)
59
+ database_cleaner (0.6.7)
64
60
  diff-lcs (1.1.2)
65
61
  erubis (2.6.6)
66
62
  abstract (>= 1.0.0)
67
63
  factory_girl (1.3.3)
68
- ffi (1.0.7)
69
- rake (>= 0.8.7)
70
- gherkin (2.3.5)
64
+ ffi (1.0.9)
65
+ gherkin (2.4.5)
71
66
  json (>= 1.4.6)
72
67
  git (1.2.5)
73
68
  i18n (0.5.0)
74
- json (1.5.1)
75
- json_pure (1.5.1)
69
+ json (1.5.3)
70
+ json_pure (1.5.3)
76
71
  machinist (1.0.6)
77
- mail (2.2.15)
72
+ mail (2.2.19)
78
73
  activesupport (>= 2.3.6)
79
74
  i18n (>= 0.4.0)
80
75
  mime-types (~> 1.16)
81
76
  treetop (~> 1.4.8)
82
77
  mime-types (1.16)
83
- nokogiri (1.4.4)
78
+ nokogiri (1.5.0)
84
79
  polyglot (0.3.1)
85
- rack (1.2.2)
80
+ rack (1.2.3)
86
81
  rack-mount (0.6.14)
87
82
  rack (>= 1.0.0)
88
83
  rack-test (0.5.7)
89
84
  rack (>= 1.0)
90
- rails (3.0.5)
91
- actionmailer (= 3.0.5)
92
- actionpack (= 3.0.5)
93
- activerecord (= 3.0.5)
94
- activeresource (= 3.0.5)
95
- activesupport (= 3.0.5)
85
+ rails (3.0.9)
86
+ actionmailer (= 3.0.9)
87
+ actionpack (= 3.0.9)
88
+ activerecord (= 3.0.9)
89
+ activeresource (= 3.0.9)
90
+ activesupport (= 3.0.9)
96
91
  bundler (~> 1.0)
97
- railties (= 3.0.5)
98
- railties (3.0.5)
99
- actionpack (= 3.0.5)
100
- activesupport (= 3.0.5)
92
+ railties (= 3.0.9)
93
+ railties (3.0.9)
94
+ actionpack (= 3.0.9)
95
+ activesupport (= 3.0.9)
101
96
  rake (>= 0.8.7)
97
+ rdoc (~> 3.4)
102
98
  thor (~> 0.14.4)
103
- rake (0.8.7)
99
+ rake (0.9.2)
104
100
  rcov (0.9.9)
101
+ rdoc (3.8)
105
102
  rspec (2.5.0)
106
103
  rspec-core (~> 2.5.0)
107
104
  rspec-expectations (~> 2.5.0)
108
105
  rspec-mocks (~> 2.5.0)
109
- rspec-core (2.5.1)
106
+ rspec-core (2.5.2)
110
107
  rspec-expectations (2.5.0)
111
108
  diff-lcs (~> 1.1.2)
112
109
  rspec-mocks (2.5.0)
@@ -116,8 +113,8 @@ GEM
116
113
  railties (~> 3.0)
117
114
  rspec (~> 2.5.0)
118
115
  rubyzip (0.9.4)
119
- selenium-webdriver (0.1.4)
120
- childprocess (>= 0.1.7)
116
+ selenium-webdriver (0.2.2)
117
+ childprocess (>= 0.1.9)
121
118
  ffi (>= 1.0.7)
122
119
  json_pure
123
120
  rubyzip
@@ -128,10 +125,10 @@ GEM
128
125
  thor (0.14.6)
129
126
  treetop (1.4.9)
130
127
  polyglot (>= 0.3.1)
131
- tzinfo (0.3.25)
132
- xpath (0.1.3)
128
+ tzinfo (0.3.29)
129
+ xpath (0.1.4)
133
130
  nokogiri (~> 1.3)
134
- yard (0.6.5)
131
+ yard (0.7.2)
135
132
 
136
133
  PLATFORMS
137
134
  ruby
@@ -1,3 +1,10 @@
1
+ == 0.4.8
2
+
3
+ * 2 minor improvements
4
+ * Support factory_girl v1 and v2 API [Ari Epstein]
5
+ * Dev deps updated to latest cucumber & cucumber-rails, and test for factory_girl 2 [Ian White]
6
+
7
+
1
8
  == 0.4.7
2
9
 
3
10
  * 2 minor improvements
@@ -458,6 +458,7 @@ To run the specs & features do:
458
458
 
459
459
  The following people have made Pickle better:
460
460
 
461
+ * {Ari Epstein}[http://github.com/aepstein]
461
462
  * {Jonathan Hinkle}[http://github.com/hynkle]
462
463
  * {Devin Walters and Nick Karpenske}[http://github.com/bendyworks]
463
464
  * {Marc Lee}[http://github.com/maleko]
@@ -106,15 +106,29 @@ module Pickle
106
106
  # factory-girl adapter
107
107
  class FactoryGirl < Adapter
108
108
  def self.factories
109
- (::Factory.factories.values rescue []).map {|factory| new(factory)}
109
+ if defined? ::FactoryGirl
110
+ factories = []
111
+ ::FactoryGirl.factories.each {|v| factories << new(v)}
112
+ factories
113
+ else
114
+ (::Factory.factories.values rescue []).map {|factory| new(factory)}
115
+ end
110
116
  end
111
117
 
112
118
  def initialize(factory)
113
- @klass, @name = factory.build_class, factory.factory_name.to_s
119
+ if defined? ::FactoryGirl
120
+ @klass, @name = factory.build_class, factory.name.to_s
121
+ else
122
+ @klass, @name = factory.build_class, factory.factory_name.to_s
123
+ end
114
124
  end
115
125
 
116
126
  def create(attrs = {})
117
- Factory(@name, attrs)
127
+ if defined? ::FactoryGirl
128
+ ::FactoryGirl.create(@name, attrs)
129
+ else
130
+ Factory(@name, attrs)
131
+ end
118
132
  end
119
133
  end
120
134
 
@@ -1,3 +1,3 @@
1
1
  module Pickle
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.email = "ian.w.white@gmail.com"
12
12
  s.homepage = "http://github.com/ianwhite/pickle"
13
13
 
14
- s.rubyforge_project = "orm_adapter"
14
+ s.rubyforge_project = "pickle"
15
15
  s.required_rubygems_version = ">= 1.3.6"
16
16
 
17
17
  s.files = `git ls-files`.split("\n")
@@ -67,23 +67,35 @@ describe Pickle::Adapter do
67
67
  end
68
68
  end
69
69
  end
70
-
71
-
72
70
  end
73
71
 
74
72
  describe 'FactoryGirl' do
75
73
  before do
76
74
  Pickle::Adapter::FactoryGirl.stub!(:model_classes).and_return([@klass1, @klass2, @klass3])
77
- @orig_factories, Factory.factories = Factory.factories, {}
78
-
79
- Factory.define(:one, :class => @klass1) {}
80
- Factory.define(:two, :class => @klass2) {}
81
- @factory1 = Factory.factories[:one]
82
- @factory2 = Factory.factories[:two]
75
+
76
+ if defined? ::FactoryGirl
77
+ @orig_factories = ::FactoryGirl.factories.dup
78
+ ::FactoryGirl.factories.clear
79
+ ::FactoryGirl::Syntax::Default::DSL.new.factory(:one, :class => @klass1) {}
80
+ ::FactoryGirl::Syntax::Default::DSL.new.factory(:two, :class => @klass2) {}
81
+ @factory1 = ::FactoryGirl.factories[:one]
82
+ @factory2 = ::FactoryGirl.factories[:two]
83
+ else
84
+ @orig_factories, Factory.factories = Factory.factories, {}
85
+ Factory.define(:one, :class => @klass1) {}
86
+ Factory.define(:two, :class => @klass2) {}
87
+ @factory1 = Factory.factories[:one]
88
+ @factory2 = Factory.factories[:two]
89
+ end
83
90
  end
84
91
 
85
92
  after do
86
- Factory.factories = @orig_factories
93
+ if defined? ::FactoryGirl
94
+ ::FactoryGirl.factories.clear
95
+ @orig_factories.each {|f| ::FactoryGirl.factories.add(f) }
96
+ else
97
+ Factory.factories = @orig_factories
98
+ end
87
99
  end
88
100
 
89
101
  it ".factories should create one for each factory" do
@@ -105,13 +117,15 @@ describe Pickle::Adapter do
105
117
  @factory.klass.should == @klass1
106
118
  end
107
119
 
108
- it "#create(attrs) should call Factory(<:key>, attrs)" do
109
- Factory.should_receive(:create).with("one", {:key => "val"})
110
- @factory.create(:key => "val")
120
+ unless defined? ::FactoryGirl
121
+ it "#create(attrs) should call Factory(<:key>, attrs)" do
122
+ Factory.should_receive(:create).with("one", {:key => "val"})
123
+ @factory.create(:key => "val")
124
+ end
111
125
  end
112
126
  end
113
127
  end
114
-
128
+
115
129
  describe 'Machinist' do
116
130
  before do
117
131
  Pickle::Adapter::Machinist.stub!(:model_classes).and_return([@klass1, @klass2, @klass3])
@@ -282,10 +282,12 @@ describe Pickle::Session do
282
282
  describe 'creating \'a super admin: "fred"\', then \'a user: "shirl"\', \'then 1 super_admin\' (super_admin is factory that returns users)' do
283
283
  let(:fred) { mock("fred", :class => user_class, :id => 2) }
284
284
  let(:shirl) { mock("shirl", :class => user_class, :id => 3) }
285
- let(:noname) { mock("noname", :class => user_class, :is => 4) }
286
-
287
- let(:super_admin_factory) do
288
- Pickle::Adapter::FactoryGirl.new(mock(:build_class => user_class, :factory_name => :super_admin))
285
+ let(:noname) { mock("noname", :class => user_class, :id => 4) }
286
+
287
+ if defined? ::FactoryGirl
288
+ let(:super_admin_factory) { Pickle::Adapter::FactoryGirl.new(mock(:build_class => user_class, :name => :super_admin)) }
289
+ else
290
+ let(:super_admin_factory) { Pickle::Adapter::FactoryGirl.new(mock(:build_class => user_class, :factory_name => :super_admin)) }
289
291
  end
290
292
 
291
293
  before do
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: 1
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 7
10
- version: 0.4.7
9
+ - 8
10
+ version: 0.4.8
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: 2011-03-24 00:00:00 +00:00
18
+ date: 2011-07-15 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -350,8 +350,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
350
  version: 1.3.6
351
351
  requirements: []
352
352
 
353
- rubyforge_project: orm_adapter
354
- rubygems_version: 1.5.1
353
+ rubyforge_project: pickle
354
+ rubygems_version: 1.6.2
355
355
  signing_key:
356
356
  specification_version: 3
357
357
  summary: Easy model creation and reference in your cucumber features.