config_scripts 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -26
- data/lib/config_scripts/scripts/script.rb +42 -13
- data/lib/config_scripts/seeds/seed_type.rb +7 -1
- data/lib/config_scripts/tasks.rb +1 -1
- data/lib/config_scripts/tasks/migrations.rake +23 -0
- data/lib/config_scripts/version.rb +1 -1
- data/spec/dummy/tmp/cache/.gitkeep +0 -0
- data/spec/scripts/script_spec.rb +91 -95
- data/spec/seeds/seed_type_spec.rb +19 -0
- data/spec/spec_helper.rb +1 -0
- metadata +30 -28
- data/lib/config_scripts/tasks/pending_migrations.rake +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e43b011ea638d24011c4495dcc7cb6f99dc15f8b
|
4
|
+
data.tar.gz: 3c10e0d558764fdedacc7230b806b3a9ca412b69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9fd12eb8e2e31a9d96b4ca1f6935b69ea1f0d49da67766462dc91a624fcecbf1a7f316a6058d762770fb4f342c7e5e98c0e366dcb0ca9eb949ee504aee8fe09
|
7
|
+
data.tar.gz: 37bc6fc893f4cc022b5db7dfb4941924ac77ae3574df356c8df5383860587f99a519b171acdfe63b1b208770ec7734faa6df37f9003add2d975f8197b76d4741
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# Version 0.4.2 - 3 March 2014
|
2
|
+
|
3
|
+
* Outputs the seed filename when we fail to load a seed
|
4
|
+
* Adds support for running and rolling back individual config scripts.
|
5
|
+
|
6
|
+
# Version 0.4.1 - 15 February 2014
|
7
|
+
|
8
|
+
* Bug fixes with the gem spec
|
9
|
+
|
1
10
|
# Version 0.4.0 - 9 February 2014
|
2
11
|
|
3
12
|
* Adds support for polymorphic foreign keys
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -27,29 +27,4 @@ And run them:
|
|
27
27
|
|
28
28
|
## Usage
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
#### Generate a new config script:
|
33
|
-
|
34
|
-
$ rails g config_scripts:config_script MyConfigScript
|
35
|
-
|
36
|
-
This will add a file to the `db/config_scripts` directory.
|
37
|
-
|
38
|
-
#### Run all the pending config scripts:
|
39
|
-
|
40
|
-
$ rake config_scripts:run_pending
|
41
|
-
|
42
|
-
### Seed Data
|
43
|
-
|
44
|
-
#### Defining Seed Data:
|
45
|
-
|
46
|
-
Create a file in the directory `db/seeds/definitions`. Examples of defining seed
|
47
|
-
data will be coming in the future.
|
48
|
-
|
49
|
-
#### Dumping seed data to the disk:
|
50
|
-
|
51
|
-
$ rake config_scripts:seeds:dump
|
52
|
-
|
53
|
-
#### Loading the seed data from the disk:
|
54
|
-
|
55
|
-
$ rake config_scripts::seeds::load
|
30
|
+
See [the wiki](https://github.com/brownleej/config-scripts-gem/wiki) for usage examples.
|
@@ -35,19 +35,7 @@ module ConfigScripts
|
|
35
35
|
# @return [True]
|
36
36
|
def self.run_pending_scripts
|
37
37
|
self.pending_scripts.each do |filename|
|
38
|
-
|
39
|
-
require path
|
40
|
-
timestamp = filename[0,14]
|
41
|
-
class_name = filename[15..-1].camelize + 'Config'
|
42
|
-
klass = nil
|
43
|
-
begin
|
44
|
-
klass = class_name.constantize
|
45
|
-
rescue NameError
|
46
|
-
puts "Aborting: could not find class #{class_name}"
|
47
|
-
return
|
48
|
-
end
|
49
|
-
puts "Running #{filename}"
|
50
|
-
success = klass.new(timestamp).run(:up)
|
38
|
+
self.run_file(filename)
|
51
39
|
end
|
52
40
|
true
|
53
41
|
end
|
@@ -60,6 +48,47 @@ module ConfigScripts
|
|
60
48
|
end
|
61
49
|
end
|
62
50
|
|
51
|
+
# This method gets the script filename for a given class.
|
52
|
+
#
|
53
|
+
# This will convert the class name into the snake case format, and look
|
54
|
+
# for a filename that has a timestamp followed by that.
|
55
|
+
#
|
56
|
+
# @param [String] name
|
57
|
+
# The name of the config script class, with the +Config+ suffix.
|
58
|
+
#
|
59
|
+
# @return [String] filename
|
60
|
+
# The filename.
|
61
|
+
def self.filename_for_script(name)
|
62
|
+
name_underscore = name.underscore
|
63
|
+
paths = Dir.glob(File.join(self.script_directory, "*#{name_underscore}.rb"))
|
64
|
+
path = paths.select do |path|
|
65
|
+
path =~ Regexp.new("[\\d]+_#{name_underscore}.rb")
|
66
|
+
end.first
|
67
|
+
path = File.basename(path, ".rb") if path
|
68
|
+
path
|
69
|
+
end
|
70
|
+
|
71
|
+
# This method runs the script with a given filename.
|
72
|
+
#
|
73
|
+
# The file must be in the +db/config_scripts+ directory, and should the
|
74
|
+
# filename should not include the `+rb+ extension.
|
75
|
+
#
|
76
|
+
# @param [String] filename
|
77
|
+
# The name of the file to run, without the extension.
|
78
|
+
#
|
79
|
+
# @param [Symbol] direction
|
80
|
+
# Whether we should run the script +up+ or +down+.
|
81
|
+
def self.run_file(filename, direction=:up)
|
82
|
+
path = Rails.root.join('db', 'config_scripts', "#{filename}.rb")
|
83
|
+
require path
|
84
|
+
timestamp = filename[0,14]
|
85
|
+
class_name = filename[15..-1].camelize + 'Config'
|
86
|
+
klass = nil
|
87
|
+
klass = class_name.constantize
|
88
|
+
puts "Running #{filename} #{direction}"
|
89
|
+
success = klass.new(timestamp).run(direction)
|
90
|
+
end
|
91
|
+
|
63
92
|
# @!group Creating
|
64
93
|
|
65
94
|
# This method creates a new script.
|
@@ -199,7 +199,13 @@ module ConfigScripts
|
|
199
199
|
value = self.read_value_for_attribute(value, attribute)
|
200
200
|
record.send("#{attribute}=", value)
|
201
201
|
end
|
202
|
-
|
202
|
+
|
203
|
+
begin
|
204
|
+
record.save!
|
205
|
+
rescue
|
206
|
+
puts "#{self.filename}.csv"
|
207
|
+
raise
|
208
|
+
end
|
203
209
|
end
|
204
210
|
end
|
205
211
|
end
|
data/lib/config_scripts/tasks.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
namespace :config_scripts do
|
2
|
+
desc "Run pending config scripts"
|
3
|
+
task :run_pending => :environment do
|
4
|
+
ConfigScripts::Scripts::Script.run_pending_scripts
|
5
|
+
end
|
6
|
+
|
7
|
+
desc "List pending config scripts"
|
8
|
+
task :list_pending => :environment do
|
9
|
+
ConfigScripts::Scripts::Script.list_pending_scripts
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "Run a config scripts"
|
13
|
+
task :run => :environment do
|
14
|
+
filename = ConfigScripts::Scripts::Script.filename_for_script(ENV['SCRIPT'])
|
15
|
+
ConfigScripts::Scripts::Script.run_file(filename)
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Rollback a config scripts"
|
19
|
+
task :rollback => :environment do
|
20
|
+
filename = ConfigScripts::Scripts::Script.filename_for_script(ENV['SCRIPT'])
|
21
|
+
ConfigScripts::Scripts::Script.run_file(filename, :down)
|
22
|
+
end
|
23
|
+
end
|
File without changes
|
data/spec/scripts/script_spec.rb
CHANGED
@@ -37,134 +37,130 @@ describe ConfigScripts::Scripts::Script do
|
|
37
37
|
describe "run_pending_scripts" do
|
38
38
|
class TestConfigScriptConfig < ConfigScripts::Scripts::Script; end
|
39
39
|
|
40
|
-
let
|
41
|
-
let!(:timestamp2) { '20140208200000' }
|
42
|
-
let!(:timestamp3) { '20140208250000' }
|
40
|
+
let(:script_filenames) { [double, double, double] }
|
43
41
|
|
44
|
-
|
42
|
+
before do
|
43
|
+
klass.stub pending_scripts: script_filenames
|
44
|
+
klass.stub :run_file
|
45
|
+
end
|
45
46
|
|
46
|
-
|
47
|
-
|
48
|
-
|
47
|
+
context "with no problems running the scripts" do
|
48
|
+
before do
|
49
|
+
klass.run_pending_scripts
|
50
|
+
end
|
51
|
+
|
52
|
+
it "runs the scripts" do
|
53
|
+
expect(klass).to have_received(:run_file).with(script_filenames[0])
|
54
|
+
expect(klass).to have_received(:run_file).with(script_filenames[1])
|
55
|
+
expect(klass).to have_received(:run_file).with(script_filenames[2])
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context "with a problems running the scripts" do
|
60
|
+
before do
|
61
|
+
klass.stub(:run_file).with(script_filenames[1]).and_raise
|
62
|
+
end
|
63
|
+
|
64
|
+
it "raises an exception" do
|
65
|
+
expect(lambda{klass.run_pending_scripts}).to raise_exception
|
66
|
+
end
|
67
|
+
|
68
|
+
it "stops running the scripts when it hits the exception" do
|
69
|
+
klass.run_pending_scripts rescue nil
|
70
|
+
expect(klass).to have_received(:run_file).with(script_filenames[0])
|
71
|
+
expect(klass).to have_received(:run_file).with(script_filenames[1])
|
72
|
+
expect(klass).not_to have_received(:run_file).with(script_filenames[2])
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe "run_file" do
|
78
|
+
class TestConfigScriptConfig < ConfigScripts::Scripts::Script; end
|
79
|
+
|
80
|
+
let(:timestamp) { '20140208150000' }
|
81
|
+
let(:filename) { "#{timestamp}_test_config_script" }
|
82
|
+
let!(:script) { TestConfigScriptConfig.new(timestamp) }
|
83
|
+
let(:path) { Rails.root.join("db", "config_scripts", "#{filename}.rb") }
|
49
84
|
|
50
85
|
before do
|
51
|
-
|
86
|
+
script.stub :run
|
87
|
+
TestConfigScriptConfig.stub new: script
|
52
88
|
klass.stub :require
|
53
89
|
klass.stub :puts
|
54
|
-
|
55
|
-
|
90
|
+
end
|
91
|
+
|
92
|
+
context "with no problems running the scripts" do
|
93
|
+
before do
|
94
|
+
klass.run_file(filename, :sideways)
|
56
95
|
end
|
57
96
|
|
58
|
-
|
59
|
-
|
60
|
-
|
97
|
+
it "requires the file" do
|
98
|
+
expect(klass).to have_received(:require).with(path)
|
99
|
+
end
|
61
100
|
|
62
|
-
|
63
|
-
|
101
|
+
it "puts the name of the file out to the console" do
|
102
|
+
expect(klass).to have_received(:puts).with("Running #{filename} sideways")
|
103
|
+
end
|
64
104
|
|
65
|
-
|
66
|
-
|
67
|
-
filename: script_filenames[0],
|
68
|
-
script: script1,
|
69
|
-
run: true
|
70
|
-
},
|
71
|
-
{
|
72
|
-
filename: script_filenames[1],
|
73
|
-
script: script2,
|
74
|
-
run: true
|
75
|
-
},
|
76
|
-
{
|
77
|
-
filename: script_filenames[2],
|
78
|
-
script: script3,
|
79
|
-
run: true
|
80
|
-
}
|
81
|
-
]}
|
82
|
-
|
83
|
-
|
84
|
-
shared_examples "ran scripts" do
|
85
|
-
it "requires only the scripts it needs to run" do
|
86
|
-
scripts.each do |script|
|
87
|
-
path = Rails.root.join("db", "config_scripts", "#{script[:filename]}.rb")
|
88
|
-
if script[:run]
|
89
|
-
expect(klass).to have_received(:require).with(path)
|
90
|
-
else
|
91
|
-
expect(klass).not_to have_received(:require).with(path)
|
92
|
-
end
|
93
|
-
end
|
105
|
+
it "creates a config script with the class and timestamp" do
|
106
|
+
expect(TestConfigScriptConfig).to have_received(:new).with(timestamp)
|
94
107
|
end
|
95
108
|
|
96
|
-
it "
|
97
|
-
|
98
|
-
timestamp = script[:filename].first(14)
|
99
|
-
if script[:run]
|
100
|
-
expect(TestConfigScriptConfig).to have_received(:new).with(timestamp)
|
101
|
-
else
|
102
|
-
expect(TestConfigScriptConfig).not_to have_received(:new).with(timestamp)
|
103
|
-
end
|
104
|
-
end
|
109
|
+
it "calls the run command on the script with the direction" do
|
110
|
+
expect(script).to have_received(:run).with(:sideways)
|
105
111
|
end
|
112
|
+
end
|
106
113
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
expect(script[:script]).to have_received(:run).with(:up)
|
111
|
-
else
|
112
|
-
expect(script[:script]).not_to have_received(:run)
|
113
|
-
end
|
114
|
-
end
|
114
|
+
context "with a problem running the script" do
|
115
|
+
before do
|
116
|
+
script.stub(:run).and_raise 'error'
|
115
117
|
end
|
116
118
|
|
117
|
-
it "
|
118
|
-
|
119
|
-
if script[:run]
|
120
|
-
expect(klass).to have_received(:puts).with("Running #{script[:filename]}")
|
121
|
-
else
|
122
|
-
expect(klass).not_to have_received(:puts).with("Running #{script[:filename]}")
|
123
|
-
end
|
124
|
-
end
|
119
|
+
it "re-raises the exception" do
|
120
|
+
expect(lambda{klass.run_file(filename)}).to raise_exception 'error'
|
125
121
|
end
|
126
122
|
end
|
127
123
|
|
128
|
-
context "with
|
129
|
-
|
130
|
-
|
131
|
-
before do
|
132
|
-
klass.run_pending_scripts
|
124
|
+
context "with a problem finding the class" do
|
125
|
+
it "re-raises the exception" do
|
126
|
+
expect(lambda{klass.run_file("#{timestamp}_test_config_script_2")}).to raise_exception NameError
|
133
127
|
end
|
134
128
|
end
|
129
|
+
end
|
135
130
|
|
136
|
-
|
137
|
-
|
131
|
+
describe "filename_for_script" do
|
132
|
+
let(:name) { 'my_change' }
|
133
|
+
let(:path) { File.join(klass.script_directory, "*#{name}.rb") }
|
134
|
+
let(:filename) { "1234512345_#{name}" }
|
135
|
+
subject { klass.filename_for_script(name) }
|
138
136
|
|
137
|
+
context "when there are multiple files that have the name" do
|
139
138
|
before do
|
140
|
-
|
141
|
-
scripts[2][:run] = false
|
142
|
-
begin
|
143
|
-
klass.run_pending_scripts
|
144
|
-
rescue
|
145
|
-
end
|
139
|
+
Dir.stub(:glob).with(path).and_return(["#{filename}.rb", "5123451234_#{name}.rb"])
|
146
140
|
end
|
147
|
-
end
|
148
141
|
|
149
|
-
|
150
|
-
|
142
|
+
it "is the first one" do
|
143
|
+
expect(subject).to eq filename
|
144
|
+
end
|
145
|
+
end
|
151
146
|
|
147
|
+
context "when there is one file with the exact name, and one that just ends with the name" do
|
152
148
|
before do
|
153
|
-
|
154
|
-
scripts[2][:run] = false
|
155
|
-
klass.stub pending_scripts: [script_filenames[0], bad_filename, script_filenames[1], script_filenames[2]]
|
156
|
-
klass.run_pending_scripts
|
149
|
+
Dir.stub(:glob).with(path).and_return(["5123451234_prepare_#{name}.rb", "#{filename}.rb"])
|
157
150
|
end
|
158
151
|
|
159
|
-
|
152
|
+
it "is the one with the exact name" do
|
153
|
+
expect(subject).to eq filename
|
154
|
+
end
|
155
|
+
end
|
160
156
|
|
161
|
-
|
162
|
-
|
163
|
-
|
157
|
+
context "when there are no files with the name" do
|
158
|
+
before do
|
159
|
+
Dir.stub(:glob).with(path).and_return([])
|
164
160
|
end
|
165
161
|
|
166
|
-
it "
|
167
|
-
expect(
|
162
|
+
it "is nil" do
|
163
|
+
expect(subject).to be_nil
|
168
164
|
end
|
169
165
|
end
|
170
166
|
end
|
@@ -185,6 +185,25 @@ describe ConfigScripts::Seeds::SeedType do
|
|
185
185
|
end
|
186
186
|
end
|
187
187
|
|
188
|
+
context "with exception" do
|
189
|
+
subject { seed_type.read_from_folder(folder) }
|
190
|
+
|
191
|
+
before do
|
192
|
+
$stdout.stub :puts
|
193
|
+
Person.any_instance.stub(:save!).and_raise
|
194
|
+
seed_type.has_attributes :name, :hair_color
|
195
|
+
end
|
196
|
+
|
197
|
+
it "is an exception" do
|
198
|
+
expect{ subject }.to raise_error
|
199
|
+
end
|
200
|
+
|
201
|
+
it "outputs the problem file name" do
|
202
|
+
expect($stdout).to receive(:puts).with('people.csv')
|
203
|
+
expect{ subject }.to raise_error
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
188
207
|
context "with no attributes" do
|
189
208
|
before do
|
190
209
|
seed_type.read_from_folder(folder)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,153 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Brownlee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>'
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>'
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: yard
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: sqlite3
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: timecop
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: generator_spec
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - '>='
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rspec-rails
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - '>='
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
description: Library for creating trackable config scripts, and reading and writing
|
@@ -158,9 +158,9 @@ executables: []
|
|
158
158
|
extensions: []
|
159
159
|
extra_rdoc_files: []
|
160
160
|
files:
|
161
|
-
-
|
162
|
-
-
|
163
|
-
-
|
161
|
+
- .gitignore
|
162
|
+
- .rspec
|
163
|
+
- .yardopts
|
164
164
|
- CHANGELOG.md
|
165
165
|
- Gemfile
|
166
166
|
- Gemfile.lock
|
@@ -180,7 +180,7 @@ files:
|
|
180
180
|
- lib/config_scripts/seeds/seed_set.rb
|
181
181
|
- lib/config_scripts/seeds/seed_type.rb
|
182
182
|
- lib/config_scripts/tasks.rb
|
183
|
-
- lib/config_scripts/tasks/
|
183
|
+
- lib/config_scripts/tasks/migrations.rake
|
184
184
|
- lib/config_scripts/tasks/seeds.rake
|
185
185
|
- lib/config_scripts/version.rb
|
186
186
|
- spec/dummy/README.rdoc
|
@@ -230,6 +230,7 @@ files:
|
|
230
230
|
- spec/dummy/public/422.html
|
231
231
|
- spec/dummy/public/500.html
|
232
232
|
- spec/dummy/public/favicon.ico
|
233
|
+
- spec/dummy/tmp/cache/.gitkeep
|
233
234
|
- spec/generators/config_script_spec.rb
|
234
235
|
- spec/generators/migrations_spec.rb
|
235
236
|
- spec/scripts/script_history_spec.rb
|
@@ -249,12 +250,12 @@ require_paths:
|
|
249
250
|
- lib
|
250
251
|
required_ruby_version: !ruby/object:Gem::Requirement
|
251
252
|
requirements:
|
252
|
-
- -
|
253
|
+
- - '>='
|
253
254
|
- !ruby/object:Gem::Version
|
254
255
|
version: '0'
|
255
256
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
256
257
|
requirements:
|
257
|
-
- -
|
258
|
+
- - '>='
|
258
259
|
- !ruby/object:Gem::Version
|
259
260
|
version: '0'
|
260
261
|
requirements: []
|
@@ -311,6 +312,7 @@ test_files:
|
|
311
312
|
- spec/dummy/public/422.html
|
312
313
|
- spec/dummy/public/500.html
|
313
314
|
- spec/dummy/public/favicon.ico
|
315
|
+
- spec/dummy/tmp/cache/.gitkeep
|
314
316
|
- spec/generators/config_script_spec.rb
|
315
317
|
- spec/generators/migrations_spec.rb
|
316
318
|
- spec/scripts/script_history_spec.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
namespace :config_scripts do
|
2
|
-
desc "Run pending config scripts"
|
3
|
-
task :run_pending => :environment do
|
4
|
-
ConfigScripts::Scripts::Script.run_pending_scripts
|
5
|
-
end
|
6
|
-
|
7
|
-
desc "List pending config scripts"
|
8
|
-
task :list_pending => :environment do
|
9
|
-
ConfigScripts::Scripts::Script.list_pending_scripts
|
10
|
-
end
|
11
|
-
end
|