Skip to content

Commit

Permalink
fixed an issue with the GA4 Analytics migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorf committed Aug 7, 2023
1 parent f9176ce commit 98bb4f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/ncbo/goo.git
revision: fb203b0396d03c1df61abfcdbc4070787010f052
revision: a3a5f20a75482b4d9e5ffe31d66831855422867a
branch: develop
specs:
goo (0.0.2)
Expand Down Expand Up @@ -32,7 +32,7 @@ GEM
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ansi (1.5.0)
ast (2.4.2)
Expand Down Expand Up @@ -79,7 +79,7 @@ GEM
net-pop
net-smtp
method_source (1.0.0)
mime-types (3.4.1)
mime-types (3.5.0)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
Expand All @@ -101,7 +101,7 @@ GEM
net-smtp (0.3.3)
net-protocol
netrc (0.11.0)
oj (3.15.0)
oj (3.15.1)
omni_logger (0.1.4)
logger
parallel (1.23.0)
Expand All @@ -117,7 +117,7 @@ GEM
method_source (~> 1.0)
public_suffix (5.0.3)
racc (1.7.1)
rack (2.2.7)
rack (2.2.8)
rack-test (0.8.3)
rack (>= 1.0, < 3)
rainbow (3.1.1)
Expand All @@ -126,7 +126,7 @@ GEM
addressable (>= 2.2)
redis (5.0.6)
redis-client (>= 0.9.0)
redis-client (0.14.1)
redis-client (0.15.0)
connection_pool
regexp_parser (2.8.1)
rest-client (2.1.0)
Expand All @@ -138,7 +138,7 @@ GEM
rsolr (2.5.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
rubocop (1.55.0)
rubocop (1.55.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down Expand Up @@ -212,4 +212,4 @@ DEPENDENCIES
thin

BUNDLED WITH
2.4.17
2.3.15
6 changes: 3 additions & 3 deletions lib/ontologies_linked_data/models/ontology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,11 @@ def self.analytics(year=nil, month=nil, acronyms=nil)
unless analytics.empty?
analytics.delete_if { |acronym, _| !acronyms.include? acronym } unless acronyms.nil?
analytics.values.each do |ont_analytics|
ont_analytics.delete_if { |key, _| key != year } unless year.nil?
ont_analytics.each { |_, val| val.delete_if { |key, __| key != month } } unless month.nil?
ont_analytics.delete_if { |key, _| key != year.to_s } unless year.nil?
ont_analytics.each { |_, val| val.delete_if { |key, __| key != month.to_s } } unless month.nil?
end
# sort results by the highest traffic values
analytics = Hash[analytics.sort_by {|_, v| v[year][month]}.reverse] if year && month
analytics = Hash[analytics.sort_by {|_, v| v[year.to_s][month.to_s]}.reverse] if year && month
end
analytics
end
Expand Down

0 comments on commit 98bb4f7

Please sign in to comment.