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

Add '# frozen_string_literal: true' #14

Merged
merged 6 commits into from
Apr 10, 2025
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export JRUBY_OPTS="--debug"
37 changes: 37 additions & 0 deletions .github/workflows/jruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: RSpec on JRuby

on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 21 * * 6"

env:
JRUBY_OPTS: "--debug"

jobs:
rspec:
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
ruby: ["jruby-9.4", "jruby-head"]

steps:
- uses: actions/checkout@v4
- run: rm -f Gemfile.lock
- run: rm -f .ruby-version
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
bundler: latest
bundler-cache: true

- run: bundle exec rspec
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in errbit_plugin.gemspec
gemspec

gem "rake"
gem 'rspec'
gem "simplecov", require: false
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.6.1)
docile (1.4.1)
rake (13.2.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
Expand All @@ -21,6 +22,12 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.2)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)

PLATFORMS
arm64-darwin-24
Expand All @@ -29,6 +36,7 @@ DEPENDENCIES
errbit_plugin!
rake
rspec
simplecov

BUNDLED WITH
2.6.7
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
4 changes: 2 additions & 2 deletions errbit_plugin.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'errbit_plugin/version'
Expand All @@ -16,6 +18,4 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_development_dependency "rake"
end
2 changes: 2 additions & 0 deletions lib/errbit_plugin.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "errbit_plugin/version"
require "errbit_plugin/registry"
require "errbit_plugin/issue_tracker"
Expand Down
2 changes: 2 additions & 0 deletions lib/errbit_plugin/issue_tracker.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ErrbitPlugin
# abstract class for issue trackers
class IssueTracker
Expand Down
2 changes: 2 additions & 0 deletions lib/errbit_plugin/issue_trackers/none.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ErrbitPlugin
class NoneIssueTracker < IssueTracker
def self.label; 'none'; end
Expand Down
2 changes: 2 additions & 0 deletions lib/errbit_plugin/registry.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ErrbitPlugin
class IncompatibilityError < StandardError; end
class AlreadyRegisteredError < StandardError; end
Expand Down
2 changes: 2 additions & 0 deletions lib/errbit_plugin/validate_issue_tracker.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ErrbitPlugin
class ValidateIssueTracker
def initialize(klass)
Expand Down
2 changes: 2 additions & 0 deletions lib/errbit_plugin/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ErrbitPlugin
VERSION = '0.7.0'
end
2 changes: 2 additions & 0 deletions spec/errbit_plugin/registry_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe ErrbitPlugin::Registry do
Expand Down
2 changes: 2 additions & 0 deletions spec/errbit_plugin/validate_issue_tracker_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe ErrbitPlugin::ValidateIssueTracker do
Expand Down
16 changes: 4 additions & 12 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
if ENV['COVERAGE']
require 'simplecov'
if ENV['CI']
require 'coveralls'
Coveralls.wear!
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
end
# frozen_string_literal: true

SimpleCov.start
end
require 'simplecov'

SimpleCov.start

require 'errbit_plugin'

Expand Down