light-decorator 0.5.1 → 0.5.2

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
  SHA1:
3
- metadata.gz: a9b9fd658e557ba46df50b45a8326365cdbf85aa
4
- data.tar.gz: eb4a50aaf0b3aedc03f70bd4177069f301659afc
3
+ metadata.gz: 1b2cc38013100334f2c45e436c169ebbb85fdb9e
4
+ data.tar.gz: 2bf2245562ac16976d6e0d3c375fc7eba8124f9e
5
5
  SHA512:
6
- metadata.gz: a2cc0a0245dafacbee23a48d29a544909b6cd02da5ad5424833cc9693a050dc07409535bdb2f1e9e4471c0c4dce493ff5f6a01794300bc874cb351d66b3424cd
7
- data.tar.gz: fa8f87d54fd847879e9074c5fbe6c6d19ef77c4dd71e6b523c4db493af0631a0f08e195ae32d5a09d898f7de66dff1a5feacb030976c20a6e9d51efbbad1fd0a
6
+ metadata.gz: 4e51d3e2e781813f986e62b768ed93eb0988e24217cf455af5eefe90288732dce0083faa05277de1e0906a35d25a14bfaf2a2e244d28603d3c8e22551ad9a557
7
+ data.tar.gz: cbed29f31d8ad962ed1c5c76e240f25b6cfadc7a3b648c1487f1a716672f1e92c4957f9ed57664a6c17c049ba7956b161db45697f3ec275b92288660eca66023
data/README.md CHANGED
@@ -15,7 +15,7 @@ Decorator pattern - What is it?
15
15
  Add this line to your application's Gemfile:
16
16
 
17
17
  ```ruby
18
- gem 'light-decorator', '~> 0.5.0'
18
+ gem 'light-decorator', '~> 0.5.2'
19
19
  ```
20
20
 
21
21
  ## Usage
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- light-decorator (0.5.0)
4
+ light-decorator (0.5.1)
5
5
  rails (>= 4.0.0)
6
6
  request_store (>= 1.0.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- light-decorator (0.5.0)
4
+ light-decorator (0.5.1)
5
5
  rails (>= 4.0.0)
6
6
  request_store (>= 1.0.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- light-decorator (0.5.0)
4
+ light-decorator (0.5.1)
5
5
  rails (>= 4.0.0)
6
6
  request_store (>= 1.0.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- light-decorator (0.5.0)
4
+ light-decorator (0.5.1)
5
5
  rails (>= 4.0.0)
6
6
  request_store (>= 1.0.0)
7
7
 
@@ -13,8 +13,6 @@ require 'light/decorator/decorate'
13
13
 
14
14
  module Light
15
15
  module Decorator
16
- NOT_DELEGATABLE_METHODS = (
17
- Kernel.methods + ActiveRecord::Base.methods + [:decorated?, :==, :===, :eql?, :equal?]
18
- ).freeze
16
+ FORCE_DELEGATE = [:to_param].freeze
19
17
  end
20
18
  end
@@ -52,7 +52,7 @@ module Light
52
52
 
53
53
  def delegate_methods
54
54
  # It's more faster than using Forwardable
55
- (object.public_methods - methods - Light::Decorator::NOT_DELEGATABLE_METHODS).each do |method|
55
+ (object.public_methods - methods + Light::Decorator::FORCE_DELEGATE).each do |method|
56
56
  define_singleton_method method do |*args, &block|
57
57
  object.__send__(method, *args, &block)
58
58
  end
@@ -1,5 +1,5 @@
1
1
  module Light
2
2
  module Decorator
3
- VERSION = '0.5.1'.freeze
3
+ VERSION = '0.5.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: light-decorator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Emelianenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-15 00:00:00.000000000 Z
11
+ date: 2016-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails