macmillan-utils 1.0.27 → 1.0.29
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/.hound.yml +2 -38
- data/.rubocop.yml +8 -0
- data/.travis.yml +2 -2
- data/lib/macmillan/utils/rspec/rspec_defaults.rb +22 -28
- 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: a52b592a6dc2fa6a8e43dab0d7bdcb0a124faec2
|
4
|
+
data.tar.gz: d69410c60657a9a6926737cf947a3f9dee7ffcfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8af1e77116a173bc52941b007216f674848039649e48e3d738f2a86c78b33638065aa7890c35bb10d2102e3347a2720fb557625149acb05457805bc340a9451a
|
7
|
+
data.tar.gz: bbc21e028c0be122c1edbd0aa6269bea942e425818ad2c340bd01c84935d13531e39cf590877aa06f6096b5af4326aa30f7a1354a4f895389469c073a44ac57b
|
data/.hound.yml
CHANGED
@@ -1,39 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Max: 120
|
1
|
+
ruby:
|
2
|
+
config_file: .rubocop.yml
|
4
3
|
|
5
|
-
Style/Documentation:
|
6
|
-
Enabled: false
|
7
|
-
|
8
|
-
Style/SpaceBeforeFirstArg:
|
9
|
-
Enabled: false
|
10
|
-
|
11
|
-
Style/BracesAroundHashParameters:
|
12
|
-
Enabled: false
|
13
|
-
|
14
|
-
Style/IndentHash:
|
15
|
-
EnforcedStyle: consistent
|
16
|
-
|
17
|
-
Style/AlignHash:
|
18
|
-
EnforcedHashRocketStyle: table
|
19
|
-
EnforcedColonStyle: table
|
20
|
-
|
21
|
-
Style/AlignParameters:
|
22
|
-
EnforcedStyle: with_fixed_indentation
|
23
|
-
|
24
|
-
Style/StringLiterals:
|
25
|
-
EnforcedStyle: single_quotes
|
26
|
-
|
27
|
-
Style/CollectionMethods:
|
28
|
-
PreferredMethods:
|
29
|
-
collect: 'map'
|
30
|
-
collect!: 'map!'
|
31
|
-
inject: 'reduce'
|
32
|
-
detect: 'find'
|
33
|
-
find_all: 'select'
|
34
|
-
|
35
|
-
Style/DotPosition:
|
36
|
-
EnforcedStyle: leading
|
37
|
-
|
38
|
-
Style/DoubleNegation:
|
39
|
-
Enabled: false
|
data/.rubocop.yml
CHANGED
@@ -15,6 +15,8 @@ Style/IndentHash:
|
|
15
15
|
EnforcedStyle: consistent
|
16
16
|
|
17
17
|
Style/AlignHash:
|
18
|
+
Severity: fatal
|
19
|
+
Enabled: true
|
18
20
|
EnforcedHashRocketStyle: table
|
19
21
|
EnforcedColonStyle: table
|
20
22
|
|
@@ -37,3 +39,9 @@ Style/DotPosition:
|
|
37
39
|
|
38
40
|
Style/DoubleNegation:
|
39
41
|
Enabled: false
|
42
|
+
|
43
|
+
Style/SpaceAroundOperators:
|
44
|
+
# When true, allows most uses of extra spacing if the intent is to align
|
45
|
+
# with an operator on the previous or next line, not counting empty lines
|
46
|
+
# or comment lines.
|
47
|
+
AllowForAlignment: true
|
data/.travis.yml
CHANGED
@@ -1,35 +1,17 @@
|
|
1
|
-
def
|
1
|
+
def check_config_file(filename)
|
2
2
|
# ASSUMPTION: We are running the RSpec suite from the root of a project tree
|
3
|
-
|
4
|
-
|
5
|
-
local_rubocop_file = File.join(Dir.getwd, rubocop_file)
|
6
|
-
local_hound_file = File.join(Dir.getwd, '.hound.yml')
|
3
|
+
update_config = true
|
4
|
+
local_config_file = File.join(Dir.getwd, filename)
|
7
5
|
|
8
|
-
if File.exist?(
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
if File.exist?(local_config_file)
|
7
|
+
latest_conf = File.read(File.expand_path("../../../../../#{filename}", __FILE__))
|
8
|
+
current_conf = File.read(local_config_file)
|
9
|
+
update_config = false if current_conf == latest_conf
|
12
10
|
end
|
13
11
|
|
14
|
-
|
15
|
-
system "rm -f #{local_hound_file}"
|
16
|
-
system "ln -s #{rubocop_file} #{local_hound_file}"
|
17
|
-
end
|
18
|
-
|
19
|
-
if update_rubocop
|
20
|
-
puts 'WARNING: You do not have the latest set of rubocop style preferences.'
|
21
|
-
puts ' These have now been updated for you. :)'
|
22
|
-
puts ''
|
23
|
-
puts ' You can run RSpec again now.'
|
24
|
-
puts ''
|
25
|
-
puts " Don't forget to commit the '.rubocop.yml' and '.hound.yml' files to git!"
|
26
|
-
|
27
|
-
File.open(local_rubocop_file, 'w') do |file|
|
28
|
-
file.print latest_rubocop_conf
|
29
|
-
end
|
12
|
+
File.open(local_config_file, 'w') { |file| file.print(latest_conf) } if update_config
|
30
13
|
|
31
|
-
|
32
|
-
end
|
14
|
+
update_config
|
33
15
|
end
|
34
16
|
|
35
17
|
RSpec.configure do |config|
|
@@ -39,6 +21,18 @@ RSpec.configure do |config|
|
|
39
21
|
config.fail_fast = true if ENV['FAIL_FAST']
|
40
22
|
|
41
23
|
config.before(:suite) do
|
42
|
-
|
24
|
+
config_files = %w(.rubocop.yml)
|
25
|
+
config_files << '.hound.yml' if ENV['MANAGE_HOUND']
|
26
|
+
config_updated = config_files.map { |file| check_config_file(file) }.any?
|
27
|
+
|
28
|
+
if config_updated
|
29
|
+
puts 'WARNING: You do not have the latest set of Macmillan::Utils config files.'
|
30
|
+
puts ' These have now been updated for you. :)'
|
31
|
+
puts ''
|
32
|
+
puts ' You can run RSpec again now.'
|
33
|
+
puts ''
|
34
|
+
puts " Don't forget to commit the config files (#{config_files.join(', ')}) to git!"
|
35
|
+
raise '...'
|
36
|
+
end
|
43
37
|
end
|
44
38
|
end
|
data/macmillan-utils.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_development_dependency 'yard'
|
21
21
|
spec.add_development_dependency 'pry'
|
22
22
|
spec.add_development_dependency 'rack-test'
|
23
|
+
spec.add_development_dependency 'rack', '< 2.0.0'
|
23
24
|
|
24
25
|
spec.add_dependency 'rspec'
|
25
26
|
spec.add_dependency 'simplecov'
|
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.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Springer Nature
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rack
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "<"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.0.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "<"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.0.0
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rspec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|