gd_bam 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -39,36 +39,18 @@ TBD
39
39
 
40
40
  ##Installation
41
41
 
42
- create a directory `mkdir bam`
43
- cd into it `cd bam`
42
+ make sure you have ruby (1.9 and 1.8 is supported) and that you have gem installed
44
43
 
45
- clone salesforce
46
- clone bam
47
- create a Gemfile `touch Gemfile`
44
+ `gem install gd_bam`
48
45
 
49
- and put this inside
50
-
51
- source "https://rubygems.org"
52
- gem "bam", :path => "./bam"
53
- gem "salesforce", :path => "./salesforce"
54
-
55
- make sure you are running ruby 1.9.x
56
- install bundler `gem install bundler`
57
-
58
- cd bam
59
- bundle install
60
-
61
- cd ..
62
- bundle install
63
-
64
- create a project `bundle exec bam scaffold project test`
46
+ create a project `bam scaffold project test`
65
47
 
66
48
  this will create a project
67
49
 
68
50
  ##Sample project
69
51
 
70
52
  now you can go inside `cd test` and generate it
71
- `bundle exec bam generate`
53
+ `bam generate`
72
54
 
73
55
  This tap will download users from sf (you have to provide credentials in params.json). It then runs graph called "process user" (this is part of the distribution). This graph concatenates first name and last name together.
74
56
 
@@ -128,7 +110,7 @@ Also you need to provide a definition for sink which can look somwhow like this.
128
110
 
129
111
  For this example to work you need to provide SF and gd credentials. Provide them in params.json. You would need to provide also a project with appropriate project but this is out of scope of this "example" (I am working on tools that would make it easier).
130
112
 
131
- Now run `bundle exec bam generate` and there will be a folder with the clover project generated. Open it in CC find main.grf and run it. After crunching for a while you should see data in the project.
113
+ Now run `bam generate` and there will be a folder with the clover project generated. Open it in CC find main.grf and run it. After crunching for a while you should see data in the project.
132
114
 
133
115
  ### Runtime commands
134
116
  Part of the distribution is the bam executable which lets you do several neat things.
data/bin/bam CHANGED
@@ -1,13 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'gli'
3
- # begin # XXX: Remove this begin/rescue before distributing your app
4
3
  require 'bam'
5
- # rescue LoadError
6
- # STDERR.puts "In development, you need to use `bundle exec bin/bam` to run your app"
7
- # STDERR.puts "At install-time, RubyGems will make sure lib, etc. are in the load path"
8
- # STDERR.puts "Feel free to remove this message from bin/bam now"
9
- # exit 64
10
- # end
11
4
 
12
5
  include GLI::App
13
6
 
@@ -62,9 +55,9 @@ end
62
55
 
63
56
  desc 'Validates that the tap has the fields it is claimed it should have. This is supposed to make the mitigate errors during deploy.'
64
57
  # arg_name 'Describe arguments to new here'
65
- command :taps_generate_docs do |c|
58
+ command :docs do |c|
66
59
  c.action do |global_options,options,args|
67
- GoodData::CloverGenerator.taps_generate_docs
60
+ GoodData::CloverGenerator.generate_docs
68
61
  end
69
62
  end
70
63
 
@@ -122,13 +115,6 @@ command :scaffold do |c|
122
115
  end
123
116
  end
124
117
 
125
- desc 'Runs the project on server'
126
- command :run do |c|
127
- c.action do |global_options,options,args|
128
- puts "This would run the project. But it is not yet implemented"
129
- end
130
- end
131
-
132
118
  desc 'Runs the project on server'
133
119
  command :model_sync do |c|
134
120
 
@@ -158,13 +144,13 @@ command :deploy do |c|
158
144
  fail "You have to specify directory to deploy as an argument" if dir.nil?
159
145
  fail "Specified directory does not exist" unless File.exist?(dir)
160
146
  GoodData::CloverGenerator.connect_to_gd
147
+ options = global_options.merge({:name => "temporary"}).merge(options)
161
148
  response = GoodData::CloverGenerator.deploy(dir, options)
162
149
  end
163
150
  end
164
151
 
165
152
  desc 'Runs the project on server'
166
153
  command :run do |c|
167
-
168
154
  # c.desc 'existing process id under which it is going to be redeployed'
169
155
  # c.arg_name 'process'
170
156
  # c.flag :process
@@ -179,8 +165,8 @@ command :run do |c|
179
165
 
180
166
  GoodData::CloverGenerator.connect_to_gd
181
167
  GoodData::CloverGenerator.create_email_channel
182
-
183
- GoodData::CloverGenerator.deploy(args.first, global_options.merge({:name => "temporary"})) do |deploy_response|
168
+ options = global_options.merge({:name => "temporary"})
169
+ GoodData::CloverGenerator.deploy(args.first, options) do |deploy_response|
184
170
 
185
171
  puts HighLine::color("Executing", HighLine::BOLD) if verbose
186
172
  GoodData::CloverGenerator.create_email_channel do
data/lib/bam/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bam
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -143,7 +143,7 @@
143
143
  </Phase>
144
144
  <Phase number="1">
145
145
  <Node enabled="enabled" guiHeight="77" guiName="ExtSort" guiWidth="128" guiX="1656" guiY="280" id="EXT_SORT0" sortKey="Timestamp(a)" type="EXT_SORT"/>
146
- <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;IsClosed&quot;:{&quot;name&quot;:&quot;IsClosed&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;IsWon&quot;:{&quot;name&quot;:&quot;IsWon&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;StageName&quot;:{&quot;name&quot;:&quot;StageName&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="280" id="GD_ESTORE_WRITER0" store="${GDC_EVENTSTORE}" timezone="${GDC_EVENTSTORE_TIMEZONE}" type="GD_ESTORE_WRITER"/>
146
+ <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;IsClosed&quot;:{&quot;name&quot;:&quot;IsClosed&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;IsWon&quot;:{&quot;name&quot;:&quot;IsWon&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;StageName&quot;:{&quot;name&quot;:&quot;StageName&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="280" id="GD_ESTORE_WRITER0" store="${GDC_EVENTSTORE}" timezone="UTC" type="GD_ESTORE_WRITER"/>
147
147
  <Node enabled="enabled" guiHeight="77" guiName="LookupJoin" guiWidth="128" guiX="535" guiY="280" id="LOOKUP_JOIN0" joinKey="StageName" leftOuterJoin="true" lookupTable="LookupTable0" type="LOOKUP_JOIN">
148
148
  <attr name="transform"><![CDATA[//#CTL2
149
149
 
@@ -189,7 +189,7 @@ function integer transform() {
189
189
  $out.0.StageName = $in.0.StageName;
190
190
  $out.0.IsWon = $in.1.IsWon;
191
191
  $out.0.IsClosed = $in.1.IsClosed;
192
- $out.0.Timestamp = $out.0.Timestamp = timestampParsing($in.0.SystemModstamp, "${GDC_EVENTSTORE_TIMEZONE}"):null;
192
+ $out.0.Timestamp = $out.0.Timestamp = timestampParsing($in.0.SystemModstamp, "UTC"):null;
193
193
  $out.0.Id = $in.0.Id;
194
194
 
195
195
  return OK;
@@ -225,7 +225,7 @@ function integer transform()
225
225
  $out.0.StageName = $in.0.StageName;
226
226
  $out.0.IsWon = $in.0.IsWon;
227
227
  $out.0.IsClosed = $in.0.IsClosed;
228
- $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "${GDC_EVENTSTORE_TIMEZONE}"):null;
228
+ $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "UTC"):null;
229
229
 
230
230
  return OK;
231
231
  }
@@ -267,7 +267,7 @@ function integer transform()
267
267
  </Phase>
268
268
  <Phase number="2">
269
269
  <Node enabled="enabled" guiHeight="77" guiName="ExtSort" guiWidth="128" guiX="1656" guiY="560" id="EXT_SORT1" sortKey="Timestamp(a)" type="EXT_SORT"/>
270
- <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;CloseDate&quot;:{&quot;name&quot;:&quot;CloseDate&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="560" id="GD_ESTORE_WRITER1" store="${GDC_EVENTSTORE}" timezone="${GDC_EVENTSTORE_TIMEZONE}" type="GD_ESTORE_WRITER"/>
270
+ <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;CloseDate&quot;:{&quot;name&quot;:&quot;CloseDate&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="560" id="GD_ESTORE_WRITER1" store="${GDC_EVENTSTORE}" timezone="UTC" type="GD_ESTORE_WRITER"/>
271
271
  <Node enabled="enabled" guiHeight="65" guiName="Reformat" guiWidth="128" guiX="974" guiY="550" id="REFORMAT1" type="REFORMAT">
272
272
  <attr name="transform"><![CDATA[//#CTL2
273
273
  import 'trans/DateFunctions.ctl';
@@ -277,7 +277,7 @@ function integer transform()
277
277
  {
278
278
  $out.0.Id = $in.0.Id;
279
279
  $out.0.CloseDate = $in.0.CloseDate;
280
- $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "${GDC_EVENTSTORE_TIMEZONE}"):null;
280
+ $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "UTC"):null;
281
281
 
282
282
  return OK;
283
283
  }
@@ -309,7 +309,7 @@ import 'trans/DateFunctions.ctl';
309
309
  function integer transform() {
310
310
  $out.0.CloseDate = $in.0.CloseDate;
311
311
  $out.0.Id = $in.0.Id;
312
- $out.0.Timestamp = $out.0.Timestamp = timestampParsing($in.0.SystemModstamp, "${GDC_EVENTSTORE_TIMEZONE}"):null;
312
+ $out.0.Timestamp = $out.0.Timestamp = timestampParsing($in.0.SystemModstamp, "UTC"):null;
313
313
 
314
314
  return OK;
315
315
  }
@@ -343,7 +343,7 @@ function integer transform() {
343
343
  </Phase>
344
344
  <Phase number="3">
345
345
  <Node enabled="enabled" guiHeight="77" guiName="ExtSort" guiWidth="128" guiX="1656" guiY="781" id="EXT_SORT2" sortKey="Timestamp(a)" type="EXT_SORT"/>
346
- <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;Amount&quot;:{&quot;name&quot;:&quot;Amount&quot;,&quot;type&quot;:&quot;fact&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="781" id="GD_ESTORE_WRITER2" store="${GDC_EVENTSTORE}" timezone="${GDC_EVENTSTORE_TIMEZONE}" type="GD_ESTORE_WRITER"/>
346
+ <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;Amount&quot;:{&quot;name&quot;:&quot;Amount&quot;,&quot;type&quot;:&quot;fact&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="781" id="GD_ESTORE_WRITER2" store="${GDC_EVENTSTORE}" timezone="UTC" type="GD_ESTORE_WRITER"/>
347
347
  <Node enabled="enabled" guiHeight="65" guiName="Reformat" guiWidth="128" guiX="960" guiY="787" id="REFORMAT2" type="REFORMAT">
348
348
  <attr name="transform"><![CDATA[//#CTL2
349
349
  import 'trans/DateFunctions.ctl';
@@ -353,7 +353,7 @@ function integer transform()
353
353
  {
354
354
  $out.0.Id = $in.0.Id;
355
355
  $out.0.Amount = $in.0.Amount;
356
- $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "${GDC_EVENTSTORE_TIMEZONE}"):null;
356
+ $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "UTC"):null;
357
357
 
358
358
  return OK;
359
359
  }
@@ -386,7 +386,7 @@ function integer transform()
386
386
  {
387
387
  $out.0.Amount = $in.0.Amount;
388
388
  $out.0.Id = $in.0.Id;
389
- $out.0.Timestamp = $out.0.Timestamp = timestampParsing($in.0.SystemModstamp, "${GDC_EVENTSTORE_TIMEZONE}"):null;
389
+ $out.0.Timestamp = $out.0.Timestamp = timestampParsing($in.0.SystemModstamp, "UTC"):null;
390
390
 
391
391
  return OK;
392
392
  }
@@ -420,7 +420,7 @@ function integer transform()
420
420
  </Phase>
421
421
  <Phase number="4">
422
422
  <Node enabled="enabled" guiHeight="77" guiName="ExtSort" guiWidth="128" guiX="1656" guiY="1002" id="EXT_SORT3" sortKey="Timestamp(a)" type="EXT_SORT"/>
423
- <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;Probability&quot;:{&quot;name&quot;:&quot;Probability&quot;,&quot;type&quot;:&quot;fact&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="1002" id="GD_ESTORE_WRITER3" store="${GDC_EVENTSTORE}" timezone="${GDC_EVENTSTORE_TIMEZONE}" type="GD_ESTORE_WRITER"/>
423
+ <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;Probability&quot;:{&quot;name&quot;:&quot;Probability&quot;,&quot;type&quot;:&quot;fact&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="1002" id="GD_ESTORE_WRITER3" store="${GDC_EVENTSTORE}" timezone="UTC" type="GD_ESTORE_WRITER"/>
424
424
  <Node enabled="enabled" guiHeight="65" guiName="Reformat" guiWidth="128" guiX="954" guiY="1002" id="REFORMAT3" type="REFORMAT">
425
425
  <attr name="transform"><![CDATA[//#CTL2
426
426
  import 'trans/DateFunctions.ctl';
@@ -430,7 +430,7 @@ function integer transform()
430
430
  {
431
431
  $out.0.Id = $in.0.Id;
432
432
  $out.0.Probability = str2decimal($in.0.Probability):null;
433
- $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "${GDC_EVENTSTORE_TIMEZONE}"):null;
433
+ $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "UTC"):null;
434
434
 
435
435
  return OK;
436
436
  }
@@ -462,7 +462,7 @@ import 'trans/DateFunctions.ctl';
462
462
  function integer transform() {
463
463
  $out.0.Probability = $in.0.Probability;
464
464
  $out.0.Id = $in.0.Id;
465
- $out.0.Timestamp = $out.0.Timestamp = timestampParsing($in.0.SystemModstamp, "${GDC_EVENTSTORE_TIMEZONE}"):null;
465
+ $out.0.Timestamp = $out.0.Timestamp = timestampParsing($in.0.SystemModstamp, "UTC"):null;
466
466
 
467
467
  return OK;
468
468
  }
@@ -497,8 +497,8 @@ function integer transform() {
497
497
  <Phase number="5">
498
498
  <Node enabled="enabled" guiHeight="77" guiName="ExtSort" guiWidth="128" guiX="1656" guiY="1236" id="EXT_SORT4" sortKey="Timestamp(a)" type="EXT_SORT"/>
499
499
  <Node enabled="enabled" guiHeight="77" guiName="ExtSort" guiWidth="128" guiX="1656" guiY="1334" id="EXT_SORT5" sortKey="Timestamp(a)" type="EXT_SORT"/>
500
- <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;OpportunityId&quot;:{&quot;name&quot;:&quot;OpportunityId&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;CreatedDate&quot;:{&quot;name&quot;:&quot;CreatedDate&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="1236" id="GD_ESTORE_WRITER4" store="${GDC_EVENTSTORE}" timezone="${GDC_EVENTSTORE_TIMEZONE}" type="GD_ESTORE_WRITER"/>
501
- <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;IsDeleted&quot;:{&quot;name&quot;:&quot;IsDeleted&quot;,&quot;type&quot;:&quot;isDeleted&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1917" guiY="1334" id="GD_ESTORE_WRITER5" store="${GDC_EVENTSTORE}" timezone="${GDC_EVENTSTORE_TIMEZONE}" type="GD_ESTORE_WRITER"/>
500
+ <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;OpportunityId&quot;:{&quot;name&quot;:&quot;OpportunityId&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;CreatedDate&quot;:{&quot;name&quot;:&quot;CreatedDate&quot;,&quot;type&quot;:&quot;attribute&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1872" guiY="1236" id="GD_ESTORE_WRITER4" store="${GDC_EVENTSTORE}" timezone="UTC" type="GD_ESTORE_WRITER"/>
501
+ <Node enabled="enabled" entityFieldsMapping="{&quot;entityName&quot;:&quot;Opportunity&quot;,&quot;fieldsMapping&quot;:{&quot;IsDeleted&quot;:{&quot;name&quot;:&quot;IsDeleted&quot;,&quot;type&quot;:&quot;isDeleted&quot;},&quot;Id&quot;:{&quot;name&quot;:&quot;Id&quot;,&quot;type&quot;:&quot;recordid&quot;},&quot;Timestamp&quot;:{&quot;name&quot;:&quot;Timestamp&quot;,&quot;type&quot;:&quot;timestamp&quot;}}}" guiHeight="65" guiName="GD Eventstore Writer" guiWidth="150" guiX="1917" guiY="1334" id="GD_ESTORE_WRITER5" store="${GDC_EVENTSTORE}" timezone="UTC" type="GD_ESTORE_WRITER"/>
502
502
  <Node enabled="enabled" guiHeight="65" guiName="Reformat" guiWidth="128" guiX="1300" guiY="1236" id="REFORMAT7" type="REFORMAT">
503
503
  <attr name="transform"><![CDATA[//#CTL2
504
504
  import 'trans/DateFunctions.ctl';
@@ -506,10 +506,10 @@ import 'trans/DateFunctions.ctl';
506
506
  // Transforms input record into output record.
507
507
  function integer transform()
508
508
  {
509
- $out.0.CreatedDate = dateParsing(goodDateParsing($in.0.CreatedDate, "${GDC_EVENTSTORE_TIMEZONE}")):null;
509
+ $out.0.CreatedDate = dateParsing(goodDateParsing($in.0.CreatedDate, "UTC")):null;
510
510
  $out.0.Id = $in.0.Id;
511
511
  $out.0.OpportunityId = $in.0.Id;
512
- $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "${GDC_EVENTSTORE_TIMEZONE}"):null;
512
+ $out.0.Timestamp = timestampParsing($in.0.CreatedDate, "UTC"):null;
513
513
 
514
514
  return OK;
515
515
  }
data/lib/runtime.rb CHANGED
@@ -138,20 +138,25 @@ module GoodData
138
138
  pp report
139
139
  end
140
140
 
141
- def self.taps_generate_docs
141
+ def self.generate_docs
142
142
  project = build_project
143
143
  sources = project.get_sources
144
-
145
144
 
146
145
  taps = ""
147
146
  sources.each do |source|
148
- x = GoodData::CloverGenerator.transformation_acts_as(source)
147
+ # x = GoodData::CloverGenerator.transformation_acts_as(source)
149
148
  taps += "#####{source[:object]}"
150
149
  taps += "\n"
151
- x.each do |field|
152
- taps += "* #{field[0]} -> #{field[1]}"
150
+ source[:fields].each do |f|
151
+ if f[:acts_as]
152
+ taps += "* #{f[:name]} -> #{f[:acts_as].join(", ")}"
153
+ else
154
+ taps += "* #{f[:name]}"
155
+ end
153
156
  taps += "\n"
154
157
  end
158
+
159
+ taps += "\n"
155
160
  end
156
161
  render_template("README.md.erb", PARAMS.merge(:taps => taps), :to_file => 'README.md', :root => DEFINITION_ROOT)
157
162
  end
@@ -221,7 +226,7 @@ module GoodData
221
226
  end
222
227
 
223
228
  def self.connect_to_gd
224
- # GoodData.logger = Logger.new(STDOUT)
229
+ GoodData.logger = Logger.new(STDOUT)
225
230
  GoodData.connect(PARAMS[:gd_login], PARAMS[:gd_pass])
226
231
  GoodData.project = PARAMS[:project_pid]
227
232
  end
@@ -290,7 +295,6 @@ module GoodData
290
295
 
291
296
  def self.deploy(dir, options={}, &block)
292
297
  verbose = options[:verbose] || false
293
-
294
298
  if block
295
299
  begin
296
300
  res = deploy_graph(dir, options)
@@ -322,6 +326,8 @@ module GoodData
322
326
  end
323
327
 
324
328
  flows = flows.find_all {|flow| flow && flow.name == only_flow} unless only_flow.nil? || only_flow.empty?
329
+ fail "The flow you specified was not found" if flows.empty? && !only_flow.nil?
330
+ fail "There are no flows to generate from" if flows.empty?
325
331
  super_flow = []
326
332
  FileUtils::cd CLOVER_PROJECT_ROOT do
327
333
 
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.1
4
+ version: 0.0.2
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-04-10 00:00:00.000000000 Z
12
+ date: 2013-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -393,7 +393,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
393
393
  version: '0'
394
394
  segments:
395
395
  - 0
396
- hash: 738705733008460416
396
+ hash: -632830288147751058
397
397
  required_rubygems_version: !ruby/object:Gem::Requirement
398
398
  none: false
399
399
  requirements:
@@ -402,7 +402,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
402
402
  version: '0'
403
403
  segments:
404
404
  - 0
405
- hash: 738705733008460416
405
+ hash: -632830288147751058
406
406
  requirements: []
407
407
  rubyforge_project:
408
408
  rubygems_version: 1.8.25