include_date_scopes 0.9.6 → 0.9.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a07a72dd91cec5fcff6b701ced82fd96bde969af
4
- data.tar.gz: 969b6a1e1f8264f25667668376f61c6c03626783
3
+ metadata.gz: 86cc1b291a6638f91647fd1276cf98a9fe9c6bf4
4
+ data.tar.gz: 9d57c0750142bd4d42b4f04c82a914a923d2f405
5
5
  SHA512:
6
- metadata.gz: e8c8c48ee924d3bdbe7a608f890390e1a35279e78249ba726be9bdd5f06ae29e598fd05e3446fdff031268e4e8e4d43230e66fb91e559a47894ce6536f21dfb0
7
- data.tar.gz: f17df27bbd23510e5a1614111742d9086a1ff335bf369b9cc56cc07885fee5ec3a9074815ad5f114d52d468fea5c7ef797a966d4fc2c9e0bbcbc7ea40c68ae18
6
+ metadata.gz: ee9b89589d89186fd40c919a799ad2ae5bae563faa93b9341bf0558c162490b1f2369d9c7d2f905dafb7da9faeaa4f04ee14a8c1d3669ab8e2bdcae364038f1f
7
+ data.tar.gz: 9aa490f3b38bb340f28cf5fed6d5de762aac9dc0957b87c98ce851ea397c8a95012a5671807f087a9dd9c154a9f021a2149de8c6eb221b79c888853211d56d86
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- include_date_scopes (0.9.5)
4
+ include_date_scopes (0.9.6)
5
5
  activerecord (< 4)
6
6
  railties
7
7
 
@@ -30,17 +30,65 @@ GEM
30
30
  i18n (~> 0.6, >= 0.6.4)
31
31
  multi_json (~> 1.0)
32
32
  arel (3.0.3)
33
+ better_errors (2.0.0)
34
+ coderay (>= 1.0.0)
35
+ erubis (>= 2.6.6)
36
+ rack (>= 0.9.0)
37
+ binding_of_caller (0.7.2)
38
+ debug_inspector (>= 0.0.1)
33
39
  builder (3.0.4)
40
+ bullet (4.13.2)
41
+ activesupport (>= 3.0.0)
42
+ uniform_notifier (>= 1.6.0)
43
+ byebug (3.4.2)
44
+ columnize (~> 0.8)
45
+ debugger-linecache (~> 1.2)
46
+ slop (~> 3.6)
47
+ celluloid (0.16.0)
48
+ timers (~> 4.0.0)
49
+ coderay (1.1.0)
50
+ columnize (0.8.9)
51
+ debug_inspector (0.0.2)
52
+ debugger-linecache (1.2.0)
34
53
  diff-lcs (1.2.5)
35
54
  erubis (2.7.0)
55
+ ffi (1.9.5)
56
+ formatador (0.2.5)
57
+ guard (2.6.1)
58
+ formatador (>= 0.2.4)
59
+ listen (~> 2.7)
60
+ lumberjack (~> 1.0)
61
+ pry (>= 0.9.12)
62
+ thor (>= 0.18.1)
63
+ guard-ctags-bundler (1.1.0)
64
+ guard (~> 2.0)
36
65
  hike (1.2.3)
66
+ hitimes (1.2.2)
37
67
  i18n (0.6.9)
68
+ interactive_editor (0.0.10)
69
+ spoon (>= 0.0.1)
38
70
  journey (1.0.4)
39
71
  json (1.8.1)
72
+ listen (2.7.11)
73
+ celluloid (>= 0.15.2)
74
+ rb-fsevent (>= 0.9.3)
75
+ rb-inotify (>= 0.9)
76
+ looksee (2.1.1)
77
+ lumberjack (1.0.9)
78
+ method_source (0.8.2)
40
79
  multi_json (1.9.2)
80
+ pry (0.10.1)
81
+ coderay (~> 1.1.0)
82
+ method_source (~> 0.8.1)
83
+ slop (~> 3.4)
84
+ pry-byebug (2.0.0)
85
+ byebug (~> 3.4)
86
+ pry (~> 0.10)
41
87
  rack (1.4.5)
42
88
  rack-cache (1.2)
43
89
  rack (>= 0.4)
90
+ rack-mini-profiler (0.9.2)
91
+ rack (>= 1.1.3)
44
92
  rack-ssl (1.3.4)
45
93
  rack
46
94
  rack-test (0.6.2)
@@ -53,6 +101,9 @@ GEM
53
101
  rdoc (~> 3.4)
54
102
  thor (>= 0.14.6, < 2.0)
55
103
  rake (10.2.2)
104
+ rb-fsevent (0.9.4)
105
+ rb-inotify (0.9.5)
106
+ ffi (>= 0.5.0)
56
107
  rdoc (3.12.2)
57
108
  json (~> 1.4)
58
109
  rspec-core (2.14.8)
@@ -67,6 +118,9 @@ GEM
67
118
  rspec-core (~> 2.14.0)
68
119
  rspec-expectations (~> 2.14.0)
69
120
  rspec-mocks (~> 2.14.0)
121
+ slop (3.6.0)
122
+ spoon (0.0.4)
123
+ ffi
70
124
  sprockets (2.2.2)
71
125
  hike (~> 1.2)
72
126
  multi_json (~> 1.0)
@@ -76,13 +130,25 @@ GEM
76
130
  thor (0.19.1)
77
131
  tilt (1.4.1)
78
132
  timecop (0.7.1)
