gooddata 0.6.51 → 0.6.52

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.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/CHANGELOG.md +13 -1
  4. data/CONTRIBUTING.md +25 -0
  5. data/PULL_REQUEST_TEMPLATE.md +5 -0
  6. data/README.md +7 -4
  7. data/gooddata.gemspec +2 -3
  8. data/lib/gooddata.rb +1 -0
  9. data/lib/gooddata/bricks/base_downloader.rb +6 -6
  10. data/lib/gooddata/bricks/middleware/aws_middleware.rb +15 -5
  11. data/lib/gooddata/bricks/middleware/dwh_middleware.rb +15 -3
  12. data/lib/gooddata/bricks/middleware/gooddata_middleware.rb +13 -4
  13. data/lib/gooddata/bricks/middleware/logger_middleware.rb +3 -0
  14. data/lib/gooddata/exceptions/no_project_error.rb +5 -1
  15. data/lib/gooddata/goodzilla/goodzilla.rb +7 -6
  16. data/lib/gooddata/helpers/data_helper.rb +4 -4
  17. data/lib/gooddata/helpers/global_helpers_params.rb +61 -39
  18. data/lib/gooddata/lcm/actions/apply_custom_maql.rb +9 -0
  19. data/lib/gooddata/lcm/actions/associate_clients.rb +23 -4
  20. data/lib/gooddata/lcm/actions/collect_attrs.rb +56 -0
  21. data/lib/gooddata/lcm/actions/collect_ca_metrics.rb +53 -0
  22. data/lib/gooddata/lcm/actions/collect_clients.rb +25 -3
  23. data/lib/gooddata/lcm/actions/collect_meta.rb +83 -0
  24. data/lib/gooddata/lcm/actions/collect_segment_clients.rb +12 -4
  25. data/lib/gooddata/lcm/actions/collect_segments.rb +4 -4
  26. data/lib/gooddata/lcm/actions/collect_tagged_objects.rb +74 -0
  27. data/lib/gooddata/lcm/actions/create_segment_masters.rb +16 -30
  28. data/lib/gooddata/lcm/actions/ensure_release_table.rb +0 -3
  29. data/lib/gooddata/lcm/actions/ensure_segments.rb +1 -4
  30. data/lib/gooddata/lcm/actions/ensure_technical_users_domain.rb +5 -5
  31. data/lib/gooddata/lcm/actions/ensure_technical_users_project.rb +8 -5
  32. data/lib/gooddata/lcm/actions/hello_world.rb +0 -3
  33. data/lib/gooddata/lcm/actions/import_object_collections.rb +60 -0
  34. data/lib/gooddata/lcm/actions/print_actions.rb +0 -3
  35. data/lib/gooddata/lcm/actions/print_modes.rb +0 -3
  36. data/lib/gooddata/lcm/actions/print_types.rb +1 -4
  37. data/lib/gooddata/lcm/actions/provision_clients.rb +5 -5
  38. data/lib/gooddata/lcm/actions/purge_clients.rb +4 -10
  39. data/lib/gooddata/lcm/actions/segments_filter.rb +0 -6
  40. data/lib/gooddata/lcm/actions/synchronize_attribute_drillpaths.rb +8 -4
  41. data/lib/gooddata/lcm/actions/synchronize_cas.rb +61 -0
  42. data/lib/gooddata/lcm/actions/synchronize_clients.rb +9 -3
  43. data/lib/gooddata/lcm/actions/synchronize_color_palette.rb +13 -5
  44. data/lib/gooddata/lcm/actions/synchronize_etls_in_segment.rb +71 -17
  45. data/lib/gooddata/lcm/actions/synchronize_label_types.rb +8 -5
  46. data/lib/gooddata/lcm/actions/synchronize_ldm.rb +17 -8
  47. data/lib/gooddata/lcm/actions/synchronize_meta.rb +0 -3
  48. data/lib/gooddata/lcm/actions/synchronize_new_segments.rb +9 -4
  49. data/lib/gooddata/lcm/actions/synchronize_processes.rb +9 -5
  50. data/lib/gooddata/lcm/actions/synchronize_schedules.rb +15 -5
  51. data/lib/gooddata/lcm/actions/synchronize_tag_objects.rb +61 -0
  52. data/lib/gooddata/lcm/actions/update_release_table.rb +0 -3
  53. data/lib/gooddata/lcm/helpers/tags_helper.rb +35 -0
  54. data/lib/gooddata/lcm/lcm.rb +22 -4
  55. data/lib/gooddata/lcm/lcm2.rb +66 -13
  56. data/lib/gooddata/lcm/types/complex/update_preference.rb +1 -1
  57. data/lib/gooddata/mixins/md_finders.rb +4 -2
  58. data/lib/gooddata/mixins/md_object_indexer.rb +13 -3
  59. data/lib/gooddata/mixins/md_object_query.rb +8 -2
  60. data/lib/gooddata/models/blueprint/date_dimension.rb +6 -0
  61. data/lib/gooddata/models/blueprint/project_blueprint.rb +41 -11
  62. data/lib/gooddata/models/blueprint/project_builder.rb +20 -0
  63. data/lib/gooddata/models/blueprint/to_wire.rb +7 -0
  64. data/lib/gooddata/models/client.rb +6 -0
  65. data/lib/gooddata/models/domain.rb +6 -6
  66. data/lib/gooddata/models/from_wire.rb +5 -1
  67. data/lib/gooddata/models/metadata.rb +55 -9
  68. data/lib/gooddata/models/metadata/attribute.rb +19 -4
  69. data/lib/gooddata/models/metadata/dashboard.rb +15 -3
  70. data/lib/gooddata/models/metadata/dataset.rb +5 -2
  71. data/lib/gooddata/models/metadata/dimension.rb +4 -1
  72. data/lib/gooddata/models/metadata/fact.rb +9 -2
  73. data/lib/gooddata/models/metadata/folder.rb +4 -1
  74. data/lib/gooddata/models/metadata/metric.rb +11 -3
  75. data/lib/gooddata/models/metadata/report.rb +7 -2
  76. data/lib/gooddata/models/metadata/report_definition.rb +11 -4
  77. data/lib/gooddata/models/metadata/scheduled_mail.rb +4 -1
  78. data/lib/gooddata/models/metadata/variable.rb +7 -2
  79. data/lib/gooddata/models/model.rb +14 -3
  80. data/lib/gooddata/models/process.rb +10 -9
  81. data/lib/gooddata/models/project.rb +134 -36
  82. data/lib/gooddata/models/project_creator.rb +43 -20
  83. data/lib/gooddata/models/report_data_result.rb +6 -2
  84. data/lib/gooddata/models/schedule.rb +6 -3
  85. data/lib/gooddata/models/subscription.rb +8 -1
  86. data/lib/gooddata/models/user_filters/user_filter.rb +1 -0
  87. data/lib/gooddata/models/user_filters/user_filter_builder.rb +18 -4
  88. data/lib/gooddata/models/user_filters/variable_user_filter.rb +3 -1
  89. data/lib/gooddata/rest/client.rb +4 -6
  90. data/lib/gooddata/rest/connection.rb +10 -2
  91. data/lib/gooddata/version.rb +1 -1
  92. data/spec/data/blueprints/test_blueprint.json +1 -0
  93. data/spec/data/wire_models/test_blueprint.json +3 -0
  94. data/spec/data/workspace_table.csv +3 -0
  95. data/spec/environment/development.rb +4 -1
  96. data/spec/environment/environment.rb +1 -1
  97. data/spec/environment/staging.rb +5 -1
  98. data/spec/environment/testing.rb +5 -2
  99. data/spec/integration/blueprint_with_ca_spec.rb +56 -0
  100. data/spec/integration/clients_spec.rb +21 -0
  101. data/spec/integration/command_datawarehouse_spec.rb +7 -1
  102. data/spec/integration/create_from_template_spec.rb +9 -3
  103. data/spec/integration/project_spec.rb +7 -0
  104. data/spec/integration/segments_spec.rb +0 -53
  105. data/spec/integration/subscription_spec.rb +29 -4
  106. data/spec/integration/urn_date_dim_spec.rb +53 -0
  107. data/spec/integration/user_filters_spec.rb +6 -0
  108. data/spec/integration/variables_spec.rb +1 -2
  109. data/spec/spec_helper.rb +5 -30
  110. data/spec/unit/actions/collect_clients_spec.rb +38 -0
  111. data/spec/unit/actions/collect_meta_spec.rb +87 -0
  112. data/spec/unit/actions/collect_segment_clients_spec.rb +40 -0
  113. data/spec/unit/actions/collect_tagged_objects_spec.rb +110 -0
  114. data/spec/unit/actions/synchronize_etls_in_segment_spec.rb +51 -0
  115. data/spec/unit/bricks/middleware/aws_middelware_spec.rb +55 -1
  116. data/spec/unit/bricks/middleware/logger_middleware_spec.rb +15 -0
  117. data/spec/unit/helpers/data_helper_spec.rb +3 -5
  118. data/spec/unit/helpers/global_helpers_spec.rb +29 -0
  119. data/spec/unit/helpers_spec.rb +18 -1
  120. data/spec/unit/models/blueprint/project_blueprint_spec.rb +1 -23
  121. data/spec/unit/models/domain_spec.rb +19 -0
  122. data/spec/unit/models/metadata_spec.rb +34 -0
  123. data/spec/unit/models/schedule_spec.rb +31 -0
  124. data/spec/unit/models/to_manifest_spec.rb +10 -2
  125. data/spec/unit/models/unit_project_spec.rb +6 -1
  126. data/spec/unit/rest/polling_spec.rb +13 -1
  127. metadata +49 -31
@@ -0,0 +1,51 @@
1
+ # encoding: UTF-8
2
+ #
3
+ # Copyright (c) 2010-2017 GoodData Corporation. All rights reserved.
4
+ # This source code is licensed under the BSD-style license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ require 'gooddata/lcm/lcm2'
8
+ require 'gooddata/lcm/actions/synchronize_etls_in_segment'
9
+
10
+ describe GoodData::LCM2::SynchronizeETLsInSegment do
11
+ let(:gdc_gd_client) { double('gdc_gd_client') }
12
+ let(:domain) { double('domain') }
13
+ let(:segment) { double('segment') }
14
+
15
+ context 'when sync processes/schedules has problem' do
16
+ let(:result) do
17
+ {
18
+ syncedResult: {
19
+ errors: [
20
+ {
21
+ errorId: "91a811a7-8d3a-42d2-a1ba-024933f74021",
22
+ errorCode: "gdc.lcm.schedule.fatal_error",
23
+ message: "Error",
24
+ parameters: []
25
+ }
26
+ ]
27
+ }
28
+ }
29
+ end
30
+
31
+ let(:params) do
32
+ params = {
33
+ gdc_gd_client: gdc_gd_client,
34
+ organization: domain,
35
+ synchronize: [{ segment_id: 'some_segment_ids' }]
36
+
37
+ }
38
+ GoodData::LCM2.convert_to_smart_hash(params)
39
+ end
40
+
41
+ before do
42
+ allow(gdc_gd_client).to receive(:domain) { domain }
43
+ allow(domain).to receive(:segments) { segment }
44
+ allow(segment).to receive(:synchronize_processes) { result }
45
+ end
46
+
47
+ it 'raise error' do
48
+ expect { subject.class.call(params) }.to raise_error
49
+ end
50
+ end
51
+ end
@@ -9,6 +9,8 @@ require 'gooddata/bricks/bricks'
9
9
  require 'gooddata/bricks/middleware/aws_middleware'
10
10
 
11
11
  describe GoodData::Bricks::AWSMiddleware do
12
+ subject { GoodData::Bricks::AWSMiddleware.new(app: proc {}) }
13
+
12
14
  it 'should do nothing if the key "aws_client" is not there at all' do
13
15
  middleware = GoodData::Bricks::AWSMiddleware.new(app: ->(_params) { 'Doing nothing' })
14
16
  middleware.call({})
@@ -37,8 +39,60 @@ describe GoodData::Bricks::AWSMiddleware do
37
39
 
38
40
  it "should preapre aws middleware for aws_client param" do
39
41
  middleware = GoodData::Bricks::AWSMiddleware.new(app: lambda do |params|
40
- expect(params['aws_client']['s3_client']).to be_kind_of(AWS::S3)
42
+ expect(params['aws_client']['s3_client']).to be_kind_of(Aws::S3::Resource)
41
43
  end)
42
44
  middleware.call('aws_client' => { 'secret_access_key' => 'something', 'access_key_id' => 'something' })
43
45
  end
46
+
47
+ context 'when use_ssl parameter specified' do
48
+ let(:params) do
49
+ {
50
+ 'aws_client' => {
51
+ 'access_key_id' => 'foo',
52
+ 'secret_access_key' => 'bar',
53
+ 'region' => 'baz',
54
+ 'use_ssl' => 'false'
55
+ }
56
+ }
57
+ end
58
+
59
+ it 'raises an error' do
60
+ expect { subject.call(params) }.to raise_error(/use_ssl has been deprecated/)
61
+ end
62
+ end
63
+
64
+ context 'when a superfluous parameter is specified' do
65
+ let(:params) do
66
+ {
67
+ 'aws_client' => {
68
+ 'access_key_id' => 'foo',
69
+ 'secret_access_key' => 'bar',
70
+ 'region' => 'baz',
71
+ 'qux' => 'quux'
72
+ }
73
+ }
74
+ end
75
+
76
+ it 'raises an error' do
77
+ expect { subject.call(params) }.to raise_error(ArgumentError, /qux/)
78
+ end
79
+ end
80
+
81
+ context 'when region not specified' do
82
+ let(:params) do
83
+ {
84
+ 'aws_client' => {
85
+ 'access_key_id' => 'foo',
86
+ 'secret_access_key' => 'bar'
87
+ }
88
+ }
89
+ end
90
+
91
+ it 'it defaults to us-west-2' do
92
+ expect(Aws::S3::Resource).to receive(:new) do |params|
93
+ expect(params[:region]).to eq 'us-west-2'
94
+ end
95
+ subject.call(params)
96
+ end
97
+ end
44
98
  end
@@ -12,4 +12,19 @@ describe GoodData::Bricks::LoggerMiddleware do
12
12
  it "Has GoodData::Bricks::LoggerMiddleware class" do
13
13
  GoodData::Bricks::LoggerMiddleware.should_not be(nil)
14
14
  end
15
+
16
+ context 'when HTTP_LOGGING parameter set to true' do
17
+ let(:params) { { 'HTTP_LOGGING' => 'true' } }
18
+ let(:app) { double(:app) }
19
+
20
+ before do
21
+ subject.app = app
22
+ allow(app).to receive(:call)
23
+ end
24
+
25
+ it 'turns http logging on' do
26
+ expect(GoodData).to receive(:logging_http_on)
27
+ subject.call(params)
28
+ end
29
+ end
15
30
  end
