sprig 0.1.6 → 0.3.1

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.
Files changed (64) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +61 -10
  3. data/lib/generators/sprig/install_generator.rb +5 -1
  4. data/lib/sprig.rb +21 -0
  5. data/lib/sprig/configuration.rb +19 -2
  6. data/lib/sprig/directive.rb +3 -3
  7. data/lib/sprig/helpers.rb +15 -3
  8. data/lib/sprig/planter.rb +1 -1
  9. data/lib/sprig/process_notifier.rb +4 -4
  10. data/lib/sprig/seed/attribute.rb +27 -3
  11. data/lib/sprig/seed/entry.rb +8 -4
  12. data/lib/sprig/seed/factory.rb +1 -1
  13. data/lib/sprig/source.rb +10 -1
  14. data/lib/sprig/version.rb +8 -1
  15. data/spec/adapters/active_record.rb +34 -0
  16. data/spec/adapters/mongoid.rb +19 -0
  17. data/spec/adapters/mongoid.yml +12 -0
  18. data/spec/feature/configurations_spec.rb +5 -5
  19. data/spec/fixtures/models/{comment.rb → active_record/comment.rb} +0 -0
  20. data/spec/fixtures/models/{post.rb → active_record/post.rb} +0 -0
  21. data/spec/fixtures/models/{tag.rb → active_record/tag.rb} +0 -0
  22. data/spec/fixtures/models/{user.rb → active_record/user.rb} +0 -0
  23. data/spec/fixtures/models/mongoid/comment.rb +9 -0
  24. data/spec/fixtures/models/mongoid/post.rb +18 -0
  25. data/spec/fixtures/models/mongoid/tag.rb +7 -0
  26. data/spec/fixtures/models/mongoid/user.rb +9 -0
  27. data/spec/fixtures/seeds/shared/comments.yml +4 -0
  28. data/spec/fixtures/seeds/shared/files/cat.png +0 -0
  29. data/spec/fixtures/seeds/shared/invalid_users.yml +4 -0
  30. data/spec/fixtures/seeds/shared/legacy_posts.yml +4 -0
  31. data/spec/fixtures/seeds/shared/posts.csv +2 -0
  32. data/spec/fixtures/seeds/shared/posts.json +1 -0
  33. data/spec/fixtures/seeds/shared/posts.md +5 -0
  34. data/spec/fixtures/seeds/shared/posts.yml +4 -0
  35. data/spec/fixtures/seeds/shared/posts_delete_existing_by.yml +7 -0
  36. data/spec/fixtures/seeds/shared/posts_find_existing_by_missing.yml +7 -0
  37. data/spec/fixtures/seeds/shared/posts_find_existing_by_multiple.yml +8 -0
  38. data/spec/fixtures/seeds/shared/posts_find_existing_by_single.yml +7 -0
  39. data/spec/fixtures/seeds/shared/posts_missing_dependency.yml +5 -0
  40. data/spec/fixtures/seeds/shared/posts_missing_record.yml +5 -0
  41. data/spec/fixtures/seeds/shared/posts_partially_dynamic_value.yml +4 -0
  42. data/spec/fixtures/seeds/shared/posts_with_cyclic_dependencies.yml +4 -0
  43. data/spec/fixtures/seeds/shared/posts_with_files.yml +5 -0
  44. data/spec/fixtures/seeds/shared/posts_with_habtm.yml +7 -0
  45. data/spec/fixtures/seeds/shared/tags.yml +5 -0
  46. data/spec/fixtures/seeds/test/posts_partially_dynamic_value.yml +4 -0
  47. data/spec/lib/generators/sprig/install_generator_spec.rb +6 -2
  48. data/spec/lib/sprig/configuration_spec.rb +6 -6
  49. data/spec/lib/sprig/directive_list_spec.rb +4 -4
  50. data/spec/lib/sprig/directive_spec.rb +21 -11
  51. data/spec/lib/sprig/null_record_spec.rb +2 -2
  52. data/spec/lib/sprig/parser/base_spec.rb +1 -1
  53. data/spec/lib/sprig/process_notifier_spec.rb +5 -3
  54. data/spec/lib/sprig/seed/entry_spec.rb +3 -3
  55. data/spec/lib/sprig/seed/record_spec.rb +3 -3
  56. data/spec/lib/sprig/source_spec.rb +2 -2
  57. data/spec/lib/sprig_spec.rb +59 -8
  58. data/spec/spec_helper.rb +35 -31
  59. data/spec/sprig_shared_spec.rb +467 -0
  60. data/spec/sprig_spec.rb +105 -34
  61. data/spec/support/helpers/logger_mock.rb +2 -1
  62. metadata +167 -87
  63. data/lib/sprig/data.rb +0 -6
  64. data/spec/db/activerecord.db +0 -0
