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,95 +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'
|
8
|
-
|
9
|
-
def check_filters(filters)
|
10
|
-
filters.count.should eq(2)
|
11
|
-
filter = filters.first
|
12
|
-
filter[:login].should eq("john.doe@example.com")
|
13
|
-
filter[:filters].count.should eq(1)
|
14
|
-
filter[:filters].first[:values].count.should eq(4)
|
15
|
-
filter[:filters].first[:values].should eq(["USA", "Czech Republic", "Uganda", "Slovakia"])
|
16
|
-
filter = filters.last
|
17
|
-
filter[:login].should eq("jane.doe@example.com")
|
18
|
-
filter[:filters].count.should eq(1)
|
19
|
-
filter[:filters].first[:values].count.should eq(1)
|
20
|
-
end
|
21
|
-
|
22
|
-
describe 'User filters implementation' do
|
23
|
-
it "should create user filters from a file using row based approach" do
|
24
|
-
filters = GoodData::UserFilterBuilder.get_filters(
|
25
|
-
'./spec/data/line_based_permissions.csv',
|
26
|
-
:labels => [{ :label => "/gdc/md/lu292gm1077gtv7i383hjl149sva7o1e/obj/2719" }]
|
27
|
-
)
|
28
|
-
check_filters(filters)
|
29
|
-
end
|
30
|
-
|
31
|
-
it "should create user filters from a file using column based approach" do
|
32
|
-
filters = GoodData::UserFilterBuilder.get_filters(
|
33
|
-
'./spec/data/column_based_permissions.csv',
|
34
|
-
:labels => [{ :label => "/gdc/md/lu292gm1077gtv7i383hjl149sva7o1e/obj/2719", :column => 'region' }]
|
35
|
-
)
|
36
|
-
check_filters(filters)
|
37
|
-
end
|
38
|
-
|
39
|
-
it "should treat empty like nil, empty value has to be enclosed in quotes" do
|
40
|
-
filters = GoodData::UserFilterBuilder.get_filters(
|
41
|
-
'./spec/data/column_based_permissions.csv',
|
42
|
-
:labels => [
|
43
|
-
{ :label => "some_label", :column => 'region' },
|
44
|
-
{ :label => "other_label", :column => 'department' }
|
45
|
-
]
|
46
|
-
)
|
47
|
-
filters.first[:filters].last[:values].count.should eq(3)
|
48
|
-
end
|
49
|
-
|
50
|
-
it "should be able to specify columns by number" do
|
51
|
-
filters = GoodData::UserFilterBuilder.get_filters(
|
52
|
-
'./spec/data/column_based_permissions2.csv',
|
53
|
-
:user_column => 2,
|
54
|
-
:labels => [
|
55
|
-
{ :label => "some_label", :column => 0 },
|
56
|
-
{ :label => "other_label", :column => 1 }
|
57
|
-
]
|
58
|
-
)
|
59
|
-
filters.first[:filters].last[:values].count.should eq(2)
|
60
|
-
end
|
61
|
-
|
62
|
-
it "should be able to specify columns by name" do
|
63
|
-
filters = GoodData::UserFilterBuilder.get_filters(
|
64
|
-
'./spec/data/column_based_permissions2.csv',
|
65
|
-
:user_column => 'login',
|
66
|
-
:labels => [
|
67
|
-
{ :label => 'some_label', :column => 'region' },
|
68
|
-
{ :label => 'other_label', :column => 'department' }
|
69
|
-
]
|
70
|
-
)
|
71
|
-
filters.first[:filters].last[:values].count.should eq(2)
|
72
|
-
end
|
73
|
-
|
74
|
-
it "should normalize simplified filters" do
|
75
|
-
filters = [
|
76
|
-
[
|
77
|
-
"svarovsky+gem_tester@gooddata.com",
|
78
|
-
"/gdc/md/zndbmx87kh69vk8liods10mwxesaxn3k/obj/213",
|
79
|
-
"tomas@gooddata.com",
|
80
|
-
"jirka@gooddata.com"
|
81
|
-
]
|
82
|
-
]
|
83
|
-
GoodData::UserFilterBuilder.normalize_filters(filters).should eq([
|
84
|
-
{
|
85
|
-
:login => "svarovsky+gem_tester@gooddata.com",
|
86
|
-
:filters => [
|
87
|
-
{
|
88
|
-
:label => "/gdc/md/zndbmx87kh69vk8liods10mwxesaxn3k/obj/213",
|
89
|
-
:values => ["tomas@gooddata.com", "jirka@gooddata.com"]
|
90
|
-
}
|
91
|
-
]
|
92
|
-
}
|
93
|
-
])
|
94
|
-
end
|
95
|
-
end
|
@@ -1,280 +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'
|
8
|
-
|
9
|
-
ROW_BASED_DATA = [
|
10
|
-
['tomas@gooddata.com', 'US', 'CZ', 'KZ'],
|
11
|
-
['petr@gooddata.com', 'US'],
|
12
|
-
['petr@gooddata.com', 'KZ']
|
13
|
-
]
|
14
|
-
COLUMN_BASED_DATA_WITH_HEADERS = [
|
15
|
-
{
|
16
|
-
:login => 'tomas@gooddata.com',
|
17
|
-
:country => 'US',
|
18
|
-
:age => 14
|
19
|
-
},
|
20
|
-
{
|
21
|
-
:login => 'petr@gooddata.com',
|
22
|
-
:country => 'US',
|
23
|
-
:age => 19
|
24
|
-
},
|
25
|
-
{
|
26
|
-
:login => 'petr@gooddata.com',
|
27
|
-
:country => 'KZ',
|
28
|
-
:age => 30
|
29
|
-
}
|
30
|
-
]
|
31
|
-
|
32
|
-
COLUMN_BASED_DATA_WITH_HEADERS_AND_NIL_VAL = [
|
33
|
-
{
|
34
|
-
:login => 'tomas@gooddata.com',
|
35
|
-
:country => 'US',
|
36
|
-
:age => 14
|
37
|
-
},
|
38
|
-
{
|
39
|
-
:login => 'petr@gooddata.com',
|
40
|
-
:country => 'US',
|
41
|
-
:age => 19
|
42
|
-
},
|
43
|
-
{
|
44
|
-
:login => 'petr@gooddata.com',
|
45
|
-
:country => 'KZ',
|
46
|
-
:age => nil
|
47
|
-
}
|
48
|
-
]
|
49
|
-
|
50
|
-
COLUMN_BASED_DATA_WITH_HEADERS_AND_EMPTY_VAL = [
|
51
|
-
{
|
52
|
-
:login => 'tomas@gooddata.com',
|
53
|
-
:country => 'US',
|
54
|
-
:age => 14
|
55
|
-
},
|
56
|
-
{
|
57
|
-
:login => 'petr@gooddata.com',
|
58
|
-
:country => 'US',
|
59
|
-
:age => 19
|
60
|
-
},
|
61
|
-
{
|
62
|
-
:login => 'petr@gooddata.com',
|
63
|
-
:country => 'KZ',
|
64
|
-
:age => ''
|
65
|
-
}
|
66
|
-
]
|
67
|
-
|
68
|
-
describe "DSL" do
|
69
|
-
it "should pick the values from row based file" do
|
70
|
-
results = GoodData::UserFilterBuilder.get_values(ROW_BASED_DATA, :labels => [{ :label => "label/34" }])
|
71
|
-
results.should == {
|
72
|
-
"tomas@gooddata.com" => [
|
73
|
-
{ :label => "label/34", :values => %w(US CZ KZ), :over => nil, :to => nil }
|
74
|
-
],
|
75
|
-
"petr@gooddata.com" => [
|
76
|
-
{ :label => "label/34", :values => ["US"], :over => nil, :to => nil },
|
77
|
-
{ :label => "label/34", :values => ["KZ"], :over => nil, :to => nil }
|
78
|
-
]
|
79
|
-
}
|
80
|
-
end
|
81
|
-
|
82
|
-
it "should pick the values from column based file" do
|
83
|
-
results = GoodData::UserFilterBuilder.get_values(
|
84
|
-
COLUMN_BASED_DATA_WITH_HEADERS,
|
85
|
-
:type => :filter,
|
86
|
-
:user_column => :login,
|
87
|
-
:labels => [{ :label => "label/34", :column => :country }]
|
88
|
-
)
|
89
|
-
results.should == {
|
90
|
-
"tomas@gooddata.com" => [
|
91
|
-
{ :label => "label/34", :values => ["US"], :over => nil, :to => nil }
|
92
|
-
],
|
93
|
-
"petr@gooddata.com" => [
|
94
|
-
{ :label => "label/34", :values => ["US"], :over => nil, :to => nil },
|
95
|
-
{ :label => "label/34", :values => ["KZ"], :over => nil, :to => nil }
|
96
|
-
]
|
97
|
-
}
|
98
|
-
end
|
99
|
-
|
100
|
-
it "should pick the values from column based file with multiple columns" do
|
101
|
-
results = GoodData::UserFilterBuilder.get_values(
|
102
|
-
COLUMN_BASED_DATA_WITH_HEADERS,
|
103
|
-
:type => :filter,
|
104
|
-
:user_column => :login,
|
105
|
-
:labels => [{ :label => "label/34", :column => :country }, { :label => "label/99", :column => :age }]
|
106
|
-
)
|
107
|
-
results.should == {
|
108
|
-
"tomas@gooddata.com" => [
|
109
|
-
{ :label => "label/34", :values => ["US"], :over => nil, :to => nil },
|
110
|
-
{ :label => "label/99", :values => [14], :over => nil, :to => nil }
|
111
|
-
],
|
112
|
-
"petr@gooddata.com" => [
|
113
|
-
{ :label => "label/34", :values => ["US"], :over => nil, :to => nil },
|
114
|
-
{ :label => "label/99", :values => [19], :over => nil, :to => nil },
|
115
|
-
{ :label => "label/34", :values => ["KZ"], :over => nil, :to => nil },
|
116
|
-
{ :label => "label/99", :values => [30], :over => nil, :to => nil }
|
117
|
-
]
|
118
|
-
}
|
119
|
-
end
|
120
|
-
|
121
|
-
it "should process end to end" do
|
122
|
-
result = GoodData::UserFilterBuilder.get_filters(
|
123
|
-
COLUMN_BASED_DATA_WITH_HEADERS,
|
124
|
-
:user_column => :login,
|
125
|
-
:labels => [{ :label => { :uri => "label/34" }, :column => :country }, { :label => { :uri => "label/99" }, :column => :age }]
|
126
|
-
)
|
127
|
-
result.should == [
|
128
|
-
{
|
129
|
-
:login => "tomas@gooddata.com",
|
130
|
-
:filters => [
|
131
|
-
{ :label => { :uri => "label/34" }, :values => ["US"], :over => nil, :to => nil },
|
132
|
-
{ :label => { :uri => "label/99" }, :values => [14], :over => nil, :to => nil }
|
133
|
-
]
|
134
|
-
},
|
135
|
-
{
|
136
|
-
:login => "petr@gooddata.com",
|
137
|
-
:filters => [
|
138
|
-
{ :label => { :uri => "label/34" }, :values => %w(US KZ), :over => nil, :to => nil },
|
139
|
-
{ :label => { :uri => "label/99" }, :values => [19, 30], :over => nil, :to => nil }
|
140
|
-
]
|
141
|
-
}
|
142
|
-
]
|
143
|
-
end
|
144
|
-
|
145
|
-
it "should process end to end nil value should be ignored" do
|
146
|
-
result = GoodData::UserFilterBuilder.get_filters(
|
147
|
-
COLUMN_BASED_DATA_WITH_HEADERS_AND_NIL_VAL,
|
148
|
-
:user_column => :login,
|
149
|
-
:labels => [{ :label => { :uri => "label/34" }, :column => :country }, { :label => { :uri => "label/99" }, :column => :age }]
|
150
|
-
)
|
151
|
-
result.should == [
|
152
|
-
{
|
153
|
-
:login => "tomas@gooddata.com",
|
154
|
-
:filters => [
|
155
|
-
{ :label => { :uri => "label/34" }, :values => ["US"], :over => nil, :to => nil },
|
156
|
-
{ :label => { :uri => "label/99" }, :values => [14], :over => nil, :to => nil }
|
157
|
-
]
|
158
|
-
},
|
159
|
-
{
|
160
|
-
:login => "petr@gooddata.com",
|
161
|
-
:filters => [
|
162
|
-
{ :label => { :uri => "label/34" }, :values => %w(US KZ), :over => nil, :to => nil },
|
163
|
-
{ :label => { :uri => "label/99" }, :values => [19], :over => nil, :to => nil }
|
164
|
-
]
|
165
|
-
}
|
166
|
-
]
|
167
|
-
end
|
168
|
-
|
169
|
-
it "should process end to end nil value should be ignored" do
|
170
|
-
result = GoodData::UserFilterBuilder.get_filters(
|
171
|
-
COLUMN_BASED_DATA_WITH_HEADERS_AND_EMPTY_VAL,
|
172
|
-
:user_column => :login,
|
173
|
-
:labels => [
|
174
|
-
{ :label => { :uri => "label/34" }, :column => :country },
|
175
|
-
{ :label => { :uri => "label/99" }, :column => :age }
|
176
|
-
]
|
177
|
-
)
|
178
|
-
result.should == [
|
179
|
-
{
|
180
|
-
:login => "tomas@gooddata.com",
|
181
|
-
:filters => [
|
182
|
-
{ :label => { :uri => "label/34" }, :values => ["US"], :over => nil, :to => nil },
|
183
|
-
{ :label => { :uri => "label/99" }, :values => [14], :over => nil, :to => nil }
|
184
|
-
]
|
185
|
-
},
|
186
|
-
{
|
187
|
-
:login => "petr@gooddata.com",
|
188
|
-
:filters => [
|
189
|
-
{ :label => { :uri => "label/34" }, :values => %w(US KZ), :over => nil, :to => nil },
|
190
|
-
{ :label => { :uri => "label/99" }, :values => [19, ""], :over => nil, :to => nil }
|
191
|
-
]
|
192
|
-
}
|
193
|
-
]
|
194
|
-
end
|
195
|
-
|
196
|
-
it "should collect values for every user" do
|
197
|
-
data = {
|
198
|
-
"tomas" => [
|
199
|
-
{ :label => "label/34", :values => ["US"] },
|
200
|
-
{ :label => "label/34", :values => ["KZ"] },
|
201
|
-
{ :label => "label/99", :values => [18] },
|
202
|
-
{ :label => "label/99", :values => [20] }
|
203
|
-
],
|
204
|
-
"petr" => [
|
205
|
-
{ :label => "label/34", :values => ["US"] },
|
206
|
-
{ :label => "label/99", :values => [2] },
|
207
|
-
{ :label => "label/99", :values => [1] }
|
208
|
-
]
|
209
|
-
}
|
210
|
-
result = GoodData::UserFilterBuilder.reduce_results(data)
|
211
|
-
result.should == [
|
212
|
-
{
|
213
|
-
:login => "tomas",
|
214
|
-
:filters => [
|
215
|
-
{ :label => "label/34", :values => %w(US KZ), :over => nil, :to => nil },
|
216
|
-
{ :label => "label/99", :values => [18, 20], :over => nil, :to => nil }
|
217
|
-
]
|
218
|
-
},
|
219
|
-
{
|
220
|
-
:login => "petr",
|
221
|
-
:filters => [
|
222
|
-
{ :label => "label/34", :values => ["US"], :over => nil, :to => nil },
|
223
|
-
{ :label => "label/99", :values => [2, 1], :over => nil, :to => nil }
|
224
|
-
]
|
225
|
-
}
|
226
|
-
]
|
227
|
-
end
|
228
|
-
|
229
|
-
it "should collect values for every label" do
|
230
|
-
data = [
|
231
|
-
{ :label => "label/34", :values => ["US"] },
|
232
|
-
{ :label => "label/34", :values => ["KZ"] },
|
233
|
-
{ :label => "label/99", :values => [18] },
|
234
|
-
{ :label => "label/99", :values => [20] }
|
235
|
-
]
|
236
|
-
result = GoodData::UserFilterBuilder.collect_labels(data)
|
237
|
-
result.should == [
|
238
|
-
{ :label => "label/34", :values => %w(US KZ), :over => nil, :to => nil },
|
239
|
-
{ :label => "label/99", :values => [18, 20], :over => nil, :to => nil }
|
240
|
-
]
|
241
|
-
end
|
242
|
-
|
243
|
-
it "should collect values" do
|
244
|
-
data = [
|
245
|
-
{ :label => "label/34", :values => ["US"] },
|
246
|
-
{ :label => "label/34", :values => ["KZ"] }
|
247
|
-
]
|
248
|
-
results = GoodData::UserFilterBuilder.collect_values(data)
|
249
|
-
results.should == %w(US KZ)
|
250
|
-
end
|
251
|
-
|
252
|
-
it "should translate filters into MAQL filters" do
|
253
|
-
data = [
|
254
|
-
{
|
255
|
-
:login => "tomas@gooddata.com",
|
256
|
-
:filters => [
|
257
|
-
{ :label => "label/34", :values => ["US"] },
|
258
|
-
{ :label => "label/99", :values => [14] }
|
259
|
-
]
|
260
|
-
},
|
261
|
-
{
|
262
|
-
:login => "petr@gooddata.com",
|
263
|
-
:filters => [
|
264
|
-
{ :label => "label/34", :values => %w(US KZ) },
|
265
|
-
{ :label => "label/99", :values => [19] }
|
266
|
-
]
|
267
|
-
}
|
268
|
-
]
|
269
|
-
results = data.map do |user_data|
|
270
|
-
{
|
271
|
-
:login => user_data[:login],
|
272
|
-
:maql_filter => user_data[:filters].map { |item| "[#{item[:label]}] IN (#{item[:values].join(', ')})" }.join(" AND ")
|
273
|
-
}
|
274
|
-
end
|
275
|
-
results.should == [
|
276
|
-
{ :login => "tomas@gooddata.com", :maql_filter => "[label/34] IN (US) AND [label/99] IN (14)" },
|
277
|
-
{ :login => "petr@gooddata.com", :maql_filter => "[label/34] IN (US, KZ) AND [label/99] IN (19)" }
|
278
|
-
]
|
279
|
-
end
|
280
|
-
end
|
@@ -1,117 +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/rest/phmap'
|
8
|
-
|
9
|
-
PlaceholderExample = Struct.new(:name, :title, :mapped)
|
10
|
-
|
11
|
-
describe GoodData::Rest::Connection do
|
12
|
-
[
|
13
|
-
PlaceholderExample.new('execute', '/gdc/projects/uif55z7zg9zunnsffsqu6nzyg38j20qg/execute', '/gdc/projects/{id}/execute'),
|
14
|
-
|
15
|
-
PlaceholderExample.new('outputStage', '/gdc/dataload/projects/uif55z7zg9zunnsffsqu6nzyg38j20qg/outputStage', '/gdc/dataload/projects/{id}/outputStage'),
|
16
|
-
|
17
|
-
PlaceholderExample.new('datawarehouse instance', '/gdc/datawarehouse/instances/c90ef89f07978760523dd409165c71f3', '/gdc/datawarehouse/instances/{id}'),
|
18
|
-
PlaceholderExample.new('datawarehouse execution', '/gdc/datawarehouse/executions/exec123', '/gdc/datawarehouse/executions/{id}'),
|
19
|
-
|
20
|
-
PlaceholderExample.new('dataproduct client segment', '/gdc/domains/stg2-lcm-prod/dataproducts/MY-DP/clients?segment=MY-SEG4',
|
21
|
-
'/gdc/domains/{id}/dataproducts/{data_product}/clients?segment={segment}'),
|
22
|
-
PlaceholderExample.new('dataproduct client', '/gdc/domains/MY_DOMAIN3/dataproducts/4_7-prod/clients/some-client1',
|
23
|
-
'/gdc/domains/{id}/dataproducts/{data_product}/clients/{client}'),
|
24
|
-
PlaceholderExample.new('dataproduct clients', '/gdc/domains/D_-3/dataproducts/DP_1-/clients', '/gdc/domains/{id}/dataproducts/{data_product}/clients'),
|
25
|
-
|
26
|
-
PlaceholderExample.new('synchronizeClients result details', '/gdc/domains/d2/dataproducts/dp-6/segments/seg_1/synchronizeClients/results/_-res8/details?offset=0&limit=1000',
|
27
|
-
'/gdc/domains/{id}/dataproducts/{data_product}/segments/{segment}/synchronizeClients/results/{result}/details?offset={offset}&limit={limit}'),
|
28
|
-
PlaceholderExample.new('synchronizeClients result', '/gdc/domains/D/dataproducts/DP/segments/SEG/synchronizeClients/results/RES',
|
29
|
-
'/gdc/domains/{id}/dataproducts/{data_product}/segments/{segment}/synchronizeClients/results/{result}'),
|
30
|
-
PlaceholderExample.new('dataproduct segment', '/gdc/domains/D/dataproducts/DP/segments/SEG', '/gdc/domains/{id}/dataproducts/{data_product}/segments/{segment}'),
|
31
|
-
PlaceholderExample.new('dataproduct segments', '/gdc/domains/D/dataproducts/DP/segments', '/gdc/domains/{id}/dataproducts/{data_product}/segments'),
|
32
|
-
|
33
|
-
PlaceholderExample.new('provisionClientProjects result details', '/gdc/domains/D/dataproducts/DP/provisionClientProjects/results/RES/details?offset=7&limit=50',
|
34
|
-
'/gdc/domains/{id}/dataproducts/{data_product}/provisionClientProjects/results/{result}/details?offset={offset}&limit={limit}'),
|
35
|
-
PlaceholderExample.new('provisionClientProjects result', '/gdc/domains/D/dataproducts/DP/provisionClientProjects/results/RES',
|
36
|
-
'/gdc/domains/{id}/dataproducts/{data_product}/provisionClientProjects/results/{result}'),
|
37
|
-
PlaceholderExample.new('provisionClientProjects', '/gdc/domains/D/dataproducts/DP/provisionClientProjects',
|
38
|
-
'/gdc/domains/{id}/dataproducts/{data_product}/provisionClientProjects'),
|
39
|
-
PlaceholderExample.new('updateClients delet extra', '/gdc/domains/D/dataproducts/DP/updateClients?deleteExtraInSegments=SEG',
|
40
|
-
'/gdc/domains/{id}/dataproducts/{data_product}/updateClients?deleteExtraInSegments={segments}'),
|
41
|
-
PlaceholderExample.new('updateClients', '/gdc/domains/D/dataproducts/DP/updateClients', '/gdc/domains/{id}/dataproducts/{data_product}/updateClients'),
|
42
|
-
|
43
|
-
PlaceholderExample.new('domain dataproducts', '/gdc/domains/D/dataproducts/DP', '/gdc/domains/{id}/dataproducts/{data_product}'),
|
44
|
-
PlaceholderExample.new('domain dataproducts', '/gdc/domains/D/dataproducts', '/gdc/domains/{id}/dataproducts'),
|
45
|
-
|
46
|
-
PlaceholderExample.new('segment synchronizeClients result details', '/gdc/domains/D/segments/SEG/synchronizeClients/results/RES/details?offset=0&limit=100',
|
47
|
-
'/gdc/domains/{id}/segments/{segment}/synchronizeClients/results/{result}/details?offset={offset}&limit={limit}'),
|
48
|
-
PlaceholderExample.new('segment synchronizeClients result', '/gdc/domains/D/segments/SEG/synchronizeClients/results/RES',
|
49
|
-
'/gdc/domains/{id}/segments/{segment}/synchronizeClients/results/{result}'),
|
50
|
-
PlaceholderExample.new('domain segment', '/gdc/domains/D/segments/SEG/', '/gdc/domains/{id}/segments/{segment}/'),
|
51
|
-
PlaceholderExample.new('domain segment', '/gdc/domains/D/segments/SEG', '/gdc/domains/{id}/segments/{segment}'),
|
52
|
-
|
53
|
-
PlaceholderExample.new('domain client segment', '/gdc/domains/D/clients?segment=SEG', '/gdc/domains/{id}/clients?segment={segment}'),
|
54
|
-
PlaceholderExample.new('client settings title', '/gdc/domains/D/clients/C/settings/lcm.title', '/gdc/domains/{id}/clients/{client_id}/settings/lcm.title'),
|
55
|
-
PlaceholderExample.new('client settings token', '/gdc/domains/D/clients/C/settings/lcm.token', '/gdc/domains/{id}/clients/{client_id}/settings/lcm.token'),
|
56
|
-
PlaceholderExample.new('domain client', '/gdc/domains/D/clients/C', '/gdc/domains/{id}/clients/{client_id}'),
|
57
|
-
PlaceholderExample.new('domain provisionClientProjects result details', '/gdc/domains/D/provisionClientProjects/results/R/details?offset=0&limit=100',
|
58
|
-
'/gdc/domains/{id}/provisionClientProjects/results/{result}/details?offset={offset}&limit={limit}'),
|
59
|
-
PlaceholderExample.new('domain provisionClientProjects result', '/gdc/domains/D/provisionClientProjects/results/R',
|
60
|
-
'/gdc/domains/{id}/provisionClientProjects/results/{result}'),
|
61
|
-
PlaceholderExample.new('domain provisionClientProjects', '/gdc/domains/D/provisionClientProjects', '/gdc/domains/{id}/provisionClientProjects'),
|
62
|
-
PlaceholderExample.new('domain updateClients', '/gdc/domains/D/updateClients', '/gdc/domains/{id}/updateClients'),
|
63
|
-
PlaceholderExample.new('domain', '/gdc/domains/D/', '/gdc/domains/{id}/'),
|
64
|
-
|
65
|
-
PlaceholderExample.new('exporter result', '/gdc/exporter/result/a23f/c56', '/gdc/exporter/result/{id}/{id}'),
|
66
|
-
|
67
|
-
PlaceholderExample.new('syncProcesses task', '/gdc/internal/lcm/domains/D/dataproducts/DP/segments/SEG/syncProcesses/P',
|
68
|
-
'/gdc/internal/lcm/domains/{id}/dataproducts/{data_product}/segments/{segment}/syncProcesses/{process}'),
|
69
|
-
PlaceholderExample.new('syncProcesses', '/gdc/internal/lcm/domains/D/dataproducts/DP/segments/SEG/syncProcesses',
|
70
|
-
'/gdc/internal/lcm/domains/{id}/dataproducts/{data_product}/segments/{segment}/syncProcesses'),
|
71
|
-
|
72
|
-
PlaceholderExample.new('setPermissions', '/gdc/internal/projects/PID/objects/setPermissions', '/gdc/internal/projects/{id}/objects/setPermissions'),
|
73
|
-
|
74
|
-
PlaceholderExample.new('md variable', '/gdc/md/PID/variables/item/54', '/gdc/md/{id}/variables/item/{id}'),
|
75
|
-
PlaceholderExample.new('md validate task', '/gdc/md/PID/validate/task/some-task56', '/gdc/md/{id}/validate/task/{id}'),
|
76
|
-
PlaceholderExample.new('md using', '/gdc/md/PID/using2/456/980', '/gdc/md/{id}/using2/{id}/{id}'),
|
77
|
-
PlaceholderExample.new('md using', '/gdc/md/PID/using2/456', '/gdc/md/{id}/using2/{id}'),
|
78
|
-
PlaceholderExample.new('md userfilters user', '/gdc/md/PID/userfilters?users=/gdc/account/profile/rubydev+admin@goo', '/gdc/md/{id}/userfilters?users={users}'),
|
79
|
-
PlaceholderExample.new('md userfilters', '/gdc/md/PID/userfilters?count=1&offset=5', '/gdc/md/{id}/userfilters?count={count}&offset={offset}'),
|
80
|
-
PlaceholderExample.new('md usedby', '/gdc/md/PID/usedby2/4/5', '/gdc/md/{id}/usedby2/{id}/{id}'),
|
81
|
-
PlaceholderExample.new('md usedby', '/gdc/md/PID/usedby2/4', '/gdc/md/{id}/usedby2/{id}'),
|
82
|
-
PlaceholderExample.new('md task status', '/gdc/md/PID/tasks/567/status', '/gdc/md/{id}/tasks/{id}/status'),
|
83
|
-
PlaceholderExample.new('md validElements', '/gdc/md/PID/obj/876/validElements', '/gdc/md/{id}/obj/{id}/validElements'),
|
84
|
-
PlaceholderExample.new('md elements', '/gdc/md/PID/obj/876/elements', '/gdc/md/{id}/obj/{id}/elements'),
|
85
|
-
PlaceholderExample.new('md obj', '/gdc/md/PID/obj/876', '/gdc/md/{id}/obj/{id}'),
|
86
|
-
PlaceholderExample.new('md etltaks', '/gdc/md/PID/etltask/567', '/gdc/md/{id}/etltask/{id}'),
|
87
|
-
PlaceholderExample.new('md dataResult', '/gdc/md/PID/dataResult/666', '/gdc/md/{id}/dataResult/{id}'),
|
88
|
-
PlaceholderExample.new('md', '/gdc/md/PID', '/gdc/md/{id}'),
|
89
|
-
|
90
|
-
PlaceholderExample.new('project user roles', '/gdc/projects/PID/users/UID/roles', '/gdc/projects/{id}/users/{id}/roles'),
|
91
|
-
PlaceholderExample.new('project user permissions', '/gdc/projects/PID/users/UID/permissions', '/gdc/projects/{id}/users/{id}/permissions'),
|
92
|
-
PlaceholderExample.new('project users', '/gdc/projects/PID/users', '/gdc/projects/{id}/users'),
|
93
|
-
PlaceholderExample.new('schedule execution', '/gdc/projects/PID/schedules/SCHED/executions/EX', '/gdc/projects/{id}/schedules/{id}/executions/{id}'),
|
94
|
-
PlaceholderExample.new('schedule', '/gdc/projects/PID/schedules/SCHED', '/gdc/projects/{id}/schedules/{id}'),
|
95
|
-
PlaceholderExample.new('project role', '/gdc/projects/PID/roles/555', '/gdc/projects/{id}/roles/{id}'),
|
96
|
-
PlaceholderExample.new('model view view', '/gdc/projects/PID/model/view/VIEW', '/gdc/projects/{id}/model/view/{id}'),
|
97
|
-
PlaceholderExample.new('model view', '/gdc/projects/PID/model/view', '/gdc/projects/{id}/model/view'),
|
98
|
-
PlaceholderExample.new('model diff diff', '/gdc/projects/PID/model/diff/DIFF', '/gdc/projects/{id}/model/diff/{id}'),
|
99
|
-
PlaceholderExample.new('model diff', '/gdc/projects/PID/model/diff', '/gdc/projects/{id}/model/diff'),
|
100
|
-
PlaceholderExample.new('dataload metadata', '/gdc/projects/PID/dataload/metadata/PID', '/gdc/projects/{id}/dataload/metadata/{project}'),
|
101
|
-
PlaceholderExample.new('dataload execution', '/gdc/projects/PID/dataload/processes/PRID/executions/EX', '/gdc/projects/{id}/dataload/processes/{id}/executions/{id}'),
|
102
|
-
PlaceholderExample.new('dataload process', '/gdc/projects/PID/dataload/processes/PRID', '/gdc/projects/{id}/dataload/processes/{id}'),
|
103
|
-
PlaceholderExample.new('project', '/gdc/projects/PID/', '/gdc/projects/{id}/'),
|
104
|
-
PlaceholderExample.new('project', '/gdc/projects/PID', '/gdc/projects/{id}'),
|
105
|
-
|
106
|
-
PlaceholderExample.new('userGroup', '/gdc/userGroups/GID', '/gdc/userGroups/{id}'),
|
107
|
-
|
108
|
-
PlaceholderExample.new('profile', '/gdc/account/profile/UID', '/gdc/account/profile/{id}'),
|
109
|
-
PlaceholderExample.new('login', '/gdc/account/login/UID', '/gdc/account/login/{id}'),
|
110
|
-
PlaceholderExample.new('domain user', '/gdc/account/domains/D/users?login=rubydev+admin@gooddata.com', '/gdc/account/domains/{id}/users?login={login}'),
|
111
|
-
PlaceholderExample.new('account domain', '/gdc/account/domains/D', '/gdc/account/domains/{id}')
|
112
|
-
].each do |example|
|
113
|
-
it "should map placeholders in #{example.name} API" do
|
114
|
-
expect(GoodData::Rest::Connection.map_placeholders(example.title)).to eq(example.mapped)
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|