pagoda 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
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|
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Pagoda
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
7
+ - 2
8
8
  - 0
9
- version: 0.1.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-06 00:00:00 -06:00
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