data/spec/sprig_spec.rb CHANGED
@@ -1,7 +1,15 @@
1
1
  require 'spec_helper'
2
2
  require 'open-uri'
3
3
 
4
- describe "Seeding an application" do
4
+ RSpec.describe "Seeding an application" do
5
+ let(:missing_record_error) do
6
+ if defined?(ActiveRecord) && Post < ActiveRecord::Base
7
+ ActiveRecord::RecordNotFound
8
+ elsif defined?(Mongoid) && Post < Mongoid::Document
9
+ Mongoid::Errors::DocumentNotFound
10
+ end
11
+ end
12
+
5
13
  before do
6
14
  stub_rails_root
7
15
  end
@@ -14,8 +22,8 @@ describe "Seeding an application" do
14
22
  it "seeds the db" do
15
23
  sprig [Post]
16
24
 
17
- Post.count.should == 1
18
- Post.pluck(:title).should =~ ['Yaml title']
25
+ expect(Post.count).to eq(1)
26
+ expect(Post.pluck(:title)).to eq(['Yaml title'])
19
27
  end
20
28
  end
21
29
 
@@ -27,8 +35,8 @@ describe "Seeding an application" do
27
35
  it "seeds the db" do
28
36
  sprig [Post]
29
37
 
30
- Post.count.should == 1
31
- Post.pluck(:title).should =~ ['Csv title']
38
+ expect(Post.count).to eq(1)
39
+ expect(Post.pluck(:title)).to eq(['Csv title'])
32
40
  end
33
41
  end
34
42
 
@@ -40,8 +48,43 @@ describe "Seeding an application" do
40
48
  it "seeds the db" do
41
49
  sprig [Post]
42
50
 
43
- Post.count.should == 1
44
- Post.pluck(:title).should =~ ['Json title']
51
+ expect(Post.count).to eq(1)
52
+ expect(Post.pluck(:title)).to eq(['Json title'])
53
+ end
54
+ end
55
+
56
+ context "with a partially-dynamic value" do
57
+ around do |example|
58
+ load_seeds('posts_partially_dynamic_value.yml', &example)
59
+ end
60
+
61
+ it "seeds the db with the full value" do
62
+ sprig [
63
+ {
64
+ :class => Post,
65
+ :source => open('spec/fixtures/seeds/test/posts_partially_dynamic_value.yml')
66
+ }
67
+ ]
68
+
69
+ expect(Post.count).to eq(1)
70
+ expect(Post.pluck(:title)).to eq(['Partially Dynamic Title'])
71
+ end
72
+ end
73
+
74
+ context "with a symlinked file" do
75
+ let(:env) { Rails.env }
76
+
77
+ around do |example|
78
+ `ln -s ./spec/fixtures/seeds/#{env}/posts.yml ./spec/fixtures/db/seeds/#{env}`
79
+ example.call
80
+ `rm ./spec/fixtures/db/seeds/#{env}/posts.yml`
81
+ end
82
+
83
+ it "seeds the db" do
84
+ sprig [Post]
85
+
86
+ expect(Post.count).to eq(1)
87
+ expect(Post.pluck(:title)).to eq(['Yaml title'])
45
88
  end
46
89
  end
47
90
 
@@ -55,8 +98,8 @@ describe "Seeding an application" do
55
98
  }
56
99
  ]
57
100
 
58
- Post.count.should == 1
59
- Post.pluck(:title).should =~ ['Google spreadsheet json title']
101
+ expect(Post.count).to eq(1)
102
+ expect(Post.pluck(:title)).to eq(['Google spreadsheet json title'])
60
103
  end
61
104
  end
62
105
 
@@ -91,8 +134,8 @@ describe "Seeding an application" do
91
134
  }
92
135
  ]
93
136
 
