rails_local_analytics 0.2.3 → 0.2.4

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: f0a0bf463e77ac16f76c751e5664ae847146c8e2e7b2fbbef76093512d966af1
4
- data.tar.gz: d5c9028dcf9cc3307bb39441f107a0a07afa8f115c013b0edc9512d9ccc0d7e8
3
+ metadata.gz: beaf062a7a9dbc3b7f1719e7a271614f634fde67672a245346412eb4d1a78bdd
4
+ data.tar.gz: c794bcccb049f4ced030c232056687967c7aabe278886cff198b71933dcd5c85
5
5
  SHA512:
6
- metadata.gz: faa7bf7a4c0ee569aae5873e93358cea48ff0060b9caf14c9b7516390a71698bd42b2308233b87438fce0d85d3804990ee0254bb66090024394caf674c5e0f79
7
- data.tar.gz: 71662ed4b26b97d416d9dd8341ccc3576f0e6725af6ece920adef1727fd276871cac65023d8d5d2279d734ce3ee6a6d2f32c0e2c7f75b92856d157d4fe2c8112
6
+ metadata.gz: 52a06c2a88d8f3f603e693f19ed6edcc0c5d8d27d0d5ba04dd8b438ad5c40f71d7dfe00fb0dcb138f0ee57a0f63885dfa7b7c51509fd6ef605bbb8a2fe57361e
7
+ data.tar.gz: 074f789a04d5c0f58d52c404362c9169f77ed5da367af4094001a571d8396927b4f8a59913223ce039f3179ab984f793d39699db27aea1d899e08f68a40f099f
data/README.md CHANGED
@@ -73,7 +73,7 @@ class CreateAnalyticsTables < ActiveRecord::Migration[6.0]
73
73
  end
74
74
  end
75
75
  ```
76
- The reason we store our anayltics in two separate tables to keep the cardinality of our data low. You may use only a single table but I recommend you try the 2 table approach first and see if it meets your needs. See the performance optimization section for more details.
76
+ The reason we store our analytics in two separate tables to keep the cardinality of our data low. You are permitted to store everything in only one table but I recommend you try the 2 table approach first and see if it meets your needs. See the performance optimization section for more details.
77
77
 
78
78
  Add the route for the analytics dashboard at the desired endpoint:
79
79
 
@@ -1,3 +1,3 @@
1
1
  module RailsLocalAnalytics
2
- VERSION = "0.2.3".freeze
2
+ VERSION = "0.2.4".freeze
3
3
  end
@@ -29,7 +29,7 @@ module RailsLocalAnalytics
29
29
  json_str = JSON.generate(json_hash) # convert to json string so that its compatible with all job backends
30
30
  RecordRequestJob.perform_later(json_str)
31
31
  else
32
- RecordRequestJob.new.perform(json_hash)
32
+ RecordRequestJob.new.perform(json_hash.deep_stringify_keys)
33
33
  end
34
34
  end
35
35
 
@@ -44,12 +44,19 @@ module RailsLocalAnalytics
44
44
  end
45
45
 
46
46
  class Config
47
- @@background_jobs = true
47
+ DEFAULTS = {
48
+ background_jobs: true,
49
+ }.freeze
50
+
48
51
  mattr_reader :background_jobs
49
52
 
50
53
  def self.background_jobs=(val)
51
54
  @@background_jobs = !!val
52
55
  end
56
+
57
+ DEFAULTS.each do |k,v|
58
+ self.send("#{k}=", v)
59
+ end
53
60
  end
54
61
 
55
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_local_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weston Ganger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-17 00:00:00.000000000 Z
11
+ date: 2024-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails