rails-analytics 0.0.1 → 0.0.3

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: 03e3cb5bcbc7745cbc85d1e88a1120ffb4b34d96
4
- data.tar.gz: 39d9a9ebddc86d8c29620dd0beb3b54ec863b574
3
+ metadata.gz: 0a9c2fc1f7057892f7818e6fdb399c800c93e8df
4
+ data.tar.gz: 8726d8163e7b45aab3d613507c44d06ccaad1ab4
5
5
  SHA512:
6
- metadata.gz: dbdaf12819301d731ec22130bf020b8b0a56cd5dce073f165e6166f930e95370d9e6f6ad9c616f4f2eec04bfae65d22d74500b7f9f2d587fd98c7031df088378
7
- data.tar.gz: a6c67a8ccbf54db7806924945e7d3d14dc529b48b654ec580cbfced1a20de82a970290fc32e5b3e16c4f9eb8f8987dac32f286c1089f19b4bc36bb9eb69e285e
6
+ metadata.gz: 4bda2518ac5852531601587e50083a616f53458e00ff5e88f00a5d24686829c468a6ba2e59b6e7ee0526e28e183efc1ee3d5575d53cd4bc258970fdae62af95d
7
+ data.tar.gz: c9ff7949fd448637c52757a421d298cdb14e51d6967588f31bbb2e44a27c5e47171cb190ed4b5ff8ed7183779676851e3c32c16d489be6bc92099c4b53c72ef2
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Rails::Analytics
2
2
 
3
- TODO: Write a gem description
3
+ Basic analytics gem for Rails
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ If you want to keep track of events in your Rails app
22
22
 
23
23
  ## Contributing
24
24
 
@@ -5,6 +5,9 @@ module Rails
5
5
  # namespace our plugin and inherit from Rails::Railtie
6
6
  # to get our plugin into the initialization process
7
7
  class Railtie < Rails::Railtie
8
+ def colorize(text, color_code)
9
+ "\e[#{color_code}m#{text}\e[0m"
10
+ end
8
11
 
9
12
  # configure our plugin on boot. other extension points such
10
13
  # as configuration, rake tasks, etc, are also available
@@ -13,7 +16,7 @@ module Rails
13
16
  # subscribe to all rails notifications: controllers, AR, etc.
14
17
  ActiveSupport::Notifications.subscribe do |*args|
15
18
  event = ActiveSupport::Notifications::Event.new(*args)
16
- puts "Got notification: #{event.inspect}"
19
+ puts "Got notification: #{colorize(event.inspect, 32)}"
17
20
  end
18
21
 
19
22
  end
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Analytics
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - gdi2290