forest_liana 1.1.10 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/forest_liana/engine.rb +14 -7
- data/lib/forest_liana/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2de6a49375fc9e9d3f93fd7f6241f9605c370d15
|
4
|
+
data.tar.gz: 51675428236077433a0995b34fc3460480fafca4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a5d12097d0aa88d79ef77d91de474952583423d21e26ac35d98da1dc0c0d0a4f1c7205f14c5a37cfc108de20a432629587f35ee4cc56f5e459c2f5f74bfb366
|
7
|
+
data.tar.gz: 730e0a14c81553a9cdb9e1b21882f9008f5df485e52bb594d4b825cf0e3b60c9a3cf8afb334a2dcb65f0eb1d6a9cc8e46e981489e0a8efbfd4af5d1f97a23292
|
data/lib/forest_liana/engine.rb
CHANGED
@@ -2,7 +2,7 @@ require 'rack/cors'
|
|
2
2
|
require 'stripe'
|
3
3
|
require 'jsonapi-serializers'
|
4
4
|
require 'groupdate'
|
5
|
-
require
|
5
|
+
require "net/http"
|
6
6
|
|
7
7
|
module ForestLiana
|
8
8
|
class Engine < ::Rails::Engine
|
@@ -49,13 +49,20 @@ module ForestLiana
|
|
49
49
|
is_collection: true,
|
50
50
|
meta: { liana: 'forest-rails', liana_version: liana_version }
|
51
51
|
})
|
52
|
-
response = HTTP
|
53
|
-
.headers(forest_secret_key: ForestLiana.jwt_signing_key)
|
54
|
-
.post("#{forest_url}/forest/apimaps", json: json)
|
55
52
|
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
|
54
|
+
uri = URI.parse("#{forest_url}/forest/apimaps")
|
55
|
+
Net::HTTP.new(uri.host, uri.port).start do |client|
|
56
|
+
request = Net::HTTP::Post.new(uri.path)
|
57
|
+
request.body = json.to_json
|
58
|
+
request['Content-Type'] = 'application/json'
|
59
|
+
request['forest-secret-key'] = ForestLiana.jwt_signing_key
|
60
|
+
response = client.request(request)
|
61
|
+
|
62
|
+
if response.is_a?(Net::HTTPNotFound)
|
63
|
+
logger.warn "Forest cannot find your project secret key. " \
|
64
|
+
"Please, run `rails g forest_liana:install`."
|
65
|
+
end
|
59
66
|
end
|
60
67
|
end
|
61
68
|
end
|
data/lib/forest_liana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: http
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
111
|
description: Forest Rails Liana
|
126
112
|
email:
|
127
113
|
- sandro@munda.me
|