Skip to content
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
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ jobs:
ci:
runs-on: ubuntu-latest
name: RSpec and Rubocop
strategy:
matrix:
ruby: ['3.4', '4.0']
timeout-minutes: 3
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby_version }}
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run rspec
run: bundle exec rspec
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 3.2
TargetRubyVersion: 4.0
NewCops: enable

inherit_gem:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.5
4.0.7
102 changes: 50 additions & 52 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.3)
bigdecimal (3.2.3)
byebug (12.0.0)
bigdecimal (4.1.3)
byebug (13.0.0)
reline (>= 0.6.0)
coderay (1.1.3)
diff-lcs (1.6.2)
docile (1.4.1)
ffi (1.17.2-x86_64-linux-gnu)
foobara (0.1.7)
ffi (1.17.4-arm64-darwin)
ffi (1.17.4-x86_64-linux-gnu)
foobara (0.6.4)
bigdecimal
foobara-lru-cache (< 2.0.0)
foobara-util (< 2.0.0)
inheritable-thread-vars (< 2.0.0)
foobara-files-generator (0.1.0)
foobara-files-generator (0.1.5)
foobara (>= 0.1.1, < 2.0.0)
foobara-lru-cache (1.0.0)
foobara-rubocop-rules (1.0.2)
foobara-rubocop-rules (1.1.1)
rubocop
rubocop-rspec
foobara-spec-helpers (0.0.4)
foobara-spec-helpers (0.1.1)
foobara-util
foobara-util (1.0.2)
formatador (1.2.0)
foobara-util (1.1.0)
formatador (1.2.3)
reline
guard (2.19.1)
guard (2.20.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
logger (~> 1.6)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
ostruct (~> 0.6)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
Expand All @@ -48,91 +48,89 @@ GEM
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
inheritable-thread-vars (0.0.3)
io-console (0.8.1)
json (2.13.2)
language_server-protocol (3.17.0.5)
io-console (0.9.4)
json (3.0.2)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
listen (3.9.0)
listen (3.10.0)
logger
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
lumberjack (1.4.1)
lumberjack (1.4.2)
method_source (1.1.0)
nenv (0.3.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
ostruct (0.6.3)
parallel (1.27.0)
parser (3.3.9.0)
parallel (2.2.0)
parser (3.3.12.0)
ast (~> 2.4.1)
racc
prism (1.4.0)
pry (0.15.2)
prism (1.9.0)
pry (0.16.0)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.11.0)
byebug (~> 12.0)
pry (>= 0.13, < 0.16)
reline (>= 0.6.0)
pry-byebug (3.12.0)
byebug (~> 13.0)
pry (>= 0.13, < 0.17)
racc (1.8.1)
rainbow (3.1.1)
rake (13.3.0)
rake (13.4.2)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
regexp_parser (2.11.2)
reline (0.6.2)
regexp_parser (2.13.0)
reline (0.7.0)
io-console (~> 0.5)
rspec (3.13.1)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.5)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-its (2.0.0)
rspec-core (>= 3.13.0)
rspec-expectations (>= 3.13.0)
rspec-mocks (3.13.5)
rspec-mocks (3.13.8)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.5)
rubocop (1.80.2)
json (~> 2.3)
rspec-support (3.13.7)
rubocop (1.91.0)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parallel (>= 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.46.0, < 2.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.46.0)
rubocop-ast (1.50.0)
parser (>= 3.3.7.2)
prism (~> 1.4)
prism (~> 1.7)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-rspec (3.7.0)
rubocop-rspec (3.10.2)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
regexp_parser (>= 2.0)
rubocop (~> 1.86, >= 1.86.2)
ruby-progressbar (1.13.0)
shellany (0.0.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
thor (1.4.0)
unicode-display_width (3.1.5)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
simplecov (1.3.1)
thor (1.5.0)
unicode-display_width (3.3.0)
unicode-emoji (~> 4.3)
unicode-emoji (4.3.0)

PLATFORMS
arm64-darwin-25
x86_64-linux

DEPENDENCIES
Expand All @@ -150,7 +148,7 @@ DEPENDENCIES
simplecov

RUBY VERSION
ruby 3.4.1p0
ruby 3.4.1p0

BUNDLED WITH
2.4.14
4.0.21
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
require "pry-byebug"
require "rspec/its"
require "simplecov"
Warning[:deprecated] = true

SimpleCov.start do
# enable_coverage :branch
Expand Down
4 changes: 2 additions & 2 deletions src/command_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ def manifest_to_generator_classes(manifest)
Generators::CommandSpecGenerator
]
else
# :nocov:
# simplecov:disable
raise "Not sure how build a generator for a #{manifest}"
# :nocov:
# simplecov:enable
end
end
end
Expand Down
6 changes: 2 additions & 4 deletions src/generate_command.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "pathname"

require_relative "command_config"

module Foobara
Expand Down Expand Up @@ -31,9 +29,9 @@ def base_generator
# TODO: delegate this to base_generator
def templates_dir
# TODO: implement this?
# :nocov:
# simplecov:disable
"#{__dir__}/../templates"
# :nocov:
# simplecov:enable
end

def add_initial_elements_to_generate
Expand Down
4 changes: 2 additions & 2 deletions src/write_command_to_disk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ def run_post_generation_tasks
end

def rubocop_autocorrect
# :nocov:
# simplecov:disable
Open3.popen3("bundle exec rubocop --no-server -A") do |_stdin, _stdout, stderr, wait_thr|
exit_status = wait_thr.value
unless exit_status.success?
raise "could not rubocop --no-server -A. #{stderr.read}"
end
end
# :nocov:
# simplecov:enable
end
end
end
Expand Down
Loading