rbs_active_hash 1.4.1 → 1.6.0
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/.rubocop.yml +15 -1
- data/.vscode/settings.json +17 -3
- data/Gemfile +5 -2
- data/Gemfile.lock +157 -99
- data/Steepfile +1 -0
- data/lib/generators/rbs_active_hash/install_generator.rb +1 -1
- data/lib/rbs_active_hash/active_hash/parser.rb +21 -10
- data/lib/rbs_active_hash/active_hash.rb +42 -29
- data/lib/rbs_active_hash/rake_task.rb +10 -7
- data/lib/rbs_active_hash/version.rb +1 -1
- data/rbs_collection.lock.yaml +134 -36
- data/sig/generators/rbs_active_hash/install_generator.rbs +2 -0
- data/sig/rbs_active_hash/active_hash/parser.rbs +23 -4
- data/sig/rbs_active_hash/active_hash.rbs +39 -6
- data/sig/rbs_active_hash/rake_task.rbs +8 -3
- data/sig/rbs_active_hash/version.rbs +5 -0
- data/sig/rbs_active_hash.rbs +2 -2
- metadata +9 -9
- data/rbs_active_hash.gemspec +0 -35
- data/sig/shims/rake.rbs +0 -19
|
@@ -1,35 +1,68 @@
|
|
|
1
|
+
# Generated from lib/rbs_active_hash/active_hash.rb with RBS::Inline
|
|
2
|
+
|
|
1
3
|
module RbsActiveHash
|
|
2
4
|
module ActiveHash
|
|
5
|
+
# @rbs klass: singleton(ActiveHash::Base)
|
|
3
6
|
def self.user_defined_model?: (singleton(ActiveHash::Base) klass) -> bool
|
|
7
|
+
|
|
8
|
+
# @rbs klass: singleton(ActiveHash::Base) -> String
|
|
4
9
|
def self.class_to_rbs: (singleton(ActiveHash::Base) klass) -> String
|
|
5
10
|
|
|
6
11
|
class Generator
|
|
7
12
|
attr_reader klass: singleton(ActiveHash::Base)
|
|
13
|
+
|
|
8
14
|
attr_reader klass_name: String
|
|
15
|
+
|
|
9
16
|
attr_reader parser: ActiveHash::Parser::Parser
|
|
10
17
|
|
|
18
|
+
# @rbs klass: singleton(ActiveHash::Base)
|
|
11
19
|
def initialize: (singleton(ActiveHash::Base) klass) -> void
|
|
20
|
+
|
|
12
21
|
def generate: () -> String
|
|
13
22
|
|
|
14
23
|
private
|
|
15
24
|
|
|
16
|
-
|
|
25
|
+
# @rbs rbs: String
|
|
26
|
+
def format: (String rbs) -> String
|
|
27
|
+
|
|
17
28
|
def klass_decl: () -> String
|
|
29
|
+
|
|
18
30
|
def header: () -> String
|
|
31
|
+
|
|
32
|
+
def module_names: () -> String
|
|
33
|
+
|
|
19
34
|
def enum_decls: () -> String?
|
|
35
|
+
|
|
20
36
|
def constants: () -> Array[String]
|
|
37
|
+
|
|
21
38
|
def scope_decls: () -> String?
|
|
39
|
+
|
|
22
40
|
def association_decls: () -> String?
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def
|
|
41
|
+
|
|
42
|
+
# @rbs definitions: Array[[Symbol, Hash[untyped, untyped]]]
|
|
43
|
+
def has_many_decls: (Array[[ Symbol, Hash[untyped, untyped] ]] definitions) -> String
|
|
44
|
+
|
|
45
|
+
# @rbs definitions: Array[[Symbol, Hash[untyped, untyped]]]
|
|
46
|
+
def has_one_decls: (Array[[ Symbol, Hash[untyped, untyped] ]] definitions) -> String
|
|
47
|
+
|
|
48
|
+
# @rbs definitions: Array[[Symbol, Hash[untyped, untyped]]]
|
|
49
|
+
def belongs_to_decls: (Array[[ Symbol, Hash[untyped, untyped] ]] definitions) -> String
|
|
50
|
+
|
|
26
51
|
def method_decls: () -> String
|
|
52
|
+
|
|
27
53
|
def method_names: () -> Array[Symbol]
|
|
54
|
+
|
|
28
55
|
def method_types: () -> Hash[Symbol, untyped]
|
|
29
|
-
|
|
56
|
+
|
|
57
|
+
# @rbs name: String | Symbol
|
|
58
|
+
def valid_field_name?: (String | Symbol name) -> boolish
|
|
59
|
+
|
|
30
60
|
def footer: () -> String
|
|
31
61
|
|
|
32
|
-
|
|
62
|
+
# @rbs obj: untyped
|
|
63
|
+
def identify_class: (untyped obj) -> (String | singleton(Class))
|
|
64
|
+
|
|
65
|
+
# @rbs type: untyped
|
|
33
66
|
def stringify_type: (untyped type) -> String
|
|
34
67
|
end
|
|
35
68
|
end
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
# Generated from lib/rbs_active_hash/rake_task.rb with RBS::Inline
|
|
2
|
+
|
|
1
3
|
module RbsActiveHash
|
|
2
4
|
class RakeTask < Rake::TaskLib
|
|
3
5
|
attr_accessor name: Symbol
|
|
4
|
-
attr_accessor signature_root_dir: Pathname
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
@signature_root_dir: Pathname
|
|
7
|
+
attr_accessor signature_root_dir: Pathname
|
|
8
8
|
|
|
9
|
+
# @rbs name: Symbol
|
|
10
|
+
# @rbs &block: (RakeTask) -> void
|
|
9
11
|
def initialize: (?Symbol name) { (RakeTask) -> void } -> void
|
|
12
|
+
|
|
10
13
|
def define_setup_task: () -> void
|
|
14
|
+
|
|
11
15
|
def define_clean_task: () -> void
|
|
16
|
+
|
|
12
17
|
def define_generate_task: () -> void
|
|
13
18
|
|
|
14
19
|
private
|
data/sig/rbs_active_hash.rbs
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbs_active_hash
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takeshi KOMIYA
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-10-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_hash
|
|
@@ -61,7 +61,6 @@ files:
|
|
|
61
61
|
- lib/rbs_active_hash/active_hash/parser.rb
|
|
62
62
|
- lib/rbs_active_hash/rake_task.rb
|
|
63
63
|
- lib/rbs_active_hash/version.rb
|
|
64
|
-
- rbs_active_hash.gemspec
|
|
65
64
|
- rbs_collection.lock.yaml
|
|
66
65
|
- rbs_collection.yaml
|
|
67
66
|
- sig/generators/rbs_active_hash/install_generator.rbs
|
|
@@ -69,7 +68,7 @@ files:
|
|
|
69
68
|
- sig/rbs_active_hash/active_hash.rbs
|
|
70
69
|
- sig/rbs_active_hash/active_hash/parser.rbs
|
|
71
70
|
- sig/rbs_active_hash/rake_task.rbs
|
|
72
|
-
- sig/
|
|
71
|
+
- sig/rbs_active_hash/version.rbs
|
|
73
72
|
homepage: https://github.com/tk0miya/rbs_active_hash
|
|
74
73
|
licenses:
|
|
75
74
|
- MIT
|
|
@@ -77,7 +76,8 @@ metadata:
|
|
|
77
76
|
homepage_uri: https://github.com/tk0miya/rbs_active_hash
|
|
78
77
|
source_code_uri: https://github.com/tk0miya/rbs_active_hash
|
|
79
78
|
changelog_uri: https://github.com/tk0miya/rbs_active_hash
|
|
80
|
-
|
|
79
|
+
rubygems_mfa_required: 'true'
|
|
80
|
+
post_install_message:
|
|
81
81
|
rdoc_options: []
|
|
82
82
|
require_paths:
|
|
83
83
|
- lib
|
|
@@ -85,15 +85,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
85
85
|
requirements:
|
|
86
86
|
- - ">="
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: '2
|
|
88
|
+
version: '3.2'
|
|
89
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
requirements:
|
|
91
91
|
- - ">="
|
|
92
92
|
- !ruby/object:Gem::Version
|
|
93
93
|
version: '0'
|
|
94
94
|
requirements: []
|
|
95
|
-
rubygems_version: 3.
|
|
96
|
-
signing_key:
|
|
95
|
+
rubygems_version: 3.5.22
|
|
96
|
+
signing_key:
|
|
97
97
|
specification_version: 4
|
|
98
98
|
summary: A RBS files generator for ActiveHash models
|
|
99
99
|
test_files: []
|
data/rbs_active_hash.gemspec
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/rbs_active_hash/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "rbs_active_hash"
|
|
7
|
-
spec.version = RbsActiveHash::VERSION
|
|
8
|
-
spec.authors = ["Takeshi KOMIYA"]
|
|
9
|
-
spec.email = ["i.tkomiya@gmail.com"]
|
|
10
|
-
|
|
11
|
-
spec.summary = "A RBS files generator for ActiveHash models"
|
|
12
|
-
spec.description = "A RBS files generator for ActiveHash models"
|
|
13
|
-
spec.homepage = "https://github.com/tk0miya/rbs_active_hash"
|
|
14
|
-
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">= 2.7"
|
|
16
|
-
|
|
17
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
|
-
spec.metadata["source_code_uri"] = spec.homepage
|
|
19
|
-
spec.metadata["changelog_uri"] = spec.homepage
|
|
20
|
-
|
|
21
|
-
spec.files = Dir.chdir(__dir__) do
|
|
22
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
23
|
-
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
spec.bindir = "exe"
|
|
27
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
28
|
-
spec.require_paths = ["lib"]
|
|
29
|
-
|
|
30
|
-
spec.add_dependency "active_hash"
|
|
31
|
-
spec.add_dependency "rbs"
|
|
32
|
-
|
|
33
|
-
# For more information and examples about making a new gem, check out our
|
|
34
|
-
# guide at: https://bundler.io/guides/creating_gem.html
|
|
35
|
-
end
|
data/sig/shims/rake.rbs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
module Rake
|
|
2
|
-
class TaskLib
|
|
3
|
-
include Rake::DSL
|
|
4
|
-
end
|
|
5
|
-
|
|
6
|
-
module DSL
|
|
7
|
-
private
|
|
8
|
-
|
|
9
|
-
def desc: (String description) -> void
|
|
10
|
-
def file: (*untyped args) ?{ () -> void } -> void
|
|
11
|
-
def import: (*String fns) -> void
|
|
12
|
-
def multitask: (*untyped args) ?{ () -> void } -> void
|
|
13
|
-
def namespace: (?String? name) ?{ () -> void } -> void
|
|
14
|
-
def rule: (*untyped args) ?{ () -> void } -> void
|
|
15
|
-
def task: (*untyped args) ?{ () -> void } -> void
|
|
16
|
-
def sh: (*String cmd) ?{ (bool, Process::Status) -> void } -> void
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|