data_store 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ##0.1.6
2
+
3
+ * BUG FIX: calculate timeborders on local setttings instead of global settings
4
+
1
5
  ##0.1.5
2
6
 
3
7
  * Partial rollback of caching operator, in order to maintain proper calculation of averages.
@@ -49,7 +49,7 @@ module DataStore
49
49
  end
50
50
 
51
51
  def time_width
52
- DataStore.configuration.frequency * DataStore.configuration.maximum_datapoints
52
+ frequency * maximum_datapoints
53
53
  end
54
54
 
55
55
  private
@@ -1,3 +1,3 @@
1
1
  module DataStore
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
@@ -49,8 +49,15 @@ class DataStoreTest < Test::Unit::TestCase
49
49
  assert_equal [:ds_1, :ds_1_5, :ds_1_20, :ds_1_60], @record.table_names
50
50
  end
51
51
 
52
- should 'return its time_borders' do
53
- assert_equal [8000, 40000, 160000, 480000], @record.time_borders
52
+ should 'return its time_borders base on frequency and maximum_datapoints' do
53
+ record = DataStore::Base.create(identifier: 2,
54
+ type: 'counter',
55
+ name: 'Gas',
56
+ frequency: 5,
57
+ maximum_datapoints: 10,
58
+ description: 'Gas usage',
59
+ compression_schema: [2,4])
60
+ assert_equal [50, 100, 400], record.time_borders
54
61
  end
55
62
 
56
63
  should 'return its attributes' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  segments:
80
80
  - 0
81
- hash: -1199792226810511698
81
+ hash: -1644989345688288543
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  version: '0'
88
88
  segments:
89
89
  - 0
90
- hash: -1199792226810511698
90
+ hash: -1644989345688288543
91
91
  requirements: []
92
92
  rubyforge_project:
93
93
  rubygems_version: 1.8.25