rack_middleware_json_error_msg 0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfd379ea6e3edb3cc771ee5baf3ae65521b17453
|
4
|
+
data.tar.gz: 1fd657cae09936c3b85c5447def1bea930aefa22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bc7702897f720bb26fc121074edcde73d96cc411881348e09ea9bccfe823e31b9006aea68493e3c7a90be147ef70444642f776e7cbb0a51d566950559bada03
|
7
|
+
data.tar.gz: 8f83d5f5ba070c086e84164fb1552b7782cb44a29591b3bbec27977200f713e4589b07364a7edc50d083cdb4c2c9640962710a11eacecd800814be2036bcad7a
|
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
@@ -1,10 +1,17 @@
|
|
1
|
-
require 'json-error-msg/railtie' if defined?(Rails)
|
2
1
|
|
3
2
|
module Rack
|
4
3
|
module Middleware
|
5
4
|
class JsonErrorMsg
|
6
5
|
class Error < StandardError; end
|
7
6
|
|
7
|
+
if defined?(Rails)
|
8
|
+
class Railtie < Rails::Railtie
|
9
|
+
initializer "json-error-msg.configure_rails_initialization" do |app|
|
10
|
+
app.middleware.insert_before ActionDispatch::ParamsParser, "Rack::Middleware::JsonErrorMsg"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
8
15
|
attr_reader :app
|
9
16
|
|
10
17
|
def initialize(app)
|
@@ -0,0 +1 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/rack/middleware/json-error-msg"
|
@@ -1,17 +1,17 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: rack_middleware_json_error_msg 0.
|
2
|
+
# stub: rack_middleware_json_error_msg 0.2 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "rack_middleware_json_error_msg"
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.2"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.authors = ["Andrew Snow"]
|
10
10
|
s.date = "2014-02-05"
|
11
11
|
s.description = "Rails middleware to catch JSON parse errors and return error in JSON format"
|
12
12
|
s.email = "andrew@modulus.org"
|
13
|
-
s.extra_rdoc_files = ["CHANGELOG", "README.md", "lib/rack/middleware/json-error-msg.rb", "lib/
|
14
|
-
s.files = ["CHANGELOG", "Manifest", "README.md", "Rakefile", "lib/rack/middleware/json-error-msg.rb", "lib/
|
13
|
+
s.extra_rdoc_files = ["CHANGELOG", "README.md", "lib/rack/middleware/json-error-msg.rb", "lib/rack_middleware_json_error_msg.rb"]
|
14
|
+
s.files = ["CHANGELOG", "Manifest", "README.md", "Rakefile", "lib/rack/middleware/json-error-msg.rb", "lib/rack_middleware_json_error_msg.rb", "test/test.rb", "rack_middleware_json_error_msg.gemspec"]
|
15
15
|
s.homepage = "https://github.com/andys/rack_middleware_json_error_msg"
|
16
16
|
s.rdoc_options = ["--line-numbers", "--title", "Rack_middleware_json_error_msg", "--main", "README.md"]
|
17
17
|
s.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack_middleware_json_error_msg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Snow
|
@@ -33,14 +33,14 @@ extra_rdoc_files:
|
|
33
33
|
- CHANGELOG
|
34
34
|
- README.md
|
35
35
|
- lib/rack/middleware/json-error-msg.rb
|
36
|
-
- lib/
|
36
|
+
- lib/rack_middleware_json_error_msg.rb
|
37
37
|
files:
|
38
38
|
- CHANGELOG
|
39
39
|
- Manifest
|
40
40
|
- README.md
|
41
41
|
- Rakefile
|
42
42
|
- lib/rack/middleware/json-error-msg.rb
|
43
|
-
- lib/
|
43
|
+
- lib/rack_middleware_json_error_msg.rb
|
44
44
|
- test/test.rb
|
45
45
|
- rack_middleware_json_error_msg.gemspec
|
46
46
|
homepage: https://github.com/andys/rack_middleware_json_error_msg
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module Rack
|
2
|
-
module Middleware
|
3
|
-
module JsonErrorMsg
|
4
|
-
class Railtie < Rails::Railtie
|
5
|
-
initializer "json-error-msg.configure_rails_initialization" do |app|
|
6
|
-
app.middleware.insert_before ActionDispatch::ParamsParser, "Rack::Middleware::JsonErrorMsg::JsonErrorMsg"
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|