metricky 0.7.0 → 0.7.1

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
  SHA256:
3
- metadata.gz: 8fee18603afa8aec4d2c471600e870e6af834f5a1fd5925367edc6eabe188a70
4
- data.tar.gz: 5faeaba4a23775b134654ccca0097a888c3e4b486ea6d09fa11d8cff4bf294d3
3
+ metadata.gz: 50d0d14a13b70076ddc6ee6ccad248e73dfd50eff8098c05afdb704f7f3be560
4
+ data.tar.gz: b4c0597894d8b9ebea7e37c4d6173038e4185b015714e933be5e63372a3576c8
5
5
  SHA512:
6
- metadata.gz: a34d17f88e51b726fc3292d73219d4d0f47d1d271c53ab9db101b1c5fffdcb949baf9f00a897504f954a12cb4b4af26d8bb758c97a65b589c055f22e793198e8
7
- data.tar.gz: 224db269c7b2f86d463d8c91e2403d8662bd8c16f422ff90d950324191180c801521b477686b7f0771f53bda166765a042b6d53691e189f834acef46a00f5ead
6
+ metadata.gz: 941b67d25a355a18af7c7fc14b009d56ebb4aa004282984c3db06f542d35b4cdbd36772a60d3be3ff4567e7fbcace7a8b04782b78765dd6f4270632e60634062
7
+ data.tar.gz: 531f9780f79c4fa0b27b99b939776cf1b499bb97f9fb3de74ed89f6b33d9cd61622e1765b10edc0f6c2f0897e6c80f784262ba2a4b16dd1042df3924ead8cbf6
data/README.md CHANGED
@@ -71,9 +71,11 @@ Then drop in Chartkick into your `application.js` (or similar):
71
71
  Need to pass `current_user`?
72
72
 
73
73
  ```erbruby
74
- render_metric :users, user: current_user
74
+ render_metric :users, user: current_user, account: current_account
75
75
  ```
76
76
 
77
+ `user` and `account` will be `attr_reader`-ized.
78
+
77
79
  ### Value to calculate
78
80
 
79
81
  In your metric, define columns:
@@ -23,8 +23,7 @@ module Metricky
23
23
  deprecate_and_alias_method :period?, :trend?
24
24
 
25
25
  def valid_period?
26
- return true if Groupdate::PERIODS.include?(period.to_sym)
27
- raise NameError, "period must be one of #{Groupdate::PERIODS}. It is #{period}."
26
+ Groupdate::PERIODS.include?(period.to_sym)
28
27
  end
29
28
  deprecate_and_alias_method :valid_period?, :valid_trend?
30
29
  end
@@ -1,3 +1,3 @@
1
1
  module Metricky
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metricky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Brody