dokku_client 0.9 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98487c367379ec7fe21e9cd1ba2f9aea6fb491e2
4
- data.tar.gz: 846d0acb2ea573cb1ef92c102d9105898702576e
3
+ metadata.gz: 77adf120b4406d0e502dc931bdc9feb2a52491d1
4
+ data.tar.gz: 4b290479f297e51af9e1ee2d5afe0cb139343636
5
5
  SHA512:
6
- metadata.gz: b70e4db5d19ea9f9d070785c5e271a9a8097e30aee7947cd9fc30e9415061eaa69feccde3e853105f41bce2137a8f370c8933abd6303607b29404e9596dff9b8
7
- data.tar.gz: 28e373b20dada52682a1ee324a2f9ef27b0b72fe66405acaf1f23b624885e6aeea0f9f051505b74505f75fe67753d10be60ad5d59db9ef28f5ffca14d0700014
6
+ metadata.gz: 995043f21370163f484433b117d6e11e22f2423e45a938f478297af136ebe9da3ab9b9b6ffdacd30e049671f779a73b3b00fa313a28d90ba56f38bcfd1aa74cf
7
+ data.tar.gz: f0cbed2205eb095fa869690dd41957b56959b08a0b864689b50abe9650603c2b42dc6d103933fa19ca6b362d29c620025c23c54856ca8f8e76b6948b2697b717
@@ -0,0 +1,48 @@
1
+ === 1.1 Current release
2
+
3
+ * **TODO** more commands (redis , mysql)
4
+
5
+ === 1.0
6
+
7
+ * set available commands visible in dokku help
8
+
9
+ === 0.9
10
+
11
+ * better help output with description to each command
12
+
13
+ === 0.8
14
+
15
+ * fix problem with rc / rdm command
16
+
17
+ === 0.7
18
+
19
+ * fix postgresql methods
20
+
21
+ === 0.6
22
+
23
+ * rails console commands
24
+
25
+ === 0.5
26
+
27
+ * small updates
28
+
29
+ === 0.4
30
+
31
+ * fix mongodb commands
32
+ * postgresql commands
33
+
34
+ === 0.3
35
+
36
+ * mongodb commands
37
+
38
+ === 0.2
39
+
40
+ * delegate methods
41
+ * memcached commands
42
+ * more common commands
43
+
44
+ === 0.1
45
+
46
+ * gem basic structure
47
+ * logs command
48
+ * config option per project
data/README.md CHANGED
@@ -16,83 +16,74 @@ Install it yourself as:
16
16
 
17
17
  ## Configuration
18
18
 
19
- $ dokku reconfig
19
+ $ dokku (for the first time in project)
20
20
 
21
- You will be asked for your dokku host and project name which will be stored in your application .git/config
22
-
23
- Show help
24
-
25
- dokku help
26
-
27
- or
28
-
29
- dokku --help
30
-
31
- Available commands (aliases to commands in brackets)
21
+ $ dokku reconfig (to update config)
32
22
 
33
- dokku
34
- logs (l)
35
- run (r) <command>
36
- url (u)
37
- plugins (p)
38
- config (c)
39
- rc <env>
40
- rdm
41
- get_config (gc) <KEY>
42
- set_config (sc) KEY=VALUE [KEY2=VALUE2]
43
- unset_config (uc) KEY [KEY2]
44
- create_mem
45
- delete_mem
46
- info_mem
47
- logs_mem
48
- link_mem <container>
49
- create_mongo
50
- delete_mongo
51
- link_mongo
52
- logs_mongo
53
- list_mongo
54
- status_mongo
55
- create_postgres <db>
56
- delete_postgres <db>
57
- info_postgres <db>
58
- list_postgres
59
- logs_postgres <db>
60
- link_postgres <db>
61
-
62
- ## Roadmap
63
-
64
- ### 0.7 Current release
23
+ You will be asked for your dokku host and project name which will be stored in your application .git/config
65
24
 
66
- * **TODO** more commands (redis , mysql)
25
+ ## Customize list of available commands
67
26
 
68
- ### 0.6
27
+ In 'active commands' question when you configuring dokku client type plugin name separated by comma and commands for this plugin will be visible in dokku help.
28
+ Available plugins:
69
29
 
70
- * rails console commands
30
+ + memcached
31
+ + postgresl
32
+ + mongodb
71
33
 
72
- ### 0.5
34
+ Common and Config commands are enabled by default. If you don't answer to 'active commands' then all commands will be visible.
73
35
 
74
- * small updates
75
36
 
76
- ### 0.4
37
+ ## Show help
77
38
 
78
- * fix mongodb commands
79
- * postgresql commands
39
+ dokku help
80
40
 
81
- ### 0.3
41
+ or
82
42
 
83
- * mongodb commands
43
+ dokku --help
84
44
 
85
- ### 0.2
45
+ ## Available commands (aliases to commands in brackets)
86
46
 
87
- * delegate methods
88
- * memcached commands
89
- * more common commands
47
+ dokku
90
48
 
