hubrise_initializer 1.0.4 → 1.0.6

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: 45fb130be84b2efa48bb2f12d55dd7cb6b8317024a499ef235d3147e5369ebd2
4
- data.tar.gz: 2c10bf4fad684afbfd4ea1e46df5ede030d1280e815fa44f03a45fa73af67d92
3
+ metadata.gz: e164109cf0488dcc05d61b2ae44ae497291e1bf804e3e929f9cb7e996bbe4199
4
+ data.tar.gz: d57974cc92c7c0747db8ae2b2c3db9235cdd25fac8a6054152092e04feb66d2c
5
5
  SHA512:
6
- metadata.gz: 4ee262e8887201121d64dd34311aae1ab827fe57c99c4fc6d881ed9130d969f982fdaafbc9e9329aeca0b69d3802fcd955381cc67011f7ac1fa458346aad7cd4
7
- data.tar.gz: e5d7f33383067d08b404e013b98ca3eb588a942e0eb57a8fd92b5d6e7db919e4fe1c679fa1df55b1c6fbc4012f5ced4fd9ea76549e82487f958c8bbc3960d1a5
6
+ metadata.gz: a0a9800de0dfa9dc5091664eae69f31519ceadbf3b0d28991f9fdba4a6f2e62864cb4e21fcdb6bcf071c2d7131d890617cec3fbadfd229af40fbaa3fd4cac0c9
7
+ data.tar.gz: 329472573bf26b2de9d06757989e87f19ff2c788221bd4bd426833033ef6aa0f57982b79da16d9d43f161b015d78b488de90afe15f0b73ada16a8754c1a03bf8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubrise_initializer (1.0.4)
4
+ hubrise_initializer (1.0.6)
5
5
  act-fluent-logger-rails (~> 0.6)
6
6
  lograge (~> 0.11)
7
7
  lograge-sql
@@ -110,7 +110,7 @@ GEM
110
110
  mini_mime (1.1.2)
111
111
  mini_portile2 (2.8.0)
112
112
  minitest (5.16.2)
113
- msgpack (1.5.3)
113
+ msgpack (1.6.0)
114
114
  nio4r (2.5.8)
115
115
  nokogiri (1.13.7)
116
116
  mini_portile2 (~> 2.8.0)
data/README.md CHANGED
@@ -47,7 +47,7 @@ To upload the latest version to RubyGems.org:
47
47
  2. Tag the repository:
48
48
  ```bash
49
49
  bundle install
50
- VERSION=1.0.4
50
+ VERSION=1.0.5
51
51
  git add Gemfile.lock
52
52
  git add lib/hubrise_initializer/version.rb
53
53
  git commit -m "Version $VERSION"
@@ -41,10 +41,12 @@ class HubriseInitializer
41
41
  def switch_to_utf8(s)
42
42
  return unless s
43
43
 
44
- return s if s.encoding == Encoding::UTF_8
45
-
46
- s_utf_8 = s.dup.force_encoding(Encoding::UTF_8)
47
- return s_utf_8 if s_utf_8.valid_encoding?
44
+ if s.encoding == Encoding::UTF_8
45
+ return s if s.valid_encoding?
46
+ else
47
+ s_utf_8 = s.dup.force_encoding(Encoding::UTF_8)
48
+ return s_utf_8 if s_utf_8.valid_encoding?
49
+ end
48
50
 
49
51
  # Fallback for binary data
50
52
  "Binary (#{s.size} bytes)"
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  class HubriseInitializer
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.6"
4
4
  end
@@ -65,7 +65,7 @@ class HubriseInitializer
65
65
  end
66
66
 
67
67
  def configure_active_job_logger
68
- Rails.application.configure do
68
+ Rails.application.initializer("hubrise_initializer.active_job.logger", after: "active_job.logger") do
69
69
  ActiveJob::Base.logger = case ENV["RAILS_LOGGER"]
70
70
  when "stdout", "fluentd"
71
71
  # Do not send ActiveJobs logs to fluentd as this would create new Elasticsearch entries detached from the
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubrise_initializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Monnier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-20 00:00:00.000000000 Z
11
+ date: 2022-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lograge
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.1.2
105
+ rubygems_version: 3.3.5
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Rails app initializers optimized for HubRise