pickle 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ doc/*
3
3
  .yardoc
4
4
  pickle-email*
5
5
  cucumber_test_app
6
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,20 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "yard"
4
+ gem "rake"
5
+ gem "cucumber", ">=0.8"
6
+ gem "rspec"
7
+
8
+ group :test do
9
+ gem "rspec-rails"
10
+ gem "rails", "~>2.3"
11
+ gem "cucumber-rails", ">=0.3.2"
12
+ gem "factory_girl"
13
+ gem "machinist"
14
+ gem "jeweler"
15
+ gem "rcov"
16
+ gem "database_cleaner"
17
+ gem "capybara"
18
+ gem "webrat"
19
+ gem "sqlite3-ruby"
20
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,98 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (2.3.8)
5
+ actionpack (= 2.3.8)
6
+ actionpack (2.3.8)
7
+ activesupport (= 2.3.8)
8
+ rack (~> 1.1.0)
9
+ activerecord (2.3.8)
10
+ activesupport (= 2.3.8)
11
+ activeresource (2.3.8)
12
+ activesupport (= 2.3.8)
13
+ activesupport (2.3.8)
14
+ builder (2.1.2)
15
+ capybara (0.3.9)
16
+ culerity (>= 0.2.4)
17
+ mime-types (>= 1.16)
18
+ nokogiri (>= 1.3.3)
19
+ rack (>= 1.0.0)
20
+ rack-test (>= 0.5.4)
21
+ selenium-webdriver (>= 0.0.3)
22
+ cucumber (0.8.5)
23
+ builder (~> 2.1.2)
24
+ diff-lcs (~> 1.1.2)
25
+ gherkin (~> 2.1.4)
26
+ json_pure (~> 1.4.3)
27
+ term-ansicolor (~> 1.0.4)
28
+ cucumber-rails (0.3.2)
29
+ cucumber (>= 0.8.0)
30
+ culerity (0.2.10)
31
+ database_cleaner (0.5.2)
32
+ diff-lcs (1.1.2)
33
+ factory_girl (1.3.2)
34
+ ffi (0.6.3)
35
+ rake (>= 0.8.7)
36
+ gemcutter (0.6.1)
37
+ gherkin (2.1.5)
38
+ trollop (~> 1.16.2)
39
+ git (1.2.5)
40
+ jeweler (1.4.0)
41
+ gemcutter (>= 0.1.0)
42
+ git (>= 1.2.5)
43
+ rubyforge (>= 2.0.0)
44
+ json_pure (1.4.6)
45
+ machinist (1.0.6)
46
+ mime-types (1.16)
47
+ nokogiri (1.4.3.1)
48
+ rack (1.1.0)
49
+ rack-test (0.5.4)
50
+ rack (>= 1.0)
51
+ rails (2.3.8)
52
+ actionmailer (= 2.3.8)
53
+ actionpack (= 2.3.8)
54
+ activerecord (= 2.3.8)
55
+ activeresource (= 2.3.8)
56
+ activesupport (= 2.3.8)
57
+ rake (>= 0.8.3)
58
+ rake (0.8.7)
59
+ rcov (0.9.8)
60
+ rspec (1.3.0)
61
+ rspec-rails (1.3.2)
62
+ rack (>= 1.0.0)
63
+ rspec (>= 1.3.0)
64
+ rubyforge (2.0.4)
65
+ json_pure (>= 1.1.7)
66
+ rubyzip (0.9.4)
67
+ selenium-webdriver (0.0.27)
68
+ ffi (>= 0.6.1)
69
+ json_pure
70
+ rubyzip
71
+ sqlite3-ruby (1.3.1)
72
+ term-ansicolor (1.0.5)
73
+ trollop (1.16.2)
74
+ webrat (0.7.1)
75
+ nokogiri (>= 1.2.0)
76
+ rack (>= 1.0)
77
+ rack-test (>= 0.5.3)
78
+ yard (0.5.8)
79
+
80
+ PLATFORMS
81
+ ruby
82
+
83
+ DEPENDENCIES
84
+ capybara
85
+ cucumber (>= 0.8)
86
+ cucumber-rails (>= 0.3.2)
87
+ database_cleaner
88
+ factory_girl
89
+ jeweler
90
+ machinist
91
+ rails (~> 2.3)
92
+ rake
93
+ rcov
94
+ rspec
95
+ rspec-rails
96
+ sqlite3-ruby
97
+ webrat
98
+ yard
data/History.txt CHANGED
@@ -1,3 +1,14 @@
1
+ == 0.3.5
2
+
3
+ * 3 improvements
4
+ * bundler is used for setting up development dependencies
5
+ * gemspec specifies dependencies for using pickle
6
+ * Machinist 2 compatability [giddie]
7
+
8
+ * 1 bugfix
9
+ * find_models now works with a factory name with spaces in it [#27]
10
+
11
+
1
12
  == 0.3.4
2
13
 
3
14
  * 2 minor improvements
data/README.rdoc CHANGED
@@ -316,18 +316,23 @@ can build up composite objects with ease
316
316
 
317
317
  == Run the tests
318
318
 
319
+ To get all the dependencies required for developing pickle, do the following
320
+
321
+ bundle install
322
+
319
323
  To run the specs do:
320
324
 
321
- rake spec
325
+ bundle exec rake spec
322
326
 
323
327
  To run the features (rails 2.3 only ATM):
324
328
 
325
- rake cucumber
329
+ bundle exec rake cucumber
326
330
 
327
331
  == Contributors
328
332
 
329
333
  The following people have made Pickle better:
330
334
 
335
+ * {Paul Gideon Dann}[http://github.com/giddie]
331
336
  * {Tom Meier}[http://github.com/tommeier]
332
337
  * {Sean Hussey}[http://github.com/seanhussey]
333
338
  * Brian Rose & Kevin Olsen
@@ -9,6 +9,10 @@ Jeweler::Tasks.new do |s|
9
9
  s.email = "ian.w.white@gmail.com"
10
10
  s.homepage = "http://github.com/ianwhite/pickle/tree"
11
11
  s.authors = ["Ian White"]
12
+ s.add_dependency('rspec', ">=1.3")
13
+ s.add_dependency('cucumber', ">=0.8")
14
+ s.add_dependency('yard')
15
+ s.add_dependency('rake')
12
16
  end
13
17
 
14
18
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.4
1
+ 0.3.5
@@ -90,7 +90,11 @@ module Pickle
90
90
  end
91
91
 
92
92
  def create(attrs = {})
93
- @klass.send(:make, @blueprint, attrs)
93
+ if @klass.respond_to?('make!')
94
+ @klass.send(:make!, @blueprint, attrs)
95
+ else
96
+ @klass.send(:make, @blueprint, attrs)
97
+ end
94
98
  end
95
99
  end
96
100
 
@@ -58,6 +58,8 @@ module Pickle
58
58
  end
59
59
 
60
60
  def find_models(factory, fields = nil)
61
+ factory = pickle_parser.canonical(factory)
62
+
61
63
  models_by_index(factory).clear
62
64
 
63
65
  model_class = pickle_config.factories[factory].klass
data/pickle.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pickle}
8
- s.version = "0.3.4"
8
+ s.version = "0.3.5"
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-06}
12
+ s.date = %q{2010-08-12}
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 = [
@@ -17,12 +17,14 @@ Gem::Specification.new do |s|
17
17
  ]
18
18
  s.files = [
19
19
  ".gitignore",
20
+ "Gemfile",
21
+ "Gemfile.lock",
20
22
  "History.txt",
21
23
  "License.txt",
22
24
  "README.rdoc",
23
25
  "Rakefile",
24
26
  "Rakefile.d/cucumber.rake",
25
- "Rakefile.d/jeweller.rake",
27
+ "Rakefile.d/jeweler.rake",
26
28
  "Rakefile.d/rcov.rake",
27
29
  "Rakefile.d/rspec.rake",
28
30
  "Rakefile.d/yard.rake",
@@ -110,9 +112,21 @@ Gem::Specification.new do |s|
110
112
  s.specification_version = 3
111
113
 
112
114
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
115
+ s.add_runtime_dependency(%q<rspec>, [">= 1.3"])
116
+ s.add_runtime_dependency(%q<cucumber>, [">= 0.8"])
117
+ s.add_runtime_dependency(%q<yard>, [">= 0"])
118
+ s.add_runtime_dependency(%q<rake>, [">= 0"])
113
119
  else
120
+ s.add_dependency(%q<rspec>, [">= 1.3"])
121
+ s.add_dependency(%q<cucumber>, [">= 0.8"])
122
+ s.add_dependency(%q<yard>, [">= 0"])
123
+ s.add_dependency(%q<rake>, [">= 0"])
114
124
  end
115
125
  else
126
+ s.add_dependency(%q<rspec>, [">= 1.3"])
127
+ s.add_dependency(%q<cucumber>, [">= 0.8"])
128
+ s.add_dependency(%q<yard>, [">= 0"])
129
+ s.add_dependency(%q<rake>, [">= 0"])
116
130
  end
117
131
  end
118
132
 
@@ -267,7 +267,7 @@ describe Pickle::Session do
267
267
  end
268
268
 
269
269
  it "should call User.find :all, :conditions => {'hair' => 'pink'}" do
270
- find_models('user', 'hair: "pink"')
270
+ find_models('user', 'hair: "pink"').should == [user]
271
271
  end
272
272
 
273
273
  describe "after find," do
@@ -275,6 +275,12 @@ describe Pickle::Session do
275
275
 
276
276
  it_should_behave_like "after storing a single user"
277
277
  end
278
+
279
+ it "should cope with spaces in the factory name (ie. it should make it canonical)" do
280
+ pickle_parser.stub!(:canonical).and_return('user')
281
+ pickle_parser.should_receive(:canonical).with('u ser').and_return('user')
282
+ find_models('u ser', 'hair: "pink"').should == [user]
283
+ end
278
284
  end
279
285
 
280
286
  describe 'creating \'a super admin: "fred"\', then \'a user: "shirl"\', \'then 1 super_admin\' (super_admin is factory that returns users)' 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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 4
10
- version: 0.3.4
9
+ - 5
10
+ version: 0.3.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ian White
@@ -15,10 +15,67 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-06 00:00:00 +01:00
18
+ date: 2010-08-12 00:00:00 +01:00
19
19
  default_executable:
20
- dependencies: []
21
-
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: rspec
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 9
30
+ segments:
31
+ - 1
32
+ - 3
33
+ version: "1.3"
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: cucumber
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 27
45
+ segments:
46
+ - 0
47
+ - 8
48
+ version: "0.8"
49
+ type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: yard
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ type: :runtime
64
+ version_requirements: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ name: rake
67
+ prerelease: false
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
76
+ version: "0"
77
+ type: :runtime
78
+ version_requirements: *id004
22
79
  description: Easy model creation and reference in your cucumber features
23
80
  email: ian.w.white@gmail.com
24
81
  executables: []
@@ -29,12 +86,14 @@ extra_rdoc_files:
29
86
  - README.rdoc
30
87
  files:
31
88
  - .gitignore
89
+ - Gemfile
90
+ - Gemfile.lock
32
91
  - History.txt
33
92
  - License.txt
34
93
  - README.rdoc
35
94
  - Rakefile
36
95
  - Rakefile.d/cucumber.rake
37
- - Rakefile.d/jeweller.rake
96
+ - Rakefile.d/jeweler.rake
38
97
  - Rakefile.d/rcov.rake
39
98
  - Rakefile.d/rspec.rake
40
99
  - Rakefile.d/yard.rake