gooddata 1.0.2 → 1.1.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 +5 -5
- data/.gitignore +1 -0
- data/CHANGELOG.md +20 -0
- data/CONTRIBUTING.md +12 -0
- data/README.md +5 -2
- data/Rakefile +0 -1
- data/dev-gooddata-sso.pub.encrypted +40 -0
- data/gooddata.gemspec +3 -3
- data/lib/gooddata/connection.rb +23 -13
- data/lib/gooddata/helpers/data_helper.rb +0 -1
- data/lib/gooddata/lcm/actions/apply_custom_maql.rb +8 -1
- data/lib/gooddata/lcm/actions/associate_clients.rb +8 -1
- data/lib/gooddata/lcm/actions/base_action.rb +10 -0
- data/lib/gooddata/lcm/actions/collect_ca_metrics.rb +7 -1
- data/lib/gooddata/lcm/actions/collect_client_projects.rb +3 -0
- data/lib/gooddata/lcm/actions/collect_clients.rb +3 -1
- data/lib/gooddata/lcm/actions/collect_data_product.rb +10 -2
- data/lib/gooddata/lcm/actions/collect_dynamic_schedule_params.rb +12 -1
- data/lib/gooddata/lcm/actions/collect_ldm_objects.rb +6 -2
- data/lib/gooddata/lcm/actions/collect_meta.rb +1 -1
- data/lib/gooddata/lcm/actions/collect_segment_clients.rb +8 -1
- data/lib/gooddata/lcm/actions/collect_segments.rb +6 -5
- data/lib/gooddata/lcm/actions/collect_tagged_objects.rb +1 -1
- data/lib/gooddata/lcm/actions/collect_users_brick_users.rb +10 -4
- data/lib/gooddata/lcm/actions/create_segment_masters.rb +12 -2
- data/lib/gooddata/lcm/actions/ensure_data_product.rb +10 -0
- data/lib/gooddata/lcm/actions/ensure_technical_users_domain.rb +5 -1
- data/lib/gooddata/lcm/actions/ensure_technical_users_project.rb +3 -0
- data/lib/gooddata/lcm/actions/execute_schedules.rb +10 -0
- data/lib/gooddata/lcm/actions/import_object_collections.rb +1 -1
- data/lib/gooddata/lcm/actions/provision_clients.rb +12 -2
- data/lib/gooddata/lcm/actions/purge_clients.rb +2 -0
- data/lib/gooddata/lcm/actions/rename_existing_client_projects.rb +3 -0
- data/lib/gooddata/lcm/actions/synchronize_attribute_drillpaths.rb +4 -1
- data/lib/gooddata/lcm/actions/synchronize_cas.rb +7 -1
- data/lib/gooddata/lcm/actions/synchronize_clients.rb +11 -1
- data/lib/gooddata/lcm/actions/synchronize_color_palette.rb +7 -1
- data/lib/gooddata/lcm/actions/synchronize_etls_in_segment.rb +12 -7
- data/lib/gooddata/lcm/actions/synchronize_label_types.rb +4 -1
- data/lib/gooddata/lcm/actions/synchronize_ldm.rb +18 -7
- data/lib/gooddata/lcm/actions/synchronize_meta.rb +9 -0
- data/lib/gooddata/lcm/actions/synchronize_new_segments.rb +11 -1
- data/lib/gooddata/lcm/actions/synchronize_processes.rb +7 -1
- data/lib/gooddata/lcm/actions/synchronize_schedules.rb +4 -1
- data/lib/gooddata/lcm/actions/synchronize_tag_objects.rb +6 -0
- data/lib/gooddata/lcm/actions/synchronize_user_filters.rb +60 -15
- data/lib/gooddata/lcm/actions/synchronize_user_groups.rb +7 -1
- data/lib/gooddata/lcm/actions/synchronize_users.rb +106 -3
- data/lib/gooddata/lcm/actions/update_release_table.rb +19 -0
- data/lib/gooddata/lcm/helpers/check_helper.rb +21 -6
- data/lib/gooddata/lcm/lcm2.rb +35 -22
- data/lib/gooddata/lcm/types/class/gd_logger.rb +23 -0
- data/lib/gooddata/lcm/types/class/gd_product.rb +23 -0
- data/lib/gooddata/lcm/types/class/gd_project.rb +23 -0
- data/lib/gooddata/lcm/types/class/smart_hash.rb +23 -0
- data/lib/gooddata/lcm/types/complex/segment.rb +1 -1
- data/lib/gooddata/lcm/types/scalar/integer.rb +2 -2
- data/lib/gooddata/lcm/types/special/any.rb +18 -0
- data/lib/gooddata/models/blueprint/dataset_blueprint.rb +1 -1
- data/lib/gooddata/models/blueprint/to_manifest.rb +1 -3
- data/lib/gooddata/models/blueprint/to_wire.rb +2 -1
- data/lib/gooddata/models/from_wire.rb +13 -1
- data/lib/gooddata/models/metadata/folder.rb +22 -0
- data/lib/gooddata/models/metadata/metric.rb +5 -8
- data/lib/gooddata/models/model.rb +1 -1
- data/lib/gooddata/models/process.rb +42 -32
- data/lib/gooddata/models/project.rb +19 -36
- data/lib/gooddata/models/project_creator.rb +3 -1
- data/lib/gooddata/models/project_role.rb +3 -4
- data/lib/gooddata/models/schedule.rb +0 -2
- data/lib/gooddata/models/user_filters/mandatory_user_filter.rb +9 -1
- data/lib/gooddata/models/user_filters/user_filter.rb +1 -2
- data/lib/gooddata/models/user_filters/user_filter_builder.rb +18 -6
- data/lib/gooddata/rest/client.rb +1 -2
- data/lib/gooddata/rest/connection.rb +12 -46
- data/lib/gooddata/rest/phmap.rb +101 -56
- data/lib/gooddata/version.rb +1 -1
- data/rubydev_public.gpg.encrypted +51 -0
- data/rubydev_secret_keys.gpg.encrypted +109 -0
- data/spec/data/user_filters.csv +2 -0
- data/spec/environment/default.rb +2 -2
- data/spec/environment/development.rb +1 -1
- data/spec/environment/staging.rb +2 -3
- data/spec/environment/testing.rb +4 -4
- data/spec/integration/connection_spec.rb +37 -0
- data/spec/integration/core/connection_spec.rb +1 -1
- data/spec/integration/core/logging_spec.rb +8 -6
- data/spec/integration/core/project_spec.rb +1 -1
- data/spec/integration/mandatory_user_filter_spec.rb +53 -0
- data/spec/integration/mixins/id_to_uri_spec.rb +17 -5
- data/spec/integration/models/label_spec.rb +9 -0
- data/spec/integration/models/metric_spec.rb +24 -0
- data/spec/integration/models/process_spec.rb +35 -0
- data/spec/integration/models/project_role_spec.rb +1 -1
- data/spec/integration/models/schedule_spec.rb +0 -8
- data/spec/integration/schedule_spec.rb +4 -6
- data/spec/integration/user_filters_spec.rb +20 -16
- data/spec/integration/user_group_spec.rb +1 -1
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/can_assign_a_custom_logger.yml +2287 -0
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/client_logs_when_given_custom_message.yml +2287 -0
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/has_the_request_id_logged_when_I_passed_it.yml +2287 -0
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logging_off/Disables_logging.yml +2287 -0
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logging_on/Enables_logging.yml +2287 -0
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project/Returns_project_assigned.yml +354 -0
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_nil.yml +299 -0
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_directly.yml +354 -0
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_using_project_ID.yml +354 -0
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_using_project_URL.yml +354 -0
- data/spec/integration/vcr_cassettes/GoodData_-_project/_with_project/Uses_project_specified.yml +354 -0
- data/spec/integration/vcr_cassettes/GoodData_Metric/all.yml +2065 -0
- data/spec/integration/vcr_cassettes/GoodData_Metric/should_be_able_to_update_folders.yml +119 -0
- data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/all.yml +9812 -0
- data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_get_json_containing_correct_id.yml +174 -0
- data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_return_nil_for_unknown_id.yml +58 -0
- data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_throw_BadRequest_for_-1.yml +63 -0
- data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_connect/Connects_using_username_and_password.yml +299 -0
- data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_disconnect/Connects_using_username_and_password.yml +299 -0
- data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_generate_request_id/Generates_a_non-empty_string.yml +2287 -0
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_/Should_list_user_groups_as_Array.yml +56 -0
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_add_members/Should_add_member.yml +315 -0
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_members/Should_return_members_as_array.yml +54 -0
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_remove_members/Should_remove_existing_members.yml +258 -0
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_save/updates_existing_group.yml +159 -0
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_set_members/Should_set_new_members.yml +158 -0
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/all.yml +809 -0
- data/spec/spec_helper.rb +46 -2
- data/spec/unit/actions/associate_clients_spec.rb +2 -1
- data/spec/unit/actions/collect_data_product_spec.rb +3 -1
- data/spec/unit/actions/collect_segment_clients_spec.rb +1 -0
- data/spec/unit/actions/create_segment_masters_spec.rb +1 -0
- data/spec/unit/actions/ensure_data_product_spec.rb +1 -0
- data/spec/unit/actions/ensure_technical_users_domain_spec.rb +2 -0
- data/spec/unit/actions/ensure_technical_users_project_spec.rb +4 -0
- data/spec/unit/actions/provision_clients_spec.rb +2 -1
- data/spec/unit/actions/synchronize_etls_in_segment_spec.rb +0 -6
- data/spec/unit/actions/synchronize_ldm_spec.rb +20 -7
- data/spec/unit/actions/synchronize_user_filters_spec.rb +21 -0
- data/spec/unit/helpers/check_helper_production_spec.rb +34 -0
- data/spec/unit/helpers/check_helper_spec.rb +97 -9
- data/spec/unit/lcm/lcm2_spec.rb +67 -3
- data/spec/unit/models/blueprint/to_wire_spec.rb +1 -0
- data/spec/unit/models/dataset_blueprint.rb +14 -0
- data/spec/unit/models/from_wire_spec.rb +20 -0
- data/spec/unit/models/model_spec.rb +10 -0
- data/spec/unit/models/to_manifest_spec.rb +29 -0
- data/spec/unit/models/user_filters/user_filter_builder_spec.rb +44 -6
- data/spec/unit/rest/phmap_spec.rb +117 -0
- data/spec/vcr_configurer.rb +63 -0
- metadata +293 -33
- data/lib/gooddata/lcm/actions/ensure_segments.rb +0 -32
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 87fd95bf9ef838870bdd5e260a82cdf926814248
|
|
4
|
+
data.tar.gz: d95f3d0ce97004d782dbba7b49436943be0d0849
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58bbb2765f2cca7f39b73505f9a4b104f3cae680b26feb92a7fe4a808ca39aa7e0d19c4b75c32e37c5bf5373919de72d07570c02231b6ce4dc65ea7dd5ce566f
|
|
7
|
+
data.tar.gz: 3322d7d0e58d3cb860ad3ceb715cd5fedf378e8e65a8f3897a39a9c9c5cf62d4a08554caec0b9e34fa51e2834e02fff486d31831f2b698773b9613c8eecd1668
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
# GoodData Ruby SDK Changelog
|
|
2
|
+
## 1.1.0
|
|
3
|
+
- fix project role spec for new role implementation (#1188)
|
|
4
|
+
- TMA-860: use new roles API (#1169)
|
|
5
|
+
- Avoid polling idle time in VCR tests
|
|
6
|
+
- Enable vcr for metric specs
|
|
7
|
+
- TMA-832: support for pluggable component process type
|
|
8
|
+
- TMA-900: setup vcr for logging_spec
|
|
9
|
+
- TMA-900: setup vcr for id_to_uri_spec
|
|
10
|
+
- TMA-900: allow vcr to match uploads requests
|
|
11
|
+
- TMA-900: setup vcr for project_spec
|
|
12
|
+
- TMA-900: add VCR to connection_spec
|
|
13
|
+
- TRIVIAL: add idea moudle to gitignore
|
|
14
|
+
- TMA-904: allow to enable/disable VCR completely by ENV
|
|
15
|
+
- TMA-895: MUFs work when shared between users
|
|
16
|
+
- TMA-868: deprecated flag now propagates the value to the replacement param if the type is compatible
|
|
17
|
+
- TMA-892: User filters brick dry run (#1156)
|
|
18
|
+
- * TMA-892: User filters brick dry run
|
|
19
|
+
- fix recovery from provision clients error
|
|
20
|
+
- make sso backwards compatible
|
|
21
|
+
|
|
2
22
|
## 1.0.2
|
|
3
23
|
- TMA-775: smart attribute polling
|
|
4
24
|
- TMA-809: Fix new visualization object in bricks
|
data/CONTRIBUTING.md
CHANGED
|
@@ -35,4 +35,16 @@ We use [Pronto](https://github.com/prontolabs/pronto) to detect code smells usin
|
|
|
35
35
|
[license](/LICENSE).
|
|
36
36
|
1. Use `GoodData.logger` for logging instead of `puts`.
|
|
37
37
|
|
|
38
|
+
## Integration tests
|
|
39
|
+
[Integration tests](spec/integration) can be run against different GoodData [environments](spec/environment) or with
|
|
40
|
+
[VCR](https://relishapp.com/vcr/vcr/docs).
|
|
41
|
+
|
|
42
|
+
### VCR test setup
|
|
43
|
+
When adding new integration test, always set `:vcr` metadata.
|
|
44
|
+
```ruby
|
|
45
|
+
describe 'New integration test', :vcr
|
|
46
|
+
```
|
|
47
|
+
The VCR `record` mode can be set via `VCR_RECORD_MODE` environment variable. Set it to `all` to make a new recording.
|
|
48
|
+
Please check the recorded payloads for possible sensitive data before submitting to github.
|
|
49
|
+
|
|
38
50
|
_Based on [GitLab's contribution guide](https://github.com/gitlabhq/gitlabhq/blob/master/CONTRIBUTING.md)._
|
data/README.md
CHANGED
|
@@ -59,11 +59,14 @@ Pavel Kolesnikov [ <mailto:pavel@gooddata.com> / [@koles](http://twitter.com/kol
|
|
|
59
59
|
|
|
60
60
|
**Actively developed and maintained by**
|
|
61
61
|
|
|
62
|
-
- [
|
|
63
|
-
- [
|
|
62
|
+
- [Jan Zdráhal](https://github.com/panjan) [ <mailto:jan.zdrahal@gooddata.com> ]
|
|
63
|
+
- [Jakub Mahnert](https://github.com/kubamahnert) [ <mailto:jakub.mahnert@gooddata.com> ]
|
|
64
|
+
- [Petr Gaďorek](https://github.com/Hahihula) [ <mailto:petr.gadorek@gooddata.com> ]
|
|
64
65
|
|
|
65
66
|
**Contributors**
|
|
66
67
|
|
|
68
|
+
- [Tomas Korcak](https://github.com/korczis) [ <mailto:korczis@gmail.com> / [@korczis](http://twitter.com/korczis) ]
|
|
69
|
+
- [Tomas Svarovsky](https://github.com/fluke777) [ <mailto:svarovsky.tomas@gmail.com> / [@fluke777](http://twitter.com/fluke777) ]
|
|
67
70
|
- [Patrick McConlogue](https://github.com/thnkr/)
|
|
68
71
|
- [Petr Cvengros](https://github.com/cvengros)
|
|
69
72
|
|
data/Rakefile
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
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
|
|
40
|
+
KF37CX0=
|
data/gooddata.gemspec
CHANGED
|
@@ -31,7 +31,6 @@ Gem::Specification.new do |s|
|
|
|
31
31
|
s.add_development_dependency 'bundler', "~> 1.14"
|
|
32
32
|
s.add_development_dependency 'license_finder', '~> 2.0'
|
|
33
33
|
s.add_development_dependency 'rake', '~> 11.1'
|
|
34
|
-
s.add_development_dependency 'rake-notes', '~> 0.2'
|
|
35
34
|
s.add_development_dependency 'redcarpet', '~> 3.1' if RUBY_PLATFORM != 'java'
|
|
36
35
|
s.add_development_dependency 'rspec', '~> 3.5'
|
|
37
36
|
s.add_development_dependency 'rspec-expectations', '~> 3.5'
|
|
@@ -39,16 +38,17 @@ Gem::Specification.new do |s|
|
|
|
39
38
|
s.add_development_dependency 'rubocop', '< 0.48' # TODO: remove it after dealing with new rules introduced in 0.48 version
|
|
40
39
|
s.add_development_dependency 'simplecov', '~> 0.12'
|
|
41
40
|
s.add_development_dependency 'webmock', '~> 1.21'
|
|
42
|
-
s.add_development_dependency 'yard', '~> 0.
|
|
41
|
+
s.add_development_dependency 'yard', '~> 0.9.11'
|
|
43
42
|
s.add_development_dependency 'yard-rspec', '~> 0.1'
|
|
44
43
|
s.add_development_dependency 'ZenTest', '~> 4.11'
|
|
45
44
|
s.add_development_dependency 'pry'
|
|
46
|
-
s.add_development_dependency 'activesupport', '~> 4.2.9'
|
|
47
45
|
s.add_development_dependency 'pronto', '~> 0.9.5' if RUBY_PLATFORM != 'java'
|
|
48
46
|
s.add_development_dependency 'pronto-rubocop', '~> 0.9.0' if RUBY_PLATFORM != 'java'
|
|
49
47
|
s.add_development_dependency 'pronto-reek', '~> 0.9.0' if RUBY_PLATFORM != 'java'
|
|
50
48
|
s.add_development_dependency 'pronto-flay', '~> 0.9.0' if RUBY_PLATFORM != 'java'
|
|
49
|
+
s.add_development_dependency 'vcr'
|
|
51
50
|
|
|
51
|
+
s.add_dependency 'activesupport', '~> 4.2.9'
|
|
52
52
|
s.add_dependency 'aws-sdk', '~> 2.9', '>= 2.9.42'
|
|
53
53
|
s.add_dependency 'docile', '~> 1.1'
|
|
54
54
|
s.add_dependency 'erubis', '~> 2.7'
|
data/lib/gooddata/connection.rb
CHANGED
|
@@ -66,7 +66,7 @@ module GoodData
|
|
|
66
66
|
# @param [Hash] opts Additional options
|
|
67
67
|
# @option opts [Fixnum] :validity Validity in seconds from 'now'
|
|
68
68
|
# @return [String] URL which can be used for SSO logging in
|
|
69
|
-
def sso_url(login, provider, opts = DEFAULT_SSO_OPTIONS)
|
|
69
|
+
def sso_url(login, provider, url, opts = DEFAULT_SSO_OPTIONS)
|
|
70
70
|
opts = DEFAULT_SSO_OPTIONS.merge(opts)
|
|
71
71
|
|
|
72
72
|
ts = DateTime.now.strftime('%s').to_i + opts[:valid]
|
|
@@ -83,21 +83,27 @@ module GoodData
|
|
|
83
83
|
file_json.rewind
|
|
84
84
|
file_signed = Tempfile.new('gooddata-sso-signed')
|
|
85
85
|
|
|
86
|
-
cmd = "gpg --no-tty --armor
|
|
86
|
+
cmd = "gpg --yes --no-tty --armor -u #{login} --output #{file_signed.path} --sign #{file_json.path}"
|
|
87
87
|
res = system(cmd)
|
|
88
88
|
fail 'Unable to sign json' unless res
|
|
89
89
|
|
|
90
90
|
file_signed.rewind
|
|
91
91
|
file_final = Tempfile.new('gooddata-sso-final')
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
recipient = url == GoodData::Rest::Connection::DEFAULT_URL ? 'secure@gooddata.com' : 'test@gooddata.com'
|
|
94
|
+
cmd = "gpg --yes --no-tty --trust-model always --armor --output #{file_final.path} --encrypt --recipient #{recipient} #{file_signed.path}"
|
|
94
95
|
res = system(cmd)
|
|
95
96
|
fail 'Unable to encrypt json' unless res
|
|
96
97
|
|
|
97
98
|
file_final.rewind
|
|
98
99
|
final = file_final.read
|
|
99
100
|
|
|
100
|
-
|
|
101
|
+
params = {
|
|
102
|
+
targetUrl: opts[:url],
|
|
103
|
+
ssoProvider: provider,
|
|
104
|
+
encryptedClaims: final
|
|
105
|
+
}
|
|
106
|
+
[url + '/gdc/account/customerlogin', params]
|
|
101
107
|
end
|
|
102
108
|
|
|
103
109
|
# Connect to GoodData using SSO
|
|
@@ -112,15 +118,19 @@ module GoodData
|
|
|
112
118
|
# @param [String] login Email address used for logging into gooddata
|
|
113
119
|
# @param [String] provider Name of SSO provider
|
|
114
120
|
# @return [GoodData::Rest::Client] Instance of REST client
|
|
115
|
-
def connect_sso(login, provider)
|
|
116
|
-
url = sso_url(login, provider)
|
|
117
|
-
|
|
118
|
-
params
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
def connect_sso(login, provider, url = GoodData::Rest::Connection::DEFAULT_URL, opts = {})
|
|
122
|
+
url, params = sso_url(login, provider, url)
|
|
123
|
+
|
|
124
|
+
RestClient::Request.execute(opts.merge(method: :post, url: url, payload: params)) do |response, _request, _result|
|
|
125
|
+
return Rest::Client.connect_sso(
|
|
126
|
+
opts.merge(
|
|
127
|
+
headers:
|
|
128
|
+
{
|
|
129
|
+
x_gdc_authsst: response.cookies['GDCAuthSST'],
|
|
130
|
+
x_gdc_authtt: response.cookies['GDCAuthTT']
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
)
|
|
124
134
|
end
|
|
125
135
|
end
|
|
126
136
|
end
|
|
@@ -102,7 +102,6 @@ module GoodData
|
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
def realize_s3(params)
|
|
105
|
-
params = GoodData::Helpers.stringify_keys(params)
|
|
106
105
|
s3_client = params['aws_client'] && params['aws_client']['s3_client']
|
|
107
106
|
raise 'AWS client not present. Perhaps S3Middleware is missing in the brick definition?' if !s3_client || !s3_client.respond_to?(:bucket)
|
|
108
107
|
bucket_name = @options[:bucket]
|
|
@@ -21,13 +21,19 @@ module GoodData
|
|
|
21
21
|
param :gdc_gd_client, instance_of(Type::GdClientType), required: true
|
|
22
22
|
|
|
23
23
|
description 'Organization Name'
|
|
24
|
-
param :organization, instance_of(Type::StringType), required:
|
|
24
|
+
param :organization, instance_of(Type::StringType), required: false
|
|
25
25
|
|
|
26
26
|
description 'Segments to manage'
|
|
27
27
|
param :segments, array_of(instance_of(Type::SegmentType)), required: true
|
|
28
28
|
|
|
29
29
|
description 'Should be custom MAQL DDL Applied'
|
|
30
30
|
param :apply_maql_ddl, instance_of(Type::BooleanType), required: false, default: false
|
|
31
|
+
|
|
32
|
+
description 'Domain'
|
|
33
|
+
param :domain, instance_of(Type::StringType), required: false
|
|
34
|
+
|
|
35
|
+
description 'DataProduct to manage'
|
|
36
|
+
param :data_product, instance_of(Type::GDDataProductType), required: false
|
|
31
37
|
end
|
|
32
38
|
|
|
33
39
|
RESULT_HEADER = [
|
|
@@ -43,6 +49,7 @@ module GoodData
|
|
|
43
49
|
client = params.gdc_gd_client
|
|
44
50
|
|
|
45
51
|
domain_name = params.organization || params.domain
|
|
52
|
+
fail "Either organisation or domain has to be specified in params" unless domain_name
|
|
46
53
|
domain = client.domain(domain_name) || fail("Invalid domain name specified - #{domain_name}")
|
|
47
54
|
data_product = params.data_product
|
|
48
55
|
|
|
@@ -16,7 +16,10 @@ module GoodData
|
|
|
16
16
|
param :gdc_gd_client, instance_of(Type::GdClientType), required: true
|
|
17
17
|
|
|
18
18
|
description 'Organization Name'
|
|
19
|
-
param :organization, instance_of(Type::StringType), required:
|
|
19
|
+
param :organization, instance_of(Type::StringType), required: false
|
|
20
|
+
|
|
21
|
+
description 'Domain'
|
|
22
|
+
param :domain, instance_of(Type::StringType), required: false
|
|
20
23
|
|
|
21
24
|
description 'Delete Extra Clients'
|
|
22
25
|
param :delete_extra, instance_of(Type::BooleanType), required: false, default: false
|
|
@@ -29,6 +32,9 @@ module GoodData
|
|
|
29
32
|
|
|
30
33
|
description 'Segments to provision'
|
|
31
34
|
param :segments_filter, array_of(instance_of(Type::StringType)), required: false
|
|
35
|
+
|
|
36
|
+
description 'DataProduct'
|
|
37
|
+
param :data_product, instance_of(Type::GDDataProductType), required: false
|
|
32
38
|
end
|
|
33
39
|
|
|
34
40
|
RESULT_HEADER = [
|
|
@@ -44,6 +50,7 @@ module GoodData
|
|
|
44
50
|
client = params.gdc_gd_client
|
|
45
51
|
|
|
46
52
|
domain_name = params.organization || params.domain
|
|
53
|
+
fail "Either organisation or domain has to be specified in params" unless domain_name
|
|
47
54
|
domain = client.domain(domain_name) || fail("Invalid domain name specified - #{domain_name}")
|
|
48
55
|
data_product = params.data_product
|
|
49
56
|
|
|
@@ -17,6 +17,16 @@ module GoodData
|
|
|
17
17
|
def check_params(specification, params)
|
|
18
18
|
Helpers.check_params(specification, params)
|
|
19
19
|
end
|
|
20
|
+
|
|
21
|
+
# This method is used to enable the possibility to read keys of params object
|
|
22
|
+
# which are not specified in the specification constant
|
|
23
|
+
# typically in case when method access params dynamically based on user input
|
|
24
|
+
def without_check(specification, params)
|
|
25
|
+
params.clear_filters # disables params validation
|
|
26
|
+
result = yield
|
|
27
|
+
params.setup_filters(specification) # enables params validation
|
|
28
|
+
result
|
|
29
|
+
end
|
|
20
30
|
end
|
|
21
31
|
end
|
|
22
32
|
end
|
|
@@ -13,7 +13,13 @@ module GoodData
|
|
|
13
13
|
|
|
14
14
|
PARAMS = define_params(self) do
|
|
15
15
|
description 'Client Used for Connecting to GD'
|
|
16
|
-
param :gdc_gd_client, instance_of(Type::GdClientType), required:
|
|
16
|
+
param :gdc_gd_client, instance_of(Type::GdClientType), required: false
|
|
17
|
+
|
|
18
|
+
description 'Client used to connecting to development domain'
|
|
19
|
+
param :development_client, instance_of(Type::GdClientType), required: true
|
|
20
|
+
|
|
21
|
+
description 'Synchronization Info'
|
|
22
|
+
param :synchronize, array_of(instance_of(Type::AnyType)), required: true, generated: true
|
|
17
23
|
end
|
|
18
24
|
|
|
19
25
|
class << self
|
|
@@ -21,6 +21,9 @@ module GoodData
|
|
|
21
21
|
|
|
22
22
|
description 'Segments to manage'
|
|
23
23
|
param :segments, array_of(instance_of(Type::SegmentType)), required: true
|
|
24
|
+
|
|
25
|
+
description 'DataProduct to manage'
|
|
26
|
+
param :data_product, instance_of(Type::GDDataProductType), required: false
|
|
24
27
|
end
|
|
25
28
|
|
|
26
29
|
RESULT_HEADER = [
|
|
@@ -77,7 +77,9 @@ module GoodData
|
|
|
77
77
|
clients = []
|
|
78
78
|
errors = []
|
|
79
79
|
data_source = GoodData::Helpers::DataSource.new(params.input_source)
|
|
80
|
-
input_data =
|
|
80
|
+
input_data = without_check(PARAMS, params) do
|
|
81
|
+
File.open(data_source.realize(params), 'r:UTF-8')
|
|
82
|
+
end
|
|
81
83
|
GoodData.logger.debug("Input data: #{input_data.read}")
|
|
82
84
|
GoodData.logger.debug("Segment names: #{segment_names}")
|
|
83
85
|
CSV.foreach(input_data, :headers => true, :return_headers => false, encoding: 'utf-8') do |row|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
# Copyright (c) 2010-2017 GoodData Corporation. All rights reserved.
|
|
4
4
|
# This source code is licensed under the BSD-style license found in the
|
|
5
5
|
# LICENSE file in the root directory of this source tree.
|
|
6
|
-
|
|
7
6
|
require_relative 'base_action'
|
|
8
7
|
|
|
9
8
|
module GoodData
|
|
@@ -17,6 +16,15 @@ module GoodData
|
|
|
17
16
|
|
|
18
17
|
description 'DataProduct to manage'
|
|
19
18
|
param :data_product, instance_of(Type::StringType), required: false
|
|
19
|
+
|
|
20
|
+
description 'Organization Name'
|
|
21
|
+
param :organization, instance_of(Type::StringType), required: false
|
|
22
|
+
|
|
23
|
+
description 'Domain'
|
|
24
|
+
param :domain, instance_of(Type::StringType), required: false
|
|
25
|
+
|
|
26
|
+
description 'Logger'
|
|
27
|
+
param :gdc_logger, instance_of(Type::GdLogger), required: true
|
|
20
28
|
end
|
|
21
29
|
|
|
22
30
|
RESULT_HEADER = [
|
|
@@ -28,6 +36,7 @@ module GoodData
|
|
|
28
36
|
params = params.to_hash
|
|
29
37
|
client = params.gdc_gd_client
|
|
30
38
|
domain_name = params.organization || params.domain
|
|
39
|
+
fail "Either organisation or domain has to be specified in params" unless domain_name
|
|
31
40
|
domain = client.domain(domain_name) || fail("Invalid domain name specified - #{domain_name}")
|
|
32
41
|
|
|
33
42
|
if params.key?(:data_product)
|
|
@@ -36,7 +45,6 @@ module GoodData
|
|
|
36
45
|
params.gdc_logger.info "Using data product 'default' since none was specified in brick parameters"
|
|
37
46
|
data_product_id = 'default'
|
|
38
47
|
end
|
|
39
|
-
|
|
40
48
|
data_product = domain.data_products(data_product_id)
|
|
41
49
|
results = [
|
|
42
50
|
{
|
|
@@ -17,6 +17,15 @@ module GoodData
|
|
|
17
17
|
|
|
18
18
|
description 'Dynamic Params'
|
|
19
19
|
param :dynamic_params, instance_of(Type::HashType), required: false
|
|
20
|
+
|
|
21
|
+
description 'Client Id Column'
|
|
22
|
+
param :client_id_column, instance_of(Type::StringType), required: false
|
|
23
|
+
|
|
24
|
+
description 'Name Column'
|
|
25
|
+
param :param_name_column, instance_of(Type::StringType), required: false
|
|
26
|
+
|
|
27
|
+
description 'Value Column'
|
|
28
|
+
param :param_value_column, instance_of(Type::StringType), required: false
|
|
20
29
|
end
|
|
21
30
|
|
|
22
31
|
class << self
|
|
@@ -31,7 +40,9 @@ module GoodData
|
|
|
31
40
|
|
|
32
41
|
input_source = params.dynamic_params.input_source
|
|
33
42
|
data_source = GoodData::Helpers::DataSource.new(input_source)
|
|
34
|
-
input_data =
|
|
43
|
+
input_data = without_check(PARAMS, params) do
|
|
44
|
+
File.open(data_source.realize(params), 'r:UTF-8')
|
|
45
|
+
end
|
|
35
46
|
GoodData.logger.debug("Input data: #{input_data.read}")
|
|
36
47
|
|
|
37
48
|
schedule_params = {}
|
|
@@ -12,7 +12,7 @@ module GoodData
|
|
|
12
12
|
DESCRIPTION = "Collect all objects in LDM: attributes (include CAs), facts, datasets"
|
|
13
13
|
|
|
14
14
|
PARAMS = define_params(self) do
|
|
15
|
-
description '
|
|
15
|
+
description 'Client used to connecting to development domain'
|
|
16
16
|
param :development_client, instance_of(Type::GdClientType), required: true
|
|
17
17
|
|
|
18
18
|
description 'Synchronization Info'
|
|
@@ -28,7 +28,11 @@ module GoodData
|
|
|
28
28
|
synchronize = params.synchronize.pmap do |info|
|
|
29
29
|
from = info.from
|
|
30
30
|
from_project = development_client.projects(from) || fail("Invalid 'from' project specified - '#{from}'")
|
|
31
|
-
|
|
31
|
+
datasets = from_project.datasets.to_a
|
|
32
|
+
# TMA-836 - reading objects from datasets includes deprecated ones
|
|
33
|
+
attributes = datasets.map(&:attribute_uris).flatten
|
|
34
|
+
facts = datasets.map(&:fact_uris).flatten
|
|
35
|
+
objects = (from_project.labels.to_a + datasets).map(&:uri) + attributes + facts
|
|
32
36
|
|
|
33
37
|
info[:transfer_uris] ||= []
|
|
34
38
|
info[:transfer_uris] += objects
|
|
@@ -19,7 +19,7 @@ module GoodData
|
|
|
19
19
|
description 'Production Tag Names'
|
|
20
20
|
param :production_tag, instance_of(Type::StringType), required: false, deprecated: true, replacement: :production_tags
|
|
21
21
|
|
|
22
|
-
description '
|
|
22
|
+
description 'Client used to connecting to development domain'
|
|
23
23
|
param :development_client, instance_of(Type::GdClientType), required: true
|
|
24
24
|
|
|
25
25
|
description 'Synchronization Info'
|