active_record-annotate 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +4 -3
- data/README.md +1 -0
- data/lib/active_record/annotate/dumper.rb +8 -4
- data/lib/active_record/annotate/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f52316880844e7e4390cbc3197c904b46ac435c2a787fc2a87c2d5e1306b071d
|
4
|
+
data.tar.gz: de237aff1bd921cbf352f922c1d93d635f228401dde4494ef98bdd5645778d3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80387a5eb82e7385e76abb6a40a44c2ce077fe4889581a48191da4c28b7a0126c2d100c102c99207decf0eea990ee13b553c004205af0d654b2a429741e1195c
|
7
|
+
data.tar.gz: ac0b15b63a61aa8299bd21896863164c78b8cd21792e6f29c74f1a930c34994302ce8acfb46d3c08398c2bf422c71aaa2bac7a690fb13f5801bef6b245aa2089
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -67,6 +67,7 @@ It creates an initializer at `config/initializers/annotate.rb` which contains de
|
|
67
67
|
* 0.4.1 Several models per table fix
|
68
68
|
* 0.4.2 Initializer fix
|
69
69
|
* 0.4.3 Support for `frozen_string_literal` & `warn_indent` magic comments
|
70
|
+
* 0.4.4 Rails 5.2 support
|
70
71
|
|
71
72
|
## Roadmap
|
72
73
|
|
@@ -2,11 +2,11 @@ module ActiveRecord
|
|
2
2
|
module Annotate
|
3
3
|
module Dumper
|
4
4
|
class << self
|
5
|
-
def dump(table_name, connection = ActiveRecord::Base.connection)
|
5
|
+
def dump(table_name, connection = ActiveRecord::Base.connection, config = ActiveRecord::Base)
|
6
6
|
string_io = StringIO.new
|
7
7
|
|
8
8
|
if connection.table_exists?(table_name)
|
9
|
-
dumper(connection).send(:table, table_name, string_io)
|
9
|
+
dumper(connection, config).send(:table, table_name, string_io)
|
10
10
|
else
|
11
11
|
string_io.write(" # can't find table `#{table_name}`")
|
12
12
|
end
|
@@ -15,8 +15,12 @@ module ActiveRecord
|
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
|
-
def dumper(connection)
|
19
|
-
|
18
|
+
def dumper(connection, config)
|
19
|
+
if connection.respond_to?(:create_schema_dumper)
|
20
|
+
connection.create_schema_dumper(ActiveRecord::SchemaDumper.send(:generate_options, config))
|
21
|
+
else
|
22
|
+
ActiveRecord::SchemaDumper.send(:new, connection)
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
def process_annotation(string_io)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record-annotate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vsevolod Romashov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -171,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
|
-
|
175
|
-
rubygems_version: 2.6.13
|
174
|
+
rubygems_version: 3.0.1
|
176
175
|
signing_key:
|
177
176
|
specification_version: 4
|
178
177
|
summary: ActiveRecord models annotator based on rails' schema dumper
|