kontena-cli 0.15.5 → 0.16.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +0 -3
  3. data/Gemfile +3 -0
  4. data/LOGO +8 -0
  5. data/VERSION +1 -1
  6. data/kontena-cli.gemspec +2 -3
  7. data/lib/kontena/callback.rb +57 -0
  8. data/lib/kontena/callbacks/.gitkeep +0 -0
  9. data/lib/kontena/callbacks/auth/01_list_and_select_grid_after_master_auth.rb +27 -0
  10. data/lib/kontena/callbacks/master/01_clear_current_master_after_terminate.rb +20 -0
  11. data/lib/kontena/callbacks/master/deploy/01_show_logo_before_deploy.rb +15 -0
  12. data/lib/kontena/callbacks/master/deploy/05_before_deploy_configuration_wizard.rb +124 -0
  13. data/lib/kontena/callbacks/master/deploy/50_authenticate_after_deploy.rb +53 -0
  14. data/lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb +32 -0
  15. data/lib/kontena/callbacks/master/deploy/60_configure_auth_provider_after_deploy.rb +49 -0
  16. data/lib/kontena/callbacks/master/deploy/90_suggest_inviting_yourself_after_deploy.rb +24 -0
  17. data/lib/kontena/cli/app_command.rb +2 -1
  18. data/lib/kontena/cli/apps/build_command.rb +1 -1
  19. data/lib/kontena/cli/apps/common.rb +6 -1
  20. data/lib/kontena/cli/apps/config_command.rb +1 -1
  21. data/lib/kontena/cli/apps/deploy_command.rb +1 -1
  22. data/lib/kontena/cli/apps/init_command.rb +3 -5
  23. data/lib/kontena/cli/apps/list_command.rb +1 -1
  24. data/lib/kontena/cli/apps/logs_command.rb +1 -1
  25. data/lib/kontena/cli/apps/monitor_command.rb +1 -1
  26. data/lib/kontena/cli/apps/remove_command.rb +2 -3
  27. data/lib/kontena/cli/apps/restart_command.rb +1 -1
  28. data/lib/kontena/cli/apps/scale_command.rb +1 -1
  29. data/lib/kontena/cli/apps/show_command.rb +1 -1
  30. data/lib/kontena/cli/apps/start_command.rb +1 -1
  31. data/lib/kontena/cli/apps/stop_command.rb +1 -1
  32. data/lib/kontena/cli/apps/yaml/reader.rb +3 -13
  33. data/lib/kontena/cli/apps/yaml/validator.rb +0 -4
  34. data/lib/kontena/cli/apps/yaml/validator_v2.rb +1 -5
  35. data/lib/kontena/cli/certificate/authorize_command.rb +1 -1
  36. data/lib/kontena/cli/certificate/get_command.rb +1 -1
  37. data/lib/kontena/cli/certificate/register_command.rb +1 -1
  38. data/lib/kontena/cli/certificate_command.rb +1 -1
  39. data/lib/kontena/cli/cloud/login_command.rb +128 -0
  40. data/lib/kontena/cli/cloud/master/add_command.rb +54 -0
  41. data/lib/kontena/cli/cloud/master/delete_command.rb +20 -0
  42. data/lib/kontena/cli/cloud/master/list_command.rb +29 -0
  43. data/lib/kontena/cli/cloud/master/show_command.rb +23 -0
  44. data/lib/kontena/cli/cloud/master/update_command.rb +58 -0
  45. data/lib/kontena/cli/cloud/master_command.rb +21 -0
  46. data/lib/kontena/cli/cloud_command.rb +10 -0
  47. data/lib/kontena/cli/common.rb +230 -88
  48. data/lib/kontena/cli/config.rb +537 -0
  49. data/lib/kontena/cli/container_command.rb +1 -1
  50. data/lib/kontena/cli/containers/exec_command.rb +1 -1
  51. data/lib/kontena/cli/containers/inspect_command.rb +1 -1
  52. data/lib/kontena/cli/etcd/get_command.rb +1 -1
  53. data/lib/kontena/cli/etcd/list_command.rb +1 -1
  54. data/lib/kontena/cli/etcd/mkdir_command.rb +1 -1
  55. data/lib/kontena/cli/etcd/remove_command.rb +1 -1
  56. data/lib/kontena/cli/etcd/set_command.rb +1 -1
  57. data/lib/kontena/cli/etcd_command.rb +1 -1
  58. data/lib/kontena/cli/external_registries/add_command.rb +1 -1
  59. data/lib/kontena/cli/external_registries/delete_command.rb +1 -1
  60. data/lib/kontena/cli/external_registries/list_command.rb +1 -1
  61. data/lib/kontena/cli/external_registries/remove_command.rb +1 -1
  62. data/lib/kontena/cli/external_registry_command.rb +1 -1
  63. data/lib/kontena/cli/grid_command.rb +1 -1
  64. data/lib/kontena/cli/grids/audit_log_command.rb +6 -5
  65. data/lib/kontena/cli/grids/cloud_config_command.rb +1 -1
  66. data/lib/kontena/cli/grids/common.rb +1 -1
  67. data/lib/kontena/cli/grids/create_command.rb +8 -4
  68. data/lib/kontena/cli/grids/current_command.rb +1 -1
  69. data/lib/kontena/cli/grids/env_command.rb +1 -1
  70. data/lib/kontena/cli/grids/list_command.rb +35 -10
  71. data/lib/kontena/cli/grids/logs_command.rb +1 -1
  72. data/lib/kontena/cli/grids/remove_command.rb +2 -2
  73. data/lib/kontena/cli/grids/show_command.rb +1 -1
  74. data/lib/kontena/cli/grids/trusted_subnet_command.rb +1 -1
  75. data/lib/kontena/cli/grids/trusted_subnets/add_command.rb +1 -1
  76. data/lib/kontena/cli/grids/trusted_subnets/list_command.rb +1 -1
  77. data/lib/kontena/cli/grids/trusted_subnets/remove_command.rb +1 -1
  78. data/lib/kontena/cli/grids/update_command.rb +1 -1
  79. data/lib/kontena/cli/grids/use_command.rb +11 -6
  80. data/lib/kontena/cli/grids/user_command.rb +1 -1
  81. data/lib/kontena/cli/grids/users/add_command.rb +1 -1
  82. data/lib/kontena/cli/grids/users/list_command.rb +1 -1
  83. data/lib/kontena/cli/grids/users/remove_command.rb +1 -1
  84. data/lib/kontena/cli/localhost_web_server.rb +93 -0
  85. data/lib/kontena/cli/login_command.rb +5 -118
  86. data/lib/kontena/cli/logout_command.rb +33 -2
  87. data/lib/kontena/cli/master/audit_log_command.rb +19 -0
  88. data/lib/kontena/cli/master/config/export_command.rb +47 -0
  89. data/lib/kontena/cli/master/config/get_command.rb +24 -0
  90. data/lib/kontena/cli/master/config/import_command.rb +69 -0
  91. data/lib/kontena/cli/master/config/set_command.rb +19 -0
  92. data/lib/kontena/cli/master/config/unset_command.rb +20 -0
  93. data/lib/kontena/cli/master/config_command.rb +24 -0
  94. data/lib/kontena/cli/master/create_command.rb +76 -0
  95. data/lib/kontena/cli/master/current_command.rb +10 -2
  96. data/lib/kontena/cli/master/join_command.rb +20 -0
  97. data/lib/kontena/cli/master/list_command.rb +4 -4
  98. data/lib/kontena/cli/master/login_command.rb +274 -0
  99. data/lib/kontena/cli/master/use_command.rb +8 -19
  100. data/lib/kontena/cli/master/users/invite_command.rb +33 -6
  101. data/lib/kontena/cli/master/users/list_command.rb +2 -2
  102. data/lib/kontena/cli/master/users/remove_command.rb +1 -1
  103. data/lib/kontena/cli/master/users/role_command.rb +1 -1
  104. data/lib/kontena/cli/master/users/roles/add_command.rb +18 -16
  105. data/lib/kontena/cli/master/users/roles/remove_command.rb +1 -1
  106. data/lib/kontena/cli/master/users_command.rb +1 -1
  107. data/lib/kontena/cli/master_command.rb +21 -1
  108. data/lib/kontena/cli/node_command.rb +1 -1
  109. data/lib/kontena/cli/nodes/label_command.rb +1 -1
  110. data/lib/kontena/cli/nodes/labels/add_command.rb +1 -1
  111. data/lib/kontena/cli/nodes/labels/remove_command.rb +1 -1
  112. data/lib/kontena/cli/nodes/list_command.rb +1 -1
  113. data/lib/kontena/cli/nodes/remove_command.rb +1 -1
  114. data/lib/kontena/cli/nodes/show_command.rb +1 -1
  115. data/lib/kontena/cli/nodes/ssh_command.rb +1 -1
  116. data/lib/kontena/cli/nodes/update_command.rb +1 -1
  117. data/lib/kontena/cli/plugin_command.rb +1 -1
  118. data/lib/kontena/cli/plugins/install_command.rb +2 -2
  119. data/lib/kontena/cli/plugins/list_command.rb +2 -2
  120. data/lib/kontena/cli/plugins/search_command.rb +1 -1
  121. data/lib/kontena/cli/plugins/uninstall_command.rb +2 -2
  122. data/lib/kontena/cli/registry/create_command.rb +2 -4
  123. data/lib/kontena/cli/registry/delete_command.rb +1 -1
  124. data/lib/kontena/cli/registry/remove_command.rb +1 -1
  125. data/lib/kontena/cli/registry_command.rb +1 -1
  126. data/lib/kontena/cli/service_command.rb +1 -1
  127. data/lib/kontena/cli/services/container_command.rb +1 -1
  128. data/lib/kontena/cli/services/containers_command.rb +1 -1
  129. data/lib/kontena/cli/services/create_command.rb +1 -1
  130. data/lib/kontena/cli/services/delete_command.rb +1 -1
  131. data/lib/kontena/cli/services/deploy_command.rb +1 -1
  132. data/lib/kontena/cli/services/env_command.rb +1 -1
  133. data/lib/kontena/cli/services/envs/add_command.rb +1 -1
  134. data/lib/kontena/cli/services/envs/list_command.rb +1 -1
  135. data/lib/kontena/cli/services/envs/remove_command.rb +1 -1
  136. data/lib/kontena/cli/services/link_command.rb +1 -1
  137. data/lib/kontena/cli/services/list_command.rb +1 -1
  138. data/lib/kontena/cli/services/logs_command.rb +1 -1
  139. data/lib/kontena/cli/services/monitor_command.rb +1 -1
  140. data/lib/kontena/cli/services/remove_command.rb +1 -1
  141. data/lib/kontena/cli/services/restart_command.rb +1 -1
  142. data/lib/kontena/cli/services/scale_command.rb +1 -1
  143. data/lib/kontena/cli/services/secret_command.rb +1 -1
  144. data/lib/kontena/cli/services/secrets/link_command.rb +1 -1
  145. data/lib/kontena/cli/services/secrets/unlink_command.rb +1 -1
  146. data/lib/kontena/cli/services/services_helper.rb +6 -3
  147. data/lib/kontena/cli/services/show_command.rb +1 -1
  148. data/lib/kontena/cli/services/start_command.rb +1 -1
  149. data/lib/kontena/cli/services/stats_command.rb +1 -1
  150. data/lib/kontena/cli/services/stop_command.rb +1 -1
  151. data/lib/kontena/cli/services/unlink_command.rb +1 -1
  152. data/lib/kontena/cli/services/update_command.rb +1 -1
  153. data/lib/kontena/cli/spinner.rb +122 -0
  154. data/lib/kontena/cli/stack_command.rb +1 -1
  155. data/lib/kontena/cli/stacks/create_command.rb +1 -1
  156. data/lib/kontena/cli/stacks/deploy_command.rb +1 -1
  157. data/lib/kontena/cli/stacks/list_command.rb +1 -1
  158. data/lib/kontena/cli/stacks/remove_command.rb +1 -1
  159. data/lib/kontena/cli/stacks/show_command.rb +1 -1
  160. data/lib/kontena/cli/stacks/update_command.rb +1 -1
  161. data/lib/kontena/cli/vault/list_command.rb +1 -1
  162. data/lib/kontena/cli/vault/read_command.rb +1 -1
  163. data/lib/kontena/cli/vault/remove_command.rb +1 -1
  164. data/lib/kontena/cli/vault/update_command.rb +1 -1
  165. data/lib/kontena/cli/vault/write_command.rb +1 -1
  166. data/lib/kontena/cli/vault_command.rb +1 -1
  167. data/lib/kontena/cli/version.rb +1 -1
  168. data/lib/kontena/cli/version_command.rb +1 -1
  169. data/lib/kontena/cli/vpn/config_command.rb +1 -1
  170. data/lib/kontena/cli/vpn/create_command.rb +2 -4
  171. data/lib/kontena/cli/vpn/delete_command.rb +1 -1
  172. data/lib/kontena/cli/vpn/remove_command.rb +1 -1
  173. data/lib/kontena/cli/vpn_command.rb +1 -1
  174. data/lib/kontena/cli/whoami_command.rb +16 -13
  175. data/lib/kontena/client.rb +410 -90
  176. data/lib/kontena/command.rb +172 -0
  177. data/lib/kontena/main_command.rb +7 -8
  178. data/lib/kontena/presets/github_auth_provider.yml +11 -0
  179. data/lib/kontena/presets/kontena_auth_provider.yml +11 -0
  180. data/lib/kontena_cli.rb +51 -1
  181. data/spec/kontena/cli/app/deploy_command_spec.rb +14 -44
  182. data/spec/kontena/cli/app/scale_spec.rb +1 -1
  183. data/spec/kontena/cli/app/yaml/reader_spec.rb +0 -48
  184. data/spec/kontena/cli/common_spec.rb +63 -59
  185. data/spec/kontena/cli/grids/use_command_spec.rb +43 -0
  186. data/spec/kontena/cli/master/current_command_spec.rb +3 -24
  187. data/spec/kontena/cli/master/use_command_spec.rb +2 -27
  188. data/spec/kontena/cli/master/users/invite_command_spec.rb +4 -18
  189. data/spec/kontena/cli/master/users/roles/add_command_spec.rb +2 -16
  190. data/spec/kontena/cli/master/users/roles/remove_command_spec.rb +2 -13
  191. data/spec/kontena/cli/services/restart_command_spec.rb +1 -1
  192. data/spec/kontena/cli/services/update_command_spec.rb +5 -5
  193. data/spec/kontena/client_spec.rb +104 -35
  194. data/spec/kontena/config_spec.rb +65 -0
  195. data/spec/spec_helper.rb +25 -3
  196. data/spec/support/client_helpers.rb +10 -3
  197. data/spec/support/requirements_helper.rb +32 -0
  198. metadata +61 -48
  199. data/lib/kontena/cli/register_command.rb +0 -23
  200. data/lib/kontena/cli/user/forgot_password_command.rb +0 -16
  201. data/lib/kontena/cli/user/reset_password_command.rb +0 -23
  202. data/lib/kontena/cli/user/verify_command.rb +0 -20
  203. data/lib/kontena/cli/user_command.rb +0 -13
  204. data/spec/fixtures/kontena-malformed-yaml.yml +0 -6
  205. data/spec/fixtures/kontena-not-hash-service-config.yml +0 -3
  206. data/spec/kontena/cli/login_command_spec.rb +0 -32
  207. data/spec/kontena/cli/register_command_spec.rb +0 -57
