tb_events 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spud/spud_calendar_event_model.rb +7 -2
- data/lib/spud_events/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9cce5c6d901c2e10830c45cee8f2fbe19b4b053
|
4
|
+
data.tar.gz: e3e23097abe47c1a0e76d38799f5202d58810c87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bf7eef8c225bdb0b76f87b06d4f7b7a6ed46a94e2ceaf9790f2dfde84cba76c27176bebe7e364185eb39a6d50b513074d190bf52a2fd934c492e64ec748de21
|
7
|
+
data.tar.gz: a83743a64d224a4f1f221d1c980efb338869bf1bd91c48b6fa09eb4582595ae8fe261169bdcd1ea6b6fa5ab423e4f3f464562e5f6ec62e87b2c2a3b221eabd86
|
@@ -5,9 +5,14 @@ class Spud::SpudCalendarEventModel < ActiveRecord::Base
|
|
5
5
|
validates_presence_of :title, :start_at, :end_at, :spud_calendar_id
|
6
6
|
|
7
7
|
scope :ordered, ->{ order('start_at desc') }
|
8
|
-
scope :in_month_of, ->(date){ where(:start_at => date.beginning_of_month...date.end_of_month) }
|
9
8
|
scope :upcoming, ->(limit=false){ where('start_at >= ?', Date.today).order('start_at asc').limit(limit) }
|
10
|
-
|
9
|
+
scope :in_month_of, ->(date){
|
10
|
+
first = date.beginning_of_month
|
11
|
+
range_start = Time.zone.local(first.year, first.month, first.day)
|
12
|
+
range_end = range_start.end_of_month
|
13
|
+
where(:start_at => range_start..range_end)
|
14
|
+
}
|
15
|
+
|
11
16
|
def start_date
|
12
17
|
return start_at.to_date
|
13
18
|
end
|
data/lib/spud_events/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tb_events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Westlake Design
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tb_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
251
|
rubyforge_project:
|
252
|
-
rubygems_version: 2.
|
252
|
+
rubygems_version: 2.4.6
|
253
253
|
signing_key:
|
254
254
|
specification_version: 4
|
255
255
|
summary: Twice Baked Events engine
|