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 +4 -4
- data/README.md +1 -1
- data/app/helpers/growth/application_helper.rb +1 -1
- data/lib/growth/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ee77886cb39fe345de52ca160066a2ca1c22686
|
4
|
+
data.tar.gz: fcc83ab9af722cd9fceed140d8dda29f7aa5b2e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 = [
|
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(
|
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)
|
data/lib/growth/version.rb
CHANGED
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.
|
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
|
+
date: 2018-10-30 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rails
|