shelly 0.5.5 → 0.5.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83e74344b4c23aff3f2f79ef0bd82fa18a29ecba
4
- data.tar.gz: d3209d7422dacfb73880d9decae3e1a33842787b
3
+ metadata.gz: dd192bdbee3cd98e33fbd2e78a851b8d0cac5128
4
+ data.tar.gz: d3761b36a486e6cfd94a29e16761bcd0e4e36d14
5
5
  SHA512:
6
- metadata.gz: 28dadb4647b9a14dc80e719c140cdbdd93c1eeb17f41df8918bdc6cc99fc0ce2c261432df172daa34089e9bcb38c3b945aa1b467a8f9040bdf9d34015faa5e3d
7
- data.tar.gz: 65bbeb3801cf0ca8cbff4bd213718a811ebccd8a9fee33e890ea83deda24b891738433d4feeb3078ac9baa0ee66d8bd2eb4506f9467679a0ce7012c9da236e0c
6
+ metadata.gz: 3c511a51af3df6bb06929b837b24bbc9a161f3e7922349553b34bc4a7d15ab896f0f3bb4f80224bd340d3cbebf068ff80f352fcf9dfdc28b94f0e53efda93cab
7
+ data.tar.gz: b4b29d932dd5ac3cca8d6db3410e1e6e82872370f4f0908d1ee24334b64f54571886dd1cf0fcada45f787690497ac25a6b8ec66314f7653f8ca5af54ace772cb
@@ -1,3 +1,8 @@
1
+ ## 0.5.6 / 2015-08-31
2
+
3
+ * [improvement] shelly rake accepts rake arguments and properly escapes whitespaces
4
+ * [bugfix] Display proper error for shelly files commands depending on resource
5
+
1
6
  ## 0.5.5 / 2015-03-16
2
7
 
3
8
  * [improvement] Do not list supported Ruby versions in Cloudfile
@@ -220,7 +225,7 @@
220
225
 
221
226
  ## 0.4.7 / 2013-10-18
222
227
 
223
- * [feature] Mange SSL certificate with `shelly cert`
228
+ * [feature] Manage SSL certificate with `shelly cert`
224
229
 
225
230
  ## 0.4.6 / 2013-10-01
226
231
 
@@ -238,7 +238,7 @@ module Shelly
238
238
  end
239
239
 
240
240
  def rake(task, server = nil)
241
- ssh(:command => "rake_runner \"#{task}\"", :server => server)
241
+ ssh(:command => "rake_runner '#{task.inspect}'", :server => server)
242
242
  end
243
243
 
244
244
  def dbconsole
@@ -15,6 +15,7 @@ module Shelly
15
15
  app = multiple_clouds(options[:cloud], "file list #{path}")
16
16
  app.list_files(path)
17
17
  rescue Client::NotFoundException => e
18
+ raise unless e.resource == :virtual_server
18
19
  say_error e["message"]
19
20
  rescue Client::ConflictException
20
21
  say_error "Cloud #{app} wasn't deployed properly. Cannot list files."
@@ -25,6 +26,7 @@ module Shelly
25
26
  app = multiple_clouds(options[:cloud], "file upload #{source} #{destination}")
26
27
  app.upload(source, destination)
27
28
  rescue Client::NotFoundException => e
29
+ raise unless e.resource == :virtual_server
28
30
  say_error e["message"]
29
31
  rescue Client::ConflictException
30
32
  say_error "Cloud #{app} wasn't deployed properly. Cannot upload files."
@@ -40,6 +42,7 @@ module Shelly
40
42
  app = multiple_clouds(options[:cloud], "file download #{relative_source} #{destination}")
41
43
  app.download(relative_source, destination)
42
44
  rescue Client::NotFoundException => e
45
+ raise unless e.resource == :virtual_server
43
46
  say_error e["message"]
44
47
  rescue Client::ConflictException
45
48
  say_error "Cloud #{app} wasn't deployed properly. Cannot download files."
@@ -58,6 +61,7 @@ module Shelly
58
61
 
59
62
  app.delete_file(path)
60
63
  rescue Client::NotFoundException => e
64
+ raise unless e.resource == :virtual_server
61
65
  say_error e["message"]
62
66
  rescue Client::ConflictException
63
67
  say_error "Cloud #{app} wasn't deployed properly. Cannot delete files."
@@ -27,7 +27,7 @@ module Shelly
27
27
  register_subcommand(Organization, "organization", "organization <command>", "View organizations")
28
28
  register_subcommand(Logs, "log", "logs <command>", "View application logs")
