-
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.
Merge pull request #5 from mlibrary/update-upstream
Updates for current ruby
- Loading branch information
Showing
19 changed files
with
330 additions
and
298 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,22 @@ | ||
name: Run Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Ruby ${{ matrix.ruby }} | ||
strategy: | ||
matrix: | ||
ruby: [2.7, 3.0, 3.1, 3.2] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Run linter for Ruby | ||
run: bundle exec standardrb | ||
- name: Run tests | ||
run: bundle exec rspec |
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
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,9 +1,10 @@ | ||
source "http://rubygems.org" | ||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in test.gemspec | ||
gemspec | ||
|
||
|
||
gem 'rcov', :platform => :mri_18 | ||
gem 'simplecov', :platform => :mri_19 | ||
gem 'simplecov-rcov', :platform => :mri_19 | ||
group :development, :test do | ||
gem "simplecov" | ||
gem "standardrb" | ||
gem "simplecov-lcov" | ||
end |
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
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,45 +1,37 @@ | ||
require 'rubygems' | ||
require 'bundler' | ||
require "rubygems" | ||
require "bundler" | ||
begin | ||
Bundler.setup(:default, :development) | ||
rescue Bundler::BundlerError => e | ||
$stderr.puts e.message | ||
$stderr.puts "Run `bundle install` to install missing gems" | ||
warn e.message | ||
warn "Run `bundle install` to install missing gems" | ||
exit e.status_code | ||
end | ||
|
||
Bundler::GemHelper.install_tasks | ||
|
||
require 'rake' | ||
require 'rspec' | ||
require 'rspec/core/rake_task' | ||
require "rake" | ||
require "rspec" | ||
require "rspec/core/rake_task" | ||
|
||
desc 'Default: run specs.' | ||
task :default => :spec | ||
|
||
RSpec::Core::RakeTask.new do |t| | ||
if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.8/ | ||
t.rcov = true | ||
t.rcov_opts = ['--exclude', 'spec', '--exclude', 'gems'] | ||
end | ||
end | ||
desc "Default: run specs." | ||
task default: :spec | ||
|
||
# Use yard to build docs | ||
begin | ||
require 'yard' | ||
require 'yard/rake/yardoc_task' | ||
project_root = File.expand_path(File.dirname(__FILE__)) | ||
doc_destination = File.join(project_root, 'doc') | ||
require "yard" | ||
require "yard/rake/yardoc_task" | ||
project_root = __dir__ | ||
doc_destination = File.join(project_root, "doc") | ||
|
||
YARD::Rake::YardocTask.new(:doc) do |yt| | ||
yt.files = Dir.glob(File.join(project_root, 'lib', '**', '*.rb')) + | ||
[ File.join(project_root, 'README.md') ] | ||
yt.options = ['--output-dir', doc_destination, '--readme', 'README.md'] | ||
yt.files = Dir.glob(File.join(project_root, "lib", "**", "*.rb")) + | ||
[File.join(project_root, "README.md")] | ||
yt.options = ["--output-dir", doc_destination, "--readme", "README.md"] | ||
end | ||
rescue LoadError | ||
desc "Generate YARD Documentation" | ||
task :doc do | ||
abort "Please install the YARD gem to generate rdoc." | ||
end | ||
end | ||
|
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
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.