season 0.0.3 → 0.0.4
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 +4 -4
- data/README.md +10 -3
- data/lib/season/version.rb +1 -1
- data/season.gemspec +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c7b7bc33865ec92d7fa21ba1b3f60899c6879d7
|
4
|
+
data.tar.gz: 777f86b9f96cc9705710742f15628bee85c568cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4aeb0c7cb5a6bf8267a102064138d10f78bb0c03b5ed47eafa6a75596bdda5f5b6d57203d4e80622d5497c834450434bd374f0557d57846a885e038ada49e1c
|
7
|
+
data.tar.gz: 124aa709d8ea5107f9b5e1cff560436aab04bff51cbfeb3a2ae766475c69066ac168e133eee8a9e7a3c5c6d7ff515ef46cde93d79fa7c9e979c42e0aac91549f
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Season let's you easily query your Models by a specific date/time.
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
|
-
gem 'season', '~> 0.0.
|
10
|
+
gem 'season', '~> 0.0.4'
|
11
11
|
```
|
12
12
|
|
13
13
|
And then execute:
|
@@ -31,7 +31,14 @@ Right now, Season gives you the following helper methods:
|
|
31
31
|
```ruby
|
32
32
|
# You can pass instances of Time/DateTime/String as arguments
|
33
33
|
|
34
|
-
class User < ActiveRecord::Base
|
34
|
+
class User < ActiveRecord::Base
|
35
|
+
include Season::Scopes
|
36
|
+
|
37
|
+
...
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
# And then use it as:
|
35
42
|
|
36
43
|
User.created_before(Time.now)
|
37
44
|
User.created_after(DateTime.now)
|
@@ -47,7 +54,7 @@ User.updated_between(Time.now - 1.week, Time.now)
|
|
47
54
|
The scopes are not included by default in your models. To use them you need to include it yourself:
|
48
55
|
|
49
56
|
```ruby
|
50
|
-
|
57
|
+
class User < ActiveRecord::Base
|
51
58
|
include Season::Scopes
|
52
59
|
|
53
60
|
...
|
data/lib/season/version.rb
CHANGED
data/season.gemspec
CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.0.0')
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
25
|
spec.add_development_dependency "rspec", "~> 3.1"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: season
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joao Diogo Costa
|
@@ -98,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
98
98
|
requirements:
|
99
99
|
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
101
|
+
version: 2.0.0
|
102
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
104
|
- - ">="
|