sinatra-rest-base 1.0.4 → 1.0.5
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/README.md +5 -3
- data/lib/rest_base/application_helper.rb +1 -1
- data/lib/rest_base/version.rb +1 -1
- data/spec/lib/rest_base/error_status_handeling_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff6f4161b7d5522f0eb184d73b71293be4b5d30c
|
4
|
+
data.tar.gz: 447ad644655c050702ff3cdd63c5aa42d9bf6264
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c846f4ed62acf44a8cd0830f828e23e7b2dec06eb0b69b44d2e2667d2d8f45344791edfff60b3f511b70c6a8350fce594998b1590275aa38e6e4adb3f5d58753
|
7
|
+
data.tar.gz: 985c2c0dc8638a77c59588b63ca6ef71751d4d14be684cee5b7077effbbac546df73d465852119f0dcd233e92a41b1070d39e1fc9c5bb478600119e2484f4c17
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/sinatra-rest-base)
|
4
4
|
|
5
|
+
[](https://www.omniref.com/ruby/gems/sinatra-rest-base)
|
6
|
+
|
5
7
|
Core base for quick configuration of Sinatra for RESTful Services
|
6
8
|
|
7
9
|
#### What Does the Core Cover
|
@@ -44,16 +46,16 @@ Normal Sinatra Appication inherit from either Sinatra::Application or Sinatra::B
|
|
44
46
|
In your main application file, do the following:
|
45
47
|
|
46
48
|
```
|
47
|
-
require '
|
49
|
+
require 'rest_base'
|
48
50
|
|
49
|
-
class SinatraApp <
|
51
|
+
class SinatraApp < RestBase::Application
|
50
52
|
end
|
51
53
|
```
|
52
54
|
|
53
55
|
then in any other partial class file of the main application file, you just have to name the class like follow:
|
54
56
|
|
55
57
|
```
|
56
|
-
require '
|
58
|
+
require 'rest_base'
|
57
59
|
|
58
60
|
class SinatraApp
|
59
61
|
|
data/lib/rest_base/version.rb
CHANGED
@@ -20,7 +20,7 @@ describe RestBase::Application do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should create a hashed error response based on the body" do
|
23
|
-
@expected_body[:errors] = { :error => "This is the hashed error handler" }
|
23
|
+
@expected_body[:errors] = [{ :error => "This is the hashed error handler" }]
|
24
24
|
|
25
25
|
get '/hashed_error_handeling', {}, @headers
|
26
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-rest-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bmills
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|