ramen-rails 0.1.1 → 0.1.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: 1016f04b953432c937478ec7b0ba5108529dc24f
4
- data.tar.gz: 8ebebd5f937a2ead5db67595224cddddad8cf4f7
3
+ metadata.gz: 75812823bdafd977f5b705436041811fdc3c52f6
4
+ data.tar.gz: 291339958c984c2ddf12ba64c67a7a4a41f2745e
5
5
  SHA512:
6
- metadata.gz: f439b4ba02ba3c50c7bf51d925cbb3511244e48916683afbb4eac732412b3be24f169af844d3531d7c94340077491a526572e85c10c5db8298692f6897ced56c
7
- data.tar.gz: 3bc312d9c79ba50fb47a0a3af95c414b904381f4901d48f991b701ba5d860c8f87c9865018f812463d28f536aa0ed3ccf202171283b0177b15939f35bffa25ea
6
+ metadata.gz: 176508cd313e9512f0ecb12ae171f488964576dc528f48dacf9c0144c15d3f8fe4ab5da8d80d914a21f183c64d442f8a5112317f641acee14e94fb4f8a739ef0
7
+ data.tar.gz: 2a880d453aa10b4cfc843133eb6658218d9c166611605dc3a207d318b55807722e2d24073f8362f9de37df0578df022dfa58cd5913e4d88e869e30c04807148d
@@ -161,6 +161,13 @@ module RamenRails
161
161
  obj[:custom_links] = ramen_custom_links if ramen_custom_links.present?
162
162
 
163
163
  super(obj, organization_secret: ramen_org_secret)
164
+
165
+ rescue InvalidUserObject => e
166
+ ::Rails.logger.debug "InvalidUserObject exception. Not rendering Ramen script tag. Error details: #{e.inspect}"
167
+ "<!-- Exception in ramen script tag. See logs. -->"
168
+ rescue => e
169
+ ::Rails.logger.debug "Exception in ramen-rails script tag method. Not rendering Ramen script tag. Error details: #{e.inspect}"
170
+ "<!-- Exception in ramen script tag. See logs. -->"
164
171
  end
165
172
 
166
173
  end
@@ -1,3 +1,3 @@
1
1
  module RamenRails
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -13,6 +13,24 @@ describe 'After filter' do
13
13
  body: "<html><body>hi</body>"
14
14
  }
15
15
  })
16
+
17
+ module Rails
18
+ class LogProxy
19
+ def debug(msg)
20
+ end
21
+ end
22
+
23
+ def self.env
24
+ Hashie::Mash.new({
25
+ :development? => nil,
26
+ :production? => nil
27
+ })
28
+ end
29
+
30
+ def self.logger
31
+ LogProxy.new
32
+ end
33
+ end
16
34
  end
17
35
 
18
36
  describe "with no config" do
@@ -45,10 +63,9 @@ describe 'After filter' do
45
63
  @dummy.current_user = {email: 'ryan@ramen.is', id: 'person-1234'}
46
64
  end
47
65
 
48
- it "should throw an error" do
49
- expect do
50
- RamenRails::RamenAfterFilter.filter(@dummy)
51
- end.to raise_error(RamenRails::RamenAfterFilter::InvalidUserObject)
66
+ it "should render a comment erro" do
67
+ RamenRails::RamenAfterFilter.filter(@dummy)
68
+ expect(@dummy.response.body).to include("See logs")
52
69
  end
53
70
  end
54
71
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ramen-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Angilly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-07 00:00:00.000000000 Z
11
+ date: 2015-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack