docile 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +18 -14
- data/Gemfile +1 -1
- data/HISTORY.md +7 -1
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/docile.rb +1 -0
- data/lib/docile/backtrace_filter.rb +22 -0
- data/lib/docile/fallback_context_proxy.rb +18 -5
- data/lib/docile/version.rb +1 -1
- data/on_what.rb +4 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ec44492080efa6904814a34b09c7a93752906ba4070beea5d45c3d76ac18389
|
4
|
+
data.tar.gz: 9808b41d9302b87b12a1e12c4d54f7868bf36729d4926060428f150bf21c40e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e7b588573947c3589f24d4f14d6506a44bc96f5000c94d9d1746f59c5d79259fafa4b7bc706a5718fe7bf27fa7233b2568bae51a0721954b1592739d178bc85
|
7
|
+
data.tar.gz: 84b7e888d30614ef00e123615fbcb4edd2147147eb1e1a0222cf333cb85c74a7ce38e7a1076bd2f33c81f94a0d6f4b9c4342e62f2682cd2a20be016a033274ef
|
data/.travis.yml
CHANGED
@@ -1,14 +1,9 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
|
-
# Apparently sudo is required to test on Rubinius and JRuby-head
|
4
|
-
sudo: required
|
5
|
-
|
6
|
-
# See https://docs.travis-ci.com/user/languages/ruby/#Rubinius
|
7
|
-
dist: trusty
|
8
|
-
|
9
3
|
rvm:
|
10
4
|
# MRI
|
11
5
|
- ruby-head
|
6
|
+
- 2.7
|
12
7
|
- 2.6
|
13
8
|
- 2.5
|
14
9
|
- 2.4
|
@@ -16,18 +11,27 @@ rvm:
|
|
16
11
|
- 2.2
|
17
12
|
- 2.1
|
18
13
|
- 1.9.3
|
19
|
-
- 1.8.7
|
20
|
-
- ree
|
21
14
|
# JRuby
|
22
15
|
- jruby-head
|
23
|
-
- jruby-9.
|
24
|
-
|
25
|
-
|
26
|
-
-
|
16
|
+
- jruby-9.2
|
17
|
+
# Truffleruby
|
18
|
+
- truffleruby-head
|
19
|
+
- truffleruby-20.3.0
|
27
20
|
|
28
|
-
|
21
|
+
jobs:
|
29
22
|
allow_failures:
|
30
23
|
- rvm: ruby-head
|
31
24
|
- rvm: jruby-head
|
32
|
-
- rvm:
|
25
|
+
- rvm: truffleruby-head
|
26
|
+
# NOTE (2020-12-18): Failing access to Rubygems with following error:
|
27
|
+
# Unable to download data from https://rubygems.org/ - hostname was not
|
28
|
+
# match with the server certificate (https://rubygems.org/specs.4.8.gz)
|
29
|
+
#
|
30
|
+
# See Travis CI topic here:
|
31
|
+
# https://travis-ci.community/t/ruby-1-8-7-and-ree-builds-broken-by-ssl-certificate-failure/10866
|
32
|
+
#
|
33
|
+
# TODO (2020-12-18): Either find a fix or remove testing of 1.8 versions
|
34
|
+
- rvm: 1.8.7
|
35
|
+
- rvm: ree
|
36
|
+
|
33
37
|
fast_finish: true
|
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@ require File.expand_path("on_what", File.dirname(__FILE__))
|
|
2
2
|
source "https://rubygems.org"
|
3
3
|
|
4
4
|
# Travis-only dependencies go here
|
5
|
-
if on_travis? && !
|
5
|
+
if on_travis? && !on_less_than_2_3? && !on_rubinius?
|
6
6
|
group :test do
|
7
7
|
gem "codecov", ">= 0.0.9", :require => false
|
8
8
|
end
|
data/HISTORY.md
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
# HISTORY
|
2
2
|
|
3
|
-
## [Unreleased changes](http://github.com/ms-ati/docile/compare/v1.3.
|
3
|
+
## [Unreleased changes](http://github.com/ms-ati/docile/compare/v1.3.3...master)
|
4
4
|
|
5
5
|
- ...
|
6
6
|
|
7
|
+
## [v1.3.3 (Dec 18, 2020)](http://github.com/ms-ati/docile/compare/v1.3.2...v1.3.3)
|
8
|
+
|
9
|
+
- Special thanks (again!) to Taichi Ishitani (@taichi-ishitani):
|
10
|
+
- Fix keyword arg warnings on Ruby 2.7 (issue #44, PR #45)
|
11
|
+
- Filter Docile's source files from backtrace (issue #35, PR #36)
|
12
|
+
|
7
13
|
## [v1.3.2 (Jun 12, 2019)](http://github.com/ms-ati/docile/compare/v1.3.1...v1.3.2)
|
8
14
|
|
9
15
|
- Special thanks (again!) to Taichi Ishitani (@taichi-ishitani):
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -374,7 +374,7 @@ Docile releases follow [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.
|
|
374
374
|
|
375
375
|
## Copyright & License
|
376
376
|
|
377
|
-
Copyright (c) 2012-
|
377
|
+
Copyright (c) 2012-2021 Marc Siegel.
|
378
378
|
|
379
379
|
Licensed under the [MIT License](http://choosealicense.com/licenses/mit/), see [LICENSE](LICENSE) for details.
|
380
380
|
|
data/lib/docile.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Docile
|
2
|
+
# @api private
|
3
|
+
#
|
4
|
+
# This is used to remove entries pointing to Docile's source files
|
5
|
+
# from {Exception#backtrace} and {Exception#backtrace_locations}.
|
6
|
+
#
|
7
|
+
# If {NoMethodError} is caught then the exception object will be extended
|
8
|
+
# by this module to add filter functionalities.
|
9
|
+
module BacktraceFilter
|
10
|
+
FILTER_PATTERN = /lib\/docile/
|
11
|
+
|
12
|
+
def backtrace
|
13
|
+
super.select { |trace| trace !~ FILTER_PATTERN }
|
14
|
+
end
|
15
|
+
|
16
|
+
if ::Exception.public_method_defined?(:backtrace_locations)
|
17
|
+
def backtrace_locations
|
18
|
+
super.select { |location| location.absolute_path !~ FILTER_PATTERN }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -82,12 +82,25 @@ module Docile
|
|
82
82
|
|
83
83
|
# Proxy all methods, excluding {NON_PROXIED_METHODS}, first to `receiver`
|
84
84
|
# and then to `fallback` if not found.
|
85
|
-
|
86
|
-
if
|
87
|
-
|
85
|
+
args_string =
|
86
|
+
if RUBY_VERSION >= "2.7.0"
|
87
|
+
"*args, **kwargs, &block"
|
88
88
|
else
|
89
|
-
|
89
|
+
"*args, &block"
|
90
90
|
end
|
91
|
-
|
91
|
+
class_eval(<<-METHOD)
|
92
|
+
def method_missing(method, #{args_string})
|
93
|
+
if @__receiver__.respond_to?(method.to_sym)
|
94
|
+
@__receiver__.__send__(method.to_sym, #{args_string})
|
95
|
+
else
|
96
|
+
begin
|
97
|
+
@__fallback__.__send__(method.to_sym, #{args_string})
|
98
|
+
rescue NoMethodError => e
|
99
|
+
e.extend(BacktraceFilter)
|
100
|
+
raise e
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
METHOD
|
92
105
|
end
|
93
106
|
end
|
data/lib/docile/version.rb
CHANGED
data/on_what.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Siegel
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- Rakefile
|
115
115
|
- docile.gemspec
|
116
116
|
- lib/docile.rb
|
117
|
+
- lib/docile/backtrace_filter.rb
|
117
118
|
- lib/docile/chaining_fallback_context_proxy.rb
|
118
119
|
- lib/docile/execution.rb
|
119
120
|
- lib/docile/fallback_context_proxy.rb
|
@@ -123,7 +124,7 @@ homepage: https://ms-ati.github.io/docile/
|
|
123
124
|
licenses:
|
124
125
|
- MIT
|
125
126
|
metadata: {}
|
126
|
-
post_install_message:
|
127
|
+
post_install_message:
|
127
128
|
rdoc_options: []
|
128
129
|
require_paths:
|
129
130
|
- lib
|
@@ -138,9 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
139
|
- !ruby/object:Gem::Version
|
139
140
|
version: '0'
|
140
141
|
requirements: []
|
141
|
-
|
142
|
-
|
143
|
-
signing_key:
|
142
|
+
rubygems_version: 3.0.8
|
143
|
+
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Docile keeps your Ruby DSLs tame and well-behaved.
|
146
146
|
test_files: []
|