shelly 0.1.6 → 0.1.7

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.
@@ -26,6 +26,7 @@ describe Shelly::CLI::Main do
26
26
  Tasks:
27
27
  shelly add # Add a new cloud
28
28
  shelly backup <command> # Manage database backups
29
+ shelly check # List all requirements and check which are fulfilled
29
30
  shelly config <command> # Manage application configuration files
30
31
  shelly console # Open application console
31
32
  shelly delete # Delete the cloud
@@ -277,7 +278,7 @@ OUT
277
278
  @app = Shelly::App.new
278
279
  @app.stub(:add_git_remote)
279
280
  @app.stub(:create)
280
- @app.stub(:generate_cloudfile).and_return("Example Cloudfile")
281
+ @app.stub(:create_cloudfile)
281
282
  @app.stub(:git_url).and_return("git@git.shellycloud.com:foooo.git")
282
283
  Shelly::App.stub(:inside_git_repository?).and_return(true)
283
284
  Shelly::App.stub(:new).and_return(@app)
@@ -470,11 +471,8 @@ OUT
470
471
  end
471
472
 
472
473
  it "should create Cloudfile" do
473
- File.exists?("/projects/foo/Cloudfile").should be_false
474
- fake_stdin(["foooo", ""]) do
475
- invoke(@main, :add)
476
- end
477
- File.read("/projects/foo/Cloudfile").should == "Example Cloudfile"
474
+ @app.should_receive(:create_cloudfile)
475
+ fake_stdin(["foooo", ""]) { invoke(@main, :add) }
478
476
  end
479
477
 
480
478
  it "should display info about adding Cloudfile to repository" do
@@ -741,6 +739,12 @@ We have been notified about it. We will be adding new resources shortly")
741
739
  @app = Shelly::App.new("foo-production")
742
740
  @main.stub(:logged_in?).and_return(true)
743
741
  @app.stub(:attributes).and_return(response)
742
+ @statistics = [{"name" => "app1",
743
+ "memory" => {"kilobyte" => "276756", "percent" => "74.1"},
744
+ "swap" => {"kilobyte" => "44332", "percent" => "2.8"},
745
+ "cpu" => {"wait" => "0.8", "system" => "0.0", "user" => "0.1"},
746
+ "load" => {"avg15" => "0.13", "avg05" => "0.15", "avg01" => "0.04"}}]
747
+ @app.stub(:statistics).and_return(@statistics)
744
748
  end
745
749
 
746
750
  it "should ensure user has logged in" do
@@ -764,6 +768,10 @@ We have been notified about it. We will be adding new resources shortly")
764
768
  $stdout.should_receive(:puts).with(" Repository URL: git@winniecloud.net:example-cloud")
765
769
  $stdout.should_receive(:puts).with(" Web server IP: 22.22.22.22")
766
770
  $stdout.should_receive(:puts).with(" Mail server IP: 11.11.11.11")
771
+ $stdout.should_receive(:puts).with(" Statistics:")
772
+ $stdout.should_receive(:puts).with(" app1:")
773
+ $stdout.should_receive(:puts).with(" Load average: 1m: 0.04, 5m: 0.15, 15m: 0.13")
774
+ $stdout.should_receive(:puts).with(" CPU: 0.8%, MEM: 74.1%, SWAP: 2.8%")
767
775
  invoke(@main, :info)
768
776
  end
769
777
 
@@ -779,6 +787,10 @@ We have been notified about it. We will be adding new resources shortly")
779
787
  $stdout.should_receive(:puts).with(" Repository URL: git@winniecloud.net:example-cloud")
780
788
  $stdout.should_receive(:puts).with(" Web server IP: 22.22.22.22")
781
789
  $stdout.should_receive(:puts).with(" Mail server IP: 11.11.11.11")
790
+ $stdout.should_receive(:puts).with(" Statistics:")
791
+ $stdout.should_receive(:puts).with(" app1:")
792
+ $stdout.should_receive(:puts).with(" Load average: 1m: 0.04, 5m: 0.15, 15m: 0.13")
793
+ $stdout.should_receive(:puts).with(" CPU: 0.8%, MEM: 74.1%, SWAP: 2.8%")
782
794
  invoke(@main, :info)
783
795
  end
784
796
 
