Skip to content

Commit

Permalink
Stop recommending git submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
pocke committed Mar 7, 2024
1 parent 8e9213c commit 866411a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
22 changes: 0 additions & 22 deletions bin/init_new_gem
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@ def help
HELP
end

def normalize_github_url(str)
case str
when /\A\s*\z/
nil
when %r!\A[^/]+/[^/]+\z!
"https://github.com/#{str}.git"
when /\.git\z/
str
else
"#{str}.git"
end
end

def put(path, content)
puts "create #{path}"
path.dirname.mkpath unless path.dirname.directory?
Expand Down Expand Up @@ -52,10 +39,6 @@ begin
print '> '
end while (version = $stdin.gets.chomp).empty?

puts "GitHub Repository as USER/REPO (default: skip adding git submodule)"
print '> '
git_repo = normalize_github_url($stdin.gets.chomp)

puts "Your GitHub account if you want to become the maintainer of RBS for this gem (default: skip adding you to the maintainer)"
puts "See https://github.com/ruby/gem_rbs_collection/blob/main/docs/CONTRIBUTING.md#code-owners"
print '> '
Expand Down Expand Up @@ -88,11 +71,6 @@ put base / 'manifest.yaml', <<~'YAML'
# - name: pathname
YAML

if git_repo
src_path = base.join('_src')
sh! 'git', 'submodule', 'add', '-f', '--name', src_path.to_s, git_repo, src_path.to_s
end

if github_account
github_account = "@#{github_account}" unless github_account.start_with?('@')
update(Pathname('.github/CODEOWNERS')) do |content|
Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ This script generates an empty RBS to `gems/GEM_NAME/VERSION/GEM_NAME.rbs`, and

Specify the _major_ and _minor_ version you are using would be great for most cases.

We recommend adding `_test` and `_src` directories.
We assume `_test` directory contains files for testing, and `_src` is a git submodule for the source code of the version of the gem.
We recommend adding `_test` directory.
We assume `_test` directory contains files for testing.

### Write RBS files

Expand Down

0 comments on commit 866411a

Please sign in to comment.