@@ -9,14 +9,12 @@ require 'gooddata/helpers/data_helper'
9
9
  describe GoodData::Helpers::DataSource do
10
10
  before :each do
11
11
  @s3_client = double('s3_client')
12
- @buckets = double('buckets')
13
12
  @bucket = double('bucket')
14
13
  @objects = double('objects')
15
14
 
16
- allow(@s3_client).to receive(:buckets) { @buckets }
17
- allow(@buckets).to receive(:[]) { @bucket }
18
- allow(@bucket).to receive(:objects) { @objects }
19
- allow(@objects).to receive(:[]) { StringIO.new('aaa') }
15
+ allow(@s3_client).to receive(:bucket) { @bucket }
16
+ allow(@bucket).to receive(:object) { @objects }
17
+ allow(@objects).to receive(:get) { StringIO.new('aaa') }
20
18
 
21
19
  @ds = GoodData::Helpers::DataSource.new(type: :s3, bucket: 'some_bucket', key: 'some_key')
22
20
  end
@@ -110,6 +110,19 @@ describe GoodData::Helpers do
110
110
  )
111
111
  end
112
112
 
113
+ context 'when hidden parameters contain an invalid json' do
114
+ let(:invalid_json) { '{"password": "precious_secret"' }
115
+ let(:params) do
116
+ { GoodData::Helpers::ENCODED_HIDDEN_PARAMS_KEY.to_s => invalid_json }
117
+ end
118
+
119
+ it 'hides secrets in the error message' do
120
+ expect { GoodData::Helpers.decode_params(params) }.to raise_error(JSON::ParserError) do |e|
121
+ expect(e.message).not_to include('precious_secret')
122
+ end
123
+ end
124
+ end
125
+
113
126
  it 'should encode reference parameters in gd_encoded_params' do
