intercom-app 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +7 -7
- data/README.md +23 -1
- data/RELEASING +2 -2
- data/app/controllers/intercom_app/authenticated_controller.rb +2 -1
- data/app/controllers/intercom_app/webhooks_controller.rb +33 -0
- data/app/views/intercom_app/sessions/login.html.erb +23 -0
- data/config/routes.rb +4 -0
- data/intercom-app.gemspec +7 -5
- data/lib/generators/intercom_app/app_model/app_model_generator.rb +2 -1
- data/lib/generators/intercom_app/home_controller/templates/home_controller.rb +3 -3
- data/lib/generators/intercom_app/home_controller/templates/index.html.erb +2 -22
- data/lib/generators/intercom_app/install/install_generator.rb +15 -9
- data/lib/generators/intercom_app/install/templates/intercom_app.rb +1 -0
- data/lib/intercom-app.rb +3 -0
- data/lib/intercom-app/configuration.rb +2 -0
- data/lib/intercom-app/hub_secret_generator.rb +14 -0
- data/lib/intercom-app/login_protection.rb +1 -1
- data/lib/intercom-app/sessions_concern.rb +3 -2
- data/lib/intercom-app/version.rb +1 -1
- data/lib/intercom-app/webhook_verification.rb +26 -0
- data/lib/intercom-app/webhooks_manager.rb +60 -0
- metadata +17 -11
- data/CHANGELOG +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc04ec408e8cc21f7622eedb75808106f46a039e
|
4
|
+
data.tar.gz: ee6cb8896446949c3e2fe55bd386550296f0d657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1749b716486ddc6bf4b75cd7ea400872823da73eecd422d02538172c25111273e9efafb7d33db439e45bf062d98b736f880ff2f5eda01fdcb9360a4b95d4e06
|
7
|
+
data.tar.gz: 7b2b3bc6fb9af331a6f229c290608c4911bc7e33a55753c5734df473bde6249914d20bf1ae9876b7138f4fd673765d39828df3ebd508da397f06bed250d2a29c
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
## 0.1.0 (2016-07-08)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
* Rails generator
|
6
|
+
* Intercom app sessions
|
7
|
+
* IntercomApp::App model
|
8
|
+
* Intercom Omniauth
|
9
|
+
* intercom_app initializer (@Skaelv)
|
10
|
+
|
11
|
+
## 0.1.1 (2016-07-08)
|
12
|
+
|
13
|
+
* Add lib files to gemspec (@Skaelv)
|
14
|
+
|
15
|
+
## 0.2.0 (2016-08-16)
|
16
|
+
|
17
|
+
* Fix test app crashes
|
18
|
+
* Fix webhooks subscription
|
19
|
+
* Webhooks verification
|
20
|
+
* Move LoginProtection to AuthenticatedController
|
21
|
+
* Create jobs for webhooks (@Skaelv)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
intercom-app (0.
|
4
|
+
intercom-app (0.2.0)
|
5
5
|
intercom (~> 3.5)
|
6
6
|
omniauth-intercom (~> 0.1)
|
7
7
|
|
@@ -54,7 +54,7 @@ GEM
|
|
54
54
|
activesupport (>= 4.1.0)
|
55
55
|
hashie (3.4.4)
|
56
56
|
i18n (0.7.0)
|
57
|
-
intercom (3.5.
|
57
|
+
intercom (3.5.2)
|
58
58
|
json (~> 1.8)
|
59
59
|
json (1.8.3)
|
60
60
|
jwt (1.5.4)
|
@@ -85,7 +85,7 @@ GEM
|
|
85
85
|
omniauth (1.3.1)
|
86
86
|
hashie (>= 1.2, < 4)
|
87
87
|
rack (>= 1.0, < 3)
|
88
|
-
omniauth-intercom (0.1.
|
88
|
+
omniauth-intercom (0.1.3)
|
89
89
|
omniauth-oauth2 (~> 1.2)
|
90
90
|
omniauth-oauth2 (1.4.0)
|
91
91
|
oauth2 (~> 1.0)
|
@@ -137,12 +137,12 @@ PLATFORMS
|
|
137
137
|
|
138
138
|
DEPENDENCIES
|
139
139
|
bundler (~> 1.12)
|
140
|
-
byebug
|
140
|
+
byebug (~> 9.0)
|
141
141
|
intercom-app!
|
142
|
-
mocha
|
143
|
-
rails (~> 4.2
|
142
|
+
mocha (~> 1.1)
|
143
|
+
rails (~> 4.2)
|
144
144
|
rake (~> 10.0)
|
145
|
-
sqlite3
|
145
|
+
sqlite3 (~> 1.3)
|
146
146
|
|
147
147
|
BUNDLED WITH
|
148
148
|
1.12.5
|
data/README.md
CHANGED
@@ -3,6 +3,8 @@ Intercom App
|
|
3
3
|
|
4
4
|
Intercom Application Rails engine and generator
|
5
5
|
|
6
|
+
*Note this SDK is in beta version and still needs a lot of improvements. We advise you to use it only if you feel you can help contributing and fix issues when you find them*
|
7
|
+
|
6
8
|
Description
|
7
9
|
-----------
|
8
10
|
This gem includes a Rails Engine and generators for writing Rails applications using the Intercom API. The Engine provides a SessionsController and all the required code for authenticating with an app via Oauth.
|
@@ -46,6 +48,8 @@ $ rails generate intercom_app --app_key <your_app_key> --app_secret <your_app_se
|
|
46
48
|
- If false you can authenticate with Intercom directly from the current tab
|
47
49
|
|
48
50
|
|
51
|
+
*Note that you will need to run rake db:migrate after this generator*
|
52
|
+
|
49
53
|
### Install Generator
|
50
54
|
|
51
55
|
```sh
|
@@ -96,11 +100,29 @@ The `install` generator places your App credentials directly into the intercom_a
|
|
96
100
|
```ruby
|
97
101
|
IntercomApp.configure do |config|
|
98
102
|
config.api_key = ENV['INTERCOM_CLIENT_APP_KEY']
|
99
|
-
config.
|
103
|
+
config.app_secret = ENV['INTERCOM_CLIENT_APP_SECRET']
|
100
104
|
config.oauth_modal = false
|
101
105
|
end
|
102
106
|
```
|
103
107
|
|
108
|
+
Webhooks Subscriptions
|
109
|
+
----------------------
|
110
|
+
|
111
|
+
You can add your webhooks subscriptions to the `IntercomApp.config`. Subscriptions to your topics will be added on authentication callback.
|
112
|
+
|
113
|
+
```ruby
|
114
|
+
IntercomApp.configure do |config|
|
115
|
+
config.webhooks = [
|
116
|
+
{topics: ['users'], url: 'https://my-intercom-app.com/webhooks/users'},
|
117
|
+
{topics: ['conversation.user.created', 'conversation.user.replied'], url: 'https://my-intercom-app.com/webhooks/conversations'},
|
118
|
+
{topics: ['event.created'], url: 'https://my-intercom-app.com/webhooks/conversations', metadata: { event_names: events } }
|
119
|
+
]
|
120
|
+
end
|
121
|
+
```
|
122
|
+
|
123
|
+
**Important** You will need to request the `manage_webhooks` permissions from Intercom to receive webhooks from Intercom.
|
124
|
+
|
125
|
+
|
104
126
|
Connect to the Intercom API
|
105
127
|
----------------------
|
106
128
|
This gem includes the following libraries :
|
data/RELEASING
CHANGED
@@ -9,6 +9,6 @@ To release a new version of the intercom-ruby-app gem :
|
|
9
9
|
6. Push the new tag :
|
10
10
|
$ git push --tags
|
11
11
|
7. Build the new gem :
|
12
|
-
$ gem build intercom-
|
12
|
+
$ gem build intercom-app.gemspec
|
13
13
|
8. Push the new gem :
|
14
|
-
$ gem push intercom-
|
14
|
+
$ gem push intercom-app-X.Y.Z.gem
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module IntercomApp
|
2
|
+
class WebhooksController < ApplicationController
|
3
|
+
skip_before_action :verify_authenticity_token
|
4
|
+
|
5
|
+
include IntercomApp::WebhookVerification
|
6
|
+
|
7
|
+
class IntercomApp::MissingWebhookJobDeclarationError < StandardError; end
|
8
|
+
|
9
|
+
def receive
|
10
|
+
webhook_job_klass.perform_later({app_id: app_id, webhook: webhook_params.to_h})
|
11
|
+
head :no_content
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def webhook_params
|
17
|
+
params.except(:controller, :action, :type)
|
18
|
+
end
|
19
|
+
|
20
|
+
def webhook_job_klass
|
21
|
+
"#{webhook_type.sub('.','_').classify}Job".safe_constantize or raise IntercomApp::MissingWebhookJobDeclarationError
|
22
|
+
end
|
23
|
+
|
24
|
+
def webhook_type
|
25
|
+
params[:type]
|
26
|
+
end
|
27
|
+
|
28
|
+
def app_id
|
29
|
+
params[:app_id]
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% if IntercomApp.configuration.oauth_modal %>
|
2
|
+
<a href="javascript:void(0)" class="intercom-oauth-cta">
|
3
|
+
<img src="https://static.intercomassets.com/assets/oauth/primary-7edb2ebce84c088063f4b86049747c3a.png" srcset="https://static.intercomassets.com/assets/oauth/primary-7edb2ebce84c088063f4b86049747c3a.png 1x, https://static.intercomassets.com/assets/oauth/primary@2x-0d69ca2141dfdfa0535634610be80994.png 2x, https://static.intercomassets.com/assets/oauth/primary@3x-788ed3c44d63a6aec3927285e920f542.png 3x"/>
|
4
|
+
</a>
|
5
|
+
<script type="text/javascript">
|
6
|
+
$('.intercom-oauth-cta').unbind('click').click(function() {
|
7
|
+
var left = (screen.width/2)-(700/2);
|
8
|
+
var top = (screen.height/2)-(450/2);
|
9
|
+
var opts = 'width=700, height=450, top='+top+', left='+left
|
10
|
+
var auth_window = window.open('/auth/intercom', 'Sign in', opts);
|
11
|
+
var checkWindow = function() {
|
12
|
+
if (auth_window.closed) {
|
13
|
+
window.location = '/';
|
14
|
+
} else if (window.oauth_success === undefined) {
|
15
|
+
setTimeout(checkWindow, 200);
|
16
|
+
}
|
17
|
+
};
|
18
|
+
checkWindow();
|
19
|
+
});
|
20
|
+
</script>
|
21
|
+
<% else %>
|
22
|
+
<a href="/auth/intercom">Login</a>
|
23
|
+
<% end %>
|
data/config/routes.rb
CHANGED
data/intercom-app.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = IntercomApp::VERSION
|
8
8
|
s.date = '2016-07-04'
|
9
9
|
s.summary = "Intercom.io ruby application boilerplate"
|
10
|
-
s.description = "This gem helps you to get started with your Intercom
|
10
|
+
s.description = "This gem helps you to get started with your Intercom app"
|
11
11
|
s.authors = ["Kevin Antoine"]
|
12
12
|
s.email = 'kevin.antoine@intercom.io'
|
13
13
|
s.files = ["lib/intercom-app.rb"]
|
@@ -17,13 +17,15 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
19
|
|
20
|
-
s.
|
20
|
+
s.required_ruby_version = '>= 2.2.2'
|
21
|
+
|
22
|
+
s.add_runtime_dependency 'intercom', '~> 3.5'
|
21
23
|
s.add_runtime_dependency 'omniauth-intercom', '~>0.1'
|
22
24
|
|
23
25
|
s.add_development_dependency 'rails', '~> 4.2'
|
24
|
-
s.add_development_dependency 'sqlite3', '~>
|
25
|
-
s.add_development_dependency 'mocha', '~>
|
26
|
-
s.add_development_dependency 'byebug', '~> 0'
|
26
|
+
s.add_development_dependency 'sqlite3', '~> 1.3'
|
27
|
+
s.add_development_dependency 'mocha', '~> 1.1'
|
28
|
+
s.add_development_dependency 'byebug', '~> 9.0'
|
27
29
|
s.add_development_dependency 'bundler', '~> 1.12'
|
28
30
|
s.add_development_dependency 'rake', '~> 10.0'
|
29
31
|
end
|
@@ -34,7 +34,8 @@ module IntercomApp
|
|
34
34
|
|
35
35
|
# for generating a timestamp when using `create_migration`
|
36
36
|
def self.next_migration_number(dir)
|
37
|
-
|
37
|
+
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
38
|
+
# ActiveRecord::Migration.next_migration_number(dir)
|
38
39
|
end
|
39
40
|
end
|
40
41
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
class HomeController <
|
1
|
+
class HomeController < IntercomApp::AuthenticatedController
|
2
|
+
|
2
3
|
def index
|
3
|
-
@
|
4
|
-
@users_names = @intercom_client.users.all.map(&:name)
|
4
|
+
@users_names = @intercom_client.users.find_all(:type=>'users', :per_page => 10, :page => 1, :order => "desc", :sort => "created_at").map(&:name)
|
5
5
|
end
|
6
6
|
end
|
@@ -1,26 +1,6 @@
|
|
1
|
-
|
2
|
-
<a href="javascript:void(0)" class="intercom-oauth-cta">
|
3
|
-
<img src="https://static.intercomassets.com/assets/oauth/primary-7edb2ebce84c088063f4b86049747c3a.png" srcset="https://static.intercomassets.com/assets/oauth/primary-7edb2ebce84c088063f4b86049747c3a.png 1x, https://static.intercomassets.com/assets/oauth/primary@2x-0d69ca2141dfdfa0535634610be80994.png 2x, https://static.intercomassets.com/assets/oauth/primary@3x-788ed3c44d63a6aec3927285e920f542.png 3x"/>
|
4
|
-
</a>
|
5
|
-
<script type="text/javascript">
|
6
|
-
$('.intercom-oauth-cta').unbind('click').click(function() {
|
7
|
-
var auth_window = window.open('/auth/intercom', 'Sign in', 'width=700,height=450');
|
8
|
-
var checkWindow = function() {
|
9
|
-
if (auth_window.closed) {
|
10
|
-
window.location = '/';
|
11
|
-
} else if (window.oauth_success === undefined) {
|
12
|
-
setTimeout(checkWindow, 200);
|
13
|
-
}
|
14
|
-
};
|
15
|
-
checkWindow();
|
16
|
-
});
|
17
|
-
</script>
|
18
|
-
<% else %>
|
19
|
-
<a href="/auth/intercom">Login</a>
|
20
|
-
<% end %>
|
21
|
-
|
1
|
+
<a href="/login">Login</a>
|
22
2
|
<h1>Intercom application</h1>
|
23
|
-
<h2>
|
3
|
+
<h2>Users list:</h2>
|
24
4
|
<ul>
|
25
5
|
<% @users_names.each do | name | %>
|
26
6
|
<li> <%= name %></li>
|
@@ -1,20 +1,25 @@
|
|
1
1
|
require 'rails/generators/base'
|
2
2
|
require 'rails/generators/active_record'
|
3
|
+
require 'intercom-app/hub_secret_generator'
|
4
|
+
|
3
5
|
|
4
6
|
module IntercomApp
|
5
7
|
module Generators
|
6
8
|
class InstallGenerator < Rails::Generators::Base
|
7
9
|
include Rails::Generators::Migration
|
10
|
+
include IntercomApp::Utils
|
8
11
|
source_root File.expand_path('../templates', __FILE__)
|
9
12
|
|
10
13
|
class_option :app_key, type: :string, default: '<app_key>'
|
11
14
|
class_option :app_secret, type: :string, default: '<app_secret>'
|
12
15
|
class_option :oauth_modal, type: :boolean, default: false
|
16
|
+
class_option :hub_secret, type: :string
|
13
17
|
|
14
18
|
def create_intercom_app_initializer
|
15
19
|
@app_key = options['app_key']
|
16
20
|
@app_secret = options['app_secret']
|
17
21
|
@oauth_modal = options['oauth_modal']
|
22
|
+
@hub_secret = generate_hub_secret
|
18
23
|
|
19
24
|
template 'intercom_app.rb', 'config/initializers/intercom_app.rb'
|
20
25
|
end
|
@@ -35,19 +40,20 @@ module IntercomApp
|
|
35
40
|
copy_file 'intercom_session_repository.rb', 'config/initializers/intercom_session_repository.rb'
|
36
41
|
end
|
37
42
|
|
38
|
-
|
39
|
-
def inject_into_application_controller
|
40
|
-
inject_into_class(
|
41
|
-
"app/controllers/application_controller.rb",
|
42
|
-
'ApplicationController',
|
43
|
-
" include IntercomApp::LoginProtection\n"
|
44
|
-
)
|
45
|
-
end
|
46
|
-
|
47
43
|
def mount_engine
|
48
44
|
route "mount IntercomApp::Engine, at: '/'"
|
49
45
|
end
|
50
46
|
|
47
|
+
private
|
48
|
+
|
49
|
+
def generate_hub_secret
|
50
|
+
if yes?("In order to increase the safety of your app, would you like your webhooks to be automatically signed?(y/n)")
|
51
|
+
return random_hub_secret
|
52
|
+
else
|
53
|
+
return ''
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
51
57
|
end
|
52
58
|
end
|
53
59
|
end
|
data/lib/intercom-app.rb
CHANGED
@@ -2,11 +2,14 @@ require 'intercom-app/version'
|
|
2
2
|
require 'intercom-app/app'
|
3
3
|
require 'intercom-app/configuration'
|
4
4
|
require 'intercom-app/engine'
|
5
|
+
require 'intercom-app/hub_secret_generator'
|
5
6
|
require 'intercom-app/in_memory_session_store'
|
6
7
|
require 'intercom-app/login_protection'
|
7
8
|
require 'intercom-app/session_repository'
|
8
9
|
require 'intercom-app/session_storage'
|
9
10
|
require 'intercom-app/sessions_concern'
|
11
|
+
require 'intercom-app/webhook_verification'
|
12
|
+
require 'intercom-app/webhooks_manager'
|
10
13
|
|
11
14
|
# deps
|
12
15
|
require 'intercom'
|
@@ -2,8 +2,8 @@ module IntercomApp
|
|
2
2
|
module SessionsConcern
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
included do
|
6
|
+
include IntercomApp::LoginProtection
|
7
7
|
end
|
8
8
|
|
9
9
|
def callback
|
@@ -14,6 +14,7 @@ module IntercomApp
|
|
14
14
|
}
|
15
15
|
session[:intercom] = IntercomApp::SessionRepository.store(app)
|
16
16
|
session[:intercom_app_id] = app[:intercom_app_id]
|
17
|
+
IntercomApp::WebhooksManager.new(intercom_token: app[:token]).create_webhooks if IntercomApp.configuration.webhooks.present?
|
17
18
|
redirect_to return_address unless IntercomApp.configuration.oauth_modal
|
18
19
|
else
|
19
20
|
redirect_to login_url
|
data/lib/intercom-app/version.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
module IntercomApp
|
2
|
+
module WebhookVerification
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
before_action :verify_request
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
def verify_request
|
11
|
+
body = request.body.read
|
12
|
+
return head :unauthorized unless hmac_valid?(body)
|
13
|
+
end
|
14
|
+
|
15
|
+
def hmac_valid?(payload_body)
|
16
|
+
secret = IntercomApp.configuration.hub_secret
|
17
|
+
signature = 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), secret, payload_body)
|
18
|
+
Rack::Utils.secure_compare(signature, intercom_hmac)
|
19
|
+
end
|
20
|
+
|
21
|
+
def intercom_hmac
|
22
|
+
request.headers['X-Hub-Signature']
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module IntercomApp
|
2
|
+
class WebhooksManager
|
3
|
+
class CreationFailed < StandardError; end
|
4
|
+
def initialize(params)
|
5
|
+
@intercom_token = params[:intercom_token]
|
6
|
+
end
|
7
|
+
|
8
|
+
def create_webhooks_subscriptions
|
9
|
+
return unless required_webhooks.present?
|
10
|
+
required_webhooks.each do |webhook|
|
11
|
+
create_webhook_subscription(webhook) unless webhook_subscription_exists?(webhook[:topics])
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def destroy_webhooks_subscriptions
|
16
|
+
intercom_client.subscriptions.all.each do |webhook|
|
17
|
+
intercom_client.subscriptions.delete(webhook.id) if is_required_webhook?(webhook)
|
18
|
+
end
|
19
|
+
|
20
|
+
@current_webhooks_subscriptions = nil
|
21
|
+
end
|
22
|
+
|
23
|
+
def recreate_webhooks_subscriptions!
|
24
|
+
destroy_webhooks_subscriptions
|
25
|
+
create_webhooks_subscriptions
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def intercom_client
|
31
|
+
@intercom_client ||= Intercom::Client.new(app_id: @intercom_token, api_key: '')
|
32
|
+
end
|
33
|
+
|
34
|
+
def required_webhooks
|
35
|
+
IntercomApp.configuration.webhooks
|
36
|
+
end
|
37
|
+
|
38
|
+
def is_required_webhook?(webhook)
|
39
|
+
required_webhooks.map{ |w| w[:url] }.include? webhook.url
|
40
|
+
end
|
41
|
+
|
42
|
+
def create_webhook_subscription(attributes)
|
43
|
+
add_hub_secret_to_subscription(attributes)
|
44
|
+
webhook = intercom_client.subscriptions.create(attributes)
|
45
|
+
end
|
46
|
+
|
47
|
+
def webhook_subscription_exists?(topics)
|
48
|
+
current_webhooks_subscriptions[topics]
|
49
|
+
end
|
50
|
+
|
51
|
+
def current_webhooks_subscriptions
|
52
|
+
@current_webhooks_subscriptions ||= intercom_client.subscriptions.all.index_by(&:topics)
|
53
|
+
end
|
54
|
+
|
55
|
+
def add_hub_secret_to_subscription(attributes)
|
56
|
+
attributes[:hub_secret] = IntercomApp.configuration.hub_secret if IntercomApp.configuration.hub_secret.present?
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intercom-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Antoine
|
@@ -58,42 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '1.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mocha
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '1.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '1.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: byebug
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
89
|
+
version: '9.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
96
|
+
version: '9.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: bundler
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '10.0'
|
125
|
-
description: This gem helps you to get started with your Intercom
|
125
|
+
description: This gem helps you to get started with your Intercom app
|
126
126
|
email: kevin.antoine@intercom.io
|
127
127
|
executables: []
|
128
128
|
extensions: []
|
@@ -132,7 +132,7 @@ files:
|
|
132
132
|
- ".gitignore"
|
133
133
|
- ".rspec"
|
134
134
|
- ".travis.yml"
|
135
|
-
- CHANGELOG
|
135
|
+
- CHANGELOG.md
|
136
136
|
- Gemfile
|
137
137
|
- Gemfile.lock
|
138
138
|
- LICENSE
|
@@ -141,8 +141,10 @@ files:
|
|
141
141
|
- Rakefile
|
142
142
|
- app/controllers/intercom_app/authenticated_controller.rb
|
143
143
|
- app/controllers/intercom_app/sessions_controller.rb
|
144
|
+
- app/controllers/intercom_app/webhooks_controller.rb
|
144
145
|
- app/models/intercom-app/app.rb
|
145
146
|
- app/views/intercom_app/sessions/callback.html.erb
|
147
|
+
- app/views/intercom_app/sessions/login.html.erb
|
146
148
|
- config/routes.rb
|
147
149
|
- intercom-app.gemspec
|
148
150
|
- lib/generators/intercom_app/app_model/app_model_generator.rb
|
@@ -164,12 +166,15 @@ files:
|
|
164
166
|
- lib/intercom-app/app.rb
|
165
167
|
- lib/intercom-app/configuration.rb
|
166
168
|
- lib/intercom-app/engine.rb
|
169
|
+
- lib/intercom-app/hub_secret_generator.rb
|
167
170
|
- lib/intercom-app/in_memory_session_store.rb
|
168
171
|
- lib/intercom-app/login_protection.rb
|
169
172
|
- lib/intercom-app/session_repository.rb
|
170
173
|
- lib/intercom-app/session_storage.rb
|
171
174
|
- lib/intercom-app/sessions_concern.rb
|
172
175
|
- lib/intercom-app/version.rb
|
176
|
+
- lib/intercom-app/webhook_verification.rb
|
177
|
+
- lib/intercom-app/webhooks_manager.rb
|
173
178
|
homepage: http://rubygems.org/gems/intercom-ruby-app
|
174
179
|
licenses:
|
175
180
|
- MIT
|
@@ -182,7 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
187
|
requirements:
|
183
188
|
- - ">="
|
184
189
|
- !ruby/object:Gem::Version
|
185
|
-
version:
|
190
|
+
version: 2.2.2
|
186
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
192
|
requirements:
|
188
193
|
- - ">="
|
@@ -190,8 +195,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
195
|
version: '0'
|
191
196
|
requirements: []
|
192
197
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.
|
198
|
+
rubygems_version: 2.5.1
|
194
199
|
signing_key:
|
195
200
|
specification_version: 4
|
196
201
|
summary: Intercom.io ruby application boilerplate
|
197
202
|
test_files: []
|
203
|
+
has_rdoc:
|