pagoda 0.1.0 → 0.2.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/lib/pagoda/client.rb +4 -0
- data/lib/pagoda/commands/app.rb +4 -0
- data/lib/pagoda/commands/db.rb +18 -0
- data/lib/pagoda/version.rb +1 -1
- metadata +4 -3
data/lib/pagoda/client.rb
CHANGED
@@ -44,6 +44,10 @@ class Pagoda::Client
|
|
44
44
|
|
45
45
|
end
|
46
46
|
|
47
|
+
def app_database_create(app)
|
48
|
+
response = post("/apps/#{app}/databases.xml", {:mysql_instance => {:ram => 10}})
|
49
|
+
end
|
50
|
+
|
47
51
|
def app_create(name, git_url)
|
48
52
|
doc = xml(post("/apps.xml", {:app => {:name => name, :git_url => git_url}}).to_s)
|
49
53
|
doc.elements.to_a('//app/*').inject({}) do |hash, element|
|
data/lib/pagoda/commands/app.rb
CHANGED
@@ -50,6 +50,10 @@ module Pagoda::Command
|
|
50
50
|
Pagoda::Command.run_internal("app:deploy", args)
|
51
51
|
end
|
52
52
|
|
53
|
+
if option_value(nil, "--with-mysql")
|
54
|
+
Pagoda::Command.run_internal("db:create", args)
|
55
|
+
end
|
56
|
+
|
53
57
|
display "-----------------------------------------------"
|
54
58
|
display
|
55
59
|
display "LIVE URL : http://#{name}.pagodabox.com"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Pagoda::Command
|
2
|
+
class Db < Base
|
3
|
+
|
4
|
+
def create
|
5
|
+
app
|
6
|
+
display
|
7
|
+
client.app_database_create(app)
|
8
|
+
display "+> creating a sql database on pagodabox...", false
|
9
|
+
loop_transaction
|
10
|
+
display "+> created"
|
11
|
+
display
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
data/lib/pagoda/version.rb
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 2
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.2.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- lyon hill
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-05-
|
17
|
+
date: 2011-05-10 00:00:00 -06:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/pagoda/commands/app.rb
|
119
119
|
- lib/pagoda/commands/auth.rb
|
120
120
|
- lib/pagoda/commands/base.rb
|
121
|
+
- lib/pagoda/commands/db.rb
|
121
122
|
- lib/pagoda/commands/help.rb
|
122
123
|
- lib/pagoda/commands/tunnel.rb
|
123
124
|
- lib/pagoda/helpers.rb
|