94
- Post.count.should == 1
95
- Post.pluck(:title).should =~ ['Legacy yaml title']
137
+ expect(Post.count).to eq(1)
138
+ expect(Post.pluck(:title)).to eq(['Legacy yaml title'])
96
139
  end
97
140
  end
98
141
 
@@ -129,9 +172,9 @@ describe "Seeding an application" do
129
172
  it "seeds the db" do
130
173
  sprig [Post, Comment]
131
174
 
132
- Post.count.should == 1
133
- Comment.count.should == 1
134
- Comment.first.post.should == Post.first
175
+ expect(Post.count).to eq(1)
176
+ expect(Comment.count).to eq(1)
177
+ expect(Comment.first.post).to eq(Post.first)
135
178
  end
136
179
  end
137
180
 
@@ -198,22 +241,22 @@ describe "Seeding an application" do
198
241
  }
199
242
  ]
200
243
 
201
- Post.count.should == 2
202
- Post.pluck(:title).should=~ ['Yaml title', 'Legacy yaml title']
244
+ expect(Post.count).to eq(2)
245
+ expect(Post.pluck(:title)).to eq(['Yaml title', 'Legacy yaml title'])
203
246
  end
204
247
  end
205
248
 
206
249
  context "from a specific environment" do
207
- around do |example|
208
- stub_rails_env 'staging'
209
- load_seeds('posts.yml', &example)
210
- end
211
-
212
250
  it "seeds the db" do
213
- sprig [Post]
251
+ ex = Proc.new do
252
+ sprig [Post]
214
253
 
215
- Post.count.should == 1
216
- Post.pluck(:title).should =~ ['Staging yaml title']
254
+ expect(Post.count).to eq(1)
255
+ expect(Post.pluck(:title)).to eq(['Staging yaml title'])
256
+ end
257
+
258
+ stub_rails_env 'staging'
259
+ load_seeds('posts.yml', &ex)
217
260
  end
218
261
  end
219
262
 
@@ -230,8 +273,8 @@ describe "Seeding an application" do
230
273
  }
231
274
  ]
232
275
 
233
- Post.count.should == 1
234
- Post.pluck(:photo).should =~ ['cat.png']
276
+ expect(Post.count).to eq(1)
277
+ expect(Post.pluck(:photo)).to eq(['cat.png'])
235
278
  end
236
279
  end
237
280
 
@@ -249,7 +292,7 @@ describe "Seeding an application" do
249
292
  }
250
293
  ]
251
294
 
252
- Post.first.tags.map(&:name).should == ['Botany', 'Biology']
295
+ expect(Post.first.tags.map(&:name)).to eq(['Botany', 'Biology'])
253
296
  end
254
297
  end
255
298
 
@@ -272,7 +315,7 @@ describe "Seeding an application" do
272
315
  end
273
316
 
274
317
  context "with a malformed directive" do
275
- let(:expected_error_message) { 'Sprig::Directive must be instantiated with an ActiveRecord subclass or a Hash with :class defined' }
318
+ let(:expected_error_message) { "Sprig::Directive must be instantiated with a(n) #{Sprig.adapter_model_class} class or a Hash with :class defined" }
276
319
 
277
320
  context "including a class that is not a subclass of AR" do
278
321
  it "raises an argument error" do
@@ -323,11 +366,11 @@ describe "Seeding an application" do
323
366
  }
324
367
  ]
325
368
 
326
- Post.count.should == 2
369
+ expect(Post.count).to eq(2)
327
370
 
328
371
  expect {
329
372
  existing_match.reload
330
- }.to raise_error(ActiveRecord::RecordNotFound)
373
+ }.to raise_error(missing_record_error)
331
374
 
332
375
  expect {
333
376
  existing_nonmatch.reload
@@ -374,8 +417,8 @@ describe "Seeding an application" do
374
417
  }
375
418
  ]
376
419
 
377
- Post.count.should == 1
378
- existing.reload.content.should == "Updated content"
420
+ expect(Post.count).to eq(1)
421
+ expect(existing.reload.content).to eq("Updated content")
379
422
  end
380
423
  end
381
424
  end
@@ -402,11 +445,39 @@ describe "Seeding an application" do
402
445
  }
403
446
  ]
404
447
 
405
- Post.count.should == 1
406
- existing.reload.published.should == true
448
+ expect(Post.count).to eq(1)
449
+ expect(existing.reload.published).to eq(true)
407
450
  end
