bjond-api 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/assets/images/bjond-api/BjondHealth-BackgroundALT_20140724.png +0 -0
- data/app/models/bjond_registration.rb +1 -1
- data/app/models/bjond_service.rb +1 -1
- data/bjond-api.gemspec +4 -3
- data/lib/bjond-api.rb +3 -2
- data/lib/bjond-jwt.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9d296807adf4698291ae98e1116a3fc77bf68b6
|
4
|
+
data.tar.gz: 70b85c21eff3b5f9a0737ba35ec5fcfa9310e68e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4439cc5746bfc9d16f827c6e641ea22846c6679587b9abc6ebd56a56d785253d2c1dc817dd63604c0f747f416fcc713061a406a9ccbd64c546dd7ea8cbb55d2d
|
7
|
+
data.tar.gz: c1ea26ec077947ff935eb9914c084d5e89e31633a4e5f6467cdc184a0d7c11ba7ddca5fa3dbe1c538e3ac57188b44875884290f59c6b3d3e136ee15f63aa6693
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
Binary file
|
data/app/models/bjond_service.rb
CHANGED
data/bjond-api.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bjond-api 0.1.
|
5
|
+
# stub: bjond-api 0.1.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bjond-api"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Blake Rego"]
|
14
|
-
s.date = "2016-08-
|
14
|
+
s.date = "2016-08-04"
|
15
15
|
s.description = "Rails engine that provides communication between Bj\u{f6}nd Server Core and a client app."
|
16
16
|
s.email = "blake.rego@bjondinc.com"
|
17
17
|
s.executables = ["rails"]
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
"Rakefile",
|
26
26
|
"VERSION",
|
27
27
|
"app/assets/images/bjond-api/.keep",
|
28
|
+
"app/assets/images/bjond-api/BjondHealth-BackgroundALT_20140724.png",
|
28
29
|
"app/assets/javascripts/bjond-api/.keep",
|
29
30
|
"app/assets/javascripts/bjond_api.js",
|
30
31
|
"app/assets/stylesheets/bjond-api/.keep",
|
data/lib/bjond-api.rb
CHANGED
@@ -14,6 +14,7 @@ module BjondApi
|
|
14
14
|
# Registers the given integration_app with a bjond-server.
|
15
15
|
def self.register_app(integration_app, bjondhost=ENV['BJOND_SERVER'])
|
16
16
|
conn = Faraday.new(:url => bjondhost)
|
17
|
+
puts integration_app.to_json
|
17
18
|
return conn.post do |req|
|
18
19
|
req.url '/server-core/services/integrationmanager/register'
|
19
20
|
req.headers['Content-Type'] = 'application/json'
|
@@ -23,11 +24,11 @@ module BjondApi
|
|
23
24
|
|
24
25
|
##
|
25
26
|
# Fires events to all bjond_registrations
|
26
|
-
def fire_event(bjond_registration, payload)
|
27
|
+
def fire_event(bjond_registration, payload, event_id)
|
27
28
|
services = BjondService.where(:bjond_registration_id => bjond_registration.id)
|
28
29
|
connections = []
|
29
30
|
services.each do |bjond_svc|
|
30
|
-
conn = Faraday.new(:url => bjond_svc.endpoint)
|
31
|
+
conn = Faraday.new(:url => bjond_svc.endpoint + "/#{event_id}")
|
31
32
|
conn.post do |req|
|
32
33
|
req.headers['Content-Type'] = 'application/json'
|
33
34
|
req.body = BjondJwt::jwt_encode_payload(payload, bjond_registration)
|
data/lib/bjond-jwt.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bjond-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Rego
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -113,6 +113,7 @@ files:
|
|
113
113
|
- Rakefile
|
114
114
|
- VERSION
|
115
115
|
- app/assets/images/bjond-api/.keep
|
116
|
+
- app/assets/images/bjond-api/BjondHealth-BackgroundALT_20140724.png
|
116
117
|
- app/assets/javascripts/bjond-api/.keep
|
117
118
|
- app/assets/javascripts/bjond_api.js
|
118
119
|
- app/assets/stylesheets/bjond-api/.keep
|