@@ -0,0 +1,32 @@
1
+ module RequirementsHelper
2
+
3
+ def self.included(base)
4
+ base.extend ClassMethods
5
+ end
6
+
7
+ module ClassMethods
8
+ def expect_to_require_current_master
9
+ describe "prerequisites" do
10
+ it "should require current master" do
11
+ expect(described_class.requires_current_master?).to be_truthy
12
+ end
13
+ end
14
+ end
15
+
16
+ def expect_to_require_current_grid
17
+ describe "prerequisites" do
18
+ it "should require current grid" do
19
+ expect(described_class.requires_current_current_grid?).to be_truthy
20
+ end
21
+ end
22
+ end
23
+
24
+ def expect_to_require_current_master_token
25
+ describe "prerequisites" do
26
+ it "should require current master token" do
27
+ expect(described_class.requires_current_current_master_token?).to be_truthy
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontena-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.5
4
+ version: 0.16.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kontena, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,19 +53,19 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.49.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: colorize
56
+ name: tty-prompt
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.8.1
61
+ version: 0.7.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.8.1
68
+ version: 0.7.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: clamp
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,34 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.0.0
83
- - !ruby/object:Gem::Dependency
84
- name: highline
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 1.7.8
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 1.7.8
97
- - !ruby/object:Gem::Dependency
98
- name: shell-spinner
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 1.0.4
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 1.0.4
111
83
  - !ruby/object:Gem::Dependency
