pickle 0.5.2 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/build.yml +62 -0
  3. data/.gitignore +3 -2
  4. data/.travis.yml +24 -4
  5. data/History.txt +52 -35
  6. data/README.md +19 -27
  7. data/Rakefile.d/cucumber.rake +13 -4
  8. data/Rakefile.d/repoclean.rake +3 -0
  9. data/features/app/app.rb +7 -7
  10. data/features/app/factories.rb +5 -5
  11. data/features/email/email.feature +1 -0
  12. data/features/step_definitions/email_steps.rb +1 -0
  13. data/features/step_definitions/extra_email_steps.rb +5 -5
  14. data/features/step_definitions/pickle_steps.rb +1 -0
  15. data/features/support/email.rb +1 -0
  16. data/features/support/env.rb +9 -3
  17. data/features/support/pickle.rb +2 -2
  18. data/gemfiles/Gemfile-rails.4.2.x +13 -0
  19. data/gemfiles/Gemfile-rails.5.0.x +12 -0
  20. data/gemfiles/Gemfile-rails.5.1.x +10 -0
  21. data/gemfiles/Gemfile-rails.5.2.x +11 -0
  22. data/gemfiles/Gemfile-rails.5.2.x-cukes-4 +11 -0
  23. data/gemfiles/Gemfile-rails.5.2.x-cukes-5 +11 -0
  24. data/gemfiles/Gemfile-rails.6.0.x-cukes-3 +10 -0
  25. data/gemfiles/Gemfile-rails.6.0.x-cukes-4 +10 -0
  26. data/gemfiles/Gemfile-rails.6.0.x-cukes-5 +11 -0
  27. data/gemfiles/Gemfile-rails.6.0.x-cukes-6 +11 -0
  28. data/gemfiles/Gemfile-rails.6.1.x-cukes-3 +10 -0
  29. data/gemfiles/Gemfile-rails.6.1.x-cukes-4 +10 -0
  30. data/gemfiles/Gemfile-rails.6.1.x-cukes-5 +11 -0
  31. data/gemfiles/Gemfile-rails.6.1.x-cukes-6 +11 -0
  32. data/gemfiles/Gemfile-rails.edge +9 -0
  33. data/lib/pickle.rb +0 -1
  34. data/lib/pickle/adapter.rb +9 -11
  35. data/lib/pickle/config.rb +1 -1
  36. data/lib/pickle/path.rb +1 -1
  37. data/lib/pickle/version.rb +1 -1
  38. data/pickle.gemspec +10 -9
  39. data/rails_generators/pickle/templates/pickle.rb +2 -2
  40. data/spec/pickle/adapter_spec.rb +19 -19
  41. data/spec/pickle/config_spec.rb +9 -9
  42. data/spec/pickle/email_spec.rb +1 -1
  43. data/spec/pickle/path_spec.rb +37 -18
  44. data/spec/pickle/session_spec.rb +5 -5
  45. data/spec/spec_helper.rb +6 -1
  46. metadata +62 -56
  47. data/Gemfile +0 -3
  48. data/Gemfile.lock.development +0 -158
  49. data/features/step_definitions/email_steps.rb +0 -65
  50. data/features/step_definitions/pickle_steps.rb +0 -105
  51. data/features/support/email.rb +0 -21
  52. data/init.rb +0 -0
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- gemspec
@@ -1,158 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- pickle (0.5.1)
5
- cucumber (>= 0.8)
6
- rake
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- actionmailer (3.1.12)
12
- actionpack (= 3.1.12)
13
- mail (~> 2.4.4)
14
- actionpack (3.1.12)
15
- activemodel (= 3.1.12)
16
- activesupport (= 3.1.12)
17
- builder (~> 3.0.0)
18
- erubis (~> 2.7.0)
19
- i18n (~> 0.6)
20
- rack (~> 1.3.6)
21
- rack-cache (~> 1.2)
22
- rack-mount (~> 0.8.2)
23
- rack-test (~> 0.6.1)
24
- sprockets (~> 2.0.4)
25
- activemodel (3.1.12)
26
- activesupport (= 3.1.12)
27
- builder (~> 3.0.0)
28
- i18n (~> 0.6)
29
- activerecord (3.1.12)
30
- activemodel (= 3.1.12)
31
- activesupport (= 3.1.12)
32
- arel (~> 2.2.3)
33
- tzinfo (~> 0.3.29)
34
- activeresource (3.1.12)
35
- activemodel (= 3.1.12)
36
- activesupport (= 3.1.12)
37
- activesupport (3.1.12)
38
- multi_json (~> 1.0)
39
- arel (2.2.3)
40
- builder (3.0.4)
41
- capybara (2.4.4)
42
- mime-types (>= 1.16)
43
- nokogiri (>= 1.3.3)
44
- rack (>= 1.0.0)
45
- rack-test (>= 0.5.4)
46
- xpath (~> 2.0)
47
- cucumber (1.3.18)
48
- builder (>= 2.1.2)
49
- diff-lcs (>= 1.1.3)
50
- gherkin (~> 2.12)
51
- multi_json (>= 1.7.5, < 2.0)
52
- multi_test (>= 0.1.1)
53
- cucumber-rails (1.4.2)
54
- capybara (>= 1.1.2, < 3)
55
- cucumber (>= 1.3.8, < 2)
56
- mime-types (>= 1.16, < 3)
57
- nokogiri (~> 1.5)
58
- rails (>= 3, < 5)
59
- database_cleaner (1.4.0)
60
- diff-lcs (1.2.5)
61
- erubis (2.7.0)
62
- fabrication (2.12.0)
63
- factory_girl (4.5.0)
64
- activesupport (>= 3.0.0)
65
- gherkin (2.12.2)
66
- multi_json (~> 1.3)
67
- git (1.2.9)
68
- hike (1.2.3)
69
- i18n (0.7.0)
70
- json (1.8.2)
71
- machinist (2.0)
72
- mail (2.4.4)
73
- i18n (>= 0.4.0)
74
- mime-types (~> 1.16)
75
- treetop (~> 1.4.8)
76
- mime-types (1.25.1)
77
- mini_portile (0.6.2)
78
- multi_json (1.10.1)
79
- multi_test (0.1.1)
80
- nokogiri (1.6.5)
81
- mini_portile (~> 0.6.0)
82
- polyglot (0.3.5)
83
- rack (1.3.10)
84
- rack-cache (1.2)
85
- rack (>= 0.4)
86
- rack-mount (0.8.3)
87
- rack (>= 1.0.0)
88
- rack-ssl (1.3.4)
89
- rack
90
- rack-test (0.6.3)
91
- rack (>= 1.0)
92
- rails (3.1.12)
93
- actionmailer (= 3.1.12)
94
- actionpack (= 3.1.12)
95
- activerecord (= 3.1.12)
96
- activeresource (= 3.1.12)
97
- activesupport (= 3.1.12)
98
- bundler (~> 1.0)
99
- railties (= 3.1.12)
100
- railties (3.1.12)
101
- actionpack (= 3.1.12)
102
- activesupport (= 3.1.12)
103
- rack-ssl (~> 1.3.2)
104
- rake (>= 0.8.7)
105
- rdoc (~> 3.4)
106
- thor (~> 0.14.6)
107
- rake (10.4.2)
108
- rdoc (3.12.2)
109
- json (~> 1.4)
110
- rspec-core (3.1.7)
111
- rspec-support (~> 3.1.0)
112
- rspec-expectations (3.1.2)
113
- diff-lcs (>= 1.2.0, < 2.0)
114
- rspec-support (~> 3.1.0)
115
- rspec-mocks (3.1.3)
116
- rspec-support (~> 3.1.0)
117
- rspec-rails (3.1.0)
118
- actionpack (>= 3.0)
119
- activesupport (>= 3.0)
120
- railties (>= 3.0)
121
- rspec-core (~> 3.1.0)
122
- rspec-expectations (~> 3.1.0)
123
- rspec-mocks (~> 3.1.0)
124
- rspec-support (~> 3.1.0)
125
- rspec-support (3.1.2)
126
- sprockets (2.0.5)
127
- hike (~> 1.2)
128
- rack (~> 1.0)
129
- tilt (~> 1.1, != 1.3.0)
130
- sqlite3 (1.3.10)
131
- thor (0.14.6)
132
- tilt (1.4.1)
133
- treetop (1.4.15)
134
- polyglot
135
- polyglot (>= 0.3.1)
136
- tzinfo (0.3.42)
137
- xpath (2.0.0)
138
- nokogiri (~> 1.3)
139
- yard (0.8.7.6)
140
-
141
- PLATFORMS
142
- ruby
143
-
144
- DEPENDENCIES
145
- bundler
146
- capybara
147
- cucumber-rails
148
- database_cleaner
149
- fabrication (~> 2.0)
150
- factory_girl
151
- git
152
- machinist (~> 2.0)
153
- pickle!
154
- rack
155
- rails (~> 3.1.0)
156
- rspec-rails (~> 3.0)
157
- sqlite3
158
- yard
@@ -1,65 +0,0 @@
1
- # this file generated by script/generate pickle email
2
- #
3
- # add email mappings in features/support/email.rb
4
-
5
- ActionMailer::Base.delivery_method = :test
6
- ActionMailer::Base.perform_deliveries = true
7
-
8
- Before do
9
- ActionMailer::Base.deliveries.clear
10
- end
11
-
12
- # Clear the deliveries array, useful if your background sends email that you want to ignore
13
- Given(/^all emails? (?:have|has) been delivered$/) do
14
- ActionMailer::Base.deliveries.clear
15
- end
16
-
17
- Given(/^(\d)+ emails? should be delivered$/) do |count|
18
- expect(emails.size).to eq(count.to_i)
19
- end
20
-
21
- When(/^(?:I|they) follow "([^"]*?)" in #{capture_email}$/) do |link, email_ref|
22
- visit_in_email(email(email_ref), link)
23
- end
24
-
25
- When(/^(?:I|they) click the first link in #{capture_email}$/) do |email_ref|
26
- click_first_link_in_email(email(email_ref))
27
- end
28
-
29
- Then(/^(\d)+ emails? should be delivered to (.*)$/) do |count, to|
30
- actual = emails("to: \"#{email_for(to)}\"").size
31
- expect(actual).to eq(count.to_i), "Expected #{count} emails but encountered #{actual} delivered to #{to}"
32
- end
33
-
34
- Then(/^(\d)+ emails? should be delivered with #{capture_fields}$/) do |count, fields|
35
- actual = emails(fields).size
36
- expect(actual).to eq(count.to_i), "Expected #{count} emails but encountered #{actual} to be delivered with #{fields}"
37
- end
38
-
39
- Then(/^#{capture_email} should be delivered to (.+)$/) do |email_ref, to|
40
- expect(email(email_ref, "to: \"#{email_for(to)}\"")).not_to be_nil, "Failed to find #{email_ref} delivered to: #{to}"
41
- end
42
-
43
- Then(/^#{capture_email} should not be delivered to (.+)$/) do |email_ref, to|
44
- expect(email(email_ref, "to: \"#{email_for(to)}\"")).to be_nil, "Unexpectedly found #{email_ref} delivered to: #{to}"
45
- end
46
-
47
- Then(/^#{capture_email} should have #{capture_fields}$/) do |email_ref, fields|
48
- expect(email(email_ref, fields)).not_to be_nil, "Failed to find #{fields} in #{email_ref}"
49
- end
50
-
51
- Then(/^#{capture_email} should contain "(.*)"$/) do |email_ref, text|
52
- expect(email(email_ref).body).to match(/#{text}/), "Failed to find \"#{text}\" in #{email_ref}"
53
- end
54
-
55
- Then(/^#{capture_email} should not contain "(.*)"$/) do |email_ref, text|
56
- expect(email(email_ref).body).not_to match(/#{text}/), "Unexpectedly found \"#{text}\" in #{email_ref}"
57
- end
58
-
59
- Then(/^#{capture_email} should link to (.+)$/) do |email_ref, page|
60
- expect(email(email_ref).body).to match(/#{path_to(page)}/), "Failed to find link to #{page} in #{email_ref}"
61
- end
62
-
63
- Then(/^show me the emails?$/) do
64
- save_and_open_emails
65
- end
@@ -1,105 +0,0 @@
1
- # this file generated by script/generate pickle
2
-
3
- # create a model
4
- Given(/^#{capture_model} exists?(?: with #{capture_fields})?$/) do |name, fields|
5
- create_model(name, fields)
6
- end
7
-
8
- # create n models
9
- Given(/^(\d+) #{capture_plural_factory} exist(?: with #{capture_fields})?$/) do |count, plural_factory, fields|
10
- create_models(count, plural_factory.singularize, fields)
11
- end
12
-
13
- # create models from a table
14
- Given(/^the following #{capture_plural_factory} exists?:?$/) do |plural_factory, table|
15
- create_models_from_table(plural_factory, table)
16
- end
17
-
18
- # find a model
19
- Then(/^#{capture_model} should exist(?: with #{capture_fields})?$/) do |name, fields|
20
- find_model!(name, fields)
21
- end
22
-
23
- # not find a model
24
- Then(/^#{capture_model} should not exist(?: with #{capture_fields})?$/) do |name, fields|
25
- expect(find_model(name, fields)).to be_nil
26
- end
27
-
28
- # find models with a table
29
- Then(/^the following #{capture_plural_factory} should exist:?$/) do |plural_factory, table|
30
- expect(find_models_from_table(plural_factory, table)).not_to be_any(&:nil?)
31
- end
32
-
33
- # not find models with a table
34
- Then(/^the following #{capture_plural_factory} should not exists?:?$/) do |plural_factory, table|
35
- find_models_from_table(plural_factory, table).should be_all(&:nil?)
36
- end
37
-
38
- # find exactly n models
39
- Then(/^(\d+) #{capture_plural_factory} should exist(?: with #{capture_fields})?$/) do |count, plural_factory, fields|
40
- expect(find_models(plural_factory.singularize, fields).size).to eq(count.to_i)
41
- end
42
-
43
- # assert equality of models
44
- Then(/^#{capture_model} should be #{capture_model}$/) do |a, b|
45
- expect(model!(a)).to eq(model!(b))
46
- end
47
-
48
- # assert model is in another model's has_many assoc
49
- Then(/^#{capture_model} should be (?:in|one of|amongst) #{capture_model}(?:'s)? (\w+)$/) do |target, owner, association|
50
- expect(model!(owner).send(association)).to include(model!(target))
51
- end
52
-
53
- # assert model is not in another model's has_many assoc
54
- Then(/^#{capture_model} should not be (?:in|one of|amongst) #{capture_model}(?:'s)? (\w+)$/) do |target, owner, association|
55
- expect(model!(owner).send(association)).not_to include(model!(target))
56
- end
57
-
58
- # assert model is another model's has_one/belongs_to assoc
59
- Then(/^#{capture_model} should be #{capture_model}(?:'s)? (\w+)$/) do |target, owner, association|
60
- expect(model!(owner).send(association)).to eq(model!(target))
61
- end
62
-
63
- # assert model is not another model's has_one/belongs_to assoc
64
- Then(/^#{capture_model} should not be #{capture_model}(?:'s)? (\w+)$/) do |target, owner, association|
65
- expect(model!(owner).send(association)).not_to eq(model!(target))
66
- end
67
-
68
- # assert model.predicate?
69
- Then(/^#{capture_model} should (?:be|have) (?:an? )?#{capture_predicate}$/) do |name, predicate|
70
- if model!(name).respond_to?("has_#{predicate.gsub(' ', '_')}")
71
- expect(model!(name)).to send("have_#{predicate.gsub(' ', '_')}")
72
- else
73
- expect(model!(name)).to send("be_#{predicate.gsub(' ', '_')}")
74
- end
75
- end
76
-
77
- # assert not model.predicate?
78
- Then(/^#{capture_model} should not (?:be|have) (?:an? )?#{capture_predicate}$/) do |name, predicate|
79
- if model!(name).respond_to?("has_#{predicate.gsub(' ', '_')}")
80
- expect(model!(name)).not_to send("have_#{predicate.gsub(' ', '_')}")
81
- else
82
- expect(model!(name)).not_to send("be_#{predicate.gsub(' ', '_')}")
83
- end
84
- end
85
-
86
- # expect(model.attribute).to eq(value)
87
- # expect(model.attribute).not_to eq(value)
88
- Then(/^#{capture_model}'s (\w+) (should(?: not)?) be #{capture_value}$/) do |name, attribute, expectation, expected|
89
- actual_value = model(name).send(attribute)
90
- expectation = expectation.gsub("should", "to").gsub(" ", "_")
91
-
92
- case expected
93
- when 'nil', 'true', 'false'
94
- expect(actual_value).send(expectation, eq(eval(expected)))
95
- when /^[+-]?[0-9_]+(\.\d+)?$/
96
- expect(actual_value).send(expectation, eq(expected.to_f))
97
- else
98
- expect(actual_value.to_s).send(expectation, eq(eval(expected)))
99
- end
100
- end
101
-
102
- # assert size of association
103
- Then /^#{capture_model} should have (\d+) (\w+)$/ do |name, size, association|
104
- expect(model!(name).send(association).size).to eq(size.to_i)
105
- end
@@ -1,21 +0,0 @@
1
- module EmailHelpers
2
- # Maps a name to an email address. Used by email_steps
3
-
4
- def email_for(to)
5
- case to
6
-
7
- # add your own name => email address mappings here
8
-
9
- when /^#{capture_model}$/
10
- model($1).email
11
-
12
- when /^"(.*)"$/
13
- $1
14
-
15
- else
16
- to
17
- end
18
- end
19
- end
20
-
21
- World(EmailHelpers)
data/init.rb DELETED
File without changes