goodot 0.0.2 → 0.0.3

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: 68a4982d131ccffdf963b588c7d0c27a2fc3e62f
4
- data.tar.gz: c193067bc11ac19ffba81222559a785d3ccca441
3
+ metadata.gz: 115c148e0a494e9af9c51aea80fb0e252f8b2acf
4
+ data.tar.gz: 3742920d60c1d5e047feccc6c6db7b1bb87114d7
5
5
  SHA512:
6
- metadata.gz: 18f336a3319acc80919d4daadd10ed4cf0bee0adef173fd77b726bea5f9ac376e20ff767f2c19744d1f048c91c044c0ac39c8328601915c4db75bbf1db9180de
7
- data.tar.gz: 9114d2bd830fcca93e3772e6895260326e8b13b09e971e5176757f9f9089f7ada574e4be05ce3f149668ca0cd32d3c883c6e7f14e5c1ffc478c919bb0158ad7f
6
+ metadata.gz: d38ee114d273bccab453133fd16236d7c178559e85210bc39376fe2eced4b56d9f8cd08ec62d0c89397df21da85af7c26387f877b9cab8dc455500c8381663cc
7
+ data.tar.gz: 23c8fe276b955751a5c9010cf87b8184f10869ce39277d2a4bd8e6e0993a2557bbc5b8acf62cb299dd5d57edb7cb13425753a7eabb59ea9f849233b214ffe1ed
data/README.md CHANGED
@@ -42,17 +42,15 @@ Will provide you table of clients in your application.
42
42
 
43
43
  Allows you to remove a particular client
44
44
 
45
- goodot clients remove --segment SEGMENT_ID
45
+ goodot clients remove --client CLIENT_ID
46
46
 
47
- By default it just disassociates the client from the segment but does not delete the project that was associated with the client. If you want to remove both the association between segment and client and also the client's project you can use
48
-
49
- goodot clients remove --client CLIENT_ID --delete-project
47
+ Be careful that this removes also the associated project. If you would like to save the project use `goodot reset` first.
50
48
 
51
49
  ###### reset
52
50
 
53
51
  Allows you to disassociate particular client's project from the client's definition. This means that during next "provision clients" phase (which you can invoke through `goodot app spin-up-projects` command) a fresh project will be created for that client.
54
52
 
55
- goodot clients reset --client SEGMENT_ID
53
+ goodot clients reset --client CLIENT_ID
56
54
 
57
55
  By default the project is just removed from client's defintion. If you also want to delete the project you can use.
58
56
 
@@ -139,6 +137,10 @@ Allows you to add a client to particular segment. Useful for populating the segm
139
137
 
140
138
  goodot app add-client -c CLIENT_ID -s SEGMENT_ID
141
139
 
140
+ You can also add a client with specific project
141
+
142
+ goodot app add-client -c CLIENT_ID -s SEGMENT_ID -p PROJECT_PID
143
+
142
144
  ###### spin-up-projects
143
145
 
144
146
  With command `goodot app add-client` you will create clients in a segment but they by default will not have a project assigned. This command will allow to spin a new project for you. The project is spun up off a release. The release is created by `goodot app synchronize`.
@@ -127,16 +127,26 @@ module GoodData
127
127
  add.desc 'Client ID'
128
128
  add.flag [:c, :client]
129
129
 
130
+ add.desc 'Project ID'
131
+ add.flag [:p, :project]
132
+
130
133
  add.action do |global_options, options, _args|
131
134
  domain = global_options[:gd_domain]
135
+ client = global_options[:gd_client]
132
136
  segment_id = options[:segment]
133
137
  client_id = options[:client]
138
+ project_id = options[:project]
134
139
  fail 'Segment needs to be provided' unless segment_id
135
140
  fail 'client ID needs to be provided.' unless client_id
136
141
 
137
142
  s = domain.segments(segment_id)
143
+ project = client.projects(project_id)
138
144
  begin
139
- c = s.create_client(id: client_id)
145
+ if project_id
146
+ c = s.create_client(id: client_id, project: project)
147
+ else
148
+ c = s.create_client(id: client_id)
149
+ end
140
150
  puts HighLine.color("client #{c.id} created!", :green)
141
151
  rescue RuntimeError => e
142
152
  raise create_api_error_message(e)
@@ -57,7 +57,7 @@ module GoodData
57
57
  domain = global_options[:gd_domain]
58
58
  client_name = options[:client]
59
59
  fail 'Client needs to be provided' unless client_name
60
- client = domain.clients(segment_name)
60
+ client = domain.clients(client_name)
61
61
  project = client.project
62
62
  client.delete
63
63
  project.delete if options[:d]
@@ -6,6 +6,6 @@
6
6
 
7
7
  module GoodData
8
8
  module Goodot
9
- VERSION = '0.0.2'.freeze
9
+ VERSION = '0.0.3'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goodot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Svarovsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-19 00:00:00.000000000 Z
11
+ date: 2016-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -140,7 +140,6 @@ files:
140
140
  - ".rspec"
141
141
  - DEPENDENCIES.md
142
142
  - Gemfile
143
- - Gemfile.lock
144
143
  - LICENSE
145
144
  - LICENSE.rb
146
145
  - README.md