norseal-api 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/norseal/api.rb +4 -3
- data/lib/norseal/api/model.rb +12 -0
- data/lib/norseal/api/resources/collection.rb +10 -0
- data/lib/norseal/api/resources/product.rb +10 -0
- data/lib/norseal/api/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9134aaf610371030f8838b7adb0e8ab06aeead91
|
4
|
+
data.tar.gz: c6ffa4030d4a7fc2b93a682e480635754184cccf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 611065902bf086be3da52cf0bb975cdc16e0687066961085d5420e06e46bc1b97e2549bb6178961005947088dc4fe48eb5a14773623e1ab6e0c57f104256f9c1
|
7
|
+
data.tar.gz: a4da31cfeb3849c594006be3f8d5c2f0b3d1385c8e484e6bd61767329f0686bd74590454e8f852bf0169280276b105d2455ea19223fc803b278fee82ca08d9f9
|
data/.gitignore
CHANGED
data/lib/norseal/api.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'her'
|
2
|
+
require 'faraday_middleware'
|
2
3
|
require 'active_support/concern'
|
3
4
|
require 'norseal/api/model'
|
4
5
|
|
@@ -10,7 +11,7 @@ module Norseal
|
|
10
11
|
@api = Her::API.new
|
11
12
|
|
12
13
|
@api.setup :url => "http://#{host}/" do |c|
|
13
|
-
|
14
|
+
c.use FaradayMiddleware::EncodeJson
|
14
15
|
c.use Her::Middleware::AcceptJSON
|
15
16
|
c.use Her::Middleware::FirstLevelParseJSON
|
16
17
|
|
@@ -21,8 +22,8 @@ module Norseal
|
|
21
22
|
c.adapter Faraday.default_adapter unless c.builder.handlers.include?(Faraday::Adapter::Test)
|
22
23
|
end
|
23
24
|
|
24
|
-
require "api/resources/collection"
|
25
|
-
require "api/resources/product"
|
25
|
+
require "norseal/api/resources/collection"
|
26
|
+
require "norseal/api/resources/product"
|
26
27
|
end
|
27
28
|
|
28
29
|
def self.api
|
data/lib/norseal/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: norseal-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Barton
|
@@ -98,6 +98,9 @@ files:
|
|
98
98
|
- bin/console
|
99
99
|
- bin/setup
|
100
100
|
- lib/norseal/api.rb
|
101
|
+
- lib/norseal/api/model.rb
|
102
|
+
- lib/norseal/api/resources/collection.rb
|
103
|
+
- lib/norseal/api/resources/product.rb
|
101
104
|
- lib/norseal/api/version.rb
|
102
105
|
- norseal-api.gemspec
|
103
106
|
homepage: http://norseal.co.uk
|