spbtv_pickle 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +10 -0
  5. data/Gemfile +3 -0
  6. data/Gemfile.lock.development +158 -0
  7. data/History.txt +499 -0
  8. data/License.txt +20 -0
  9. data/README.md +566 -0
  10. data/Rakefile +20 -0
  11. data/Rakefile.d/cucumber.rake +27 -0
  12. data/Rakefile.d/release.rake +44 -0
  13. data/Rakefile.d/rspec.rake +3 -0
  14. data/Rakefile.d/yard.rake +5 -0
  15. data/Todo.txt +3 -0
  16. data/autotest/discover.rb +9 -0
  17. data/features/app/app.rb +128 -0
  18. data/features/app/blueprints.rb +6 -0
  19. data/features/app/fabricators.rb +6 -0
  20. data/features/app/factories.rb +25 -0
  21. data/features/app/views/notifier/email.erb +1 -0
  22. data/features/app/views/notifier/user_email.erb +6 -0
  23. data/features/email/email.feature +64 -0
  24. data/features/generator/generators.feature +59 -0
  25. data/features/path/models_page.feature +44 -0
  26. data/features/path/named_route_page.feature +10 -0
  27. data/features/pickle/create_from_active_record.feature +83 -0
  28. data/features/pickle/create_from_fabrication.feature +46 -0
  29. data/features/pickle/create_from_factory_girl.feature +66 -0
  30. data/features/pickle/create_from_machinist.feature +46 -0
  31. data/features/step_definitions/email_steps.rb +1 -0
  32. data/features/step_definitions/extra_email_steps.rb +12 -0
  33. data/features/step_definitions/fork_steps.rb +4 -0
  34. data/features/step_definitions/generator_steps.rb +52 -0
  35. data/features/step_definitions/path_steps.rb +14 -0
  36. data/features/step_definitions/pickle_steps.rb +1 -0
  37. data/features/step_definitions/raise_error_steps.rb +7 -0
  38. data/features/support/email.rb +1 -0
  39. data/features/support/env.rb +14 -0
  40. data/features/support/paths.rb +47 -0
  41. data/features/support/pickle.rb +27 -0
  42. data/features/support/pickle_app.rb +4 -0
  43. data/init.rb +0 -0
  44. data/lib/generators/pickle_generator.rb +44 -0
  45. data/lib/pickle.rb +26 -0
  46. data/lib/pickle/adapter.rb +183 -0
  47. data/lib/pickle/adapters/active_record.rb +67 -0
  48. data/lib/pickle/adapters/data_mapper.rb +42 -0
  49. data/lib/pickle/adapters/mongoid.rb +54 -0
  50. data/lib/pickle/config.rb +49 -0
  51. data/lib/pickle/email.rb +87 -0
  52. data/lib/pickle/email/parser.rb +18 -0
  53. data/lib/pickle/email/world.rb +13 -0
  54. data/lib/pickle/parser.rb +65 -0
  55. data/lib/pickle/parser/matchers.rb +87 -0
  56. data/lib/pickle/path.rb +45 -0
  57. data/lib/pickle/path/world.rb +5 -0
  58. data/lib/pickle/session.rb +244 -0
  59. data/lib/pickle/session/parser.rb +34 -0
  60. data/lib/pickle/version.rb +3 -0
  61. data/lib/pickle/world.rb +14 -0
  62. data/lib/spbtv_pickle.rb +1 -0
  63. data/rails_generators/pickle/pickle_generator.rb +31 -0
  64. data/rails_generators/pickle/templates/email.rb +21 -0
  65. data/rails_generators/pickle/templates/email_steps.rb +65 -0
  66. data/rails_generators/pickle/templates/paths.rb +47 -0
  67. data/rails_generators/pickle/templates/pickle.rb +29 -0
  68. data/rails_generators/pickle/templates/pickle_steps.rb +105 -0
  69. data/spbtv_pickle.gemspec +38 -0
  70. data/spec/pickle/adapter_spec.rb +203 -0
  71. data/spec/pickle/config_spec.rb +112 -0
  72. data/spec/pickle/email/parser_spec.rb +51 -0
  73. data/spec/pickle/email_spec.rb +187 -0
  74. data/spec/pickle/parser/matchers_spec.rb +70 -0
  75. data/spec/pickle/parser_spec.rb +165 -0
  76. data/spec/pickle/path_spec.rb +120 -0
  77. data/spec/pickle/session_spec.rb +448 -0
  78. data/spec/pickle_spec.rb +24 -0
  79. data/spec/spec_helper.rb +78 -0
  80. metadata +370 -0
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+
3
+ describe Pickle do
4
+ it ".config should be same object on multiple calls" do
5
+ expect(Pickle.config).to eq(Pickle.config)
6
+ end
7
+
8
+ it ".configure should configure the .config object" do
9
+ expect(Pickle.config).to receive(:foo).with(:bar)
10
+ Pickle.configure do |c|
11
+ c.foo :bar
12
+ end
13
+ end
14
+
15
+ it ".parser should create a parser with the default config" do
16
+ Pickle.instance_variable_set('@parser', nil)
17
+ expect(Pickle::Parser).to receive(:new).with(:config => Pickle.config)
18
+ Pickle.parser
19
+ end
20
+
21
+ it ".parser should be same object on multiple calls" do
22
+ expect(Pickle.parser).to eq(Pickle.parser)
23
+ end
24
+ end
@@ -0,0 +1,78 @@
1
+ require 'active_support'
2
+ require 'active_record'
3
+ require 'factory_girl'
4
+
5
+ $:.unshift(File.expand_path('../../lib', __FILE__))
6
+
7
+ require 'pickle'
8
+ require 'pickle/adapters/active_record'
9
+
10
+ # This file was generated by the `rspec --init` command. Conventionally, all
11
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
12
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
13
+ # file to always be loaded, without a need to explicitly require it in any files.
14
+ #
15
+ # Given that it is always loaded, you are encouraged to keep this file as
16
+ # light-weight as possible. Requiring heavyweight dependencies from this file
17
+ # will add to the boot time of your test suite on EVERY test run, even for an
18
+ # individual file that may not need all of that loaded. Instead, make a
19
+ # separate helper file that requires this one and then use it only in the specs
20
+ # that actually need it.
21
+ #
22
+ # The `.rspec` file also contains a few flags that are not defaults but that
23
+ # users commonly want.
24
+ #
25
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
26
+ RSpec.configure do |config|
27
+ # These two settings work together to allow you to limit a spec run
28
+ # to individual examples or groups you care about by tagging them with
29
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
30
+ # get run.
31
+ config.filter_run :focus
32
+ config.run_all_when_everything_filtered = true
33
+
34
+ # Many RSpec users commonly either run the entire suite or an individual
35
+ # file, and it's useful to allow more verbose output when running an
36
+ # individual spec file.
37
+ if config.files_to_run.one?
38
+ # Use the documentation formatter for detailed output,
39
+ # unless a formatter has already been configured
40
+ # (e.g. via a command-line flag).
41
+ config.default_formatter = 'doc'
42
+ end
43
+
44
+ # Run specs in random order to surface order dependencies. If you find an
45
+ # order dependency and want to debug it, you can fix the order by providing
46
+ # the seed, which is printed after each run.
47
+ # --seed 1234
48
+ config.order = :random
49
+
50
+ # Seed global randomization in this process using the `--seed` CLI option.
51
+ # Setting this allows you to use `--seed` to deterministically reproduce
52
+ # test failures related to randomization by passing the same `--seed` value
53
+ # as the one that triggered the failure.
54
+ Kernel.srand config.seed
55
+
56
+ # rspec-expectations config goes here. You can use an alternate
57
+ # assertion/expectation library such as wrong or the stdlib/minitest
58
+ # assertions if you prefer.
59
+ config.expect_with :rspec do |expectations|
60
+ # Enable only the newer, non-monkey-patching expect syntax.
61
+ # For more details, see:
62
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
63
+ expectations.syntax = :expect
64
+ end
65
+
66
+ # rspec-mocks config goes here. You can use an alternate test double
67
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
68
+ config.mock_with :rspec do |mocks|
69
+ # Enable only the newer, non-monkey-patching expect syntax.
70
+ # For more details, see:
71
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
72
+ mocks.syntax = :expect
73
+
74
+ # Prevents you from mocking or stubbing a method that does not exist on
75
+ # a real object. This is generally recommended.
76
+ mocks.verify_partial_doubles = false
77
+ end
78
+ end
metadata ADDED
@@ -0,0 +1,370 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spbtv_pickle
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.1
5
+ platform: ruby
6
+ authors:
7
+ - Ian White
8
+ - James Le Cuirot
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2017-03-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: cucumber
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0.8'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0.8'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rack
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: bundler
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: git
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: yard
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rspec-rails
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '3.0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '3.0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: rails
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: 3.1.0
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: 3.1.0
126
+ - !ruby/object:Gem::Dependency
127
+ name: cucumber-rails
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: factory_girl
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: fabrication
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: '2.0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '2.0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: machinist
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: '2.0'
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: '2.0'
182
+ - !ruby/object:Gem::Dependency
183
+ name: database_cleaner
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: capybara
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
210
+ - !ruby/object:Gem::Dependency
211
+ name: sqlite3
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ type: :development
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ description: Easy model creation and reference in your cucumber features
225
+ email:
226
+ - ian.w.white@gmail.com
227
+ - chewi@aura-online.co.uk
228
+ executables: []
229
+ extensions: []
230
+ extra_rdoc_files: []
231
+ files:
232
+ - ".gitignore"
233
+ - ".rspec"
234
+ - ".travis.yml"
235
+ - Gemfile
236
+ - Gemfile.lock.development
237
+ - History.txt
238
+ - License.txt
239
+ - README.md
240
+ - Rakefile
241
+ - Rakefile.d/cucumber.rake
242
+ - Rakefile.d/release.rake
243
+ - Rakefile.d/rspec.rake
244
+ - Rakefile.d/yard.rake
245
+ - Todo.txt
246
+ - autotest/discover.rb
247
+ - features/app/app.rb
248
+ - features/app/blueprints.rb
249
+ - features/app/fabricators.rb
250
+ - features/app/factories.rb
251
+ - features/app/views/notifier/email.erb
252
+ - features/app/views/notifier/user_email.erb
253
+ - features/email/email.feature
254
+ - features/generator/generators.feature
255
+ - features/path/models_page.feature
256
+ - features/path/named_route_page.feature
257
+ - features/pickle/create_from_active_record.feature
258
+ - features/pickle/create_from_fabrication.feature
259
+ - features/pickle/create_from_factory_girl.feature
260
+ - features/pickle/create_from_machinist.feature
261
+ - features/step_definitions/email_steps.rb
262
+ - features/step_definitions/extra_email_steps.rb
263
+ - features/step_definitions/fork_steps.rb
264
+ - features/step_definitions/generator_steps.rb
265
+ - features/step_definitions/path_steps.rb
266
+ - features/step_definitions/pickle_steps.rb
267
+ - features/step_definitions/raise_error_steps.rb
268
+ - features/support/email.rb
269
+ - features/support/env.rb
270
+ - features/support/paths.rb
271
+ - features/support/pickle.rb
272
+ - features/support/pickle_app.rb
273
+ - init.rb
274
+ - lib/generators/pickle_generator.rb
275
+ - lib/pickle.rb
276
+ - lib/pickle/adapter.rb
277
+ - lib/pickle/adapters/active_record.rb
278
+ - lib/pickle/adapters/data_mapper.rb
279
+ - lib/pickle/adapters/mongoid.rb
280
+ - lib/pickle/config.rb
281
+ - lib/pickle/email.rb
282
+ - lib/pickle/email/parser.rb
283
+ - lib/pickle/email/world.rb
284
+ - lib/pickle/parser.rb
285
+ - lib/pickle/parser/matchers.rb
286
+ - lib/pickle/path.rb
287
+ - lib/pickle/path/world.rb
288
+ - lib/pickle/session.rb
289
+ - lib/pickle/session/parser.rb
290
+ - lib/pickle/version.rb
291
+ - lib/pickle/world.rb
292
+ - lib/spbtv_pickle.rb
293
+ - rails_generators/pickle/pickle_generator.rb
294
+ - rails_generators/pickle/templates/email.rb
295
+ - rails_generators/pickle/templates/email_steps.rb
296
+ - rails_generators/pickle/templates/paths.rb
297
+ - rails_generators/pickle/templates/pickle.rb
298
+ - rails_generators/pickle/templates/pickle_steps.rb
299
+ - spbtv_pickle.gemspec
300
+ - spec/pickle/adapter_spec.rb
301
+ - spec/pickle/config_spec.rb
302
+ - spec/pickle/email/parser_spec.rb
303
+ - spec/pickle/email_spec.rb
304
+ - spec/pickle/parser/matchers_spec.rb
305
+ - spec/pickle/parser_spec.rb
306
+ - spec/pickle/path_spec.rb
307
+ - spec/pickle/session_spec.rb
308
+ - spec/pickle_spec.rb
309
+ - spec/spec_helper.rb
310
+ homepage: https://github.com/ianwhite/pickle
311
+ licenses:
312
+ - MIT
313
+ metadata: {}
314
+ post_install_message:
315
+ rdoc_options: []
316
+ require_paths:
317
+ - lib
318
+ required_ruby_version: !ruby/object:Gem::Requirement
319
+ requirements:
320
+ - - ">="
321
+ - !ruby/object:Gem::Version
322
+ version: '0'
323
+ required_rubygems_version: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - ">="
326
+ - !ruby/object:Gem::Version
327
+ version: 1.3.6
328
+ requirements: []
329
+ rubyforge_project: pickle
330
+ rubygems_version: 2.5.1
331
+ signing_key:
332
+ specification_version: 4
333
+ summary: Easy model creation and reference in your cucumber features.
334
+ test_files:
335
+ - features/app/app.rb
336
+ - features/app/blueprints.rb
337
+ - features/app/fabricators.rb
338
+ - features/app/factories.rb
339
+ - features/app/views/notifier/email.erb
340
+ - features/app/views/notifier/user_email.erb
341
+ - features/email/email.feature
342
+ - features/generator/generators.feature
343
+ - features/path/models_page.feature
344
+ - features/path/named_route_page.feature
345
+ - features/pickle/create_from_active_record.feature
346
+ - features/pickle/create_from_fabrication.feature
347
+ - features/pickle/create_from_factory_girl.feature
348
+ - features/pickle/create_from_machinist.feature
349
+ - features/step_definitions/email_steps.rb
350
+ - features/step_definitions/extra_email_steps.rb
351
+ - features/step_definitions/fork_steps.rb
352
+ - features/step_definitions/generator_steps.rb
353
+ - features/step_definitions/path_steps.rb
354
+ - features/step_definitions/pickle_steps.rb
355
+ - features/step_definitions/raise_error_steps.rb
356
+ - features/support/email.rb
357
+ - features/support/env.rb
358
+ - features/support/paths.rb
359
+ - features/support/pickle.rb
360
+ - features/support/pickle_app.rb
361
+ - spec/pickle/adapter_spec.rb
362
+ - spec/pickle/config_spec.rb
363
+ - spec/pickle/email/parser_spec.rb
364
+ - spec/pickle/email_spec.rb
365
+ - spec/pickle/parser/matchers_spec.rb
366
+ - spec/pickle/parser_spec.rb
367
+ - spec/pickle/path_spec.rb
368
+ - spec/pickle/session_spec.rb
369
+ - spec/pickle_spec.rb
370
+ - spec/spec_helper.rb