91
- ### 0.1
49
+ Common commands:
50
+ logs (l) show app logs
51
+ run (r) '<command>' run command (unfortunately fon now you have to type command in quotes)
52
+ url (u) show link to aplication
53
+ plugins (p) show installed plugins on dokku host
54
+ rc <env> run rails console for application (pass 'staging' to load staging console, or leave empty for production)
55
+ rdm run database migrations
56
+
57
+ Config commands:
58
+ config (c) show environment variables for project
59
+ get_config (gc) <KEY> show exact environment variable
60
+ set_config (sc) KEY=VALUE [KEY2=VALUE2] set new environment variables
61
+ unset_config (uc) KEY [KEY2] remove environment variables
62
+
63
+ Memcached commands:
64
+ create_mem create memcached container
65
+ delete_mem delete memcached container
66
+ info_mem display container informations
67
+ logs_mem display last logs from memcached container
68
+ link_mem <container> link an app to memcached container
69
+
70
+ MongoDB commands:
71
+ create_mongo create a mongo database
72
+ delete_mongo delete a mongo database
73
+ console_mongo lunch mongodb console as admin
74
+ link_mongo link mongo container to application
75
+ logs_mongo display logs for mongo container
76
+ list_mongo list all mongo databases
77
+ status_mongo display status of mongo container
78
+
79
+ Postgresql commands:
80
+ create_postgres <db> create a postgresql database
81
+ delete_postgres <db> delete specified postgresql database
82
+ info_postgres <db> display database information
83
+ link_postgres <db> link an app to a postgresql container
84
+ list_postgres <db> display list of postgresql containers
85
+ logs_postgres display last logs from postgresql container
92
86
 
93
- * gem basic structure
94
- * logs command
95
- * config option per project
96
87
 
97
88
  ## Contributing
98
89
 
@@ -6,8 +6,9 @@ module DokkuClient
6
6
  GIT_DIR = '.git'
7
7
 
8
8
  KEYS_AND_QUESTIONS = {
9
- "dokku-client.project-name" => "Enter project name",
10
- "dokku-client.project-host" => "Enter dokku host"
9
+ "dokku-client.project-name" => "Enter project name:",
10
+ "dokku-client.project-host" => "Enter dokku host:",
11
+ "dokku-client.plugins" => "Active commands (comma separated):"
11
12
  }
12
13
 
13
14
  def initialize(options={})
@@ -43,6 +44,10 @@ module DokkuClient
43
44
  exec "ssh", "-t", "dokku@#{@options["project-host"]}", arg
44
45
  end
45
46
 
47
+ def plugin_enabled plugin
48
+ @options["plugins"].include?(plugin) || @options["plugins"].nil?
49
+ end
50
+
46
51
  private
47
52
 
48
53
  def config_update_success
@@ -26,12 +26,14 @@ module DokkuClient
26
26
  end
27
27
 
28
28
  def commands opts
29
- opts.separator "\n Memcached commands:"
30
- opts.separator " create_mem create memcached container"
31
- opts.separator " delete_mem delete memcached container"
32
- opts.separator " info_mem display container informations"
33
- opts.separator " logs_mem display last logs from memcached container"
34
- opts.separator " link_mem <container> link an app to memcached container"
29
+ if plugin_enabled('memcached')
30
+ opts.separator "\n Memcached commands:"
31
+ opts.separator " create_mem create memcached container"
32
+ opts.separator " delete_mem delete memcached container"
33
+ opts.separator " info_mem display container informations"
34
+ opts.separator " logs_mem display last logs from memcached container"
35
+ opts.separator " link_mem <container> link an app to memcached container"
36
+ end
35
37
  end
36
38
 
37
39
  end
@@ -34,14 +34,16 @@ module DokkuClient
34
34
  end
35
35
 
36
36
  def commands opts
37
- opts.separator "\n MongoDB commands:"
38
- opts.separator " create_mongo create a mongo database"
39
- opts.separator " delete_mongo delete a mongo database"
40
- opts.separator " console_mongo lunch mongodb console as admin"
41
- opts.separator " link_mongo link mongo container to application"
42
- opts.separator " logs_mongo display logs for mongo container"
43
- opts.separator " list_mongo list all mongo databases"
44
- opts.separator " status_mongo display status of mongo container"
37
+ if plugin_enabled('mongodb')
38
+ opts.separator "\n MongoDB commands:"
39
+ opts.separator " create_mongo create a mongo database"
40
+ opts.separator " delete_mongo delete a mongo database"
41
+ opts.separator " console_mongo lunch mongodb console as admin"
42
+ opts.separator " link_mongo link mongo container to application"
43
+ opts.separator " logs_mongo display logs for mongo container"
44
+ opts.separator " list_mongo list all mongo databases"
45
+ opts.separator " status_mongo display status of mongo container"
46
+ end
45
47
  end
46
48
 
47
49
  end
@@ -38,13 +38,15 @@ module DokkuClient
38
38
  end
39
39
 
40
40
  def commands opts
41
- opts.separator "\n Postgresql commands:"
42
- opts.separator " create_postgres create a postgresql database"
43
- opts.separator " delete_postgres delete specified postgresql database"
44
- opts.separator " info_postgres display database information"
45
- opts.separator " link_postgres link an app to a postgresql container"
46
- opts.separator " list_postgres display list of postgresql containers"
47
- opts.separator " logs_postgres display last logs from postgresql container"
41
+ if plugin_enabled('postgresql')
42
+ opts.separator "\n Postgresql commands:"
43
+ opts.separator " create_postgres <db> create a postgresql database"
44
+ opts.separator " delete_postgres <db> delete specified postgresql database"
45
+ opts.separator " info_postgres <db> display database information"
46
+ opts.separator " link_postgres <db> link an app to a postgresql container"
47
+ opts.separator " list_postgres <db> display list of postgresql containers"
48
+ opts.separator " logs_postgres display last logs from postgresql container"
49
+ end
48
50
  end
49
51
 
50
52
  end
@@ -1,3 +1,3 @@
1
1
  module DokkuClient
2
- VERSION = '0.9'
2
+ VERSION = '1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dokku_client
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuba Łasecki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-26 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grit
@@ -75,6 +75,7 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
+ - CHANGELOG
78
79
  - Gemfile
79
80
  - LICENSE
80
81
  - README.md