@@ -793,9 +805,31 @@ We have been notified about it. We will be adding new resources shortly")
793
805
  $stdout.should_receive(:puts).with(" Repository URL: git@winniecloud.net:example-cloud")
794
806
  $stdout.should_receive(:puts).with(" Web server IP: 22.22.22.22")
795
807
  $stdout.should_receive(:puts).with(" Mail server IP: 11.11.11.11")
808
+ $stdout.should_receive(:puts).with(" Statistics:")
809
+ $stdout.should_receive(:puts).with(" app1:")
810
+ $stdout.should_receive(:puts).with(" Load average: 1m: 0.04, 5m: 0.15, 15m: 0.13")
811
+ $stdout.should_receive(:puts).with(" CPU: 0.8%, MEM: 74.1%, SWAP: 2.8%")
812
+ invoke(@main, :info)
813
+ end
814
+
815
+ it "should not display statistics when statistics are empty" do
816
+ @app.stub(:attributes).and_return(response({"state" => "turned_off"}))
817
+ @main.should_receive(:multiple_clouds).and_return(@app)
818
+ @app.stub(:statistics).and_return([])
819
+ $stdout.should_not_receive(:puts).with("Statistics:")
796
820
  invoke(@main, :info)
797
821
  end
798
822
  end
823
+
824
+ context "on failure" do
825
+ it "should raise an error if statistics unavailable" do
826
+ @main.should_receive(:multiple_clouds).and_return(@app)
827
+ exception = Shelly::Client::GatewayTimeoutException.new
828
+ @app.stub(:statistics).and_raise(exception)
829
+ $stdout.should_receive(:puts).with(red "Server statistics temporarily unavailable")
830
+ lambda { invoke(@main, :info) }.should raise_error(SystemExit)
831
+ end
832
+ end
799
833
  end
800
834
 
801
835
  context "on failure" do
@@ -1333,4 +1367,95 @@ We have been notified about it. We will be adding new resources shortly")
1333
1367
  end
1334
1368
  end
1335
1369
  end
1370
+
1371
+ describe "#check" do
1372
+ before do
1373
+ Shelly::App.stub(:inside_git_repository?).and_return(true)
1374
+ Bundler::Definition.stub_chain(:build, :specs, :map).and_return(["thin"])
1375
+ Grit::Repo.stub_chain(:new, :status, :map).and_return(["config.ru"])
1376
+ File.open("Gemfile", 'w')
1377
+ end
1378
+
1379
+ it "should ensure user is in git repository" do
1380
+ hooks(@main, :check).should include(:inside_git_repository?)
1381
+ end
1382
+
1383
+ context "when gemfile exists" do
1384
+ it "should show that Gemfile exists" do
1385
+ $stdout.should_receive(:puts).with(" #{green("+")} Gemfile exists")
1386
+ invoke(@main, :check)
1387
+ end
1388
+ end
1389
+
1390
+ context "when gemfile doesn't exist" do
1391
+ it "should show that Gemfile doesn't exist" do
1392
+ File.delete("Gemfile")
1393
+ $stdout.should_receive(:puts).with(" #{red("-")} Gemfile exists")
1394
+ invoke(@main, :check)
1395
+ end
1396
+ end
1397
+
1398
+ context "when thin gem exists" do
1399
+ it "should show that necessary gem exists" do
1400
+ $stdout.should_receive(:puts).with(" #{green("+")} gem 'thin' present in Gemfile")
1401
+ invoke(@main, :check)
1402
+ end
1403
+ end
1404
+
1405
+ context "when thin gem doesn't exist" do
1406
+ it "should show that necessary gem dosn't exist" do
1407
+ Bundler::Definition.stub_chain(:build, :specs, :map).and_return([])
1408
+ $stdout.should_receive(:puts).with(" #{red("-")} gem 'thin' present in Gemfile")
1409
+ invoke(@main, :check)
1410
+ end
1411
+ end
1412
+
1413
+ context "when config.ru exists" do
1414
+ it "should show that config.ru exists" do
1415
+ $stdout.should_receive(:puts).with(" #{green("+")} config.ru exists")
1416
+ invoke(@main, :check)
1417
+ end
1418
+ end
1419
+
1420
+ context "when config.ru doesn't exist" do
1421
+ it "should show that config.ru is neccessary" do
1422
+ Grit::Repo.stub_chain(:new, :status, :map).and_return([])
1423
+ $stdout.should_receive(:puts).with(" #{red("-")} config.ru exists")
1424
+ invoke(@main, :check)
1425
+ end
1426
+ end
1427
+
1428
+ context "when mysql gem exists" do
1429
+ it "should show that mysql gem is not supported by Shelly Cloud" do
1430
+ Bundler::Definition.stub_chain(:build, :specs, :map).and_return(["mysql"])
1431
+ $stdout.should_receive(:puts).with(" #{red("-")} application doesn't use mysql database")
1432
+ invoke(@main, :check)
1433
+ end
1434
+
1435
+ it "should show that mysql2 gem is not supported by Shelly Cloud" do
1436
+ Bundler::Definition.stub_chain(:build, :specs, :map).and_return(["mysql2"])
1437
+ $stdout.should_receive(:puts).with(" #{red("-")} application doesn't use mysql database")
1438
+ invoke(@main, :check)
1439
+ end
1440
+ end
1441
+
1442
+ context "when mysql gem doesn't exist" do
1443
+ it "should show that mysql gem doesn't exist" do
1444
+ $stdout.should_receive(:puts).with(" #{green("+")} application doesn't use mysql database")
1445
+ invoke(@main, :check)
1446
+ end
1447
+ end
1448
+
1449
+ context "when bundler raise error" do
1450
+ it "should display error message" do
1451
+ exception = Bundler::BundlerError.new('Bundler error')
1452
+ Bundler::Definition.stub(:build).and_raise(exception)
1453
+ $stdout.should_receive(:puts).with(red "Bundler error")
1454
+ $stdout.should_receive(:puts).with(red "Try to run `bundle install`")
1455
+ lambda {
1456
+ invoke(@main, :check)
1457
+ }.should raise_error(SystemExit)
1458
+ end
1459
+ end
1460
+ end
1336
1461
  end
