-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Ruby 2.7, all deps, migrate to GH actions.
Copying changes from other project over at https://github.com/nathankleyn/sliding_window to improve the ease with which I can maintain this project! Note this commit contains a crazy amount of changes to appease Rubocop.
- Loading branch information
1 parent
9b65c53
commit ef00c1a
Showing
49 changed files
with
712 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
|
||
- name: Publish to GPR | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
gem build *.gemspec | ||
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem | ||
env: | ||
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" | ||
OWNER: ${{ github.repository_owner }} | ||
|
||
- name: Publish to RubyGems | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
gem build *.gemspec | ||
gem push *.gem | ||
env: | ||
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
- name: Install dependencies | ||
run: bundle install | ||
- name: Run tests | ||
run: bundle exec rspec | ||
- name: Run Rubocop | ||
run: bundle exec rubocop | ||
- name: Update Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
*.gem | ||
.yardoc | ||
doc/ | ||
|
||
/bin | ||
/coverage | ||
/doc | ||
/tmp | ||
/.bundle | ||
/.yardoc | ||
coverage | ||
Gemfile.lock | ||
*.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,69 @@ | ||
LineLength: | ||
Max: 120 | ||
require: rubocop-rspec | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.7 | ||
|
||
MethodLength: | ||
Max: 100 | ||
Layout/LineLength: | ||
Enabled: true | ||
Max: 120 | ||
|
||
Metrics/BlockLength: | ||
Exclude: | ||
- spec/**/*.rb | ||
Enabled: true | ||
Max: 300 | ||
|
||
Metrics/MethodLength: | ||
Enabled: true | ||
Max: 20 | ||
|
||
RSpec/ExampleLength: | ||
Enabled: true | ||
Max: 20 | ||
|
||
Metrics/AbcSize: | ||
Enabled: true | ||
Max: 20 | ||
|
||
Lint/DuplicateBranch: | ||
Enabled: true | ||
|
||
Lint/DuplicateRegexpCharacterClassElement: | ||
Enabled: true | ||
|
||
Lint/EmptyBlock: | ||
Enabled: true | ||
|
||
Lint/EmptyClass: | ||
Enabled: true | ||
|
||
Lint/NoReturnInBeginEndBlocks: | ||
Enabled: true | ||
|
||
Lint/ToEnumArguments: | ||
Enabled: true | ||
|
||
Lint/UnexpectedBlockArity: | ||
Enabled: true | ||
|
||
Lint/UnmodifiedReduceAccumulator: | ||
Enabled: true | ||
|
||
Style/ArgumentsForwarding: | ||
Enabled: true | ||
|
||
Style/CollectionCompact: | ||
Enabled: true | ||
|
||
Style/DocumentDynamicEvalDefinition: | ||
Enabled: true | ||
|
||
Style/NegatedIfElseCondition: | ||
Enabled: true | ||
|
||
Style/NilLambda: | ||
Enabled: true | ||
|
||
Style/RedundantArgument: | ||
Enabled: true | ||
|
||
Style/SwapValues: | ||
Enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'simplecov-lcov' | ||
|
||
SimpleCov::Formatter::LcovFormatter.config do |c| | ||
c.report_with_single_file = true | ||
c.single_report_path = 'coverage/lcov.info' | ||
end | ||
|
||
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new( | ||
[ | ||
SimpleCov::Formatter::HTMLFormatter, | ||
SimpleCov::Formatter::LcovFormatter | ||
] | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,108 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
lego-nxt (0.2.0) | ||
activesupport (~> 5.2.1) | ||
lego-nxt (0.2.0.pre.1.pre.g83ce604) | ||
activesupport (~> 6.0, >= 6.0.3.4) | ||
libusb (~> 0.6.4) | ||
serialport (~> 1.3.1) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
activesupport (5.2.1) | ||
activesupport (6.0.3.4) | ||
concurrent-ruby (~> 1.0, >= 1.0.2) | ||
i18n (>= 0.7, < 2) | ||
minitest (~> 5.1) | ||
tzinfo (~> 1.1) | ||
ast (2.4.0) | ||
byebug (10.0.2) | ||
coderay (1.1.2) | ||
concurrent-ruby (1.0.5) | ||
coveralls (0.8.22) | ||
json (>= 1.8, < 3) | ||
simplecov (~> 0.16.1) | ||
term-ansicolor (~> 1.3) | ||
thor (~> 0.19.4) | ||
tins (~> 1.6) | ||
diff-lcs (1.3) | ||
docile (1.3.1) | ||
ffi (1.9.25) | ||
filewatcher (1.0.1) | ||
trollop (~> 2.1, >= 2.1.2) | ||
i18n (1.1.0) | ||
zeitwerk (~> 2.2, >= 2.2.2) | ||
ast (2.4.1) | ||
byebug (11.1.3) | ||
coderay (1.1.3) | ||
concurrent-ruby (1.1.7) | ||
diff-lcs (1.4.4) | ||
docile (1.3.2) | ||
ffi (1.13.1) | ||
filewatcher (1.1.1) | ||
optimist (~> 3.0) | ||
i18n (1.8.5) | ||
concurrent-ruby (~> 1.0) | ||
jaro_winkler (1.5.1) | ||
json (2.1.0) | ||
libusb (0.6.4) | ||
ffi (~> 1.0) | ||
mini_portile2 (~> 2.1) | ||
method_source (0.9.0) | ||
mini_portile2 (2.3.0) | ||
minitest (5.11.3) | ||
parallel (1.12.1) | ||
parser (2.5.1.2) | ||
ast (~> 2.4.0) | ||
powerpack (0.1.2) | ||
pry (0.11.3) | ||
coderay (~> 1.1.0) | ||
method_source (~> 0.9.0) | ||
pry-byebug (3.6.0) | ||
byebug (~> 10.0) | ||
pry (~> 0.10) | ||
method_source (1.0.0) | ||
mini_portile2 (2.5.0) | ||
minitest (5.14.2) | ||
optimist (3.0.1) | ||
parallel (1.20.1) | ||
parser (2.7.2.0) | ||
ast (~> 2.4.1) | ||
pry (0.13.1) | ||
coderay (~> 1.1) | ||
method_source (~> 1.0) | ||
pry-byebug (3.9.0) | ||
byebug (~> 11.0) | ||
pry (~> 0.13.0) | ||
rainbow (3.0.0) | ||
redcarpet (3.4.0) | ||
rspec (3.8.0) | ||
rspec-core (~> 3.8.0) | ||
rspec-expectations (~> 3.8.0) | ||
rspec-mocks (~> 3.8.0) | ||
rspec-core (3.8.0) | ||
rspec-support (~> 3.8.0) | ||
rspec-expectations (3.8.1) | ||
redcarpet (3.5.0) | ||
regexp_parser (2.0.0) | ||
rexml (3.2.4) | ||
rspec (3.10.0) | ||
rspec-core (~> 3.10.0) | ||
rspec-expectations (~> 3.10.0) | ||
rspec-mocks (~> 3.10.0) | ||
rspec-core (3.10.0) | ||
rspec-support (~> 3.10.0) | ||
rspec-expectations (3.10.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.8.0) | ||
rspec-mocks (3.8.0) | ||
rspec-support (~> 3.10.0) | ||
rspec-mocks (3.10.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.8.0) | ||
rspec-support (3.8.0) | ||
rubocop (0.58.2) | ||
jaro_winkler (~> 1.5.1) | ||
rspec-support (~> 3.10.0) | ||
rspec-support (3.10.0) | ||
rubocop (1.5.0) | ||
parallel (~> 1.10) | ||
parser (>= 2.5, != 2.5.1.1) | ||
powerpack (~> 0.1) | ||
parser (>= 2.7.1.5) | ||
rainbow (>= 2.2.2, < 4.0) | ||
regexp_parser (>= 2.0) | ||
rexml | ||
rubocop-ast (>= 1.2.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (~> 1.0, >= 1.0.1) | ||
rubocop-rspec (1.29.0) | ||
rubocop (>= 0.58.0) | ||
ruby-progressbar (1.10.0) | ||
unicode-display_width (>= 1.4.0, < 2.0) | ||
rubocop-ast (1.3.0) | ||
parser (>= 2.7.1.5) | ||
rubocop-rspec (2.0.0) | ||
rubocop (~> 1.0) | ||
rubocop-ast (>= 1.1.0) | ||
ruby-progressbar (1.10.1) | ||
serialport (1.3.1) | ||
simplecov (0.16.1) | ||
simplecov (0.20.0) | ||
docile (~> 1.1) | ||
json (>= 1.8, < 3) | ||
simplecov-html (~> 0.10.0) | ||
simplecov-html (0.10.2) | ||
term-ansicolor (1.6.0) | ||
tins (~> 1.0) | ||
thor (0.19.4) | ||
simplecov-html (~> 0.11) | ||
simplecov_json_formatter (~> 0.1) | ||
simplecov-html (0.12.3) | ||
simplecov-lcov (0.8.0) | ||
simplecov_json_formatter (0.1.2) | ||
thread_safe (0.3.6) | ||
tins (1.16.3) | ||
trollop (2.9.9) | ||
tzinfo (1.2.5) | ||
tzinfo (1.2.8) | ||
thread_safe (~> 0.1) | ||
unicode-display_width (1.4.0) | ||
yard (0.9.16) | ||
unicode-display_width (1.7.0) | ||
yard (0.9.25) | ||
zeitwerk (2.4.2) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
coveralls (~> 0.8.22) | ||
filewatcher (~> 1.0.1) | ||
filewatcher (~> 1.1, >= 1.1.1) | ||
lego-nxt! | ||
pry-byebug (~> 3.6.0) | ||
redcarpet (~> 3.4.0) | ||
rspec (~> 3.8.0) | ||
rubocop (~> 0.58.2) | ||
rubocop-rspec (~> 1.29.0) | ||
yard (~> 0.9.16) | ||
pry-byebug (~> 3.9, >= 3.9.0) | ||
redcarpet (~> 3.5, >= 3.5.0) | ||
rspec (~> 3.10, >= 3.10.0) | ||
rubocop (~> 1.4, >= 1.4.2) | ||
rubocop-rspec (~> 2.0, >= 2.0.0) | ||
simplecov (~> 0.20, >= 0.20.0) | ||
simplecov-lcov (~> 0.8, >= 0.8.0) | ||
yard (~> 0.9, >= 0.9.25) | ||
|
||
BUNDLED WITH | ||
1.16.3 | ||
2.1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.