periodic_calculations 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +0 -1
- data/.rspec +1 -0
- data/.travis.yml +8 -0
- data/Gemfile.lock +1 -1
- data/lib/periodic_calculations/version.rb +1 -1
- data/spec/dummy/config/database.yml +1 -1
- data/spec/periodic_calculations/query_spec.rb +3 -5
- metadata +4 -2
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour --drb --profile --require spec_helper
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
1
|
describe PeriodicCalculations::Query do
|
4
2
|
|
5
3
|
before { Activity.delete_all }
|
6
4
|
|
7
5
|
let(:scope) { Activity.all }
|
8
|
-
let(:time) { Time.now }
|
6
|
+
let(:time) { Time.zone.now }
|
9
7
|
|
10
8
|
let(:operation) { :count }
|
11
9
|
let(:column_name) { :id }
|
@@ -96,9 +94,9 @@ describe PeriodicCalculations::Query do
|
|
96
94
|
end
|
97
95
|
|
98
96
|
it "should return matching results taking timezone into account" do
|
99
|
-
Time.zone = ActiveSupport::TimeZone["
|
97
|
+
Time.zone = ActiveSupport::TimeZone["Asia/Tokyo"]
|
100
98
|
|
101
|
-
Time.zone.name.should == "
|
99
|
+
Time.zone.name.should == "Asia/Tokyo" # ensure correctly set
|
102
100
|
|
103
101
|
# Outside left window limit
|
104
102
|
Activity.create(:quantity => 3, :created_at => start_time.beginning_of_day - 1.seconds)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: periodic_calculations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
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-12-
|
12
|
+
date: 2013-12-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -100,6 +100,8 @@ extensions: []
|
|
100
100
|
extra_rdoc_files: []
|
101
101
|
files:
|
102
102
|
- .gitignore
|
103
|
+
- .rspec
|
104
|
+
- .travis.yml
|
103
105
|
- Gemfile
|
104
106
|
- Gemfile.lock
|
105
107
|
- MIT-LICENSE
|