112
84
  name: ruby_dig
113
85
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +164,20 @@ dependencies:
192
164
  - - '='
193
165
  - !ruby/object:Gem::Version
194
166
  version: 0.3.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: launchy
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 2.4.3
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 2.4.3
195
181
  description: Kontena command line tool
196
182
  email:
197
183
  - info@kontena.io
@@ -204,6 +190,7 @@ files:
204
190
  - Dockerfile
205
191
  - Gemfile
206
192
  - LICENSE.txt
193
+ - LOGO
207
194
  - README.md
208
195
  - Rakefile
209
196
  - VERSION
@@ -220,6 +207,16 @@ files:
220
207
  - examples/kontena-plugin-hello/lib/kontena_cli_plugin.rb
221
208
  - kontena-cli.gemspec
222
209
  - kontena-docker.sh
210
+ - lib/kontena/callback.rb
211
+ - lib/kontena/callbacks/.gitkeep
212
+ - lib/kontena/callbacks/auth/01_list_and_select_grid_after_master_auth.rb
213
+ - lib/kontena/callbacks/master/01_clear_current_master_after_terminate.rb
214
+ - lib/kontena/callbacks/master/deploy/01_show_logo_before_deploy.rb
215
+ - lib/kontena/callbacks/master/deploy/05_before_deploy_configuration_wizard.rb
216
+ - lib/kontena/callbacks/master/deploy/50_authenticate_after_deploy.rb
217
+ - lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
218
+ - lib/kontena/callbacks/master/deploy/60_configure_auth_provider_after_deploy.rb
219
+ - lib/kontena/callbacks/master/deploy/90_suggest_inviting_yourself_after_deploy.rb
223
220
  - lib/kontena/cli/app_command.rb
224
221
  - lib/kontena/cli/apps/build_command.rb
225
222
  - lib/kontena/cli/apps/common.rb
@@ -251,7 +248,16 @@ files:
251
248
  - lib/kontena/cli/certificate/get_command.rb
252
249
  - lib/kontena/cli/certificate/register_command.rb
253
250
  - lib/kontena/cli/certificate_command.rb
251
+ - lib/kontena/cli/cloud/login_command.rb
252
+ - lib/kontena/cli/cloud/master/add_command.rb
253
+ - lib/kontena/cli/cloud/master/delete_command.rb
254
+ - lib/kontena/cli/cloud/master/list_command.rb
255
+ - lib/kontena/cli/cloud/master/show_command.rb
256
+ - lib/kontena/cli/cloud/master/update_command.rb
257
+ - lib/kontena/cli/cloud/master_command.rb
258
+ - lib/kontena/cli/cloud_command.rb
254
259
  - lib/kontena/cli/common.rb
260
+ - lib/kontena/cli/config.rb
255
261
  - lib/kontena/cli/container_command.rb
256
262
  - lib/kontena/cli/containers/containers_helper.rb
257
263
  - lib/kontena/cli/containers/exec_command.rb
@@ -291,10 +297,21 @@ files:
291
297
  - lib/kontena/cli/grids/users/list_command.rb
