seam-active_record 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +45 -0
  6. data/Rakefile +1 -0
  7. data/lib/seam/active_record/version.rb +5 -0
  8. data/lib/seam/active_record.rb +75 -0
  9. data/lib/seam_effort.rb +3 -0
  10. data/migration_script.rb +13 -0
  11. data/seam-mongodb.gemspec +32 -0
  12. data/test_app/.gitignore +16 -0
  13. data/test_app/Gemfile +45 -0
  14. data/test_app/README.rdoc +28 -0
  15. data/test_app/Rakefile +6 -0
  16. data/test_app/app/assets/images/.keep +0 -0
  17. data/test_app/app/assets/javascripts/application.js +16 -0
  18. data/test_app/app/assets/stylesheets/application.css +15 -0
  19. data/test_app/app/controllers/application_controller.rb +5 -0
  20. data/test_app/app/controllers/concerns/.keep +0 -0
  21. data/test_app/app/helpers/application_helper.rb +2 -0
  22. data/test_app/app/mailers/.keep +0 -0
  23. data/test_app/app/models/.keep +0 -0
  24. data/test_app/app/models/concerns/.keep +0 -0
  25. data/test_app/app/views/layouts/application.html.erb +14 -0
  26. data/test_app/bin/bundle +3 -0
  27. data/test_app/bin/rails +8 -0
  28. data/test_app/bin/rake +8 -0
  29. data/test_app/bin/spring +18 -0
  30. data/test_app/config/application.rb +23 -0
  31. data/test_app/config/boot.rb +4 -0
  32. data/test_app/config/database.yml +25 -0
  33. data/test_app/config/environment.rb +5 -0
  34. data/test_app/config/environments/development.rb +37 -0
  35. data/test_app/config/environments/production.rb +82 -0
  36. data/test_app/config/environments/test.rb +39 -0
  37. data/test_app/config/initializers/assets.rb +8 -0
  38. data/test_app/config/initializers/backtrace_silencers.rb +7 -0
  39. data/test_app/config/initializers/cookies_serializer.rb +3 -0
  40. data/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  41. data/test_app/config/initializers/inflections.rb +16 -0
  42. data/test_app/config/initializers/mime_types.rb +4 -0
  43. data/test_app/config/initializers/session_store.rb +3 -0
  44. data/test_app/config/initializers/wrap_parameters.rb +14 -0
  45. data/test_app/config/locales/en.yml +23 -0
  46. data/test_app/config/routes.rb +56 -0
  47. data/test_app/config/secrets.yml +22 -0
  48. data/test_app/config.ru +4 -0
  49. data/test_app/db/migrate/20140904165307_create_seam_efforts.rb +13 -0
  50. data/test_app/db/schema.rb +26 -0
  51. data/test_app/db/seeds.rb +7 -0
  52. data/test_app/lib/assets/.keep +0 -0
  53. data/test_app/lib/tasks/.keep +0 -0
  54. data/test_app/log/.keep +0 -0
  55. data/test_app/public/404.html +67 -0
  56. data/test_app/public/422.html +67 -0
  57. data/test_app/public/500.html +66 -0
  58. data/test_app/public/favicon.ico +0 -0
  59. data/test_app/public/robots.txt +5 -0
  60. data/test_app/spec/seam/effort_spec.rb +43 -0
  61. data/test_app/spec/seam/flow_spec.rb +173 -0
  62. data/test_app/spec/seam/persistence_spec.rb +0 -0
  63. data/test_app/spec/seam/step_spec.rb +34 -0
  64. data/test_app/spec/seam/wait_worker_spec.rb +179 -0
  65. data/test_app/spec/seam/worker_spec.rb +910 -0
  66. data/test_app/spec/seam_spec.rb +47 -0
  67. data/test_app/spec/spec_helper.rb +13 -0
  68. data/test_app/vendor/assets/javascripts/.keep +0 -0
  69. data/test_app/vendor/assets/stylesheets/.keep +0 -0
  70. metadata +252 -0
