alphabetical_schema 0.1.2 → 0.1.3
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 +4 -4
- data/.gitignore +1 -0
- data/Appraisals +4 -0
- data/README.md +5 -0
- data/alphabetical_schema.gemspec +1 -1
- data/gemfiles/rails_8.1.gemfile +9 -0
- data/lib/alphabetical_schema/version.rb +1 -1
- data/lib/alphabetical_schema.rb +14 -2
- metadata +6 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 230ee01f85d039a45a4f30aebd5dbee72fbdbe4d5edb44992afffaf6cfcab31c
|
|
4
|
+
data.tar.gz: 27d504b81e17bc82643a96accb50c57117a24efde7d47c65c4e65f695db72647
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a9c03008e8d3fd7a304819e396b8b7ac7557608b82bd52b8c2d4d987881ee4f35d365518164748c086be303028627a9cb0d939bada26a021e9ef8a025814c9e
|
|
7
|
+
data.tar.gz: 8c5612ce8c9d92a26b65752f8a485f699d455af3443d4cc6e2aeda2531d445eae9addc0e6d64e61daf50b96a0620b1655a63f3acdd80189b7390bd7522306f12
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
data/README.md
CHANGED
|
@@ -16,6 +16,11 @@ Run `rake db:migrate`.
|
|
|
16
16
|
|
|
17
17
|
## Changelog
|
|
18
18
|
|
|
19
|
+
### 0.1.3 (2026-10-06)
|
|
20
|
+
|
|
21
|
+
* Relax rails dependency to allow rails 8.1
|
|
22
|
+
* Support the batched column lookup of upcoming rails versions
|
|
23
|
+
|
|
19
24
|
### 0.1.2 (2025-03-17)
|
|
20
25
|
|
|
21
26
|
* Relax rails dependency to allow rails 8
|
data/alphabetical_schema.gemspec
CHANGED
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
25
25
|
spec.require_paths = ["lib"]
|
|
26
26
|
|
|
27
|
-
spec.add_dependency "rails", "< 8.
|
|
27
|
+
spec.add_dependency "rails", "< 8.2"
|
|
28
28
|
|
|
29
29
|
spec.add_development_dependency "appraisal"
|
|
30
30
|
spec.add_development_dependency "combustion", "~> 1.3"
|
data/lib/alphabetical_schema.rb
CHANGED
|
@@ -5,9 +5,21 @@ require "delegate"
|
|
|
5
5
|
|
|
6
6
|
module AlphabeticalSchema
|
|
7
7
|
class SortedConnection < SimpleDelegator
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
# Rails < 8.2 reads the columns of one table at a time. Later versions pass
|
|
9
|
+
# all table names at once and receive a hash of columns by table name.
|
|
10
|
+
def columns(table_names)
|
|
11
|
+
columns = super
|
|
12
|
+
if columns.is_a?(Hash)
|
|
13
|
+
columns.transform_values { |table_columns| sort(table_columns) }
|
|
14
|
+
else
|
|
15
|
+
sort(columns)
|
|
16
|
+
end
|
|
10
17
|
end
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
def sort(columns)
|
|
21
|
+
columns.sort_by(&:name)
|
|
22
|
+
end
|
|
11
23
|
end
|
|
12
24
|
|
|
13
25
|
module SchemaDumperPatch
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alphabetical_schema
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fabian Schwahn
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rails
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "<"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '8.
|
|
18
|
+
version: '8.2'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - "<"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '8.
|
|
25
|
+
version: '8.2'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: appraisal
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -66,7 +65,6 @@ dependencies:
|
|
|
66
65
|
- - ">="
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
67
|
version: '0'
|
|
69
|
-
description:
|
|
70
68
|
email:
|
|
71
69
|
- fabian.schwahn@gmail.com
|
|
72
70
|
executables: []
|
|
@@ -85,6 +83,7 @@ files:
|
|
|
85
83
|
- gemfiles/rails_7.1.gemfile
|
|
86
84
|
- gemfiles/rails_7.2.gemfile
|
|
87
85
|
- gemfiles/rails_8.0.gemfile
|
|
86
|
+
- gemfiles/rails_8.1.gemfile
|
|
88
87
|
- lib/alphabetical_schema.rb
|
|
89
88
|
- lib/alphabetical_schema/version.rb
|
|
90
89
|
homepage: https://github.com/denkungsart/alphabetical_schema
|
|
@@ -92,7 +91,6 @@ licenses:
|
|
|
92
91
|
- MIT
|
|
93
92
|
metadata:
|
|
94
93
|
homepage_uri: https://github.com/denkungsart/alphabetical_schema
|
|
95
|
-
post_install_message:
|
|
96
94
|
rdoc_options: []
|
|
97
95
|
require_paths:
|
|
98
96
|
- lib
|
|
@@ -107,8 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
105
|
- !ruby/object:Gem::Version
|
|
108
106
|
version: '0'
|
|
109
107
|
requirements: []
|
|
110
|
-
rubygems_version: 3.
|
|
111
|
-
signing_key:
|
|
108
|
+
rubygems_version: 3.6.9
|
|
112
109
|
specification_version: 4
|
|
113
110
|
summary: Sort schema.rb alphabetically to prevent conflicts
|
|
114
111
|
test_files: []
|