jive-add_on 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/jive-add_on.gemspec +2 -1
- data/lib/generators/jive/add_on/active_record_generator.rb +1 -1
- data/lib/generators/jive/add_on/add_on_generator.rb +1 -1
- data/lib/generators/jive/add_on/next_migration_version.rb +1 -1
- data/lib/jive/add_on.rb +6 -6
- data/lib/jive/add_on/class_methods.rb +9 -0
- data/lib/jive/add_on/compatibility.rb +1 -1
- data/lib/jive/add_on/instance_methods.rb +24 -0
- data/lib/jive/add_on/model.rb +1 -1
- data/lib/jive/add_on/version.rb +4 -2
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9298fdcf5ec5a416ac351a1ecaa99aa06852f166
|
4
|
+
data.tar.gz: 82ef53b229f396dbae0d746a00da3be8cc9353d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7228eec78fc1107b6156a1b1b0d44ef3a7d71ea45a382cc009a8a6326a4b796a7f9feedd8d08815b31d7263b90a08ac4009a24fdf77f064801225d172cbeeb63
|
7
|
+
data.tar.gz: 1b59979c421d08e9139101387a83422d56075a77f4bc1604b2c48031766dc021488194961600200e6d47efa79eb1382157707752cb57cc957f1786113d1c436c
|
data/README.md
CHANGED
data/jive-add_on.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Butch Marshall"]
|
10
10
|
spec.email = ["butch.a.marshall@gmail.com"]
|
11
11
|
spec.summary = "Jive AddOn functionality implemented using ActiveRecord."
|
12
|
-
spec.description = "Implements the functionality required for dealing with and storing Jive AddOns using ActiveRecord as a storage backend.
|
12
|
+
spec.description = "Implements the functionality required for dealing with and storing Jive AddOns using ActiveRecord as a storage backend."
|
13
13
|
spec.homepage = "https://github.com/butchmarshall/ruby-jive-add_on"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -34,4 +34,5 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_development_dependency "rake", "~> 10.0"
|
35
35
|
|
36
36
|
spec.add_development_dependency "rspec"
|
37
|
+
spec.add_development_dependency "webmock"
|
37
38
|
end
|
@@ -5,7 +5,7 @@ require "rails/generators/active_record"
|
|
5
5
|
|
6
6
|
# Extend the HasDynamicColumnsGenerator so that it creates an AR migration
|
7
7
|
module Jive
|
8
|
-
|
8
|
+
class AddOn < ActiveRecord::Base
|
9
9
|
class ActiveRecordGenerator < ::Jive::AddOn::Generator
|
10
10
|
include Rails::Generators::Migration
|
11
11
|
extend NextMigrationVersion
|
data/lib/jive/add_on.rb
CHANGED
@@ -6,13 +6,13 @@ require "jive/signed_request"
|
|
6
6
|
|
7
7
|
require "jive/add_on/version"
|
8
8
|
require "jive/add_on/compatibility"
|
9
|
-
require "jive/add_on/
|
9
|
+
require "jive/add_on/class_methods"
|
10
|
+
require "jive/add_on/instance_methods"
|
10
11
|
|
11
12
|
module Jive
|
12
|
-
|
13
|
+
class AddOn < ActiveRecord::Base
|
13
14
|
end
|
14
|
-
#def AddOn
|
15
|
-
# Jive::AddOn::Model
|
16
|
-
#end
|
17
|
-
#module_function :AddOn
|
18
15
|
end
|
16
|
+
|
17
|
+
Jive::AddOn.send :include, Jive::AddOn::InstanceMethods
|
18
|
+
Jive::AddOn.send :extend, Jive::AddOn::ClassMethods
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Jive
|
2
|
+
class AddOn < ActiveRecord::Base
|
3
|
+
module InstanceMethods
|
4
|
+
def self.included(base)
|
5
|
+
base.table_name = :jive_add_ons
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
def validate_registration
|
10
|
+
if !::Jive::SignedRequest.validate_registration({
|
11
|
+
clientId: self.client_id,
|
12
|
+
tenantId: self.tenant_id,
|
13
|
+
jiveSignatureURL: self.jive_signature_url,
|
14
|
+
clientSecret: self.client_secret,
|
15
|
+
jiveSignature: self.jive_signature,
|
16
|
+
jiveUrl: self.jive_url,
|
17
|
+
timestamp: self.timestamp,
|
18
|
+
})
|
19
|
+
errors.add(:base, "INVALID_JIVE_SIGNATURE")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/jive/add_on/model.rb
CHANGED
data/lib/jive/add_on/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jive-add_on
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Butch Marshall
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -128,8 +128,22 @@ dependencies:
|
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: webmock
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
131
145
|
description: Implements the functionality required for dealing with and storing Jive
|
132
|
-
AddOns using ActiveRecord as a storage backend.
|
146
|
+
AddOns using ActiveRecord as a storage backend.
|
133
147
|
email:
|
134
148
|
- butch.a.marshall@gmail.com
|
135
149
|
executables: []
|
@@ -151,7 +165,9 @@ files:
|
|
151
165
|
- lib/generators/jive/add_on/next_migration_version.rb
|
152
166
|
- lib/generators/jive/add_on/templates/migration_0.1.0.rb
|
153
167
|
- lib/jive/add_on.rb
|
168
|
+
- lib/jive/add_on/class_methods.rb
|
154
169
|
- lib/jive/add_on/compatibility.rb
|
170
|
+
- lib/jive/add_on/instance_methods.rb
|
155
171
|
- lib/jive/add_on/model.rb
|
156
172
|
- lib/jive/add_on/version.rb
|
157
173
|
homepage: https://github.com/butchmarshall/ruby-jive-add_on
|
@@ -174,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
190
|
version: '0'
|
175
191
|
requirements: []
|
176
192
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.4.
|
193
|
+
rubygems_version: 2.4.6
|
178
194
|
signing_key:
|
179
195
|
specification_version: 4
|
180
196
|
summary: Jive AddOn functionality implemented using ActiveRecord.
|