ruby-ext-js 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
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.2
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 + offset, comparison_for( "lt" ) => end_time + offset }
158
+ values = { comparison_for( "gt" ) => start_time - offset, comparison_for( "lt" ) => end_time - offset }
159
159
  else
160
- values = { comparison => values[0] + offset }
160
+ values = { comparison => values[0] - offset }
161
161
  end
162
162
  else
163
163
  if values.size == 1
data/ruby-ext-js.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruby-ext-js}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tyson Tate"]
@@ -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 ) + offset
94
- end_time = Time.utc( date.year, date.month, date.day, 23, 59, 59 ) + offset
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 ) + offset
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tyson Tate