shelly 0.0.19 → 0.0.20.pre

Sign up to get free protection for your applications and to get access to all the features.
data/lib/shelly/app.rb CHANGED
@@ -4,12 +4,8 @@ require 'launchy'
4
4
  module Shelly
5
5
  class App < Base
6
6
  DATABASE_KINDS = %w(postgresql mongodb redis none)
7
- attr_accessor :code_name, :databases, :ruby_version, :environment, :git_url, :domains
8
-
9
- def initialize
10
- @ruby_version = "MRI-1.9.2"
11
- @environment = "production"
12
- end
7
+ attr_accessor :code_name, :databases, :ruby_version, :environment,
8
+ :git_url, :domains
13
9
 
14
10
  def add_git_remote
15
11
  system("git remote rm production > /dev/null 2>&1")
@@ -18,8 +14,6 @@ module Shelly
18
14
 
19
15
  def generate_cloudfile
20
16
  @email = current_user.email
21
- @databases = databases
22
- @domains = domains
23
17
  template = File.read(cloudfile_template_path)
24
18
  cloudfile = ERB.new(template, 0, "%<>-")
25
19
  cloudfile.result(binding)
@@ -30,16 +24,12 @@ module Shelly
30
24
  end
31
25
 
32
26
  def create
33
- attributes = {
34
- :name => code_name,
35
- :code_name => code_name,
36
- :environment => environment,
37
- :ruby_version => ruby_version,
38
- :domain_name => domains ? domains.join(" ") : nil
39
- }
27
+ attributes = {:name => code_name, :code_name => code_name, :domains => domains}
40
28
  response = shelly.create_app(attributes)
41
29
  self.git_url = response["git_url"]
42
- self.domains = response["domain_name"].split if domains.nil?
30
+ self.domains = response["domains"]
31
+ self.ruby_version = response["ruby_version"]
32
+ self.environment = response["environment"]
43
33
  end
44
34
 
45
35
  def create_cloudfile
@@ -43,7 +43,7 @@ module Shelly
43
43
  say_error "Use ssh-keygen to generate ssh key pair"
44
44
  end
45
45
 
46
- desc "login [EMAIL]", "Logins user to Shelly Cloud"
46
+ desc "login [EMAIL]", "Logs user in to Shelly Cloud"
47
47
  def login(email = nil)
48
48
  user = Shelly::User.new(email || ask_for_email, ask_for_password(:with_confirmation => false))
49
49
  user.login
@@ -5,40 +5,61 @@ require "shelly/cloudfile"
5
5
  module Shelly
6
6
  module CLI
7
7
  class User < Thor
8
- namespace :users
8
+ namespace :user
9
9
  include Helpers
10
10
 
11
- desc "list", "List users who have access to current application"
11
+ desc "list", "List users with access to clouds defined in Cloudfile"
12
12
  def list
13
13
  say_error "Must be run inside your project git repository" unless App.inside_git_repository?
14
14
  say_error "No Cloudfile found" unless Cloudfile.present?
15
- @cloudfile = Shelly::Cloudfile.new
16
- @cloudfile.fetch_users.each do |app, users|
17
- say "Cloud #{app}:"
15
+ @cloudfile = check_clouds.first
16
+ @cloudfile.fetch_users.each do |cloud, users|
17
+ say "Cloud #{cloud}:"
18
18
  users.each { |user| say " #{user}" }
19
19
  end
20
20
  rescue Client::APIError => e
21
- say e.message
22
- exit 1
21
+ if e.unauthorized?
22
+ e.errors.each { |error| say_error error, :with_exit => false}
23
+ exit 1
24
+ else
25
+ say_error e.message
26
+ end
23
27
  end
24
28
 
25
- desc "add [EMAIL]", "Add new developer to applications defined in Cloudfile"
29
+ desc "add [EMAIL]", "Add new developer to clouds defined in Cloudfile"
26
30
  def add(email = nil)
27
31
  say_error "Must be run inside your project git repository" unless App.inside_git_repository?
28
32
  say_error "No Cloudfile found" unless Cloudfile.present?
33
+ @cloudfile, @user = check_clouds
29
34
  user_email = email || ask_for_email({:guess_email => false})
30
- @cloudfile = Shelly::Cloudfile.new
31
- @user = Shelly::User.new
32
- @user.send_invitation(@cloudfile.clouds, user_email)
33
- say "Sending invitation to #{user_email}"
35
+ @cloudfile.clouds.each do |cloud|
36
+ @user.send_invitation(cloud, user_email)
37
+ say "Sending invitation to #{user_email} to work on #{cloud}", :green
38
+ end
34
39
  rescue Client::APIError => e
35
40
  if e.validation?
36
41
  e.each_error { |error| say_error error =~ /already in the project/ ? error.gsub("Email", "User") : error, :with_exit => false }
37
42
  exit 1
43
+ elsif e.unauthorized?
44
+ e.errors.each { |error| say_error error, :with_exit => false}
45
+ exit 1
38
46
  end
39
47
  end
40
48
 
49
+ no_tasks do
50
+ def check_clouds
51
+ @cloudfile = Shelly::Cloudfile.new
52
+ @user = Shelly::User.new
53
+ user_apps = @user.apps.map { |cloud| cloud['code_name'] }
54
+ unless @cloudfile.clouds.all? { |cloud| user_apps.include?(cloud) }
55
+ errors = (@cloudfile.clouds - user_apps).map { |cloud| "You have no access to '#{cloud}' cloud defined in Cloudfile" }
56
+ raise Shelly::Client::APIError.new({:message => "Unauthorized",
57
+ :errors => errors}.to_json)
58
+ end
59
+ [@cloudfile, @user]
60
+ end
61
+
62
+ end
41
63
  end
42
64
  end
43
65
  end
44
-
data/lib/shelly/client.rb CHANGED
@@ -56,10 +56,8 @@ module Shelly
56
56
  get("/token")
57
57
  end
58
58
 
59
- def send_invitation(apps, email)
60
- apps.map do |app|
61
- post("/apps/#{app}/collaborations", :email => email)
62
- end
59
+ def send_invitation(cloud, email)
60
+ post("/apps/#{cloud}/collaborations", :email => email)
63
61
  end
64
62
 
65
63
  def create_app(attributes)
@@ -78,7 +76,7 @@ module Shelly
78
76
  get("/users/new", :ssh_key => ssh_key)
79
77
  end
80
78
 
81
- def app_users(apps)
79
+ def apps_users(apps)
82
80
  apps.map do |app|
83
81
  get("/apps/#{app}/users")
84
82
  end
@@ -36,7 +36,7 @@ module Shelly
36
36
  end
37
37
 
38
38
  def fetch_users
39
- response = shelly.app_users(clouds)
39
+ response = shelly.apps_users(clouds)
40
40
  response.inject({}) do |result, app|
41
41
  result[app['code_name']] = app['users'].map do |user|
42
42
  "#{user['email']} (#{user['name']})"
@@ -1,5 +1,5 @@
1
1
  <%= @code_name %>:
2
- ruby: 1.9.2 # 1.9.2 or ree
2
+ ruby_version: 1.9.2 # 1.9.2 or ree
3
3
  environment: production # RAILS_ENV
4
4
  monitoring_email:
5
5
  - <%= @email %>
data/lib/shelly/user.rb CHANGED
@@ -29,8 +29,8 @@ module Shelly
29
29
  shelly.token["token"]
30
30
  end
31
31
 
32
- def send_invitation(apps, email)
33
- shelly.send_invitation(apps, email)
32
+ def send_invitation(cloud, email)
33
+ shelly.send_invitation(cloud, email)
34
34
  end
35
35
 
36
36
  def load_credentials
@@ -1,3 +1,3 @@
1
1
  module Shelly
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20.pre"
3
3
  end
@@ -11,16 +11,6 @@ describe Shelly::App do
11
11
  @app.code_name = "foo-staging"
12
12
  end
13
13
 
14
- describe "being initialized" do
15
- it "should have default ruby_version: MRI-1.9.2" do
16
- @app.ruby_version.should == "MRI-1.9.2"
17
- end
18
-
19
- it "should have default environment: production" do
20
- @app.environment.should == "production"
21
- end
22
- end
23
-
24
14
  describe ".guess_code_name" do
25
15
  it "should return name of current working directory" do
26
16
  Shelly::App.guess_code_name.should == "foo"
@@ -60,7 +50,7 @@ describe Shelly::App do
60
50
  FakeFS.deactivate!
61
51
  expected = <<-config
62
52
  foo-staging:
63
- ruby: 1.9.2 # 1.9.2 or ree
53
+ ruby_version: 1.9.2 # 1.9.2 or ree
64
54
  environment: production # RAILS_ENV
65
55
  monitoring_email:
66
56
  - bob@example.com
@@ -127,21 +117,21 @@ config
127
117
  attributes = {
128
118
  :code_name => "fooo",
129
119
  :name => "fooo",
130
- :environment => "production",
131
- :ruby_version => "MRI-1.9.2",
132
- :domain_name => nil
120
+ :domains => nil
133
121
  }
134
122
  @client.should_receive(:create_app).with(attributes).and_return("git_url" => "git@git.shellycloud.com:fooo.git",
135
- "domain_name" => "fooo.shellyapp.com")
123
+ "domains" => %w(fooo.shellyapp.com))
136
124
  @app.create
137
125
  end
138
126
 
139
- it "should assign returned git_url and domain" do
127
+ it "should assign returned git_url, domains, ruby_version and environment" do
140
128
  @client.stub(:create_app).and_return("git_url" => "git@git.example.com:fooo.git",
141
- "domain_name" => "fooo.shellyapp.com")
129
+ "domains" => ["fooo.shellyapp.com"], "ruby_version" => "1.9.2", "environment" => "production")
142
130
  @app.create
143
131
  @app.git_url.should == "git@git.example.com:fooo.git"
144
132
  @app.domains.should == ["fooo.shellyapp.com"]
133
+ @app.ruby_version.should == "1.9.2"
134
+ @app.environment.should == "production"
145
135
  end
146
136
  end
147
137
 
@@ -152,20 +142,18 @@ config
152
142
  attributes = {
153
143
  :code_name => "boo",
154
144
  :name => "boo",
155
- :environment => "production",
156
- :ruby_version => "MRI-1.9.2",
157
- :domain_name => "boo.shellyapp.com boo.example.com"
145
+ :domains => %w(boo.shellyapp.com boo.example.com)
158
146
  }
159
147
  @client.should_receive(:create_app).with(attributes).and_return("git_url" => "git@git.shellycloud.com:fooo.git",
160
- "domain_name" => "boo.shellyapp.com boo.example.com")
148
+ "domains" => %w(boo.shellyapp.com boo.example.com))
161
149
  @app.create
162
150
  end
163
151
 
164
152
  it "should assign returned git_url and domain" do
165
153
  @client.stub(:create_app).and_return("git_url" => "git@git.example.com:fooo.git",
166
- "domain_name" => "boo.shellyapp.com boo.example.com")
154
+ "domains" => %w(boo.shellyapp.com boo.example.com))
167
155
  @app.create
168
- @app.domains.should == ["boo.shellyapp.com", "boo.example.com"]
156
+ @app.domains.should == %w(boo.shellyapp.com boo.example.com)
169
157
  end
170
158
  end
171
159
  end
@@ -25,7 +25,7 @@ describe Shelly::CLI::Main do
25
25
  Tasks:
26
26
  shelly add # Adds new application to Shelly Cloud
27
27
  shelly help [TASK] # Describe available tasks or one specific task
