towsta 1.2.8 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/towsta +13 -13
- data/lib/towsta/version.rb +1 -1
- data/lib/towsta.rb +1 -0
- metadata +3 -3
data/bin/towsta
CHANGED
@@ -69,27 +69,27 @@ if action == 'new'
|
|
69
69
|
Dir.mkdir "#{project}/locales"
|
70
70
|
git = '*.swp'
|
71
71
|
File.open("#{project}/.gitignore", 'w') {|f| f.write(git)}
|
72
|
-
s = "cd #{project}"
|
73
|
-
system "cd #{project} && git init >/dev/null"
|
74
|
-
system "cd #{project} && heroku create >/dev/null" unless system "cd #{project} && heroku create #{project} >/dev/null"
|
75
|
-
system "cd #{project} && heroku addons:add sendgrid:starter >/dev/null"
|
76
|
-
system "cd #{project} && heroku addons:add memcache >/dev/null"
|
77
|
-
system "cd #{project} && heroku addons:add custom_domains:basic >/dev/null"
|
78
|
-
system "cd #{project} && heroku addons:add zerigo_dns:basic >/dev/null"
|
79
|
-
system "cd #{project} && bundle install >/dev/null"
|
80
|
-
system "cd #{project} && towsta deploy >/dev/null"
|
81
72
|
puts "#{project} is ready to towst!"
|
82
73
|
elsif action == 'server'
|
83
74
|
port = ARGV[1].nil? ? '6937' : ARGV[1]
|
84
75
|
system "shotgun -I config.ru -p #{port}"
|
85
76
|
elsif action == 'console'
|
86
77
|
system 'irb -r ./app.rb'
|
78
|
+
elsif action == 'configure'
|
79
|
+
project = %x[pwd].split('/').last.strip
|
80
|
+
system "git init"
|
81
|
+
system "heroku create" unless system "heroku create #{project}"
|
82
|
+
system "heroku addons:add sendgrid:starter"
|
83
|
+
system "heroku addons:add memcache"
|
84
|
+
system "heroku addons:add custom_domains:basic"
|
85
|
+
system "heroku addons:add zerigo_dns:basic"
|
86
|
+
system "bundle install"
|
87
87
|
elsif action == 'deploy'
|
88
|
-
system '
|
88
|
+
system 'towsta configure' unless system('heroku stack')
|
89
|
+
system 'git add .'
|
89
90
|
message = ARGV[1].nil? ? 'Deployed via Towsta gem' : ARGV[1]
|
90
|
-
system "git commit -a -m '#{message}'
|
91
|
-
system 'git push -q
|
92
|
-
system 'clear'
|
91
|
+
system "git commit -a -m '#{message}'"
|
92
|
+
system 'git push -q' unless system 'git push heroku master -q'
|
93
93
|
puts 'Deploy is complete!'
|
94
94
|
elsif action == 'help'
|
95
95
|
puts 'towsta new {projectname} {optional: secret} to generate a new project'
|
data/lib/towsta/version.rb
CHANGED
data/lib/towsta.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 1.2.
|
8
|
+
- 9
|
9
|
+
version: 1.2.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mortaro
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-01-
|
17
|
+
date: 2012-01-09 00:00:00 -02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|