docile 1.3.2 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7dae1c209d04576cf98b4d080a44f659eaf7ed41dccf942bec2ff95c44db5e8
4
- data.tar.gz: 3209a17a2588ba8c873fddd9b5c219ea6e7b73d3fcb3575997b347480abc622a
3
+ metadata.gz: 3ecef57f8977694d10721b6f18ece9744d03288b21e67d8fd8a4d3bca2837a57
4
+ data.tar.gz: e10ccdb31a0ffeb6fca27bb1f54250fd0c0a881afa70d2eac58145b05616a820
5
5
  SHA512:
6
- metadata.gz: 714bafc9545d9ccc0037fdb5c9fa8ff016a6f5f3df3c758ca16b225e371758cb3b00f2afb85763eef87576686192b129a53f1b21e2ee4f34089bdd6ad58ffd54
7
- data.tar.gz: bb82951b411c16cd720bdf9c359f43f4e38c9fa71815d336ee45bc240eeb7d9e2de1922dacdaad84ebfffdfdb54a25bf023302a0fe487a1507d102d9e59dfcae
6
+ metadata.gz: 0f8331a837ca968790f87bb9cdcc213d35da6c5973f4d9dcb56a604849c476c8d99d20dcdc921388389aed85f3b7eb2894eabcb90abfd42a1f1214817a631264
7
+ data.tar.gz: cffe4f42680621637b3103607a96c5511712f0d298c30401e04bfce08997a702fdcc5f965b8737e8531f12d330612ada1887818f93e109facfaaac215eb9243c
@@ -1,14 +1,13 @@
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
3
+ branches:
4
+ only:
5
+ - master
8
6
 
9
7
  rvm:
10
8
  # MRI
11
9
  - ruby-head
10
+ - 2.7
12
11
  - 2.6
13
12
  - 2.5
14
13
  - 2.4
@@ -16,18 +15,29 @@ rvm:
16
15
  - 2.2
17
16
  - 2.1
18
17
  - 1.9.3
19
- - 1.8.7
18
+ - 1.8.7
20
19
  - ree
21
20
  # JRuby
22
21
  - jruby-head
23
- - jruby-9.1
24
- - jruby-9.0
25
- # Rubinius
26
- - rubinius-3
22
+ - jruby-9.2
23
+ # Truffleruby
24
+ - truffleruby-head
25
+ - truffleruby-20.3.0
27
26
 
28
- matrix:
27
+ jobs:
29
28
  allow_failures:
30
29
  - rvm: ruby-head
31
30
  - rvm: jruby-head
32
- - rvm: rubinius-3
31
+ - rvm: truffleruby-head
32
+ # NOTE (2020-12-18): Failing access to Rubygems with following error:
33
+ # Unable to download data from https://rubygems.org/ - hostname was not
34
+ # match with the server certificate (https://rubygems.org/specs.4.8.gz)
35
+ #
36
+ # See Travis CI topic here:
37
+ # https://travis-ci.community/t/ruby-1-8-7-and-ree-builds-broken-by-ssl-certificate-failure/10866
38
+ #
39
+ # TODO (2020-12-18): Either find a fix or remove testing of 1.8 versions
40
+ - rvm: 1.8.7
41
+ - rvm: ree
42
+
33
43
  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? && !on_1_8? && !on_rubinius?
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,20 @@
1
1
  # HISTORY
2
2
 
3
- ## [Unreleased changes](http://github.com/ms-ati/docile/compare/v1.3.2...master)
3
+ ## [Unreleased changes](http://github.com/ms-ati/docile/compare/v1.3.4...master)
4
4
 
5
5
  - ...
6
6
 
7
+ ## [v1.3.4 (Dec 22, 2020)](http://github.com/ms-ati/docile/compare/v1.3.3...v1.3.4)
8
+
9
+ - Special thanks to Benoit Daloze (@eregon):
10
+ - Fix delegation on Ruby 2.7 (issues #45 and #44, PR #52)
11
+
12
+ ## [v1.3.3 (Dec 18, 2020)](http://github.com/ms-ati/docile/compare/v1.3.2...v1.3.3)
13
+
14
+ - Special thanks (again!) to Taichi Ishitani (@taichi-ishitani):
15
+ - Fix keyword arg warnings on Ruby 2.7 (issue #44, PR #45)
16
+ - Filter Docile's source files from backtrace (issue #35, PR #36)
17
+
7
18
  ## [v1.3.2 (Jun 12, 2019)](http://github.com/ms-ati/docile/compare/v1.3.1...v1.3.2)
8
19
 
9
20
  - Special thanks (again!) to Taichi Ishitani (@taichi-ishitani):
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2012-2019 Marc Siegel
3
+ Copyright (c) 2012-2021 Marc Siegel
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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-2019 Marc Siegel.
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
 
@@ -2,6 +2,7 @@ require "docile/version"
2
2
  require "docile/execution"
3
3
  require "docile/fallback_context_proxy"
4
4
  require "docile/chaining_fallback_context_proxy"
5
+ require "docile/backtrace_filter"
5
6
 
6
7
  # Docile keeps your Ruby DSLs tame and well-behaved.
7
8
  module Docile
@@ -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
@@ -86,8 +86,14 @@ module Docile
86
86
  if @__receiver__.respond_to?(method.to_sym)
87
87
  @__receiver__.__send__(method.to_sym, *args, &block)
88
88
  else
89
- @__fallback__.__send__(method.to_sym, *args, &block)
89
+ begin
90
+ @__fallback__.__send__(method.to_sym, *args, &block)
91
+ rescue NoMethodError => e
92
+ e.extend(BacktraceFilter)
93
+ raise e
94
+ end
90
95
  end
91
96
  end
97
+ ruby2_keywords :method_missing if respond_to?(:ruby2_keywords, true)
92
98
  end
93
99
  end
@@ -1,4 +1,4 @@
1
1
  module Docile
2
2
  # The current version of this library
3
- VERSION = "1.3.2"
3
+ VERSION = "1.3.4"
4
4
  end
data/on_what.rb CHANGED
@@ -24,3 +24,7 @@ end
24
24
  def on_less_than_2_0?
25
25
  RUBY_VERSION < "2.0.0"
26
26
  end
27
+
28
+ def on_less_than_2_3?
29
+ RUBY_VERSION < "2.3.0"
30
+ end
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.2
4
+ version: 1.3.4
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: 2019-06-12 00:00:00.000000000 Z
11
+ date: 2020-12-22 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
- rubyforge_project:
142
- rubygems_version: 2.7.9
143
- signing_key:
142
+ rubygems_version: 3.1.4
143
+ signing_key:
144
144
  specification_version: 4
145
145
  summary: Docile keeps your Ruby DSLs tame and well-behaved.
146
146
  test_files: []