orthoses-rails 1.4.0 → 1.5.0

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: a9a2d180cb8faa295dc3043ea66a379ee71939436075104c0f85b63d6aede665
4
- data.tar.gz: e02fa19ea12dfd296936673d67ecc6457b0e16101c18d4851747e0b895dace96
3
+ metadata.gz: 5819282d03a6e3fe410434be4dac07eed3fff60677d013c37ce268c7a259e9fa
4
+ data.tar.gz: c8a9a445d6e629057b1db47ad08b5472cb4456bc8454071c9ef711e0d10ef100
5
5
  SHA512:
6
- metadata.gz: 9e97ed8964e301618db94df7c0d410310ea3bd9605f66c9d7d0431dc71546e0faaff24f918ce05a58510250f7563934a9adb3977662d3526db0198016801ba77
7
- data.tar.gz: 5d43746f2bcb1ae068902a66a0da54a852bb173fcdd85ff5d9ce0f07e2051cbbc31e7b1a2c8e0469b28e2ca6ca1661edb76a1665e6d7a3356c6bedb9de97cf00
6
+ metadata.gz: dd864af949021445b9780e5d95282447e391b0099b90121ece4d58278944ab06264dfeaa25134801386f6e1c7629053d32c6b346d3acde0e1946a004bd3b0c6d
7
+ data.tar.gz: 72bcdf7904a00596006d405edadbd2fd9d4fe8d1f3c7d6bb8c2929600fff6f1b996ed574a69f1666de504fb27393af0afa2dbd98a055f4dc984d2d8c66024283
@@ -22,7 +22,7 @@ namespace :orthoses do
22
22
  # By using this middleware, you can add the capability
23
23
  # to generate type information from YARD documentation.
24
24
  # use Orthoses::YARD,
25
- # parse: ['{app/lib}/**/*.rb']
25
+ # parse: ['{app,lib}/**/*.rb']
26
26
 
27
27
  # You can load hand written RBS.
28
28
  # use Orthoses::LoadRBS,
@@ -47,9 +47,9 @@ module Orthoses
47
47
  when :key
48
48
  res << "?#{name}: untyped"
49
49
  when :rest
50
- res << "*untyped #{name}"
50
+ res << "*untyped"
51
51
  when :keyrest
52
- res << "**untyped #{name}"
52
+ res << "**untyped"
53
53
  when :block
54
54
  block = " { (*untyped) -> untyped }"
55
55
  else
@@ -28,12 +28,26 @@ module Orthoses
28
28
  -
29
29
  ])
30
30
 
31
- TIME_MODULES = [
31
+ TIME_MODULES = Set.new([
32
32
  TypeName("::Time"),
33
33
  TypeName("::DateAndTime::Zones"),
34
34
  TypeName("::DateAndTime::Calculations"),
35
35
  TypeName("::DateAndTime::Compatibility")
36
- ]
36
+ ])
37
+
38
+ NONEED_METHODS = Set.new(%i[
39
+ freeze
40
+ hash
41
+ eql?
42
+ method_missing
43
+ respond_to?
44
+ respond_to_missing?
45
+ is_a?
46
+ marshal_dump
47
+ marshal_load
48
+ to_json
49
+ < > <= >=
50
+ ])
37
51
 
38
52
  def filter_decl(time_with_zone_store)
39
53
  writer = RBS::Writer.new(out: StringIO.new)
@@ -68,7 +82,7 @@ module Orthoses
68
82
  builder = RBS::DefinitionBuilder.new(env: env.resolve_type_names)
69
83
  twz_methods = builder.build_instance(type_name_time_with_zone).methods
70
84
  builder.build_instance(type_name_time).methods.each do |sym, definition_method|
71
- next if twz_methods.has_key?(sym) && !TYPE_MERGE_METHODS.include?(sym)
85
+ next if NONEED_METHODS.include?(sym)
72
86
  next if !definition_method.public?
73
87
 
74
88
  # delegate to ::Time method
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Orthoses
4
4
  module Rails
5
- VERSION = "1.4.0"
5
+ VERSION = "1.5.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthoses-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-05 00:00:00.000000000 Z
11
+ date: 2024-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orthoses
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.4.10
94
+ rubygems_version: 3.5.3
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Orthoses middleware collection for Ruby on Rails