Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI fails #3

Merged
merged 2 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Suppress git warnings
run: git config --global init.defaultBranch main
- name: Run RSpec
run: bundle exec rspec
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source 'https://rubygems.org'

group :development, :test do
gem 'gem_generator', '~> 0.1.0'
gem 'gem_generator', '~> 0.3.0'

gem 'ffaker', '~> 2.20'
gem 'rspec', '~> 3.10'
Expand Down
24 changes: 11 additions & 13 deletions spec/generated_project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,19 @@
system "git config user.name \"#{author_name}\""
system "git config user.email \"#{author_email}\""

Bundler.with_unbundled_env do
## https://stackoverflow.com/a/25326622/2630849
## https://stackoverflow.com/a/54626184/2630849
Open3.popen3(
"gem_generator #{gem_name} #{__dir__}/../template --namespace=#{namespace}"
) do |stdin, _stdout, stderr, wait_thread|
Thread.new do
stderr.each { |l| puts l } unless stderr.closed?
end
## https://stackoverflow.com/a/25326622/2630849
## https://stackoverflow.com/a/54626184/2630849
Open3.popen3(
"gem_generator #{gem_name} #{__dir__}/../template --namespace=#{namespace}"
) do |stdin, _stdout, stderr, wait_thread|
Thread.new do
stderr.each { |l| puts l } unless stderr.closed?
end

stdin.puts gem_summary
stdin.close
stdin.puts gem_summary
stdin.close

wait_thread.value
end
wait_thread.value
end

Dir.chdir gem_name
Expand Down