29
29
  register_subcommand(Endpoint, "endpoint", "endpoint <command>", "Manage application HTTP(S) endpoints")
30
- register_subcommand(Maintenance, "maintenance", "maintenance <command>", "Mange application maintenance events")
30
+ register_subcommand(Maintenance, "maintenance", "maintenance <command>", "Manage application maintenance events")
31
31
 
32
32
  check_unknown_options!(:except => :rake)
33
33
 
@@ -1,3 +1,3 @@
1
1
  module Shelly
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
@@ -426,7 +426,7 @@ describe Shelly::App do
426
426
  it "should return result of rake task" do
427
427
  @client.stub(:tunnel).and_return(
428
428
  {"host" => "console.example.com", "port" => "40010", "user" => "foo"})
429
- @app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com rake_runner \"test\"")
429
+ @app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com rake_runner '\"test\"'")
430
430
  @app.rake("test")
431
431
  end
432
432
 
@@ -41,7 +41,7 @@ describe Shelly::CLI::File do
41
41
  it "should display error" do
42
42
  @app.stub(:attributes => {"system_user" => "system_user"})
43
43
  exception = Shelly::Client::NotFoundException.
44
- new({"message" => "Virtual server not found or not configured"})
44
+ new(not_found_response)
45
45
  @client.stub(:tunnel).and_raise(exception)
46
46
  $stdout.should_receive(:puts).
47
47
  with(red "Virtual server not found or not configured")
@@ -84,7 +84,7 @@ describe Shelly::CLI::File do
84
84
  context "when cloud is not deployed" do
85
85
  it "should display error" do
86
86
  exception = Shelly::Client::NotFoundException.
87
- new({"message" => "Virtual server not found or not configured"})
87
+ new(not_found_response)
88
88
  @client.stub(:tunnel).and_raise(exception)
89
89
  $stdout.should_receive(:puts).
90
90
  with(red "Virtual server not found or not configured")
@@ -126,7 +126,7 @@ describe Shelly::CLI::File do
126
126
  context "when cloud is not deployed" do
127
127
  it "should display error" do
128
128
  exception = Shelly::Client::NotFoundException.
129
- new({"message" => "Virtual server not found or not configured"})
129
+ new(not_found_response)
130
130
  @client.stub(:tunnel).and_raise(exception)
131
131
  $stdout.should_receive(:puts).
132
132
  with(red "Virtual server not found or not configured")
@@ -194,7 +194,7 @@ describe Shelly::CLI::File do
194
194
  context "when cloud is not deployed" do
195
195
  it "should display error" do
196
196
  exception = Shelly::Client::NotFoundException.
197
- new({"message" => "Virtual server not found or not configured"})
197
+ new(not_found_response)
198
198
  @app.stub(:delete_file).and_raise(exception)
199
199
  $stdout.should_receive(:puts).
200
200
  with(red "Virtual server not found or not configured")
@@ -204,4 +204,11 @@ describe Shelly::CLI::File do
204
204
  end
205
205
  end
206
206
  end
207
+
208
+ def not_found_response
209
+ {
210
+ "message" => "Virtual server not found or not configured",
211
+ "resource" => :virtual_server
212
+ }
213
+ end
207
214
  end
@@ -47,7 +47,7 @@ describe Shelly::CLI::Main do
47
47
  out.should include("shelly login [EMAIL] # Log into Shelly Cloud")
48
48
  out.should include("shelly logout # Logout from Shelly Cloud")
49
49
  out.should include("shelly logs <command> # View application logs")
50
- out.should include("shelly maintenance <command> # Mange application maintenance events")
50
+ out.should include("shelly maintenance <command> # Manage application maintenance events")
51
51
  out.should include("shelly mongoconsole # Run MongoDB console")
52
52
  out.should include("shelly open # Open application page in browser")
53
53
  out.should include("shelly organization <command> # View organizations")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shelly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shelly Cloud team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-16 00:00:00.000000000 Z
11
+ date: 2015-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  version: '0'
360
360
  requirements: []
361
361
  rubyforge_project: shelly
362
- rubygems_version: 2.4.6
362
+ rubygems_version: 2.4.3
363
363
  signing_key:
364
364
  specification_version: 4
365
365
  summary: Shelly Cloud command line tool
@@ -392,4 +392,3 @@ test_files:
392
392
  - spec/shelly/user_spec.rb
393
393
  - spec/spec_helper.rb
394
394
  - spec/thor/options_spec.rb
395
- has_rdoc: