gooddata 0.6.6 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/{CHANGELOG.markdown → CHANGELOG.md} +6 -1
  3. data/lib/gooddata/cli/commands/project_cmd.rb +6 -29
  4. data/lib/gooddata/commands/project.rb +36 -44
  5. data/lib/gooddata/connection.rb +7 -0
  6. data/lib/gooddata/core/connection.rb +3 -0
  7. data/lib/gooddata/core/rest.rb +38 -19
  8. data/lib/gooddata/mixins/md_object_query.rb +3 -2
  9. data/lib/gooddata/models/metadata/dashboard.rb +3 -8
  10. data/lib/gooddata/models/metadata/report.rb +1 -6
  11. data/lib/gooddata/models/model.rb +5 -4
  12. data/lib/gooddata/models/process.rb +10 -14
  13. data/lib/gooddata/models/project.rb +34 -26
  14. data/lib/gooddata/models/project_blueprint.rb +14 -7
  15. data/lib/gooddata/models/project_creator.rb +2 -6
  16. data/lib/gooddata/models/schedule.rb +13 -2
  17. data/lib/gooddata/version.rb +1 -1
  18. data/spec/data/ruby_process/deep_files/deep_stuff.txt +1 -0
  19. data/spec/data/ruby_process/process.rb +2 -0
  20. data/spec/data/ruby_process/stuff.txt +1 -0
  21. data/spec/integration/full_process_schedule_spec.rb +69 -0
  22. data/spec/integration/full_project_spec.rb +14 -5
  23. data/spec/unit/models/schedule_spec.rb +7 -30
  24. metadata +7 -66
  25. data/doc/.gitignore +0 -1
  26. data/doc/css/.gitkeepme +0 -1
  27. data/doc/images/.gitkeepme +0 -1
  28. data/doc/images/background.png +0 -0
  29. data/doc/images/bg-callout-button.png +0 -0
  30. data/doc/images/header-logo.png +0 -0
  31. data/doc/images/logo-image.png +0 -0
  32. data/doc/js/.gitkeepme +0 -1
  33. data/doc/pages/GET_STARTED.md +0 -310
  34. data/doc/pages/HOMEPAGE.md +0 -77
  35. data/doc/pages/TUTORIALS.md +0 -52
  36. data/doc/pages/tutorial/BRICKS.md +0 -260
  37. data/doc/pages/tutorial/CREATING_A_MODEL.md +0 -81
  38. data/doc/pages/tutorial/CRUNCHING_NUMBERS.md +0 -231
  39. data/doc/pages/tutorial/TEST_DRIVEN_DEVELOPMENT.md +0 -120
  40. data/doc/pages/tutorial/YOUR_FIRST_PROJECT.md +0 -53
  41. data/doc/templates/default/class/dot/setup.rb +0 -6
  42. data/doc/templates/default/class/dot/superklass.erb +0 -3
  43. data/doc/templates/default/class/setup.rb +0 -37
  44. data/doc/templates/default/class/text/setup.rb +0 -11
  45. data/doc/templates/default/class/text/subclasses.erb +0 -5
  46. data/doc/templates/default/constant/text/header.erb +0 -11
  47. data/doc/templates/default/constant/text/setup.rb +0 -3
  48. data/doc/templates/default/docstring/setup.rb +0 -51
  49. data/doc/templates/default/docstring/text/abstract.erb +0 -2
  50. data/doc/templates/default/docstring/text/deprecated.erb +0 -2
  51. data/doc/templates/default/docstring/text/index.erb +0 -2
  52. data/doc/templates/default/docstring/text/note.erb +0 -4
  53. data/doc/templates/default/docstring/text/private.erb +0 -2
  54. data/doc/templates/default/docstring/text/returns_void.erb +0 -1
  55. data/doc/templates/default/docstring/text/text.erb +0 -1
  56. data/doc/templates/default/docstring/text/todo.erb +0 -4
  57. data/doc/templates/default/layout/dot/header.erb +0 -6
  58. data/doc/templates/default/layout/dot/setup.rb +0 -14
  59. data/doc/templates/default/method/setup.rb +0 -3
  60. data/doc/templates/default/method/text/header.erb +0 -1
  61. data/doc/templates/default/method_details/setup.rb +0 -11
  62. data/doc/templates/default/method_details/text/header.erb +0 -10
  63. data/doc/templates/default/method_details/text/method_signature.erb +0 -12
  64. data/doc/templates/default/method_details/text/setup.rb +0 -10
  65. data/doc/templates/default/module/dot/child.erb +0 -1
  66. data/doc/templates/default/module/dot/dependencies.erb +0 -3
  67. data/doc/templates/default/module/dot/header.erb +0 -6
  68. data/doc/templates/default/module/dot/info.erb +0 -14
  69. data/doc/templates/default/module/dot/setup.rb +0 -14
  70. data/doc/templates/default/module/setup.rb +0 -164
  71. data/doc/templates/default/module/text/children.erb +0 -10
  72. data/doc/templates/default/module/text/class_meths_list.erb +0 -8
  73. data/doc/templates/default/module/text/extends.erb +0 -8
  74. data/doc/templates/default/module/text/header.erb +0 -7
  75. data/doc/templates/default/module/text/includes.erb +0 -8
  76. data/doc/templates/default/module/text/instance_meths_list.erb +0 -8
  77. data/doc/templates/default/module/text/setup.rb +0 -12
  78. data/doc/templates/default/root/dot/child.erb +0 -3
  79. data/doc/templates/default/root/dot/setup.rb +0 -5
  80. data/doc/templates/default/tags/setup.rb +0 -55
  81. data/doc/templates/default/tags/text/example.erb +0 -12
  82. data/doc/templates/default/tags/text/index.erb +0 -1
  83. data/doc/templates/default/tags/text/option.erb +0 -20
  84. data/doc/templates/default/tags/text/overload.erb +0 -19
  85. data/doc/templates/default/tags/text/see.erb +0 -11
  86. data/doc/templates/default/tags/text/tag.erb +0 -13
@@ -1,11 +0,0 @@
1
- include T('default/module/text')
2
-
3
- def init
4
- super
5
- sections.place(:subclasses).before(:children)
6
- sections.delete(:children)
7
- end
8
-
9
- def format_object_title(object)
10
- "Class: #{object.title} < #{object.superclass.title}"
11
- end
@@ -1,5 +0,0 @@
1
- Direct Known Subclasses:
2
- ------------------------
3
-
4
- <%= indent(wrap(@subclasses.map {|name, child| name }.join(", "))) %>
5
-
@@ -1,11 +0,0 @@
1
- <%= title_align_right format_object_title(object) %>
2
-
3
-
4
- <%= object.name %> = <%= object.value.size > 40 ? "\n\n" + indent(object.value) : object.value %>
5
-
6
-
7
- <%= hr %>
8
-
9
- <%= yieldall %>
10
-
11
- <%= hr %>
@@ -1,3 +0,0 @@
1
- def init
2
- sections :header, [T('docstring')]
3
- end
@@ -1,51 +0,0 @@
1
- def init
2
- return if object.docstring.blank? && !object.has_tag?(:api)
3
- sections :index, [:private, :deprecated, :abstract, :todo, :note, :returns_void, :text], T('tags')
4
- end
5
-
6
- def private
7
- return unless object.has_tag?(:api) && object.tag(:api).text == 'private'
8
- erb(:private)
9
- end
10
-
11
- def abstract
12
- return unless object.has_tag?(:abstract)
13
- erb(:abstract)
14
- end
15
-
16
- def deprecated
17
- return unless object.has_tag?(:deprecated)
18
- erb(:deprecated)
19
- end
20
-
21
- def todo
22
- return unless object.has_tag?(:todo)
23
- erb(:todo)
24
- end
25
-
26
- def note
27
- return unless object.has_tag?(:note)
28
- erb(:note)
29
- end
30
-
31
- def returns_void
32
- return unless object.type == :method
33
- return if object.name == :initialize && object.scope == :instance
34
- return unless object.tags(:return).size == 1 && object.tag(:return).types == ['void']
35
- erb(:returns_void)
36
- end
37
-
38
- def docstring_text
39
- text = ""
40
- unless object.tags(:overload).size == 1 && object.docstring.empty?
41
- text = object.docstring
42
- end
43
-
44
- if text.strip.empty? && object.tags(:return).size == 1 && object.tag(:return).text
45
- text = object.tag(:return).text.gsub(/\A([a-z])/) {|x| x.downcase }
46
- text = "Returns #{text}" unless text.empty? || text =~ /^\s*return/i
47
- text = text.gsub(/\A([a-z])/) {|x| x.upcase }
48
- end
49
-
50
- text.strip
51
- end
@@ -1,2 +0,0 @@
1
- <%= indent(wrap("Abstract. #{object.tag(:abstract).text}")) %>
2
-
@@ -1,2 +0,0 @@
1
- <%= indent(wrap("Deprecated. #{object.tag(:deprecated).text}")) %>
2
-
@@ -1,2 +0,0 @@
1
-
2
- <%= yieldall %>
@@ -1,4 +0,0 @@
1
- <% object.tags(:note).each do |tag| %>
2
- <%= indent(wrap("Note: #{tag.text}")) %>
3
-
4
- <% end %>
@@ -1,2 +0,0 @@
1
- <%= indent(wrap("This #{object.type} is part of a private API.")) %>
2
-
@@ -1 +0,0 @@
1
- <%= indent(wrap("This method returns an undefined value.")) %>
@@ -1 +0,0 @@
1
- <%= indent wrap(h(docstring_text.strip), 68) %>
@@ -1,4 +0,0 @@
1
- <% object.tags(:todo).each do |tag| %>
2
- <%= indent(wrap("TODO: #{tag.text}")) %>
3
-
4
- <% end %>
@@ -1,6 +0,0 @@
1
- digraph yard {
2
- graph [rankdir=BT rank=sink outputMode=nodesfirst packMode="graph" splines=true];
3
- node [shape=record rank=sink rankType=sink];
4
-
5
- <%= yieldall %>
6
- }
@@ -1,14 +0,0 @@
1
- attr_reader :contents
2
-
3
- def init
4
- if object
5
- type = object.root? ? :module : object.type
6
- sections :header, [T(type)]
7
- else
8
- sections :header, [:contents]
9
- end
10
- end
11
-
12
- def header
13
- tidy erb(:header)
14
- end
@@ -1,3 +0,0 @@
1
- def init
2
- sections :header, [T('method_details')]
3
- end
@@ -1 +0,0 @@
1
- <%= yieldall %>
@@ -1,11 +0,0 @@
1
- def init
2
- super
3
- sections :header, [:method_signature, T('docstring'), :source, :specs]
4
- end
5
-
6
- def source
7
- return if owner != object.namespace
8
- return if Tags::OverloadTag === object
9
- return if object.source.nil?
10
- erb(:source)
11
- end
@@ -1,10 +0,0 @@
1
- <%= title_align_right format_object_title(object) %>
2
-
3
- <%= align_right "(Defined in: #{object.file})" %>
4
- <% if object.aliases.size > 0 %>
5
-
6
- <%= align_right "(Also known as: #{object.aliases.map {|o| o.name(true).to_s }.join(',')})" %>
7
- <% end %>
8
-
9
- <%= yieldall %>
10
-
@@ -1,12 +0,0 @@
1
-
2
- <% if object.tags(:overload).size == 1 %>
3
- <%= indent wrap(signature(object.tag(:overload))) %>
4
- <% elsif object.tags(:overload).size > 1 %>
5
- <% object.tags(:overload).each do |overload| %>
6
- <%= indent wrap(signature(overload)) %>
7
- <% end %>
8
- <% else %>
9
- <%= indent wrap(signature(object)) %>
10
- <% end %>
11
- <%= hr %>
12
-
@@ -1,10 +0,0 @@
1
- def init
2
- super
3
- sections.last.pop
4
- end
5
-
6
- def format_object_title(object)
7
- title = "Method: #{object.name(true)}"
8
- title += " (#{object.namespace})" if !object.namespace.root?
9
- title
10
- end
@@ -1 +0,0 @@
1
- <%= format_path object %> [label="{<%= yieldall.gsub("\n", '') %>}" rank=sink];
@@ -1,3 +0,0 @@
1
- <% object.mixins(:instance).each do |obj| %>
2
- <%= format_path object %> -> <%= format_path obj %> [style=dotted arrowType=none];
3
- <% end %>
@@ -1,6 +0,0 @@
1
- subgraph cluster_<%= format_path object %> {
2
- label = "<%= h(object.name) unless object.path == "" %>"; labelloc=b;
3
- <% for obj in @modules %>
4
- <%= yieldall :object => obj %>
5
- <% end %>
6
- }
@@ -1,14 +0,0 @@
1
- <%= object.type %> <%= h object.name %>
2
- <% if options.full %>
3
- |
4
- <% object.attributes.each do |scope, list| %>
5
- <% list.sort_by {|name, rw| name.to_s }.each do |name, rw| %>
6
- <%= uml_visibility(rw.values.compact.first) %> <%= h (rw[:read]||rw[:write]).name(true).gsub(/=$/,'') %> [<%= 'R' if rw[:read] %><%= 'W' if rw[:write] %>]\l
7
- <% end %>
8
- <% end %>
9
- |
10
- <% method_listing.each do |obj| %>
11
- <%= uml_visibility obj %> <%= h obj.name(true) %>
12
- <%= h(" : #{obj.tag(:return).types.first}") if obj.has_tag?(:return) && obj.tag(:return).types && obj.tag(:return).types.size > 0 %>\l
13
- <% end %>
14
- <% end %>
@@ -1,14 +0,0 @@
1
- def init
2
- @modules = object.children.select {|o| o.type == :module }
3
- @classes = object.children.select {|o| o.type == :class }
4
- sections :child, [:info], :classes, [T('class')], :header, [T('module')], :dependencies
5
- end
6
-
7
- def dependencies
8
- return unless options.dependencies
9
- erb(:dependencies)
10
- end
11
-
12
- def classes
13
- @classes.map {|k| yieldall :object => k }.join("\n")
14
- end
@@ -1,164 +0,0 @@
1
- include Helpers::ModuleHelper
2
-
3
- def init
4
- sections :header, :box_info, :pre_docstring, T('docstring'), :specs, :children,
5
- :constant_summary, [T('docstring')], :inherited_constants,
6
- :attribute_summary, [:item_summary], :inherited_attributes,
7
- :method_summary, [:item_summary], :inherited_methods,
8
- :methodmissing, [T('method_details')],
9
- :attribute_details, [T('method_details')],
10
- :method_details_list, [T('method_details')]
11
- end
12
-
13
- def pre_docstring
14
- return if object.docstring.blank?
15
- erb(:pre_docstring)
16
- end
17
-
18
- def children
19
- @inner = [[:modules, []], [:classes, []]]
20
- object.children.each do |child|
21
- @inner[0][1] << child if child.type == :module
22
- @inner[1][1] << child if child.type == :class
23
- end
24
- @inner.map! {|v| [v[0], run_verifier(v[1].sort_by {|o| o.name.to_s })] }
25
- return if (@inner[0][1].size + @inner[1][1].size) == 0
26
- erb(:children)
27
- end
28
-
29
- def methodmissing
30
- mms = object.meths(:inherited => true, :included => true)
31
- return unless @mm = mms.find {|o| o.name == :method_missing && o.scope == :instance }
32
- erb(:methodmissing)
33
- end
34
-
35
- def method_listing(include_specials = true)
36
- return @smeths ||= method_listing.reject {|o| special_method?(o) } unless include_specials
37
- return @meths if @meths
38
- @meths = object.meths(:inherited => false, :included => !options.embed_mixins.empty?)
39
- if options.embed_mixins.size > 0
40
- @meths = @meths.reject {|m| !options.embed_mixins_match?(m.namespace) }
41
- end
42
- @meths = sort_listing(prune_method_listing(@meths))
43
- @meths
44
- end
45
-
46
- def special_method?(meth)
47
- return true if meth.name(true) == '#method_missing'
48
- return true if meth.constructor?
49
- false
50
- end
51
-
52
- def attr_listing
53
- return @attrs if @attrs
54
- @attrs = []
55
- object.inheritance_tree(true).each do |superclass|
56
- next if superclass.is_a?(CodeObjects::Proxy)
57
- next if options.embed_mixins.size > 0 &&
58
- options.embed_mixins_match?(superclass) == false
59
- [:class, :instance].each do |scope|
60
- superclass.attributes[scope].each do |name, rw|
61
- attr = prune_method_listing([rw[:read], rw[:write]].compact, false).first
62
- @attrs << attr if attr
63
- end
64
- end
65
- break if options.embed_mixins.empty?
66
- end
67
- @attrs = sort_listing(@attrs)
68
- end
69
-
70
- def constant_listing
71
- return @constants if @constants
72
- @constants = object.constants(:included => false, :inherited => false)
73
- @constants += object.cvars
74
- @constants = run_verifier(@constants)
75
- @constants
76
- end
77
-
78
- def sort_listing(list)
79
- list.sort_by {|o| [o.scope.to_s, o.name.to_s.downcase] }
80
- end
81
-
82
- def inherited_attr_list(&block)
83
- object.inheritance_tree(true)[1..-1].each do |superclass|
84
- next if superclass.is_a?(YARD::CodeObjects::Proxy)
85
- next if options.embed_mixins.size > 0 && options.embed_mixins_match?(superclass) != false
86
- attribs = superclass.attributes[:instance]
87
- attribs = attribs.reject {|name, rw| object.child(:scope => :instance, :name => name) != nil }
88
- attribs = attribs.sort_by {|args| args.first.to_s }.map {|n, m| m[:read] || m[:write] }
89
- attribs = prune_method_listing(attribs, false)
90
- yield superclass, attribs if attribs.size > 0
91
- end
92
- end
93
-
94
- def inherited_constant_list(&block)
95
- object.inheritance_tree(true)[1..-1].each do |superclass|
96
- next if superclass.is_a?(YARD::CodeObjects::Proxy)
97
- next if options.embed_mixins.size > 0 && options.embed_mixins_match?(superclass) != false
98
- consts = superclass.constants(:included => false, :inherited => false)
99
- consts = consts.reject {|const| object.child(:type => :constant, :name => const.name) != nil }
100
- consts = consts.sort_by {|const| const.name.to_s }
101
- consts = run_verifier(consts)
102
- yield superclass, consts if consts.size > 0
103
- end
104
- end
105
-
106
- def docstring_full(obj)
107
- docstring = ""
108
- if obj.tags(:overload).size == 1 && obj.docstring.empty?
109
- docstring = obj.tag(:overload).docstring
110
- else
111
- docstring = obj.docstring
112
- end
113
-
114
- if docstring.summary.empty? && obj.tags(:return).size == 1 && obj.tag(:return).text
115
- docstring = Docstring.new(obj.tag(:return).text.gsub(/\A([a-z])/) {|x| x.upcase }.strip)
116
- end
117
-
118
- docstring
119
- end
120
-
121
- def docstring_summary(obj)
122
- docstring_full(obj).summary
123
- end
124
-
125
- def groups(list, type = "Method")
126
- if groups_data = object.groups
127
- list.each {|m| groups_data |= [m.group] if m.group && owner != m.namespace }
128
- others = list.select {|m| !m.group || !groups_data.include?(m.group) }
129
- groups_data.each do |name|
130
- items = list.select {|m| m.group == name }
131
- yield(items, name) unless items.empty?
132
- end
133
- else
134
- others = []
135
- group_data = {}
136
- list.each do |meth|
137
- if meth.group
138
- (group_data[meth.group] ||= []) << meth
139
- else
140
- others << meth
141
- end
142
- end
143
- group_data.each {|group, items| yield(items, group) unless items.empty? }
144
- end
145
-
146
- scopes(others) {|items, scope| yield(items, "#{scope.to_s.capitalize} #{type} Summary") }
147
- end
148
-
149
- def scopes(list)
150
- [:class, :instance].each do |scope|
151
- items = list.select {|m| m.scope == scope }
152
- yield(items, scope) unless items.empty?
153
- end
154
- end
155
-
156
- def mixed_into(object)
157
- unless globals.mixed_into
158
- globals.mixed_into = {}
159
- list = run_verifier Registry.all(:class, :module)
160
- list.each {|o| o.mixins.each {|m| (globals.mixed_into[m.path] ||= []) << o } }
161
- end
162
-
163
- globals.mixed_into[object.path] || []
164
- end
@@ -1,10 +0,0 @@
1
- Defined Under Namespace:
2
- ------------------------
3
-
4
- <% @inner.each do |name, list| %>
5
- <% if list.size > 0 %>
6
- <% text = list.map {|c| c.name }.join(", ") + " (#{name})" %>
7
- <%= indent(wrap(text)) %>
8
-
9
- <% end %>
10
- <% end %>
@@ -1,8 +0,0 @@
1
- <% if class_meths.size > 0 %>
2
- Class methods:
3
- --------------
4
-
5
- <%= indent wrap(class_meths.map {|o| o.name.to_s }.join(", "), 68) %>
6
-
7
-
8
- <% end %>
@@ -1,8 +0,0 @@
1
- <% if object.mixins(:class).size > 0 %>
2
- Extended by:
3
- ------------
4
-
5
- <%= indent wrap(object.mixins(:class).join(", "), 68) %>
6
-
7
-
8
- <% end %>