ruby-ext-js 0.3.2 → 0.3.3
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/README.markdown +4 -0
- data/VERSION +1 -1
- data/lib/ruby-ext-js.rb +2 -2
- data/ruby-ext-js.gemspec +1 -1
- data/spec/ruby-ext-js_spec.rb +3 -3
- metadata +3 -3
data/README.markdown
CHANGED
@@ -65,6 +65,10 @@ Examples:
|
|
65
65
|
|
66
66
|
Version number conventions: Patch-level bumps for bug fixes, minor-level bumps for changes that break backwards-compatibility, major-level bumps for major new features.
|
67
67
|
|
68
|
+
## 0.3.3
|
69
|
+
|
70
|
+
* Fix timezone offset math for `ExtJs::Mongo` date range filters.
|
71
|
+
|
68
72
|
## 0.3.2
|
69
73
|
|
70
74
|
* Respect local time offset for `ExtJs::Mongo` date range filters.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/lib/ruby-ext-js.rb
CHANGED
@@ -155,9 +155,9 @@ module ExtJs
|
|
155
155
|
if comparison == "=="
|
156
156
|
start_time = values[0]
|
157
157
|
end_time = Time.utc( start_time.year, start_time.month, start_time.day, 23, 59, 59 )
|
158
|
-
values = { comparison_for( "gt" ) => start_time
|
158
|
+
values = { comparison_for( "gt" ) => start_time - offset, comparison_for( "lt" ) => end_time - offset }
|
159
159
|
else
|
160
|
-
values = { comparison => values[0]
|
160
|
+
values = { comparison => values[0] - offset }
|
161
161
|
end
|
162
162
|
else
|
163
163
|
if values.size == 1
|
data/ruby-ext-js.gemspec
CHANGED
data/spec/ruby-ext-js_spec.rb
CHANGED
@@ -90,8 +90,8 @@ describe "ExtJs" do
|
|
90
90
|
it "handles date range params" do
|
91
91
|
offset = Time.now.utc_offset
|
92
92
|
date = Date.parse "11/26/2010"
|
93
|
-
start_time = Time.utc( date.year, date.month, date.day )
|
94
|
-
end_time = Time.utc( date.year, date.month, date.day, 23, 59, 59 )
|
93
|
+
start_time = Time.utc( date.year, date.month, date.day ) - offset
|
94
|
+
end_time = Time.utc( date.year, date.month, date.day, 23, 59, 59 ) - offset
|
95
95
|
|
96
96
|
params = { "filter" => {
|
97
97
|
"0" => {
|
@@ -136,7 +136,7 @@ describe "ExtJs" do
|
|
136
136
|
it "handles invalid comparison operators by falling back to $in" do
|
137
137
|
offset = Time.now.utc_offset
|
138
138
|
date = Date.parse "11/26/2010"
|
139
|
-
start_time = Time.utc( date.year, date.month, date.day )
|
139
|
+
start_time = Time.utc( date.year, date.month, date.day ) - offset
|
140
140
|
|
141
141
|
params = { "filter" => {
|
142
142
|
"0" => {
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-ext-js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tyson Tate
|