config_scripts 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/config_scripts/scripts/script.rb +1 -1
- data/lib/config_scripts/version.rb +1 -1
- data/spec/scripts/script_spec.rb +8 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e82cdbad99dab608fa83f34a745b56777259ab2b
|
4
|
+
data.tar.gz: 37dc15c3bd6d16d396cde24dc92300088a07af18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51cd44bd284762c00fc92df25e5f8d427999b5daa8eac0cacafdf3cde9d1e22273c549162f987a6c3500f54f3acd8670f2c061d9055e98930ba730dfb6191c80
|
7
|
+
data.tar.gz: 8a6e8dc9c8b05a67f974b0cc4aad9b38d51bc4b50e61732d14ab4ec89793935a9edf75a9aece1b6eb4e3c386e06cfbf9b177dd9843efb8341af78058c1ee3911
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -22,7 +22,7 @@ module ConfigScripts
|
|
22
22
|
#
|
23
23
|
# @return [Array<String>]
|
24
24
|
def self.pending_scripts
|
25
|
-
paths = Dir.glob(File.join(self.script_directory, '*.rb'))
|
25
|
+
paths = Dir.glob(File.join(self.script_directory, '*.rb')).sort
|
26
26
|
paths.collect do |path|
|
27
27
|
filename = File.basename(path, ".rb")
|
28
28
|
timestamp = filename[0, 14]
|
data/spec/scripts/script_spec.rb
CHANGED
@@ -12,11 +12,13 @@ describe ConfigScripts::Scripts::Script do
|
|
12
12
|
describe "pending_scripts" do
|
13
13
|
let!(:filename1) { "20140208150000_script_1" }
|
14
14
|
let!(:filename2) { "20140208200000_script_2" }
|
15
|
+
let!(:filename3) { "20140210200000_script_2" }
|
16
|
+
let!(:filename4) { "20140209200000_script_2" }
|
15
17
|
|
16
18
|
subject { klass.pending_scripts }
|
17
19
|
|
18
20
|
before do
|
19
|
-
Dir.stub glob: ["/tmp/#{filename1}.rb", "/tmp/#{filename2}.rb"]
|
21
|
+
Dir.stub glob: ["/tmp/#{filename1}.rb", "/tmp/#{filename2}.rb", "/tmp/#{filename3}.rb", "/tmp/#{filename4}.rb"]
|
20
22
|
ConfigScripts::Scripts::ScriptHistory.record_timestamp('20140208150000')
|
21
23
|
end
|
22
24
|
|
@@ -32,6 +34,11 @@ describe ConfigScripts::Scripts::Script do
|
|
32
34
|
it "does not include filenames that have entries in the script history" do
|
33
35
|
expect(subject).not_to include filename1
|
34
36
|
end
|
37
|
+
|
38
|
+
it "puts the files in alphabetical order" do
|
39
|
+
expect(subject.index(filename2)).to be < subject.index(filename4)
|
40
|
+
expect(subject.index(filename4)).to be < subject.index(filename3)
|
41
|
+
end
|
35
42
|
end
|
36
43
|
|
37
44
|
describe "run_pending_scripts" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.3
|
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-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
260
|
version: '0'
|
261
261
|
requirements: []
|
262
262
|
rubyforge_project:
|
263
|
-
rubygems_version: 2.
|
263
|
+
rubygems_version: 2.0.14
|
264
264
|
signing_key:
|
265
265
|
specification_version: 4
|
266
266
|
summary: Config scripts and seed files for Rails
|