stairs 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -5
- data/README.md +1 -1
- data/bin/stairs +1 -1
- data/lib/stairs/interactive_configuration.rb +20 -5
- data/lib/stairs/step.rb +1 -1
- data/lib/stairs/version.rb +1 -1
- data/spec/lib/stairs/interactive_configuration_spec.rb +8 -0
- data/stairs.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92ee164d25a4cba9bc7bc59b2e3c093fd02e5877
|
4
|
+
data.tar.gz: 79b76735f86f72b6aff583c7708b169bb91a4edb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd51dbb32386d4a8f2b0b7d056d602b24cc8273b40b9350577af9acc8b125747400879c4624f6b88ebfb40aa9a749601d9e4fd1959177eab1f3d534f85c792d
|
7
|
+
data.tar.gz: 419d9a871c140ce33214cae856d330f7d96ecf81690d2feea64e9bb9e463fcf6317b55e8494b1a48038091fb9ef429e3c1a1cfaed8724984a6bd876abdc2233c
|
data/.rubocop.yml
CHANGED
@@ -8,14 +8,22 @@ LineLength:
|
|
8
8
|
CaseIndentation:
|
9
9
|
Enabled: false
|
10
10
|
|
11
|
-
# Seems unnecessary?
|
12
|
-
ReduceArguments:
|
13
|
-
Enabled: false
|
14
|
-
|
15
11
|
# Not a part of our coding conventions
|
16
12
|
Documentation:
|
17
13
|
Enabled: false
|
18
14
|
|
15
|
+
DoubleNegation:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
TrailingComma:
|
19
|
+
EnforcedStyleForMultiline: comma
|
20
|
+
|
21
|
+
DeprecatedClassMethods:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
SingleLineBlockParams:
|
25
|
+
Enabled: false
|
26
|
+
|
19
27
|
# Also just not something I've ever done or want to do...
|
20
28
|
SpaceAroundEqualsInParameterDefault:
|
21
29
|
Enabled: false
|
@@ -34,5 +42,5 @@ Encoding:
|
|
34
42
|
|
35
43
|
# I just don't care so much about clean specs.. Like short methods and short lines
|
36
44
|
AllCops:
|
37
|
-
|
45
|
+
Exclude:
|
38
46
|
- spec/**
|
data/README.md
CHANGED
data/bin/stairs
CHANGED
@@ -14,18 +14,24 @@ module Stairs
|
|
14
14
|
private
|
15
15
|
|
16
16
|
def configure_env_adapter
|
17
|
+
require_installed_adapter!
|
18
|
+
|
17
19
|
choice prompt do |yes|
|
18
20
|
if yes
|
19
21
|
use_recommended_adapter!
|
20
22
|
else
|
21
|
-
|
22
|
-
adapter_class = Stairs::EnvAdapters::ADAPTERS[name.to_sym]
|
23
|
-
Stairs.configuration.env_adapter = adapter_class.new
|
24
|
-
end
|
23
|
+
select_env_adapter
|
25
24
|
end
|
26
25
|
end
|
27
26
|
end
|
28
27
|
|
28
|
+
def select_env_adapter
|
29
|
+
choice "Which would you prefer?", adapter_names do |name|
|
30
|
+
adapter_class = Stairs::EnvAdapters::ADAPTERS[name.to_sym]
|
31
|
+
Stairs.configuration.env_adapter = adapter_class.new
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
29
35
|
def use_recommended_adapter!
|
30
36
|
Stairs.configuration.env_adapter = recommended_adapter.new
|
31
37
|
end
|
@@ -46,7 +52,16 @@ module Stairs
|
|
46
52
|
end
|
47
53
|
|
48
54
|
def adapter_names
|
49
|
-
Stairs::EnvAdapters::ADAPTERS.map { |n, _a| n.to_s }
|
55
|
+
@adapter_names ||= Stairs::EnvAdapters::ADAPTERS.map { |n, _a| n.to_s }
|
56
|
+
end
|
57
|
+
|
58
|
+
def require_installed_adapter!
|
59
|
+
unless recommended_adapter
|
60
|
+
abort <<-MSG
|
61
|
+
Please install a supported ENV variable manager:
|
62
|
+
#{adapter_names.join(", ")}
|
63
|
+
MSG
|
64
|
+
end
|
50
65
|
end
|
51
66
|
end
|
52
67
|
end
|
data/lib/stairs/step.rb
CHANGED
data/lib/stairs/version.rb
CHANGED
@@ -41,5 +41,13 @@ describe Stairs::InteractiveConfiguration do
|
|
41
41
|
expect(Stairs.configuration.env_adapter).to be_a Stairs::EnvAdapters::Rbenv
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
context "when no adapter can be found to recommend" do
|
46
|
+
before { Stairs::EnvAdapters.stub recommended_adapter: nil }
|
47
|
+
|
48
|
+
it "aborts" do
|
49
|
+
expect { subject.run! }.to raise_error SystemExit
|
50
|
+
end
|
51
|
+
end
|
44
52
|
end
|
45
53
|
end
|
data/stairs.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency "rb-fsevent", "~> 0.9.3"
|
27
27
|
spec.add_development_dependency "awesome_print", "~> 1.2.0"
|
28
28
|
spec.add_development_dependency "fakefs", "~> 0.4.3"
|
29
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
29
|
+
spec.add_development_dependency "rubocop", "~> 0.20.1"
|
30
30
|
spec.add_development_dependency "guard-rubocop", "~> 1.0.0"
|
31
31
|
spec.add_development_dependency "codeclimate-test-reporter"
|
32
32
|
spec.add_development_dependency "mock_stdio", "~> 0.0.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stairs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- patbenatar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.20.1
|
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
|
-
version: 0.
|
138
|
+
version: 0.20.1
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: guard-rubocop
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -302,3 +302,4 @@ test_files:
|
|
302
302
|
- spec/lib/stairs/util/file_mutation_spec.rb
|
303
303
|
- spec/spec_helper.rb
|
304
304
|
- spec/support/configuration_helper.rb
|
305
|
+
has_rdoc:
|