pickle 0.4.4 → 0.4.5
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.
- data/.gitignore +16 -5
- data/Gemfile +1 -18
- data/Gemfile.lock.development +151 -0
- data/History.txt +8 -0
- data/README.rdoc +6 -6
- data/Rakefile.d/cucumber.rake +6 -4
- data/Rakefile.d/release.rake +44 -0
- data/Rakefile.d/rspec.rake +2 -6
- data/autotest/discover.rb +9 -0
- data/features/app/app.rb +11 -15
- data/features/generator/generators.feature +5 -5
- data/features/step_definitions/extra_email_steps.rb +2 -2
- data/features/step_definitions/generator_steps.rb +2 -2
- data/features/step_definitions/path_steps.rb +1 -1
- data/features/support/env.rb +17 -12
- data/lib/pickle/version.rb +1 -7
- data/pickle.gemspec +32 -129
- data/spec/pickle/adapter_spec.rb +4 -28
- data/spec/pickle/config_spec.rb +1 -1
- data/spec/pickle/email/parser_spec.rb +1 -1
- data/spec/pickle/email_spec.rb +1 -1
- data/spec/pickle/parser/matchers_spec.rb +1 -1
- data/spec/pickle/parser_spec.rb +1 -1
- data/spec/pickle/path_spec.rb +1 -1
- data/spec/pickle/session_spec.rb +5 -9
- data/spec/pickle_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +222 -36
- data/Gemfile.lock +0 -98
- data/Rakefile.d/jeweler.rake +0 -23
- data/Rakefile.d/rcov.rake +0 -18
- data/VERSION +0 -1
data/.gitignore
CHANGED
@@ -1,6 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# system crap
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
# local ruby/gems dev stuff
|
5
|
+
.rvmrc
|
6
|
+
.bundle
|
7
|
+
Gemfile.lock
|
5
8
|
cucumber_test_app
|
6
|
-
|
9
|
+
pickle-email*
|
10
|
+
|
11
|
+
# built docs
|
12
|
+
.yardoc
|
13
|
+
doc
|
14
|
+
|
15
|
+
# built gems
|
16
|
+
pkg
|
17
|
+
*.gem
|
data/Gemfile
CHANGED
@@ -1,20 +1,3 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
|
3
|
-
|
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
|
3
|
+
gemspec
|
@@ -0,0 +1,151 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
pickle (0.4.5)
|
5
|
+
cucumber (>= 0.8)
|
6
|
+
rake
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
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)
|
18
|
+
builder (~> 2.1.2)
|
19
|
+
erubis (~> 2.6.6)
|
20
|
+
i18n (~> 0.4)
|
21
|
+
rack (~> 1.2.1)
|
22
|
+
rack-mount (~> 0.6.13)
|
23
|
+
rack-test (~> 0.5.7)
|
24
|
+
tzinfo (~> 0.3.23)
|
25
|
+
activemodel (3.0.5)
|
26
|
+
activesupport (= 3.0.5)
|
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)
|
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)
|
39
|
+
builder (2.1.2)
|
40
|
+
capybara (0.4.1.2)
|
41
|
+
celerity (>= 0.7.9)
|
42
|
+
culerity (>= 0.2.4)
|
43
|
+
mime-types (>= 1.16)
|
44
|
+
nokogiri (>= 1.3.3)
|
45
|
+
rack (>= 1.0.0)
|
46
|
+
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.7)
|
51
|
+
ffi (~> 0.6.3)
|
52
|
+
cucumber (0.10.0)
|
53
|
+
builder (>= 2.1.2)
|
54
|
+
diff-lcs (~> 1.1.2)
|
55
|
+
gherkin (~> 2.3.2)
|
56
|
+
json (~> 1.4.6)
|
57
|
+
term-ansicolor (~> 1.0.5)
|
58
|
+
cucumber-rails (0.3.2)
|
59
|
+
cucumber (>= 0.8.0)
|
60
|
+
culerity (0.2.15)
|
61
|
+
database_cleaner (0.6.5)
|
62
|
+
diff-lcs (1.1.2)
|
63
|
+
erubis (2.6.6)
|
64
|
+
abstract (>= 1.0.0)
|
65
|
+
factory_girl (1.3.3)
|
66
|
+
ffi (0.6.3)
|
67
|
+
rake (>= 0.8.7)
|
68
|
+
gherkin (2.3.3)
|
69
|
+
json (~> 1.4.6)
|
70
|
+
git (1.2.5)
|
71
|
+
i18n (0.5.0)
|
72
|
+
json (1.4.6)
|
73
|
+
json_pure (1.5.1)
|
74
|
+
machinist (1.0.6)
|
75
|
+
mail (2.2.15)
|
76
|
+
activesupport (>= 2.3.6)
|
77
|
+
i18n (>= 0.4.0)
|
78
|
+
mime-types (~> 1.16)
|
79
|
+
treetop (~> 1.4.8)
|
80
|
+
mime-types (1.16)
|
81
|
+
nokogiri (1.4.4)
|
82
|
+
polyglot (0.3.1)
|
83
|
+
rack (1.2.1)
|
84
|
+
rack-mount (0.6.13)
|
85
|
+
rack (>= 1.0.0)
|
86
|
+
rack-test (0.5.7)
|
87
|
+
rack (>= 1.0)
|
88
|
+
rails (3.0.5)
|
89
|
+
actionmailer (= 3.0.5)
|
90
|
+
actionpack (= 3.0.5)
|
91
|
+
activerecord (= 3.0.5)
|
92
|
+
activeresource (= 3.0.5)
|
93
|
+
activesupport (= 3.0.5)
|
94
|
+
bundler (~> 1.0)
|
95
|
+
railties (= 3.0.5)
|
96
|
+
railties (3.0.5)
|
97
|
+
actionpack (= 3.0.5)
|
98
|
+
activesupport (= 3.0.5)
|
99
|
+
rake (>= 0.8.7)
|
100
|
+
thor (~> 0.14.4)
|
101
|
+
rake (0.8.7)
|
102
|
+
rcov (0.9.9)
|
103
|
+
rspec (2.5.0)
|
104
|
+
rspec-core (~> 2.5.0)
|
105
|
+
rspec-expectations (~> 2.5.0)
|
106
|
+
rspec-mocks (~> 2.5.0)
|
107
|
+
rspec-core (2.5.1)
|
108
|
+
rspec-expectations (2.5.0)
|
109
|
+
diff-lcs (~> 1.1.2)
|
110
|
+
rspec-mocks (2.5.0)
|
111
|
+
rspec-rails (2.5.0)
|
112
|
+
actionpack (~> 3.0)
|
113
|
+
activesupport (~> 3.0)
|
114
|
+
railties (~> 3.0)
|
115
|
+
rspec (~> 2.5.0)
|
116
|
+
rubyzip (0.9.4)
|
117
|
+
selenium-webdriver (0.1.3)
|
118
|
+
childprocess (~> 0.1.5)
|
119
|
+
ffi (~> 0.6.3)
|
120
|
+
json_pure
|
121
|
+
rubyzip
|
122
|
+
sqlite3 (1.3.3)
|
123
|
+
sqlite3-ruby (1.3.3)
|
124
|
+
sqlite3 (>= 1.3.3)
|
125
|
+
term-ansicolor (1.0.5)
|
126
|
+
thor (0.14.6)
|
127
|
+
treetop (1.4.9)
|
128
|
+
polyglot (>= 0.3.1)
|
129
|
+
tzinfo (0.3.24)
|
130
|
+
xpath (0.1.3)
|
131
|
+
nokogiri (~> 1.3)
|
132
|
+
yard (0.6.4)
|
133
|
+
|
134
|
+
PLATFORMS
|
135
|
+
ruby
|
136
|
+
|
137
|
+
DEPENDENCIES
|
138
|
+
bundler
|
139
|
+
capybara
|
140
|
+
cucumber-rails (>= 0.3.2)
|
141
|
+
database_cleaner
|
142
|
+
factory_girl
|
143
|
+
git
|
144
|
+
machinist
|
145
|
+
pickle!
|
146
|
+
rack (~> 1.2.1)
|
147
|
+
rails (~> 3.0.5)
|
148
|
+
rcov
|
149
|
+
rspec-rails (~> 2.5.0)
|
150
|
+
sqlite3-ruby
|
151
|
+
yard
|
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== 0.4.5
|
2
|
+
development dependency upgrades
|
3
|
+
|
4
|
+
* 2 minor improvements
|
5
|
+
* Simplify release process, and change Gemspec handling to facilitate faster failing when a development dep becomes incompatible [Ian White]
|
6
|
+
* Upgrade development to use rspec 2, and a rails 3 application for the features [Ian White]
|
7
|
+
|
8
|
+
|
1
9
|
== 0.4.4
|
2
10
|
large object space fix, and allow escaped quotes as string values
|
3
11
|
|
data/README.rdoc
CHANGED
@@ -331,16 +331,16 @@ can build up composite objects with ease
|
|
331
331
|
|
332
332
|
== Run the tests
|
333
333
|
|
334
|
-
To
|
334
|
+
To run the specs and features, you can start from the last known good set of gem dependencies in Gemfile.lock.development:
|
335
335
|
|
336
|
-
|
336
|
+
git clone http://github.com/ianwhite/pickle
|
337
|
+
cd pickle
|
338
|
+
cp Gemfile.lock.development Gemfile.lock
|
339
|
+
bundle
|
337
340
|
|
338
|
-
To run the specs do:
|
341
|
+
To run the specs & features do:
|
339
342
|
|
340
343
|
bundle exec rake spec
|
341
|
-
|
342
|
-
To run the features (rails 2.3 only ATM):
|
343
|
-
|
344
344
|
bundle exec rake cucumber
|
345
345
|
|
346
346
|
== Contributors
|
data/Rakefile.d/cucumber.rake
CHANGED
@@ -7,17 +7,19 @@ end
|
|
7
7
|
|
8
8
|
desc "setup a rails app for running cucumber"
|
9
9
|
file "cucumber_test_app" do
|
10
|
-
puts "** setting up cucumber test app **
|
10
|
+
puts "** setting up cucumber test app **"
|
11
11
|
Rake::Task['cucumber:setup'].invoke
|
12
12
|
end
|
13
13
|
|
14
14
|
namespace :cucumber do
|
15
15
|
task :setup do
|
16
16
|
rm_rf "cucumber_test_app"
|
17
|
-
sh "rails cucumber_test_app"
|
17
|
+
sh "rails new cucumber_test_app"
|
18
18
|
cd "cucumber_test_app" do
|
19
|
-
sh "
|
20
|
-
sh "
|
19
|
+
sh "echo 'gem \"cucumber-rails\"' >> Gemfile"
|
20
|
+
sh "echo 'gem \"rspec-rails\"' >> Gemfile"
|
21
|
+
sh "echo 'gem \"capybara\"' >> Gemfile"
|
22
|
+
sh "bundle install"
|
21
23
|
end
|
22
24
|
sh "ln -s #{File.expand_path('.')} cucumber_test_app/vendor/plugins/pickle"
|
23
25
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# tasks for building and releasing the software
|
2
|
+
require 'git'
|
3
|
+
require 'pickle/version'
|
4
|
+
|
5
|
+
task :build do
|
6
|
+
system "gem build pickle.gemspec"
|
7
|
+
end
|
8
|
+
|
9
|
+
namespace :release do
|
10
|
+
task :rubygems => :pre do
|
11
|
+
system "gem push pickle-#{Pickle::VERSION}.gem"
|
12
|
+
end
|
13
|
+
|
14
|
+
task :github => :pre do
|
15
|
+
tag = "v#{Pickle::VERSION}"
|
16
|
+
git = Git.open('.')
|
17
|
+
|
18
|
+
if (git.tag(tag) rescue nil)
|
19
|
+
raise "** repo is already tagged with: #{tag}"
|
20
|
+
end
|
21
|
+
|
22
|
+
git.add_tag(tag)
|
23
|
+
git.push('origin', tag)
|
24
|
+
end
|
25
|
+
|
26
|
+
task :pre => [:spec, :cucumber, :build] do
|
27
|
+
git = Git.open('.')
|
28
|
+
|
29
|
+
if File.exists?("Gemfile.lock") && File.read("Gemfile.lock") != File.read("Gemfile.lock.development")
|
30
|
+
cp "Gemfile.lock", "Gemfile.lock.development"
|
31
|
+
raise "** Gemfile.lock.development has been updated, please commit these changes."
|
32
|
+
end
|
33
|
+
|
34
|
+
if (git.status.changed + git.status.added + git.status.deleted).any?
|
35
|
+
raise "** repo is not clean, try committing some files"
|
36
|
+
end
|
37
|
+
|
38
|
+
if git.object('HEAD').sha != git.object('origin/master').sha
|
39
|
+
raise "** origin does not match HEAD, have you pushed?"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
task :all => ['release:github', 'release:rubygems']
|
44
|
+
end
|
data/Rakefile.d/rspec.rake
CHANGED
data/features/app/app.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# Routes
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
Rails.application.routes.draw do
|
3
|
+
resources :spoons, :controller => 'default'
|
4
|
+
resources :forks, :controller => 'default' do
|
5
|
+
resources :tines, :controller => 'default' do
|
6
|
+
resources :comments, :controller => 'default'
|
7
7
|
end
|
8
8
|
end
|
9
|
-
|
9
|
+
resources :users, :controller => 'default'
|
10
10
|
end
|
11
11
|
|
12
12
|
# Migrations
|
@@ -98,25 +98,21 @@ end
|
|
98
98
|
|
99
99
|
# notifiers
|
100
100
|
class Notifier < ActionMailer::Base
|
101
|
-
include
|
101
|
+
include Rails.application.routes.url_helpers
|
102
102
|
|
103
103
|
# BC 2.1
|
104
|
-
|
105
|
-
view_paths << "#{File.dirname(__FILE__)}/views"
|
106
|
-
else
|
107
|
-
self.template_root = "#{File.dirname(__FILE__)}/views"
|
108
|
-
end
|
104
|
+
self.view_paths = "#{File.dirname(__FILE__)}/views"
|
109
105
|
|
110
106
|
def user_email(user)
|
111
107
|
@recipients = user.email
|
112
108
|
@subject = 'A user email'
|
113
|
-
@
|
114
|
-
@
|
109
|
+
@user = user
|
110
|
+
@path = user_path(user)
|
115
111
|
end
|
116
112
|
|
117
113
|
def email(to, subject, body)
|
118
114
|
@recipients = to
|
119
115
|
@subject = subject
|
120
|
-
@body
|
116
|
+
@body = body
|
121
117
|
end
|
122
118
|
end
|
@@ -6,14 +6,14 @@ Feature: allow pickle to generate steps
|
|
6
6
|
|
7
7
|
Scenario: script/generate pickle on fresh cuke install
|
8
8
|
Given cucumber has been freshly generated
|
9
|
-
When I run "
|
9
|
+
When I run "rails g pickle -f"
|
10
10
|
Then the file features/support/pickle.rb should exist
|
11
11
|
And the file features/support/pickle.rb should match /require 'pickle\/world'/
|
12
12
|
And the file features/step_definitions/pickle_steps.rb should be identical to the local step_definitions/pickle_steps.rb
|
13
13
|
|
14
14
|
Scenario: script/generate pickle path on fresh cuke install
|
15
15
|
Given cucumber has been freshly generated
|
16
|
-
When I run "
|
16
|
+
When I run "rails g pickle --paths -f"
|
17
17
|
Then the file features/support/pickle.rb should exist
|
18
18
|
And the file features/support/pickle.rb should match /require 'pickle\/world'/
|
19
19
|
And the file features/support/pickle.rb should match /require 'pickle\/path\/world'/
|
@@ -22,7 +22,7 @@ Feature: allow pickle to generate steps
|
|
22
22
|
|
23
23
|
Scenario: script/generate pickle email on fresh cuke install
|
24
24
|
Given cucumber has been freshly generated
|
25
|
-
When I run "
|
25
|
+
When I run "rails g pickle --email -f"
|
26
26
|
Then the file features/support/pickle.rb should exist
|
27
27
|
And the file features/support/pickle.rb should match /require 'pickle\/world'/
|
28
28
|
And the file features/support/pickle.rb should match /require 'pickle\/email\/world'/
|
@@ -32,7 +32,7 @@ Feature: allow pickle to generate steps
|
|
32
32
|
|
33
33
|
Scenario: script/generate pickle path email on fresh cuke install
|
34
34
|
Given cucumber has been freshly generated
|
35
|
-
When I run "
|
35
|
+
When I run "rails g pickle --paths --email -f"
|
36
36
|
Then the file features/support/pickle.rb should exist
|
37
37
|
And the file features/support/pickle.rb should be identical to the local support/pickle.rb
|
38
38
|
And the file features/support/pickle.rb should match /require 'pickle\/world'/
|
@@ -46,7 +46,7 @@ Feature: allow pickle to generate steps
|
|
46
46
|
Scenario: regenerating pickle
|
47
47
|
Given cucumber has been freshly generated
|
48
48
|
And pickle path email has been freshly generated
|
49
|
-
When I run "
|
49
|
+
When I run "rails g pickle --paths --email -f"
|
50
50
|
Then the file features/support/pickle.rb should match /require 'pickle\/world'/
|
51
51
|
And the file features/support/pickle.rb should match /require 'pickle\/path\/world'/
|
52
52
|
And the file features/support/pickle.rb should match /require 'pickle\/email\/world'/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Given(/^an email "(.*?)" with body: "(.*?)" is delivered to (.+?)$/) do |subject, body, to|
|
2
|
-
Notifier.
|
2
|
+
Notifier.email(to, subject, body).deliver
|
3
3
|
end
|
4
4
|
|
5
5
|
Given(/^#{capture_model}'s email is delivered$/) do |model|
|
6
|
-
Notifier.
|
6
|
+
Notifier.user_email(model!(model)).deliver
|
7
7
|
end
|
@@ -8,11 +8,11 @@ After('@gen') do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
Given(/^cucumber has been freshly generated$/) do
|
11
|
-
`cd #{Rails.root};
|
11
|
+
`cd #{Rails.root}; rails g cucumber:install -f --capybara`
|
12
12
|
end
|
13
13
|
|
14
14
|
Given(/^pickle path email has been freshly generated$/) do
|
15
|
-
`cd #{Rails.root};
|
15
|
+
`cd #{Rails.root}; rails g pickle paths email -f`
|
16
16
|
end
|
17
17
|
|
18
18
|
Given(/^env\.rb already requires (.+)$/) do |file|
|