bjond-api 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9d296807adf4698291ae98e1116a3fc77bf68b6
4
- data.tar.gz: 70b85c21eff3b5f9a0737ba35ec5fcfa9310e68e
3
+ metadata.gz: 039425ab3063150f69624fc6ae9bd3c242eae561
4
+ data.tar.gz: e7068f7cfccf795f16e5c4690fbb5c9734c88fca
5
5
  SHA512:
6
- metadata.gz: 4439cc5746bfc9d16f827c6e641ea22846c6679587b9abc6ebd56a56d785253d2c1dc817dd63604c0f747f416fcc713061a406a9ccbd64c546dd7ea8cbb55d2d
7
- data.tar.gz: c1ea26ec077947ff935eb9914c084d5e89e31633a4e5f6467cdc184a0d7c11ba7ddca5fa3dbe1c538e3ac57188b44875884290f59c6b3d3e136ee15f63aa6693
6
+ metadata.gz: c1d7abbe197bcf448b57e1d3e3772c19938a191de52a92a8e0ae2d10c1be80f186673d2cd91e475515feb52a8cb9234f273dd6a012419ae3c155a5de10431a04
7
+ data.tar.gz: aa6804dd4a35a5cb2e07a6fe4bce575feeacabab89a84e4cde4d1c7e527c82b43a54743692c5ebc6d5a7298e9278e314011f303d9ff6f1a8abb89d30555d52cc
data/Rakefile CHANGED
@@ -11,6 +11,8 @@ begin
11
11
  gem.add_dependency 'faraday', '~> 0.9.2'
12
12
  gem.add_dependency 'syruppay_jose', '~> 1.0'
13
13
  gem.add_dependency 'attr_encrypted', '~> 3.0', '>= 3.0.3'
14
+ # gem.add_dependency 'less-rails', '~> 2.7', '>= 2.7.1'
15
+ # gem.add_dependency 'less', '~> 2.6'
14
16
  gem.licenses = ['GPL']
15
17
  end
16
18
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -0,0 +1,4 @@
1
+ .non-available {
2
+ margin: 10px;
3
+ font-style: italic;
4
+ }
@@ -2,3 +2,8 @@
2
2
  Place all the styles related to the matching controller here.
3
3
  They will automatically be included in application.css.
4
4
  */
5
+
6
+ .non-available {
7
+ margin: 10px;
8
+ font-style: italic;
9
+ }
@@ -2,7 +2,7 @@ include BjondApi
2
2
  require 'attr_encrypted'
3
3
 
4
4
  class BjondRegistration < ActiveRecord::Base
5
- has_many :bjond_services
5
+ has_many :bjond_services, :dependent => :destroy
6
6
 
7
7
 
8
8
  attr_encrypted :encryption_key, key: ENV[BjondApi::BjondAppConfig.instance.encryption_key_name]
@@ -34,67 +34,77 @@
34
34
  </div>
35
35
 
36
36
  </br>
37
- <h3> Events </h3>
38
- <% @app_info.integrationEvent.each do |event| %>
39
- <div class="event">
40
- <h4><%= event.name %></h4>
41
-
42
- <div class="field-wrapper">
43
- <div class="app-label">Description:</div>
44
- <div class="info"><%= event.description %></div>
45
- </div>
46
37
 
47
- <div class="field-wrapper">
48
- <div class="app-label">jsonKey:</div>
49
- <div class="info"><%= event.jsonKey %></div>
50
- </div>
51
-
52
- <h4>Fields:</h4>
53
- <% event.fields.each do |field| %>
54
- <div class="field">
55
- <div class="field-wrapper">
56
- <div class="app-label">Field Name:</div>
57
- <div class="info"><%= field.name %></div>
58
- </div>
59
- <div class="field-wrapper">
60
- <div class="app-label">ID:</div>
61
- <div class="info"><%= field.id %></div>
62
- </div>
63
- <div class="field-wrapper">
64
- <div class="app-label">Json Key:</div>
65
- <div class="info"><%= field.jsonKey %></div>
66
- </div>
38
+ <% if @app_info.integrationEvent.count > 0 %>
39
+ <h3> Events </h3>
40
+ <% @app_info.integrationEvent.each do |event| %>
41
+ <div class="event">
42
+ <h4><%= event.name %></h4>
43
+
44
+ <div class="field-wrapper">
45
+ <div class="app-label">Description:</div>
46
+ <div class="info"><%= event.description %></div>
67
47
  </div>
68
- <% end %>
69
48
 
