appfuel 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/appfuel.gemspec +1 -1
- data/lib/appfuel/initializers/all.rb +1 -1
- data/lib/appfuel/initializers/web_api.rb +1 -1
- data/lib/appfuel/storage/web_api/http_model.rb +23 -7
- data/lib/appfuel/storage/web_api/repository.rb +4 -0
- data/lib/appfuel/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 791084a5719110e76c41bf1eb305ca214dcad6ae
|
4
|
+
data.tar.gz: 89567858ea98c91f2e034c709d8662b8ae1ef2a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1547177ab48f3ba39e1e7cd71bfe01d22d86341cb7f5affc746ba65cf5011ef0aeeb41acf5d496abf9513d63c9a0263e09ef9ea0ad9deac6e0f85fb8c276be4e
|
7
|
+
data.tar.gz: 9815ebdf21d91cff4d8deefd97ac0305da22939f2476bf0a12e3cdb9407d30ffee66262552932bfd64f962b403aab1c8b560f4ca3f922fff92f57259d66a832d
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. (Pending ap
|
|
5
5
|
|
6
6
|
|
7
7
|
# Releases
|
8
|
+
## [[0.4.4]] (https://github.com/rsb/appfuel/releases/tag/0.4.4) 2017-06-21
|
9
|
+
### Changed
|
10
|
+
- upgraded `active record to 5.1.1`
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
- invalid require statement for logging initializer
|
14
|
+
- invalid container key for web_api initializer
|
15
|
+
|
8
16
|
## [[0.4.3]](https://github.com/rsb/appfuel/releases/tag/0.4.3) 2017-06-21
|
9
17
|
### Fixed
|
10
18
|
- db config definition referenced invalid namespace
|
data/appfuel.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
# we have to lock dry-types due to failures I am encountering
|
24
24
|
# when dynamically creating form validators. Not sure if it is the library
|
25
25
|
# or the way I am using it.
|
26
|
-
spec.add_dependency "activerecord", "~> 5.1.
|
26
|
+
spec.add_dependency "activerecord", "~> 5.1.1"
|
27
27
|
spec.add_dependency "pg", "~> 0.20"
|
28
28
|
spec.add_dependency "dry-types", "0.9.2"
|
29
29
|
spec.add_dependency "dry-container", "~> 0.6"
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'uri'
|
2
|
+
require 'json'
|
3
|
+
require 'rest-client'
|
2
4
|
|
3
5
|
module Appfuel
|
4
6
|
module WebApi
|
@@ -58,21 +60,35 @@ module Appfuel
|
|
58
60
|
uri.to_s + "/#{path}"
|
59
61
|
end
|
60
62
|
|
61
|
-
def
|
63
|
+
def request(method, path, options = {})
|
62
64
|
add_content_type(options)
|
63
|
-
|
65
|
+
http_url = url(path)
|
66
|
+
begin
|
67
|
+
data = options.merge({method: method, url: http_url })
|
68
|
+
response = adapter::Request.execute(data)
|
69
|
+
parse_json = options.delete(:json)
|
70
|
+
if parse_json == true
|
71
|
+
response = json(response.body)
|
72
|
+
end
|
73
|
+
rescue => err
|
74
|
+
msg = "[#{http_url}] #{err.message}"
|
75
|
+
err.message = msg
|
76
|
+
raise err
|
77
|
+
end
|
78
|
+
|
79
|
+
response
|
64
80
|
end
|
65
81
|
|
66
|
-
def
|
67
|
-
|
68
|
-
adapter.post(url(path), params, options)
|
82
|
+
def json(data)
|
83
|
+
JSON.parse(data)
|
69
84
|
end
|
70
85
|
|
71
86
|
private
|
72
87
|
|
73
88
|
def add_content_type(options)
|
74
|
-
|
75
|
-
|
89
|
+
options[:headers] ||= {}
|
90
|
+
if content_type && !options[:headers].key?(:content_type)
|
91
|
+
options[:headers][:content_type] = content_type
|
76
92
|
end
|
77
93
|
end
|
78
94
|
end
|
data/lib/appfuel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appfuel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Scott-Buccleuch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.1.
|
19
|
+
version: 5.1.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.1.
|
26
|
+
version: 5.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pg
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|