growth 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -17
- data/lib/growth/version.rb +1 -1
- metadata +4 -5
- data/MIT-LICENSE +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06f71b3935bbf31808204ba8d6d2ab9f1641e028
|
4
|
+
data.tar.gz: 6c856d1bb9a2e76b70f9fbddd3deb701c93662b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53a0947ea53850496f0d35ed2ab6be78dd2056d39ec2012eb8be4affeb5d2ccc78ed6a124f2353c14fbb8f281588e1ec0a0becb443d1ad05f30dd6845a6d30ac
|
7
|
+
data.tar.gz: db3095350810c721358ff4d2b0d48838ae40c16dfdcded50b1b5f47cc6aaa286fb4ad21d13c4dc48a8ce80e7bd49c2d2cd9dc0fcfab9670f5c6ebc21d576a774
|
data/README.md
CHANGED
@@ -1,33 +1,31 @@
|
|
1
|
-
#
|
2
|
-
Measure growth
|
1
|
+
# GrowthEngine
|
2
|
+
Measure the yearly and monthly growth of your Rails models with a dashboard mounted on your Rails app. Specify the models you'd like to measure in a single initializer file and that's it, the gem will handle the rest.
|
3
3
|
|
4
|
-
|
5
|
-
How to use my plugin.
|
4
|
+
A more advanced feature in the gem allows you to better understand the associations between your models. For example, let's say you have a Users model that has_many Posts. Over time you might wonder, how many users have only created one post? Which user has created the most posts? Rather than write these database queries each time, the growth gem will automatically generate these reports for you.
|
6
5
|
|
7
6
|
## Installation
|
8
|
-
Add
|
9
|
-
|
7
|
+
Add the following line to your Gemfile:
|
10
8
|
```ruby
|
11
9
|
gem 'growth'
|
12
10
|
```
|
13
11
|
|
14
|
-
|
12
|
+
Then run:
|
15
13
|
```bash
|
16
14
|
$ bundle install
|
17
15
|
```
|
18
16
|
|
19
|
-
Next, you need to run the
|
17
|
+
Next, you need to run the generator:
|
20
18
|
```bash
|
21
19
|
$ rails generate growth:install
|
22
20
|
```
|
23
21
|
|
24
22
|
Running the install generator does two things:
|
25
23
|
|
26
|
-
1. Mounts the stats engine at '/
|
24
|
+
1. Mounts the stats engine at '/growth' by adding to your routes.rb. You can also pass a route of your choice to the 'at' param.
|
27
25
|
|
28
26
|
```ruby
|
29
27
|
Rails.application.routes.draw do
|
30
|
-
mount Growth::Engine, at: "/
|
28
|
+
mount Growth::Engine, at: "/growth"
|
31
29
|
end
|
32
30
|
```
|
33
31
|
|
@@ -37,16 +35,21 @@ end
|
|
37
35
|
Growth.models_to_measure = ApplicationRecord.descendants.map { |model| model.to_s }
|
38
36
|
```
|
39
37
|
|
40
|
-
|
38
|
+
You can customize the models you'd like to measure by passing an array of models, i.e.:
|
41
39
|
|
42
|
-
```
|
40
|
+
```ruby
|
41
|
+
Growth.models_to_measure = [ Users, Posts, Comments ]
|
42
|
+
```
|
43
43
|
|
44
|
-
|
45
|
-
```Growth.password``` is your password for http_basic_auth
|
44
|
+
Options in your config file are:
|
46
45
|
|
46
|
+
```Growth.models_to_measure``` takes an array of models, ex. [Posts, Users, Comments], that you'd like to measure. The default measures all models.
|
47
47
|
|
48
|
-
|
49
|
-
|
48
|
+
```Growth.model_blacklist``` takes an array of models, ex. [AdminUsers], that you want to prevent the gem from measuring.
|
49
|
+
|
50
|
+
```Growth.username ``` is your username for http_basic_auth
|
51
|
+
|
52
|
+
```Growth.password``` is your password for http_basic_auth
|
50
53
|
|
51
54
|
## License
|
52
|
-
|
55
|
+
Please see <a href="https://github.com/VibrantLight/growth/blob/master/LICENSE">LICENSE</a> for licensing details.
|
data/lib/growth/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Friedman
|
@@ -80,15 +80,14 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description:
|
84
|
-
|
83
|
+
description: Track the monthly and yearly growth of your Rails models along with their
|
84
|
+
associations.
|
85
85
|
email:
|
86
86
|
- ryan@soundtribe.com
|
87
87
|
executables: []
|
88
88
|
extensions: []
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
|
-
- MIT-LICENSE
|
92
91
|
- README.md
|
93
92
|
- Rakefile
|
94
93
|
- app/assets/config/growth_manifest.js
|
@@ -121,7 +120,7 @@ files:
|
|
121
120
|
- lib/growth/transactions/generate_retention_report.rb
|
122
121
|
- lib/growth/version.rb
|
123
122
|
- lib/tasks/growth_tasks.rake
|
124
|
-
homepage:
|
123
|
+
homepage: https://github.com/VibrantLight/growth
|
125
124
|
licenses:
|
126
125
|
- MIT
|
127
126
|
metadata: {}
|
data/MIT-LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright 2018 Ryan Friedman
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|