28
- shelly login [EMAIL] # Logins user to Shelly Cloud
28
+ shelly login [EMAIL] # Logs user in to Shelly Cloud
29
29
  shelly register [EMAIL] # Registers new user account on Shelly Cloud
30
30
  shelly user <command> # Manages users using this app
31
31
  shelly version # Displays shelly version
@@ -4,7 +4,7 @@ require "shelly/cli/user"
4
4
  describe Shelly::CLI::User do
5
5
  before do
6
6
  FileUtils.stub(:chmod)
7
- @users = Shelly::CLI::User.new
7
+ @cli_user = Shelly::CLI::User.new
8
8
  @client = mock
9
9
  Shelly::Client.stub(:new).and_return(@client)
10
10
  Shelly::User.stub(:guess_email).and_return("")
@@ -15,9 +15,9 @@ describe Shelly::CLI::User do
15
15
  describe "#help" do
16
16
  it "should show help" do
17
17
  $stdout.should_receive(:puts).with("Tasks:")
18
- $stdout.should_receive(:puts).with(/add \[EMAIL\]\s+# Add new developer to applications defined in Cloudfile/)
19
- $stdout.should_receive(:puts).with(/list\s+# List users who have access to current application/)
20
- @users.help
18
+ $stdout.should_receive(:puts).with(/add \[EMAIL\]\s+# Add new developer to clouds defined in Cloudfile/)
19
+ $stdout.should_receive(:puts).with(/list\s+# List users with access to clouds defined in Cloudfile/)
20
+ @cli_user.help
21
21
  end
22
22
  end
23
23
 
@@ -33,7 +33,7 @@ describe Shelly::CLI::User do
33
33
  Shelly::App.stub(:inside_git_repository?).and_return(false)
34
34
  $stdout.should_receive(:puts).with("\e[31mMust be run inside your project git repository\e[0m")
35
35
  lambda {
36
- @users.list
36
+ @cli_user.list
37
37
  }.should raise_error(SystemExit)
38
38
  end
39
39
 
@@ -41,39 +41,39 @@ describe Shelly::CLI::User do
41
41
  File.delete("Cloudfile")
42
42
  $stdout.should_receive(:puts).with("\e[31mNo Cloudfile found\e[0m")
43
43
  lambda {
44
- @users.list
44
+ @cli_user.list
45
45
  }.should raise_error(SystemExit)
46
46
  end
47
47
 
48
48
  context "on success" do
49
49
  it "should receive clouds from the Cloudfile" do
50
- @client.should_receive(:app_users).with(["foo-production", "foo-staging"]).
51
- and_return(response)
52
- @users.list
50
+ @client.should_receive(:apps).and_return([{"code_name" => "foo-production"}, {"code_name" => "foo-staging"}])
51
+ @client.should_receive(:apps_users).and_return(response)
52
+ @cli_user.list
53
53
  end
54
54
 
55
55
  it "should display clouds and users" do
56
- @client.stub(:app_users).and_return(response)
57
- $stdout.should_receive(:puts).with("Cloud foo-staging:")
58
- $stdout.should_receive(:puts).with(" user@example.com (username)")
56
+ @client.should_receive(:apps).and_return([{"code_name" => "foo-production"}, {"code_name" => "foo-staging"}])
57
+ @client.stub(:apps_users).and_return(response)
59
58
  $stdout.should_receive(:puts).with("Cloud foo-production:")
59
+ $stdout.should_receive(:puts).with(" user@example.com (username)")
60
+ $stdout.should_receive(:puts).with("Cloud foo-staging:")
60
61
  $stdout.should_receive(:puts).with(" user2@example.com (username2)")
61
- @users.list
62
+ @cli_user.list
62
63
  end
63
64
  end
64
65
 
65
66
  def response
66
- [{'code_name' => 'foo-staging','users' => [{'name' => 'username','email' => 'user@example.com'}]},
67
- {'code_name' => 'foo-production','users' => [{'name' => 'username2','email' => 'user2@example.com'}]}]
67
+ [{'code_name' => 'foo-production', 'users' => [{'name' => 'username','email' => 'user@example.com'}]},
68
+ {'code_name' => 'foo-staging', 'users' => [{'name' => 'username2','email' => 'user2@example.com'}]}]
68
69
  end
69
70
 
70
71
  context "on failure" do
71
- it "should raise an error if user does not have access to any app" do
72
- response = {"message" => "You do not have access to this app"}
73
- exception = Shelly::Client::APIError.new(response.to_json)
74
- @client.stub(:app_users).and_raise(exception)
75
- $stdout.should_receive(:puts).with("You do not have access to this app")
76
- lambda { @users.list }.should raise_error(SystemExit)
72
+ it "should raise an error if user does not have access to cloud" do
73
+ @client.should_receive(:apps).and_return([{"code_name" => "foo-production"}])
74
+ @client.stub(:apps_users).and_return(response)
75
+ $stdout.should_receive(:puts).with("\e[31mYou have no access to 'foo-staging' cloud defined in Cloudfile\e[0m")
76
+ lambda { @cli_user.list }.should raise_error(SystemExit)
77
77
  end
78
78
  end
79
79
  end
@@ -94,7 +94,7 @@ describe Shelly::CLI::User do
94
94
  File.delete("Cloudfile")
95
95
  $stdout.should_receive(:puts).with("\e[31mNo Cloudfile found\e[0m")
96
96
  lambda {
97
- @users.list
97
+ @cli_user.list
98
98
  }.should raise_error(SystemExit)
99
99
  end
100
100
 
@@ -102,32 +102,39 @@ describe Shelly::CLI::User do
102
102
  Shelly::App.stub(:inside_git_repository?).and_return(false)
103
103
  $stdout.should_receive(:puts).with("\e[31mMust be run inside your project git repository\e[0m")
104
104
  lambda {
105
- @users.add
105
+ @cli_user.add
106
106
  }.should raise_error(SystemExit)
107
107
  end
108
108
 
109
109
  context "on success" do
110
110
  before do
111
- @client.should_receive(:send_invitation).with(["foo-production", "foo-staging"], "megan@example.com")
111
+ @client.should_receive(:send_invitation).with("foo-production", "megan@example.com")
112
+ @client.should_receive(:send_invitation).with("foo-staging", "megan@example.com")
113
+ @client.should_receive(:apps).and_return([{"code_name" => "foo-production"}, {"code_name" => "foo-staging"}])
112
114
  end
113
115
 
114
116
  it "should ask about email" do
115
117
  fake_stdin(["megan@example.com"]) do
116
- @users.add
118
+ @cli_user.add
117
119
  end
118
120
  end
119
121
 
120
122
  it "should receive clouds from the Cloudfile" do
121
- @users.add("megan@example.com")
123
+ @cli_user.add("megan@example.com")
122
124
  end
123
125
 
124
126
  it "should receive clouds from the Cloudfile" do
125
- $stdout.should_receive(:puts).with("Sending invitation to megan@example.com")
126
- @users.add("megan@example.com")
127
+ $stdout.should_receive(:puts).with("\e[32mSending invitation to megan@example.com to work on foo-production\e[0m")
128
+ @cli_user.add("megan@example.com")
127
129
  end
128
130
  end
129
131
 
132
+ context "on failure" do
133
+ it "should raise error if user doesnt have access to cloud" do
134
+ @client.should_receive(:apps).and_return([{"code_name" => "foo-production"}])
135
+ $stdout.should_receive(:puts).with("\e[31mYou have no access to 'foo-staging' cloud defined in Cloudfile\e[0m")
136
+ lambda { @cli_user.add("megan@example.com") }.should raise_error(SystemExit)
137
+ end
138
+ end
130
139
  end
131
-
132
140
  end
133
-
@@ -111,9 +111,8 @@ describe Shelly::Client do
111
111
  it "should send post with app code_names" do
112
112
  FakeWeb.register_uri(:get, @url + "/apps/staging-foo/users", :body => {:code_name => "staging-foo"}.to_json)
113
113
  FakeWeb.register_uri(:get, @url + "/apps/production-foo/users", :body => {:code_name => "production-foo"}.to_json)
114
- response = @client.app_users(["staging-foo", "production-foo"])
115
- response.should == [{"code_name" => "staging-foo"},
116
- {"code_name" => "production-foo"}]
114
+ response = @client.apps_users(["staging-foo", "production-foo"])
115
+ response.should == [{"code_name" => "staging-foo"}, {"code_name" => "production-foo"}]
117
116
  end
118
117
  end
119
118
 
@@ -121,8 +120,8 @@ describe Shelly::Client do
121
120
  it "should send post with developer's email" do
122
121
  FakeWeb.register_uri(:post, @url + "/apps/staging-foo/collaborations", :body => {}.to_json)
123
122
  FakeWeb.register_uri(:post, @url + "/apps/production-foo/collaborations", :body => {}.to_json)
124
- response = @client.send_invitation(["staging-foo", "production-foo"], "megan@example.com")
125
- response.should == [{}, {}]
123
+ response = @client.send_invitation("staging-foo", "megan@example.com")
124
+ response.should == {}
126
125
  end
127
126
  end
128
127
 
@@ -16,7 +16,7 @@ describe Shelly::Cloudfile do
16
16
  @cloudfile.yaml(@hash).should == "code_name:\n code: test"
17
17
  end
18
18
 
19
- it "should conver a hash to yaml format" do
19
+ it "should convert a hash to yaml format" do
20
20
  @cloudfile.write(@hash)
21
21
  @cloudfile.open.should == {"code_name" => {"code" => "test"}}
22
22
  end
@@ -25,7 +25,7 @@ describe Shelly::Cloudfile do
25
25
  describe "#fetch_users" do
26
26
  it "should return array to display with clouds and users" do
27
27
  @cloudfile.write(@hash)
28
- @client.should_receive(:app_users).and_return(response)
28
+ @client.should_receive(:apps_users).and_return(response)
29
29
  response = @cloudfile.fetch_users
30
30
  response.should == {"foo-staging" => ["user@example.com (username)"]}
31
31
  end
@@ -94,8 +94,8 @@ describe Shelly::User do
94
94
 
95
95
  describe "#send_invitation" do
96
96
  it "should send invitation" do
97
- @client.should_receive(:send_invitation).with(["foo-staging"], "megan@example.com")
98
- @user.send_invitation(["foo-staging"], "megan@example.com")
97
+ @client.should_receive(:send_invitation).with("foo-staging", "megan@example.com")
98
+ @user.send_invitation("foo-staging", "megan@example.com")
99
99
  end
100
100
  end
101
101
 
data/spec/spec_helper.rb CHANGED
@@ -5,6 +5,7 @@ require "input_faker"
5
5
  require "fakefs/spec_helpers"
6
6
  require "fakeweb"
7
7
 
8
+ ENV['THOR_COLUMNS'] = "180"
8
9
  FakeWeb.allow_net_connect = false
9
10
 
10
11
  RSpec.configure do |config|
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+ require 'thor/parser'
3
+
4
+ describe Thor::Options do
5
+ def create(opts, defaults={})
6
+ opts.each do |key, value|
7
+ opts[key] = Thor::Option.parse(key, value) unless value.is_a?(Thor::Option)
8
+ end
9
+ @opt = Thor::Options.new(opts, defaults)
10
+ end
11
+
12
+ def parse(*args)
13
+ @opt.parse(args.flatten)
14
+ end
15
+
16
+ describe "#parse" do
17
+ describe "with :array type" do
18
+ it "accepts a switch=<value> assignment, where value is a set of paramters split by comma or spaces" do
19
+ create "--attributes" => :array
20
+ parse("--attributes=a,b", "c, d", "e , f")["attributes"].should == ["a", "b", "c", "d", "e", "f"]
21
+ end
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -1,200 +1,156 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: shelly
3
- version: !ruby/object:Gem::Version
4
- hash: 57
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 19
10
- version: 0.0.19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.20.pre
5
+ prerelease: 7
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Shelly Cloud team
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-11-14 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2011-11-16 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2155914700 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :development
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rake
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2155914700
25
+ - !ruby/object:Gem::Dependency
26
+ name: rake
27
+ requirement: &2155914060 !ruby/object:Gem::Requirement
38
28
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
46
33
  type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: guard
50
34
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2155914060
36
+ - !ruby/object:Gem::Dependency
37
+ name: guard
38
+ requirement: &2155913200 !ruby/object:Gem::Requirement
52
39
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
60
44
  type: :development
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: guard-rspec
64
45
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *2155913200
47
+ - !ruby/object:Gem::Dependency
48
+ name: guard-rspec
49
+ requirement: &2155912580 !ruby/object:Gem::Requirement
66
50
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
74
55
  type: :development
75
- version_requirements: *id004
76
- - !ruby/object:Gem::Dependency
77
- name: growl_notify
78
56
  prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *2155912580
58
+ - !ruby/object:Gem::Dependency
59
+ name: growl_notify
60
+ requirement: &2155911840 !ruby/object:Gem::Requirement
80
61
  none: false
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- hash: 3
85
- segments:
86
- - 0
87
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
88
66
  type: :development
89
- version_requirements: *id005
90
- - !ruby/object:Gem::Dependency
91
- name: rb-fsevent
92
67
  prerelease: false
93
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *2155911840
69
+ - !ruby/object:Gem::Dependency
70
+ name: rb-fsevent
71
+ requirement: &2155911160 !ruby/object:Gem::Requirement
94
72
  none: false
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- hash: 3
99
- segments:
100
- - 0
101
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
102
77
  type: :development
103
- version_requirements: *id006
104
- - !ruby/object:Gem::Dependency
105
- name: fakefs
106
78
  prerelease: false
107
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *2155911160
80
+ - !ruby/object:Gem::Dependency
81
+ name: fakefs
82
+ requirement: &2155910340 !ruby/object:Gem::Requirement
108
83
  none: false
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- hash: 3
113
- segments:
114
- - 0
115
- version: "0"
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
116
88
  type: :development
117
- version_requirements: *id007
118
- - !ruby/object:Gem::Dependency
119
- name: fakeweb
120
89
  prerelease: false
121
- requirement: &id008 !ruby/object:Gem::Requirement
90
+ version_requirements: *2155910340
91
+ - !ruby/object:Gem::Dependency
92
+ name: fakeweb
93
+ requirement: &2155909460 !ruby/object:Gem::Requirement
122
94
  none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
128
- - 0
129
- version: "0"
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
130
99
  type: :development
131
- version_requirements: *id008
132
- - !ruby/object:Gem::Dependency
133
- name: thor
134
100
  prerelease: false
135
- requirement: &id009 !ruby/object:Gem::Requirement
101
+ version_requirements: *2155909460
102
+ - !ruby/object:Gem::Dependency
103
+ name: thor
104
+ requirement: &2155894380 !ruby/object:Gem::Requirement
136
105
  none: false
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- hash: 3
141
- segments:
142
- - 0
143
- version: "0"
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
144
110
  type: :runtime
145
- version_requirements: *id009
146
- - !ruby/object:Gem::Dependency
147
- name: rest-client
148
111
  prerelease: false
149
- requirement: &id010 !ruby/object:Gem::Requirement
112
+ version_requirements: *2155894380
113
+ - !ruby/object:Gem::Dependency
114
+ name: rest-client
115
+ requirement: &2155893340 !ruby/object:Gem::Requirement
150
116
  none: false
151
- requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- hash: 3
155
- segments:
156
- - 0
157
- version: "0"
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
158
121
  type: :runtime
159
- version_requirements: *id010
160
- - !ruby/object:Gem::Dependency
161
- name: json
162
122
  prerelease: false
163
- requirement: &id011 !ruby/object:Gem::Requirement
123
+ version_requirements: *2155893340
124
+ - !ruby/object:Gem::Dependency
125
+ name: json
126
+ requirement: &2155892380 !ruby/object:Gem::Requirement
164
127
  none: false
165
- requirements:
166
- - - ">="
167
- - !ruby/object:Gem::Version
168
- hash: 3
169
- segments:
170
- - 0
171
- version: "0"
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
172
132
  type: :runtime
173
- version_requirements: *id011
174
- - !ruby/object:Gem::Dependency
175
- name: launchy
176
133
  prerelease: false
177
- requirement: &id012 !ruby/object:Gem::Requirement
134
+ version_requirements: *2155892380
135
+ - !ruby/object:Gem::Dependency
136
+ name: launchy
137
+ requirement: &2155891620 !ruby/object:Gem::Requirement
178
138
  none: false
179
- requirements:
180
- - - ">="
181
- - !ruby/object:Gem::Version
182
- hash: 3
183
- segments:
184
- - 0
185
- version: "0"
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
186
143
  type: :runtime
187
- version_requirements: *id012
144
+ prerelease: false
145
+ version_requirements: *2155891620
188
146
  description: Tool for managing applications and clouds at shellycloud.com
189
- email:
147
+ email:
190
148
  - support@shellycloud.com
191
- executables:
149
+ executables:
192
150
  - shelly
193
151
  extensions: []
194
-
195
152
  extra_rdoc_files: []
196
-
197
- files:
153
+ files:
198
154
  - .gitignore
199
155
  - .travis.yml
200
156
  - Gemfile
@@ -228,40 +184,32 @@ files:
228
184
  - spec/shelly/cloudfile_spec.rb
229
185
  - spec/shelly/user_spec.rb
230
186
  - spec/spec_helper.rb
187
+ - spec/thor/options_spec.rb
231
188
  homepage: http://shellycloud.com
232
189
  licenses: []
233
-
234
190
  post_install_message:
235
191
  rdoc_options: []
236
-
237
- require_paths:
192
+ require_paths:
238
193
  - lib
239
- required_ruby_version: !ruby/object:Gem::Requirement
194
+ required_ruby_version: !ruby/object:Gem::Requirement
240
195
  none: false
241
- requirements:
242
- - - ">="
243
- - !ruby/object:Gem::Version
244
- hash: 3
245
- segments:
246
- - 0
247
- version: "0"
248
- required_rubygems_version: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ! '>='
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ required_rubygems_version: !ruby/object:Gem::Requirement
249
201
  none: false
250
- requirements:
251
- - - ">="
252
- - !ruby/object:Gem::Version
253
- hash: 3
254
- segments:
255
- - 0
256
- version: "0"
202
+ requirements:
203
+ - - ! '>'
204
+ - !ruby/object:Gem::Version
205
+ version: 1.3.1
257
206
  requirements: []
258
-
259
207
  rubyforge_project: shelly
260
208
  rubygems_version: 1.8.10
261
209
  signing_key:
262
210
  specification_version: 3
263
211
  summary: Shelly Cloud command line tool
264
- test_files:
212
+ test_files:
265
213
  - spec/helpers.rb
266
214
  - spec/input_faker.rb
267
215
  - spec/shelly/app_spec.rb
@@ -272,3 +220,4 @@ test_files:
272
220
  - spec/shelly/cloudfile_spec.rb
273
221
  - spec/shelly/user_spec.rb
274
222
  - spec/spec_helper.rb
223
+ - spec/thor/options_spec.rb