bjond-api 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5b3db67dbf4500674196ded38c4b97a22e3f07c
4
- data.tar.gz: 93c429a9bfe01519b53d41cad3ca4ae42d29567f
3
+ metadata.gz: a7b81ee49414cac74b7f51d400247cee6931f310
4
+ data.tar.gz: c24b8277dbde3df6928558f2e42e3a9c8d284afa
5
5
  SHA512:
6
- metadata.gz: 432dc0948fe277538454148223c798a791df0a19b94ca98a06b054b0157b71394b687b2da0b9cf3a7087fc7a0424ff97397d05e4aeb8ee83b3ad5bda2f769496
7
- data.tar.gz: 15bb9d4fce680837b61d231d01d31e1e5fe55220590a3a922e40aafc803d97161244dd1505260481a11a25ec688c3db2f633ff89053c654c0f4f282acd55f3af
6
+ metadata.gz: 182a485229079b733a9cd921e3ccdf09678d085e9f2000123910b9eafa8fa825073940ad4cd0fbae352248c6b3000c9ca6d39423feb6466f325a5e6ef4633dc7
7
+ data.tar.gz: 688f9970f6a6024717fd4dd469c35e92eea7872a0ee49c3c9ab046d76ac2a75babadb1f150bf2df77ed3a8835bea4094d0550f630cc2aa9ef30c109368b956ca
@@ -49,13 +49,25 @@ In application.js, include scripts using -
49
49
 
50
50
  //= require bjond-api
51
51
 
52
+ Also, remove references to turbolinks.
53
+
52
54
  From your angular app, include our module as a dependency -
53
55
 
54
56
  angular.module('your-app',['bjond-api']);
55
57
 
58
+ From application.css, require the core css:
59
+
60
+ *= require 'bjond_registrations'
61
+
56
62
  - (5b) The generator will also create a root config create a config file that will initialize important variables for the Bjond-App gem. This will be copied into your app at: config/initializers/bjond-api-initializer.rb
57
63
 
58
- (6) Set-up Encryption Key
64
+ (6) The angular / css can be loaded by using the following code in the application.html.erb:
65
+
66
+ <div class="bjond-application" ng-app="bjond-app">
67
+ <%= yield %>
68
+ </div>
69
+
70
+ (7) Set-up Encryption Key
59
71
 
60
72
  For security, the encryption keys stored from Bjond Server are themselves encrypted. Define the following environment variable: APP_ENCRYPTION_KEY. If you have multiple apps in your environment, you can modify the name of this constant using BjondApi::BjondAppConfig.instance.encryption_key_name.
61
73
 
@@ -77,6 +89,14 @@ and
77
89
 
78
90
  BJOND_ADAPTER_AUDIENCE
79
91
 
92
+ (8) Set URL Options. In `development.rb`, set your local development options:
93
+
94
+ config.action_controller.default_url_options = {
95
+ :host => "localhost:3002",
96
+ :root_url => "http://localhost:3002"
97
+ }
98
+
99
+
80
100
  == Routes
81
101
 
82
102
  This gem contains several prepared routes that will aid registration, and communication with Bjond Server core.
@@ -100,4 +120,8 @@ For more information on the default routes, check-out the gem's route page[https
100
120
  - BJOND_ADAPTER_AUDIENCE
101
121
  - BJOND_ADAPTER_SUBJECT
102
122
 
123
+ == Essential Schema
124
+
125
+ https://user-images.githubusercontent.com/868768/27399560-2d0fe7fc-568b-11e7-8762-49f2cd24ac96.jpg
103
126
 
127
+ Most likely, your app schema will have additional configuration tables that are specific to the business logic of the adapter.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -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 1.0.0 ruby lib
5
+ # stub: bjond-api 1.1.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "bjond-api".freeze
9
- s.version = "1.0.0"
9
+ s.version = "1.1.0"
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 = "2017-05-04"
14
+ s.date = "2017-06-29"
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]
@@ -43,5 +43,17 @@ module BjondApi
43
43
  return connections
44
44
  end
45
45
 
46
+ def fire_event_for_group(bjond_registration, payload, event_id, group_id)
47
+ puts "Fire event for group #{group_id}"
48
+ bjond_svc = BjondService.find_by_group_id_and_bjond_registration_id(group_id, bjond_registration.id)
49
+ url = bjond_svc.endpoint + "/#{event_id}"
50
+ puts "Creating connection to #{url}"
51
+ conn = Faraday.new(:url => url)
52
+ conn.post do |req|
53
+ req.headers['Content-Type'] = 'application/json'
54
+ req.body = BjondJwt::jwt_encode_payload(payload, bjond_registration)
55
+ end
56
+ end
57
+
46
58
  end
47
59
 
@@ -4,5 +4,6 @@ class InitializerGenerator < Rails::Generators::Base
4
4
  def create_initializer_file
5
5
  copy_file "initializer.rb", "config/initializers/bjond_api_initializer.rb"
6
6
  copy_file "../../../bower.json", "bower.json"
7
+ copy_file "../../../.bowerrc", ".bowerrc"
7
8
  end
8
- end
9
+ end`
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: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Rego
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-04 00:00:00.000000000 Z
11
+ date: 2017-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails