gd_bam 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/bam/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bam
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
@@ -98,7 +98,7 @@ module GoodData
98
98
  def self.generate_history_downloaders(home, params)
99
99
  home = Pathname(home)
100
100
  clobber_downloaders_project(home)
101
- project = GoodData::Bam::Project.build_project(params)
101
+ project = GoodData::Bam::Project.build_project(home, params)
102
102
  setup_downloaders_project(home, params)
103
103
  GoodData::Bam::Generators::Downloaders.generate_history_downloaders(home + DOWNLOADERS_HOME + "graphs", project, params)
104
104
  end
@@ -38,7 +38,7 @@
38
38
  <Node enabled="enabled" fileURL="data/1_in.csv" guiHeight="77" guiName="CSV Reader" guiWidth="128" guiX="-184" guiY="122" id="DATA_READER0" quoteCharacter="&quot;" quotedStrings="true" skipRows="1" type="DATA_READER"/>
39
39
  <Node enabled="enabled" fileURL="data/out.csv" guiHeight="77" guiName="CSV Writer" guiWidth="128" guiX="1518" guiY="116" id="DATA_WRITER0" outputFieldNames="true" quoteCharacter="&quot;" quotedStrings="true" type="DATA_WRITER"/>
40
40
  <Node enabled="enabled" guiHeight="77" guiName="ExtSort" guiWidth="128" guiX="417" guiY="116" id="EXT_SORT0" sortKey="Id(a);Snapshot(a)" type="EXT_SORT"/>
41
- <Node enabled="enabled" guiHeight="89" guiName="ExtSort" guiWidth="128" guiX="787" guiY="113" id="EXT_SORT1" sortKey="OpportunityId(a);ForecastCategoryName(a);AccountId(a);OwnerId(a);StageName(a);CreatedDate(a);CloseDate(a);ProductId(a)" type="EXT_SORT"/>
41
+ <Node enabled="enabled" guiHeight="89" guiName="ExtSort" guiWidth="128" guiX="787" guiY="113" id="EXT_SORT1" sortKey="OpportunityId(a);StageName(a);ForecastCategoryName(a);AccountId(a);OwnerId(a);CreatedDate(a);CloseDate(a);ProductId(a)" type="EXT_SORT"/>
42
42
  <Node enabled="passThrough" guiHeight="77" guiName="ExtSort" guiWidth="128" guiX="1341" guiY="116" id="EXT_SORT3" sortKey="Id(a);Stage(a)" type="EXT_SORT"/>
43
43
  <Node enabled="passThrough" guiHeight="65" guiName="Reformat" guiWidth="128" guiX="248" guiY="122" id="REFORMAT0" type="REFORMAT">
44
44
  <attr name="transform"><![CDATA[//#CTL2
@@ -82,27 +82,26 @@ boolean init = true;
82
82
 
83
83
  function integer transform() {
84
84
 
85
- if (init) {
86
- init = false;
87
- previous.Velocity = 0;
88
- previous.Duration = 0;
89
- }
90
-
91
- if (previous.Id == $in.0.Id && $in.0.Id != null) {
92
- previous.Duration = (date2long(str2date($in.0.Snapshot, 'yyyy-MM-dd')) - date2long(str2date(previous.Snapshot, 'yyyy-MM-dd'))) / 3600 / 24 / 1000;
93
-
94
-
95
- previous.Velocity = previous.Velocity + ((date2long(str2date($in.0.Snapshot, 'yyyy-MM-dd')) - date2long(str2date(previous.Snapshot, 'yyyy-MM-dd')))/ 3600 / 24 / 1000);
96
- copyByName(previous.*,$in.0.*);
97
- } else {
98
- copyByName(previous.*,$in.0.*);
99
- previous.Duration = 0;
100
- }
101
-
102
- printErr(previous);
103
-
104
- copyByName($out.0.*, previous.*);
105
- return ALL;
85
+ if (init) {
86
+ init = false;
87
+ previous.Velocity = 0;
88
+ previous.Duration = 0;
89
+ }
90
+
91
+ if (previous.Id == $in.0.Id && $in.0.Id != null) {
92
+ previous.Duration = (date2long(str2date($in.0.Snapshot, 'yyyy-MM-dd')) - date2long(str2date(previous.Snapshot, 'yyyy-MM-dd'))) / 3600 / 24 / 1000;
93
+ previous.Velocity = previous.Velocity + ((date2long(str2date($in.0.Snapshot, 'yyyy-MM-dd')) - date2long(str2date(previous.Snapshot, 'yyyy-MM-dd')))/ 3600 / 24 / 1000);
94
+ copyByName(previous.*,$in.0.*);
95
+ } else {
96
+ copyByName(previous.*,$in.0.*);
97
+ previous.Duration = 0;
98
+ previous.Velocity = 0;
99
+ }
100
+
101
+ printErr(previous);
102
+
103
+ copyByName($out.0.*, previous.*);
104
+ return ALL;
106
105
  }
107
106
 
108
107
  // Called during component initialization.
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.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: