growth 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ba8b1b8f700eeb7023acc5887291e1534bb4b0e
4
- data.tar.gz: 9a308a22a52ce728e940dddea1b6f1b1a2c286e2
3
+ metadata.gz: 2ee77886cb39fe345de52ca160066a2ca1c22686
4
+ data.tar.gz: fcc83ab9af722cd9fceed140d8dda29f7aa5b2e5
5
5
  SHA512:
6
- metadata.gz: 96c974b5c2e6011e22690d90bf04b003ccf4018014aadcb4f117f3a167103d7835658e14259ab2809a2224bfde2499f6dea455e706292f2b30aefdecc1ecedca
7
- data.tar.gz: 3ce8f0a21c318302b50fa1bdc872b339d226ad87c1177a8edaf34366c00d9df8208d0c344bd769f711b6a9c1e37e4e4315806c3040b144ed149cfbb722b122eb
6
+ metadata.gz: 03e145bd470a0d2a81fc49db698a64d88f494a1907bd778cd4e1692e668a655b9cab32033c79a16e9e3d8fea22f7edec899ded19d6c3e345940acbc1135f3af5
7
+ data.tar.gz: c908c94fb2e31a3e5a5398563203d456cb11aa6ca742c8e06bd59467a9ceb24e91bbb3f296bf8b53877500ffb1f2459d2c031a6aef84c519e1b00bd5fc59ddeb
data/README.md CHANGED
@@ -36,7 +36,7 @@ Growth.models_to_measure = ApplicationRecord.descendants.map { |model| model.to_
36
36
  You can customize the models you'd like to measure by passing an array of models, i.e.:
37
37
 
38
38
  ```ruby
39
- Growth.models_to_measure = [ Users, Posts, Comments ]
39
+ Growth.models_to_measure = [ User, Post, Comment ]
40
40
  ```
41
41
 
42
42
  Options in your config file are:
@@ -48,7 +48,7 @@ module Growth
48
48
  end
49
49
 
50
50
  def growth_year_to_date(resource)
51
- resource.constantize.unscoped.where('extract(year from created_at) = ?', Date.current.year).count
51
+ resource.constantize.unscoped.where(created_at: Time.current.beginning_of_year..Time.current.end_of_year).count
52
52
  end
53
53
 
54
54
  def years_since_first_resource(resources)
@@ -1,3 +1,3 @@
1
1
  module Growth
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: growth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Friedman
8
+ - Nursultan Abdyldaev
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2018-10-12 00:00:00.000000000 Z
12
+ date: 2018-10-30 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rails