saoshyant 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/.bundle/config +2 -0
- data/.rspec +2 -0
- data/saoshyant.gemspec +5 -2
- data/spec/saoshyant_test.rb +13 -0
- data/spec/spec_helper.rb +4 -0
- metadata +48 -4
- data/Rackfile +0 -8
- data/lib/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 461025d6d6b837a13f28418ecebc1ad466e799149c2baf5d8f4f7d825971c322
|
4
|
+
data.tar.gz: b0b2f92dc62d946a9fd1716f328cbe7e5a4162bb99b6feeb29b77977cabe7bb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a011a4f7d9fedce5dae96bcbbaff0bec49e9053e0a08dc5175d6de31a987bb25a6ac92ed7a9a944ad68c4a67d46609edbd5029c6ffd9623d7f531e42773e487
|
7
|
+
data.tar.gz: 7f202cc6d9163b312113d937b40d36be3b3e56631806748a6434c284f68773bfddab5a7d2f1781e46c14ea8425cbd48924f80f8b35dd21f9067f131684dfee00
|
data/.bundle/config
ADDED
data/.rspec
ADDED
data/saoshyant.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
require 'version'
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'saoshyant'
|
5
|
-
s.version = '1.0.
|
5
|
+
s.version = '1.0.2'
|
6
6
|
s.date = '2020-02-10'
|
7
7
|
s.summary = "Handle Rails Exception Apis"
|
8
8
|
s.description = "when exceptoin raised we dont want see it in ugly and red display, saoshyant present it in json response"
|
@@ -13,4 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
|
14
14
|
s.files = `git ls-files`.split("\n")
|
15
15
|
s.require_paths = ['lib']
|
16
|
+
s.add_development_dependency("bundler")
|
17
|
+
s.add_development_dependency("rake")
|
18
|
+
s.add_development_dependency("rspec")
|
16
19
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Saoshyant do
|
4
|
+
describe 'JsonExceptionHandeler' do
|
5
|
+
it 'expect get error for invalid code status' do
|
6
|
+
expect{ Saoshyant::JsonExceptionHandeler.customize(NameError, '200', false) }.to raise_error(RuntimeError)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'expect get error for invalid log status' do
|
10
|
+
expect{ Saoshyant::JsonExceptionHandeler.customize(NameError, 203, 'true') }.to raise_error(RuntimeError)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saoshyant
|
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
|
- Majid Imanzade
|
@@ -9,7 +9,49 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2020-02-10 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
13
55
|
description: when exceptoin raised we dont want see it in ugly and red display, saoshyant
|
14
56
|
present it in json response
|
15
57
|
email: majidimanzade1@gmail.com
|
@@ -17,14 +59,16 @@ executables: []
|
|
17
59
|
extensions: []
|
18
60
|
extra_rdoc_files: []
|
19
61
|
files:
|
62
|
+
- ".bundle/config"
|
20
63
|
- ".gitignore"
|
64
|
+
- ".rspec"
|
21
65
|
- Gemfile
|
22
|
-
- Rackfile
|
23
66
|
- lib/exception_logger.rb
|
24
67
|
- lib/json_exception_handeler.rb
|
25
68
|
- lib/saoshyant.rb
|
26
|
-
- lib/version.rb
|
27
69
|
- saoshyant.gemspec
|
70
|
+
- spec/saoshyant_test.rb
|
71
|
+
- spec/spec_helper.rb
|
28
72
|
homepage: https://rubygems.org/gems/saoshyant
|
29
73
|
licenses:
|
30
74
|
- MIT
|
data/Rackfile
DELETED