408
451
  end
409
452
  end
410
453
  end
454
+
455
+ context "defined within the directive" do
456
+ let!(:existing) do
457
+ Post.create(
458
+ :title => "Yaml title",
459
+ :content => "Existing content")
460
+ end
461
+
462
+ around do |example|
463
+ load_seeds('posts.yml', &example)
464
+ end
465
+
466
+ it "respects the directive option" do
467
+ sprig [
468
+ {
469
+ :class => Post,
470
+ :source => open("spec/fixtures/seeds/test/posts.yml"),
471
+ :delete_existing_by => :title
472
+ }
473
+ ]
474
+
475
+ expect(Post.count).to eq(1)
476
+
477
+ expect {
478
+ existing.reload
479
+ }.to raise_error(missing_record_error)
480
+ end
481
+ end
411
482
  end
412
483
  end
@@ -1,6 +1,7 @@
1
1
  module LoggerMock
2
+
2
3
  def log_should_receive(level, options)
3
- Sprig.logger.should_receive(level).with(send("log_#{level}_text", options.fetch(:with)))
4
+ expect(Sprig.logger).to receive(level).with(send("log_#{level}_text", options.fetch(:with)))
4
5
  end
5
6
 
6
7
  def log_debug_text(text)
metadata CHANGED
@@ -1,154 +1,182 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lawson Kurtz
8
8
  - Ryan Foster
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-27 00:00:00.000000000 Z
12
+ date: 2021-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rails
15
+ name: appraisal
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '3.1'
20
+ version: '0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '3.1'
27
+ version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
- name: sqlite3
29
+ name: rails
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 1.3.8
34
+ version: 4.2.4
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 1.3.8
41
+ version: 4.2.4
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: 2.14.0
48
+ version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 2.14.0
55
+ version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: database_cleaner
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 1.2.0
62
+ version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 1.2.0
69
+ version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: webmock
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.15.0
76
+ version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 1.15.0
83
+ version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: vcr
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ~>
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: 2.8.0
90
+ version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ~>
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
- version: 2.8.0
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: test-unit
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
98
112
  - !ruby/object:Gem::Dependency
99
113
  name: pry
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
- - - '>='
116
+ - - ">="
103
117
  - !ruby/object:Gem::Version
104
118
  version: '0'
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
- - - '>='
123
+ - - ">="
110
124
  - !ruby/object:Gem::Version
111
125
  version: '0'
112
126
  - !ruby/object:Gem::Dependency
113
127
  name: generator_spec
114
128
  requirement: !ruby/object:Gem::Requirement
115
129
  requirements:
116
- - - '>='
130
+ - - ">="
117
131
  - !ruby/object:Gem::Version
118
132
  version: '0'
119
133
  type: :development
120
134
  prerelease: false
121
135
  version_requirements: !ruby/object:Gem::Requirement
122
136
  requirements:
123
- - - '>='
137
+ - - ">="
124
138
  - !ruby/object:Gem::Version
125
139
  version: '0'
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: simplecov
128
142
  requirement: !ruby/object:Gem::Requirement
129
143
  requirements:
130
- - - '>='
144
+ - - ">="
131
145
  - !ruby/object:Gem::Version
132
146
  version: '0'
133
147
  type: :development
134
148
  prerelease: false
135
149
  version_requirements: !ruby/object:Gem::Requirement
136
150
  requirements:
137
- - - '>='
151
+ - - ">="
138
152
  - !ruby/object:Gem::Version
139
153
  version: '0'
140
154
  - !ruby/object:Gem::Dependency
141
155
  name: coveralls
142
156
  requirement: !ruby/object:Gem::Requirement
143
157
  requirements:
144
- - - '>='
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: sqlite3
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
145
173
  - !ruby/object:Gem::Version
146
174
  version: '0'
147
175
  type: :development
148
176
  prerelease: false
149
177
  version_requirements: !ruby/object:Gem::Requirement
150
178
  requirements:
151
- - - '>='
179
+ - - ">="
152
180
  - !ruby/object:Gem::Version
153
181
  version: '0'
154
182
  description: Sprig is a library for managing interconnected, environment-specific
@@ -166,7 +194,6 @@ files:
166
194
  - lib/generators/sprig/install_generator.rb