@@ -190,6 +190,24 @@ describe Shelly::Client do
190
190
  end
191
191
  end
192
192
 
193
+ describe "#statistics" do
194
+ it "should fetch app statistics from API" do
195
+ @body = [{:name => "app1",
196
+ :memory => {:kilobyte => "276756", :percent => "74.1"},
197
+ :swap => {:kilobyte => "44332", :percent => "2.8"},
198
+ :cpu => {:wait => "0.8", :system => "0.0", :user => "0.1"},
199
+ :load => {:avg15 => "0.13", :avg05 => "0.15", :avg01 => "0.04"}}]
200
+ FakeWeb.register_uri(:get, api_url("apps/staging-foo/statistics"),
201
+ :body => @body.to_json)
202
+ response = @client.statistics("staging-foo")
203
+ response.should == [{"name" => "app1",
204
+ "memory" => {"kilobyte" => "276756", "percent" => "74.1"},
205
+ "swap" => {"kilobyte" => "44332", "percent" => "2.8"},
206
+ "cpu" => {"wait" => "0.8", "system" => "0.0", "user" => "0.1"},
207
+ "load" => {"avg15" =>"0.13", "avg05" => "0.15", "avg01" => "0.04"}}]
208
+ end
209
+ end
210
+
193
211
  describe "#command" do
194
212
  it "should send post request with app code_name, body and type" do
