simple_deploy 0.7.2.beta.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/CHANGELOG.md +2 -1
- data/lib/simple_deploy/cli.rb +0 -2
- data/lib/simple_deploy/config.rb +1 -1
- data/lib/simple_deploy/version.rb +1 -1
- data/simple_deploy.gemspec +1 -0
- data/spec/config_spec.rb +9 -13
- data/spec/spec_helper.rb +1 -0
- metadata +21 -8
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/simple_deploy/cli.rb
CHANGED
data/lib/simple_deploy/config.rb
CHANGED
data/simple_deploy.gemspec
CHANGED
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
+
s.add_development_dependency "fakefs", "~> 0.4.2"
|
21
22
|
s.add_development_dependency "rake"
|
22
23
|
s.add_development_dependency "rspec", "~> 2.11.0"
|
23
24
|
|
data/spec/config_spec.rb
CHANGED
@@ -80,35 +80,31 @@ describe SimpleDeploy do
|
|
80
80
|
|
81
81
|
describe "gracefully handling yaml file errors" do
|
82
82
|
before do
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
end
|
83
|
+
FakeFS.activate!
|
84
|
+
@config_file_path = "#{ENV['HOME']}/.simple_deploy.yml"
|
85
|
+
FileUtils.mkdir_p File.dirname(@config_file_path)
|
87
86
|
end
|
88
87
|
|
89
88
|
after do
|
90
|
-
|
91
|
-
|
92
|
-
"#{ENV['HOME']}/.simple_deploy.yml")
|
93
|
-
end
|
89
|
+
FakeFS.deactivate!
|
90
|
+
FakeFS::FileSystem.clear
|
94
91
|
end
|
95
92
|
|
96
93
|
it "should handle a missing file gracefully" do
|
97
94
|
expect {
|
98
95
|
config = SimpleDeploy::Config.new
|
99
|
-
}.to raise_error(RuntimeError, "#{
|
96
|
+
}.to raise_error(RuntimeError, "#{@config_file_path} not found")
|
100
97
|
end
|
101
98
|
|
102
99
|
it "should handle a corrupt file gracefully" do
|
103
|
-
s = "
|
104
|
-
File.open(
|
100
|
+
s = "---\nport: | 80"
|
101
|
+
File.open(@config_file_path, 'w') do |out|
|
105
102
|
out.write(s)
|
106
103
|
end
|
107
104
|
|
108
105
|
expect {
|
109
106
|
config = SimpleDeploy::Config.new
|
110
|
-
}.to raise_error(RuntimeError, "#{
|
111
|
-
FileUtils.rm "#{ENV['HOME']}/.simple_deploy.yml"
|
107
|
+
}.to raise_error(RuntimeError, "#{@config_file_path} is corrupt")
|
112
108
|
end
|
113
109
|
end
|
114
110
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.2
|
5
|
-
prerelease:
|
4
|
+
version: 0.7.2
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brett Weaver
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: fakefs
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.4.2
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.4.2
|
14
30
|
- !ruby/object:Gem::Dependency
|
15
31
|
name: rake
|
16
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,15 +219,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
219
|
- - ! '>='
|
204
220
|
- !ruby/object:Gem::Version
|
205
221
|
version: '0'
|
206
|
-
segments:
|
207
|
-
- 0
|
208
|
-
hash: -1112612341836889996
|
209
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
223
|
none: false
|
211
224
|
requirements:
|
212
|
-
- - ! '
|
225
|
+
- - ! '>='
|
213
226
|
- !ruby/object:Gem::Version
|
214
|
-
version:
|
227
|
+
version: '0'
|
215
228
|
requirements: []
|
216
229
|
rubyforge_project: simple_deploy
|
217
230
|
rubygems_version: 1.8.24
|