short_circuit-cj 1.0.1 → 1.0.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: 8733b377c467218130cffad542584f043b80e77b
4
- data.tar.gz: 5139424a783effc354c7ce990251127c89c9af7e
3
+ metadata.gz: d2f59d5cc70a33717b6bbc24958068684b7d76f2
4
+ data.tar.gz: 0cd823b293f3209b1937c783d07308ff969179db
5
5
  SHA512:
6
- metadata.gz: 685ff084a1d27fa5b8f5456e43f9b0758058ad0cf9da58f107e54884bed0f42dec2ff5564b96719176c16e19bfdd7c8ba3411e5b97e71ab2e5f4285af4dbb6ed
7
- data.tar.gz: c7b69dd3d078dc42b2f891d9c58ac31401d82cbb9744040398c9a722ca065e7bb94b9a328499d295f66b514441b3a2ee6f975a0bad97f6b01ea0962e714aa03a
6
+ metadata.gz: b5c14a9f25849fe30684526ce16d944055ecfab6ef81996877b72fe9de8becdc41d7c2e10e224b9e0597606a9c7bb7f26f578f8665c994849d295dbb5b68f6a1
7
+ data.tar.gz: 35f23a2fa6d97f844c33126c14a58f63c1a58966bec645ae6010e5c2fd043dea0a612740053037f5ee405f2579170b832594b68b018854c20e1155bd81f22537
@@ -6,8 +6,6 @@ module ShortCircuit
6
6
 
7
7
  def present(method, *args, &block)
8
8
  present!(method, *args, &block)
9
- rescue Exception => error
10
- presenter.error_response(error, method, *args, &block)
11
9
  end
12
10
 
13
11
  def present!(method, *args, &block)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ShortCircuit
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  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.1
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-05 00:00:00.000000000 Z
11
+ date: 2014-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails