short_circuit-cj 1.0.1 → 1.0.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 +4 -4
- data/lib/short_circuit/presentable.rb +0 -2
- data/lib/short_circuit/presenter.rb +1 -21
- data/lib/short_circuit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2f59d5cc70a33717b6bbc24958068684b7d76f2
|
4
|
+
data.tar.gz: 0cd823b293f3209b1937c783d07308ff969179db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5c14a9f25849fe30684526ce16d944055ecfab6ef81996877b72fe9de8becdc41d7c2e10e224b9e0597606a9c7bb7f26f578f8665c994849d295dbb5b68f6a1
|
7
|
+
data.tar.gz: 35f23a2fa6d97f844c33126c14a58f63c1a58966bec645ae6010e5c2fd043dea0a612740053037f5ee405f2579170b832594b68b018854c20e1155bd81f22537
|
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
module ShortCircuit
|
4
4
|
class Presenter < SimpleDelegator
|
5
|
-
# delegate :url_helpers, to: 'Rails.application.routes'
|
6
|
-
|
7
5
|
def initialize(presentable_object)
|
8
6
|
instance_variable_set(
|
9
7
|
"@#{presentable_object.class.to_s.gsub(/.+::/, '').underscore}",
|
@@ -12,27 +10,9 @@ module ShortCircuit
|
|
12
10
|
super(presentable_object)
|
13
11
|
end
|
14
12
|
|
13
|
+
# Ignore missing presenter methods
|
15
14
|
def error_response(error, method, *args, &block)
|
16
15
|
''
|
17
16
|
end
|
18
|
-
|
19
|
-
# private
|
20
|
-
#
|
21
|
-
# def controller_helpers
|
22
|
-
# ApplicationController.helpers
|
23
|
-
# end
|
24
|
-
#
|
25
|
-
# def method_missing(method, *args, &block)
|
26
|
-
# puts '====================='
|
27
|
-
# puts "#{method}"
|
28
|
-
# puts '====================='
|
29
|
-
# if controller_helpers.respond_to?(method)
|
30
|
-
# controller_helpers.send(method, *args, &block)
|
31
|
-
# elsif url_helpers.respond_to?(method)
|
32
|
-
# url_helpers.send(method, *args, &block)
|
33
|
-
# else
|
34
|
-
# super(method, *args, &block)
|
35
|
-
# end
|
36
|
-
# end
|
37
17
|
end
|
38
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: short_circuit-cj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Pruetting
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-rails
|