delegate 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/test.yml +11 -8
- data/Gemfile +1 -0
- data/Rakefile +0 -7
- data/delegate.gemspec +2 -4
- data/lib/delegate.rb +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19d196719cff975a767c17863767ee78c43dfe773a66139230ce4e0bea9a79f6
|
4
|
+
data.tar.gz: 7262b1be831d97134e93b0fa649ee97bc2e8167b66f6518baa674353a616a84e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 769420525aaf52fcc8a75bde305478526820a791fa0658f4fc236dc18b138bdb2e65516db67f4c80cf3f48dce0dd8b22adbbf2098fd17c2de8aa8d653e43b072
|
7
|
+
data.tar.gz: 48c9a8707d8b10cd6a193c26c9032441f48772e78a1483f3f24049cb211c7b375549bb76b87caefd7d7ac8a1321cc2e7af006ec93c473914d4d0aaa5501f0c5a
|
data/.github/workflows/test.yml
CHANGED
@@ -3,22 +3,25 @@ name: test
|
|
3
3
|
on: [push, pull_request]
|
4
4
|
|
5
5
|
jobs:
|
6
|
-
|
6
|
+
ruby-versions:
|
7
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
8
|
+
with:
|
9
|
+
engine: cruby
|
10
|
+
min_version: 3.0
|
11
|
+
test:
|
12
|
+
needs: ruby-versions
|
7
13
|
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
|
8
14
|
strategy:
|
9
15
|
matrix:
|
10
|
-
ruby:
|
16
|
+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
11
17
|
os: [ ubuntu-latest, macos-latest ]
|
12
18
|
runs-on: ${{ matrix.os }}
|
13
19
|
steps:
|
14
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v4
|
15
21
|
- name: Set up Ruby
|
16
22
|
uses: ruby/setup-ruby@v1
|
17
23
|
with:
|
18
24
|
ruby-version: ${{ matrix.ruby }}
|
19
|
-
|
20
|
-
run: |
|
21
|
-
gem install bundler --no-document
|
22
|
-
bundle install
|
25
|
+
bundler-cache: true # 'bundle install' and cache gems
|
23
26
|
- name: Run test
|
24
|
-
run: rake test
|
27
|
+
run: bundle exec rake test
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -7,11 +7,4 @@ Rake::TestTask.new(:test) do |t|
|
|
7
7
|
t.test_files = FileList["test/**/test_*.rb"]
|
8
8
|
end
|
9
9
|
|
10
|
-
task :sync_tool do
|
11
|
-
require 'fileutils'
|
12
|
-
FileUtils.cp "../ruby/tool/lib/test/unit/core_assertions.rb", "./test/lib"
|
13
|
-
FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
|
14
|
-
FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
|
15
|
-
end
|
16
|
-
|
17
10
|
task :default => :test
|
data/delegate.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
name = File.basename(__FILE__, ".gemspec")
|
4
|
-
version = ["lib", Array.new(name.count("-")+1, "
|
4
|
+
version = ["lib", Array.new(name.count("-")+1, ".").join("/")].find do |dir|
|
5
5
|
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
6
6
|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
7
7
|
end rescue nil
|
@@ -22,10 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.metadata["source_code_uri"] = spec.homepage
|
23
23
|
|
24
24
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
25
|
-
`git ls-files -z 2
|
25
|
+
`git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
26
|
end
|
27
|
-
spec.bindir = "exe"
|
28
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
27
|
spec.require_paths = ["lib"]
|
30
28
|
spec.required_ruby_version = '>= 2.7'
|
31
29
|
end
|
data/lib/delegate.rb
CHANGED
@@ -39,12 +39,12 @@
|
|
39
39
|
# Be advised, RDoc will not detect delegated methods.
|
40
40
|
#
|
41
41
|
class Delegator < BasicObject
|
42
|
-
VERSION = "0.
|
42
|
+
VERSION = "0.3.1"
|
43
43
|
|
44
44
|
kernel = ::Kernel.dup
|
45
45
|
kernel.class_eval do
|
46
46
|
alias __raise__ raise
|
47
|
-
[:to_s, :inspect,
|
47
|
+
[:to_s, :inspect, :!~, :===, :<=>, :hash].each do |m|
|
48
48
|
undef_method m
|
49
49
|
end
|
50
50
|
private_instance_methods.each do |m|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delegate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yukihiro Matsumoto
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Provides three abilities to delegate method calls to an object.
|
14
14
|
email:
|
@@ -17,6 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- ".github/dependabot.yml"
|
20
21
|
- ".github/workflows/test.yml"
|
21
22
|
- ".gitignore"
|
22
23
|
- Gemfile
|
@@ -49,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
50
|
- !ruby/object:Gem::Version
|
50
51
|
version: '0'
|
51
52
|
requirements: []
|
52
|
-
rubygems_version: 3.
|
53
|
+
rubygems_version: 3.5.0.dev
|
53
54
|
signing_key:
|
54
55
|
specification_version: 4
|
55
56
|
summary: Provides three abilities to delegate method calls to an object.
|