activerecord-health 0.2.0 → 0.2.1

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: c72d2a420a64a52fd3cf223bafb4e84e4dab50b5fa807b512a322a8dc909f62d
4
- data.tar.gz: 98962aa4a2527386c888791d9b123967a004175305f985068e475b4f8557e653
3
+ metadata.gz: c6c687a09ea6b1b5eba31b753d142fa31e2c058c8093c87f01128ee0feda6196
4
+ data.tar.gz: 7c8a6ce6ac321b6f2dd552c1a30680ef2327b5739306282be0a7bb054c5425ec
5
5
  SHA512:
6
- metadata.gz: c816d187880de866ee3e48fd972ea3b80543bfeba86d4a16466279a0bb45ae776f976f16f7d39dbdb68dd422f1f3fe0d92b8bf4ba2269e6c462ce6a85337b3c3
7
- data.tar.gz: 291b81fb5116df82c6b310d17e7077701648e16b9eacf24cd57447f60bda87e8e0483d13b4cc3b92ba772d878566bf11a098a2a32e4bb80a84e5a357139c596c
6
+ metadata.gz: c592cfb07a93c8ef028d22bffd880537a51ede3b7362ba17e5a1d9bed56cbec03e806caebfbec39107408b8c7921fd6e364b8dc5aab0ebf62925e4e9533f79fc
7
+ data.tar.gz: 77a6e47554826b7127a07a070d67e5d3259dd92360a98160c922efa8ed9dd4ed57b02649e3a892fb67aeb1eeceaf9a731cb0e8c60d073d800bdd207af2c7c404
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Bug Fixes
6
+
7
+ - Fix file permissions causing LoadError in Docker containers (#6)
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Bug Fixes
data/Rakefile CHANGED
@@ -22,4 +22,26 @@ Rake::TestTask.new(:test_all) do |t|
22
22
  t.test_files = FileList["test/**/*_test.rb"]
23
23
  end
24
24
 
25
- task default: %i[test standard]
25
+ task :check_permissions do
26
+ spec = Gem::Specification.load("activerecord-health.gemspec")
27
+ files = spec.files.select { |path| File.file?(path) }
28
+
29
+ unreadable = files.filter_map do |path|
30
+ mode = File.stat(path).mode & 0o777
31
+ next if (mode & 0o004) != 0
32
+
33
+ "#{path} (#{format("%o", mode)})"
34
+ end
35
+
36
+ if unreadable.any?
37
+ warn "Non-world-readable files detected:"
38
+ unreadable.sort.each { |entry| warn " - #{entry}" }
39
+ abort "Fix permissions (chmod o+r) before release."
40
+ end
41
+ end
42
+
43
+ task default: %i[test standard check_permissions]
44
+
45
+ if Rake::Task.task_defined?("release")
46
+ Rake::Task["release"].enhance(%i[default])
47
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Activerecord
4
4
  module Health
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -93,7 +93,7 @@ module ActiveRecord
93
93
  def adapter_class_for(connection)
94
94
  case connection.adapter_name.downcase
95
95
  when /postgresql/ then Adapters::PostgreSQLAdapter
96
- when /mysql/ then Adapters::MySQLAdapter
96
+ when /mysql/, /trilogy/ then Adapters::MySQLAdapter
97
97
  else raise "Unsupported database adapter: #{connection.adapter_name}"
98
98
  end
99
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-health
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Berkopec
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.6.9
101
+ rubygems_version: 4.0.3
102
102
  specification_version: 4
103
103
  summary: Database health monitoring for ActiveRecord with automatic load shedding
104
104
  test_files: []