ahoy_analytics 0.1.3 → 0.1.5

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
  SHA256:
3
- metadata.gz: f3de3cf5b3ced668bff31f0503ea95fa016ca2c438ed0c0b3e379a0d9b3d313d
4
- data.tar.gz: 76727084862a65cdd8774e015f7b54b33109f674371928d96f8839caf5542060
3
+ metadata.gz: '09109fd897e9b2b406e537ccaf8ba147367b4e5e18efe9491f6290552e596449'
4
+ data.tar.gz: 6ca734741d9981486ddefd677a1d1023231217a3a4146d6eb4ef8cde479fa1de
5
5
  SHA512:
6
- metadata.gz: 0512b54321f3aae9b49ba2d3152de5d71cb6e6ef8b5dac8878c10e61791724e927741d5dab6ce8f3ca4bc3bfc77396d9cda58d1452aaca460a79c222e794096a
7
- data.tar.gz: '03673029a0cb9bb7c90aa9b3c763575b9120d66efdf35d69a8116b17e34b90998831fe94dfa0b172036a2edd80ba97b99e8a030b158e81c31030f75d06b208cf'
6
+ metadata.gz: '026928617bddb7990eaf6b9c741d664cb86c0dc2bb7a7d6e62351d873d64db56bfb25a02155a560dfaa8be70fc400aeb4c120e7f4aeb8f4bb0ea1e642e42fc1b'
7
+ data.tar.gz: 333f6054393b61c029b04fc1692b16b158a354369f5dafb2a768806ea62cb2e15580d75db21621263c3bc11a6b061aa92491dede8730a6abb82335100c155e1d
@@ -32,7 +32,7 @@ module Ahoy::Visit::Locations
32
32
  items = paged_names.map do |code|
33
33
  code_str = code.to_s
34
34
  name = if code_str.present? && code_str != "(unknown)"
35
- c = ISO3166::Country.new(code_str.upcase)
35
+ c = ::ISO3166::Country.new(code_str.upcase)
36
36
  c ? short_country_name(c) : code_str
37
37
  else
38
38
  "(unknown)"
@@ -56,7 +56,7 @@ module Ahoy::Visit::Locations
56
56
  v = counts[code]
57
57
  code_str = code.to_s
58
58
  name = if code_str.present? && code_str != "(unknown)"
59
- c = ISO3166::Country.new(code_str.upcase)
59
+ c = ::ISO3166::Country.new(code_str.upcase)
60
60
  c ? short_country_name(c) : code_str
61
61
  else
62
62
  "(unknown)"
@@ -70,7 +70,7 @@ module Ahoy::Visit::Locations
70
70
  items = counts.map do |code, v|
71
71
  code_str = code.to_s
72
72
  if code_str.present?
73
- c = ISO3166::Country.new(code_str.upcase)
73
+ c = ::ISO3166::Country.new(code_str.upcase)
74
74
  if c
75
75
  { name: short_country_name(c), code: c.alpha2, visitors: v }
76
76
  else
@@ -211,7 +211,7 @@ module Ahoy::Visit::Locations
211
211
  .filter_map do |(code, visitors)|
212
212
  next if code.blank?
213
213
  normalized = code.to_s.upcase
214
- country = ISO3166::Country.new(normalized)
214
+ country = ::ISO3166::Country.new(normalized)
215
215
  next unless country
216
216
  { alpha3: country.alpha3, alpha2: country.alpha2, numeric: country.number, code: normalized, name: short_country_name(country), visitors: visitors }
217
217
  end
@@ -251,12 +251,12 @@ module Ahoy::Visit::Locations
251
251
  end
252
252
 
253
253
  def alpha3_for(code)
254
- country = ISO3166::Country.new(code)
254
+ country = ::ISO3166::Country.new(code)
255
255
  country&.alpha3 || code
256
256
  end
257
257
 
258
258
  def country_name_for(code)
259
- country = ISO3166::Country.new(code)
259
+ country = ::ISO3166::Country.new(code)
260
260
  country ? short_country_name(country) : code
261
261
  end
262
262
 
@@ -1,3 +1,3 @@
1
1
  module AhoyAnalytics
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  require "ahoy_analytics/version"
2
2
  require "ahoy"
3
3
  require "inertia_rails"
4
+ require "countries"
4
5
  require "ahoy_analytics/device_bucket"
5
6
  require "ahoy_analytics/asset_manifest"
6
7
  require "ahoy_analytics/maxmind_geo"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Ho