292
298
  - lib/kontena/cli/grids/users/remove_command.rb
293
299
  - lib/kontena/cli/helpers/log_helper.rb
300
+ - lib/kontena/cli/localhost_web_server.rb
294
301
  - lib/kontena/cli/login_command.rb
295
302
  - lib/kontena/cli/logout_command.rb
303
+ - lib/kontena/cli/master/audit_log_command.rb
304
+ - lib/kontena/cli/master/config/export_command.rb
305
+ - lib/kontena/cli/master/config/get_command.rb
306
+ - lib/kontena/cli/master/config/import_command.rb
307
+ - lib/kontena/cli/master/config/set_command.rb
308
+ - lib/kontena/cli/master/config/unset_command.rb
309
+ - lib/kontena/cli/master/config_command.rb
310
+ - lib/kontena/cli/master/create_command.rb
296
311
  - lib/kontena/cli/master/current_command.rb
312
+ - lib/kontena/cli/master/join_command.rb
297
313
  - lib/kontena/cli/master/list_command.rb
314
+ - lib/kontena/cli/master/login_command.rb
298
315
  - lib/kontena/cli/master/use_command.rb
299
316
  - lib/kontena/cli/master/users/invite_command.rb
300
317
  - lib/kontena/cli/master/users/list_command.rb
@@ -318,7 +335,6 @@ files:
318
335
  - lib/kontena/cli/plugins/list_command.rb
319
336
  - lib/kontena/cli/plugins/search_command.rb
320
337
  - lib/kontena/cli/plugins/uninstall_command.rb
321
- - lib/kontena/cli/register_command.rb
322
338
  - lib/kontena/cli/registry/create_command.rb
323
339
  - lib/kontena/cli/registry/delete_command.rb
324
340
  - lib/kontena/cli/registry/remove_command.rb
@@ -350,6 +366,7 @@ files:
350
366
  - lib/kontena/cli/services/stop_command.rb
351
367
  - lib/kontena/cli/services/unlink_command.rb
352
368
  - lib/kontena/cli/services/update_command.rb
369
+ - lib/kontena/cli/spinner.rb
353
370
  - lib/kontena/cli/stack_command.rb
354
371
  - lib/kontena/cli/stacks/common.rb
355
372
  - lib/kontena/cli/stacks/create_command.rb
@@ -358,10 +375,6 @@ files:
358
375
  - lib/kontena/cli/stacks/remove_command.rb
359
376
  - lib/kontena/cli/stacks/show_command.rb
360
377
  - lib/kontena/cli/stacks/update_command.rb
361
- - lib/kontena/cli/user/forgot_password_command.rb
362
- - lib/kontena/cli/user/reset_password_command.rb
363
- - lib/kontena/cli/user/verify_command.rb
364
- - lib/kontena/cli/user_command.rb
365
378
  - lib/kontena/cli/vault/list_command.rb
366
379
  - lib/kontena/cli/vault/read_command.rb
367
380
  - lib/kontena/cli/vault/remove_command.rb
@@ -386,6 +399,8 @@ files:
386
399
  - lib/kontena/machine/random_name.rb
387
400
  - lib/kontena/main_command.rb
388
401
  - lib/kontena/plugin_manager.rb
402
+ - lib/kontena/presets/github_auth_provider.yml
403
+ - lib/kontena/presets/kontena_auth_provider.yml
389
404
  - lib/kontena/scripts/completer
390
405
  - lib/kontena/scripts/init
391
406
  - lib/kontena/util.rb
@@ -397,8 +412,6 @@ files:
397
412
  - spec/fixtures/kontena-build.yml
398
413
  - spec/fixtures/kontena-internal-extend.yml
399
414
  - spec/fixtures/kontena-invalid.yml
400
- - spec/fixtures/kontena-malformed-yaml.yml
401
- - spec/fixtures/kontena-not-hash-service-config.yml
402
415
  - spec/fixtures/kontena-with-env-file.yml
403
416
  - spec/fixtures/kontena-with-variables.yml
404
417
  - spec/fixtures/kontena.yml
@@ -427,15 +440,14 @@ files:
427
440
  - spec/kontena/cli/grids/trusted_subnets/add_command_spec.rb
428
441
  - spec/kontena/cli/grids/trusted_subnets/list_command_spec.rb
429
442
  - spec/kontena/cli/grids/trusted_subnets/remove_command_spec.rb
443
+ - spec/kontena/cli/grids/use_command_spec.rb
430
444
  - spec/kontena/cli/helpers/log_helper_spec.rb
431
- - spec/kontena/cli/login_command_spec.rb
432
445
  - spec/kontena/cli/master/current_command_spec.rb
433
446
  - spec/kontena/cli/master/use_command_spec.rb
434
447
  - spec/kontena/cli/master/users/invite_command_spec.rb
435
448
  - spec/kontena/cli/master/users/remove_command_spec.rb
436
449
  - spec/kontena/cli/master/users/roles/add_command_spec.rb
437
450
  - spec/kontena/cli/master/users/roles/remove_command_spec.rb
438
- - spec/kontena/cli/register_command_spec.rb
439
451
  - spec/kontena/cli/services/containers_command_spec.rb
440
452
  - spec/kontena/cli/services/link_command_spec.rb
441
453
  - spec/kontena/cli/services/restart_command_spec.rb
@@ -447,10 +459,12 @@ files:
447
459
  - spec/kontena/cli/version_command_spec.rb
448
460
  - spec/kontena/cli/vpn/create_command_spec.rb
449
461
  - spec/kontena/client_spec.rb
462
+ - spec/kontena/config_spec.rb
450
463
  - spec/kontena/plugin_manager_spec.rb
451
464
  - spec/spec_helper.rb
