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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7993b3163ca44d4a0bc01d33b6dec3c3e2771df5
4
- data.tar.gz: b43985e86662c7249a38fea23221a9d74d9da98f
2
+ SHA256:
3
+ metadata.gz: f52316880844e7e4390cbc3197c904b46ac435c2a787fc2a87c2d5e1306b071d
4
+ data.tar.gz: de237aff1bd921cbf352f922c1d93d635f228401dde4494ef98bdd5645778d3e
5
5
  SHA512:
6
- metadata.gz: 760912037953c8ade81346556ccf1aa02df22aa3944add396e821b6eb79db70701916301e47499219b66cfaffe3df23a02ee7c72ad47762ff34b9c9204ef0fb3
7
- data.tar.gz: 1004587b536ed6580ca4fc090874c057e0f9e4735db8022ef748421b42dd1a0a8f0100745cc549c5b7964e92353cd072f16fb3ccd0161fcf6b488409828f2df9
6
+ metadata.gz: 80387a5eb82e7385e76abb6a40a44c2ce077fe4889581a48191da4c28b7a0126c2d100c102c99207decf0eea990ee13b553c004205af0d654b2a429741e1195c
7
+ data.tar.gz: ac0b15b63a61aa8299bd21896863164c78b8cd21792e6f29c74f1a930c34994302ce8acfb46d3c08398c2bf422c71aaa2bac7a690fb13f5801bef6b245aa2089
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.0
3
+ - 2.3.8
4
+ - 2.4.5
5
+ - 2.5.3
6
+ - 2.6.0
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
- ActiveRecord::SchemaDumper.send(:new, connection)
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)
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Annotate
3
- VERSION = '0.4.3'
3
+ VERSION = '0.4.4'
4
4
  end
5
5
  end
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.3
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-07-14 00:00:00.000000000 Z
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
- rubyforge_project:
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