167
195
  - lib/sprig.rb
168
196
  - lib/sprig/configuration.rb
169
- - lib/sprig/data.rb
170
197
  - lib/sprig/dependency.rb
171
198
  - lib/sprig/dependency_collection.rb
172
199
  - lib/sprig/dependency_sorter.rb
@@ -193,16 +220,41 @@ files:
193
220
  - lib/sprig/sprig_record_store.rb
194
221
  - lib/sprig/tsortable_hash.rb
195
222
  - lib/sprig/version.rb
196
- - spec/db/activerecord.db
223
+ - spec/adapters/active_record.rb
224
+ - spec/adapters/mongoid.rb
225
+ - spec/adapters/mongoid.yml
197
226
  - spec/feature/configurations_spec.rb
198
227
  - spec/fixtures/cassettes/google_spreadsheet_json_posts.yml
199
228
  - spec/fixtures/config/environments/development.rb
200
229
  - spec/fixtures/config/environments/production.rb
201
230
  - spec/fixtures/config/environments/test.rb
202
- - spec/fixtures/models/comment.rb
203
- - spec/fixtures/models/post.rb
204
- - spec/fixtures/models/tag.rb
205
- - spec/fixtures/models/user.rb
231
+ - spec/fixtures/models/active_record/comment.rb
232
+ - spec/fixtures/models/active_record/post.rb
233
+ - spec/fixtures/models/active_record/tag.rb
234
+ - spec/fixtures/models/active_record/user.rb
235
+ - spec/fixtures/models/mongoid/comment.rb
236
+ - spec/fixtures/models/mongoid/post.rb
237
+ - spec/fixtures/models/mongoid/tag.rb
238
+ - spec/fixtures/models/mongoid/user.rb
239
+ - spec/fixtures/seeds/shared/comments.yml
240
+ - spec/fixtures/seeds/shared/files/cat.png
241
+ - spec/fixtures/seeds/shared/invalid_users.yml
242
+ - spec/fixtures/seeds/shared/legacy_posts.yml
243
+ - spec/fixtures/seeds/shared/posts.csv
244
+ - spec/fixtures/seeds/shared/posts.json
245
+ - spec/fixtures/seeds/shared/posts.md
246
+ - spec/fixtures/seeds/shared/posts.yml
247
+ - spec/fixtures/seeds/shared/posts_delete_existing_by.yml
248
+ - spec/fixtures/seeds/shared/posts_find_existing_by_missing.yml
249
+ - spec/fixtures/seeds/shared/posts_find_existing_by_multiple.yml
250
+ - spec/fixtures/seeds/shared/posts_find_existing_by_single.yml
251
+ - spec/fixtures/seeds/shared/posts_missing_dependency.yml
252
+ - spec/fixtures/seeds/shared/posts_missing_record.yml
253
+ - spec/fixtures/seeds/shared/posts_partially_dynamic_value.yml
254
+ - spec/fixtures/seeds/shared/posts_with_cyclic_dependencies.yml
255
+ - spec/fixtures/seeds/shared/posts_with_files.yml
256
+ - spec/fixtures/seeds/shared/posts_with_habtm.yml
257
+ - spec/fixtures/seeds/shared/tags.yml
206
258
  - spec/fixtures/seeds/staging/posts.yml
207
259
  - spec/fixtures/seeds/test/comments.yml
208
260
  - spec/fixtures/seeds/test/files/cat.png
@@ -218,6 +270,7 @@ files:
218
270
  - spec/fixtures/seeds/test/posts_find_existing_by_single.yml
219
271
  - spec/fixtures/seeds/test/posts_missing_dependency.yml
220
272
  - spec/fixtures/seeds/test/posts_missing_record.yml
273
+ - spec/fixtures/seeds/test/posts_partially_dynamic_value.yml
221
274
  - spec/fixtures/seeds/test/posts_with_cyclic_dependencies.yml
222
275
  - spec/fixtures/seeds/test/posts_with_files.yml
223
276
  - spec/fixtures/seeds/test/posts_with_habtm.yml
@@ -234,6 +287,7 @@ files:
234
287
  - spec/lib/sprig/source_spec.rb
235
288
  - spec/lib/sprig_spec.rb
236
289
  - spec/spec_helper.rb
290
+ - spec/sprig_shared_spec.rb
237
291
  - spec/sprig_spec.rb
238
292
  - spec/support/helpers/colored_text.rb
239
293
  - spec/support/helpers/logger_mock.rb
@@ -242,70 +296,96 @@ homepage: http://www.github.com/vigetlabs/sprig
242
296
  licenses:
243
297
  - MIT
244
298
  metadata: {}
245
- post_install_message:
299
+ post_install_message:
246
300
  rdoc_options: []
247
301
  require_paths:
248
302
  - lib
249
303
  required_ruby_version: !ruby/object:Gem::Requirement
250
304
  requirements:
251
- - - '>='
305
+ - - ">="
252
306
  - !ruby/object:Gem::Version
253
307
  version: '0'
254
308
  required_rubygems_version: !ruby/object:Gem::Requirement
255
309
  requirements:
256
- - - '>='
310
+ - - ">="
257
311
  - !ruby/object:Gem::Version
258
312
  version: '0'
259
313
  requirements: []
260
- rubyforge_project:
261
- rubygems_version: 2.2.1
262
- signing_key:
314
+ rubyforge_project:
315
+ rubygems_version: 2.7.6
316
+ signing_key:
263
317
  specification_version: 4
264
318
  summary: Relational, environment-specific seeding for Rails apps.
265
319
  test_files:
266
- - spec/db/activerecord.db
267
- - spec/feature/configurations_spec.rb
268
- - spec/fixtures/cassettes/google_spreadsheet_json_posts.yml
269
- - spec/fixtures/config/environments/development.rb
320
+ - spec/spec_helper.rb
321
+ - spec/sprig_shared_spec.rb
322
+ - spec/sprig_spec.rb
323
+ - spec/adapters/mongoid.yml
324
+ - spec/adapters/mongoid.rb
325
+ - spec/adapters/active_record.rb
326
+ - spec/support/helpers/colored_text.rb
327
+ - spec/support/helpers/logger_mock.rb
328
+ - spec/support/shared_examples/a_logging_entity.rb
329
+ - spec/lib/sprig_spec.rb
330
+ - spec/lib/sprig/process_notifier_spec.rb
331
+ - spec/lib/sprig/seed/entry_spec.rb
332
+ - spec/lib/sprig/seed/record_spec.rb
333
+ - spec/lib/sprig/directive_list_spec.rb
334
+ - spec/lib/sprig/configuration_spec.rb
335
+ - spec/lib/sprig/parser/base_spec.rb
336
+ - spec/lib/sprig/directive_spec.rb
337
+ - spec/lib/sprig/source_spec.rb
338
+ - spec/lib/sprig/null_record_spec.rb
339
+ - spec/lib/generators/sprig/install_generator_spec.rb
270
340
  - spec/fixtures/config/environments/production.rb
341
+ - spec/fixtures/config/environments/development.rb
271
342
  - spec/fixtures/config/environments/test.rb
272
- - spec/fixtures/models/comment.rb
273
- - spec/fixtures/models/post.rb
274
- - spec/fixtures/models/tag.rb
275
- - spec/fixtures/models/user.rb
343
+ - spec/fixtures/cassettes/google_spreadsheet_json_posts.yml
344
+ - spec/fixtures/models/mongoid/tag.rb
345
+ - spec/fixtures/models/mongoid/comment.rb
346
+ - spec/fixtures/models/mongoid/post.rb
347
+ - spec/fixtures/models/mongoid/user.rb
348
+ - spec/fixtures/models/active_record/tag.rb
349
+ - spec/fixtures/models/active_record/comment.rb
350
+ - spec/fixtures/models/active_record/post.rb
351
+ - spec/fixtures/models/active_record/user.rb
276
352
  - spec/fixtures/seeds/staging/posts.yml
277
- - spec/fixtures/seeds/test/comments.yml
278
- - spec/fixtures/seeds/test/files/cat.png
279
- - spec/fixtures/seeds/test/invalid_users.yml
280
- - spec/fixtures/seeds/test/legacy_posts.yml
353
+ - spec/fixtures/seeds/test/posts_delete_existing_by.yml
354
+ - spec/fixtures/seeds/test/posts_missing_record.yml
355
+ - spec/fixtures/seeds/test/posts.yml
281
356
  - spec/fixtures/seeds/test/posts.csv
