clearbit-slack 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -27
- data/clearbit-slack.gemspec +1 -0
- data/lib/clearbit/slack/version.rb +1 -1
- data/lib/clearbit/slack.rb +2 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60aca03f72552305bf5d7e20577226ff2cbcd28a
|
4
|
+
data.tar.gz: cf75a3a709528e225fa2515f12f07d2af66cec55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbeb501486542cc7810f8a24025ef3b613897d1edee9daa3a5992d315a671c871f037132d226fc4920f0e8e69cf467699a781f1bdd992ade28f85542f40472a8
|
7
|
+
data.tar.gz: 40124571455871c71139b139e2168b9d18df152dcbf29bee73abeaced12b8ed133f910a3f76c8a5ea4d434bf62acff61bcf4e0c23386f8dba9e6708159f4ca9e
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Clearbit Slack Notifier
|
2
2
|
|
3
|
-
|
3
|
+
Clean beautiful customer data. Now in Slack.
|
4
4
|
|
5
5
|
![alex_test](https://cloud.githubusercontent.com/assets/739782/8149387/3f89cd68-1276-11e5-863c-5529237bfe6c.png)
|
6
6
|
|
@@ -9,7 +9,6 @@ Send Clearbit Person and Company data into a Slack channel.
|
|
9
9
|
Add to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem 'clearbit'
|
13
12
|
gem 'clearbit-slack'
|
14
13
|
```
|
15
14
|
|
@@ -59,20 +58,16 @@ module APIHub
|
|
59
58
|
customer = Customer.find!(customer_id)
|
60
59
|
response = Clearbit::Streaming::PersonCompany[email: customer.email]
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
message: "View details in <https://admin-panel.com/#{customer.token}|Admin Panel>",
|
69
|
-
person: response.person
|
70
|
-
}
|
61
|
+
response.merge!(
|
62
|
+
email: customer.email,
|
63
|
+
family_name: customer.last_name,
|
64
|
+
given_name: customer.first_name,
|
65
|
+
message: "View details in <https://admin-panel.com/#{customer.token}|Admin Panel>",
|
66
|
+
)
|
71
67
|
|
72
|
-
|
73
|
-
end
|
68
|
+
Clearbit::Slack.ping(response)
|
74
69
|
|
75
|
-
# Persist Clearbit Data
|
70
|
+
# Persist the Clearbit Data
|
76
71
|
end
|
77
72
|
end
|
78
73
|
end
|
@@ -89,21 +84,18 @@ class WebhooksController < ApplicationController
|
|
89
84
|
def clearbit
|
90
85
|
webhook = Clearbit::Webhook.new(env)
|
91
86
|
customer = Customer.find!(webhook.webhook_id)
|
87
|
+
response = webhook.body
|
92
88
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
}
|
102
|
-
|
103
|
-
Clearbit::Slack.ping(params)
|
104
|
-
end
|
89
|
+
response.merge!(
|
90
|
+
email: customer.email,
|
91
|
+
family_name: customer.last_name,
|
92
|
+
given_name: customer.first_name,
|
93
|
+
message: "View details in <https://admin-panel.com/#{customer.token}|Admin Panel>",
|
94
|
+
)
|
95
|
+
|
96
|
+
Clearbit::Slack.ping(response)
|
105
97
|
|
106
|
-
# Persist Clearbit Data
|
98
|
+
# Persist the Clearbit Data
|
107
99
|
end
|
108
100
|
end
|
109
101
|
```
|
data/clearbit-slack.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
+
spec.add_dependency 'clearbit', '~> 0.1.6'
|
19
20
|
spec.add_dependency 'maccman-mash', '~> 0.0.2'
|
20
21
|
spec.add_dependency 'slack-notifier', '~> 1.2.1'
|
21
22
|
spec.add_development_dependency 'bundler', '~> 1.9'
|
data/lib/clearbit/slack.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clearbit-slack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harlow Ward
|
@@ -10,6 +10,20 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: clearbit
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.6
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.6
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: maccman-mash
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|