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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e43b011ea638d24011c4495dcc7cb6f99dc15f8b
4
- data.tar.gz: 3c10e0d558764fdedacc7230b806b3a9ca412b69
3
+ metadata.gz: e82cdbad99dab608fa83f34a745b56777259ab2b
4
+ data.tar.gz: 37dc15c3bd6d16d396cde24dc92300088a07af18
5
5
  SHA512:
6
- metadata.gz: d9fd12eb8e2e31a9d96b4ca1f6935b69ea1f0d49da67766462dc91a624fcecbf1a7f316a6058d762770fb4f342c7e5e98c0e366dcb0ca9eb949ee504aee8fe09
7
- data.tar.gz: 37bc6fc893f4cc022b5db7dfb4941924ac77ae3574df356c8df5383860587f99a519b171acdfe63b1b208770ec7734faa6df37f9003add2d975f8197b76d4741
6
+ metadata.gz: 51cd44bd284762c00fc92df25e5f8d427999b5daa8eac0cacafdf3cde9d1e22273c549162f987a6c3500f54f3acd8670f2c061d9055e98930ba730dfb6191c80
7
+ data.tar.gz: 8a6e8dc9c8b05a67f974b0cc4aad9b38d51bc4b50e61732d14ab4ec89793935a9edf75a9aece1b6eb4e3c386e06cfbf9b177dd9843efb8341af78058c1ee3911
@@ -1,3 +1,8 @@
1
+ # Version 0.4.3 - 24 April 2014
2
+
3
+ * Ensures the config scripts run in alphabetical order by filename,
4
+ or chronological order by creation date.
5
+
1
6
  # Version 0.4.2 - 3 March 2014
2
7
 
3
8
  * Outputs the seed filename when we fail to load a seed
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- config_scripts (0.4.2)
4
+ config_scripts (0.4.3)
5
5
  rails (> 3.0.0)
6
6
 
7
7
  GEM
@@ -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]
@@ -1,4 +1,4 @@
1
1
  module ConfigScripts
2
2
  # The current version of the library.
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
@@ -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.2
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-03-03 00:00:00.000000000 Z
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.2.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