70
- </div>
49
+ <div class="field-wrapper">
50
+ <div class="app-label">jsonKey:</div>
51
+ <div class="info"><%= event.jsonKey %></div>
52
+ </div>
53
+
54
+ <h4>Fields:</h4>
55
+ <% event.fields.each do |field| %>
56
+ <div class="field">
57
+ <div class="field-wrapper">
58
+ <div class="app-label">Field Name:</div>
59
+ <div class="info"><%= field.name %></div>
60
+ </div>
61
+ <div class="field-wrapper">
62
+ <div class="app-label">ID:</div>
63
+ <div class="info"><%= field.id %></div>
64
+ </div>
65
+ <div class="field-wrapper">
66
+ <div class="app-label">Json Key:</div>
67
+ <div class="info"><%= field.jsonKey %></div>
68
+ </div>
69
+ </div>
70
+ <% end %>
71
+
72
+ </div>
73
+ <% end %>
74
+ <% else %>
75
+ No events are currently available for this app.
71
76
  <% end %>
72
77
 
73
- <h3> Consequences </h3>
74
- <% @app_info.integrationConsequence.each do |consequence| %>
75
- <div class="consequence">
76
- <h4><%= consequence.name %></h4>
78
+ <% if @app_info.integrationConsequence.count > 0 %>
79
+ <h3> Consequences </h3>
80
+ <% @app_info.integrationConsequence.each do |consequence| %>
81
+ <div class="consequence">
82
+ <h4><%= consequence.name %></h4>
77
83
 
78
- <div class="field-wrapper">
79
- <div class="app-label">ID:</div>
80
- <div class="info"><%= consequence.id %></div>
81
- </div>
84
+ <div class="field-wrapper">
85
+ <div class="app-label">ID:</div>
86
+ <div class="info"><%= consequence.id %></div>
87
+ </div>
82
88
 
83
- <div class="field-wrapper">
84
- <div class="app-label">Json Key:</div>
85
- <div class="info"><%= consequence.jsonKey %></div>
86
- </div>
87
- <div class="field-wrapper">
88
- <div class="app-label">Description:</div>
89
- <div class="info"><%= consequence.description %></div>
90
- </div>
89
+ <div class="field-wrapper">
90
+ <div class="app-label">Json Key:</div>
91
+ <div class="info"><%= consequence.jsonKey %></div>
92
+ </div>
93
+ <div class="field-wrapper">
94
+ <div class="app-label">Description:</div>
95
+ <div class="info"><%= consequence.description %></div>
96
+ </div>
91
97
 
92
- <div class="field-wrapper">
93
- <div class="app-label">Webhook:</div>
94
- <div class="info"><%= consequence.webhook %></div>
95
- </div>
98
+ <div class="field-wrapper">
99
+ <div class="app-label">Webhook:</div>
100
+ <div class="info"><%= consequence.webhook %></div>
101
+ </div>
96
102
 
103
+ </div>
104
+ <% end %>
105
+ <% else %>
106
+ <div class="consequence non-available">
107
+ No consequences are available for this app.
97
108
  </div>
98
109
  <% end %>
99
-
100
110
  </div>
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.4 ruby lib
5
+ # stub: bjond-api 0.1.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "bjond-api"
9
- s.version = "0.1.4"
9
+ s.version = "0.1.5"
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-04"
14
+ s.date = "2016-08-05"
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"]
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
29
29
  "app/assets/javascripts/bjond-api/.keep",
30
30
  "app/assets/javascripts/bjond_api.js",
31
31
  "app/assets/stylesheets/bjond-api/.keep",
32
+ "app/assets/stylesheets/bjond_api.less",
32
33
  "app/assets/stylesheets/bjond_registrations.css",
33
34
  "app/assets/stylesheets/scaffold.css",
34
35
  "app/controllers/.keep",
@@ -8,6 +8,8 @@ module BjondApi
8
8
  self.id = SecureRandom.uuid
9
9
  self.configURL = "http://#{self.get_hostname}/bjond-app/services"
10
10
  self.rootEndpoint = "http://#{self.get_hostname}/bjond-app/services"
11
+ self.integrationEvent = []
12
+ self.integrationConsequence = []
11
13
  end
12
14
 
13
15
  def get_hostname()
data/lib/bjond-jwt.rb CHANGED
@@ -3,7 +3,7 @@ require 'syruppay_jose'
3
3
  module BjondJwt
4
4
  def jwt_encode_payload(json, bjond_registration)
5
5
  payload = {
6
- :json => json.to_json,
6
+ :json => json,
7
7
  :iss => 'Bjönd, Inc.',
8
8
  :aud => ENV['BJOND_ADAPTER_AUDIENCE'],
9
9
  :exp => Time.now.to_i + 10*3600,
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
4
+ version: 0.1.5
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-04 00:00:00.000000000 Z
11
+ date: 2016-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -117,6 +117,7 @@ files:
117
117
  - app/assets/javascripts/bjond-api/.keep
118
118
  - app/assets/javascripts/bjond_api.js
119
119
  - app/assets/stylesheets/bjond-api/.keep
120
+ - app/assets/stylesheets/bjond_api.less
120
121
  - app/assets/stylesheets/bjond_registrations.css
121
122
  - app/assets/stylesheets/scaffold.css
122
123
  - app/controllers/.keep