gooddata 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. checksums.yaml +13 -5
  2. data/.rubocop.yml +23 -0
  3. data/.travis.yml +9 -4
  4. data/CLI.md +439 -0
  5. data/Gemfile +0 -1
  6. data/README.md +2 -2
  7. data/Rakefile +60 -8
  8. data/doc/templates/default/module/setup.rb +1 -1
  9. data/examples.rb +2 -0
  10. data/gooddata +2 -0
  11. data/gooddata.gemspec +12 -8
  12. data/lib/gooddata.rb +0 -2
  13. data/lib/gooddata/bricks/base_downloader.rb +52 -47
  14. data/lib/gooddata/bricks/brick.rb +20 -31
  15. data/lib/gooddata/bricks/bricks.rb +1 -1
  16. data/lib/gooddata/bricks/middleware/base_middleware.rb +9 -7
  17. data/lib/gooddata/bricks/middleware/bench_middleware.rb +12 -10
  18. data/lib/gooddata/bricks/middleware/bulk_salesforce_middleware.rb +28 -28
  19. data/lib/gooddata/bricks/middleware/fs_upload_middleware.rb +20 -16
  20. data/lib/gooddata/bricks/middleware/gooddata_middleware.rb +21 -19
  21. data/lib/gooddata/bricks/middleware/logger_middleware.rb +10 -8
  22. data/lib/gooddata/bricks/middleware/restforce_middleware.rb +36 -34
  23. data/lib/gooddata/bricks/middleware/stdout_middleware.rb +11 -9
  24. data/lib/gooddata/bricks/middleware/twitter_middleware.rb +14 -12
  25. data/lib/gooddata/bricks/pipeline.rb +28 -0
  26. data/lib/gooddata/bricks/utils.rb +10 -8
  27. data/lib/gooddata/cli/cli.rb +1 -6
  28. data/lib/gooddata/cli/commands/auth_cmd.rb +1 -1
  29. data/lib/gooddata/cli/commands/console_cmd.rb +7 -5
  30. data/lib/gooddata/cli/commands/domain_cmd.rb +45 -0
  31. data/lib/gooddata/cli/commands/process_cmd.rb +42 -5
  32. data/lib/gooddata/cli/commands/project_cmd.rb +96 -36
  33. data/lib/gooddata/cli/commands/projects_cmd.rb +21 -0
  34. data/lib/gooddata/cli/commands/role_cmd.rb +28 -0
  35. data/lib/gooddata/cli/commands/run_ruby_cmd.rb +5 -5
  36. data/lib/gooddata/cli/commands/scaffold_cmd.rb +1 -1
  37. data/lib/gooddata/cli/commands/{profile_cmd.rb → user_cmd.rb} +7 -9
  38. data/lib/gooddata/cli/shared.rb +3 -2
  39. data/lib/gooddata/client.rb +16 -304
  40. data/lib/gooddata/commands/api.rb +13 -5
  41. data/lib/gooddata/commands/auth.rb +47 -40
  42. data/lib/gooddata/commands/base.rb +4 -2
  43. data/lib/gooddata/commands/commands.rb +1 -1
  44. data/lib/gooddata/commands/datasets.rb +20 -7
  45. data/lib/gooddata/commands/domain.rb +23 -0
  46. data/lib/gooddata/commands/process.rb +23 -117
  47. data/lib/gooddata/commands/project.rb +147 -0
  48. data/lib/gooddata/commands/projects.rb +8 -102
  49. data/lib/gooddata/commands/role.rb +26 -0
  50. data/lib/gooddata/commands/runners.rb +41 -38
  51. data/lib/gooddata/commands/scaffold.rb +46 -43
  52. data/lib/gooddata/commands/user.rb +33 -0
  53. data/lib/gooddata/connection.rb +43 -353
  54. data/lib/gooddata/core/connection.rb +389 -0
  55. data/lib/gooddata/core/core.rb +5 -4
  56. data/lib/gooddata/core/logging.rb +48 -0
  57. data/lib/gooddata/core/nil_logger.rb +13 -0
  58. data/lib/gooddata/core/project.rb +70 -0
  59. data/lib/gooddata/core/rest.rb +120 -0
  60. data/lib/gooddata/core/threaded.rb +14 -0
  61. data/lib/gooddata/core/user.rb +19 -0
  62. data/lib/gooddata/data/data.rb +2 -1
  63. data/lib/gooddata/data/guesser.rb +16 -12
  64. data/lib/gooddata/exceptions/command_failed.rb +1 -1
  65. data/lib/gooddata/exceptions/exceptions.rb +2 -1
  66. data/lib/gooddata/exceptions/no_project_error.rb +11 -0
  67. data/lib/gooddata/exceptions/project_not_found.rb +1 -1
  68. data/lib/gooddata/extensions/big_decimal.rb +6 -2
  69. data/lib/gooddata/extract.rb +10 -8
  70. data/lib/gooddata/goodzilla/goodzilla.rb +61 -59
  71. data/lib/gooddata/helpers.rb +15 -9
  72. data/lib/gooddata/models/account_settings.rb +124 -0
  73. data/lib/gooddata/models/attributes/anchor.rb +37 -0
  74. data/lib/gooddata/models/attributes/attributes.rb +8 -0
  75. data/lib/gooddata/models/attributes/date_attribute.rb +25 -0
  76. data/lib/gooddata/models/attributes/time_attribute.rb +24 -0
  77. data/lib/gooddata/models/columns/attribute.rb +71 -0
  78. data/lib/gooddata/models/columns/columns.rb +8 -0
  79. data/lib/gooddata/models/columns/date_column.rb +63 -0
  80. data/lib/gooddata/models/columns/fact_model.rb +54 -0
  81. data/lib/gooddata/models/columns/label.rb +55 -0
  82. data/lib/gooddata/models/columns/reference.rb +57 -0
  83. data/lib/gooddata/models/dashboard_builder.rb +26 -0
  84. data/lib/gooddata/models/data_result.rb +10 -9
  85. data/lib/gooddata/models/domain.rb +131 -0
  86. data/lib/gooddata/models/empty_result.rb +5 -8
  87. data/lib/gooddata/models/facts/facts.rb +8 -0
  88. data/lib/gooddata/models/facts/time_fact.rb +20 -0
  89. data/lib/gooddata/models/folders/attribute_folder.rb +20 -0
  90. data/lib/gooddata/models/folders/fact_folder.rb +20 -0
  91. data/lib/gooddata/models/folders/folders.rb +8 -0
  92. data/lib/gooddata/models/invitation.rb +78 -0
  93. data/lib/gooddata/models/links.rb +6 -6
  94. data/lib/gooddata/models/md_object.rb +25 -0
  95. data/lib/gooddata/models/metadata.rb +160 -62
  96. data/lib/gooddata/models/metadata/attribute.rb +81 -0
  97. data/lib/gooddata/models/metadata/column.rb +61 -0
  98. data/lib/gooddata/models/{dashboard.rb → metadata/dashboard.rb} +12 -7
  99. data/lib/gooddata/models/{data_set.rb → metadata/data_set.rb} +5 -4
  100. data/lib/gooddata/models/metadata/date_dimension.rb +26 -0
  101. data/lib/gooddata/models/metadata/display_form.rb +61 -0
  102. data/lib/gooddata/models/metadata/fact.rb +36 -0
  103. data/lib/gooddata/models/metadata/folder.rb +24 -0
  104. data/lib/gooddata/models/metadata/metadata.rb +8 -0
  105. data/lib/gooddata/models/metadata/metric.rb +197 -0
  106. data/lib/gooddata/models/metadata/report.rb +115 -0
  107. data/lib/gooddata/models/{report_definition.rb → metadata/report_definition.rb} +16 -10
  108. data/lib/gooddata/models/metadata/schema.rb +227 -0
  109. data/lib/gooddata/models/model.rb +38 -1339
  110. data/lib/gooddata/models/models.rb +5 -2
  111. data/lib/gooddata/models/module_constants.rb +29 -0
  112. data/lib/gooddata/models/process.rb +142 -13
  113. data/lib/gooddata/models/profile.rb +4 -6
  114. data/lib/gooddata/models/project.rb +406 -136
  115. data/lib/gooddata/models/project_blueprint.rb +221 -0
  116. data/lib/gooddata/models/project_builder.rb +136 -0
  117. data/lib/gooddata/models/project_creator.rb +138 -0
  118. data/lib/gooddata/models/project_metadata.rb +11 -10
  119. data/lib/gooddata/models/project_role.rb +92 -0
  120. data/lib/gooddata/models/references/date_reference.rb +44 -0
  121. data/lib/gooddata/models/references/references.rb +8 -0
  122. data/lib/gooddata/models/references/time_reference.rb +13 -0
  123. data/lib/gooddata/models/report_data_result.rb +11 -11
  124. data/lib/gooddata/models/schedule.rb +284 -0
  125. data/lib/gooddata/models/schema_blueprint.rb +158 -0
  126. data/lib/gooddata/models/schema_builder.rb +81 -0
  127. data/lib/gooddata/models/tab_builder.rb +23 -0
  128. data/lib/gooddata/models/user.rb +165 -0
  129. data/lib/gooddata/version.rb +1 -1
  130. data/lib/templates/project/data/devs.csv +1 -1
  131. data/lib/templates/project/data/repos.csv +1 -1
  132. data/lib/templates/project/model/model.rb.erb +7 -11
  133. data/spec/bricks/bricks_spec.rb +2 -0
  134. data/spec/data/test-ci-data.csv +2 -0
  135. data/spec/data/test_project_model_spec.json +7 -27
  136. data/spec/helpers/blueprint_helper.rb +2 -0
  137. data/spec/helpers/cli_helper.rb +2 -0
  138. data/spec/helpers/connection_helper.rb +14 -1
  139. data/spec/helpers/project_helper.rb +16 -0
  140. data/spec/helpers/schema_helper.rb +16 -0
  141. data/spec/integration/command_projects_spec.rb +7 -7
  142. data/spec/integration/create_from_template_spec.rb +2 -2
  143. data/spec/integration/full_project_spec.rb +160 -7
  144. data/spec/integration/partial_md_export_import_spec.rb +3 -3
  145. data/spec/logging_in_logging_out_spec.rb +2 -1
  146. data/spec/spec_helper.rb +26 -4
  147. data/spec/unit/bricks/bricks_spec.rb +15 -7
  148. data/spec/unit/bricks/middleware/bench_middleware_spec.rb +2 -0
  149. data/spec/unit/bricks/middleware/bulk_salesforce_middleware_spec.rb +2 -0
  150. data/spec/unit/bricks/middleware/gooddata_middleware_spec.rb +2 -0
  151. data/spec/unit/bricks/middleware/logger_middleware_spec.rb +2 -0
  152. data/spec/unit/bricks/middleware/restforce_middleware_spec.rb +2 -0
  153. data/spec/unit/bricks/middleware/stdout_middleware_spec.rb +2 -0
  154. data/spec/unit/bricks/middleware/twitter_middleware_spec.rb +2 -0
  155. data/spec/unit/cli/cli_spec.rb +2 -0
  156. data/spec/unit/cli/commands/cmd_api_spec.rb +23 -15
  157. data/spec/unit/cli/commands/cmd_auth_spec.rb +8 -4
  158. data/spec/unit/cli/commands/cmd_domain_spec.rb +82 -0
  159. data/spec/unit/cli/commands/cmd_process_spec.rb +29 -13
  160. data/spec/unit/cli/commands/cmd_project_spec.rb +51 -30
  161. data/spec/unit/cli/commands/cmd_role_spec.rb +44 -0
  162. data/spec/unit/cli/commands/cmd_run_ruby_spec.rb +8 -4
  163. data/spec/unit/cli/commands/cmd_scaffold_spec.rb +48 -11
  164. data/spec/unit/cli/commands/cmd_user_spec.rb +29 -0
  165. data/spec/unit/commands/command_api_spec.rb +1 -1
  166. data/spec/unit/commands/command_auth_spec.rb +100 -18
  167. data/spec/unit/commands/command_dataset_spec.rb +4 -0
  168. data/spec/unit/commands/command_process_spec.rb +9 -4
  169. data/spec/unit/commands/command_projects_spec.rb +10 -6
  170. data/spec/unit/commands/command_scaffold_spec.rb +5 -1
  171. data/spec/unit/commands/command_user_spec.rb +22 -0
  172. data/spec/unit/core/connection_spec.rb +35 -6
  173. data/spec/unit/core/logging_spec.rb +65 -0
  174. data/spec/unit/core/nil_logger_spec.rb +9 -0
  175. data/spec/unit/core/project_spec.rb +51 -0
  176. data/spec/unit/core/rest_spec.rb +33 -0
  177. data/spec/unit/data/guesser_spec.rb +5 -0
  178. data/spec/unit/godzilla/goodzilla_spec.rb +2 -0
  179. data/spec/unit/models/account_settings_spec.rb +28 -0
  180. data/spec/unit/models/anchor_spec.rb +32 -0
  181. data/spec/unit/models/attribute_column_spec.rb +7 -0
  182. data/spec/unit/models/domain_spec.rb +45 -0
  183. data/spec/unit/models/invitation_spec.rb +13 -0
  184. data/spec/unit/models/md_object_spec.rb +47 -0
  185. data/spec/unit/models/metric.rb +92 -0
  186. data/spec/unit/{model → models}/model_spec.rb +9 -7
  187. data/spec/unit/models/project_blueprint_spec.rb +202 -0
  188. data/spec/unit/models/project_creator.rb +73 -0
  189. data/spec/unit/models/project_role_spec.rb +90 -0
  190. data/spec/unit/models/project_spec.rb +143 -0
  191. data/spec/unit/models/schedule_spec.rb +491 -0
  192. data/spec/unit/{model → models}/schema_builder_spec.rb +2 -0
  193. data/spec/unit/{model → models}/tools_spec.rb +13 -7
  194. data/spec/unit/models/user_spec.rb +16 -0
  195. data/test/test_upload.rb +2 -0
  196. metadata +189 -86
  197. data/lib/gooddata/commands/profile.rb +0 -11
  198. data/lib/gooddata/models/attribute.rb +0 -29
  199. data/lib/gooddata/models/display_form.rb +0 -9
  200. data/lib/gooddata/models/fact.rb +0 -19
  201. data/lib/gooddata/models/metric.rb +0 -99
  202. data/lib/gooddata/models/report.rb +0 -89
  203. data/spec/data/blueprint_valid.json +0 -37
  204. data/spec/unit/cli/commands/cmd_profile_spec.rb +0 -16
  205. data/spec/unit/commands/command_profile_spec.rb +0 -18
  206. data/spec/unit/core/core_spec.rb +0 -7
  207. data/spec/unit/model/blueprint_spec.rb +0 -132
  208. data/spec/unit/model/project_blueprint_spec.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1b075f6efe569bc8551b63e727f4b8e2f988759a
4
- data.tar.gz: de39298550e34a781eb07a8af849e7ce6e6b8452
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTAwYjgwMTliMmI5OGFmNTQ0YmY4ZTU2MWI3NzE3YjY2NTAxY2YwOA==
5
+ data.tar.gz: !binary |-
6
+ NWFiYmQ5ODM0OWZhMTc1YmFhMDFmMzk2MDcxMThhMGVlZDc2N2JmZg==
5
7
  SHA512:
6
- metadata.gz: d593ea85fad5d42a14821e1a817c01c479fc897c25d3ff8688b77343817c190b9f8d0ea06e8df1976ccf31e222acb5f45622caa358a392f9e4e1d347bc66e774
7
- data.tar.gz: 2b56559b63c3463c25eba41de9265ee3b8cc6fdc2fea1d1b8fbbaa00b24833fb88e552356fc8ca3cb397b625f733f762966e29e024ec3d6115f1201fd3bdf16f
8
+ metadata.gz: !binary |-
9
+ MjA0ZTMzNDIzMjI3NDUxMjAwNzQ4MzI5YTM1ODhmYmU3ZTIyNGIyMWJkZWQy
10
+ ZWIzMTQ5N2JlOWIyZjhiOTY1ZjhiZWVlZmY5OTZjNGY0MWY4NTMyZWQ2MjZi
11
+ NmMwMjQ1NjUyM2IwODM0NWFlNmU2MmRiMzQ4NDRjYTc3ZWM3NTQ=
12
+ data.tar.gz: !binary |-
13
+ ODc4YzhjM2ZkNDVhMjFmN2IyNGJkMmIwZGEyNWM2YmVjMWY0NzkzZDhiNmVi
14
+ OTVlOWNkNzkyY2IzZTFhOWYwOWY5NjVmNmJhY2E5Y2RmMTMxOGRmMGFlMjY4
15
+ Y2YxZTk3ZjVmNzJmMTliMTY2NzIzMTU0NTRiMjgyNmEzZDEyZDA=
@@ -0,0 +1,23 @@
1
+ ClassLength:
2
+ Enabled: false
3
+
4
+ CyclomaticComplexity:
5
+ Enabled: false
6
+
7
+ Documentation:
8
+ Enabled: false
9
+
10
+ Eval:
11
+ Enabled: false
12
+
13
+ FormatString:
14
+ Enabled: false
15
+
16
+ HashSyntax:
17
+ Enabled: false
18
+
19
+ LineLength:
20
+ Max: 323
21
+
22
+ MethodLength:
23
+ Enabled: false
@@ -1,12 +1,17 @@
1
1
  language: ruby
2
2
 
3
+ branches:
4
+ except:
5
+ - gh-pages
6
+ - next_doc_release
7
+
3
8
  env:
4
- - TEST_SUITE=test:unit
5
-
9
+ - secure: "d/fE2Iuyrf5mfvQPe2nl++a06hpy82mEM5jbmXmS1ttQgMpf955GWTmZ+16VBZa9MU2pJLBXoBXy53tp8P9ADysE4R7YCeI68yE0CZ/OuU+FVADZ9/F6i4nlUESjNNQnlC0mTIjDMO5WI9HbVQiS07HqDHzr6bcS51ZvBzItcn4="
10
+
6
11
  rvm:
7
12
  - 1.9.3
8
- - 2.1.0
9
13
  - ruby-head
14
+ - jruby-19mode
10
15
 
11
16
  before_install:
12
17
  - gem update --system
@@ -15,4 +20,4 @@ before_install:
15
20
  before_script:
16
21
  - cp spec/data/.gooddata ~/
17
22
 
18
- script: rake $TEST_SUITE
23
+ script: rake ci
data/CLI.md ADDED
@@ -0,0 +1,439 @@
1
+ # gooddata-ruby CLI
2
+
3
+ ## api
4
+
5
+ Some basic API stuff directly from CLI
6
+
7
+ ### api get
8
+
9
+ GET request on our API
10
+
11
+ ```
12
+ tomaskorcak@kx-mac:~/$ gooddata api get /gdc
13
+ {"about"=>
14
+ {"summary"=>"Use links to navigate the services.",
15
+ "category"=>"GoodData API root",
16
+ "links"=>
17
+ [{"link"=>"/gdc/", "summary"=>"", "category"=>"home", "title"=>"home"},
18
+ {"link"=>"/gdc/account/token",
19
+ "summary"=>"Temporary token generator.",
20
+ "category"=>"token",
21
+ "title"=>"token"},
22
+ {"link"=>"/gdc/account/login",
23
+ "summary"=>"Authentication service.",
24
+ "category"=>"login",
25
+ "title"=>"login"},
26
+ {"link"=>"/gdc/md",
27
+ "summary"=>"Metadata resources.",
28
+ "category"=>"md",
29
+ "title"=>"metadata"},
30
+ {"link"=>"/gdc/xtab2",
31
+ "summary"=>"Report execution resource.",
32
+ "category"=>"xtab",
33
+ "title"=>"xtab"},
34
+ {"link"=>"/gdc/availableelements",
35
+ "summary"=>
36
+ "Resource used to determine valid attribute values in the context of a report.",
37
+ "category"=>"availablelements",
38
+ "title"=>"AvailableElements"},
39
+ {"link"=>"/gdc/exporter",
40
+ "summary"=>"Report exporting resource.",
41
+ "category"=>"report-exporter",
42
+ "title"=>"exporter"},
43
+ {"link"=>"/gdc/account",
44
+ "summary"=>"Resource for logged in account manipulation.",
45
+ "category"=>"account",
46
+ "title"=>"account"},
47
+ {"link"=>"/gdc/projects",
48
+ "summary"=>"Resource for user and project management.",
49
+ "category"=>"projects",
50
+ "title"=>"projects"},
51
+ {"link"=>"/gdc/tool",
52
+ "summary"=>"Miscellaneous resources.",
53
+ "category"=>"tool",
54
+ "title"=>"tool"},
55
+ {"link"=>"/gdc/templates",
56
+ "summary"=>"Template resource - for internal use only.",
57
+ "category"=>"templates",
58
+ "title"=>"templates"},
59
+ {"link"=>"/gdc/releaseInfo",
60
+ "summary"=>"Release information.",
61
+ "category"=>"releaseInfo",
62
+ "title"=>"releaseInfo"},
63
+ {"link"=>"https://secure-di.gooddata.com/uploads",
64
+ "summary"=>"User data staging area.",
65
+ "category"=>"uploads",
66
+ "title"=>"user-uploads"}]}}
67
+
68
+ ```
69
+
70
+ ### api info
71
+
72
+ Info about the API version etc
73
+
74
+ ```
75
+ tomaskorcak@kx-mac:~/$ gooddata api info
76
+ GoodData API
77
+ Version: N/A
78
+ Released: N/A
79
+ For more info see N/A
80
+ nil
81
+
82
+ ```
83
+
84
+ ## auth
85
+
86
+ Work with your locally stored credentials
87
+
88
+ ### auth store
89
+
90
+ Store your credentials to ~/.gooddata so client does not have to ask you every single time
91
+
92
+ ```
93
+ tomaskorcak@kx-mac:~/$ gooddata auth store
94
+ Enter your GoodData credentials.
95
+ Email
96
+ tomas.korcak@gooddata.com
97
+ Password
98
+ xxxxxxxxxxxxxxxx
99
+ Authorization Token
100
+ ABCDEF123
101
+ Overwrite existing stored credentials (y/n)
102
+ y
103
+
104
+ ```
105
+
106
+ ## console
107
+
108
+ Interactive session with gooddata sdk loaded
109
+
110
+ ## domain
111
+
112
+ Manage domain
113
+
114
+ ### domain add_user
115
+
116
+ Add user to domain
117
+
118
+ ```
119
+ tomaskorcak@kx-mac:~/$ gooddata domain add_user gooddata-tomas-korcak joe doe joe.doe@example.com password
120
+ ```
121
+
122
+ ### domain list_users
123
+
124
+ List users in domain
125
+
126
+ ```
127
+ tomaskorcak@kx-mac:~/$ gooddata domain list_users gooddata-tomas-korcak
128
+ Tomas,Korcak,tomas.korcak@gooddata.com
129
+ tomas,korcak,korczis@gmail.com
130
+ joe,doe,joe.doe@example.com
131
+ ```
132
+
133
+ ## help
134
+
135
+ Shows a list of commands or help for one command
136
+
137
+ ## process
138
+
139
+ Work with deployed processes
140
+
141
+ ### process deploy
142
+
143
+ Deploys provided directory to the server
144
+
145
+ ### process get
146
+
147
+ Gives you some basic info about the process
148
+
149
+ ### process list
150
+
151
+ Lists all user's processes deployed on the plaform
152
+
153
+ ```
154
+ tomaskorcak@kx-mac:~/$ gooddata -p tk6192gsnav58crp6o1ahsmtuniq8khb process list
155
+ {"processes"=>
156
+ {"items"=>
157
+ [{"process"=>
158
+ {"type"=>"GRAPH",
159
+ "name"=>"Training March",
160
+ "graphs"=>["Training March/graph/graph.grf"],
161
+ "executables"=>["Training March/graph/graph.grf"],
162
+ "links"=>
163
+ {"self"=>
164
+ "/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/dataload/processes/f12975d2-5958-4248-9c3d-4c8f2e1f067d",
165
+ "executions"=>
166
+ "/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/dataload/processes/f12975d2-5958-4248-9c3d-4c8f2e1f067d/executions",
167
+ "source"=>
168
+ "/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/dataload/processes/f12975d2-5958-4248-9c3d-4c8f2e1f067d/source"}}}],
169
+ "links"=>
170
+ {"self"=>
171
+ "/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/dataload/processes"}}}
172
+
173
+ ```
174
+
175
+ ## project
176
+
177
+ Manage your project
178
+
179
+ ### project build
180
+
181
+ If you are in a gooddata project blueprint it will apply the changes. If you do not provide a project id it will build it from scratch and create a project for you.
182
+
183
+ ### project clone
184
+
185
+ Clones a project. Useful for testing
186
+
187
+ ```
188
+ tomaskorcak@kx-mac:~/$ gooddata -p uq7vmjkmfj86jihofsavdxgtfmxwofrh project clone
189
+ ```
190
+
191
+ ### project create
192
+
193
+ Create a gooddata project
194
+
195
+ ```
196
+ tomaskorcak@kx-mac:~/$ gooddata project create
197
+ Project name
198
+ Test Project
199
+ Project summary ||
200
+ Test Project Summary Text
201
+ Project template
202
+
203
+ token
204
+ SUPERSECRETTOKENHERE
205
+ Project 'Test Project' with id /gdc/projects/uq7vmjkmfj86jihofsavdxgtfmxwofrh created successfully!
206
+
207
+ ```
208
+
209
+ ### project delete
210
+
211
+ Delete a project. Be careful this is impossible to revert
212
+
213
+ ```
214
+ tomaskorcak@kx-mac:~/$ gooddata -p uq7vmjkmfj86jihofsavdxgtfmxwofrh project delete
215
+ ```
216
+
217
+ ### project invite
218
+
219
+ Invites user to project
220
+
221
+ ```
222
+ tomaskorcak@kx-mac:~/$ gooddata -p tk6192gsnav58crp6o1ahsmtuniq8khb project invite tomas.korcak@gooddata.com admin
223
+ Inviting tomas.korcak@gooddata.com, role: /gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/roles/2
224
+ ```
225
+
226
+ ### project jack_in
227
+
228
+ If you are in a gooddata project blueprint or if you provide a project id it will start an interactive session inside that project
229
+
230
+ ### project list_users
231
+
232
+ List users
233
+
234
+ ```
235
+ tomaskorcak@kx-mac:~/$ gooddata -p tk6192gsnav58crp6o1ahsmtuniq8khb project list_users
236
+ Korcak,Tomas,tomas.korcak@gooddata.com,/gdc/account/profile/c6f1b9dc57a3aac97ed70e467b27bbd9
237
+ ```
238
+
239
+ ### project roles
240
+
241
+ Roles
242
+
243
+ ```
244
+ tomaskorcak@kx-mac:~/$ gooddata -p tk6192gsnav58crp6o1ahsmtuniq8khb project roles
245
+ /gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/roles/2,Admin
246
+ /gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/roles/7,Connectors System User
247
+ /gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/roles/5,Editor
248
+ /gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/roles/3,Embedded Dashboard Only
249
+ /gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/roles/1,Unverified Admin
250
+ /gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/roles/4,Viewer
251
+
252
+ ```
253
+
254
+ ### project show
255
+
256
+ Shows basic info about a project
257
+
258
+ ```
259
+ tomaskorcak@kx-mac:~/$ gooddata -p tk6192gsnav58crp6o1ahsmtuniq8khb project show
260
+ {"content"=>
261
+ {"cluster"=>"",
262
+ "authorizationToken"=>"INTNA000000SRVS",
263
+ "guidedNavigation"=>"1",
264
+ "isPublic"=>"0",
265
+ "driver"=>"Pg",
266
+ "state"=>"ENABLED"},
267
+ "links"=>
268
+ {"ldm_thumbnail"=>
269
+ "/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/ldm?thumbnail=1",
270
+ "self"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb",
271
+ "clearCaches"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/clearCaches",
272
+ "invitations"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/invitations",
273
+ "users"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/users?link=1",
274
+ "uploads"=>
275
+ "https://secure-di.gooddata.com/project-uploads/tk6192gsnav58crp6o1ahsmtuniq8khb/",
276
+ "ldm"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/ldm",
277
+ "metadata"=>"/gdc/md/tk6192gsnav58crp6o1ahsmtuniq8khb",
278
+ "publicartifacts"=>
279
+ "/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/publicartifacts",
280
+ "roles"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/roles",
281
+ "dataload"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/dataload",
282
+ "connectors"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/connectors",
283
+ "execute"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/execute",
284
+ "schedules"=>"/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/schedules",
285
+ "templates"=>"/gdc/md/tk6192gsnav58crp6o1ahsmtuniq8khb/templates",
286
+ "eventstores"=>
287
+ "/gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb/dataload/eventstore/stores"},
288
+ "meta"=>
289
+ {"created"=>"2014-03-03 14:24:51",
290
+ "summary"=>"",
291
+ "updated"=>"2014-03-03 14:24:51",
292
+ "author"=>"/gdc/account/profile/c6f1b9dc57a3aac97ed70e467b27bbd9",
293
+ "title"=>"Training March",
294
+ "contributor"=>"/gdc/account/profile/c6f1b9dc57a3aac97ed70e467b27bbd9"}}
295
+
296
+ ```
297
+
298
+ ### project update
299
+
300
+ If you are in a gooddata project blueprint it will apply the changes. If you do not provide a project id it will build it from scratch and create a project for you.
301
+
302
+ ### project validation
303
+
304
+ You can run project validation which will check RI integrity and other problems.
305
+
306
+ ```
307
+ tomaskorcak@kx-mac:~/$ gooddata -p tk6192gsnav58crp6o1ahsmtuniq8khb project validation
308
+ {"projectValidateResult"=>
309
+ {"error_found"=>0,
310
+ "fatal_error_found"=>0,
311
+ "results"=>
312
+ [{"body"=>{"error"=>0, "log"=>[]}, "from"=>"pdm"},
313
+ {"body"=>{"error"=>0, "log"=>[]}, "from"=>"pdm::transitivity"},
314
+ {"body"=>{"error"=>0, "log"=>[]}, "from"=>"pdm::elem_validation"},
315
+ {"body"=>{"error"=>0, "log"=>[]}, "from"=>"metric_filter"},
316
+ {"body"=>{"error"=>0, "log"=>[]}, "from"=>"ldm"},
317
+ {"body"=>{"error"=>0, "log"=>[]}, "from"=>"invalid_objects"},
318
+ {"body"=>{"error"=>0, "log"=>[]}, "from"=>"pdm::pdm_vs_dwh"},
319
+ {"body"=>{"error"=>0, "log"=>[]}, "from"=>"pdm::pk_fk_consistency"}],
320
+ "meta"=>{"start_time"=>1398202260, "finished_time"=>1398202262}}}
321
+
322
+ ```
323
+
324
+ ## projects
325
+
326
+ Manage your projects
327
+
328
+ ### projects list
329
+
330
+ Lists user's projects
331
+
332
+ ```
333
+ tomaskorcak@kx-mac:~/$ gooddata projects list
334
+ /gdc/projects/la84vcyhrq8jwbu4wpipw66q2sqeb923,GoodSales Demo
335
+ /gdc/projects/pouwty5dezpuib8nil16fv4i1jz80oju,GoodSample Demo
336
+ /gdc/projects/tk6192gsnav58crp6o1ahsmtuniq8khb,Training March
337
+
338
+ ```
339
+
340
+ ## role
341
+
342
+ Basic Role Management
343
+
344
+ ### role list
345
+
346
+ List roles
347
+
348
+ ```
349
+ tomaskorcak@kx-mac:~/$ gooddata -p pouwty5dezpuib8nil16fv4i1jz80oju role list
350
+ dashboardOnlyRole,/gdc/projects/pouwty5dezpuib8nil16fv4i1jz80oju/roles/3
351
+ readOnlyUserRole,/gdc/projects/pouwty5dezpuib8nil16fv4i1jz80oju/roles/4
352
+ ```
353
+
354
+ ## run_ruby
355
+
356
+ Run ruby bricks either locally or remotely deployed on our server
357
+
358
+ ## scaffold
359
+
360
+ Scaffold things
361
+
362
+ ### scaffold brick
363
+
364
+ Scaffold a gooddata ruby brick. This is a piece of code that you can run on our platform
365
+
366
+ ```
367
+ tomaskorcak@kx-mac:~/$ gooddata scaffold brick mybrick
368
+
369
+ tomaskorcak@kx-mac:~/$ ls -la mybrick/
370
+ total 16
371
+ drwxr-xr-x 4 tomaskorcak staff 136 Apr 22 14:10 .
372
+ drwxr-xr-x 31 tomaskorcak staff 1054 Apr 22 14:10 ..
373
+ -rw-r--r-- 1 tomaskorcak staff 103 Apr 22 14:10 brick.rb
374
+ -rw-r--r-- 1 tomaskorcak staff 179 Apr 22 14:10 main.rb
375
+
376
+ tomaskorcak@kx-mac:~/$ cat mybrick/brick.rb
377
+ class MyBrick < GoodData::Bricks::Brick
378
+
379
+ def call(params)
380
+ # do something here
381
+ end
382
+
383
+ end
384
+
385
+ tomaskorcak@kx-mac:~/$ cat mybrick/main.rb
386
+ require_relative '../../gooddata/bricks/bricks'
387
+
388
+ require_relative './mybrick'
389
+
390
+
391
+ ```
392
+
393
+ ### scaffold project
394
+
395
+ Scaffold a gooddata project blueprint
396
+
397
+ ```
398
+ tomaskorcak@kx-mac:~/$ gooddata scaffold project myproj
399
+
400
+ tomaskorcak@kx-mac:~/$ ls -la myproj/
401
+ total 8
402
+ drwxr-xr-x 5 tomaskorcak staff 170 Apr 22 14:13 .
403
+ drwxr-xr-x 31 tomaskorcak staff 1054 Apr 22 14:13 ..
404
+ -rw-r--r-- 1 tomaskorcak staff 53 Apr 22 14:13 Goodfile
405
+ drwxr-xr-x 5 tomaskorcak staff 170 Apr 22 14:13 data
406
+ drwxr-xr-x 3 tomaskorcak staff 102 Apr 22 14:13 model
407
+
408
+ ```
409
+
410
+ ## user
411
+
412
+ User management
413
+
414
+ ### user show
415
+
416
+ Show your profile
417
+
418
+ ```
419
+ tomaskorcak@kx-mac:~/$ gooddata user show
420
+ {"accountSetting"=>
421
+ {"country"=>nil,
422
+ "firstName"=>"Tomas",
423
+ "ssoProvider"=>nil,
424
+ "timezone"=>nil,
425
+ "position"=>nil,
426
+ "authenticationModes"=>[],
427
+ "companyName"=>"GoodData",
428
+ "login"=>"tomas.korcak@gooddata.com",
429
+ "email"=>"tomas.korcak@gooddata.com",
430
+ "created"=>"2014-03-03 11:28:51",
431
+ "updated"=>"2014-04-22 22:58:51",
432
+ "lastName"=>"Korcak",
433
+ "phoneNumber"=>"00420775995881",
434
+ "links"=>
435
+ {"self"=>"/gdc/account/profile/c6f1b9dc57a3aac97ed70e467b27bbd9",
436
+ "projects"=>
437
+ "/gdc/account/profile/c6f1b9dc57a3aac97ed70e467b27bbd9/projects"}}}
438
+
439
+ ```