shelly 0.0.62 → 0.1.0
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.
- data/README.md +1 -1
- data/lib/shelly/version.rb +1 -1
- data/scrolls/shellycloud.rb +82 -0
- data/shelly.gemspec +1 -0
- metadata +22 -5
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Shelly Cloud command line tool [](http://travis-ci.org/Ragnarson/shelly)
|
2
2
|
|
3
3
|
## Installation
|
4
4
|
|
data/lib/shelly/version.rb
CHANGED
@@ -0,0 +1,82 @@
|
|
1
|
+
@name = File.basename(File.expand_path("."))
|
2
|
+
|
3
|
+
gem_group :development do
|
4
|
+
gem 'shelly', '>= 0.0.62'
|
5
|
+
end
|
6
|
+
|
7
|
+
# check if user has account on shelly
|
8
|
+
`shelly list`
|
9
|
+
if $? != 0
|
10
|
+
say_custom "shellycloud", "Please log in or register with Shelly Cloud."
|
11
|
+
say_custom "shellycloud", "You can do that by running `shelly login` or `shelly register`"
|
12
|
+
exit 1
|
13
|
+
end
|
14
|
+
|
15
|
+
required_dbs = %w[postgresql mongodb redis]
|
16
|
+
required_app_servers = %w[thin]
|
17
|
+
|
18
|
+
selected_db = required_dbs.find { |db| scroll? db }
|
19
|
+
unless selected_db
|
20
|
+
say_custom "shellycloud", "Please include a DB choice from: #{required_dbs.join ", "}"
|
21
|
+
exit_now = true
|
22
|
+
end
|
23
|
+
|
24
|
+
selected_app_server = required_app_servers.find { |app| scroll? app }
|
25
|
+
unless selected_app_server
|
26
|
+
say_custom "shellycloud", "Please include an App Server choice from: #{required_app_servers.join ", "}"
|
27
|
+
exit_now = true
|
28
|
+
end
|
29
|
+
|
30
|
+
exit 1 if exit_now
|
31
|
+
|
32
|
+
after_everything do
|
33
|
+
framework_env = multiple_choice "Which framework environment?", [
|
34
|
+
['Production', 'production'],
|
35
|
+
['Staging', 'staging']
|
36
|
+
]
|
37
|
+
|
38
|
+
app_name = (@repo_name && @repo_name.size > 0) ? @repo_name : @name
|
39
|
+
app_name.gsub!(/\W/, '') # only letters and numbers
|
40
|
+
app_name.gsub!("_", "-")
|
41
|
+
|
42
|
+
instance_size = "large"
|
43
|
+
if framework_env == "production"
|
44
|
+
say_custom "shellycloud", "Using large instances for production environment"
|
45
|
+
else
|
46
|
+
say_custom "shellycloud", "Using small instances for staging environment"
|
47
|
+
instance_size = "small"
|
48
|
+
end
|
49
|
+
|
50
|
+
code_name = "#{app_name}-#{framework_env}"
|
51
|
+
|
52
|
+
name = File.basename(".")
|
53
|
+
command = "bundle exec shelly add --code_name #{code_name} "
|
54
|
+
command += "--databases=#{selected_db} " if selected_db
|
55
|
+
command += "--size=#{instance_size}"
|
56
|
+
|
57
|
+
run command
|
58
|
+
|
59
|
+
say_custom "shellycloud", "Adding Cloudfile to your repo"
|
60
|
+
run "git add Cloudfile"
|
61
|
+
run "git commit -m 'Added Cloudfile'"
|
62
|
+
|
63
|
+
say_custom "shellycloud", "Pushing code to Shelly Cloud"
|
64
|
+
sleep(5) # sleep for ssh key to generate on shelly
|
65
|
+
run "git push #{code_name} master"
|
66
|
+
|
67
|
+
say_custom "shellycloud", "Your application in now configured for Shelly Cloud"
|
68
|
+
say_custom "shellycloud", "You can start it by running `shelly start`."
|
69
|
+
say_custom "shellycloud", "For more information, check https://shellycloud.com/documentation"
|
70
|
+
end
|
71
|
+
|
72
|
+
__END__
|
73
|
+
|
74
|
+
name: Shelly Cloud
|
75
|
+
description: Ruby Cloud Hosting in Europe
|
76
|
+
author: grk
|
77
|
+
|
78
|
+
category: deployment
|
79
|
+
exclusive: deployment
|
80
|
+
|
81
|
+
requires: [compile_assets, serve_static_assets, git, thin]
|
82
|
+
run_after: [git]
|
data/shelly.gemspec
CHANGED
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_runtime_dependency "json"
|
29
29
|
s.add_runtime_dependency "progressbar"
|
30
30
|
s.add_runtime_dependency "launchy"
|
31
|
+
s.add_runtime_dependency "shelly-dependencies", "~> 0.1.0"
|
31
32
|
|
32
33
|
s.files = `git ls-files`.split("\n")
|
33
34
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shelly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -235,6 +235,22 @@ dependencies:
|
|
235
235
|
- - ! '>='
|
236
236
|
- !ruby/object:Gem::Version
|
237
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.0
|
246
|
+
type: :runtime
|
247
|
+
prerelease: false
|
248
|
+
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
none: false
|
250
|
+
requirements:
|
251
|
+
- - ~>
|
252
|
+
- !ruby/object:Gem::Version
|
253
|
+
version: 0.1.0
|
238
254
|
description: Tool for managing applications and clouds at shellycloud.com
|
239
255
|
email:
|
240
256
|
- support@shellycloud.com
|
@@ -274,6 +290,7 @@ files:
|
|
274
290
|
- lib/thor/basic.rb
|
275
291
|
- lib/thor/options.rb
|
276
292
|
- lib/thor/thor.rb
|
293
|
+
- scrolls/shellycloud.rb
|
277
294
|
- shelly.gemspec
|
278
295
|
- spec/helpers.rb
|
279
296
|
- spec/input_faker.rb
|
@@ -306,7 +323,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
306
323
|
version: '0'
|
307
324
|
segments:
|
308
325
|
- 0
|
309
|
-
hash: -
|
326
|
+
hash: -3064116673417660281
|
310
327
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
311
328
|
none: false
|
312
329
|
requirements:
|
@@ -315,10 +332,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
315
332
|
version: '0'
|
316
333
|
segments:
|
317
334
|
- 0
|
318
|
-
hash: -
|
335
|
+
hash: -3064116673417660281
|
319
336
|
requirements: []
|
320
337
|
rubyforge_project: shelly
|
321
|
-
rubygems_version: 1.8.
|
338
|
+
rubygems_version: 1.8.23
|
322
339
|
signing_key:
|
323
340
|
specification_version: 3
|
324
341
|
summary: Shelly Cloud command line tool
|