rinfo 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48bf8ab63486dafa4d75ae5648ea021cfc24670e
4
- data.tar.gz: 24aca6b70c28dae0ce9acf3f8328a58ef32e5bbb
3
+ metadata.gz: 240215c899a894034febb6720816fe85ef35b685
4
+ data.tar.gz: 4cce294d94ae5410caff2e1120121887af1cdd83
5
5
  SHA512:
6
- metadata.gz: aea752affa94e2246eec334ab5d80c4ac95acee8d0a0a660c9be8b9989df98d1265231dd98f1be657c6f9b17007c4073f1eb6181a6adb8fefe6228ba57c716d5
7
- data.tar.gz: f1b8a6bbbf7720d10f329cf555676d7a6c1c4b9e749272fbec882eb1ee8800a76dea4e19f10f5757e4c5383dd99639128602201c5d2cb6fdc2a334fb1b7630bf
6
+ metadata.gz: 107f38e6734bf41370aeca07d3a5219a0014a5c1a0666cf2be63800c429d777b9966047c28782b6b4c7bb2cac87017e10095207bda5ce9835cce0775be0d5ec6
7
+ data.tar.gz: 8651230a80852b7cd94c668d50bc6175685ddab2ba6ce11001608b5e7be82e630d293ecddd1af57cd25dfe39a3214f701cca8a23d670d96267b90e1a8f6dee6f
@@ -5,7 +5,5 @@ class RinfoController < ApplicationController
5
5
 
6
6
  def info
7
7
  render json: Rinfo.inform!
8
- rescue
9
- render nothing: true, status: 404
10
8
  end
11
9
  end
data/lib/rinfo.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'rinfo/engine'
4
4
  require 'git'
5
- require 'action_controller'
6
5
 
7
6
  class Rinfo
8
7
  autoload :VERSION, 'rinfo/version'
@@ -14,7 +13,7 @@ class Rinfo
14
13
  if should_inform?
15
14
  JSON.pretty_generate(rinfo)
16
15
  else
17
- fail ActionController::RoutingError 'Not Found'
16
+ fail ActionController::RoutingError, 'Not Found'
18
17
  end
19
18
  end
20
19
 
data/lib/rinfo/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  unless defined?(Rinfo::VERSION)
4
4
  class Rinfo
5
- VERSION = '0.1.3'
5
+ VERSION = '0.1.4'
6
6
  end
7
7
  end
@@ -72,8 +72,9 @@ describe RinfoController, type: :controller do
72
72
  it 'does not display rinfo for blacklisted envs' do
73
73
  default_blacklist.each do |env|
74
74
  Rinfo.stub(:env).and_return(env.to_s)
75
- get 'info', format: :json
76
- response.status.should == 404
75
+ expect { get 'info', format: :json }.to raise_error(
76
+ ActionController::RoutingError
77
+ )
77
78
  end
78
79
  end
79
80
 
@@ -108,8 +109,9 @@ describe RinfoController, type: :controller do
108
109
  it 'does not display rinfo for any envs' do
109
110
  rails_envs.each do |env|
110
111
  Rinfo.stub(:env).and_return(env.to_s)
111
- get 'info', format: :json
112
- response.status.should == 404
112
+ expect { get 'info', format: :json }.to raise_error(
113
+ ActionController::RoutingError
114
+ )
113
115
  end
114
116
  end
115
117
  end
@@ -122,8 +124,9 @@ describe RinfoController, type: :controller do
122
124
  it 'does not display rinfo for blacklisted envs' do
123
125
  custom_blacklist.each do |env|
124
126
  Rinfo.stub(:env).and_return(env.to_s)
125
- get 'info', format: :json
126
- response.status.should == 404
127
+ expect { get 'info', format: :json }.to raise_error(
128
+ ActionController::RoutingError
129
+ )
127
130
  end
128
131
  end
129
132
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafe Colton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-22 00:00:00.000000000 Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake