delegate 0.2.0 → 0.3.0
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 +15 -8
- data/Rakefile +1 -1
- data/delegate.gemspec +0 -2
- 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: 4e866777bc83135233d96ebe09f3d7e4206e6d477afab28095ecf8481c3efde1
|
4
|
+
data.tar.gz: 3964f37ef7c61538dcc895c5d0cd1b17db828ccda4c46628727852b2462c7b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff7d08ab37f382addb6737c90c3a636694c7ed578ad843615465319c2fdd6d247562a7ee37c46a6124dedd193df61d417928630b925e3279e0d4d5bf2e90c66e
|
7
|
+
data.tar.gz: 888dc049d92b1dde0fa900e024e1e0921a43be6dbab3685cfbf59abf450ab3d63ed43cec1fffb56b2272d466d2d5fe8dbba13c46044c7082792ce62a188671dd
|
data/.github/workflows/test.yml
CHANGED
@@ -3,22 +3,29 @@ name: test
|
|
3
3
|
on: [push, pull_request]
|
4
4
|
|
5
5
|
jobs:
|
6
|
-
|
6
|
+
ruby-versions:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
outputs:
|
9
|
+
versions: ${{ steps.versions.outputs.value }}
|
10
|
+
steps:
|
11
|
+
- id: versions
|
12
|
+
run: |
|
13
|
+
versions=$(curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/cruby.json' | jq -c '. - ["2.7"]')
|
14
|
+
echo "::set-output name=value::${versions}"
|
15
|
+
test:
|
16
|
+
needs: ruby-versions
|
7
17
|
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
|
8
18
|
strategy:
|
9
19
|
matrix:
|
10
|
-
ruby:
|
20
|
+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
11
21
|
os: [ ubuntu-latest, macos-latest ]
|
12
22
|
runs-on: ${{ matrix.os }}
|
13
23
|
steps:
|
14
|
-
- uses: actions/checkout@
|
24
|
+
- uses: actions/checkout@v3
|
15
25
|
- name: Set up Ruby
|
16
26
|
uses: ruby/setup-ruby@v1
|
17
27
|
with:
|
18
28
|
ruby-version: ${{ matrix.ruby }}
|
19
|
-
|
20
|
-
run: |
|
21
|
-
gem install bundler --no-document
|
22
|
-
bundle install
|
29
|
+
bundler-cache: true # 'bundle install' and cache gems
|
23
30
|
- name: Run test
|
24
|
-
run: rake test
|
31
|
+
run: bundle exec rake test
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ end
|
|
9
9
|
|
10
10
|
task :sync_tool do
|
11
11
|
require 'fileutils'
|
12
|
-
FileUtils.cp "../ruby/tool/lib/
|
12
|
+
FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
|
13
13
|
FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
|
14
14
|
FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
|
15
15
|
end
|
data/delegate.gemspec
CHANGED
@@ -24,8 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
25
25
|
`git ls-files -z 2>/dev/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.0"
|
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.0
|
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: 2022-12-05 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.4.0.dev
|
53
54
|
signing_key:
|
54
55
|
specification_version: 4
|
55
56
|
summary: Provides three abilities to delegate method calls to an object.
|