452
465
  - spec/support/client_helpers.rb
453
466
  - spec/support/fixtures_helpers.rb
467
+ - spec/support/requirements_helper.rb
454
468
  - tasks/release.rake
455
469
  - tasks/rspec.rake
456
470
  homepage: https://www.kontena.io
@@ -468,9 +482,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
468
482
  version: 2.0.0
469
483
  required_rubygems_version: !ruby/object:Gem::Requirement
470
484
  requirements:
471
- - - ">="
485
+ - - ">"
472
486
  - !ruby/object:Gem::Version
473
- version: '0'
487
+ version: 1.3.1
474
488
  requirements: []
475
489
  rubyforge_project:
476
490
  rubygems_version: 2.5.1
@@ -485,8 +499,6 @@ test_files:
485
499
  - spec/fixtures/kontena-build.yml
486
500
  - spec/fixtures/kontena-internal-extend.yml
487
501
  - spec/fixtures/kontena-invalid.yml
488
- - spec/fixtures/kontena-malformed-yaml.yml
489
- - spec/fixtures/kontena-not-hash-service-config.yml
490
502
  - spec/fixtures/kontena-with-env-file.yml
491
503
  - spec/fixtures/kontena-with-variables.yml
492
504
  - spec/fixtures/kontena.yml
@@ -515,15 +527,14 @@ test_files:
515
527
  - spec/kontena/cli/grids/trusted_subnets/add_command_spec.rb
516
528
  - spec/kontena/cli/grids/trusted_subnets/list_command_spec.rb
517
529
  - spec/kontena/cli/grids/trusted_subnets/remove_command_spec.rb
530
+ - spec/kontena/cli/grids/use_command_spec.rb
518
531
  - spec/kontena/cli/helpers/log_helper_spec.rb
519
- - spec/kontena/cli/login_command_spec.rb
520
532
  - spec/kontena/cli/master/current_command_spec.rb
521
533
  - spec/kontena/cli/master/use_command_spec.rb
522
534
  - spec/kontena/cli/master/users/invite_command_spec.rb
523
535
  - spec/kontena/cli/master/users/remove_command_spec.rb
524
536
  - spec/kontena/cli/master/users/roles/add_command_spec.rb
525
537
  - spec/kontena/cli/master/users/roles/remove_command_spec.rb
526
- - spec/kontena/cli/register_command_spec.rb
527
538
  - spec/kontena/cli/services/containers_command_spec.rb
528
539
  - spec/kontena/cli/services/link_command_spec.rb
529
540
  - spec/kontena/cli/services/restart_command_spec.rb
@@ -535,7 +546,9 @@ test_files:
535
546
  - spec/kontena/cli/version_command_spec.rb
536
547
  - spec/kontena/cli/vpn/create_command_spec.rb
537
548
  - spec/kontena/client_spec.rb
549
+ - spec/kontena/config_spec.rb
538
550
  - spec/kontena/plugin_manager_spec.rb
539
551
  - spec/spec_helper.rb
540
552
  - spec/support/client_helpers.rb
541
553
  - spec/support/fixtures_helpers.rb