79
- tzinfo (0.3.39)
133
+ timers (4.0.1)
134
+ hitimes
135
+ tzinfo (0.3.41)
136
+ uniform_notifier (1.6.2)
80
137
 
81
138
  PLATFORMS
82
139
  ruby
83
140
 
84
141
  DEPENDENCIES
142
+ better_errors
143
+ binding_of_caller
144
+ bullet
145
+ guard-ctags-bundler
85
146
  include_date_scopes!
147
+ interactive_editor
148
+ looksee
149
+ pry
150
+ pry-byebug
151
+ rack-mini-profiler
86
152
  rspec-rails
87
153
  sqlite3
88
154
  timecop
@@ -9,7 +9,7 @@ module IncludeDateScopes
9
9
  define_singleton_method :"#{prefix}between" do |start_date_or_time, stop_date_or_time|
10
10
  start_time = (start_date_or_time.is_a?(Date) ? start_date_or_time.to_time : start_date_or_time)
11
11
  stop_time = (stop_date_or_time.is_a?(Date) ? stop_date_or_time.to_time + 1.day : stop_date_or_time )
12
- where(t[column_name].gt(start_time).and(t[column_name].lteq stop_time))
12
+ where(t[column_name].gteq(start_time).and(t[column_name].lt stop_time))
13
13
  end
14
14
 
15
15
  define_singleton_method :"#{prefix}on_or_before_date" do |date|
@@ -1,4 +1,4 @@
1
1
 
2
2
  module IncludeDateScopes
3
- VERSION = '0.9.6'.freeze
3
+ VERSION = '0.9.7'.freeze
4
4
  end
@@ -10,8 +10,8 @@ shared_examples "between time scope" do |name, difference = 1.second|
10
10
  let(:before_threshold_obj) { test_class.create! date_column => bottom_threshold + difference }
11
11
 
12
12
  it { should_not include after_threshold_obj }
13
- it { should_not include at_top_threshold_obj }
14
- it { should include at_bottom_threshold_obj }
13
+ it { should include at_top_threshold_obj }
14
+ it { should_not include at_bottom_threshold_obj }
15
15
  it { should_not include before_threshold_obj }
16
16
  end
17
17
 
@@ -85,21 +85,21 @@ shared_examples "timestamp scopes" do |date_column = :created_at, prefix = '' |
85
85
  end
86
86
 
87
87
  describe ":today" do
88
- let(:top_threshold) { Time.now.beginning_of_day - 1.second }
88
+ let(:top_threshold) { Time.now.beginning_of_day }
89
89
  let(:bottom_threshold) { Time.now.end_of_day }
90
90
  let(:arguments) { [] }
91
91
  include_examples 'between time scope','today'
92
92
  end
93
93
 
94
94
  describe ":yesterday" do
95
- let(:top_threshold) { 1.day.ago.beginning_of_day - 1.second }
95
+ let(:top_threshold) { 1.day.ago.beginning_of_day }
96
96
  let(:bottom_threshold) { 1.day.ago.end_of_day }
97
97
  let(:arguments) { [] }
98
98
  include_examples 'between time scope','yesterday'
99
99
  end
100
100
 
101
101
  describe ":tomorrow" do
102
- let(:top_threshold) { 1.day.from_now.beginning_of_day - 1.second }
102
+ let(:top_threshold) { 1.day.from_now.beginning_of_day }
103
103
  let(:bottom_threshold) { 1.day.from_now.end_of_day }
104
104
  let(:arguments) { [] }
105
105
  include_examples 'between time scope','tomorrow'
@@ -309,35 +309,35 @@ shared_examples "timestamp scopes" do |date_column = :created_at, prefix = '' |
309
309
  end
310
310
 
311
311
  describe ":this_hour" do
312
- let(:top_threshold) { Time.now.beginning_of_hour - 1.second }
312
+ let(:top_threshold) { Time.now.beginning_of_hour }
313
313
  let(:bottom_threshold) { Time.now.end_of_hour }
314
314
  let(:arguments) { [] }
315
315
  include_examples 'between time scope','this_hour'
316
316
  end
317
317
 
318
318
  describe ":this_day" do
319
- let(:top_threshold) { Time.now.beginning_of_day - 1.second }
319
+ let(:top_threshold) { Time.now.beginning_of_day }
320
320
  let(:bottom_threshold) { Time.now.end_of_day }
321
321
  let(:arguments) { [] }
322
322
  include_examples 'between time scope','this_day'
323
323
  end
324
324
 
325
325
  describe ":this_week" do
326
- let(:top_threshold) { Time.now.beginning_of_week - 1.second }
326
+ let(:top_threshold) { Time.now.beginning_of_week }
327
327
  let(:bottom_threshold) { Time.now.end_of_week }
328
328
  let(:arguments) { [] }
329
329
  include_examples 'between time scope','this_week'
330
330
  end
331
331
 
332
332
  describe ":this_month" do
333
- let(:top_threshold) { Time.now.beginning_of_month - 1.second }
333
+ let(:top_threshold) { Time.now.beginning_of_month }
334
334
  let(:bottom_threshold) { Time.now.end_of_month }
335
335
  let(:arguments) { [] }
336
336
  include_examples 'between time scope','this_month'
337
337
  end
338
338
 
339
339
  describe ":this_year" do
340
- let(:top_threshold) { Time.now.beginning_of_year - 1.second }
340
+ let(:top_threshold) { Time.now.beginning_of_year }
341
341
  let(:bottom_threshold) { Time.now.end_of_year }
342
342
  let(:arguments) { [] }
343
343
  include_examples 'between time scope','this_year'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: include_date_scopes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Todd