Skip to content

Commit b1107e7

Browse files
committed
Add rspec and rubocop binstubs
1 parent 4cd0242 commit b1107e7

File tree

6 files changed

+24
-5
lines changed

6 files changed

+24
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: ruby/setup-ruby@v1
1717
with:
1818
bundler-cache: true
19-
- run: bundle exec rubocop
19+
- run: bin/rubocop --color
2020
test:
2121
name: Test (Ruby ${{ matrix.ruby }})
2222
runs-on: ubuntu-latest
@@ -31,4 +31,4 @@ jobs:
3131
with:
3232
bundler-cache: true
3333
ruby-version: ${{ matrix.ruby }}
34-
- run: bundle exec rspec
34+
- run: bin/rspec --force-color --format documentation

.rspec

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ bundle install
2525
2. Install development dependencies as outlined above.
2626
3. Create a feature branch for the code changes you're looking to make: `git checkout -b my-new-feature`.
2727
4. _Write some code!_
28-
5. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bundle exec rspec`.
28+
5. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bin/rspec`.
2929
6. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`. _(See [this excellent article](https://cbea.ms/git-commit/) for tips on writing useful Git commit messages.)_
3030
7. Push the branch to your fork: `git push -u origin my-new-feature`.
3131
8. Create a new [Pull Request][pulls] and we'll review your changes.

bin/console

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ require "indieweb/endpoints"
77
# You can add fixtures and/or initialization code here to make experimenting
88
# with your gem easier. You can also use a different console, if you like.
99

10-
# (If you use this, don"t forget to add pry to your Gemfile!)
10+
# (If you use this, don't forget to add pry to your Gemfile!)
1111
# require "pry"
1212
# Pry.start
1313

14+
ENV["IRBRC"] = ".irbrc"
15+
1416
require "irb"
1517
IRB.start(__FILE__)

bin/rspec

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
require "rubygems"
5+
require "bundler/setup"
6+
7+
ARGV.unshift("--require", "spec_helper")
8+
9+
load Gem.bin_path("rspec-core", "rspec")

bin/rubocop

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
require "rubygems"
5+
require "bundler/setup"
6+
7+
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
8+
9+
load Gem.bin_path("rubocop", "rubocop")

0 commit comments

Comments
 (0)