@@ -0,0 +1,47 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe Seam do
4
+
5
+ before do
6
+ Seam::Persistence.destroy
7
+ end
8
+
9
+ describe "steps to run" do
10
+
11
+ it "should return an empty array if nothing has happened" do
12
+ Seam.steps_to_run.count.must_equal 0
13
+ end
14
+
15
+ it "should return step x if step x is next" do
16
+ flow = Seam::Flow.new
17
+ flow.x
18
+ flow.y
19
+ flow.start
20
+
21
+ Seam.steps_to_run.include?('x').must_equal true
22
+ end
23
+
24
+ it "should return step y if step y is next" do
25
+ flow = Seam::Flow.new
26
+ flow.y
27
+ flow.x
28
+ flow.start
29
+
30
+ Seam.steps_to_run.include?('y').must_equal true
31
+ end
32
+
33
+ it "should return step x or y if step x and y are next" do
34
+ flow = Seam::Flow.new
35
+ flow.y
36
+ flow.start
37
+
38
+ flow = Seam::Flow.new
39
+ flow.x
40
+ flow.start
41
+
42
+ (['x', 'y'].select { |x| Seam.steps_to_run.include?(x) }.count > 0).must_equal true
43
+ end
44
+
45
+ end
46
+
47
+ end
@@ -0,0 +1,13 @@
1
+ ENV['RAILS_ENV'] = 'test'
2
+ ENV['RACK_ENV'] = 'test'
3
+ require File.expand_path(File.dirname(__FILE__) + '/../config/environment')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../../lib/seam/active_record')
5
+ require 'minitest/autorun'
6
+ require 'minitest/spec'
7
+ require 'minitest/pride'
8
+ require 'subtle'
9
+ require 'timecop'
10
+ require 'contrast'
11
+ require 'mocha/setup'
12
+
13
+ Seam::ActiveRecord.setup
File without changes
File without changes
metadata ADDED
@@ -0,0 +1,252 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: seam-active_record
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Darren Cauthon
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '3.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '3.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: i18n
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: seam
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: subtle
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '1.3'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '1.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: mocha
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: contrast
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: timecop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: Active Record support for seam
154
+ email:
155
+ - darren@cauthon.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - .gitignore
161
+ - Gemfile
162
+ - LICENSE.txt
163
+ - README.md
164
+ - Rakefile
165
+ - lib/seam/active_record.rb
166
+ - lib/seam/active_record/version.rb
167
+ - lib/seam_effort.rb
168
+ - migration_script.rb
169
+ - seam-mongodb.gemspec
170
+ - test_app/.gitignore
171
+ - test_app/Gemfile
172
+ - test_app/README.rdoc
173
+ - test_app/Rakefile
174
+ - test_app/app/assets/images/.keep
175
+ - test_app/app/assets/javascripts/application.js
176
+ - test_app/app/assets/stylesheets/application.css
177
+ - test_app/app/controllers/application_controller.rb
178
+ - test_app/app/controllers/concerns/.keep
179
+ - test_app/app/helpers/application_helper.rb
180
+ - test_app/app/mailers/.keep
181
+ - test_app/app/models/.keep
182
+ - test_app/app/models/concerns/.keep
183
+ - test_app/app/views/layouts/application.html.erb
184
+ - test_app/bin/bundle
185
+ - test_app/bin/rails
186
+ - test_app/bin/rake
187
+ - test_app/bin/spring
188
+ - test_app/config.ru
189
+ - test_app/config/application.rb
190
+ - test_app/config/boot.rb
191
+ - test_app/config/database.yml
192
+ - test_app/config/environment.rb
193
+ - test_app/config/environments/development.rb
194
+ - test_app/config/environments/production.rb
195
+ - test_app/config/environments/test.rb
196
+ - test_app/config/initializers/assets.rb
197
+ - test_app/config/initializers/backtrace_silencers.rb
198
+ - test_app/config/initializers/cookies_serializer.rb
199
+ - test_app/config/initializers/filter_parameter_logging.rb
200
+ - test_app/config/initializers/inflections.rb
201
+ - test_app/config/initializers/mime_types.rb
202
+ - test_app/config/initializers/session_store.rb
203
+ - test_app/config/initializers/wrap_parameters.rb
204
+ - test_app/config/locales/en.yml
205
+ - test_app/config/routes.rb
206
+ - test_app/config/secrets.yml
207
+ - test_app/db/migrate/20140904165307_create_seam_efforts.rb
208
+ - test_app/db/schema.rb
209
+ - test_app/db/seeds.rb
210
+ - test_app/lib/assets/.keep
211
+ - test_app/lib/tasks/.keep
212
+ - test_app/log/.keep
213
+ - test_app/public/404.html
214
+ - test_app/public/422.html
215
+ - test_app/public/500.html
216
+ - test_app/public/favicon.ico
217
+ - test_app/public/robots.txt
218
+ - test_app/spec/seam/effort_spec.rb
219
+ - test_app/spec/seam/flow_spec.rb
220
+ - test_app/spec/seam/persistence_spec.rb
221
+ - test_app/spec/seam/step_spec.rb
222
+ - test_app/spec/seam/wait_worker_spec.rb
223
+ - test_app/spec/seam/worker_spec.rb
224
+ - test_app/spec/seam_spec.rb
225
+ - test_app/spec/spec_helper.rb
226
+ - test_app/vendor/assets/javascripts/.keep
227
+ - test_app/vendor/assets/stylesheets/.keep
228
+ homepage: ''
229
+ licenses:
230
+ - MIT
231
+ metadata: {}
232
+ post_install_message:
233
+ rdoc_options: []
234
+ require_paths:
235
+ - lib
236
+ required_ruby_version: !ruby/object:Gem::Requirement
237
+ requirements:
238
+ - - '>='
239
+ - !ruby/object:Gem::Version
240
+ version: '0'
241
+ required_rubygems_version: !ruby/object:Gem::Requirement
242
+ requirements:
243
+ - - '>='
244
+ - !ruby/object:Gem::Version
245
+ version: '0'
246
+ requirements: []
247
+ rubyforge_project:
248
+ rubygems_version: 2.2.2
249
+ signing_key:
250
+ specification_version: 4
251
+ summary: Active Record support for seam
252
+ test_files: []