magellan-cli 0.4.4 → 0.5.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -1
- data/README.md +14 -80
- data/Rakefile +9 -0
- data/lib/magellan/cli/base.rb +3 -3
- data/lib/magellan/cli/command.rb +8 -2
- data/lib/magellan/cli/locales/en.yml +74 -46
- data/lib/magellan/cli/locales/ja.yml +74 -46
- data/lib/magellan/cli/messaging/base.rb +75 -0
- data/lib/magellan/cli/messaging/http.rb +49 -0
- data/lib/magellan/cli/messaging/mqtt.rb +21 -0
- data/lib/magellan/cli/messaging.rb +18 -0
- data/lib/magellan/cli/reference_generator.rb +23 -6
- data/lib/magellan/cli/resources/base.rb +11 -10
- data/lib/magellan/cli/resources/client_version.rb +3 -2
- data/lib/magellan/cli/resources/cloudsql.rb +4 -4
- data/lib/magellan/cli/resources/deletable.rb +1 -1
- data/lib/magellan/cli/resources/organization.rb +1 -1
- data/lib/magellan/cli/resources/project.rb +2 -2
- data/lib/magellan/cli/resources/stage.rb +16 -16
- data/lib/magellan/cli/resources/team.rb +2 -2
- data/lib/magellan/cli/resources/transaction_router.rb +1 -1
- data/lib/magellan/cli/resources/worker.rb +5 -4
- data/lib/magellan/cli/version.rb +1 -1
- data/lib/magellan/cli.rb +2 -0
- data/magellan-cli.gemspec +1 -0
- data/reference/en/client_version.md +83 -0
- data/reference/en/cloudsql.md +93 -0
- data/reference/en/container.md +65 -0
- data/reference/en/image.md +65 -0
- data/reference/en/index.md +63 -0
- data/reference/en/organization.md +83 -0
- data/reference/en/project.md +92 -0
- data/reference/en/stage.md +181 -0
- data/reference/en/team.md +74 -0
- data/reference/en/worker.md +107 -0
- data/reference/ja/client_version.md +83 -0
- data/reference/ja/cloudsql.md +93 -0
- data/reference/ja/container.md +65 -0
- data/reference/ja/image.md +65 -0
- data/reference/ja/index.md +63 -0
- data/reference/ja/organization.md +83 -0
- data/reference/ja/project.md +92 -0
- data/reference/ja/stage.md +181 -0
- data/reference/ja/team.md +74 -0
- data/reference/ja/worker.md +107 -0
- data/spec/magellan/cli/messaging/http_headers.json +5 -0
- data/spec/magellan/cli/messaging/http_headers.yml +3 -0
- data/spec/magellan/cli/messaging/http_spec.rb +43 -0
- metadata +45 -1
@@ -0,0 +1,181 @@
|
|
1
|
+
---
|
2
|
+
layout: index
|
3
|
+
breadcrumb: <a href="/">Top</a> / <a href="/reference">Reference</a> / <a href="/reference/magellan-cli">magellan-cli</a> / stage
|
4
|
+
---
|
5
|
+
|
6
|
+
## コマンドの一覧
|
7
|
+
|
8
|
+
- [magellan-cli list](#list)
|
9
|
+
- [magellan-cli show [ID]](#show)
|
10
|
+
- [magellan-cli select NAME](#select)
|
11
|
+
- [magellan-cli deselect](#deselect)
|
12
|
+
- [magellan-cli delete NAME](#delete)
|
13
|
+
- [magellan-cli create NAME [-t development|staging|production|other]](#create)
|
14
|
+
- [magellan-cli planning](#planning)
|
15
|
+
- [magellan-cli current](#current)
|
16
|
+
- [magellan-cli prepare](#prepare)
|
17
|
+
- [magellan-cli repair](#repair)
|
18
|
+
- [magellan-cli update ATTRIBUTES](#update)
|
19
|
+
- [magellan-cli release_now](#release_now)
|
20
|
+
- [magellan-cli logs](#logs)
|
21
|
+
- [magellan-cli set_container_num NUM](#set_container_num)
|
22
|
+
- [magellan-cli reload](#reload)
|
23
|
+
- [magellan-cli help [COMMAND]](#help)
|
24
|
+
|
25
|
+
## 共通オプション
|
26
|
+
|
27
|
+
```text
|
28
|
+
Options:
|
29
|
+
-V, [--verbose]
|
30
|
+
-D, [--dryrun]
|
31
|
+
-v, [--version]
|
32
|
+
|
33
|
+
```
|
34
|
+
|
35
|
+
|
36
|
+
## コマンドの詳細
|
37
|
+
### <a name="list"></a>list
|
38
|
+
|
39
|
+
```text
|
40
|
+
magellan-cli list
|
41
|
+
```
|
42
|
+
|
43
|
+
stages の一覧を表示します
|
44
|
+
|
45
|
+
### <a name="show"></a>show
|
46
|
+
|
47
|
+
```text
|
48
|
+
magellan-cli show [ID]
|
49
|
+
```
|
50
|
+
|
51
|
+
IDで指定されたstageの詳細を表示します
|
52
|
+
|
53
|
+
### <a name="select"></a>select
|
54
|
+
|
55
|
+
```text
|
56
|
+
magellan-cli select NAME
|
57
|
+
```
|
58
|
+
|
59
|
+
NAMEを指定してstageを選択します
|
60
|
+
|
61
|
+
### <a name="deselect"></a>deselect
|
62
|
+
|
63
|
+
```text
|
64
|
+
magellan-cli deselect
|
65
|
+
```
|
66
|
+
|
67
|
+
stageの選択を解除します
|
68
|
+
|
69
|
+
### <a name="delete"></a>delete
|
70
|
+
|
71
|
+
```text
|
72
|
+
magellan-cli delete NAME
|
73
|
+
```
|
74
|
+
|
75
|
+
NAMEを指定してstageを削除します
|
76
|
+
|
77
|
+
### <a name="create"></a>create
|
78
|
+
|
79
|
+
```text
|
80
|
+
magellan-cli create NAME [-t development|staging|production|other]
|
81
|
+
```
|
82
|
+
|
83
|
+
```text
|
84
|
+
Options:
|
85
|
+
[-t=T] # -t development|staging|production. specify Stage Type
|
86
|
+
# Default: development
|
87
|
+
|
88
|
+
```
|
89
|
+
|
90
|
+
Create a new stage with Name and Type
|
91
|
+
|
92
|
+
### <a name="planning"></a>planning
|
93
|
+
|
94
|
+
```text
|
95
|
+
magellan-cli planning
|
96
|
+
```
|
97
|
+
|
98
|
+
次回リリースのステージの計画に切り替えます
|
99
|
+
|
100
|
+
### <a name="current"></a>current
|
101
|
+
|
102
|
+
```text
|
103
|
+
magellan-cli current
|
104
|
+
```
|
105
|
+
|
106
|
+
現在リリースされているステージの情報に切り替えます
|
107
|
+
|
108
|
+
### <a name="prepare"></a>prepare
|
109
|
+
|
110
|
+
```text
|
111
|
+
magellan-cli prepare
|
112
|
+
```
|
113
|
+
|
114
|
+
containersを準備します
|
115
|
+
|
116
|
+
### <a name="repair"></a>repair
|
117
|
+
|
118
|
+
```text
|
119
|
+
magellan-cli repair
|
120
|
+
```
|
121
|
+
|
122
|
+
stageの状態を修正します
|
123
|
+
|
124
|
+
### <a name="update"></a>update
|
125
|
+
|
126
|
+
```text
|
127
|
+
magellan-cli update ATTRIBUTES
|
128
|
+
```
|
129
|
+
|
130
|
+
選択したstageの属性を指定したATTRIBUTESで更新します
|
131
|
+
|
132
|
+
### <a name="release_now"></a>release_now
|
133
|
+
|
134
|
+
```text
|
135
|
+
magellan-cli release_now
|
136
|
+
```
|
137
|
+
|
138
|
+
```text
|
139
|
+
Options:
|
140
|
+
[-A] # -A 非同期モード。リリースの終了を待たずにコマンドを終了します
|
141
|
+
[-i=N] # -i 状態を取得する間隔を秒で指定します
|
142
|
+
# Default: 10
|
143
|
+
[-t=N] # -t タイムアウトを秒で指定します
|
144
|
+
# Default: 600
|
145
|
+
|
146
|
+
```
|
147
|
+
|
148
|
+
すぐにリリースを開始します
|
149
|
+
|
150
|
+
### <a name="logs"></a>logs
|
151
|
+
|
152
|
+
```text
|
153
|
+
magellan-cli logs
|
154
|
+
```
|
155
|
+
|
156
|
+
workersのログを表示します
|
157
|
+
|
158
|
+
### <a name="set_container_num"></a>set_container_num
|
159
|
+
|
160
|
+
```text
|
161
|
+
magellan-cli set_container_num NUM
|
162
|
+
```
|
163
|
+
|
164
|
+
選択されたimageのcontainersの数を設定します
|
165
|
+
|
166
|
+
### <a name="reload"></a>reload
|
167
|
+
|
168
|
+
```text
|
169
|
+
magellan-cli reload
|
170
|
+
```
|
171
|
+
|
172
|
+
最後にselectされたものをロードし直します
|
173
|
+
|
174
|
+
### <a name="help"></a>help
|
175
|
+
|
176
|
+
```text
|
177
|
+
magellan-cli help [COMMAND]
|
178
|
+
```
|
179
|
+
|
180
|
+
利用可能なコマンドの一覧か特定のコマンドの説明を表示します
|
181
|
+
|
@@ -0,0 +1,74 @@
|
|
1
|
+
---
|
2
|
+
layout: index
|
3
|
+
breadcrumb: <a href="/">Top</a> / <a href="/reference">Reference</a> / <a href="/reference/magellan-cli">magellan-cli</a> / team
|
4
|
+
---
|
5
|
+
|
6
|
+
## コマンドの一覧
|
7
|
+
|
8
|
+
- [magellan-cli list](#list)
|
9
|
+
- [magellan-cli show [ID]](#show)
|
10
|
+
- [magellan-cli select NAME](#select)
|
11
|
+
- [magellan-cli deselect](#deselect)
|
12
|
+
- [magellan-cli create NAME ROLE](#create)
|
13
|
+
- [magellan-cli help [COMMAND]](#help)
|
14
|
+
|
15
|
+
## 共通オプション
|
16
|
+
|
17
|
+
```text
|
18
|
+
Options:
|
19
|
+
-V, [--verbose]
|
20
|
+
-D, [--dryrun]
|
21
|
+
-v, [--version]
|
22
|
+
|
23
|
+
```
|
24
|
+
|
25
|
+
|
26
|
+
## コマンドの詳細
|
27
|
+
### <a name="list"></a>list
|
28
|
+
|
29
|
+
```text
|
30
|
+
magellan-cli list
|
31
|
+
```
|
32
|
+
|
33
|
+
teams の一覧を表示します
|
34
|
+
|
35
|
+
### <a name="show"></a>show
|
36
|
+
|
37
|
+
```text
|
38
|
+
magellan-cli show [ID]
|
39
|
+
```
|
40
|
+
|
41
|
+
IDで指定されたteamの詳細を表示します
|
42
|
+
|
43
|
+
### <a name="select"></a>select
|
44
|
+
|
45
|
+
```text
|
46
|
+
magellan-cli select NAME
|
47
|
+
```
|
48
|
+
|
49
|
+
NAMEを指定してteamを選択します
|
50
|
+
|
51
|
+
### <a name="deselect"></a>deselect
|
52
|
+
|
53
|
+
```text
|
54
|
+
magellan-cli deselect
|
55
|
+
```
|
56
|
+
|
57
|
+
teamの選択を解除します
|
58
|
+
|
59
|
+
### <a name="create"></a>create
|
60
|
+
|
61
|
+
```text
|
62
|
+
magellan-cli create NAME ROLE
|
63
|
+
```
|
64
|
+
|
65
|
+
NAMEとROLEを指定してteamを登録します
|
66
|
+
|
67
|
+
### <a name="help"></a>help
|
68
|
+
|
69
|
+
```text
|
70
|
+
magellan-cli help [COMMAND]
|
71
|
+
```
|
72
|
+
|
73
|
+
利用可能なコマンドの一覧か特定のコマンドの説明を表示します
|
74
|
+
|
@@ -0,0 +1,107 @@
|
|
1
|
+
---
|
2
|
+
layout: index
|
3
|
+
breadcrumb: <a href="/">Top</a> / <a href="/reference">Reference</a> / <a href="/reference/magellan-cli">magellan-cli</a> / worker
|
4
|
+
---
|
5
|
+
|
6
|
+
## コマンドの一覧
|
7
|
+
|
8
|
+
- [magellan-cli list](#list)
|
9
|
+
- [magellan-cli show [ID]](#show)
|
10
|
+
- [magellan-cli select NAME](#select)
|
11
|
+
- [magellan-cli deselect](#deselect)
|
12
|
+
- [magellan-cli delete NAME](#delete)
|
13
|
+
- [magellan-cli create NAME IMAGE](#create)
|
14
|
+
- [magellan-cli update ATTRIBUTES](#update)
|
15
|
+
- [magellan-cli prepare_images](#prepare_images)
|
16
|
+
- [magellan-cli help [COMMAND]](#help)
|
17
|
+
|
18
|
+
## 共通オプション
|
19
|
+
|
20
|
+
```text
|
21
|
+
Options:
|
22
|
+
-V, [--verbose]
|
23
|
+
-D, [--dryrun]
|
24
|
+
-v, [--version]
|
25
|
+
|
26
|
+
```
|
27
|
+
|
28
|
+
|
29
|
+
## コマンドの詳細
|
30
|
+
### <a name="list"></a>list
|
31
|
+
|
32
|
+
```text
|
33
|
+
magellan-cli list
|
34
|
+
```
|
35
|
+
|
36
|
+
workers の一覧を表示します
|
37
|
+
|
38
|
+
### <a name="show"></a>show
|
39
|
+
|
40
|
+
```text
|
41
|
+
magellan-cli show [ID]
|
42
|
+
```
|
43
|
+
|
44
|
+
IDで指定されたworkerの詳細を表示します
|
45
|
+
|
46
|
+
### <a name="select"></a>select
|
47
|
+
|
48
|
+
```text
|
49
|
+
magellan-cli select NAME
|
50
|
+
```
|
51
|
+
|
52
|
+
NAMEを指定してworkerを選択します
|
53
|
+
|
54
|
+
### <a name="deselect"></a>deselect
|
55
|
+
|
56
|
+
```text
|
57
|
+
magellan-cli deselect
|
58
|
+
```
|
59
|
+
|
60
|
+
workerの選択を解除します
|
61
|
+
|
62
|
+
### <a name="delete"></a>delete
|
63
|
+
|
64
|
+
```text
|
65
|
+
magellan-cli delete NAME
|
66
|
+
```
|
67
|
+
|
68
|
+
NAMEを指定してworkerを削除します
|
69
|
+
|
70
|
+
### <a name="create"></a>create
|
71
|
+
|
72
|
+
```text
|
73
|
+
magellan-cli create NAME IMAGE
|
74
|
+
```
|
75
|
+
|
76
|
+
```text
|
77
|
+
Options:
|
78
|
+
-A, [--attributes-yaml=ATTRIBUTES_YAML] # path to YAML file which defines attributes
|
79
|
+
|
80
|
+
```
|
81
|
+
|
82
|
+
NAMEとIMAGEを指定してworkerを登録します
|
83
|
+
|
84
|
+
### <a name="update"></a>update
|
85
|
+
|
86
|
+
```text
|
87
|
+
magellan-cli update ATTRIBUTES
|
88
|
+
```
|
89
|
+
|
90
|
+
選択したworkerの属性を指定したATTRIBUTESで更新します。ATTRIBUTESにはYAMLのファイル名かJSON文字列を指定可能です
|
91
|
+
|
92
|
+
### <a name="prepare_images"></a>prepare_images
|
93
|
+
|
94
|
+
```text
|
95
|
+
magellan-cli prepare_images
|
96
|
+
```
|
97
|
+
|
98
|
+
選択されたworkerのimagesを準備します
|
99
|
+
|
100
|
+
### <a name="help"></a>help
|
101
|
+
|
102
|
+
```text
|
103
|
+
magellan-cli help [COMMAND]
|
104
|
+
```
|
105
|
+
|
106
|
+
利用可能なコマンドの一覧か特定のコマンドの説明を表示します
|
107
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Magellan::Cli::Messaging::Http do
|
5
|
+
|
6
|
+
let(:cmd){ Magellan::Cli::Messaging::Http.new }
|
7
|
+
|
8
|
+
let(:core){ double(:core) }
|
9
|
+
before{ allow(cmd).to receive(:core).and_return(core) }
|
10
|
+
|
11
|
+
let(:success_res){ double(:res, code: 200, body: "SUCCESS!\n") }
|
12
|
+
let(:failure_res){ double(:res, code: 401, body: "NOT FOUND!\n") }
|
13
|
+
|
14
|
+
describe :get do
|
15
|
+
it "path only" do
|
16
|
+
expect(core).to receive(:request).with("/foo", :get, nil, {}).and_return(success_res)
|
17
|
+
cmd.get("/foo")
|
18
|
+
end
|
19
|
+
it "path only(401 error)" do
|
20
|
+
expect(core).to receive(:request).with("/foo", :get, nil, {}).and_return(failure_res)
|
21
|
+
cmd.get("/foo")
|
22
|
+
end
|
23
|
+
it "path and query string" do
|
24
|
+
expect(core).to receive(:request).with("/foo?bar=baz", :get, nil, {}).and_return(success_res)
|
25
|
+
cmd.get("/foo?bar=baz")
|
26
|
+
end
|
27
|
+
it "path and headers" do
|
28
|
+
expect(core).to receive(:request).with("/foo", :get, nil, {"bar" => "baz"}).and_return(success_res)
|
29
|
+
cmd.get("/foo", '{"bar":"baz"}')
|
30
|
+
end
|
31
|
+
|
32
|
+
let(:header_content){ YAML.load_file(File.expand_path("../http_headers.yml", __FILE__)) }
|
33
|
+
it "path and headers yaml file" do
|
34
|
+
expect(core).to receive(:request).with("/foo", :get, nil, header_content).and_return(success_res)
|
35
|
+
cmd.get("/foo", File.expand_path("../http_headers.yml", __FILE__))
|
36
|
+
end
|
37
|
+
it "path and headers json file" do
|
38
|
+
expect(core).to receive(:request).with("/foo", :get, nil, header_content).and_return(success_res)
|
39
|
+
cmd.get("/foo", File.expand_path("../http_headers.json", __FILE__))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magellan-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akm2000
|
@@ -114,6 +114,20 @@ dependencies:
|
|
114
114
|
- - "<="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: 2.0.8
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: libmagellan
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 0.2.2
|
124
|
+
type: :runtime
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 0.2.2
|
117
131
|
- !ruby/object:Gem::Dependency
|
118
132
|
name: bundler
|
119
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,6 +200,10 @@ files:
|
|
186
200
|
- lib/magellan/cli/locales/en.yml
|
187
201
|
- lib/magellan/cli/locales/ja.yml
|
188
202
|
- lib/magellan/cli/login.rb
|
203
|
+
- lib/magellan/cli/messaging.rb
|
204
|
+
- lib/magellan/cli/messaging/base.rb
|
205
|
+
- lib/magellan/cli/messaging/http.rb
|
206
|
+
- lib/magellan/cli/messaging/mqtt.rb
|
189
207
|
- lib/magellan/cli/reference_generator.rb
|
190
208
|
- lib/magellan/cli/resources.rb
|
191
209
|
- lib/magellan/cli/resources/base.rb
|
@@ -205,11 +223,34 @@ files:
|
|
205
223
|
- lib/magellan/cli/ssl.rb
|
206
224
|
- lib/magellan/cli/version.rb
|
207
225
|
- magellan-cli.gemspec
|
226
|
+
- reference/en/client_version.md
|
227
|
+
- reference/en/cloudsql.md
|
228
|
+
- reference/en/container.md
|
229
|
+
- reference/en/image.md
|
230
|
+
- reference/en/index.md
|
231
|
+
- reference/en/organization.md
|
232
|
+
- reference/en/project.md
|
233
|
+
- reference/en/stage.md
|
234
|
+
- reference/en/team.md
|
235
|
+
- reference/en/worker.md
|
236
|
+
- reference/ja/client_version.md
|
237
|
+
- reference/ja/cloudsql.md
|
238
|
+
- reference/ja/container.md
|
239
|
+
- reference/ja/image.md
|
240
|
+
- reference/ja/index.md
|
241
|
+
- reference/ja/organization.md
|
242
|
+
- reference/ja/project.md
|
243
|
+
- reference/ja/stage.md
|
244
|
+
- reference/ja/team.md
|
245
|
+
- reference/ja/worker.md
|
208
246
|
- spec/magellan/cli/Magellan.yml
|
209
247
|
- spec/magellan/cli/command_spec.rb
|
210
248
|
- spec/magellan/cli/file_access_spec.rb
|
211
249
|
- spec/magellan/cli/login_page.html
|
212
250
|
- spec/magellan/cli/login_spec.rb
|
251
|
+
- spec/magellan/cli/messaging/http_headers.json
|
252
|
+
- spec/magellan/cli/messaging/http_headers.yml
|
253
|
+
- spec/magellan/cli/messaging/http_spec.rb
|
213
254
|
- spec/magellan/cli/resources/client_version_spec.rb
|
214
255
|
- spec/magellan/cli/resources/organization_spec.rb
|
215
256
|
- spec/magellan/cli/resources/project_spec.rb
|
@@ -247,6 +288,9 @@ test_files:
|
|
247
288
|
- spec/magellan/cli/file_access_spec.rb
|
248
289
|
- spec/magellan/cli/login_page.html
|
249
290
|
- spec/magellan/cli/login_spec.rb
|
291
|
+
- spec/magellan/cli/messaging/http_headers.json
|
292
|
+
- spec/magellan/cli/messaging/http_headers.yml
|
293
|
+
- spec/magellan/cli/messaging/http_spec.rb
|
250
294
|
- spec/magellan/cli/resources/client_version_spec.rb
|
251
295
|
- spec/magellan/cli/resources/organization_spec.rb
|
252
296
|
- spec/magellan/cli/resources/project_spec.rb
|