195
213
  @client.should_receive(:post).with("/apps/staging-foo/command",
@@ -11,17 +11,6 @@ describe Shelly::Cloudfile do
11
11
  @cloudfile = Shelly::Cloudfile.new
12
12
  end
13
13
 
14
- describe "#hash converting" do
15
- it "should convert hash to proper string" do
16
- @cloudfile.yaml(@hash).should == "code_name:\n code: test"
17
- end
18
-
19
- it "should convert a hash to yaml format" do
20
- @cloudfile.write(@hash)
21
- @cloudfile.open.should == {"code_name" => {"code" => "test"}}
22
- end
23
- end
24
-
25
14
  it "should allow improper yaml that works with syck" do
26
15
  yaml = %Q{domains:
27
16
  - *.example.com
@@ -33,4 +22,87 @@ describe Shelly::Cloudfile do
33
22
  yaml.should == {"domains" => ["*.example.com", "example.com"]}
34
23
  end
35
24
 
25
+ describe "#generate" do
26
+ before do
27
+ @cloudfile.code_name = "foo-staging"
28
+ @cloudfile.domains = ["foo-staging.winniecloud.com", "foo.example.com"]
29
+ @cloudfile.databases = ["postgresql", "mongodb"]
30
+ @cloudfile.ruby_version = "1.9.3"
31
+ @cloudfile.environment = "production"
32
+ @cloudfile.size = "large"
33
+ @cloudfile.stub(:current_user => mock(:email => "bob@example.com"))
34
+ end
35
+
36
+ context "for large instance" do
37
+ it "should generate sample Cloudfile with given attributes" do
38
+ FakeFS.deactivate!
39
+ expected = <<-config
40
+ foo-staging:
41
+ ruby_version: 1.9.3 # 1.9.3, 1.9.2 or ree-1.8.7
42
+ environment: production # RAILS_ENV
43
+ monitoring_email: bob@example.com
44
+ domains:
45
+ - foo-staging.winniecloud.com
46
+ - foo.example.com
47
+ servers:
48
+ app1:
49
+ size: large
50
+ thin: 4
51
+ # whenever: on
52
+ # delayed_job: 1
53
+ databases:
54
+ - postgresql
55
+ - mongodb
56
+ # - redis
57
+ config
58
+
59
+ @cloudfile.generate.should == expected
60
+ end
61
+ end
62
+
63
+ context "for small instance" do
64
+ it "should generate sample Cloudfile with given attributes and 2 thins" do
65
+ FakeFS.deactivate!
66
+ @cloudfile.size = "small"
67
+ expected = <<-config
68
+ foo-staging:
69
+ ruby_version: 1.9.3 # 1.9.3, 1.9.2 or ree-1.8.7
70
+ environment: production # RAILS_ENV
71
+ monitoring_email: bob@example.com
72
+ domains:
73
+ - foo-staging.winniecloud.com
74
+ - foo.example.com
75
+ servers:
76
+ app1:
77
+ size: small
78
+ thin: 2
79
+ # whenever: on
80
+ # delayed_job: 1
81
+ databases:
82
+ - postgresql
83
+ - mongodb
84
+ # - redis
85
+ config
86
+ @cloudfile.generate.should == expected
87
+ end
88
+ end
89
+ end
90
+
91
+ describe "#create" do
92
+ before do
93
+ @cloudfile.stub(:generate).and_return("foo-staging:")
94
+ end
95
+
96
+ it "should create file if Cloudfile doesn't exist" do
97
+ File.exists?("/projects/foo/Cloudfile").should be_false
98
+ @cloudfile.create
99
+ File.exists?("/projects/foo/Cloudfile").should be_true
100
+ end
101
+
102
+ it "should append content if Cloudfile exists" do
103
+ File.open("/projects/foo/Cloudfile", "w") { |f| f << "foo-production:\n" }
104
+ @cloudfile.create
105
+ File.read("/projects/foo/Cloudfile").strip.should == "foo-production:\nfoo-staging:"
106
+ end
107
+ end
36
108
  end
@@ -0,0 +1,72 @@
1
+ require "spec_helper"
2
+
3
+ describe Shelly::StructureValidator do
4
+ before do
5
+ File.open("Gemfile", 'w')
6
+ File.open("config.ru", 'w')
7
+ @validator = Shelly::StructureValidator.new
8
+ end
9
+
10
+ it "should return Gemfile path" do
11
+ @validator.gemfile_path.should == "Gemfile"
12
+ end
13
+
14
+ it "should return Gemfile.lock path" do
15
+ @validator.gemfile_lock_path.should == "Gemfile.lock"
16
+ end
17
+
18
+ describe "#gemfile_exists?" do
19
+ context "when Gemfile exists" do
20
+ it "should return true" do
21
+ @validator.gemfile_exists?.should == true
22
+ end
23
+ end
24
+
25
+ context "when Gemfile doesn't exist" do
26
+ it "should return false" do
27
+ File.delete("Gemfile")
28
+ @validator.gemfile_exists?.should == false
29
+ end
30
+ end
31
+ end
32
+
33
+ describe "#config_ru_exists?" do
34
+ before do
35
+ @config_ru = mock(:path => "config.ru")
36
+ Grit::Repo.stub_chain(:new, :status).and_return([@config_ru])
37
+ end
38
+
39
+ context "when config.ru exists" do
40
+ it "should return true" do
41
+ @validator.config_ru_exists?.should == true
42
+ end
43
+ end
44
+
45
+ context "when config.ru doesn't exist" do
46
+ it "should return false" do
47
+ Grit::Repo.stub_chain(:new, :status).and_return([])
48
+ @validator.config_ru_exists?.should == false
49
+ end
50
+ end
51
+ end
52
+
53
+ describe "#gems" do
54
+ before do
55
+ @thin = mock(:name => "thin")
56
+ @mysql = mock(:name => "mysql")
57
+ end
58
+
59
+ it "should return list of used gems" do
60
+ Bundler::Definition.stub_chain(:build, :specs).and_return([@thin, @mysql])
61
+ Bundler::Definition.should_receive(:build).with("Gemfile", "Gemfile.lock", nil)
62
+ @validator.gems.should == ["thin", "mysql"]
63
+ end
64
+
65
+ context "when gemfile doesn't exist" do
66
+ it "should return empty array" do
67
+ File.delete("Gemfile")
68
+ @validator.gems.should == []
69
+ end
70
+ end
71
+ end
72
+ end
metadata CHANGED
@@ -1,264 +1,234 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: shelly
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.6
3
+ version: !ruby/object:Gem::Version
4
+ hash: 21
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 7
10
+ version: 0.1.7
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Shelly Cloud team
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-05-21 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rspec
16
- requirement: !ruby/object:Gem::Requirement
17
+
18
+ date: 2012-05-28 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ version_requirements: &id001 !ruby/object:Gem::Requirement
17
22
  none: false
18
- requirements:
23
+ requirements:
19
24
  - - ~>
20
- - !ruby/object:Gem::Version
25
+ - !ruby/object:Gem::Version
26
+ hash: 47
27
+ segments:
28
+ - 2
29
+ - 8
30
+ - 0
21
31
  version: 2.8.0
22
- type: :development
32
+ requirement: *id001
23
33
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
34
+ type: :development
35
+ name: rspec
36
+ - !ruby/object:Gem::Dependency
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
25
38
  none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 2.8.0
30
- - !ruby/object:Gem::Dependency
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ requirement: *id002
47
+ prerelease: false
48
+ type: :development
31
49
  name: rake
32
- requirement: !ruby/object:Gem::Requirement
50
+ - !ruby/object:Gem::Dependency
51
+ version_requirements: &id003 !ruby/object:Gem::Requirement
33
52
  none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ requirement: *id003
39
61
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
62
+ type: :development
47
63
  name: guard
48
- requirement: !ruby/object:Gem::Requirement
64
+ - !ruby/object:Gem::Dependency
65
+ version_requirements: &id004 !ruby/object:Gem::Requirement
49
66
  none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ requirement: *id004
55
75
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
76
+ type: :development
63
77
  name: guard-rspec
64
- requirement: !ruby/object:Gem::Requirement
78
+ - !ruby/object:Gem::Dependency
79
+ version_requirements: &id005 !ruby/object:Gem::Requirement
65
80
  none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ hash: 3
85
+ segments:
86
+ - 0
87
+ version: "0"
88
+ requirement: *id005
71
89
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: simplecov
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
90
  type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- - !ruby/object:Gem::Dependency
95
- name: ruby_gntp
96
- requirement: !ruby/object:Gem::Requirement
91
+ name: simplecov
92
+ - !ruby/object:Gem::Dependency
93
+ version_requirements: &id006 !ruby/object:Gem::Requirement
97
94
  none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ hash: 3
99
+ segments:
100
+ - 0
101
+ version: "0"
102
+ requirement: *id006
103
103
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: rb-fsevent
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
104
  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'
126
- - !ruby/object:Gem::Dependency
127
105
  name: fakefs
128
- requirement: !ruby/object:Gem::Requirement
106
+ - !ruby/object:Gem::Dependency
107
+ version_requirements: &id007 !ruby/object:Gem::Requirement
129
108
  none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- type: :development
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ hash: 3
113
+ segments:
114
+ - 0
115
+ version: "0"
116
+ requirement: *id007
135
117
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: fakeweb
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ! '>='
148
- - !ruby/object:Gem::Version
149
- version: '0'
150
118
  type: :development
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
- - !ruby/object:Gem::Dependency
159
- name: wijet-thor
160
- requirement: !ruby/object:Gem::Requirement
119
+ name: fakeweb
120
+ - !ruby/object:Gem::Dependency
121
+ version_requirements: &id008 !ruby/object:Gem::Requirement
161
122
  none: false
162
- requirements:
123
+ requirements:
163
124
  - - ~>
164
- - !ruby/object:Gem::Version
125
+ - !ruby/object:Gem::Version
126
+ hash: 41
127
+ segments:
128
+ - 0
129
+ - 14
130
+ - 7
165
131
  version: 0.14.7
166
- type: :runtime
132
+ requirement: *id008
167
133
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
134
+ type: :runtime
135
+ name: wijet-thor
136
+ - !ruby/object:Gem::Dependency
137
+ version_requirements: &id009 !ruby/object:Gem::Requirement
169
138
  none: false
170
- requirements:
171
- - - ~>
172
- - !ruby/object:Gem::Version
173
- version: 0.14.7
174
- - !ruby/object:Gem::Dependency
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ hash: 3
143
+ segments:
144
+ - 0
145
+ version: "0"
146
+ requirement: *id009
147
+ prerelease: false
148
+ type: :runtime
175
149
  name: rest-client
176
- requirement: !ruby/object:Gem::Requirement
150
+ - !ruby/object:Gem::Dependency
151
+ version_requirements: &id010 !ruby/object:Gem::Requirement
177
152
  none: false
178
- requirements:
179
- - - ! '>='
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
- type: :runtime
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ hash: 3
157
+ segments:
158
+ - 0
159
+ version: "0"
160
+ requirement: *id010
183
161
  prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ! '>='
188
- - !ruby/object:Gem::Version
189
- version: '0'
190
- - !ruby/object:Gem::Dependency
162
+ type: :runtime
191
163
  name: json
192
- requirement: !ruby/object:Gem::Requirement
164
+ - !ruby/object:Gem::Dependency
165
+ version_requirements: &id011 !ruby/object:Gem::Requirement
193
166
  none: false
194
- requirements:
195
- - - ! '>='
196
- - !ruby/object:Gem::Version
197
- version: '0'
198
- type: :runtime
167
+ requirements:
168
+ - - ">="
169
+ - !ruby/object:Gem::Version
170
+ hash: 3
171
+ segments:
172
+ - 0
173
+ version: "0"
174
+ requirement: *id011
199
175
  prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ! '>='
204
- - !ruby/object:Gem::Version
205
- version: '0'
206
- - !ruby/object:Gem::Dependency
176
+ type: :runtime
207
177
  name: progressbar
208
- requirement: !ruby/object:Gem::Requirement
178
+ - !ruby/object:Gem::Dependency
179
+ version_requirements: &id012 !ruby/object:Gem::Requirement
209
180
  none: false
210
- requirements:
211
- - - ! '>='
212
- - !ruby/object:Gem::Version
213
- version: '0'
214
- type: :runtime
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ hash: 3
185
+ segments:
186
+ - 0
187
+ version: "0"
188
+ requirement: *id012
215
189
  prerelease: false
216
- version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
- requirements:
219
- - - ! '>='
220
- - !ruby/object:Gem::Version
221
- version: '0'
222
- - !ruby/object:Gem::Dependency
223
- name: launchy
224
- requirement: !ruby/object:Gem::Requirement
225
- none: false
226
- requirements:
227
- - - ! '>='
228
- - !ruby/object:Gem::Version
229
- version: '0'
230
190
  type: :runtime
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
191
+ name: grit
192
+ - !ruby/object:Gem::Dependency
193
+ version_requirements: &id013 !ruby/object:Gem::Requirement
233
194
  none: false
234
- requirements:
235
- - - ! '>='
236
- - !ruby/object:Gem::Version
237
- version: '0'
238
- - !ruby/object:Gem::Dependency
239
- name: shelly-dependencies
240
- requirement: !ruby/object:Gem::Requirement
241
- none: false
242
- requirements:
243
- - - ~>
244
- - !ruby/object:Gem::Version
245
- version: 0.1.1
246
- type: :runtime
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ hash: 3
199
+ segments:
200
+ - 0
201
+ version: "0"
202
+ requirement: *id013
247
203
  prerelease: false
248
- version_requirements: !ruby/object:Gem::Requirement
204
+ type: :runtime
205
+ name: launchy
206
+ - !ruby/object:Gem::Dependency
207
+ version_requirements: &id014 !ruby/object:Gem::Requirement
249
208
  none: false
250
- requirements:
209
+ requirements:
251
210
  - - ~>
252
- - !ruby/object:Gem::Version
211
+ - !ruby/object:Gem::Version
212
+ hash: 25
213
+ segments:
214
+ - 0
215
+ - 1
216
+ - 1
253
217
  version: 0.1.1
218
+ requirement: *id014
219
+ prerelease: false
220
+ type: :runtime
221
+ name: shelly-dependencies
254
222
  description: Tool for managing applications and clouds at shellycloud.com
255
- email:
223
+ email:
256
224
  - support@shellycloud.com
257
- executables:
225
+ executables:
258
226
  - shelly
259
227
  extensions: []
228
+
260
229
  extra_rdoc_files: []
261
- files:
230
+
231
+ files:
262
232
  - .gitignore
263
233
  - .travis.yml
264
234
  - Gemfile
@@ -283,6 +253,7 @@ files:
283
253
  - lib/shelly/download_progress_bar.rb
284
254
  - lib/shelly/helpers.rb
285
255
  - lib/shelly/model.rb
256
+ - lib/shelly/structure_validator.rb
286
257
  - lib/shelly/templates/Cloudfile.erb
287
258
  - lib/shelly/user.rb
288
259
  - lib/shelly/version.rb
@@ -306,54 +277,42 @@ files:
306
277
  - spec/shelly/cloudfile_spec.rb
307
278
  - spec/shelly/download_progress_bar_spec.rb
308
279
  - spec/shelly/model_spec.rb
280
+ - spec/shelly/structure_validator_spec.rb
309
281
  - spec/shelly/user_spec.rb
310
282
  - spec/spec_helper.rb
311
283
  - spec/thor/options_spec.rb
312
284
  homepage: http://shellycloud.com
313
285
  licenses: []
286
+
314
287
  post_install_message:
315
288
  rdoc_options: []
316
- require_paths:
289
+
290
+ require_paths:
317
291
  - lib
318
- required_ruby_version: !ruby/object:Gem::Requirement
292
+ required_ruby_version: !ruby/object:Gem::Requirement
319
293
  none: false
320
- requirements:
321
- - - ! '>='
322
- - !ruby/object:Gem::Version
323
- version: '0'
324
- segments:
294
+ requirements:
295
+ - - ">="
296
+ - !ruby/object:Gem::Version
297
+ hash: 3
298
+ segments:
325
299
  - 0
326
- hash: -403961491533422523
327
- required_rubygems_version: !ruby/object:Gem::Requirement
300
+ version: "0"
301
+ required_rubygems_version: !ruby/object:Gem::Requirement
328
302
  none: false
329
- requirements:
330
- - - ! '>='
331
- - !ruby/object:Gem::Version
332
- version: '0'
333
- segments:
303
+ requirements:
304
+ - - ">="
305
+ - !ruby/object:Gem::Version
306
+ hash: 3
307
+ segments:
334
308
  - 0
335
- hash: -403961491533422523
309
+ version: "0"
336
310
  requirements: []
311
+
337
312
  rubyforge_project: shelly
338
- rubygems_version: 1.8.23
313
+ rubygems_version: 1.8.10
339
314
  signing_key:
340
315
  specification_version: 3
341
316
  summary: Shelly Cloud command line tool
342
- test_files:
343
- - spec/helpers.rb
344
- - spec/input_faker.rb
345
- - spec/shelly/app_spec.rb
346
- - spec/shelly/backup_spec.rb
347
- - spec/shelly/cli/backup_spec.rb
348
- - spec/shelly/cli/config_spec.rb
349
- - spec/shelly/cli/deploys_spec.rb
350
- - spec/shelly/cli/main_spec.rb
351
- - spec/shelly/cli/runner_spec.rb
352
- - spec/shelly/cli/user_spec.rb
353
- - spec/shelly/client_spec.rb
354
- - spec/shelly/cloudfile_spec.rb
355
- - spec/shelly/download_progress_bar_spec.rb
356
- - spec/shelly/model_spec.rb
357
- - spec/shelly/user_spec.rb
358
- - spec/spec_helper.rb
359
- - spec/thor/options_spec.rb
317
+ test_files: []
318
+