gifted 0.1.0 → 0.2.0

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: 2ece94319acfed183417eba523628e5114f26bcfd5c2a73d4bd0463c233147dd
4
- data.tar.gz: 5dbbab9578f5e6f0019757fe4d6edd70c202030f43f17db6d69bcf88d1470e84
3
+ metadata.gz: eeebd0032deb2eeb3807a1fb62d9f0f5d550e122c30ce11255239bc85cd0cb43
4
+ data.tar.gz: e5257438a37a2c99e4d614bafc538662f984f2c93f5e5f6a01430a9b51cd0629
5
5
  SHA512:
6
- metadata.gz: 770cdc16ca0bd4e9cd5a04e4eb22dcad4e2202a0b2da3373a8ac3764354931d7736cb984654afd8b3f74c2be4e09bcec537d1947209a7827a0eea298cc058abb
7
- data.tar.gz: 744873ea14f98a727f68fe9bdfffdaf4284615fab164c9781ead73bbe7c134855e9fc70be82e8cec9777afe5602cfd04731869673cdcf1edb50dc32194a5a87e
6
+ metadata.gz: eb87190c4391255500961f2bdcde3ab95d7544164aa3e6d00a6c5f48a0c67c0a5fcfa16994c702a4e2b776422898248a0f7e6fd2221cb2c14a9249a1f7eaa192
7
+ data.tar.gz: d9ab08c52ad6c6b7b2e9074e9d3d0ed7270210643c52134fb45b532740da9c805e191233cbacdffa93d9e55323fa9f56d6a98a492535ebaae6d4dc15eb2f7281
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Gifted
2
2
 
3
- Simple, yet powerful decorators for Ruby on Rails, inspired (and forked) from [ActiveDecorator](https://github.com/amatsuda/active_decorator). It has the following goals:
3
+ Simple, powerful, and explicit decorators for Ruby on Rails, inspired (and forked) from [ActiveDecorator](https://github.com/amatsuda/active_decorator). It has the following goals:
4
4
 
5
5
  1. Fast and efficient.
6
6
  2. Implicit decorators.
@@ -21,7 +21,7 @@ module Gifted
21
21
 
22
22
  if view
23
23
  decorator = default_decorator.const_get("#{view.to_s.camelcase}Decorator")
24
- decorator.send :include, Gifted::ViewContext unless decorator.is_a?(Class)
24
+ decorator.send :include, Gifted::ViewHelpers unless decorator.is_a?(Class)
25
25
  end
26
26
 
27
27
  SimpleDelegator.new(self).extend decorator
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gifted
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -10,5 +10,9 @@ module Gifted
10
10
  def respond_to_missing?(method_name, *args)
11
11
  Gifted::ViewContext.current.respond_to?(method_name) || super
12
12
  end
13
+
14
+ def controller
15
+ @controller ||= Gifted::ViewContext.current.instance_variable_get(:@_controller)
16
+ end
13
17
  end
14
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gifted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-20 00:00:00.000000000 Z
11
+ date: 2019-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
- rubygems_version: 3.0.3
172
+ rubygems_version: 3.0.4
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: Simple, yet Powerful Rails Decorators