macmillan-utils 1.0.33 → 1.0.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/macmillan/utils/rspec/rspec_defaults.rb +23 -8
- data/macmillan-utils.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0de1c896375db7381540df9d9fe2b4edad6fd926
|
4
|
+
data.tar.gz: b93172e537a04416b9e74bef0fa76d0e6646cbb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4114d1edfca40206a2192a227ea8f48f56fd6f9bb77b7520f76e1daa174791a750f8667a0ceca2b1483bc796f14ae5d154d053ab15f13de1b8c41a5ccfdb3c44
|
7
|
+
data.tar.gz: 9f979a93bc577163de9f8fe64d1fffc6fdb206e198c4b9a571782e376b1329b6e5f5568ad09f7d30258d7d8dd79fe38c0ff77a8c0299c01f28e86b3d340d5680
|
@@ -1,11 +1,20 @@
|
|
1
|
+
require 'colorize'
|
2
|
+
|
1
3
|
def check_config_file(filename)
|
2
4
|
# ASSUMPTION: We are running the RSpec suite from the root of a project tree
|
3
5
|
update_config = true
|
4
6
|
local_config_file = File.join(Dir.getwd, filename)
|
5
7
|
|
6
8
|
if File.exist?(local_config_file)
|
7
|
-
|
8
|
-
|
9
|
+
@message ||= []
|
10
|
+
|
11
|
+
latest_conf_path = File.expand_path("../../../../../#{filename}", __FILE__)
|
12
|
+
latest_conf = File.read(latest_conf_path)
|
13
|
+
@message << "macmillan-utils config file = #{latest_conf_path}"
|
14
|
+
|
15
|
+
current_conf = File.read(local_config_file)
|
16
|
+
@message << "current repo config file = #{local_config_file}"
|
17
|
+
|
9
18
|
update_config = false if current_conf == latest_conf
|
10
19
|
end
|
11
20
|
|
@@ -26,12 +35,18 @@ RSpec.configure do |config|
|
|
26
35
|
config_updated = config_files.map { |file| check_config_file(file) }.any?
|
27
36
|
|
28
37
|
if config_updated
|
29
|
-
puts
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
38
|
+
puts "\nWARNING: Your local config file(s) have been replaced with the versions \n"\
|
39
|
+
"from macmillan-utils gem, on the assumption macmillan-utils is up-to-date.\n"\
|
40
|
+
"\nIf you see this failure on *CI*, you may want to run *locally*: \n"\
|
41
|
+
"$ bundle update macmillan-utils \n"\
|
42
|
+
"before re-running the specs, then committing and pushing the updated configs.\n".red
|
43
|
+
|
44
|
+
@message.each do |msg|
|
45
|
+
puts "Please note: \n #{msg}".red
|
46
|
+
end
|
47
|
+
|
48
|
+
puts "\nYou can now re-run RSpec without this failure interfering.".red
|
49
|
+
|
35
50
|
raise '...'
|
36
51
|
end
|
37
52
|
end
|
data/macmillan-utils.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macmillan-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Springer Nature
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: colorize
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
description:
|
210
224
|
email:
|
211
225
|
- npp-developers@macmillan.com
|