relevance_rails 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/generators/provision_config/provision_config_generator.rb +6 -5
- data/lib/relevance_rails/version.rb +1 -1
- data/relevance_rails.gemspec +0 -1
- data/script/elzar_nightly +1 -2
- data/spec/lib/generators/provision_config/provision_config_generator_spec.rb +19 -22
- metadata +25 -102
data/CHANGELOG.md
CHANGED
@@ -102,12 +102,13 @@ To ensure you have remote access to your servers, an SSH public key must be avai
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def local_keys
|
105
|
-
|
106
|
-
|
105
|
+
default_keys.select { |p| File.exist?(p) }.take(1).map { |p| split_keys(File.read(p)) }.flatten(1)
|
106
|
+
end
|
107
|
+
|
108
|
+
def default_keys
|
109
|
+
[ File.expand_path("~/.ssh/id_dsa.pub"),
|
107
110
|
File.expand_path("~/.ssh/id_ecdsa.pub"),
|
108
|
-
File.expand_path("~/.ssh/id_rsa.pub")
|
109
|
-
]
|
110
|
-
key_files.select { |p| File.exist?(p) }.take(1).map { |p| split_keys(File.read(p)) }.flatten(1)
|
111
|
+
File.expand_path("~/.ssh/id_rsa.pub") ]
|
111
112
|
end
|
112
113
|
|
113
114
|
def ssh_agent_keys
|
data/relevance_rails.gemspec
CHANGED
@@ -27,7 +27,6 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_runtime_dependency 'elzar', '~> 0.1.0'
|
28
28
|
|
29
29
|
s.add_development_dependency 'capybara'
|
30
|
-
s.add_development_dependency 'fakefs'
|
31
30
|
s.add_development_dependency 'guard-rspec'
|
32
31
|
s.add_development_dependency 'pry'
|
33
32
|
s.add_development_dependency 'rake', '~> 0.9.2.2'
|
data/script/elzar_nightly
CHANGED
@@ -24,8 +24,7 @@ rvm use "$CI_RUBY_VERSION@$CI_GEMSET"
|
|
24
24
|
gem install bundler
|
25
25
|
bundle install
|
26
26
|
|
27
|
-
|
28
|
-
rake elzar_nightly
|
27
|
+
bundle exec rake elzar_nightly
|
29
28
|
|
30
29
|
[ $? -ne 0 ] && builtin cd $RAILS_APP && stop_server_and_exit
|
31
30
|
|
@@ -1,47 +1,44 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'fileutils'
|
3
|
-
require 'fakefs/spec_helpers'
|
4
2
|
require 'generators/provision_config/provision_config_generator'
|
3
|
+
require 'tempfile'
|
5
4
|
|
6
5
|
describe ProvisionConfigGenerator do
|
7
6
|
subject { ProvisionConfigGenerator.new(["name"]) }
|
8
7
|
|
9
8
|
describe "#local_keys" do
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
FileUtils.mkdir_p(File.dirname(path))
|
9
|
+
def write_fixture(name, contents)
|
10
|
+
path = Tempfile.new(name).path
|
11
|
+
subject.stub(:default_keys).and_return([path])
|
14
12
|
File.open(path, "w") { |f| f.write(contents) }
|
13
|
+
path
|
15
14
|
end
|
16
15
|
|
17
|
-
it
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
it "returns the contents of id_dsa.pub when it exists" do
|
23
|
-
write_fixture(File.expand_path("~/.ssh/id_dsa.pub"), "DSA-public-key")
|
24
|
-
subject.send(:local_keys).should == ["DSA-public-key"]
|
16
|
+
it 'has a sane default set of public keys to use' do
|
17
|
+
defaults = %w{id_ecdsa.pub id_dsa.pub id_rsa.pub}
|
18
|
+
defaults.map { |fname| File.expand_path("~/.ssh/#{fname}") }.each do |key|
|
19
|
+
subject.send(:default_keys).should include key
|
20
|
+
end
|
25
21
|
end
|
26
22
|
|
27
|
-
it "returns the contents of
|
28
|
-
write_fixture(
|
29
|
-
subject.send(:local_keys).should == ["
|
23
|
+
it "returns the contents of the key when it exists" do
|
24
|
+
write_fixture('some-key.pub', 'RSA-public-key')
|
25
|
+
subject.send(:local_keys).should == ["RSA-public-key"]
|
30
26
|
end
|
31
27
|
|
32
|
-
it "returns the contents of
|
33
|
-
write_fixture(
|
34
|
-
write_fixture(
|
28
|
+
it "returns the contents of one key when multiple exist" do
|
29
|
+
dsa = write_fixture('id_dsa.pub', "DSA-public-key")
|
30
|
+
rsa = write_fixture('id_rsa.pub', "RSA-public-key")
|
31
|
+
subject.stub(:default_keys).and_return([dsa, rsa])
|
35
32
|
subject.send(:local_keys).should == ["DSA-public-key"]
|
36
33
|
end
|
37
34
|
|
38
35
|
it "ignores trailing newlines" do
|
39
|
-
write_fixture(
|
36
|
+
write_fixture('id_rsa.pub', "RSA-public-key\n\n")
|
40
37
|
subject.send(:local_keys).should == ["RSA-public-key"]
|
41
38
|
end
|
42
39
|
|
43
40
|
it "ignores blank lines" do
|
44
|
-
write_fixture(
|
41
|
+
write_fixture('id_rsa.pub', "\n\nRSA-public-key\n\n\n")
|
45
42
|
subject.send(:local_keys).should == ["RSA-public-key"]
|
46
43
|
end
|
47
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relevance_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,27 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-15 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &14982900 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - =
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 1.3.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - '='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 1.3.1
|
24
|
+
version_requirements: *14982900
|
30
25
|
- !ruby/object:Gem::Dependency
|
31
26
|
name: rails
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &14982400 !ruby/object:Gem::Requirement
|
33
28
|
none: false
|
34
29
|
requirements:
|
35
30
|
- - ~>
|
@@ -37,15 +32,10 @@ dependencies:
|
|
37
32
|
version: '3.2'
|
38
33
|
type: :runtime
|
39
34
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '3.2'
|
35
|
+
version_requirements: *14982400
|
46
36
|
- !ruby/object:Gem::Dependency
|
47
37
|
name: slushy
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &14981940 !ruby/object:Gem::Requirement
|
49
39
|
none: false
|
50
40
|
requirements:
|
51
41
|
- - ~>
|
@@ -53,15 +43,10 @@ dependencies:
|
|
53
43
|
version: 0.1.1
|
54
44
|
type: :runtime
|
55
45
|
prerelease: false
|
56
|
-
version_requirements:
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1.1
|
46
|
+
version_requirements: *14981940
|
62
47
|
- !ruby/object:Gem::Dependency
|
63
48
|
name: thor
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &14981480 !ruby/object:Gem::Requirement
|
65
50
|
none: false
|
66
51
|
requirements:
|
67
52
|
- - ~>
|
@@ -69,15 +54,10 @@ dependencies:
|
|
69
54
|
version: 0.14.6
|
70
55
|
type: :runtime
|
71
56
|
prerelease: false
|
72
|
-
version_requirements:
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 0.14.6
|
57
|
+
version_requirements: *14981480
|
78
58
|
- !ruby/object:Gem::Dependency
|
79
59
|
name: elzar
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirement: &14981000 !ruby/object:Gem::Requirement
|
81
61
|
none: false
|
82
62
|
requirements:
|
83
63
|
- - ~>
|
@@ -85,15 +65,10 @@ dependencies:
|
|
85
65
|
version: 0.1.0
|
86
66
|
type: :runtime
|
87
67
|
prerelease: false
|
88
|
-
version_requirements:
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ~>
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: 0.1.0
|
68
|
+
version_requirements: *14981000
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: capybara
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirement: &14980600 !ruby/object:Gem::Requirement
|
97
72
|
none: false
|
98
73
|
requirements:
|
99
74
|
- - ! '>='
|
@@ -101,31 +76,10 @@ dependencies:
|
|
101
76
|
version: '0'
|
102
77
|
type: :development
|
103
78
|
prerelease: false
|
104
|
-
version_requirements:
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ! '>='
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
name: fakefs
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
|
-
requirements:
|
115
|
-
- - ! '>='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
|
-
requirements:
|
123
|
-
- - ! '>='
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: '0'
|
79
|
+
version_requirements: *14980600
|
126
80
|
- !ruby/object:Gem::Dependency
|
127
81
|
name: guard-rspec
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
82
|
+
requirement: &14980100 !ruby/object:Gem::Requirement
|
129
83
|
none: false
|
130
84
|
requirements:
|
131
85
|
- - ! '>='
|
@@ -133,15 +87,10 @@ dependencies:
|
|
133
87
|
version: '0'
|
134
88
|
type: :development
|
135
89
|
prerelease: false
|
136
|
-
version_requirements:
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ! '>='
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '0'
|
90
|
+
version_requirements: *14980100
|
142
91
|
- !ruby/object:Gem::Dependency
|
143
92
|
name: pry
|
144
|
-
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirement: &14979660 !ruby/object:Gem::Requirement
|
145
94
|
none: false
|
146
95
|
requirements:
|
147
96
|
- - ! '>='
|
@@ -149,15 +98,10 @@ dependencies:
|
|
149
98
|
version: '0'
|
150
99
|
type: :development
|
151
100
|
prerelease: false
|
152
|
-
version_requirements:
|
153
|
-
none: false
|
154
|
-
requirements:
|
155
|
-
- - ! '>='
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '0'
|
101
|
+
version_requirements: *14979660
|
158
102
|
- !ruby/object:Gem::Dependency
|
159
103
|
name: rake
|
160
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
+
requirement: &14979140 !ruby/object:Gem::Requirement
|
161
105
|
none: false
|
162
106
|
requirements:
|
163
107
|
- - ~>
|
@@ -165,15 +109,10 @@ dependencies:
|
|
165
109
|
version: 0.9.2.2
|
166
110
|
type: :development
|
167
111
|
prerelease: false
|
168
|
-
version_requirements:
|
169
|
-
none: false
|
170
|
-
requirements:
|
171
|
-
- - ~>
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 0.9.2.2
|
112
|
+
version_requirements: *14979140
|
174
113
|
- !ruby/object:Gem::Dependency
|
175
114
|
name: rspec
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirement: &14978680 !ruby/object:Gem::Requirement
|
177
116
|
none: false
|
178
117
|
requirements:
|
179
118
|
- - ! '>='
|
@@ -181,12 +120,7 @@ dependencies:
|
|
181
120
|
version: '0'
|
182
121
|
type: :development
|
183
122
|
prerelease: false
|
184
|
-
version_requirements:
|
185
|
-
none: false
|
186
|
-
requirements:
|
187
|
-
- - ! '>='
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '0'
|
123
|
+
version_requirements: *14978680
|
190
124
|
description: A Rails 3 wrapper which forces template use and includes a plethora of
|
191
125
|
generators for standard Relevance bits.
|
192
126
|
email:
|
@@ -253,27 +187,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
253
187
|
- - ! '>='
|
254
188
|
- !ruby/object:Gem::Version
|
255
189
|
version: '0'
|
256
|
-
segments:
|
257
|
-
- 0
|
258
|
-
hash: 3573380774667230504
|
259
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
191
|
none: false
|
261
192
|
requirements:
|
262
193
|
- - ! '>='
|
263
194
|
- !ruby/object:Gem::Version
|
264
195
|
version: '0'
|
265
|
-
segments:
|
266
|
-
- 0
|
267
|
-
hash: 3573380774667230504
|
268
196
|
requirements: []
|
269
197
|
rubyforge_project:
|
270
|
-
rubygems_version: 1.8.
|
198
|
+
rubygems_version: 1.8.10
|
271
199
|
signing_key:
|
272
200
|
specification_version: 3
|
273
201
|
summary: Rails 3 Relevance style, with all infrastructure bits automated away.
|
274
|
-
test_files:
|
275
|
-
- spec/acceptance_spec.rb
|
276
|
-
- spec/elzar_recipes_spec.rb
|
277
|
-
- spec/lib/generators/provision_config/provision_config_generator_spec.rb
|
278
|
-
- spec/lib/relevance_rails/runner_spec.rb
|
279
|
-
- spec/spec_helper.rb
|
202
|
+
test_files: []
|