poly_delegate 1.2.1 → 1.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c018aa113ece721f6bacfa91534316cd75b7c911
4
- data.tar.gz: f763daa3e840b6fa9d2ade107bf4b6354779d940
3
+ metadata.gz: 29bfa0d49ff2c5ace7d9ecbe736fbe866aab40cc
4
+ data.tar.gz: c1817804b7ce31a576441ce4453540440ad31846
5
5
  SHA512:
6
- metadata.gz: bf264d0aac873af98c61611264a29c79624e676a3e4de2f654ff0304d96997438cef37504f8916cdbf759779910c63e9fd1a6a2a489f7110e578b8de0853cea8
7
- data.tar.gz: e887dfa4b0775aeaaf7c9408e5fd23bc15351077c9b4f63d35812bd099de165ed0b037df66244f433ca0e74cb4b19208216be9c2873fd7e137936af3423d9588
6
+ metadata.gz: 278834ca22b954b089afb170b82388446e66be5aac5e24bbdbae625e44e7684e339aab18c2cca9e01abf872b9b06a489063f821e099deae4546f92050d69b635
7
+ data.tar.gz: f9a5dcc1d2ea4bbf8eefccc09a949c50f57ad23ff031be235bbbed8a76bb57855aaaf97692883c774ca2780b6fcf1ae3fa5f4364a2206d58b9236425b830464f
@@ -6,8 +6,7 @@
6
6
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
7
 
8
8
  require 'poly_delegate/method'
9
-
10
- require 'force_bind'
9
+ require 'poly_delegate/force_bind'
11
10
 
12
11
  module PolyDelegate
13
12
  def self.distinguish_delegator(obj, *args)
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ begin
9
+ case RUBY_ENGINE
10
+ when 'ruby'
11
+ require 'force_bind'
12
+ when 'rbx'
13
+ require 'force_bind_rbx'
14
+ end
15
+ rescue LoadError
16
+ ensure
17
+ unless UnboundMethod.method_defined?(:force_bind)
18
+ fail <<-EOF
19
+ UnboundMethod#force_bind is not defined.
20
+
21
+ Implement UnboundMethod#force_bind or install a gem that implements it
22
+ before continuing. Known implementations are in the 'force_bind' and
23
+ 'force_bind_rbx' gems for MRI and Rubinius respectively.
24
+ EOF
25
+ end
26
+ end
@@ -6,5 +6,5 @@
6
6
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
7
 
8
8
  module PolyDelegate
9
- VERSION = '1.2.1'.freeze
9
+ VERSION = '1.2.2'.freeze
10
10
  end
@@ -24,5 +24,4 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
25
25
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
26
26
  spec.require_paths = ['lib']
27
- spec.extensions = ['ext/mkrf_conf.rb']
28
27
  end
metadata CHANGED
@@ -1,21 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poly_delegate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Currier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ''
14
14
  email:
15
15
  - nathan.currier@gmail.com
16
16
  executables: []
17
- extensions:
18
- - ext/mkrf_conf.rb
17
+ extensions: []
19
18
  extra_rdoc_files: []
20
19
  files:
21
20
  - ".gitignore"
@@ -25,7 +24,6 @@ files:
25
24
  - Gemfile
26
25
  - LICENSE.md
27
26
  - Rakefile
28
- - ext/mkrf_conf.rb
29
27
  - gemfiles/Gemfile.ci
30
28
  - gemfiles/Gemfile.doc
31
29
  - lib/poly_delegate.rb
@@ -33,6 +31,7 @@ files:
33
31
  - lib/poly_delegate/classic_access.rb
34
32
  - lib/poly_delegate/delegated.rb
35
33
  - lib/poly_delegate/delegator.rb
34
+ - lib/poly_delegate/force_bind.rb
36
35
  - lib/poly_delegate/method.rb
37
36
  - lib/poly_delegate/version.rb
38
37
  - poly_delegate.gemspec
@@ -61,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
60
  version: '0'
62
61
  requirements: []
63
62
  rubyforge_project:
64
- rubygems_version: 2.5.1
63
+ rubygems_version: 2.4.8
65
64
  signing_key:
66
65
  specification_version: 4
67
66
  summary: ''
@@ -1,24 +0,0 @@
1
- # encoding: utf-8
2
- # Copyright (c) 2016 Nathan Currier
3
-
4
- require 'rubygems'
5
- require 'rubygems/command'
6
- require 'rubygems/dependency_installer'
7
-
8
- begin
9
- Gem::Command.build_args = ARGV
10
- rescue NoMethodError
11
- end
12
-
13
- installer = Gem::DependencyInstaller.new
14
-
15
- case RUBY_ENGINE
16
- when 'rbx'
17
- installer.install 'force_bind_rbx'
18
- when 'ruby'
19
- installer.install 'force_bind'
20
- end
21
-
22
- File.open(File.join(File.dirname(__FILE__), 'Rakefile'), 'w') do |f|
23
- f.write('task :default')
24
- end