dumb_delegator 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +6 -3
- data/Gemfile +2 -0
- data/dumb_delegator.gemspec +2 -3
- data/lib/dumb_delegator.rb +1 -2
- data/lib/dumb_delegator/version.rb +1 -1
- data/spec/dumb_delegator_spec.rb +2 -2
- data/spec/spec_helper.rb +4 -8
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8524fe928dd6b0408756da095f04ea57e1036e6f
|
4
|
+
data.tar.gz: a39869c5c1b01db9a97f8809619dd6774986e27d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82918496afa98bd4571110957ea147c93d23af57ba12d686e4fab24ad5e756e390a4815cf81ad95a3be64c0eed17b534bbe509e18086ac07a2033a17eafeb650
|
7
|
+
data.tar.gz: 086cec5a4ccd5e2d7450c892e3a42995cefa323ef6ffdcab7263b1637edf68c008b82e9bca2cc0ab9e6d3ce8dfa1a1dd3914aa2f565537a58ee526ca2d58cbe9
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/dumb_delegator.gemspec
CHANGED
@@ -11,13 +11,12 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.homepage = 'https://github.com/stevenharman/dumb_delegator'
|
12
12
|
|
13
13
|
gem.files = `git ls-files`.split($\)
|
14
|
-
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
15
14
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
16
15
|
gem.name = 'dumb_delegator'
|
17
16
|
gem.require_paths = ['lib']
|
18
17
|
gem.version = DumbDelegator::VERSION
|
19
18
|
|
20
|
-
gem.add_development_dependency 'rspec', '~>2.14'
|
21
19
|
gem.add_development_dependency 'pry'
|
22
|
-
gem.add_development_dependency 'rake'
|
20
|
+
gem.add_development_dependency 'rake', '~> 10.0'
|
21
|
+
gem.add_development_dependency 'rspec', '~> 3.1'
|
23
22
|
end
|
data/lib/dumb_delegator.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'set'
|
2
1
|
require 'dumb_delegator/version'
|
3
2
|
|
4
3
|
class DumbDelegator < ::BasicObject
|
@@ -7,7 +6,7 @@ class DumbDelegator < ::BasicObject
|
|
7
6
|
end
|
8
7
|
|
9
8
|
kernel = ::Kernel.dup
|
10
|
-
(kernel.instance_methods - [:dup, :clone, :respond_to
|
9
|
+
(kernel.instance_methods - [:dup, :clone, :respond_to?, :object_id]).each do |method|
|
11
10
|
kernel.__send__ :undef_method, method
|
12
11
|
end
|
13
12
|
include kernel
|
data/spec/dumb_delegator_spec.rb
CHANGED
@@ -115,7 +115,7 @@ describe DumbDelegator do
|
|
115
115
|
describe '#respond_to?' do
|
116
116
|
[:equal?, :__id__, :__send__, :dup, :clone, :__getobj__, :__setobj__, :marshal_dump, :marshal_load, :respond_to?].each do |method|
|
117
117
|
it "responds to #{method}" do
|
118
|
-
expect(dummy.respond_to?(method)).to
|
118
|
+
expect(dummy.respond_to?(method)).to be true
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
@@ -123,7 +123,7 @@ describe DumbDelegator do
|
|
123
123
|
subject(:dummy) { Class.new(DumbDelegator) { def foobar; end }.new([]) }
|
124
124
|
|
125
125
|
it 'respond to methods defined on the subclass' do
|
126
|
-
expect(dummy.respond_to?(:foobar)).to
|
126
|
+
expect(dummy.respond_to?(:foobar)).to be true
|
127
127
|
end
|
128
128
|
end
|
129
129
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,16 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
#
|
6
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
1
|
+
if ENV['CODECLIMATE_REPO_TOKEN']
|
2
|
+
require 'codeclimate-test-reporter'
|
3
|
+
CodeClimate::TestReporter.start
|
4
|
+
end
|
7
5
|
|
8
6
|
require File.expand_path('../lib/dumb_delegator', File.dirname(__FILE__))
|
9
|
-
|
10
7
|
require 'pry'
|
11
8
|
|
12
9
|
RSpec.configure do |config|
|
13
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
14
10
|
config.run_all_when_everything_filtered = true
|
15
11
|
config.filter_run :focus
|
16
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dumb_delegator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Lindeman
|
@@ -9,50 +9,50 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: pry
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '0'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
34
|
+
version: '10.0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
41
|
+
version: '10.0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: rspec
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '3.1'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - "
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '3.1'
|
56
56
|
description: Delegator class that delegates ALL the things
|
57
57
|
email:
|
58
58
|
- alindeman@gmail.com
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.4.2
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Delegator and SimpleDelegator in Ruby's stdlib are somewhat useful, but they
|