rbs_config 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 61793181f02c7345ef7f22fe57204825aad1575141e9de7b6723c13928a6f25d
4
+ data.tar.gz: bc22569815b41ee6b65d8e19816376e0312a074baa3b4997ccdc7dcf9d82368d
5
+ SHA512:
6
+ metadata.gz: 4299e76aeb9d945dda9fece882aa8c153813d0f9f916b7f6a18faaf644b58dde066411587b7ad68d9fda64a8fe7682976d8273a5e820a6a1dba340f57cc19811
7
+ data.tar.gz: d1d0d938d45bef011eefba72b2a35bfcf452f78e02cfb31669bce0d8a4bbb5ade031c587978960404440aac7ca4de18f1cdcdb88f0cc558e122ee42e8e71e1b4
data/.rubocop.yml ADDED
@@ -0,0 +1,23 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ Style/Documentation:
5
+ Enabled: false
6
+
7
+ Style/StringLiterals:
8
+ Enabled: true
9
+ EnforcedStyle: double_quotes
10
+
11
+ Style/StringLiteralsInInterpolation:
12
+ Enabled: true
13
+ EnforcedStyle: double_quotes
14
+
15
+ Layout/LineLength:
16
+ Max: 120
17
+
18
+ Metrics/BlockLength:
19
+ Exclude:
20
+ - "spec/**/*_spec.rb"
21
+
22
+ Metrics/MethodLength:
23
+ Max: 20
@@ -0,0 +1,8 @@
1
+ {
2
+ "recommendations": [
3
+ "shopify.ruby-lsp",
4
+ "soutaro.steep-vscode",
5
+ "tk0miya.rspec-daemon",
6
+ "tk0miya.rbs-helper"
7
+ ]
8
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "[ruby]": {
3
+ "editor.defaultFormatter": "Shopify.ruby-lsp",
4
+ },
5
+ "rbs-helper.signature-directory": "sig"
6
+ }
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at i.tkomiya@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Takeshi KOMIYA
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # rbs_config
2
+
3
+ rbs_config is a RBS generator for [config gem](https://github.com/rubyconfig/config).
4
+
5
+ ## Installation
6
+
7
+ Add a new entry to your Gemfile and run `bundle install`:
8
+
9
+ group :development do
10
+ gem 'rbs_config'
11
+ end
12
+
13
+ After the installation, please run rake task generator:
14
+
15
+ bundle exec rails g rbs_config:install
16
+
17
+ Additionally, it would be better to add the following entry to your `rbs_collection.yml`:
18
+
19
+ gems:
20
+ - name: rbs_config
21
+ ignore: true
22
+
23
+ ## Usage
24
+
25
+ Run `rbs:config:setup` task:
26
+
27
+ bundle exec rake rbs:config:setup
28
+
29
+ Then rbs_config will scan your source code and generate RBS file into `sig/config` directory.
30
+
31
+ ## Development
32
+
33
+ After checking out the repo, run `bin/setup` to install dependencies. You can also
34
+ run `bin/console` for an interactive prompt that will allow you to experiment.
35
+
36
+ To install this gem onto your local machine, run `bundle exec rake install`.
37
+
38
+ To release a new version, update the version number in `version.rb`, and then put
39
+ a git tag (ex. `git tag v1.0.0`) and push it to the GitHub. Then GitHub Actions
40
+ will release a new package to [rubygems.org](https://rubygems.org) automatically.
41
+
42
+ ## Contributing
43
+
44
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tk0miya/rbs_config.
45
+ This project is intended to be a safe, welcoming space for collaboration, and contributors are
46
+ expected to adhere to the [code of conduct](https://github.com/tk0miya/rbs_config/blob/main/CODE_OF_CONDUCT.md).
47
+
48
+ ## License
49
+
50
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
51
+
52
+ ## Code of Conduct
53
+
54
+ Everyone interacting in the RbsConfig project's codebases and issue trackers is expected to
55
+ follow the [code of conduct](https://github.com/tk0miya/rbs_config/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rubocop/rake_task"
5
+
6
+ RuboCop::RakeTask.new
7
+
8
+ task default: :rubocop
data/Steepfile ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ D = Steep::Diagnostic
4
+
5
+ target :lib do
6
+ signature "sig"
7
+
8
+ check "lib"
9
+
10
+ configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
11
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails"
4
+
5
+ module RbsConfig
6
+ class InstallGenerator < Rails::Generators::Base
7
+ def create_raketask
8
+ create_file "lib/tasks/rbs_config.rake", <<~RUBY
9
+ begin
10
+ require 'rbs_config/rake_task'
11
+ RbsConfig::RakeTask.new do |task|
12
+ # The class name of configuration object.
13
+ # task.class_name = "Settings"
14
+
15
+ # The files to be loaded.
16
+ # task.files = [Pathname(Rails.root / "config/settings.yml")]
17
+ end
18
+ rescue LoadError
19
+ # failed to load rbs_config. Skip to load rbs_config tasks.
20
+ end
21
+ RUBY
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rbs"
4
+ require "active_support/core_ext/string/inflections"
5
+
6
+ module RbsConfig
7
+ module Config
8
+ def self.generate(files:, class_name: "Settings")
9
+ Generator.new(class_name: class_name, files: files).generate
10
+ end
11
+
12
+ class Generator
13
+ attr_reader :class_name, :files
14
+
15
+ def initialize(class_name:, files:)
16
+ @class_name = class_name
17
+ @files = files
18
+ end
19
+
20
+ def generate
21
+ config = load_config(files)
22
+ classes = generate_classes(config)
23
+ methods = generate_methods(config)
24
+
25
+ format <<~RBS
26
+ class #{class_name}
27
+ #{classes.join("\n")}
28
+ #{methods.join("\n")}
29
+ end
30
+ RBS
31
+ end
32
+
33
+ private
34
+
35
+ def format(rbs)
36
+ parsed = RBS::Parser.parse_signature(rbs)
37
+ StringIO.new.tap do |out|
38
+ RBS::Writer.new(out: out).write(parsed[1] + parsed[2])
39
+ end.string
40
+ end
41
+
42
+ def generate_classes(config)
43
+ config.filter_map do |key, value|
44
+ next unless value.is_a?(Hash)
45
+
46
+ classes = generate_classes(value)
47
+ methods = generate_methods(value)
48
+
49
+ <<~RBS
50
+ class #{key.camelize}
51
+ #{classes.join("\n")}
52
+ #{methods.join("\n")}
53
+ end
54
+ RBS
55
+ end
56
+ end
57
+
58
+ def generate_methods(config)
59
+ config.map do |key, value|
60
+ "def self.#{key}: () -> #{stringify_type(key, value)}"
61
+ end
62
+ end
63
+
64
+ def stringify_type(name, value)
65
+ case value
66
+ when Hash
67
+ "singleton(#{name.camelize})"
68
+ when Array
69
+ types = value.map { |v| stringify_type(name, v) }.uniq
70
+ "Array[#{types.join(" | ")}]"
71
+ when NilClass
72
+ "nil"
73
+ when TrueClass, FalseClass
74
+ "bool"
75
+ else
76
+ value.class.to_s
77
+ end
78
+ end
79
+
80
+ def load_config(files)
81
+ files.map { |f| YAML.unsafe_load(f.read) }.inject { |a, b| a.deep_merge(b) }
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "pathname"
4
+ require "rake/tasklib"
5
+
6
+ module RbsConfig
7
+ class RakeTask < Rake::TaskLib
8
+ attr_accessor :class_name, :files, :name, :signature_root_dir
9
+
10
+ def initialize(name = :'rbs:config', &block)
11
+ super()
12
+
13
+ @name = name
14
+ @class_name = "Settings"
15
+ @files = [Pathname(Rails.root / "config/settings.yml"),
16
+ Pathname(Rails.root / "config/settings.local.yml"),
17
+ Pathname(Rails.root / "config/settings/production.yml")]
18
+ @signature_root_dir = Pathname(Rails.root / "sig/config")
19
+
20
+ block&.call(self)
21
+
22
+ define_clean_task
23
+ define_generate_task
24
+ define_setup_task
25
+ end
26
+
27
+ def define_setup_task
28
+ desc "Run all tasks of rbs_config"
29
+
30
+ deps = [:"#{name}:clean", :"#{name}:generate"]
31
+ task("#{name}:setup" => deps)
32
+ end
33
+
34
+ def define_generate_task
35
+ desc "Generate RBS files for config gem"
36
+ task "#{name}:generate" do
37
+ signature_root_dir.mkpath
38
+
39
+ signature_root_dir.join("#{class_name.underscore}.rbs").write(
40
+ RbsConfig::Config.generate(files: files, class_name: class_name)
41
+ )
42
+ end
43
+ end
44
+
45
+ def define_clean_task
46
+ desc "Clean RBS files for config gem"
47
+ task "#{name}:clean" do
48
+ signature_root_dir.rmtree if signature_root_dir.exist?
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RbsConfig
4
+ VERSION = "0.1.0"
5
+ end
data/lib/rbs_config.rb ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rbs_config/config"
4
+ require_relative "rbs_config/version"
5
+
6
+ module RbsConfig
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
@@ -0,0 +1,122 @@
1
+ ---
2
+ sources:
3
+ - type: git
4
+ name: ruby/gem_rbs_collection
5
+ revision: a4c633634493ab7ae73219022f56acff56ab69af
6
+ remote: https://github.com/ruby/gem_rbs_collection.git
7
+ repo_dir: gems
8
+ path: ".gem_rbs_collection"
9
+ gems:
10
+ - name: abbrev
11
+ version: '0'
12
+ source:
13
+ type: stdlib
14
+ - name: activesupport
15
+ version: '7.0'
16
+ source:
17
+ type: git
18
+ name: ruby/gem_rbs_collection
19
+ revision: a4c633634493ab7ae73219022f56acff56ab69af
20
+ remote: https://github.com/ruby/gem_rbs_collection.git
21
+ repo_dir: gems
22
+ - name: ast
23
+ version: '2.4'
24
+ source:
25
+ type: git
26
+ name: ruby/gem_rbs_collection
27
+ revision: a4c633634493ab7ae73219022f56acff56ab69af
28
+ remote: https://github.com/ruby/gem_rbs_collection.git
29
+ repo_dir: gems
30
+ - name: base64
31
+ version: '0'
32
+ source:
33
+ type: stdlib
34
+ - name: concurrent-ruby
35
+ version: '1.1'
36
+ source:
37
+ type: git
38
+ name: ruby/gem_rbs_collection
39
+ revision: a4c633634493ab7ae73219022f56acff56ab69af
40
+ remote: https://github.com/ruby/gem_rbs_collection.git
41
+ repo_dir: gems
42
+ - name: date
43
+ version: '0'
44
+ source:
45
+ type: stdlib
46
+ - name: i18n
47
+ version: '1.10'
48
+ source:
49
+ type: git
50
+ name: ruby/gem_rbs_collection
51
+ revision: a4c633634493ab7ae73219022f56acff56ab69af
52
+ remote: https://github.com/ruby/gem_rbs_collection.git
53
+ repo_dir: gems
54
+ - name: json
55
+ version: '0'
56
+ source:
57
+ type: stdlib
58
+ - name: logger
59
+ version: '0'
60
+ source:
61
+ type: stdlib
62
+ - name: minitest
63
+ version: '0'
64
+ source:
65
+ type: stdlib
66
+ - name: monitor
67
+ version: '0'
68
+ source:
69
+ type: stdlib
70
+ - name: mutex_m
71
+ version: '0'
72
+ source:
73
+ type: stdlib
74
+ - name: optparse
75
+ version: '0'
76
+ source:
77
+ type: stdlib
78
+ - name: parallel
79
+ version: '1.20'
80
+ source:
81
+ type: git
82
+ name: ruby/gem_rbs_collection
83
+ revision: a4c633634493ab7ae73219022f56acff56ab69af
84
+ remote: https://github.com/ruby/gem_rbs_collection.git
85
+ repo_dir: gems
86
+ - name: pathname
87
+ version: '0'
88
+ source:
89
+ type: stdlib
90
+ - name: rainbow
91
+ version: '3.0'
92
+ source:
93
+ type: git
94
+ name: ruby/gem_rbs_collection
95
+ revision: a4c633634493ab7ae73219022f56acff56ab69af
96
+ remote: https://github.com/ruby/gem_rbs_collection.git
97
+ repo_dir: gems
98
+ - name: rbs
99
+ version: 3.2.0
100
+ source:
101
+ type: rubygems
102
+ - name: rdoc
103
+ version: '0'
104
+ source:
105
+ type: stdlib
106
+ - name: securerandom
107
+ version: '0'
108
+ source:
109
+ type: stdlib
110
+ - name: singleton
111
+ version: '0'
112
+ source:
113
+ type: stdlib
114
+ - name: time
115
+ version: '0'
116
+ source:
117
+ type: stdlib
118
+ - name: tsort
119
+ version: '0'
120
+ source:
121
+ type: stdlib
122
+ gemfile_lock_path: Gemfile.lock
@@ -0,0 +1,22 @@
1
+ # Download sources
2
+ sources:
3
+ - type: git
4
+ name: ruby/gem_rbs_collection
5
+ remote: https://github.com/ruby/gem_rbs_collection.git
6
+ revision: main
7
+ repo_dir: gems
8
+
9
+ # You can specify local directories as sources also.
10
+ # - type: local
11
+ # path: path/to/your/local/repository
12
+
13
+ # A directory to install the downloaded RBSs
14
+ path: .gem_rbs_collection
15
+
16
+ gems:
17
+ # Skip loading rbs gem's RBS.
18
+ # It's unnecessary if you don't use rbs as a library.
19
+ - name: steep
20
+ ignore: true
21
+
22
+ - name: pathname
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/rbs_config/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "rbs_config"
7
+ spec.version = RbsConfig::VERSION
8
+ spec.authors = ["Takeshi KOMIYA"]
9
+ spec.email = ["i.tkomiya@gmail.com"]
10
+
11
+ spec.summary = "A RBS files generator for Config gem"
12
+ spec.description = "A RBS files generator for Config gem"
13
+ spec.homepage = "https://github.com/tk0miya/rbs_config"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
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__) ||
24
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
25
+ end
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_dependency "activesupport"
32
+ spec.add_dependency "rbs"
33
+
34
+ # For more information and examples about making a new gem, check out our
35
+ # guide at: https://bundler.io/guides/creating_gem.html
36
+ end
@@ -0,0 +1,21 @@
1
+ module RbsConfig
2
+ module Config
3
+ def self.generate: (files: Array[Pathname], ?class_name: String) -> String
4
+
5
+ class Generator
6
+ attr_reader class_name: String
7
+ attr_reader files: Array[String]
8
+
9
+ def initialize: (class_name: String, files: Array[Pathname]) -> void
10
+ def generate: () -> String
11
+
12
+ private
13
+
14
+ def format: (String rbs) -> String
15
+ def generate_classes: (Hash[untyped, untyped] config) -> Array[String]
16
+ def generate_methods: (Hash[untyped, untyped] config) -> Array[String]
17
+ def stringify_type: (untyped type, untyped value) -> String
18
+ def load_config: (Array[Pathname] files) -> Hash[untyped, untyped]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,14 @@
1
+ module RbsConfig
2
+ class RakeTask < Rake::TaskLib
3
+ attr_accessor class_name: String
4
+ attr_accessor files: Array[Pathname]
5
+ attr_accessor name: Symbol
6
+ attr_accessor signature_root_dir: Pathname
7
+
8
+ def initialize: (?Symbol name) ? { (RbsConfig::RakeTask) -> void } -> void
9
+
10
+ def define_setup_task: () -> void
11
+ def define_generate_task: () -> void
12
+ def define_clean_task: () -> void
13
+ end
14
+ end
@@ -0,0 +1,4 @@
1
+ module RbsConfig
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
@@ -0,0 +1,18 @@
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
metadata ADDED
@@ -0,0 +1,94 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rbs_config
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Takeshi KOMIYA
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rbs
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: A RBS files generator for Config gem
42
+ email:
43
+ - i.tkomiya@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".rubocop.yml"
49
+ - ".vscode/extensions.json"
50
+ - ".vscode/settings.json"
51
+ - CODE_OF_CONDUCT.md
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - Steepfile
56
+ - lib/generators/rbs_config/install_generator.rb
57
+ - lib/rbs_config.rb
58
+ - lib/rbs_config/config.rb
59
+ - lib/rbs_config/rake_task.rb
60
+ - lib/rbs_config/version.rb
61
+ - rbs_collection.lock.yaml
62
+ - rbs_collection.yaml
63
+ - rbs_config.gemspec
64
+ - sig/rbs_config.rbs
65
+ - sig/rbs_config/config.rbs
66
+ - sig/rbs_config/rake_task.rbs
67
+ - sig/shims/rake.rbs
68
+ homepage: https://github.com/tk0miya/rbs_config
69
+ licenses:
70
+ - MIT
71
+ metadata:
72
+ homepage_uri: https://github.com/tk0miya/rbs_config
73
+ source_code_uri: https://github.com/tk0miya/rbs_config
74
+ changelog_uri: https://github.com/tk0miya/rbs_config
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 2.6.0
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubygems_version: 3.4.10
91
+ signing_key:
92
+ specification_version: 4
93
+ summary: A RBS files generator for Config gem
94
+ test_files: []