gooddata 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.document +0 -0
- data/.flayignore +2 -0
- data/.travis.yml +24 -7
- data/.yardopts +0 -0
- data/CHANGELOG.md +125 -1
- data/CLI.md +0 -0
- data/Dockerfile.jruby +7 -2
- data/Dockerfile.ruby +1 -1
- data/Gemfile +0 -0
- data/Guardfile +0 -0
- data/Rakefile +23 -9
- data/TODO.md +0 -0
- data/bin/gitflow-init.sh +8 -0
- data/ci.rake +3 -3
- data/data/2008.crt +39 -0
- data/data/new_ca.cer +22 -0
- data/dependency_decisions.yml +0 -0
- data/docker-compose.lcm.yml +31 -0
- data/docker-compose.yml +4 -2
- data/gooddata.gemspec +3 -3
- data/lcm.rake +288 -0
- data/lib/gooddata.rb +1 -0
- data/lib/gooddata/bricks/base_downloader.rb +1 -1
- data/lib/gooddata/bricks/brick.rb +0 -1
- data/lib/gooddata/bricks/middleware/aws_middleware.rb +1 -1
- data/lib/gooddata/bricks/middleware/logger_middleware.rb +1 -1
- data/lib/gooddata/bricks/pipeline.rb +67 -0
- data/lib/gooddata/bricks/provisioning_brick.rb +18 -0
- data/lib/gooddata/bricks/release_brick.rb +18 -0
- data/lib/gooddata/bricks/rollout_brick.rb +14 -0
- data/lib/gooddata/bricks/user_filters_brick.rb +13 -0
- data/lib/gooddata/bricks/users_brick.rb +13 -0
- data/lib/gooddata/core/logging.rb +1 -1
- data/lib/gooddata/exceptions/maql_execution.rb +1 -1
- data/lib/gooddata/extensions/string.rb +0 -0
- data/lib/gooddata/lcm/actions/associate_clients.rb +34 -8
- data/lib/gooddata/lcm/actions/collect_data_product.rb +8 -1
- data/lib/gooddata/lcm/actions/collect_segment_clients.rb +13 -23
- data/lib/gooddata/lcm/actions/collect_segments.rb +10 -0
- data/lib/gooddata/lcm/actions/synchronize_clients.rb +3 -1
- data/lib/gooddata/lcm/actions/synchronize_ldm.rb +61 -34
- data/lib/gooddata/lcm/actions/synchronize_user_filters.rb +6 -4
- data/lib/gooddata/lcm/actions/update_release_table.rb +4 -12
- data/lib/gooddata/lcm/dsl/params_dsl.rb +0 -4
- data/lib/gooddata/lcm/dsl/type_dsl.rb +0 -4
- data/lib/gooddata/lcm/helpers/check_helper.rb +1 -1
- data/lib/gooddata/lcm/lcm2.rb +0 -2
- data/lib/gooddata/lcm/types/special/enum.rb +6 -0
- data/lib/gooddata/lcm/types/special/enum/synchronize_ldm.rb +20 -0
- data/lib/gooddata/lcm/types/special/types.rb +1 -1
- data/lib/gooddata/mixins/is_folder.rb +0 -0
- data/lib/gooddata/mixins/to_json.rb +0 -0
- data/lib/gooddata/mixins/uri_getter.rb +0 -0
- data/lib/gooddata/models/project_creator.rb +38 -30
- data/lib/gooddata/models/user_filters/user_filter_builder.rb +1 -0
- data/lib/gooddata/rest/README.md +0 -0
- data/lib/gooddata/version.rb +1 -1
- data/lib/templates/bricks/brick.rb.erb +0 -0
- data/lib/templates/bricks/main.rb.erb +0 -0
- data/lib/templates/project/Goodfile.erb +0 -0
- data/lib/templates/project/data/commits.csv +0 -0
- data/lib/templates/project/data/devs.csv +0 -0
- data/lib/templates/project/data/repos.csv +0 -0
- data/lib/templates/project/model/model.rb.erb +0 -0
- metadata +21 -451
- data/lib/gooddata/lcm/actions/ensure_data_product.rb +0 -63
- data/spec/.rubocop.yml +0 -16
- data/spec/bricks/bricks_spec.rb +0 -110
- data/spec/bricks/default-config.json +0 -8
- data/spec/data/.gooddata +0 -4
- data/spec/data/blueprints/additional_dataset_module.json +0 -32
- data/spec/data/blueprints/attribute_sort_order_blueprint.json +0 -72
- data/spec/data/blueprints/big_blueprint_not_pruned.json +0 -2079
- data/spec/data/blueprints/invalid_blueprint.json +0 -103
- data/spec/data/blueprints/m_n_model.json +0 -104
- data/spec/data/blueprints/model_module.json +0 -25
- data/spec/data/blueprints/test_blueprint.json +0 -39
- data/spec/data/blueprints/test_project_model_spec.json +0 -106
- data/spec/data/cc/data/source/commits.csv +0 -4
- data/spec/data/cc/data/source/devs.csv +0 -4
- data/spec/data/cc/data/source/repos.csv +0 -3
- data/spec/data/cc/devel.prm +0 -0
- data/spec/data/cc/graph/graph.grf +0 -11
- data/spec/data/cc/workspace.prm +0 -19
- data/spec/data/column_based_permissions.csv +0 -7
- data/spec/data/column_based_permissions2.csv +0 -6
- data/spec/data/dynamic_schedule_params_table.csv +0 -7
- data/spec/data/gd_gse_data_blueprint.json +0 -1371
- data/spec/data/gd_gse_data_manifest.json +0 -1424
- data/spec/data/gd_gse_data_model.json +0 -1772
- data/spec/data/gooddata_version_process/gooddata_version.rb +0 -9
- data/spec/data/gooddata_version_process/gooddata_version.zip +0 -0
- data/spec/data/hello_world_process/hello_world.rb +0 -9
- data/spec/data/hello_world_process/hello_world.zip +0 -0
- data/spec/data/integration_model.json +0 -252
- data/spec/data/integration_policies.csv +0 -9134
- data/spec/data/line_based_permissions.csv +0 -3
- data/spec/data/manifests/test_blueprint.json +0 -32
- data/spec/data/manifests/test_project.json +0 -107
- data/spec/data/reports/left_attr_report.json +0 -108
- data/spec/data/reports/metric_only_one_line.json +0 -83
- data/spec/data/reports/report_1.json +0 -197
- data/spec/data/reports/top_attr_report.json +0 -108
- data/spec/data/ruby_params_process/ruby_params.rb +0 -9
- data/spec/data/ruby_process/deep_files/deep_stuff.txt +0 -1
- data/spec/data/ruby_process/process.rb +0 -8
- data/spec/data/ruby_process/stuff.txt +0 -1
- data/spec/data/superfluous_titles_view.json +0 -81
- data/spec/data/test-ci-data.csv +0 -2
- data/spec/data/user_filters.csv +0 -2
- data/spec/data/users.csv +0 -12
- data/spec/data/wire_models/attribute_sort_by_model.json +0 -73
- data/spec/data/wire_models/model_view.json +0 -1775
- data/spec/data/wire_models/nu_model.json +0 -3046
- data/spec/data/wire_models/test_blueprint.json +0 -66
- data/spec/data/wire_test_project.json +0 -150
- data/spec/data/workspace_table.csv +0 -3
- data/spec/environment/default.rb +0 -43
- data/spec/environment/development.rb +0 -32
- data/spec/environment/environment.rb +0 -38
- data/spec/environment/production.rb +0 -27
- data/spec/environment/staging.rb +0 -32
- data/spec/environment/testing.rb +0 -32
- data/spec/helpers/appstore_project_helper.rb +0 -221
- data/spec/helpers/blueprint_helper.rb +0 -27
- data/spec/helpers/cli_helper.rb +0 -38
- data/spec/helpers/connection_helper.rb +0 -43
- data/spec/helpers/constants.rb +0 -32
- data/spec/helpers/crypto_helper.rb +0 -19
- data/spec/helpers/csv_helper.rb +0 -20
- data/spec/helpers/process_helper.rb +0 -35
- data/spec/helpers/project_helper.rb +0 -74
- data/spec/helpers/schedule_helper.rb +0 -33
- data/spec/helpers/spec_helper.rb +0 -17
- data/spec/integration/ads_output_stage_spec.rb +0 -45
- data/spec/integration/blueprint_updates_spec.rb +0 -107
- data/spec/integration/blueprint_with_ca_spec.rb +0 -56
- data/spec/integration/blueprint_with_grain_spec.rb +0 -74
- data/spec/integration/channel_configuration_spec.rb +0 -67
- data/spec/integration/clients_spec.rb +0 -164
- data/spec/integration/command_datawarehouse_spec.rb +0 -45
- data/spec/integration/command_projects_spec.rb +0 -32
- data/spec/integration/commands/command_projects_spec.rb +0 -22
- data/spec/integration/connection_spec.rb +0 -37
- data/spec/integration/core/connection_spec.rb +0 -56
- data/spec/integration/core/logging_spec.rb +0 -132
- data/spec/integration/core/project_spec.rb +0 -54
- data/spec/integration/create_from_template_spec.rb +0 -29
- data/spec/integration/create_project_spec.rb +0 -27
- data/spec/integration/date_dim_switch_spec.rb +0 -154
- data/spec/integration/deprecated_load_spec.rb +0 -60
- data/spec/integration/full_process_schedule_spec.rb +0 -367
- data/spec/integration/full_project_spec.rb +0 -592
- data/spec/integration/helpers_spec.rb +0 -16
- data/spec/integration/lcm_spec.rb +0 -54
- data/spec/integration/mandatory_user_filter_spec.rb +0 -53
- data/spec/integration/mixins/id_to_uri_spec.rb +0 -56
- data/spec/integration/models/data_product_spec.rb +0 -71
- data/spec/integration/models/domain_spec.rb +0 -162
- data/spec/integration/models/invitation_spec.rb +0 -17
- data/spec/integration/models/label_spec.rb +0 -49
- data/spec/integration/models/membership_spec.rb +0 -127
- data/spec/integration/models/metadata/report_spec.rb +0 -54
- data/spec/integration/models/metric_spec.rb +0 -24
- data/spec/integration/models/params_spec.rb +0 -118
- data/spec/integration/models/process_spec.rb +0 -35
- data/spec/integration/models/profile_spec.rb +0 -210
- data/spec/integration/models/project_role_spec.rb +0 -94
- data/spec/integration/models/project_spec.rb +0 -225
- data/spec/integration/models/schedule_spec.rb +0 -477
- data/spec/integration/models/unit_project_spec.rb +0 -130
- data/spec/integration/over_to_user_filters_spec.rb +0 -98
- data/spec/integration/partial_md_export_import_spec.rb +0 -41
- data/spec/integration/project_spec.rb +0 -381
- data/spec/integration/rest_spec.rb +0 -214
- data/spec/integration/schedule_spec.rb +0 -611
- data/spec/integration/segments_spec.rb +0 -100
- data/spec/integration/subscription_spec.rb +0 -88
- data/spec/integration/urn_date_dim_spec.rb +0 -53
- data/spec/integration/user_filters_spec.rb +0 -310
- data/spec/integration/user_group_spec.rb +0 -147
- data/spec/integration/variables_spec.rb +0 -189
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/can_assign_a_custom_logger.yml +0 -2287
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/client_logs_when_given_custom_message.yml +0 -2287
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/has_the_request_id_logged_when_I_passed_it.yml +0 -2287
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logging_off/Disables_logging.yml +0 -2287
- data/spec/integration/vcr_cassettes/GoodData_-_logging/_logging_on/Enables_logging.yml +0 -2287
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project/Returns_project_assigned.yml +0 -354
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_nil.yml +0 -299
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_directly.yml +0 -354
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_using_project_ID.yml +0 -354
- data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_using_project_URL.yml +0 -354
- data/spec/integration/vcr_cassettes/GoodData_-_project/_with_project/Uses_project_specified.yml +0 -354
- data/spec/integration/vcr_cassettes/GoodData_Metric/all.yml +0 -2065
- data/spec/integration/vcr_cassettes/GoodData_Metric/should_be_able_to_update_folders.yml +0 -119
- data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/all.yml +0 -9812
- data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_get_json_containing_correct_id.yml +0 -174
- data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_return_nil_for_unknown_id.yml +0 -58
- data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_throw_BadRequest_for_-1.yml +0 -63
- data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_connect/Connects_using_username_and_password.yml +0 -299
- data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_disconnect/Connects_using_username_and_password.yml +0 -299
- data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_generate_request_id/Generates_a_non-empty_string.yml +0 -2287
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_/Should_list_user_groups_as_Array.yml +0 -56
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_add_members/Should_add_member.yml +0 -315
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_members/Should_return_members_as_array.yml +0 -54
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_remove_members/Should_remove_existing_members.yml +0 -258
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_save/updates_existing_group.yml +0 -159
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/_set_members/Should_set_new_members.yml +0 -158
- data/spec/integration/vcr_cassettes/GoodData_UserGroup/all.yml +0 -809
- data/spec/logging_in_logging_out_spec.rb +0 -91
- data/spec/spec_helper.rb +0 -110
- data/spec/unit/actions/associate_clients_spec.rb +0 -48
- data/spec/unit/actions/collect_client_projects_spec.rb +0 -47
- data/spec/unit/actions/collect_clients_spec.rb +0 -65
- data/spec/unit/actions/collect_data_product_spec.rb +0 -58
- data/spec/unit/actions/collect_dynamic_schedule_params_spec.rb +0 -56
- data/spec/unit/actions/collect_meta_spec.rb +0 -88
- data/spec/unit/actions/collect_segment_clients_spec.rb +0 -82
- data/spec/unit/actions/collect_tagged_objects_spec.rb +0 -126
- data/spec/unit/actions/collect_users_brick_users_spec.rb +0 -36
- data/spec/unit/actions/create_segment_masters_spec.rb +0 -65
- data/spec/unit/actions/ensure_data_product_spec.rb +0 -39
- data/spec/unit/actions/ensure_technical_users_domain_spec.rb +0 -53
- data/spec/unit/actions/ensure_technical_users_project_spec.rb +0 -76
- data/spec/unit/actions/execute_schedules_spec.rb +0 -94
- data/spec/unit/actions/provision_clients_spec.rb +0 -46
- data/spec/unit/actions/purge_clients_spec.rb +0 -47
- data/spec/unit/actions/rename_existing_client_projects_spec.rb +0 -54
- data/spec/unit/actions/segments_filter_spec.rb +0 -46
- data/spec/unit/actions/shared_examples_for_user_actions.rb +0 -43
- data/spec/unit/actions/synchronize_cas_spec.rb +0 -58
- data/spec/unit/actions/synchronize_clients_spec.rb +0 -71
- data/spec/unit/actions/synchronize_etls_in_segment_spec.rb +0 -206
- data/spec/unit/actions/synchronize_ldm_spec.rb +0 -70
- data/spec/unit/actions/synchronize_user_filters_spec.rb +0 -208
- data/spec/unit/actions/synchronize_user_groups_spec.rb +0 -49
- data/spec/unit/actions/synchronize_users_spec.rb +0 -180
- data/spec/unit/bricks/bricks_spec.rb +0 -34
- data/spec/unit/bricks/middleware/aws_middelware_spec.rb +0 -98
- data/spec/unit/bricks/middleware/bench_middleware_spec.rb +0 -15
- data/spec/unit/bricks/middleware/bulk_salesforce_middleware_spec.rb +0 -15
- data/spec/unit/bricks/middleware/gooddata_middleware_spec.rb +0 -15
- data/spec/unit/bricks/middleware/logger_middleware_spec.rb +0 -30
- data/spec/unit/bricks/middleware/restforce_middleware_spec.rb +0 -15
- data/spec/unit/bricks/middleware/stdout_middleware_spec.rb +0 -15
- data/spec/unit/bricks/middleware/twitter_middleware_spec.rb +0 -15
- data/spec/unit/cli/cli_spec.rb +0 -17
- data/spec/unit/cli/commands/cmd_auth_spec.rb +0 -17
- data/spec/unit/core/nil_logger_spec.rb +0 -13
- data/spec/unit/extensions/hash_spec.rb +0 -22
- data/spec/unit/godzilla/goodzilla_spec.rb +0 -74
- data/spec/unit/helpers/check_helper_production_spec.rb +0 -34
- data/spec/unit/helpers/check_helper_spec.rb +0 -134
- data/spec/unit/helpers/csv_helper_spec.rb +0 -22
- data/spec/unit/helpers/data_helper_spec.rb +0 -67
- data/spec/unit/helpers/global_helpers_spec.rb +0 -264
- data/spec/unit/helpers_spec.rb +0 -254
- data/spec/unit/lcm/lcm2_spec.rb +0 -100
- data/spec/unit/lcm/user_bricks_helper_spec.rb +0 -58
- data/spec/unit/models/blueprint/attribute_sort_by_spec.rb +0 -20
- data/spec/unit/models/blueprint/attributes_spec.rb +0 -28
- data/spec/unit/models/blueprint/dataset_spec.rb +0 -120
- data/spec/unit/models/blueprint/label_blueprint_field_spec.rb +0 -43
- data/spec/unit/models/blueprint/project_blueprint_spec.rb +0 -642
- data/spec/unit/models/blueprint/reference_spec.rb +0 -28
- data/spec/unit/models/blueprint/schema_builder_spec.rb +0 -36
- data/spec/unit/models/blueprint/to_wire_spec.rb +0 -196
- data/spec/unit/models/dataset_blueprint.rb +0 -14
- data/spec/unit/models/execution_spec.rb +0 -109
- data/spec/unit/models/from_wire_spec.rb +0 -321
- data/spec/unit/models/metadata_spec.rb +0 -140
- data/spec/unit/models/metric_spec.rb +0 -129
- data/spec/unit/models/model_spec.rb +0 -87
- data/spec/unit/models/project_creator_spec.rb +0 -90
- data/spec/unit/models/project_spec.rb +0 -94
- data/spec/unit/models/report_result_data_spec.rb +0 -194
- data/spec/unit/models/to_manifest_spec.rb +0 -165
- data/spec/unit/models/user_filters/user_filter_builder_spec.rb +0 -149
- data/spec/unit/models/user_filters_spec.rb +0 -95
- data/spec/unit/models/variable_spec.rb +0 -280
- data/spec/unit/rest/phmap_spec.rb +0 -117
- data/spec/unit/rest/polling_spec.rb +0 -101
- data/spec/unit/rest/resource_spec.rb +0 -10
- data/spec/vcr_configurer.rb +0 -63
@@ -1,66 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"diffRequest": {
|
3
|
-
"targetModel": {
|
4
|
-
"projectModel": {
|
5
|
-
"modelMetadata": {
|
6
|
-
"containCA": false
|
7
|
-
},
|
8
|
-
"datasets": [
|
9
|
-
{
|
10
|
-
"dataset": {
|
11
|
-
"identifier": "dataset.devs",
|
12
|
-
"title": "Developers",
|
13
|
-
"anchor": {
|
14
|
-
"attribute": {
|
15
|
-
"identifier": "attr.devs.id",
|
16
|
-
"title": "Current Stage",
|
17
|
-
"folder": "Developers",
|
18
|
-
"labels": [
|
19
|
-
{
|
20
|
-
"label": {
|
21
|
-
"identifier": "label.devs.id.id",
|
22
|
-
"title": "Devs Id",
|
23
|
-
"type": "GDC.text",
|
24
|
-
"dataType": "VARCHAR(128)"
|
25
|
-
}
|
26
|
-
}
|
27
|
-
],
|
28
|
-
"defaultLabel": "label.devs.id.id"
|
29
|
-
}
|
30
|
-
},
|
31
|
-
"attributes": [
|
32
|
-
{
|
33
|
-
"attribute": {
|
34
|
-
"identifier": "attr.devs.name",
|
35
|
-
"title": "Name",
|
36
|
-
"folder": "Developers",
|
37
|
-
"labels": [
|
38
|
-
{
|
39
|
-
"label": {
|
40
|
-
"identifier": "label.opp_snapshot.accountstagesnapshot",
|
41
|
-
"title": "Account Stage (Snapshot)",
|
42
|
-
"type": "GDC.text",
|
43
|
-
"dataType": "VARCHAR(128)"
|
44
|
-
}
|
45
|
-
}
|
46
|
-
],
|
47
|
-
"defaultLabel": "label.opp_snapshot.accountstagesnapshot"
|
48
|
-
}
|
49
|
-
}
|
50
|
-
],
|
51
|
-
"facts": [
|
52
|
-
|
53
|
-
],
|
54
|
-
"references": [
|
55
|
-
|
56
|
-
]
|
57
|
-
}
|
58
|
-
}
|
59
|
-
],
|
60
|
-
"dateDimensions": [
|
61
|
-
|
62
|
-
]
|
63
|
-
}
|
64
|
-
}
|
65
|
-
}
|
66
|
-
}
|
@@ -1,150 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"diffRequest": {
|
3
|
-
"targetModel": {
|
4
|
-
"projectModel": {
|
5
|
-
"datasets": [
|
6
|
-
{
|
7
|
-
"dataset": {
|
8
|
-
"identifier": "dataset.repos",
|
9
|
-
"title": "Repos",
|
10
|
-
"anchor": {
|
11
|
-
"attribute": {
|
12
|
-
"identifier": "attr.repos.repo_id",
|
13
|
-
"title": "Repo",
|
14
|
-
"folder": "Foldered Repos",
|
15
|
-
"labels": [
|
16
|
-
{
|
17
|
-
"label": {
|
18
|
-
"identifier": "label.repos.repo_id",
|
19
|
-
"title": "Repo",
|
20
|
-
"type": null,
|
21
|
-
"dataType": null
|
22
|
-
}
|
23
|
-
},
|
24
|
-
{
|
25
|
-
"label": {
|
26
|
-
"identifier": "label.repos.repo_id.name",
|
27
|
-
"title": "Name",
|
28
|
-
"type": null,
|
29
|
-
"dataType": null
|
30
|
-
}
|
31
|
-
}
|
32
|
-
],
|
33
|
-
"defaultLabel": "label.repos.repo_id",
|
34
|
-
"description": "This is anchor description"
|
35
|
-
}
|
36
|
-
},
|
37
|
-
"attributes": [
|
38
|
-
{
|
39
|
-
"attribute": {
|
40
|
-
"identifier": "attr.repos.department",
|
41
|
-
"title": "Department",
|
42
|
-
"folder": "Foldered Repos",
|
43
|
-
"labels": [
|
44
|
-
{
|
45
|
-
"label": {
|
46
|
-
"identifier": "label.repos.department",
|
47
|
-
"title": "Department",
|
48
|
-
"type": null,
|
49
|
-
"dataType": "VARCHAR(128)"
|
50
|
-
}
|
51
|
-
}
|
52
|
-
],
|
53
|
-
"defaultLabel": "label.repos.department"
|
54
|
-
}
|
55
|
-
}
|
56
|
-
],
|
57
|
-
"facts": [
|
58
|
-
|
59
|
-
],
|
60
|
-
"references": [
|
61
|
-
|
62
|
-
]
|
63
|
-
}
|
64
|
-
},
|
65
|
-
{
|
66
|
-
"dataset": {
|
67
|
-
"identifier": "dataset.devs",
|
68
|
-
"title": "Devs",
|
69
|
-
"anchor": {
|
70
|
-
"attribute": {
|
71
|
-
"identifier": "attr.devs.dev_id",
|
72
|
-
"title": "Dev",
|
73
|
-
"folder": "Devs",
|
74
|
-
"labels": [
|
75
|
-
{
|
76
|
-
"label": {
|
77
|
-
"identifier": "label.devs.dev_id",
|
78
|
-
"title": "Dev",
|
79
|
-
"type": null,
|
80
|
-
"dataType": null
|
81
|
-
}
|
82
|
-
},
|
83
|
-
{
|
84
|
-
"label": {
|
85
|
-
"identifier": "label.devs.dev_id.email",
|
86
|
-
"title": "Email",
|
87
|
-
"type": null,
|
88
|
-
"dataType": null
|
89
|
-
}
|
90
|
-
}
|
91
|
-
],
|
92
|
-
"defaultLabel": "label.devs.dev_id.email"
|
93
|
-
}
|
94
|
-
},
|
95
|
-
"attributes": [
|
96
|
-
|
97
|
-
],
|
98
|
-
"facts": [
|
99
|
-
|
100
|
-
],
|
101
|
-
"references": [
|
102
|
-
|
103
|
-
]
|
104
|
-
}
|
105
|
-
},
|
106
|
-
{
|
107
|
-
"dataset": {
|
108
|
-
"identifier": "dataset.commits",
|
109
|
-
"title": "Commits",
|
110
|
-
"anchor": {
|
111
|
-
"attribute": {
|
112
|
-
"identifier": "attr.commits.factsof",
|
113
|
-
"title": "Records of Commits",
|
114
|
-
"folder": "Commits"
|
115
|
-
}
|
116
|
-
},
|
117
|
-
"attributes": [
|
118
|
-
|
119
|
-
],
|
120
|
-
"facts": [
|
121
|
-
{
|
122
|
-
"fact": {
|
123
|
-
"identifier": "fact.commits.lines_changed",
|
124
|
-
"title": "Lines Changed",
|
125
|
-
"folder": "Commits",
|
126
|
-
"dataType": "INT",
|
127
|
-
"description": "Fact description"
|
128
|
-
}
|
129
|
-
}
|
130
|
-
],
|
131
|
-
"references": [
|
132
|
-
"committed_on",
|
133
|
-
"dataset.devs",
|
134
|
-
"dataset.repos"
|
135
|
-
]
|
136
|
-
}
|
137
|
-
}
|
138
|
-
],
|
139
|
-
"dateDimensions": [
|
140
|
-
{
|
141
|
-
"dateDimension": {
|
142
|
-
"name": "committed_on",
|
143
|
-
"title": "Committed On"
|
144
|
-
}
|
145
|
-
}
|
146
|
-
]
|
147
|
-
}
|
148
|
-
}
|
149
|
-
}
|
150
|
-
}
|
data/spec/environment/default.rb
DELETED
@@ -1,43 +0,0 @@
|
|
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/extensions/object'
|
8
|
-
|
9
|
-
require 'gooddata/helpers/global_helpers'
|
10
|
-
|
11
|
-
module GoodData
|
12
|
-
module Environment
|
13
|
-
module ConnectionHelper
|
14
|
-
set_const :GD_PROJECT_TOKEN, ''
|
15
|
-
set_const :GD_MAX_RETRY, Helpers::GD_MAX_RETRY
|
16
|
-
|
17
|
-
set_const :DEFAULT_USERNAME, "rubydev+admin@gooddata.com"
|
18
|
-
set_const :DEFAULT_PASSWORD, GoodData::Helpers.decrypt("HeqNt6NKj7nEB5OEnXHQlsTRLQ3dVfG18gE8YtezgHY=\n", ENV['GD_SPEC_PASSWORD'] || ENV['BIA_ENCRYPTION_KEY'])
|
19
|
-
set_const :DEFAULT_DOMAIN, ''
|
20
|
-
set_const :DEFAULT_USER_URL, ''
|
21
|
-
|
22
|
-
set_const :TEST_USERNAME, "john.doe@gooddata.com"
|
23
|
-
|
24
|
-
set_const :DEFAULT_SERVER, ''
|
25
|
-
set_const :STAGING_URI, ''
|
26
|
-
end
|
27
|
-
|
28
|
-
module ProcessHelper
|
29
|
-
set_const :PROCESS_ID, ''
|
30
|
-
set_const :DEPLOY_NAME, 'main.rb'
|
31
|
-
end
|
32
|
-
|
33
|
-
module ProjectHelper
|
34
|
-
set_const :PROJECT_ID, ''
|
35
|
-
set_const :PROJECT_TITLE, 'GoodTravis'
|
36
|
-
set_const :PROJECT_SUMMARY, 'No summary'
|
37
|
-
end
|
38
|
-
|
39
|
-
module ScheduleHelper
|
40
|
-
set_const :SCHEDULE_ID, ''
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,32 +0,0 @@
|
|
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
|
-
module GoodData
|
8
|
-
module Environment
|
9
|
-
module ConnectionHelper
|
10
|
-
encrypted_token = "ciKR76io4KgIUksL6BOF5GW9frsXHAa7JUFqRmc5Wsw=\n"
|
11
|
-
key = ENV['GD_SPEC_PASSWORD'] || ENV['BIA_ENCRYPTION_KEY']
|
12
|
-
token = GoodData::Helpers.decrypt(encrypted_token, key)
|
13
|
-
set_const :GD_PROJECT_TOKEN, token
|
14
|
-
set_const :DEFAULT_DOMAIN, 'staging3-lcm-prod'
|
15
|
-
set_const :DEFAULT_SERVER, 'https://staging3-lcm-prod.intgdc.com'
|
16
|
-
set_const :DEFAULT_USER_URL, '/gdc/account/profile/a4c644d7b42b65c34e5a0f46809f7164'
|
17
|
-
set_const :STAGING_URI, 'https://staging3-lcm-prod.intgdc.com/gdc/uploads/'
|
18
|
-
end
|
19
|
-
|
20
|
-
module ProcessHelper
|
21
|
-
set_const :PROCESS_ID, 'b671fcfe-f6fd-4379-92c1-3db9eceb1c54'
|
22
|
-
end
|
23
|
-
|
24
|
-
module ProjectHelper
|
25
|
-
set_const :PROJECT_ID, 'rd87oh5rnbf1qhh9vjq5lkgq5v6okei5'
|
26
|
-
end
|
27
|
-
|
28
|
-
module ScheduleHelper
|
29
|
-
set_const :SCHEDULE_ID, '58ad6260e4b0ee87af79b0b8'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,38 +0,0 @@
|
|
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
|
-
module GoodData
|
8
|
-
module Environment
|
9
|
-
class << self
|
10
|
-
BRANCH_TO_ENVIRONMENT = {
|
11
|
-
develop: 'testing',
|
12
|
-
hotfix: 'production'
|
13
|
-
}
|
14
|
-
|
15
|
-
def load(env = ENV['GD_ENV'] || 'testing')
|
16
|
-
require_relative 'default'
|
17
|
-
env = branch_to_environment(env)
|
18
|
-
|
19
|
-
puts "USING ENVIRONMENT: #{env}"
|
20
|
-
begin
|
21
|
-
require_relative env
|
22
|
-
rescue
|
23
|
-
puts "Unable to find environment '#{env}'"
|
24
|
-
require_relative 'development'
|
25
|
-
end
|
26
|
-
|
27
|
-
GoodData::Environment::ProjectHelper.set_const :PROJECT_URL, "/gdc/projects/#{GoodData::Environment::ProjectHelper::PROJECT_ID}"
|
28
|
-
ENV['GD_SERVER'] = GoodData::Environment::ConnectionHelper::DEFAULT_SERVER
|
29
|
-
end
|
30
|
-
|
31
|
-
# Translates ci-infra branch to environment config name
|
32
|
-
# @param branch Name of the branch we are testing against
|
33
|
-
def branch_to_environment(branch)
|
34
|
-
BRANCH_TO_ENVIRONMENT[branch.to_sym] || branch
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,27 +0,0 @@
|
|
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
|
-
module GoodData
|
8
|
-
module Environment
|
9
|
-
module ConnectionHelper
|
10
|
-
set_const :DEFAULT_SERVER, 'https://secure.gooddata.com'
|
11
|
-
set_const :DEFAULT_USER_URL, '/gdc/account/profile/d389375454af77f1f5a8edaa13ffe0f9'
|
12
|
-
set_const :STAGING_URI, 'https://secure-di.gooddata.com/uploads/'
|
13
|
-
end
|
14
|
-
|
15
|
-
module ProcessHelper
|
16
|
-
set_const :PROCESS_ID, 'f5d48101-c2d5-49ab-9acb-af6f2e51e09c'
|
17
|
-
end
|
18
|
-
|
19
|
-
module ProjectHelper
|
20
|
-
set_const :PROJECT_ID, 'urdbsii7e840wwdpwjd3pu9l1jdbooah'
|
21
|
-
end
|
22
|
-
|
23
|
-
module ScheduleHelper
|
24
|
-
set_const :SCHEDULE_ID, '58a5c0c6e4b0831d95092e4a'
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
data/spec/environment/staging.rb
DELETED
@@ -1,32 +0,0 @@
|
|
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
|
-
module GoodData
|
8
|
-
module Environment
|
9
|
-
module ConnectionHelper
|
10
|
-
encrypted_token = "2OSh3iq0CJqJMbRJY5VvB9k1AaOus2YOEweAoat+neY=\n"
|
11
|
-
key = ENV['GD_SPEC_PASSWORD'] || ENV['BIA_ENCRYPTION_KEY']
|
12
|
-
token = GoodData::Helpers.decrypt(encrypted_token, key)
|
13
|
-
set_const :GD_PROJECT_TOKEN, token
|
14
|
-
set_const :DEFAULT_DOMAIN, 'staging-lcm-prod'
|
15
|
-
set_const :DEFAULT_SERVER, 'https://staging-lcm-prod.intgdc.com'
|
16
|
-
set_const :DEFAULT_USER_URL, '/gdc/account/profile/e306b64fb4178785c9cf29c29b5e498a'
|
17
|
-
set_const :STAGING_URI, 'https://staging-lcm-prod.intgdc.com/gdc/uploads/'
|
18
|
-
end
|
19
|
-
|
20
|
-
module ProcessHelper
|
21
|
-
set_const :PROCESS_ID, '05cd64ef-db14-49f0-a755-d94d0fb1b3cd'
|
22
|
-
end
|
23
|
-
|
24
|
-
module ProjectHelper
|
25
|
-
set_const :PROJECT_ID, 'ru99pihp3qmj73y1axhu7dx20nxzixu8'
|
26
|
-
end
|
27
|
-
|
28
|
-
module ScheduleHelper
|
29
|
-
set_const :SCHEDULE_ID, '58ad61cee4b046a545c172b1'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
data/spec/environment/testing.rb
DELETED
@@ -1,32 +0,0 @@
|
|
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
|
-
module GoodData
|
8
|
-
module Environment
|
9
|
-
module ConnectionHelper
|
10
|
-
set_const :GD_PROJECT_TOKEN, GoodData::Helpers.decrypt(
|
11
|
-
"n968RZTTh4VLLrVveEdjD32/6uSXTw8H+nDbmT51j/s=\n",
|
12
|
-
ENV['GD_SPEC_PASSWORD'] || ENV['BIA_ENCRYPTION_KEY']
|
13
|
-
)
|
14
|
-
set_const :DEFAULT_DOMAIN, 'staging2-lcm-prod'
|
15
|
-
set_const :DEFAULT_SERVER, 'https://staging2-lcm-prod.intgdc.com'
|
16
|
-
set_const :DEFAULT_USER_URL, '/gdc/account/profile/5ad80b895edcc438e5a4418e222733fa'
|
17
|
-
set_const :STAGING_URI, 'https://staging2-lcm-prod.intgdc.com/gdc/uploads/'
|
18
|
-
end
|
19
|
-
|
20
|
-
module ProcessHelper
|
21
|
-
set_const :PROCESS_ID, '7bc4b678-d1f6-4fb0-b1ee-513f4709bbf1'
|
22
|
-
end
|
23
|
-
|
24
|
-
module ProjectHelper
|
25
|
-
set_const :PROJECT_ID, 'voyb6fcvdngwfyf722vn9cmbv7sq6mf6'
|
26
|
-
end
|
27
|
-
|
28
|
-
module ScheduleHelper
|
29
|
-
set_const :SCHEDULE_ID, '5acdd513e4b01dce92b23505'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,221 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
#
|
3
|
-
# Copyright (c) 2010-2018 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
|
-
|
8
|
-
# this is a duplicate of the appstore project helper - we should delete it when we merge repositories
|
9
|
-
|
10
|
-
require 'gooddata'
|
11
|
-
require 'json'
|
12
|
-
require_relative 'constants'
|
13
|
-
|
14
|
-
module GoodData
|
15
|
-
module Helpers
|
16
|
-
# Creates a testing project and loads it with data
|
17
|
-
class AppstoreProjectHelper
|
18
|
-
attr_reader :project, :client
|
19
|
-
|
20
|
-
class << self
|
21
|
-
def create(opts = { client: GoodData.connection })
|
22
|
-
new_project = opts[:client].create_project(opts)
|
23
|
-
AppstoreProjectHelper.new(new_project, opts)
|
24
|
-
end
|
25
|
-
|
26
|
-
def suffix
|
27
|
-
hostname = Socket.gethostname
|
28
|
-
timestamp = DateTime.now.strftime('%Y%m%d%H%M%S')
|
29
|
-
suffix = "#{hostname}_#{timestamp}"
|
30
|
-
segment_name_forbidden_chars = /[^a-zA-Z0-9_\\-]+/
|
31
|
-
suffix.scan(segment_name_forbidden_chars).each do |forbidden_characters|
|
32
|
-
suffix.gsub!(forbidden_characters, '_')
|
33
|
-
end
|
34
|
-
suffix
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def initialize(project, opts = { client: GoodData.connection })
|
39
|
-
@client = opts[:client]
|
40
|
-
@project = project if project.instance_of? GoodData::Project
|
41
|
-
@project = client.projects(project) if project.instance_of? String
|
42
|
-
GoodData.logger.info "Project ID: #{@project.obj_id}"
|
43
|
-
raise 'ProjectHelper::initialize the parameter "project" '\
|
44
|
-
'must be GoodData::Project or String.' unless @project
|
45
|
-
end
|
46
|
-
|
47
|
-
def create_ldm
|
48
|
-
json = File.read('./spec/data/integration_model.json')
|
49
|
-
blueprint = GoodData::Model::ProjectBlueprint.from_json(json)
|
50
|
-
project.update_from_blueprint(blueprint)
|
51
|
-
end
|
52
|
-
|
53
|
-
def load_data
|
54
|
-
GoodData.with_project @project.pid do |project|
|
55
|
-
GoodData::Model.upload_data(
|
56
|
-
'./spec/data/integration_policies.csv',
|
57
|
-
project.blueprint,
|
58
|
-
DATASET_IDENTIFIER
|
59
|
-
)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def add_user_group
|
64
|
-
@project.add_user_group(:name => USER_GROUP_NAME, :description => 'My Test Description')
|
65
|
-
end
|
66
|
-
|
67
|
-
def associate_output_stage(ads, opts = {})
|
68
|
-
@project.create_output_stage(
|
69
|
-
ads,
|
70
|
-
project: @project,
|
71
|
-
client: client,
|
72
|
-
client_id: opts[:client_id],
|
73
|
-
output_stage_prefix: opts[:output_stage_prefix]
|
74
|
-
)
|
75
|
-
end
|
76
|
-
|
77
|
-
def deploy_processes(ads)
|
78
|
-
GoodData.with_project @project.pid do |project|
|
79
|
-
cc_process = project.deploy_process(
|
80
|
-
CC_PROCESS_ARCHIVE,
|
81
|
-
name: CC_PROCESS_NAME
|
82
|
-
)
|
83
|
-
cc_schedule = cc_process.create_schedule(
|
84
|
-
CC_SCHEDULE_CRON,
|
85
|
-
CC_GRAPH,
|
86
|
-
params: CC_PARAMS,
|
87
|
-
hidden_params: CC_SECURE_PARAMS,
|
88
|
-
state: 'DISABLED'
|
89
|
-
)
|
90
|
-
ruby_process = project.deploy_process(
|
91
|
-
RUBY_HELLO_WORLD_PROCESS_PATH,
|
92
|
-
name: RUBY_HELLO_WORLD_PROCESS_NAME
|
93
|
-
)
|
94
|
-
ruby_schedule = ruby_process.create_schedule(
|
95
|
-
cc_schedule,
|
96
|
-
'main.rb',
|
97
|
-
params: RUBY_PARAMS,
|
98
|
-
hidden_params: RUBY_SECURE_PARAMS,
|
99
|
-
state: 'DISABLED'
|
100
|
-
)
|
101
|
-
|
102
|
-
associate_output_stage ads
|
103
|
-
add_process = project.add.process
|
104
|
-
add_process.create_schedule(
|
105
|
-
ruby_schedule,
|
106
|
-
'',
|
107
|
-
dataload_datasets: [ DATASET_IDENTIFIER ],
|
108
|
-
de_synchronize_all: true,
|
109
|
-
state: 'DISABLED'
|
110
|
-
)
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
def create_metrics
|
115
|
-
GoodData.with_project @project.pid do |project|
|
116
|
-
metrics = JSON.parse(File.read(METRICS_FILE)).to_hash
|
117
|
-
metrics.each do |title, maql|
|
118
|
-
metric = project.add_measure maql, title: title
|
119
|
-
metric.identifier = "metric.#{title.to_s.downcase.gsub(/\s/, '.')}"
|
120
|
-
metric.add_tag('metric') if metric.identifier == PRODUCTION_TAGGED_METRIC
|
121
|
-
metric.save
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
def create_computed_attributes
|
127
|
-
update = GoodData::Model::ProjectBlueprint.build('update') do |project_builder|
|
128
|
-
project_builder.add_computed_attribute(
|
129
|
-
COMPUTED_ATTRIBUTE_ID,
|
130
|
-
title: 'My computed attribute',
|
131
|
-
metric: 'metric.customers.count',
|
132
|
-
attribute: 'attr.csv_policies.state',
|
133
|
-
buckets: [{ label: 'Small', highest_value: 1000 }, { label: 'Medium', highest_value: 2000 }, { label: 'Large' }]
|
134
|
-
)
|
135
|
-
end
|
136
|
-
new_blueprint = project.blueprint.merge(update)
|
137
|
-
unless new_blueprint.valid?
|
138
|
-
pp new_blueprint.validate
|
139
|
-
raise 'Cannot create computed attribute'
|
140
|
-
end
|
141
|
-
project.update_from_blueprint(new_blueprint)
|
142
|
-
|
143
|
-
project.attributes(COMPUTED_ATTRIBUTE_ID).drill_down(project.attributes('attr.csv_policies.customer'))
|
144
|
-
end
|
145
|
-
|
146
|
-
def create_reports
|
147
|
-
GoodData.with_project @project.pid do |p|
|
148
|
-
reports = JSON.parse(File.read(REPORTS_FILE)).to_hash['reports']
|
149
|
-
reports.each do |r|
|
150
|
-
report = p.add_report(
|
151
|
-
title: r['title'],
|
152
|
-
left: r['left'].map { |o| GoodData::MdObject[o] },
|
153
|
-
top: r['top'].map { |o| GoodData::MdObject[o] }
|
154
|
-
)
|
155
|
-
report_name = r['title'].to_s.downcase.gsub(/\s/, '.')
|
156
|
-
report.identifier = "report.#{report_name}"
|
157
|
-
report.save
|
158
|
-
end
|
159
|
-
|
160
|
-
ca_report_title = 'Report contains CA'
|
161
|
-
report = p.add_report(title: ca_report_title, left: GoodData::MdObject[COMPUTED_ATTRIBUTE_ID])
|
162
|
-
report_name = ca_report_title.downcase.gsub(/\s/, '.')
|
163
|
-
report.identifier = "report.#{report_name}"
|
164
|
-
report.save
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
|
-
def create_dashboards
|
169
|
-
GoodData.with_project @project.pid do
|
170
|
-
dashboards = JSON.parse(File.read(DASHBOARDS_FILE)).to_hash['dashboards']
|
171
|
-
dashboards.each do |d|
|
172
|
-
dashboard = GoodData::Dashboard.create(
|
173
|
-
{ title: d['title'] },
|
174
|
-
client: client, project: @project
|
175
|
-
)
|
176
|
-
d['tabs'].each do |t|
|
177
|
-
tab = dashboard.add_tab(title: t['title'])
|
178
|
-
t['items'].each do |i|
|
179
|
-
tab.add_report_item(report: GoodData::Report[i['identifier']],
|
180
|
-
position_x: i['position']['x'],
|
181
|
-
position_y: i['position']['y'],
|
182
|
-
size_x: i['size']['width'],
|
183
|
-
size_y: i['size']['height'])
|
184
|
-
end
|
185
|
-
|
186
|
-
tab.add_report_item(report: GoodData::Report['report.report.contains.ca'],
|
187
|
-
position_x: 0,
|
188
|
-
position_y: 0,
|
189
|
-
size_x: 640,
|
190
|
-
size_y:100)
|
191
|
-
end
|
192
|
-
dashboard_name = d['title'].to_s.downcase.gsub(/\s/, '.')
|
193
|
-
dashboard.identifier = "dashboard.#{dashboard_name}"
|
194
|
-
dashboard.add_tag('dashboard')
|
195
|
-
dashboard.save
|
196
|
-
end
|
197
|
-
end
|
198
|
-
end
|
199
|
-
|
200
|
-
def create_tag_for_fact_n_dataset
|
201
|
-
dataset = @project.datasets(DATASET_IDENTIFIER)
|
202
|
-
dataset.add_tag('dataset')
|
203
|
-
dataset.save
|
204
|
-
|
205
|
-
fact = @project.facts(FACT_IDENTIFIER)
|
206
|
-
fact.add_tag('fact')
|
207
|
-
fact.save
|
208
|
-
end
|
209
|
-
|
210
|
-
def ensure_user(login, domain)
|
211
|
-
user = domain.users(login)
|
212
|
-
unless user
|
213
|
-
user = domain.add_user(login: login)
|
214
|
-
end
|
215
|
-
@project.add_user(user, 'Viewer', domain: domain)
|
216
|
-
user
|
217
|
-
end
|
218
|
-
end
|
219
|
-
end
|
220
|
-
end
|
221
|
-
|