gd_bam 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -10,7 +10,13 @@ make sure you have ruby (1.9 and 1.8.7 is currently supported) and that you have
10
10
  `gem install gd_bam`
11
11
 
12
12
  Notes: Mac
13
- On mac ruby is already on your machine but you have to provide it with root access privileges. You can do it by running `sudo gem install gd_bam`. On top of that some C libraries are going to be installed your machine to make this work you need to install XCode on your computer (We are working on making this one easier).
13
+ On mac ruby is already on your machine but you have to provide it with root access privileges. You can do it by running `sudo gem install gd_bam`. On top of that some C libraries are going to be installed your machine to make this work you need to install XCode and command line tools on your computer so you get a c compiler (for command line tools in XCode look here http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools). Also install GIT http://git-scm.com/download. We are working to make all those go away.
14
+
15
+ Win
16
+ TBD
17
+
18
+ Linux
19
+ TBD
14
20
 
15
21
  Done.
16
22
 
data/bin/bam CHANGED
@@ -156,7 +156,7 @@ command :scaffold do |c|
156
156
  else
157
157
  case options[:blueprint]
158
158
  when "goodsales"
159
- system "git clone git@github.com:gooddata/goodsales_base.git #{directory}"
159
+ system "git clone git://github.com/gooddata/goodsales_base.git #{directory}"
160
160
  end
161
161
  end
162
162
  when "flow"
data/lib/bam/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bam
2
- VERSION = '0.0.12'
2
+ VERSION = '0.0.13'
3
3
  end
@@ -0,0 +1,53 @@
1
+ module GoodData
2
+ module BAM
3
+ module ContractCheckers
4
+
5
+ include GoodData::CloverGenerator
6
+
7
+ def self.generate(file)
8
+ File.open(file, "w") do |file|
9
+
10
+ builder = Builder::XmlMarkup.new(:target=>file, :indent=>2)
11
+ builder.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
12
+ builder.Graph({
13
+ :name => "Contract Checker"
14
+ }) do
15
+ builder.Global do
16
+ property_file(builder, {:id => "workspace_params", :fileURL => "workspace.prm"})
17
+ end
18
+
19
+ builder.Phase(:number => 0) do
20
+
21
+ end
22
+
23
+ # phase = 0
24
+ # subgraphs.each do |subgraph|
25
+ # builder.Phase(:number => phase+1) do
26
+ # id1 = get_id
27
+ # id2 = get_id
28
+ # ctl = "function integer generate() {$out.0.all = \"FLOW=#{subgraph[:flow]}\";return OK;}"
29
+ # build_node2(builder, GoodData::CloverGenerator::Nodes.data_generator2({:name => id1, :id => id1, :generate => ctl}))
30
+ # build_node2(builder, GoodData::CloverGenerator::Nodes.edge2({:toNode => "#{id2}:0", :fromNode => "#{id1}:0", :metadata => "trash_metadata", :id => get_id()}))
31
+ # build_node2(builder, GoodData::CloverGenerator::Nodes.writer2({:name => "PARAMS CSV Writer", :id => "#{id2}", :fileURL => "params.txt", :outputFieldNames => "false", :quotedStrings => "false"}))
32
+ # end
33
+ # builder.Phase(:number => phase+2) do
34
+
35
+ # id1 = get_id
36
+ # id2 = get_id
37
+ # ctl = "function integer generate() {$out.0.all = \"NAME=#{subgraph[:name]}\";return OK;}"
38
+ # build_node2(builder, GoodData::CloverGenerator::Nodes.data_generator2({:name => id1, :id => id1, :generate => ctl}))
39
+ # build_node2(builder, GoodData::CloverGenerator::Nodes.edge2({:toNode => "#{id2}:0", :fromNode => "#{id1}:0", :metadata => "trash_metadata", :id => get_id()}))
40
+ # build_node2(builder, GoodData::CloverGenerator::Nodes.writer2({:name => "PARAMS CSV Writer", :id => "#{id2}", :fileURL => "params.txt", :outputFieldNames => "false", :append => "true", :quotedStrings => "false"}))
41
+ # end
42
+
43
+ # builder.Phase(:number => phase+3) do
44
+ # build_node2(builder, GoodData::CloverGenerator::Nodes.run_graph2({:guiName => subgraph[:name], :name => subgraph[:name], :id => subgraph[:flow], :graphName => subgraph[:file]}))
45
+ # end
46
+ # phase += 4
47
+ # end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,12 @@
1
+ require 'gooddata'
2
+ require 'pry'
3
+
4
+ file = ARGV.first
5
+
6
+ binding.pry
7
+ # https://svarovsky@gooddata.com:testtest@secure-di.gooddata.com/project-uploads/vl6ynq971oza5kbxhtscpjcghq5gfox1/account.csv
8
+ #
9
+ # system curl -u svarovsky@gooddata.com:testtest -k -T account.csv https://secure-di.gooddata.com/project-uploads/vl6ynq971oza5kbxhtscpjcghq5gfox1/
10
+ # curl -u svarovsky@gooddata.com:testtest -k https://secure-di.gooddata.com/project-uploads/vl6ynq971oza5kbxhtscpjcghq5gfox1/validation_output_account.csv
11
+
12
+ # `"https://" + replace("svarovsky@gooddata.com","@","%40") + ":testtest@secure-di.gooddata.com/project-uploads/${GDC_PROJECT_ID}/validation_output_account.csv"`
data/lib/runtime.rb CHANGED
@@ -148,23 +148,39 @@ module GoodData
148
148
  def self.generate_docs
149
149
  project = build_project
150
150
  sources = project.get_sources
151
-
151
+ datasets = project.get_datasets
152
+
152
153
  taps = ""
153
154
  sources.each do |source|
154
- taps += "#####{source[:object]}"
155
+ taps += "####{source[:object]}"
155
156
  taps += "\n"
156
157
  source[:fields].each do |f|
157
158
  if f[:acts_as]
158
- taps += "* #{f[:name]} -> #{f[:acts_as].join(", ")}"
159
+ taps += " #{f[:name]} -> #{f[:acts_as].join(", ")}"
159
160
  else
160
- taps += "* #{f[:name]}"
161
+ taps += " #{f[:name]}"
161
162
  end
162
163
  taps += "\n"
163
164
  end
164
165
 
165
166
  taps += "\n"
166
167
  end
167
- render_template("README.md.erb", PARAMS.merge(:taps => taps), :to_file => 'README.md', :root => DEFINITION_ROOT)
168
+
169
+ sinks = ""
170
+ datasets.each do |sink|
171
+ name = sink[:gd_name] || sink[:id]
172
+ sinks += "####{name}\n"
173
+ sink[:fields].each do |field|
174
+ name = field[:name] || "#{field[:schema]}:#{field[:ref]}"
175
+ type = field[:type]
176
+ sinks += " #{type.upcase} #{field[:meta]} => #{name}\n"
177
+ end
178
+ sinks += "\n"
179
+
180
+ end
181
+
182
+
183
+ render_template("README.md.erb", PARAMS.merge(:taps => taps, :sinks => sinks), :to_file => 'README.md', :root => DEFINITION_ROOT)
168
184
  end
169
185
 
170
186
  def self.model_sync(options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gd_bam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-13 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -326,6 +326,7 @@ files:
326
326
  - bin/bam
327
327
  - lib/bam/version.rb
328
328
  - lib/bam.rb
329
+ - lib/contract_checkers/contract_checkers.rb
329
330
  - lib/dsl/project_dsl.rb
330
331
  - lib/graphs/docentize.grf
331
332
  - lib/graphs/dummy.grf
@@ -343,6 +344,7 @@ files:
343
344
  - lib/graphs/process_stage.grf
344
345
  - lib/graphs/process_stage_history.grf
345
346
  - lib/graphs/process_velocity_duration.grf
347
+ - lib/nodes/agent.rb
346
348
  - lib/nodes/clover_gen.rb
347
349
  - lib/nodes/dependency.rb
348
350
  - lib/nodes/nodes.rb
@@ -381,7 +383,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
381
383
  version: '0'
382
384
  segments:
383
385
  - 0
384
- hash: -1930903317867552914
386
+ hash: -2801225048891425417
385
387
  required_rubygems_version: !ruby/object:Gem::Requirement
386
388
  none: false
387
389
  requirements:
@@ -390,7 +392,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
392
  version: '0'
391
393
  segments:
392
394
  - 0
393
- hash: -1930903317867552914
395
+ hash: -2801225048891425417
394
396
  requirements: []
395
397
  rubyforge_project:
396
398
  rubygems_version: 1.8.25