bjond-api 0.3.2 → 0.3.3
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/controllers/bjondservices_controller.rb +20 -4
- data/bjond-api.gemspec +3 -3
- 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: c6b916f5e1273f9bcb9ac17f6cf491a4c4f2e501
|
4
|
+
data.tar.gz: 0480d45caa52d56814276c26e426d0357bb81bac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2bc1a0d8b002e1fad5f17ec4f5e90ba4f0955fdf1d46628be9ac69b47ce6bbf0c0f507ea2737f8b7b369789a9cdb7f02a02e61656c8018e61845d973cf8c1b8
|
7
|
+
data.tar.gz: c87c1016a328176b08f0c0529d141c6ae2cf48a6e1a313fdd15e66672fcb52c8d8da6fae77a062bbb0cf3e61cda7d64d38cb224b8e7f79524f9be446b533009e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
@@ -32,7 +32,7 @@ class BjondservicesController < ApplicationController
|
|
32
32
|
|
33
33
|
|
34
34
|
def register_group_endpoint
|
35
|
-
registration =
|
35
|
+
registration = get_registration
|
36
36
|
service = BjondService.find_or_initialize_by(:group_id => params[:groupid], :bjond_registration_id => registration.id)
|
37
37
|
if (service.endpoint != params[:endpoint])
|
38
38
|
service.endpoint = params[:endpoint]
|
@@ -44,7 +44,7 @@ class BjondservicesController < ApplicationController
|
|
44
44
|
################ Encrypted Communication w Bjond servers ################
|
45
45
|
def configure_group_endpoint
|
46
46
|
puts 'configure_group_endpoint'
|
47
|
-
bjond_registration =
|
47
|
+
bjond_registration = get_registration
|
48
48
|
result = jwt_decode_payload_and_return_json(request.raw_post, bjond_registration)
|
49
49
|
BjondApi::BjondAppConfig.instance.configure_group(result, bjond_registration)
|
50
50
|
render :json => {
|
@@ -55,13 +55,29 @@ class BjondservicesController < ApplicationController
|
|
55
55
|
def get_schema
|
56
56
|
puts 'get_schema'
|
57
57
|
render :json => jwt_encode_payload(BjondApi::BjondAppConfig.instance.group_configuration_schema,
|
58
|
-
|
58
|
+
get_registration)
|
59
59
|
end
|
60
60
|
|
61
61
|
def get_group_configuration
|
62
|
-
bjond_registration =
|
62
|
+
bjond_registration = get_registration
|
63
63
|
payload = BjondApi::BjondAppConfig.instance.get_group_configuration(bjond_registration)
|
64
64
|
render :json => jwt_encode_payload(payload.to_json, bjond_registration)
|
65
65
|
end
|
66
66
|
|
67
|
+
def get_registration
|
68
|
+
ap params
|
69
|
+
registration = nil
|
70
|
+
if (params[:environment])
|
71
|
+
puts '**************** Looking up registration by environment'
|
72
|
+
registration = BjondRegistration.find_by_server(params[:environment])
|
73
|
+
end
|
74
|
+
|
75
|
+
if (registration.nil?)
|
76
|
+
puts 'searching by remote request'
|
77
|
+
registration = BjondRegistration.find_registration_by_remote_request(request)
|
78
|
+
end
|
79
|
+
ap registration
|
80
|
+
return registration
|
81
|
+
end
|
82
|
+
|
67
83
|
end
|
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.3.
|
5
|
+
# stub: bjond-api 0.3.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bjond-api".freeze
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Blake Rego".freeze]
|
14
|
-
s.date = "2016-09-
|
14
|
+
s.date = "2016-09-12"
|
15
15
|
s.description = "Rails engine that provides communication between Bj\u{f6}nd Server Core and a client app.".freeze
|
16
16
|
s.email = "blake.rego@bjondinc.com".freeze
|
17
17
|
s.executables = ["rails".freeze]
|
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.3.
|
4
|
+
version: 0.3.3
|
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-09-
|
11
|
+
date: 2016-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|