114
127
  params = {
115
128
  'x' => 'y',
@@ -216,4 +229,20 @@ describe GoodData::Helpers do
216
229
  end
217
230
  end
218
231
  end
232
+
233
+ describe '.decode_params' do
234
+ it 'interpolates reference parameters in additional_hidden_params' do
235
+ params = {
236
+ 'gd_encoded_hidden_params' => '{ "additional_hidden_params": { "secret": "${my_password}" } }',
237
+ 'my_password' => "123"
238
+ }
239
+ expected_result = {
240
+ 'gd_encoded_hidden_params' => nil,
241
+ 'additional_hidden_params' => { 'secret' => '123' },
242
+ 'my_password' => '123'
243
+ }
244
+ result = GoodData::Helpers.decode_params(params, :resolve_reference_params => true)
245
+ expect(result).to eq(expected_result)
246
+ end
247
+ end
219
248
  end
@@ -62,6 +62,16 @@ describe GoodData::Helpers do
62
62
  expect(result).to eq(expected_result)
63
63
  end
64
64
 
65
+ it 'should not show reference parameter values when get error' do
66
+ params = {
67
+ 'secret' => 'you will not see it',
68
+ 'gd_encoded_params' => "{\"abc\": \"${secret}\",}"
69
+ }
70
+ expect { GoodData::Helpers.decode_params(params, resolve_reference_params: true) }.to raise_error do |e|
71
+ expect(e.message).not_to include('you will not see it')
72
+ end
73
+ end
74
+
65
75
  it 'ignore value of encoded params if its value is not collection or String when resolve reference params' do
66
76
  params = {
67
77
  'param' => 'value',
@@ -213,7 +223,14 @@ describe GoodData::Helpers do
213
223
  'number_param' => 5,
214
224
  'ads_password' => 'ads_123',
215
225
  'my_password' => 'login_123',
216
- 'gd_encoded_params' => { "login_username" => "login_user", "login_password" => "${my_password}", "ads_client" => { "username" => "ads_user", "password" => "${ads_password}" } }
226
+ 'gd_encoded_params' => {
227
+ "login_username" => "login_user",
228
+ "login_password" => "${my_password}",
229
+ "ads_client" => {
230
+ "username" => "ads_user",
231
+ "password" => "${ads_password}"
232
+ }
233
+ }
217
234
  }
218
235
  expected_result = {
219
236
  'param' => 'value',
@@ -356,28 +356,6 @@ describe GoodData::Model::ProjectBlueprint do
356
356
  expect(b_a.valid?).to eq true
357
357
  expect(b_a).to eq a_b
358
358
  end
359
-
360
- it "should fail if unable to merge date dimensions (they are different)." do
361
- a = GoodData::Model::ProjectBlueprint.build("p") do |p|
362
- p.add_date_dimension("created_on", title: 'title A')
363
- p.add_dataset('stuff') do |d|
364
- d.add_anchor('stuff_id')
365
- d.add_label('name', reference: 'stuff_id')
366
- d.add_date('created_on')
367
- end
368
- end
369
- b = GoodData::Model::ProjectBlueprint.build("p") do |p|
370
- p.add_date_dimension("created_on", title: 'title B')
371
- p.add_dataset('stuff') do |d|
372
- d.add_attribute('attr_id')
373
- d.add_label('attr_name', reference: 'attr_id')
374
- d.add_date('created_on')
375
- end
376
- end
377
- expect do
378
- a.merge(b)
379
- end.to raise_exception 'Unable to merge date dimensions created_on with defintion {:type=>:date_dimension, :urn=>nil, :id=>"created_on", :title=>"title B"} with {:type=>:date_dimension, :urn=>nil, :id=>"created_on", :title=>"title A"}'
380
- end
381
359
  end
382
360
 
383
361
  describe '#merge!' do
@@ -403,7 +381,7 @@ describe GoodData::Model::ProjectBlueprint do
403
381
  it "should be able to serialize itself to a hash" do
404
382
  ser = @blueprint.to_hash
405
383
  ser.is_a?(Hash)
406
- expect(ser.keys).to eq [:title, :datasets, :date_dimensions]
384
+ expect(ser.keys).to eq [:title, :datasets, :date_dimensions, :include_ca]
407
385
  end
408
386
 
409
387
  it "should be able to tell you whether a dataset is referencing any others including date dimensions" do
@@ -140,4 +140,23 @@ describe GoodData::Domain do
140
140
  expect(@domain.find_user_by_login(user.login).sso_provider).to eq old_sso_provider
141
141
  end
142
142
  end
143
+
144
+ describe '#clients' do
145
+ subject { GoodData::Domain.new('my_domain') }
146
+ let(:client) { double('client') }
147
+ let(:clients_response) { { 'client' => { 'id' => '123' } } }
148
+
149
+ before do
150
+ allow(client).to receive(:get).and_return(clients_response)
151
+ allow(subject).to receive(:client).and_return(client)
152
+ end
153
+
154
+ it 'accepts an integer as the id parameter' do
155
+ expect(client).to receive(:create).with(
156
+ GoodData::Client,
157
+ clients_response
158
+ )
159
+ subject.clients(123)
160
+ end
161
+ end
143
162
  end
@@ -103,4 +103,38 @@ describe GoodData::MdObject do
103
103
  expect(@instance.unlisted?).to be_falsey
104
104
  end
105
105
  end
106
+
107
+ describe '#find_by_tag' do
108
+ let(:tagged_metadata) { double('tagged_metadata') }
109
+
110
+ before do
111
+ allow(GoodData).to receive(:get_client_and_project)
112
+ allow(tagged_metadata).to receive(:tag_set).and_return(['tag1'])
113
+ allow(GoodData::MdObject).to receive(:[]).and_return([tagged_metadata])
114
+ end
115
+
116
+ context 'when the specified tag is present' do
117
+ it 'finds metadata by a single tag' do
118
+ result = GoodData::MdObject.find_by_tag('tag1')
119
+ expect(result).to eq [tagged_metadata]
120
+ end
121
+
122
+ it 'finds metadata by a comma-separated list of tags' do
123
+ result = GoodData::MdObject.find_by_tag('tag1, tag2')
124
+ expect(result).to eq [tagged_metadata]
125
+ end
126
+
127
+ it 'finds metadata by a an array of tags' do
128
+ result = GoodData::MdObject.find_by_tag(%w(tag1 tag2))
129
+ expect(result).to eq [tagged_metadata]
130
+ end
131
+ end
132
+
133
+ context 'when the specified tag is not present' do
134
+ it 'returns an empty array' do
135
+ result = GoodData::MdObject.find_by_tag('unknown_tag')
136
+ expect(result).to be_empty
137
+ end
138
+ end
139
+ end
106
140
  end
@@ -451,4 +451,35 @@ describe GoodData::Schedule do
451
451
  end
452
452
  end
453
453
  end
454
+
455
+ describe '#save' do
456
+ let(:model) do
457
+ {
458
+ schedule: {
459
+ params: { GRAPH: 'graph.grf' },
460
+ cron: 'foo',
461
+ timezone: 'bar',
462
+ type: 'baz',
463
+ links: { self: 'qux' }
464
+ }
465
+ }
466
+ end
467
+ let(:client) { double('client') }
468
+
469
+ subject { GoodData::Schedule.new(model) }
470
+
471
+ before do
472
+ allow(subject).to receive(:client)
473
+ .and_return(client)
474
+ end
475
+
476
+ it 'rewrites deprecated parameter GRAPH' do
477
+ expect(client).to receive(:put) do |_, body|
478
+ executable = body['schedule']['params']['EXECUTABLE']
479
+ expect(executable).to eq('graph.grf')
480
+ model
481
+ end
482
+ subject.save
483
+ end
484
+ end
454
485
  end
@@ -75,7 +75,11 @@ describe GoodData::Model::ToManifest do
75
75
  d.add_column(type: :date_fact, id: 'dt.date_fact')
76
76
  end
77
77
  end
78
- expect(blueprint.to_manifest.first['dataSetSLIManifest']['parts']).to include("referenceKey" => 1, "populates" => ["repo_label_1"], "mode" => "FULL", "columnName" => "repo_label_1")
78
+ expect(blueprint.to_manifest.first['dataSetSLIManifest']['parts'])
79
+ .to include("referenceKey" => 1,
80
+ "populates" => ["repo_label_1"],
81
+ "mode" => "FULL",
82
+ "columnName" => "repo_label_1")
79
83
 
80
84
  blueprint = GoodData::Model::ProjectBlueprint.build("my_bp") do |p|
81
85
  p.add_date_dimension("committed_on")
@@ -97,7 +101,11 @@ describe GoodData::Model::ToManifest do
97
101
  end
98
102
  end
99
103
 
100
- expect(blueprint.to_manifest.first['dataSetSLIManifest']['parts']).to include("referenceKey" => 1, "populates" => ["repo_label_2"], "mode" => "FULL", "columnName" => "repo_label_2")
104
+ expect(blueprint.to_manifest.first['dataSetSLIManifest']['parts'])
105
+ .to include("referenceKey" => 1,
106
+ "populates" => ["repo_label_2"],
107
+ "mode" => "FULL",
108
+ "columnName" => "repo_label_2")
101
109
  expect(blueprint.to_manifest[1]['dataSetSLIManifest']['parts']).to include("populates" => ["repo_label_2"], "mode" => "FULL", "columnName" => "repos", "referenceKey" => 1)
102
110
  end
103
111
 
@@ -103,7 +103,12 @@ describe GoodData::Project do
103
103
 
104
104
  it 'can handle case with info with login when he is in the domain' do
105
105
  # we have to provide users from project to be able to do this by login
106
- a, b = @p.resolve_roles({ login: 'john.doe+in_domain@gooddata.com', first_name: 'John' }, 'test_role', project_users: [], domain_users: @domain_members, roles: @roles, domain: @domain)
106
+ login = { login: 'john.doe+in_domain@gooddata.com', first_name: 'John' }
107
+ a, b = @p.resolve_roles(login, 'test_role',
108
+ project_users: [],
109
+ domain_users: @domain_members,
110
+ roles: @roles,
111
+ domain: @domain)
107
112
  expect(a).to eq "/gdc/account/profile/john.doe+in_domain@gooddata.com"
108
113
  expect(b).to eq ["/roles/1"]
109
114
  end
@@ -23,7 +23,19 @@ describe 'Behavior during polling and retries' do
23
23
  GoodData::Rest::Connection.const_set(:RETRY_TIME_INITIAL_VALUE, 0)
24
24
  GoodData::Rest::Client.const_set(:DEFAULT_SLEEP_INTERVAL, 0)
25
25
  stub_request(:get, "#{@server}/gdc")
26
- .to_return(:body => { "about" => { "links" => [{ "link" => "https://secure-di.gooddata.com/uploads", "summary" => "User data staging area.", "category" => "uploads", "title" => "user-uploads" }] } }.to_json, :headers => { 'Content-Type' => "application/json" })
26
+ .to_return(
27
+ :body => {
28
+ 'about' => {
29
+ 'links' => [{
30
+ 'link' => 'https://secure-di.gooddata.com/uploads',
31
+ 'summary' => 'User data staging area.',
32
+ 'category' => 'uploads',
33
+ 'title' => 'user-uploads'
34
+ }]
35
+ }
36
+ }.to_json,
37
+ :headers => { 'Content-Type' => 'application/json' }
38
+ )
27
39
  stub_request(:post, "#{@server}/gdc/account/login")
28
40
  .to_return(:body => { :userLogin => { :profile => "/profile/123" } }.to_json, :headers => { 'Content-Type' => "application/json" })
29
41
  stub_request(:get, "#{@server}/gdc/account/token")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gooddata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.51
4
+ version: 0.6.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kolesnikov
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-04-13 00:00:00.000000000 Z
14
+ date: 2017-07-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -215,42 +215,20 @@ dependencies:
215
215
  requirements:
216
216
  - - "~>"
217
217
  - !ruby/object:Gem::Version
218
- version: '2.7'
219
- type: :runtime
220
- prerelease: false
221
- version_requirements: !ruby/object:Gem::Requirement
222
- requirements:
223
- - - "~>"
224
- - !ruby/object:Gem::Version
225
- version: '2.7'
226
- - !ruby/object:Gem::Dependency
227
- name: nokogiri
228
- requirement: !ruby/object:Gem::Requirement
229
- requirements:
230
- - - "~>"
218
+ version: '2.9'
219
+ - - ">="
231
220
  - !ruby/object:Gem::Version
232
- version: 1.6.8
221
+ version: 2.9.42
233
222
  type: :runtime
234
223
  prerelease: false
235
224
  version_requirements: !ruby/object:Gem::Requirement
236
225
  requirements:
237
226
  - - "~>"
238
227
  - !ruby/object:Gem::Version
239
- version: 1.6.8
240
- - !ruby/object:Gem::Dependency
241
- name: aws-sdk-v1
242
- requirement: !ruby/object:Gem::Requirement
243
- requirements:
244
- - - "~>"
245
- - !ruby/object:Gem::Version
246
- version: '1.45'
247
- type: :runtime
248
- prerelease: false
249
- version_requirements: !ruby/object:Gem::Requirement
250
- requirements:
251
- - - "~>"
228
+ version: '2.9'
229
+ - - ">="
252
230
  - !ruby/object:Gem::Version
253
- version: '1.45'
231
+ version: 2.9.42
254
232
  - !ruby/object:Gem::Dependency
255
233
  name: docile
256
234
  requirement: !ruby/object:Gem::Requirement
@@ -447,6 +425,20 @@ dependencies:
447
425
  - - ">="
448
426
  - !ruby/object:Gem::Version
449
427
  version: '0'
428
+ - !ruby/object:Gem::Dependency
429
+ name: backports
430
+ requirement: !ruby/object:Gem::Requirement
431
+ requirements:
432
+ - - ">="
433
+ - !ruby/object:Gem::Version
434
+ version: '0'
435
+ type: :runtime
436
+ prerelease: false
437
+ version_requirements: !ruby/object:Gem::Requirement
438
+ requirements:
439
+ - - ">="
440
+ - !ruby/object:Gem::Version
441
+ version: '0'
450
442
  description: Use the GoodData::Client class to integrate GoodData into your own application
451
443
  or use the CLI to work with GoodData directly from the command line.
452
444
  email: pavel@gooddata.com
@@ -465,6 +457,7 @@ files:
465
457
  - ".yardopts"
466
458
  - CHANGELOG.md
467
459
  - CLI.md
460
+ - CONTRIBUTING.md
468
461
  - DEPENDENCIES.md
469
462
  - Dockerfile.jruby
470
463
  - Dockerfile.ruby
@@ -472,6 +465,7 @@ files:
472
465
  - Guardfile
473
466
  - LICENSE
474
467
  - LICENSE.rb
468
+ - PULL_REQUEST_TEMPLATE.md
475
469
  - README.md
476
470
  - Rakefile
477
471
  - TODO.md
@@ -576,15 +570,20 @@ files:
576
570
  - lib/gooddata/lcm/actions/apply_custom_maql.rb
577
571
  - lib/gooddata/lcm/actions/associate_clients.rb
578
572
  - lib/gooddata/lcm/actions/base_action.rb
573
+ - lib/gooddata/lcm/actions/collect_attrs.rb
574
+ - lib/gooddata/lcm/actions/collect_ca_metrics.rb
579
575
  - lib/gooddata/lcm/actions/collect_clients.rb
576
+ - lib/gooddata/lcm/actions/collect_meta.rb
580
577
  - lib/gooddata/lcm/actions/collect_segment_clients.rb
581
578
  - lib/gooddata/lcm/actions/collect_segments.rb
579
+ - lib/gooddata/lcm/actions/collect_tagged_objects.rb
582
580
  - lib/gooddata/lcm/actions/create_segment_masters.rb
583
581
  - lib/gooddata/lcm/actions/ensure_release_table.rb
584
582
  - lib/gooddata/lcm/actions/ensure_segments.rb
585
583
  - lib/gooddata/lcm/actions/ensure_technical_users_domain.rb
586
584
  - lib/gooddata/lcm/actions/ensure_technical_users_project.rb
587
585
  - lib/gooddata/lcm/actions/hello_world.rb
586
+ - lib/gooddata/lcm/actions/import_object_collections.rb
588
587
  - lib/gooddata/lcm/actions/print_actions.rb
589
588
  - lib/gooddata/lcm/actions/print_modes.rb
590
589
  - lib/gooddata/lcm/actions/print_types.rb
@@ -592,6 +591,7 @@ files:
592
591
  - lib/gooddata/lcm/actions/purge_clients.rb
593
592
  - lib/gooddata/lcm/actions/segments_filter.rb
594
593
  - lib/gooddata/lcm/actions/synchronize_attribute_drillpaths.rb
594
+ - lib/gooddata/lcm/actions/synchronize_cas.rb
595
595
  - lib/gooddata/lcm/actions/synchronize_clients.rb
596
596
  - lib/gooddata/lcm/actions/synchronize_color_palette.rb
597
597
  - lib/gooddata/lcm/actions/synchronize_etls_in_segment.rb
@@ -601,6 +601,7 @@ files:
601
601
  - lib/gooddata/lcm/actions/synchronize_new_segments.rb
602
602
  - lib/gooddata/lcm/actions/synchronize_processes.rb
603
603
  - lib/gooddata/lcm/actions/synchronize_schedules.rb
604
+ - lib/gooddata/lcm/actions/synchronize_tag_objects.rb
604
605
  - lib/gooddata/lcm/actions/update_release_table.rb
605
606
  - lib/gooddata/lcm/data/create_lcm_release.sql.erb
606
607
  - lib/gooddata/lcm/data/insert_into_lcm_release.sql.erb
@@ -611,6 +612,7 @@ files:
611
612
  - lib/gooddata/lcm/dsl/type_dsl.rb
612
613
  - lib/gooddata/lcm/helpers/check_helper.rb
613
614
  - lib/gooddata/lcm/helpers/helpers.rb
615
+ - lib/gooddata/lcm/helpers/tags_helper.rb
614
616
  - lib/gooddata/lcm/lcm.rb
615
617
  - lib/gooddata/lcm/lcm2.rb
616
618
  - lib/gooddata/lcm/types/base_type.rb
@@ -817,6 +819,7 @@ files:
817
819
  - spec/data/wire_models/nu_model.json
818
820
  - spec/data/wire_models/test_blueprint.json
819
821
  - spec/data/wire_test_project.json
822
+ - spec/data/workspace_table.csv
820
823
  - spec/environment/default.rb
821
824
  - spec/environment/development.rb
822
825
  - spec/environment/environment.rb
@@ -834,6 +837,7 @@ files:
834
837
  - spec/helpers/spec_helper.rb
835
838
  - spec/integration/ads_output_stage_spec.rb
836
839
  - spec/integration/blueprint_updates_spec.rb
840
+ - spec/integration/blueprint_with_ca_spec.rb
837
841
  - spec/integration/blueprint_with_grain_spec.rb
838
842
  - spec/integration/channel_configuration_spec.rb
839
843
  - spec/integration/clients_spec.rb
@@ -853,11 +857,17 @@ files:
853
857
  - spec/integration/schedule_spec.rb
854
858
  - spec/integration/segments_spec.rb
855
859
  - spec/integration/subscription_spec.rb
860
+ - spec/integration/urn_date_dim_spec.rb
856
861
  - spec/integration/user_filters_spec.rb
857
862
  - spec/integration/user_group_spec.rb
858
863
  - spec/integration/variables_spec.rb
859
864
  - spec/logging_in_logging_out_spec.rb
860
865
  - spec/spec_helper.rb
866
+ - spec/unit/actions/collect_clients_spec.rb
867
+ - spec/unit/actions/collect_meta_spec.rb
868
+ - spec/unit/actions/collect_segment_clients_spec.rb
869
+ - spec/unit/actions/collect_tagged_objects_spec.rb
870
+ - spec/unit/actions/synchronize_etls_in_segment_spec.rb
861
871
  - spec/unit/bricks/bricks_spec.rb
862
872
  - spec/unit/bricks/middleware/aws_middelware_spec.rb
863
873
  - spec/unit/bricks/middleware/bench_middleware_spec.rb
@@ -931,7 +941,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
931
941
  version: '0'
932
942
  requirements: []
933
943
  rubyforge_project:
934
- rubygems_version: 2.6.11
944
+ rubygems_version: 2.6.12
935
945
  signing_key:
936
946
  specification_version: 4
937
947
  summary: A convenient Ruby wrapper around the GoodData RESTful API
@@ -981,6 +991,7 @@ test_files:
981
991
  - spec/data/wire_models/nu_model.json
982
992
  - spec/data/wire_models/test_blueprint.json
983
993
  - spec/data/wire_test_project.json
994
+ - spec/data/workspace_table.csv
984
995
  - spec/environment/default.rb
985
996
  - spec/environment/development.rb
986
997
  - spec/environment/environment.rb
@@ -998,6 +1009,7 @@ test_files:
998
1009
  - spec/helpers/spec_helper.rb
999
1010
  - spec/integration/ads_output_stage_spec.rb
1000
1011
  - spec/integration/blueprint_updates_spec.rb
1012
+ - spec/integration/blueprint_with_ca_spec.rb
1001
1013
  - spec/integration/blueprint_with_grain_spec.rb
1002
1014
  - spec/integration/channel_configuration_spec.rb
1003
1015
  - spec/integration/clients_spec.rb
@@ -1017,11 +1029,17 @@ test_files:
1017
1029
  - spec/integration/schedule_spec.rb
1018
1030
  - spec/integration/segments_spec.rb
1019
1031
  - spec/integration/subscription_spec.rb
1032
+ - spec/integration/urn_date_dim_spec.rb
1020
1033
  - spec/integration/user_filters_spec.rb
1021
1034
  - spec/integration/user_group_spec.rb
1022
1035
  - spec/integration/variables_spec.rb
1023
1036
  - spec/logging_in_logging_out_spec.rb
1024
1037
  - spec/spec_helper.rb
1038
+ - spec/unit/actions/collect_clients_spec.rb
1039
+ - spec/unit/actions/collect_meta_spec.rb
1040
+ - spec/unit/actions/collect_segment_clients_spec.rb
1041
+ - spec/unit/actions/collect_tagged_objects_spec.rb
1042
+ - spec/unit/actions/synchronize_etls_in_segment_spec.rb
1025
1043
  - spec/unit/bricks/bricks_spec.rb
1026
1044
  - spec/unit/bricks/middleware/aws_middelware_spec.rb
1027
1045
  - spec/unit/bricks/middleware/bench_middleware_spec.rb