season 0.0.5 → 0.0.6

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: 2d62ee58d4c895ddbc76919af3aec21b6276d00b
4
- data.tar.gz: f05f5f29921755090dceb8243ca10252a89cff5d
3
+ metadata.gz: ad71e236ae386e4b79309af41447cbba18b26833
4
+ data.tar.gz: 946198f7bd269368e8123916eec88f0199671704
5
5
  SHA512:
6
- metadata.gz: e4750c46690687c4476fe4e58f002d30c7719471938e7f53bc4b47967fd4bbe11f4b8eae15679c73b0180b0b1f2892cd4782a78f50ae7630fb005ce5c30c79d5
7
- data.tar.gz: 8c1be2eb020ac456ca58d3399b7c70ad23fe126bc7062c4e1b4a004190c79951a4e3dbacad634d6b8d3287ce6f664755883f6ee8a8b809196046b77eb84cb898
6
+ metadata.gz: 161a85053768d7d9a72603be1971476460bbdd25fb39bdf5cc2f8143f334aa3fa2adb43417a10c42b168211442d625e7af5ae16ac87fa732808c2234311fc941
7
+ data.tar.gz: ead7c4c8946153bc4c70485d6f1af7964f0d3761000119af6290780d90b791981a9673349968be7cfc5f9f1ad61a2d0eadbaf6c667ccfade2d57b09e4c4dcdc9
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.5'
10
+ gem 'season', '~> 0.0.6'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -29,7 +29,7 @@ Season assumes your models have timestamps columns (created_at and updated_at) a
29
29
  Right now, Season gives you the following helper methods:
30
30
 
31
31
  ```ruby
32
- # You can pass instances of Time/DateTime/String as arguments
32
+ # Include it in your models
33
33
 
34
34
  class User < ActiveRecord::Base
35
35
  include Season::Scopes
@@ -39,6 +39,7 @@ class User < ActiveRecord::Base
39
39
  end
40
40
 
41
41
  # And then use it as:
42
+ # (Time/DateTime/String instances are allowed as arguments)
42
43
 
43
44
  User.created_before(Time.now)
44
45
  User.created_after(DateTime.now)
@@ -49,6 +50,14 @@ User.updated_after('01-01-2015')
49
50
  User.updated_between(Time.now - 1.week, Time.now)
50
51
  ```
51
52
 
53
+ They are chainable, so you can also do things like this:
54
+ ```ruby
55
+
56
+ User.where(id: [1, 2, 3]).created_before(Time.now)
57
+ User.updated_after('01-01-2015').order(created_at: :asc)
58
+ ```
59
+
60
+
52
61
  ## Configuration
53
62
 
54
63
  The scopes are not included by default in your models. To use them you need to include it yourself:
@@ -1,3 +1,3 @@
1
1
  module Season
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/season.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["jdscosta91@gmail.com"]
11
11
  spec.summary = %q{Season lets you query your ActiveRecord models by a specified period of time in an easier way.}
12
12
  spec.description = %q{Season lets you query your ActiveRecord models by a specified period of time in an easier way.}
13
- spec.homepage = "https://github.com/joaodiogocosta"
13
+ spec.homepage = "https://github.com/joaodiogocosta/season"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joao Diogo Costa
@@ -87,7 +87,7 @@ files:
87
87
  - season.gemspec
88
88
  - spec/scopes.rb
89
89
  - spec/spec_helper.rb
90
- homepage: https://github.com/joaodiogocosta
90
+ homepage: https://github.com/joaodiogocosta/season
91
91
  licenses:
92
92
  - MIT
93
93
  metadata: {}