gooddata 0.6.26 → 0.6.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/gooddata.gemspec +3 -4
  3. data/lib/gooddata/cli/shared.rb +5 -0
  4. data/lib/gooddata/commands/project.rb +2 -4
  5. data/lib/gooddata/core/logging.rb +48 -29
  6. data/lib/gooddata/core/nil_logger.rb +6 -0
  7. data/lib/gooddata/helpers/global_helpers.rb +3 -3
  8. data/lib/gooddata/models/domain.rb +5 -4
  9. data/lib/gooddata/models/metadata.rb +2 -1
  10. data/lib/gooddata/models/metadata/report.rb +5 -1
  11. data/lib/gooddata/models/model.rb +1 -1
  12. data/lib/gooddata/models/process.rb +2 -0
  13. data/lib/gooddata/models/project.rb +30 -9
  14. data/lib/gooddata/models/project_metadata.rb +8 -2
  15. data/lib/gooddata/rest/connection.rb +19 -17
  16. data/lib/gooddata/version.rb +1 -1
  17. data/spec/environment/develop.rb +4 -4
  18. data/spec/environment/environment.rb +9 -2
  19. data/spec/integration/clients_spec.rb +5 -6
  20. data/spec/integration/full_process_schedule_spec.rb +1 -1
  21. data/spec/integration/project_spec.rb +3 -3
  22. data/spec/integration/schedule_spec.rb +2 -2
  23. data/spec/integration/user_filters_spec.rb +2 -1
  24. data/spec/integration/user_group_spec.rb +8 -8
  25. data/spec/integration/variables_spec.rb +2 -1
  26. data/spec/unit/core/logging_spec.rb +11 -3
  27. data/spec/unit/helpers_spec.rb +0 -1
  28. data/spec/unit/models/domain_spec.rb +0 -9
  29. data/spec/unit/models/from_wire_spec.rb +0 -4
  30. data/spec/unit/models/metric_spec.rb +0 -4
  31. data/spec/unit/models/profile_spec.rb +3 -2
  32. data/spec/unit/models/project_role_spec.rb +7 -8
  33. data/spec/unit/models/to_manifest_spec.rb +2 -4
  34. metadata +30 -81
  35. data/lib/gooddata/rest/connections/rest_client_connection.rb +0 -181
  36. data/spec/unit/cli/commands/cmd_api_spec.rb +0 -40
  37. data/spec/unit/cli/commands/cmd_domain_spec.rb +0 -112
  38. data/spec/unit/cli/commands/cmd_process_spec.rb +0 -47
  39. data/spec/unit/cli/commands/cmd_project_spec.rb +0 -85
  40. data/spec/unit/cli/commands/cmd_role_spec.rb +0 -59
  41. data/spec/unit/cli/commands/cmd_run_ruby_spec.rb +0 -17
  42. data/spec/unit/cli/commands/cmd_scaffold_spec.rb +0 -64
  43. data/spec/unit/cli/commands/cmd_user_spec.rb +0 -35
  44. data/spec/unit/commands/command_api_spec.rb +0 -18
  45. data/spec/unit/commands/command_auth_spec.rb +0 -171
  46. data/spec/unit/commands/command_dataset_spec.rb +0 -50
  47. data/spec/unit/commands/command_process_spec.rb +0 -97
  48. data/spec/unit/commands/command_scaffold_spec.rb +0 -67
  49. data/spec/unit/commands/command_user_spec.rb +0 -28
  50. data/spec/unit/data/guesser_spec.rb +0 -63
@@ -1,67 +0,0 @@
1
- # encoding: UTF-8
2
- #
3
- # Copyright (c) 2010-2015 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/commands/scaffold'
8
-
9
- describe GoodData::Command::Scaffold do
10
- before(:all) do
11
- @suffix = Time.now.strftime('%Y%m%d%H%M%S')
12
- end
13
-
14
- before(:each) do
15
- @client = ConnectionHelper.create_default_connection
16
- end
17
-
18
- after(:each) do
19
- @client.disconnect
20
- end
21
-
22
- it "Is Possible to create GoodData::Command::Scaffold instance" do
23
- cmd = GoodData::Command::Scaffold.new()
24
- cmd.should be_a(GoodData::Command::Scaffold)
25
- end
26
-
27
- describe "#brick" do
28
- before(:each) do
29
- @brick_name = "test_brick_#{@suffix}"
30
- end
31
-
32
- after(:each) do
33
- FileUtils.rm_rf @brick_name
34
- end
35
-
36
- it "Throws ArgumentError exception if no name specified" do
37
- expect do
38
- GoodData::Command::Scaffold.brick(nil)
39
- end.to raise_exception
40
- end
41
-
42
- it "Scaffolds new brick" do
43
- GoodData::Command::Scaffold.brick(@brick_name)
44
- end
45
- end
46
-
47
- describe "#project" do
48
- before(:each) do
49
- @project_name = "test_project_#{@suffix}"
50
- end
51
-
52
- after(:each) do
53
- FileUtils.rm_rf @project_name
54
- end
55
-
56
- it "Throws ArgumentError exception if no name specified" do
57
- expect do
58
- GoodData::Command::Scaffold.project(nil)
59
- end.to raise_exception
60
- end
61
-
62
- it "Scaffolds new project" do
63
- GoodData::Command::Scaffold.project(@project_name)
64
- end
65
- end
66
-
67
- end
@@ -1,28 +0,0 @@
1
- # encoding: UTF-8
2
- #
3
- # Copyright (c) 2010-2015 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/commands/user'
8
-
9
- describe GoodData::Command::User do
10
- before(:each) do
11
- @client = ConnectionHelper.create_default_connection
12
- end
13
-
14
- after(:each) do
15
- @client.disconnect
16
- end
17
-
18
- it "Is Possible to create GoodData::Command::Membership instance" do
19
- cmd = GoodData::Command::User.new()
20
- cmd.should be_a(GoodData::Command::User)
21
- end
22
-
23
- describe "#show" do
24
- it "Shows profile" do
25
- GoodData::Command::User.show(:client => @client)
26
- end
27
- end
28
- end
@@ -1,63 +0,0 @@
1
- # encoding: UTF-8
2
- #
3
- # Copyright (c) 2010-2015 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
- describe GoodData::Data::Guesser do
10
- skip('Guesser needs to be redone. Failing due to rubocop fixes.')
11
- it "order LDM types as follows: cp, fact, date, attribute" do
12
- expect = [:connection_point, :fact, :date, :attribute]
13
- result = GoodData::Data::Guesser::sort_types([:fact, :attribute, :connection_point, :date])
14
- result.should == expect
15
-
16
- expect = [:fact]
17
- result = GoodData::Data::Guesser::sort_types([:fact])
18
- result.should == expect
19
-
20
- expect = []
21
- result = GoodData::Data::Guesser::sort_types([])
22
- result.should == expect
23
- end
24
-
25
- it "guess facts, dates and connection points from a simple CSV" do
26
- skip('Guesser is disabled for now')
27
-
28
- csv = [
29
- ['cp', 'a1', 'a2', 'd1', 'd2', 'f'],
30
- ['1', 'one', 'huh', '2001-01-02', nil, '-1'],
31
- ['2', 'two', 'blah', nil, '1970-10-23', '2.3'],
32
- ['3', 'three', 'bleh', '0000-00-00', nil, '-3.14159'],
33
- ['4', 'one', 'huh', '2010-02-28 08:12:34', '1970-10-23', nil]
34
- ]
35
-
36
- fields = GoodData::Data::Guesser.new(csv).guess(csv.size + 10)
37
-
38
- expect = GoodData::Data::Guesser::sort_types([:connection_point, :fact, :attribute])
39
- result = fields['cp']
40
- result.should == expect
41
-
42
- expect = [:attribute]
43
- result = fields['a1']
44
- expect.should == result
45
-
46
- expect = [:attribute]
47
- result = fields['a2']
48
- result.should == expect
49
-
50
- expect = GoodData::Data::Guesser::sort_types([:attribute, :connection_point, :date])
51
- result = fields['d1']
52
- result.should == expect
53
-
54
- expect = GoodData::Data::Guesser::sort_types([:attribute, :date])
55
- result = fields['d2']
56
- result.should == expect
57
-
58
- expect = GoodData::Data::Guesser::sort_types([:attribute, :connection_point, :fact])
59
- result = fields['f']
60
- result.should == expect
61
-
62
- end
63
- end