357
+ - spec/fixtures/seeds/test/invalid_users.yml
358
+ - spec/fixtures/seeds/test/posts_find_existing_by_single.yml
359
+ - spec/fixtures/seeds/test/tags.yml
360
+ - spec/fixtures/seeds/test/posts_with_cyclic_dependencies.yml
361
+ - spec/fixtures/seeds/test/posts_with_habtm.yml
362
+ - spec/fixtures/seeds/test/comments.yml
363
+ - spec/fixtures/seeds/test/posts_partially_dynamic_value.yml
364
+ - spec/fixtures/seeds/test/posts_find_existing_by_missing.yml
282
365
  - spec/fixtures/seeds/test/posts.json
366
+ - spec/fixtures/seeds/test/files/cat.png
283
367
  - spec/fixtures/seeds/test/posts.md
284
- - spec/fixtures/seeds/test/posts.yml
285
- - spec/fixtures/seeds/test/posts_delete_existing_by.yml
286
- - spec/fixtures/seeds/test/posts_find_existing_by_missing.yml
287
- - spec/fixtures/seeds/test/posts_find_existing_by_multiple.yml
288
- - spec/fixtures/seeds/test/posts_find_existing_by_single.yml
289
368
  - spec/fixtures/seeds/test/posts_missing_dependency.yml
290
- - spec/fixtures/seeds/test/posts_missing_record.yml
291
- - spec/fixtures/seeds/test/posts_with_cyclic_dependencies.yml
369
+ - spec/fixtures/seeds/test/posts_find_existing_by_multiple.yml
292
370
  - spec/fixtures/seeds/test/posts_with_files.yml
293
- - spec/fixtures/seeds/test/posts_with_habtm.yml
294
- - spec/fixtures/seeds/test/tags.yml
295
- - spec/lib/generators/sprig/install_generator_spec.rb
296
- - spec/lib/sprig/configuration_spec.rb
297
- - spec/lib/sprig/directive_list_spec.rb
298
- - spec/lib/sprig/directive_spec.rb
299
- - spec/lib/sprig/null_record_spec.rb
300
- - spec/lib/sprig/parser/base_spec.rb
301
- - spec/lib/sprig/process_notifier_spec.rb
302
- - spec/lib/sprig/seed/entry_spec.rb
303
- - spec/lib/sprig/seed/record_spec.rb
304
- - spec/lib/sprig/source_spec.rb
305
- - spec/lib/sprig_spec.rb
306
- - spec/spec_helper.rb
307
- - spec/sprig_spec.rb
308
- - spec/support/helpers/colored_text.rb
309
- - spec/support/helpers/logger_mock.rb
310
- - spec/support/shared_examples/a_logging_entity.rb
311
- has_rdoc:
371
+ - spec/fixtures/seeds/test/legacy_posts.yml
372
+ - spec/fixtures/seeds/shared/posts_delete_existing_by.yml
373
+ - spec/fixtures/seeds/shared/posts_missing_record.yml
374
+ - spec/fixtures/seeds/shared/posts.yml
375
+ - spec/fixtures/seeds/shared/posts.csv
376
+ - spec/fixtures/seeds/shared/invalid_users.yml
377
+ - spec/fixtures/seeds/shared/posts_find_existing_by_single.yml
378
+ - spec/fixtures/seeds/shared/tags.yml
379
+ - spec/fixtures/seeds/shared/posts_with_cyclic_dependencies.yml
380
+ - spec/fixtures/seeds/shared/posts_with_habtm.yml
381
+ - spec/fixtures/seeds/shared/comments.yml
382
+ - spec/fixtures/seeds/shared/posts_partially_dynamic_value.yml
383
+ - spec/fixtures/seeds/shared/posts_find_existing_by_missing.yml
384
+ - spec/fixtures/seeds/shared/posts.json
385
+ - spec/fixtures/seeds/shared/files/cat.png
386
+ - spec/fixtures/seeds/shared/posts.md
387
+ - spec/fixtures/seeds/shared/posts_missing_dependency.yml
388
+ - spec/fixtures/seeds/shared/posts_find_existing_by_multiple.yml
389
+ - spec/fixtures/seeds/shared/posts_with_files.yml
390
+ - spec/fixtures/seeds/shared/legacy_posts.yml
391
+ - spec/feature/configurations_spec.rb