gooddata 2.1.12 → 2.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.gdc-ii-config.yaml +1 -1
  3. data/.sonar.settings +4 -0
  4. data/.travis.yml +78 -12
  5. data/CHANGELOG.md +37 -0
  6. data/Dockerfile +9 -3
  7. data/Dockerfile.jruby +11 -1
  8. data/LICENSE +30 -22
  9. data/LICENSE.rb +1 -1
  10. data/README.md +19 -1
  11. data/Rakefile +8 -1
  12. data/SDK_VERSION +1 -1
  13. data/VERSION +1 -1
  14. data/bin/test_projects_cleanup.rb +45 -3
  15. data/ci/postgresql/pom.xml +57 -0
  16. data/dev-gooddata-sso.pub.encrypted +40 -40
  17. data/docker-compose.lcm.yml +3 -0
  18. data/gdc_fossa_ruby_sdk.yaml +1 -0
  19. data/gooddata.gemspec +8 -5
  20. data/k8s/charts/lcm-bricks/Chart.yaml +1 -1
  21. data/k8s/charts/lcm-bricks/templates/prometheus/alertingRules.yaml +11 -1
  22. data/lcm.rake +10 -4
  23. data/lib/gooddata.rb +2 -0
  24. data/lib/gooddata/cloud_resources/{cloud_resouce_factory.rb → cloud_resource_factory.rb} +8 -0
  25. data/lib/gooddata/cloud_resources/cloud_resources.rb +1 -1
  26. data/lib/gooddata/cloud_resources/postgresql/drivers/.gitkeepme +0 -0
  27. data/lib/gooddata/cloud_resources/postgresql/postgresql_client.rb +107 -0
  28. data/lib/gooddata/commands/scaffold.rb +9 -10
  29. data/lib/gooddata/core/nil_logger.rb +3 -1
  30. data/lib/gooddata/helpers/data_helper.rb +1 -2
  31. data/lib/gooddata/helpers/global_helpers.rb +6 -5
  32. data/lib/gooddata/helpers/global_helpers_params.rb +2 -2
  33. data/lib/gooddata/lcm/actions/associate_clients.rb +8 -2
  34. data/lib/gooddata/lcm/actions/base_action.rb +0 -2
  35. data/lib/gooddata/lcm/actions/collect_tagged_objects.rb +2 -1
  36. data/lib/gooddata/lcm/actions/migrate_gdc_date_dimension.rb +116 -0
  37. data/lib/gooddata/lcm/actions/provision_clients.rb +31 -10
  38. data/lib/gooddata/lcm/actions/synchronize_ldm.rb +3 -1
  39. data/lib/gooddata/lcm/actions/synchronize_user_filters.rb +4 -0
  40. data/lib/gooddata/lcm/actions/synchronize_users.rb +7 -6
  41. data/lib/gooddata/lcm/lcm2.rb +1 -2
  42. data/lib/gooddata/lcm/types/base_type.rb +0 -2
  43. data/lib/gooddata/mixins/md_object_query.rb +8 -6
  44. data/lib/gooddata/models/blueprint/project_blueprint.rb +0 -2
  45. data/lib/gooddata/models/client.rb +14 -12
  46. data/lib/gooddata/models/data_source.rb +664 -0
  47. data/lib/gooddata/models/domain.rb +3 -2
  48. data/lib/gooddata/models/from_wire.rb +1 -0
  49. data/lib/gooddata/models/metadata/analytical_dashboard.rb +49 -0
  50. data/lib/gooddata/models/metadata/analytical_visualization_object.rb +30 -0
  51. data/lib/gooddata/models/metadata/scheduled_mail.rb +1 -1
  52. data/lib/gooddata/models/metadata/visualization_object.rb +50 -0
  53. data/lib/gooddata/models/process.rb +11 -3
  54. data/lib/gooddata/models/project.rb +104 -13
  55. data/lib/gooddata/models/user_filters/user_filter_builder.rb +0 -1
  56. data/lib/gooddata/models/user_group.rb +0 -1
  57. data/lib/gooddata/rest/connection.rb +6 -4
  58. data/lib/gooddata/rest/phmap.rb +1 -1
  59. data/rubydev_public.gpg.encrypted +51 -51
  60. data/rubydev_secret_keys.gpg.encrypted +109 -109
  61. metadata +21 -22
  62. data/DEPENDENCIES.md +0 -880
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21bb1e8b1a4eacb96fbf7aa25e22b54927a881fe3e04648f886b3ba132110c18
4
- data.tar.gz: 797c83b8e0c76d07b4ca976023ff58cc82a1fa1bc3e63ad68fee294e24f9ddde
3
+ metadata.gz: f00b6b202dc2bcd6af02eda57b326c0ccf222a57683dcf12bacf6b318a212ec7
4
+ data.tar.gz: a2f73ed25aa53295e06648efaf0961c5eed43fc3f9defae3b5e640a167c948a2
5
5
  SHA512:
6
- metadata.gz: bb2d421d223db058c231ec0d66b3325a97237a5dc050305e17bc27dcab78694c8237241fbca2dab60d45a8257cd5b8bfb875c2db532e38fa075cfc02cfb57b26
7
- data.tar.gz: 7ef77abd3d61fe54238b25b00a8d4ea05852fbc3474ae64aa54a770b739f3d64a5cc847e42cc993ac232423204ac9a354a4401882663dd8723a02f95fb1e91ba
6
+ metadata.gz: ac6f6fd25919099b44ecaa302d81dab084de7540b158e35e02bb05b970eb8bba466a77d0eba3403dca66160f8e4c9c2b02603af9a8249afe7a4ebad295f22774
7
+ data.tar.gz: c075fe2ed8d29d0612f6fc01687c1d0cedc690df830642ebdac369026f7fc3158a07fcfbadd8c079a3574e222713b0cbce60a7b6b189ac3f6b4ba950b877e7b0
data/.gdc-ii-config.yaml CHANGED
@@ -22,4 +22,4 @@ configFilesForUpdate:
22
22
  - '.gdc-ii-config-chart.yaml'
23
23
 
24
24
  customConstants:
25
- pipeline.deploy.testEnvironments: ['stg3', 'stg2', 'stg']
25
+ pipeline.deploy.testEnvironments: ['stg9', 'stg3', 'stg2', 'stg']
data/.sonar.settings ADDED
@@ -0,0 +1,4 @@
1
+ # Config scan necessary files/folder only
2
+ sonar.sources=bin,lib
3
+ sonar.tests=spec
4
+ sonar.exclusions=**/lib/templates/project/*.erb
data/.travis.yml CHANGED
@@ -73,23 +73,52 @@ jobs:
73
73
 
74
74
  - name: lcm integration (vcr) tests - e2e
75
75
  stage: before-merge
76
- script: bundle exec rspec spec/lcm/integration/lcm_end_to_end_spec.rb
76
+ script: bundle exec rspec spec/lcm/integration/spec/e2e/lcm_end_to_end_spec.rb
77
77
  env:
78
78
  - VCR_RECORD_MODE=none
79
79
  rvm: 2.3
80
80
 
81
81
  # AFTER MERGE
82
82
  # staging 1
83
- - &lcm-integration-tests
84
- name: staging1 - lcm integration tests
83
+ - &lcm-integration-e2e-tests
84
+ name: staging1 - lcm integration-e2e tests
85
85
  stage: after-merge
86
86
  script: |
87
87
  bundle exec rake -f lcm.rake docker:build
88
88
  bundle exec rake -f lcm.rake docker:bundle
89
- bundle exec rake -f lcm.rake test:docker:integration
89
+ bundle exec rake -f lcm.rake test:docker:integration-e2e
90
90
  env:
91
91
  - VCR_ON=false
92
92
  - GD_ENV=staging
93
+ - GD_MAX_RETRY=2
94
+ rvm: jruby-9.1.14
95
+ jdk: openjdk8
96
+
97
+ - &lcm-integration-release-tests
98
+ name: staging1 - lcm integration-release tests
99
+ stage: after-merge
100
+ script: |
101
+ bundle exec rake -f lcm.rake docker:build
102
+ bundle exec rake -f lcm.rake docker:bundle
103
+ bundle exec rake -f lcm.rake test:docker:integration-release
104
+ env:
105
+ - VCR_ON=false
106
+ - GD_ENV=staging
107
+ - GD_MAX_RETRY=2
108
+ rvm: jruby-9.1.14
109
+ jdk: openjdk8
110
+
111
+ - &lcm-integration-others-tests
112
+ name: staging1 - lcm integration-others tests
113
+ stage: after-merge
114
+ script: |
115
+ bundle exec rake -f lcm.rake docker:build
116
+ bundle exec rake -f lcm.rake docker:bundle
117
+ bundle exec rake -f lcm.rake test:docker:integration-others
118
+ env:
119
+ - VCR_ON=false
120
+ - GD_ENV=staging
121
+ - GD_MAX_RETRY=2
93
122
  rvm: jruby-9.1.14
94
123
  jdk: openjdk8
95
124
 
@@ -155,11 +184,26 @@ jobs:
155
184
  jdk: openjdk8
156
185
 
157
186
  # staging 2
158
- - <<: *lcm-integration-tests
159
- name: staging2 - lcm integration tests
187
+ - <<: *lcm-integration-e2e-tests
188
+ name: staging2 - lcm integration-e2e tests
160
189
  env:
161
190
  - GD_ENV=testing
162
191
  - VCR_ON=false
192
+ - GD_MAX_RETRY=2
193
+
194
+ - <<: *lcm-integration-release-tests
195
+ name: staging2 - lcm integration-release tests
196
+ env:
197
+ - GD_ENV=testing
198
+ - VCR_ON=false
199
+ - GD_MAX_RETRY=2
200
+
201
+ - <<: *lcm-integration-others-tests
202
+ name: staging2 - lcm integration-others tests
203
+ env:
204
+ - GD_ENV=testing
205
+ - VCR_ON=false
206
+ - GD_MAX_RETRY=2
163
207
 
164
208
  - <<: *lcm-slow-tests
165
209
  name: staging2 - lcm slow tests
@@ -192,11 +236,26 @@ jobs:
192
236
  - VCR_ON=false
193
237
 
194
238
  # staging 3
195
- - <<: *lcm-integration-tests
196
- name: staging3 - lcm integration tests
239
+ - <<: *lcm-integration-e2e-tests
240
+ name: staging3 - lcm integration-e2e tests
197
241
  env:
198
242
  - GD_ENV=development
199
243
  - VCR_ON=false
244
+ - GD_MAX_RETRY=2
245
+
246
+ - <<: *lcm-integration-release-tests
247
+ name: staging3 - lcm integration-release tests
248
+ env:
249
+ - GD_ENV=development
250
+ - VCR_ON=false
251
+ - GD_MAX_RETRY=2
252
+
253
+ - <<: *lcm-integration-others-tests
254
+ name: staging3 - lcm integration-others tests
255
+ env:
256
+ - GD_ENV=development
257
+ - VCR_ON=false
258
+ - GD_MAX_RETRY=2
200
259
 
201
260
  - <<: *lcm-slow-tests
202
261
  name: staging3 - lcm slow tests
@@ -233,16 +292,22 @@ jobs:
233
292
  - &cleanup
234
293
  stage: after-merge
235
294
  name: staging1 - test environment clean-up
236
- script: bundle exec ruby bin/test_projects_cleanup.rb -f
237
- env: GD_ENV=staging
295
+ script: travis_wait 30 bundle exec ruby bin/test_projects_cleanup.rb -f
296
+ env:
297
+ - GD_ENV=staging
298
+ - GD_MAX_RETRY=2
238
299
 
239
300
  - <<: *cleanup
240
301
  name: staging2 - test environment clean-up
241
- env: GD_ENV=testing
302
+ env:
303
+ - GD_ENV=testing
304
+ - GD_MAX_RETRY=2
242
305
 
243
306
  - <<: *cleanup
244
307
  name: staging3 - test environment clean-up
245
- env: GD_ENV=development
308
+ env:
309
+ - GD_ENV=development
310
+ - GD_MAX_RETRY=2
246
311
 
247
312
  # AFTER MERGE UNIT TESTS ON ALTERNATIVE PLATFORM
248
313
 
@@ -279,6 +344,7 @@ jobs:
279
344
  script: bundle exec rake test:unit
280
345
  os: osx
281
346
  rvm: jruby-9.1.14
347
+ osx_image: xcode9.4
282
348
 
283
349
  - stage: gem-release
284
350
  name: deploy MRI gem
data/CHANGELOG.md CHANGED
@@ -1,4 +1,41 @@
1
1
  # GoodData Ruby SDK Changelog
2
+ ## 2.1.19
3
+ - BUGFIX: MSF-20827 Fix gem-smoke-test failed when release ruby SDK
4
+ - BUGFIX: MSF-20826 Failure update license file when release ruby SDK
5
+
6
+ ## 2.1.18
7
+ - BUGFIX: TMA-1700 Failed Provisioning Brick created clients without ETL
8
+ - FEATURE: BCO-1300 Add model for analytical dashboard and visualization object
9
+ - FEATURE: MSF-20118 Support PostgreSQL as input for LCM provisioning bricks
10
+ - BUGFIX: TMA-999 Improve API call statistics log: add grouping on PID for roles
11
+ - CONFIG: TMA-1714 Ruby SDK travis build is failing
12
+ - BUGFIX: TMA-707 Provisioning brick does not log client deletion
13
+
14
+ ## 2.1.17
15
+ - BUGFIX:TMA-1704 - Enhance error message when not found clientId in source table
16
+ - BUGFIX: TMA-1694 [UsersBrick] Enhance messages add more log for missing users when running remove_from_organization
17
+ - FEATURE:TMA-1717 - replace Erbis by standard ERB
18
+ - BUGFIX: MSF-20222 Fixing issue using find function of Enumerator
19
+ - LR-428: Update the license file for Gooddata-ruby
20
+ - BUGFIX: TMA-1714 Fixed test failed due to deleting master project and increase timeout
21
+
22
+ ## 2.1.15
23
+ - FEATURE: BCO-1119 Introduce data sources API
24
+ - Upgrade active_support to be able used with Rails 6.1
25
+
26
+ ## 2.1.14
27
+ - BUGFIX: MSF-18892 Change default option of recurrency field to valid value
28
+ - FEATURE:TMA-1687 - Release/Rollout sync theme object
29
+ - CONFIG: MSF-18574 Add support notice to the readme
30
+ - BUGFIX: MSF-18223 - Update param placeholder pattern
31
+
32
+ ## 2.1.13
33
+ - FEATURE: TMA-1676 Support LCM release across domain
34
+ - FEATURE: TMA-1672 Support sync process with generic datasource
35
+ - FEATURE: MSF-17743 upgrade custom v2 for rollout brick
36
+ - BUGFIX: MSF-17975 Introduce gdcshare to lcm bricks
37
+ - BUGFIX: TMA-1673 Update params processing to accept dot and space
38
+
2
39
  ## 2.1.12
3
40
  - FEATURE: MSF-17621 Apply patched version for activesupport to fix vulnerable issue
4
41
  - CONFIG: SETI-4379 Add gdc-fossa configuration for gooddata-ruby
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM harbor.intgdc.com/tools/gdc-java-8-jre:2fce51b
1
+ FROM harbor.intgdc.com/tools/gdc-java-8-jre:89999e9
2
2
 
3
3
  ARG RVM_VERSION=stable
4
4
  ARG JRUBY_VERSION=9.2.5.0
@@ -6,7 +6,7 @@ ARG JRUBY_VERSION=9.2.5.0
6
6
  LABEL image_name="GDC LCM Bricks"
7
7
  LABEL maintainer="LCM <lcm@gooddata.com>"
8
8
  LABEL git_repository_url="https://github.com/gooddata/gooddata-ruby/"
9
- LABEL parent_image="harbor.intgdc.com/tools/gdc-java-8-jre:2fce51b"
9
+ LABEL parent_image="harbor.intgdc.com/tools/gdc-java-8-jre:89999e9"
10
10
 
11
11
  # which is required by RVM
12
12
  RUN yum install -y curl which patch make git maven \
@@ -14,7 +14,7 @@ RUN yum install -y curl which patch make git maven \
14
14
  && rm -rf /var/cache/yum
15
15
 
16
16
  # Install + verify RVM with gpg (https://rvm.io/rvm/security)
17
- RUN gpg2 --quiet --no-tty --logger-fd 1 --keyserver hkp://keys.gnupg.net \
17
+ RUN gpg2 --quiet --no-tty --logger-fd 1 --keyserver hkp://ipv4.pool.sks-keyservers.net \
18
18
  --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
19
19
  7D2BAF1CF37B13E2069D6956105BD0E739499BDB \
20
20
  && echo 409B6B1796C275462A1703113804BB82D39DC0E3:6: | \
@@ -37,7 +37,9 @@ RUN rvm install jruby-${JRUBY_VERSION} && gem update --system \
37
37
  WORKDIR /src
38
38
 
39
39
  RUN groupadd -g 48 apache \
40
+ && groupadd -g 65065 gdcshare \
40
41
  && useradd -u 48 -m --no-log-init -r -g apache -G rvm apache \
42
+ && usermod -a -G gdcshare apache \
41
43
  && chown apache: /src
42
44
 
43
45
  USER apache
@@ -62,6 +64,10 @@ RUN cp -rf ci/snowflake/target/*.jar ./lib/gooddata/cloud_resources/snowflake/dr
62
64
  RUN mvn -f ci/bigquery/pom.xml clean install -P binary-packaging
63
65
  RUN cp -rf ci/bigquery/target/*.jar ./lib/gooddata/cloud_resources/bigquery/drivers/
64
66
 
67
+ #build postgresql dependencies
68
+ RUN mvn -f ci/postgresql/pom.xml clean install -P binary-packaging
69
+ RUN cp -rf ci/postgresql/target/*.jar ./lib/gooddata/cloud_resources/postgresql/drivers/
70
+
65
71
  RUN bundle install
66
72
 
67
73
  ARG GIT_COMMIT=unspecified
data/Dockerfile.jruby CHANGED
@@ -2,7 +2,7 @@ FROM jruby:9.1-alpine
2
2
 
3
3
  MAINTAINER Tomas Korcak <korczis@gmail.com>
4
4
 
5
- RUN apk add --no-cache curl make gcc git g++ python linux-headers binutils-gold gnupg libstdc++
5
+ RUN apk add --no-cache curl make gcc git g++ python linux-headers binutils-gold gnupg libstdc++ postgresql postgresql-client openssl
6
6
 
7
7
  # Switch to directory with sources
8
8
  WORKDIR /src
@@ -20,3 +20,13 @@ ADD . .
20
20
  RUN keytool -importcert -alias gooddata-2008 -file "./data/2008.crt" -keystore $JAVA_HOME/lib/security/cacerts -trustcacerts -storepass 'changeit' -noprompt
21
21
  RUN keytool -importcert -alias gooddata-int -file "./data/new_ca.cer" -keystore $JAVA_HOME/lib/security/cacerts -trustcacerts -storepass 'changeit' -noprompt
22
22
  RUN keytool -importcert -alias gooddata-prod -file "data/new_prodgdc_ca.crt" -keystore $JAVA_HOME/lib/security/cacerts -trustcacerts -storepass 'changeit' -noprompt
23
+
24
+ ENV LANG en_US.utf8
25
+ RUN adduser -D -g '' gooddata
26
+ RUN rm -rf $HOME/spec/postgresql
27
+ RUN mkdir $HOME/spec/postgresql
28
+ RUN chmod -R 0750 $HOME/spec/postgresql
29
+ RUN chown gooddata $HOME/spec/postgresql
30
+ RUN mkdir /run/postgresql; chmod 1777 -R /run;
31
+ RUN mkdir $HOME/pre-exec.d; mkdir $HOME/pre-init.d; chmod -R 1755 $HOME/pre-exec.d; chmod -R 1755 $HOME/pre-exec.d
32
+ USER gooddata
data/LICENSE CHANGED
@@ -1,22 +1,30 @@
1
- (BSD License)
2
-
3
- Copyright (c) 2010-2017 GoodData Corporation. All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification, are permitted provided
6
- that the following conditions are met:
7
-
8
- * Redistributions of source code must retain the above copyright notice, this list of conditions and
9
- the following disclaimer.
10
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11
- and the following disclaimer in the documentation and/or other materials provided with the distribution.
12
- * Neither the name of the GoodData Corporation nor the names of its contributors may be used to endorse
13
- or promote products derived from this software without specific prior written permission.
14
-
15
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
16
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
17
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
18
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
+ GOODDATA LCM END USER LICENSE AGREEMENT
2
+
3
+ GoodData Corporation ("GoodData") provides this "LCM", hereafter referred to as the "Software", to you subject to the following terms and conditions. By using the Software you agree to the terms and conditions of this Agreement. If you do not agree with any of the following terms, then do not use the Software.
4
+
5
+ 1. Use Rights. Subject to the restrictions below, you may download and modify the Software contents for your use solely for the purpose of creating applications related to Your use of the GoodData subscription services platform (“Application(s)”). Open source software components provided with or used by the Software are licensed to you under the terms of the applicable license agreements included with such open source software components, which accompany this Software.
6
+
7
+ 2. No Duty to Support; Reservation of Rights. You expressly acknowledge that GoodData has no duty or obligation to support the Software, or to provide updates or bug fixes to the Software and that GoodData otherwise reserves all rights not expressly granted to you hereunder in connection with Software.
8
+
9
+ 3. Restrictions You agree that you will not (i) use the Software to create, design or develop any functionality other than as set forth above in Section 1; (ii) allow third parties other than those performing work solely on your behalf within the scope of the license herein to modify, create derivative works of, reverse engineer, reverse compile, or disassemble the Software; (iii) distribute, sell, lease, rent, lend, or sublicense any part of the Software to any third party except as incorporated into your Application; or (iv) upload or otherwise transmit any material containing software viruses or other computer code, files or programs designed to interrupt, destroy, or limit the functionality of any software or hardware.
10
+
11
+ The restrictions in this Section 3 shall not apply if and to the extent they contradict mandatory local law (including, but not limited to, law implementing the EC Software Directive) provided that, before you exercise any rights that you believe to be entitled to based on mandatory law, you provide GoodData with 30 days prior written notice and provide all reasonably requested information to allow GoodData to assess your claim and, at GoodData's sole discretion, to provide alternatives that reduce any adverse impact on GoodData's intellectual property or other rights.
12
+
13
+ 4. GoodData Ownership. Except for those portions licensed to GoodData by third parties, GoodData retains ownership of the Software, including without limitation all copyrights and other intellectual property rights therein. You may not remove, delete or modify any of the GoodData copyright statements in the Software.
14
+
15
+
16
+ 5. Trademarks. Your use of GoodData product names and trademarks shall comply with the branding guidelines that may be distributed by GoodData from time to time. You may not use GoodData product names and trademarks, however, except where GoodData provides you express, prior written permission to use such product names and trademarks. All other marks are the property of third parties subject to applicable use terms such entities may provide.
17
+ 6. Term, Termination, and Changes. This Agreement shall continue as long as you are in compliance with the terms specified herein or until otherwise terminated. You and or GoodData each may terminate this Agreement for any reason at any time. This Agreement shall automatically terminate upon the expiration or termination of the agreement that governs your use of the GoodData subscription services. You agree, upon termination, to destroy all copies of the Software within your possession or control. The Limitations of Warranties, Liability and Indemnification sections set out in this Agreement shall survive any termination or expiration of this Agreement.
18
+
19
+ 7. Limitations of Warranties and Liability
20
+ THE SOFTWARE AND ITS SOURCE CODE IS PROVIDED "AS IS" WITHOUT ANY WARRANTIES OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, GOODDATA DISCLAIMS ANY IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS. YOU MAY BE ABLE TO EXERCISE ADDITIONAL WARRANTY RIGHTS OFFERED BY THIRD PARTY COMMERCIAL SOFTWARE VENDORS WHOSE COMPONENTS ARE USED BY THE SOFTWARE. IN THOSE INSTANCES, YOUR SOLE REMEDY AND RECOURSE SHALL BE AGAINST THE LICENSORS OF SUCH COMMERCIAL SOFTWARE, AND NOT AGAINST GOODDATA.
21
+
22
+ TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL GOODDATA BE LIABLE FOR ANY LOST PROFITS OR BUSINESS OPPORTUNITIES, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, OR ANY OTHER INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR FROM THE SOFTWARE OR YOUR USE OF THE SOFTWARE, UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, PRODUCT LIABILITY, OR OTHERWISE. BECAUSE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE PRECEDING LIMITATION MAY NOT APPLY TO YOU. GOODDATA'S LIABILITY ARISING OUT OF THE SOFTWARE PROVIDED HEREUNDER WILL NOT, IN ANY EVENT, EXCEED US$100.00.
23
+
24
+ THE FOREGOING LIMITATIONS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, REGARDLESS OF WHETHER GOODDATA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF WHETHER ANY REMEDY FAILS OF ITS ESSENTIAL PURPOSE.
25
+
26
+ 8. Export Control. The Software is provided subject to the U.S. Export Administration Regulations and the regulations of other jurisdictions (e.g., the European Union). Diversion contrary to applicable law is prohibited. Without limiting the foregoing, you agree that (i) you are not acting on behalf of any person who is a citizen, national, or resident of, or who is controlled by the government of any country to which the United States or other applicable government body has prohibited export transactions (e.g., Iran, North Korea, etc.); (ii) you are not acting on behalf of, any person or entity listed on a relevant list of persons to whom export is prohibited (e.g., the U.S. Treasury Department list of Specially Designated Nationals and Blocked Persons, the U.S. Commerce Department Denied Persons List or Entity List, etc.); and (iii) you will not use the Software for any purpose prohibited by applicable law.
27
+
28
+ 9. Indemnification You agree to defend, indemnify and hold harmless GoodData, and any of its directors, officers, employees, affiliates, subsidiaries or agents, from and against any and all claims, losses, damages, liabilities and other expenses (including reasonable attorneys' fees), arising from or related to: i) your use of the Software; ii) any derivative works you create using Software source code, and iii) your breach of this Agreement.
29
+
30
+ 10. Governing Law These terms are governed by the laws of the State of California and the United States of America without regard to conflict of laws principles. You may not assign any part of this Agreement without the prior written consent of GoodData. Any attempted assignment without consent shall be void. These terms constitute the entire agreement between you and GoodData with respect to the Software and supersede all prior written or oral communications, understandings and agreements. Any waiver of these terms must be in writing to be effective. If any provision of these terms is found to be invalid or unenforceable, the remaining terms will continue to be valid and enforceable to the fullest extent permitted by law.
data/LICENSE.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
  #
3
- # Copyright (c) 2010-2017 GoodData Corporation. All rights reserved.
3
+ # Copyright (c) 2010-2021 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.
data/README.md CHANGED
@@ -9,6 +9,8 @@ The best documentation for the GoodData API can be found using these resources:
9
9
  * http://developer.gooddata.com/api
10
10
  * https://secure.gooddata.com/gdc
11
11
  * http://rubydoc.info/gems/gooddata/frames
12
+
13
+ Feel free to check out the [GoodData community website](http://community.gooddata.com/) if you have any questions about the GoodData Analytics platform, our API, or this library.
12
14
 
13
15
  ## Status
14
16
 
@@ -19,6 +21,21 @@ The best documentation for the GoodData API can be found using these resources:
19
21
  [![Build Status](https://travis-ci.org/gooddata/gooddata-ruby.png)](https://travis-ci.org/gooddata/gooddata-ruby)
20
22
  [![Coverage Status](https://coveralls.io/repos/gooddata/gooddata-ruby/badge.png)](https://coveralls.io/r/gooddata/gooddata-ruby)
21
23
 
24
+ ## Supported versions
25
+
26
+ In order to make the user experience with integrating GoodData Ruby SDK as smooth and secure as possible and to ensure that the SDK is using the latest features of the platform, we only provide support to the two most recent major versions of Ruby SDK.
27
+
28
+ The most recent majors will be supported in the following modes:
29
+
30
+ - The latest major version will receive all new functionality and all bug fixes.
31
+ - The previous major version will only receive fixes to critical issues and security fixes. These fixes will be applied on top of last released version of the previous major.
32
+ - GoodData customer support will provide support for the latest major and previous major version only.
33
+
34
+ - The customers are encouraged to always use the latest version of the Ruby SDK.
35
+ - In case of using older versions, the user might face API incompatibility, performance or security issues.
36
+
37
+ Please follow the installation instructions in the repository to update to the newest version.
38
+
22
39
  ## Install
23
40
 
24
41
  If you are using bundler, add
@@ -78,4 +95,5 @@ For full contributor info see [contributors page](https://github.com/gooddata/go
78
95
 
79
96
  ## Copyright
80
97
 
81
- Copyright (c) 2010 - 2018 GoodData Corporation and Thomas Watson Steen. See [LICENSE](/LICENSE) for details.
98
+ (c) 2010-2021 GoodData Corporation
99
+ This repository is governed by the terms and conditions in the LICENSE. This repository contains a number of open source packages detailed in NOTICES, including the GoodData Ruby SDK, which is licensed under the BSD-3-Clause license and contains additional open source components detailed in the file called LICENSE_FOR_RUBY_SDK_COMPONENT.
data/Rakefile CHANGED
@@ -33,7 +33,14 @@ namespace :gem do
33
33
  desc "Release gem version #{GoodData::VERSION} to rubygems"
34
34
  task :release do
35
35
  gem = "gooddata-#{GoodData::VERSION}.gem"
36
-
36
+ origin_license_file = 'LICENSE'
37
+ new_license_file = 'LICENSE_FOR_RUBY_SDK_COMPONENT.txt'
38
+ notices_file = 'NOTICES.txt'
39
+ File.delete(origin_license_file) if File.exist?(origin_license_file)
40
+ File.delete(notices_file) if File.exist?(notices_file)
41
+ puts "Deleted files: #{origin_license_file} and #{notices_file}"
42
+ File.rename(new_license_file, origin_license_file) if File.exists?(new_license_file)
43
+ puts "Renamed file #{new_license_file} to #{origin_license_file}"
37
44
  puts "Building #{gem} ..."
38
45
  res = `gem build ./gooddata.gemspec`
39
46
  file = res.match('File: (.*)')[1]
data/SDK_VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.12
1
+ 2.1.19
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.7.20
1
+ 3.7.26
@@ -1,6 +1,6 @@
1
1
  require 'optparse'
2
2
 
3
- example = 'Usage example: GD_ENV=testing GD_SPEC_PASSWORD=secret bundle exec ruby bin/test_projects_cleanup.rb'
3
+ example = 'Usage example: GD_ENV=testing GD_SPEC_PASSWORD= bundle exec ruby bin/test_projects_cleanup.rb'
4
4
 
5
5
  options = {}
6
6
  OptionParser.new do |opts|
@@ -22,6 +22,39 @@ require_relative '../spec/environment/environment'
22
22
  GoodData::Environment.load
23
23
  config = GoodData::Environment::ConnectionHelper::LCM_ENVIRONMENT
24
24
  secrets = GoodData::Environment::ConnectionHelper::SECRETS
25
+ default_domain = GoodData::Environment::ConnectionHelper::DEFAULT_DOMAIN
26
+
27
+ def delete_segment_by_title(title, segments, days = 14, force = false)
28
+ return if segments.empty?
29
+ dead_line = Time.now - days * 60 * 60 * 24
30
+
31
+ filtered_segments = segments.select do |s|
32
+ if s.id.match(title) && s.id.length > 14 && s.id[s.id.length-14..-1]
33
+ segment_created = s.id[s.id.length-14..-1]
34
+ created = Time.parse(segment_created) if segment_created
35
+
36
+ s if created.year >= Time.new.year && created < dead_line
37
+ end
38
+ end
39
+
40
+ filtered_segments.each do |segment|
41
+ begin
42
+ if force
43
+ segment.clients.each do |segment_client|
44
+ GoodData.logger.info("Deleting segment: #{segment.id} - client: #{segment_client.client_id}")
45
+ segment_client.dissociate
46
+ end
47
+
48
+ puts "Deleting segment: #{segment.id}"
49
+ segment && segment.delete(force: true)
50
+ else
51
+ puts "Would delete segment: #{segment.id}"
52
+ end
53
+ rescue RuntimeError, StandardError => ex
54
+ puts "Failed to delete segment #{segment.id}, reason: #{ex}"
55
+ end
56
+ end
57
+ end
25
58
 
26
59
  def delete_project_by_title(title, projects, days = 14, force = false)
27
60
  dead_line = Time.now - days * 60 * 60 * 24
@@ -73,8 +106,16 @@ def delete_ads_by_title(title, client, days = 14, force = false)
73
106
  puts "#{deleted} ADS instances with title \"#{title}\" #{'would be ' unless force}deleted."
74
107
  end
75
108
 
76
- def clean_up!(client, force, days)
109
+ def clean_up!(client, force, days, opts = {})
77
110
  projects = client.projects
111
+
112
+ if opts[:domain_id]
113
+ domain = client.domain(opts[:domain_id])
114
+
115
+ # segments id format: {title}_{hostname}_{datetime}
116
+ delete_segment_by_title(/CAR_DEMO_PREMIUM/, domain.segments, days, force)
117
+ end
118
+
78
119
  delete_project_by_title(/Insurance Demo Master/, projects, days, force)
79
120
  delete_project_by_title(/Car Demo Master/, projects, days, force)
80
121
  delete_project_by_title(/Insurance Demo Workspace/, projects, days, force)
@@ -117,7 +158,8 @@ prod_client = init_client(username, password, "https://#{config[:prod_server]}")
117
158
 
118
159
  force = options[:force]
119
160
  days = options[:days] || 3
161
+
120
162
  clean_up!(dev_client, force, days)
121
- clean_up!(prod_client, force, days)
163
+ clean_up!(prod_client, force, days, {domain_id: default_domain})
122
164
 
123
165
  dev_client.disconnect