dokku_client 0.3 → 0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a445a9bbe94be89e11a37987e7810f166d9e78c
4
- data.tar.gz: ca0ab7c839cf88135de1c3166ab8391cf4799819
3
+ metadata.gz: 3aedae92f2bf0aa81f49bdd0da908578f916c457
4
+ data.tar.gz: ab2c89464619ac5ef1a4357c7327b9551d25325f
5
5
  SHA512:
6
- metadata.gz: fb0e48ae74b0b69e44084a6d1f5696ba56cb87f027051240a92946d40cfa50b77e3034669074e361d86f40031f4a7fbc148cf4c30b59929f00b83d67f8f3312e
7
- data.tar.gz: 3afd5a7d7384cb2217ec373f82619db47ae939f3e2a05b5b9d7d671ecbbbf0e7f6e3f099075b4b67bc7eebff30c6865ef3bad1fbcee973f416f386f187b3ad48
6
+ metadata.gz: a4e8762fb1a06669a02bffa3d68a150040f64d5f1eb6527d1e5364256e9ffe3e244e683d685023fb2197cba097a52da192daaf8f08994ca53884db99040908bb
7
+ data.tar.gz: 3913a49b7493dbc45f776db19b47725d0f64348c4bce9f47c7f602969fcc6676819cac9074b37db637f4dccdabc4f8aa06184a90c438055134b24dc5d7ea1d6a
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![weasel](http://www.chromosomechronicles.com/wp-content/uploads/2010/03/i-am-weasel.jpg)](https://github.com/kubalasecki/dokku_client)
4
4
 
5
- DokkuClient ...
5
+ DokkuClient ... This gem for now assumes that you have installed these plugins: (memcached, mongodb, mysql, postgresql, redis)
6
6
 
7
7
  ## Installation
8
8
 
@@ -14,6 +14,8 @@ Install it yourself as:
14
14
 
15
15
  $ dokku reconfig
16
16
 
17
+ You will be asked for your dokku host and project name which will be stored in your application .git/config
18
+
17
19
  Show help
18
20
 
19
21
  dokku help
@@ -22,20 +24,35 @@ or
22
24
 
23
25
  dokku --help
24
26
 
25
- Available commands
26
-
27
- dokku logs
28
- dokku config
29
- dokku get_config
30
- dokku set_config
31
- dokku unset_config
27
+ Available commands (aliases to commands in brackets)
28
+
29
+ dokku
30
+ logs (l)
31
+ run (r) <command>
32
+ url (u)
33
+ plugins (p)
34
+ config (c)
35
+ get_config (gc) <KEY>
36
+ set_config (sc) KEY=VALUE [KEY2=VALUE2]
37
+ unset_config (uc) KEY [KEY2]
38
+ create_mem
39
+ delete_mem
40
+ info_mem
41
+ logs_mem
42
+ link_mem <container>
32
43
 
33
44
  ## Roadmap
34
45
 
35
- ### 0.2 Current release
46
+ ### 0.3 Current release
36
47
 
37
48
  * **TODO** more commands
38
49
 
50
+ ### 0.2
51
+
52
+ * delegate methods
53
+ * memcached commands
54
+ * more common commands
55
+
39
56
  ### 0.1
40
57
 
41
58
  * gem basic structure
@@ -65,6 +65,22 @@ module DokkuClient
65
65
 
66
66
  def_delegator :dokku_memcached, :link_memcached, :link_mem
67
67
 
68
+ ### mongodb commands
69
+
70
+ def_delegator :dokku_mongodb, :create_mongodb, :create_mongo
71
+
72
+ def_delegator :dokku_mongodb, :console_mongodb, :console_mongo
73
+
74
+ def_delegator :dokku_mongodb, :delete_mongodb, :delete_mongo
75
+
76
+ def_delegator :dokku_mongodb, :link_mongodb, :link_mongo
77
+
78
+ def_delegator :dokku_mongodb, :logs_mongodb, :logs_mongo
79
+
80
+ def_delegator :dokku_mongodb, :list_mongodb, :list_mongo
81
+
82
+ def_delegator :dokku_mongodb, :status_mongodb, :status_mongo
83
+
68
84
  def reconfig
69
85
  DokkuClient::Base.new.reconfig
70
86
  end
@@ -87,6 +103,10 @@ module DokkuClient
87
103
  @dokku_memcached ||= DokkuClient::Plugins::Memcached.new(@options)
88
104
  end
89
105
 
106
+ def dokku_mongodb
107
+ @dokku_mongodb ||= DokkuClient::Plugins::Mongodb.new(@options)
108
+ end
109
+
90
110
  def no_argument_error
91
111
  puts "You forgot argument - look into help"
92
112
  end
@@ -137,11 +157,11 @@ module DokkuClient
137
157
  opt_parser.parse!(args)
138
158
 
139
159
  case args[0]
140
- when "set_config", "get_config", "unset_config", "sc", "gc", "uc"
160
+ when "set_config", "get_config", "unset_config", "sc", "gc", "uc", "link_mem", "r", "run"
141
161
  self.send(args[0].to_sym, args[1])
142
162
  when "help"
143
163
  puts opt_parser
144
- when "logs", "reconfig", "config", "c", "l"
164
+ when "logs", "reconfig", "config", "c", "l", "create_mem", "delete_mem", "info_mem", "logs_mem", "p", "url", "u"
145
165
  self.send(args[0].to_sym)
146
166
  when nil
147
167
  no_method_error
@@ -2,6 +2,37 @@ module DokkuClient
2
2
  module Plugins
3
3
  class Mongodb < Base
4
4
 
5
+ def run
6
+ end
7
+
8
+ def create_mongodb
9
+ dokku "mongodb:create #{@options["project-name"]}"
10
+ end
11
+
12
+ def console_mongodb
13
+ dokku "mongodb:console #{@options["project-name"]}"
14
+ end
15
+
16
+ def delete_mongodb
17
+ dokku "mongodb:delete #{@options["project-name"]}"
18
+ end
19
+
20
+ def list_mongodb
21
+ dokku "mongodb:list #{@options["project-name"]}"
22
+ end
23
+
24
+ def logs_mongodb
25
+ dokku "mongodb:logs #{@options["project-name"]}"
26
+ end
27
+
28
+ def link_mongodb
29
+ dokku "mongodb:link #{@options["project-name"]}"
30
+ end
31
+
32
+ def status_mongodb
33
+ dokku "mongodb:status #{@options["project-name"]}"
34
+ end
35
+
5
36
  end
6
37
  end
7
38
  end
@@ -1,3 +1,3 @@
1
1
  module DokkuClient
2
- VERSION = '0.3'
2
+ VERSION = '0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dokku_client
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuba Łasecki