solargraph-rails 0.2.2.pre.2 → 0.2.2.pre.3

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: 7550cc551e9ee58ed7e88b5cac988326729410700f4833735c63e25423def03e
4
- data.tar.gz: 50b16e19c7843b9e30956e68c14164763c130c1aceafb9c93fa25286c1f5d17c
3
+ metadata.gz: f2ceb38938b95c2d2772c9b863053613a30f91fb6bfdcf3a8373de01b8c95484
4
+ data.tar.gz: f385b1fd2a0839ba5f8fd9c5476b068c56ddcac510382cd453c3524ce6f50d82
5
5
  SHA512:
6
- metadata.gz: 9d90365c3d92aa903a50d5210f09d5bab8f0326bb29b42216cc8def98df66e6dfc14e31e93c44ab025d58ca8c320425e0590f21b02c9f0c95a09c47098aeca44
7
- data.tar.gz: 4e3ce253f78282b89c15eeb14b8ed2d7cd026bb12141fcefad04d5264321673b9a8b6af464913330f1f773ed11e96b91883bfef9a08df302290f8bc06fcb4dcc
6
+ metadata.gz: 11d1095b3e45568950dff2ed39272e282507f093e9021143b0108242b01d4ccd568ec3932f9fdb68f2b7aeea6c95f359fbdb464630238c01e7a92fbcf434fa1e
7
+ data.tar.gz: 420248dfa30f8da3e279a0e0f77fd48f6e1057ddaa5ab97aeaef96e76aa738cdb64ddb7ef3974594f4edf7cacce912820e0ec260286826808928527f73ab06be
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- solargraph-rails (0.2.2.pre.2)
4
+ solargraph-rails (0.2.2.pre.3)
5
5
  activesupport (~> 6.1.3)
6
- solargraph (~> 0.42.0)
6
+ solargraph (~> 0.42.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -15,7 +15,7 @@ GEM
15
15
  tzinfo (~> 2.0)
16
16
  zeitwerk (~> 2.3)
17
17
  ast (2.4.2)
18
- backport (1.1.2)
18
+ backport (1.2.0)
19
19
  benchmark (0.1.1)
20
20
  bundler-audit (0.8.0)
21
21
  bundler (>= 1.2.0, < 3)
@@ -59,7 +59,7 @@ GEM
59
59
  diff-lcs (>= 1.2.0, < 2.0)
60
60
  rspec-support (~> 3.10.0)
61
61
  rspec-support (3.10.0)
62
- rubocop (1.16.1)
62
+ rubocop (1.17.0)
63
63
  parallel (~> 1.10)
64
64
  parser (>= 3.0.0.0)
65
65
  rainbow (>= 2.2.2, < 4.0)
@@ -71,8 +71,8 @@ GEM
71
71
  rubocop-ast (1.7.0)
72
72
  parser (>= 3.0.1.1)
73
73
  ruby-progressbar (1.11.0)
74
- solargraph (0.42.1)
75
- backport (~> 1.1)
74
+ solargraph (0.42.3)
75
+ backport (~> 1.2)
76
76
  benchmark
77
77
  bundler (>= 1.17.2)
78
78
  diff-lcs (~> 1.4)
@@ -6,10 +6,18 @@ module MetaSource
6
6
  def match?(line)
7
7
  line =~ /belongs_to\s+:([a-z_]*)/
8
8
  @name = Regexp.last_match(1)
9
+
10
+ return unless @name
11
+
12
+ return @name unless line =~ /class_name:\s+["']([A-Za-z0-9]+)/
13
+
14
+ @type = Regexp.last_match(1)
15
+
16
+ @name
9
17
  end
10
18
 
11
19
  def type
12
- name&.camelize
20
+ @type || name&.camelize
13
21
  end
14
22
  end
15
23
  end
@@ -6,10 +6,18 @@ module MetaSource
6
6
  def match?(line)
7
7
  line =~ /has_and_belongs_to_many\s+:([a-z_]*)/
8
8
  @name = Regexp.last_match(1)
9
+
10
+ return unless @name
11
+
12
+ if line =~ /class_name:\s+["']([A-Za-z0-9]+)/
13
+ @type = Regexp.last_match(1)
14
+ end
15
+
16
+ @name
9
17
  end
10
18
 
11
19
  def type
12
- "Array<#{name.singularize.camelize}>"
20
+ "ActiveRecord::Associations::CollectionProxy<#{@type || name.singularize.camelize}>"
13
21
  end
14
22
  end
15
23
  end
@@ -6,10 +6,18 @@ module MetaSource
6
6
  def match?(line)
7
7
  line =~ /has_many\s+:([a-z_]*)/
8
8
  @name = Regexp.last_match(1)
9
+
10
+ return unless @name
11
+
12
+ if line =~ /class_name:\s+["']([A-Za-z0-9]+)/
13
+ @type = Regexp.last_match(1)
14
+ end
15
+
16
+ @name
9
17
  end
10
18
 
11
19
  def type
12
- "Array<#{name.singularize.camelize}>"
20
+ "ActiveRecord::Associations::CollectionProxy<#{@type || name.singularize.camelize}>"
13
21
  end
14
22
  end
15
23
  end
@@ -6,10 +6,18 @@ module MetaSource
6
6
  def match?(line)
7
7
  line =~ /has_one\s+:([a-z_]*)/
8
8
  @name = Regexp.last_match(1)
9
+
10
+ return unless @name
11
+
12
+ if line =~ /class_name:\s+["']([A-Za-z0-9]+)/
13
+ @type = Regexp.last_match(1)
14
+ end
15
+
16
+ @name
9
17
  end
10
18
 
11
19
  def type
12
- name.camelize
20
+ @type || name.camelize
13
21
  end
14
22
  end
15
23
  end
@@ -1,5 +1,5 @@
1
1
  module Solargraph
2
2
  module Rails
3
- VERSION = '0.2.2.pre.2'
3
+ VERSION = '0.2.2.pre.3'
4
4
  end
5
5
  end
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "rake", "~> 12.3.3"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
 
28
- spec.add_runtime_dependency "solargraph", "~> 0.42.0"
28
+ spec.add_runtime_dependency "solargraph", "~> 0.42.1"
29
29
  spec.add_runtime_dependency "activesupport", "~> 6.1.3"
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solargraph-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2.pre.2
4
+ version: 0.2.2.pre.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fritz Meissner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-11 00:00:00.000000000 Z
11
+ date: 2021-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.42.0
61
+ version: 0.42.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.42.0
68
+ version: 0.42.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: activesupport
71
71
  requirement: !ruby/object:Gem::Requirement