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 CHANGED
@@ -1,4 +1,5 @@
1
1
  rvm:
2
2
  - 1.9.2
3
3
  - 1.9.3
4
+ - 2.0.0
4
5
  script: "rake spec"
data/CHANGELOG.md CHANGED
@@ -1,7 +1,8 @@
1
1
  ## head:
2
2
 
3
- ## v0.7.2.beta.1:
3
+ ## v0.7.2 (03/20/2013):
4
4
 
5
+ * Fix issue when trying to use ssh command (fixes #172)
5
6
  * Upgrade to stackster 0.4.4 to address issue with getting instances
6
7
  * Modified backoff to help prevent exceeding API limits
7
8
 
@@ -59,8 +59,6 @@ module SimpleDeploy
59
59
  CLI::Status.new.show
60
60
  when 'template'
61
61
  CLI::Template.new.show
62
- when 'ssh'
63
- CLI::SSH.new.show
64
62
  when 'update'
65
63
  CLI::Update.new.update
66
64
  when '-h'
@@ -54,7 +54,7 @@ module SimpleDeploy
54
54
  YAML::load( File.open( config_file ) )
55
55
  rescue Errno::ENOENT
56
56
  raise "#{config_file} not found"
57
- rescue Psych::SyntaxError => e
57
+ rescue ArgumentError, Psych::SyntaxError => e
58
58
  raise "#{config_file} is corrupt"
59
59
  end
60
60
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleDeploy
2
- VERSION = "0.7.2.beta.1"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -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
- if File.exists? "#{ENV['HOME']}/.simple_deploy.yml"
84
- FileUtils.mv("#{ENV['HOME']}/.simple_deploy.yml",
85
- "#{ENV['HOME']}/.simple_deploy.yml.bak")
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
- if File.exists? "#{ENV['HOME']}/.simple_deploy.yml.bak"
91
- FileUtils.mv("#{ENV['HOME']}/.simple_deploy.yml.bak",
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, "#{ENV['HOME']}/.simple_deploy.yml not found")
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 = "--\nport:\t80\t80"
104
- File.open("#{ENV['HOME']}/.simple_deploy.yml", 'w') do |out|
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, "#{ENV['HOME']}/.simple_deploy.yml is corrupt")
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
@@ -1,5 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'bundler/setup'
3
+ require 'fakefs/safe'
3
4
 
4
5
  require 'simple_deploy'
5
6
 
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.beta.1
5
- prerelease: 6
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-20 00:00:00.000000000 Z
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: 1.3.1
227
+ version: '0'
215
228
  requirements: []
216
229
  rubyforge_project: simple_deploy
217
230
  rubygems_version: 1.8.24