-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving dev dependencies into the Gemfile, removing pry (b/c we have ruby-debug now), adding frozen_string_literal, etc…
- Loading branch information
1 parent
a0ec8e9
commit f8df9f4
Showing
9 changed files
with
100 additions
and
22 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 |
---|---|---|
|
@@ -12,7 +12,18 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: [ 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, jruby, truffleruby ] | ||
ruby: | ||
- 2.4 | ||
- 2.5 | ||
- 2.6 | ||
- 2.7 | ||
- 3.0 | ||
- 3.1 | ||
- 3.2 | ||
- 3.3 | ||
- jruby | ||
- truffleruby | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -24,7 +35,7 @@ jobs: | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: Build and test with RSpec | ||
run: bundle exec rake spec | ||
run: bin/rspec | ||
|
||
- name: Publish code coverage | ||
uses: paambaati/[email protected] # Locking to specific version b/c: https://github.com/paambaati/codeclimate-action/issues/142 | ||
|
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,7 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in dumb_delegator.gemspec | ||
gemspec | ||
|
||
gem "rake", "~> 13.0" | ||
gem "rspec", "~> 3.9" | ||
gem "simplecov", group: :test, require: nil | ||
gem "pry-byebug", group: [:development, :test], platforms: [:ruby] |
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,27 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
# | ||
# This file was generated by Bundler. | ||
# | ||
# The application 'rake' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
|
||
bundle_binstub = File.expand_path("bundle", __dir__) | ||
|
||
if File.file?(bundle_binstub) | ||
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") | ||
load(bundle_binstub) | ||
else | ||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. | ||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") | ||
end | ||
end | ||
|
||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
load Gem.bin_path("rake", "rake") |
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,27 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
# | ||
# This file was generated by Bundler. | ||
# | ||
# The application 'rspec' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
|
||
bundle_binstub = File.expand_path("bundle", __dir__) | ||
|
||
if File.file?(bundle_binstub) | ||
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") | ||
load(bundle_binstub) | ||
else | ||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. | ||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") | ||
end | ||
end | ||
|
||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
load Gem.bin_path("rspec-core", "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,36 @@ | ||
require File.expand_path("../lib/dumb_delegator/version", __FILE__) | ||
|
||
Gem::Specification.new do |gem| | ||
gem.name = "dumb_delegator" | ||
gem.version = DumbDelegator::VERSION | ||
gem.required_ruby_version = ">= 2.4.0" | ||
gem.authors = ["Andy Lindeman", "Steven Harman"] | ||
gem.email = ["[email protected]", "[email protected]"] | ||
gem.licenses = ["MIT"] | ||
gem.summary = "Delegator class that delegates ALL the things" | ||
gem.description = <<~EOD | ||
Gem::Specification.new do |spec| | ||
spec.name = "dumb_delegator" | ||
spec.version = DumbDelegator::VERSION | ||
spec.required_ruby_version = ">= 2.4.0" | ||
spec.authors = ["Andy Lindeman", "Steven Harman"] | ||
spec.email = ["[email protected]", "[email protected]"] | ||
spec.licenses = ["MIT"] | ||
spec.summary = "Delegator class that delegates ALL the things" | ||
spec.description = <<~EOD | ||
Delegator and SimpleDelegator in Ruby's stdlib are useful, but they pull in most of Kernel. | ||
This is not appropriate for many uses; for instance, delegation to Rails Models. | ||
DumbDelegator, on the other hand, delegates nearly everything to the wrapped object. | ||
EOD | ||
gem.homepage = "https://github.com/stevenharman/dumb_delegator" | ||
spec.homepage = "https://github.com/stevenharman/dumb_delegator" | ||
|
||
gem.metadata = { | ||
spec.metadata = { | ||
"changelog_uri" => "https://github.com/stevenharman/dumb_delegator/blob/master/CHANGELOG.md", | ||
"documentation_uri" => "https://rubydoc.info/gems/dumb_delegator", | ||
"homepage_uri" => spec.homepage, | ||
"source_code_uri" => "https://github.com/stevenharman/dumb_delegator" | ||
} | ||
|
||
gem.files = `git ls-files`.split($\) | ||
gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) | ||
gem.require_paths = ["lib"] | ||
|
||
gem.add_development_dependency "pry" | ||
gem.add_development_dependency "rake", "~> 13.0" | ||
gem.add_development_dependency "rspec", "~> 3.9" | ||
# Specify which files should be added to the gem when it is released. | ||
# The `git ls-files -z` loads the files in the RubyGem that have been added into git. | ||
spec.files = Dir.chdir(__dir__) do | ||
`git ls-files -z`.split("\x0").reject do |f| | ||
(File.expand_path(f) == __FILE__) || | ||
f.start_with?(*%w[bin/ spec/ .git .github Gemfile]) | ||
end | ||
end | ||
spec.bindir = "exe" | ||
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
require "dumb_delegator/triple_equal_ext" | ||
require "dumb_delegator/version" | ||
|
||
|
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,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class DumbDelegator < ::BasicObject | ||
VERSION = "1.1.0" | ||
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