554
+ - spec/support/requirements_helper.rb
@@ -1,23 +0,0 @@
1
- class Kontena::Cli::RegisterCommand < Clamp::Command
2
- include Kontena::Cli::Common
3
-
4
- option "--auth-provider-url", "AUTH_PROVIDER_URL", "Auth provider URL"
5
-
6
- def execute
7
- require 'highline/import'
8
-
9
- auth_api_url = auth_provider_url || 'https://auth.kontena.io'
10
- if !auth_api_url.start_with?('http://') && !auth_api_url.start_with?('https://')
11
- auth_api_url = "https://#{auth_api_url}"
12
- end
13
- email = ask("Email: ")
14
- password = ask("Password: ") { |q| q.echo = "*" }
15
- password2 = ask("Password again: ") { |q| q.echo = "*" }
16
- if password != password2
17
- abort("Passwords don't match".colorize(:red))
18
- end
19
- params = {email: email, password: password}
20
- auth_client = Kontena::Client.new(auth_api_url)
21
- auth_client.post('users', params)
22
- end
23
- end
@@ -1,16 +0,0 @@
1
- module Kontena::Cli::User
2
- class ForgotPasswordCommand < Clamp::Command
3
- include Kontena::Cli::Common
4
-
5
- parameter "EMAIL", "Email address"
6
-
7
- option "--auth-provider-url", "URL", "Auth provider URL", default: "https://auth.kontena.io/"
8
-
9
- def execute
10
- params = {email: email}
11
- auth_client = Kontena::Client.new(auth_provider_url)
12
- auth_client.post('user/password_reset', params)
13
- puts 'Email with password reset instructions is sent to your email address. Please follow the instructions to change your password.'
14
- end
15
- end
16
- end
@@ -1,23 +0,0 @@
1
- module Kontena::Cli::User
2
- class ResetPasswordCommand < Clamp::Command
3
- include Kontena::Cli::Common
4
-
5
- parameter "TOKEN", "Password reset token"
6
-
7
- option "--auth-provider-url", "URL", "Auth provider URL", default: "https://auth.kontena.io/"
8
-
9
- def execute
10
- require 'highline/import'
11
-
12
- password = ask("Password: ") { |q| q.echo = "*" }
13
- password2 = ask("Password again: ") { |q| q.echo = "*" }
14
- if password != password2
15
- abort("Passwords don't match")
16
- end
17
- params = {token: token, password: password}
18
- auth_client = Kontena::Client.new(auth_provider_url)
19
- auth_client.put('user/password_reset', params)
20
- puts 'Password is now changed. To login with the new password, please run: kontena login'
21
- end
22
- end
23
- end
@@ -1,20 +0,0 @@
1
- module Kontena::Cli::User
2
- class VerifyCommand < Clamp::Command
3
- include Kontena::Cli::Common
4
-
5
- parameter "TOKEN", "Kontena verify token"
6
-
7
- option "--auth-provider-url", "URL", "Auth provider URL", default: "https://auth.kontena.io/"
8
-
9
- def execute
10
- params = { token: token }
11
- begin
12
- auth_client = Kontena::Client.new(auth_provider_url)
13
- auth_client.post('user/email_confirm', params)
14
- puts 'Account verified'.colorize(:green)
15
- rescue Kontena::Errors::StandardError
16
- abort 'Invalid verify token'.colorize(:red)
17
- end
18
- end
19
- end
20
- end
@@ -1,13 +0,0 @@
1
- require_relative 'user/verify_command'
2
- require_relative 'user/forgot_password_command'
3
- require_relative 'user/reset_password_command'
4
-
5
- class Kontena::Cli::UserCommand < Clamp::Command
6
-
7
- subcommand "verify", "Verify user account", Kontena::Cli::User::VerifyCommand
8
- subcommand "forgot-password", "Request password reset for Kontena account", Kontena::Cli::User::ForgotPasswordCommand
9
- subcommand "reset-password", "Reset Kontena account password", Kontena::Cli::User::ResetPasswordCommand
10
-
11
- def execute
12
- end
13
- end
@@ -1,6 +0,0 @@
1
- version: '2'
2
- services:
3
- wordpress:
4
- build: .
5
- context: .
6
- dockerfile: Dockerfile.alternative
@@ -1,3 +0,0 @@
1
- version: '2'
2
- services:
3
- wordpress: 'service config cannot be string'
@@ -1,32 +0,0 @@
1
- require_relative "../../spec_helper"
2
- require "kontena/cli/login_command"
3
-
4
- describe Kontena::Cli::LoginCommand do
5
- describe '#register' do
6
-
7
- let(:settings) do
8
- {'current_server' => 'alias',
9
- 'servers' => [
10
- {'name' => 'some_master', 'url' => 'some_master'},
11
- {'name' => 'alias', 'url' => 'someurl', 'token' => '123456'}
12
- ]
13
- }
14
- end
15
-
16
- let(:auth_client) do
17
- double(Kontena::Client)
18
- end
19
-
20
- let(:subject) { described_class.new(File.basename($0)) }
21
-
22
- it 'asks email and password' do
23
- allow(subject).to receive(:settings).and_return(settings)
24
- expect(subject).to receive(:ask).once.with('Email: ').and_return('john.doe@acme.io')
25
- allow(subject).to receive(:ask).once.with('Password: ').and_return('secret')
26
- allow(Kontena::Client).to receive(:new).and_return(auth_client)
27
- allow(auth_client).to receive(:post)
28
- allow(subject).to receive(:request_server_info).and_return(true)
29
- subject.run(['http://localhost:8443'])
30
- end
31
- end
32
- end