square_event 1.0.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 +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +35 -0
- data/Appraisals +23 -0
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTING.md +43 -0
- data/Gemfile +3 -0
- data/LICENSE.md +23 -0
- data/README.md +146 -0
- data/Rakefile +15 -0
- data/app/controllers/square_event/webhook_controller.rb +47 -0
- data/config/routes.rb +3 -0
- data/gemfiles/rails5.1.gemfile +7 -0
- data/gemfiles/rails5.2.gemfile +7 -0
- data/gemfiles/rails6.0.gemfile +7 -0
- data/gemfiles/rails6.1.gemfile +7 -0
- data/gemfiles/rails_master.gemfile +7 -0
- data/lib/square_event.rb +65 -0
- data/lib/square_event/engine.rb +5 -0
- data/lib/square_event/errors.rb +16 -0
- data/lib/square_event/event.rb +34 -0
- data/lib/square_event/version.rb +3 -0
- data/lib/square_event/webhook.rb +36 -0
- data/spec/controllers/webhook_controller_spec.rb +130 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +65 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +40 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/new_framework_defaults_5_2.rb +4 -0
- data/spec/dummy/config/initializers/secret_token.rb +16 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/lib/stripe_event_spec.rb +154 -0
- data/spec/rails_helper.rb +3 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/support/fixtures/evt_payment_created.json +67 -0
- data/square_event.gemspec +28 -0
- metadata +242 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
+
div.dialog {
|
|
8
|
+
width: 25em;
|
|
9
|
+
padding: 0 4em;
|
|
10
|
+
margin: 4em auto 0 auto;
|
|
11
|
+
border: 1px solid #ccc;
|
|
12
|
+
border-right-color: #999;
|
|
13
|
+
border-bottom-color: #999;
|
|
14
|
+
}
|
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<!-- This file lives in public/500.html -->
|
|
21
|
+
<div class="dialog">
|
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
|
23
|
+
</div>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
|
3
|
+
|
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
|
6
|
+
require 'rails/commands'
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe SquareEvent do
|
|
4
|
+
let(:events) { [] }
|
|
5
|
+
let(:subscriber) { ->(evt){ events << evt } }
|
|
6
|
+
let(:payment_created) { SquareEvent::Event.construct_from(id: 'evt_payment_created', type: 'charge.succeeded') }
|
|
7
|
+
let(:charge_failed) { SquareEvent::Event.construct_from(id: 'evt_charge_failed', type: 'charge.failed') }
|
|
8
|
+
let(:card_created) { SquareEvent::Event.construct_from(id: 'event_card_created', type: 'customer.card.created') }
|
|
9
|
+
let(:card_updated) { SquareEvent::Event.construct_from(id: 'event_card_updated', type: 'customer.card.updated') }
|
|
10
|
+
|
|
11
|
+
describe ".configure" do
|
|
12
|
+
it "yields itself to the block" do
|
|
13
|
+
yielded = nil
|
|
14
|
+
SquareEvent.configure { |events| yielded = events }
|
|
15
|
+
expect(yielded).to eq SquareEvent
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it "requires a block argument" do
|
|
19
|
+
expect { SquareEvent.configure }.to raise_error ArgumentError
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
describe ".setup - deprecated" do
|
|
23
|
+
it "evaluates the block in its own context" do
|
|
24
|
+
ctx = nil
|
|
25
|
+
SquareEvent.setup { ctx = self }
|
|
26
|
+
expect(ctx).to eq SquareEvent
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
describe "subscribing to a specific event type" do
|
|
32
|
+
context "with a block subscriber" do
|
|
33
|
+
it "calls the subscriber with the retrieved event" do
|
|
34
|
+
SquareEvent.subscribe('charge.succeeded', &subscriber)
|
|
35
|
+
SquareEvent.instrument(payment_created)
|
|
36
|
+
|
|
37
|
+
expect(events).to eq [payment_created]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
context "with a subscriber that responds to #call" do
|
|
42
|
+
it "calls the subscriber with the retrieved event" do
|
|
43
|
+
SquareEvent.subscribe('charge.succeeded', subscriber)
|
|
44
|
+
SquareEvent.instrument(payment_created)
|
|
45
|
+
|
|
46
|
+
expect(events).to eq [payment_created]
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
describe "subscribing to a namespace of event types" do
|
|
52
|
+
context "with a block subscriber" do
|
|
53
|
+
it "calls the subscriber with any events in the namespace" do
|
|
54
|
+
SquareEvent.subscribe('customer.card', &subscriber)
|
|
55
|
+
|
|
56
|
+
SquareEvent.instrument(card_created)
|
|
57
|
+
SquareEvent.instrument(card_updated)
|
|
58
|
+
|
|
59
|
+
expect(events).to eq [card_created, card_updated]
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
context "with a subscriber that responds to #call" do
|
|
64
|
+
it "calls the subscriber with any events in the namespace" do
|
|
65
|
+
SquareEvent.subscribe('customer.card.', subscriber)
|
|
66
|
+
|
|
67
|
+
SquareEvent.instrument(card_updated)
|
|
68
|
+
SquareEvent.instrument(card_created)
|
|
69
|
+
|
|
70
|
+
expect(events).to eq [card_updated, card_created]
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe "subscribing to all event types" do
|
|
76
|
+
context "with a block subscriber" do
|
|
77
|
+
it "calls the subscriber with all retrieved events" do
|
|
78
|
+
SquareEvent.all(&subscriber)
|
|
79
|
+
|
|
80
|
+
SquareEvent.instrument(payment_created)
|
|
81
|
+
SquareEvent.instrument(charge_failed)
|
|
82
|
+
|
|
83
|
+
expect(events).to eq [payment_created, charge_failed]
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
context "with a subscriber that responds to #call" do
|
|
88
|
+
it "calls the subscriber with all retrieved events" do
|
|
89
|
+
SquareEvent.all(subscriber)
|
|
90
|
+
|
|
91
|
+
SquareEvent.instrument(payment_created)
|
|
92
|
+
SquareEvent.instrument(charge_failed)
|
|
93
|
+
|
|
94
|
+
expect(events).to eq [payment_created, charge_failed]
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
describe ".listening?" do
|
|
100
|
+
it "returns true when there is a subscriber for a matching event type" do
|
|
101
|
+
SquareEvent.subscribe('customer.', &subscriber)
|
|
102
|
+
|
|
103
|
+
expect(SquareEvent.listening?('customer.card')).to be true
|
|
104
|
+
expect(SquareEvent.listening?('customer.')).to be true
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
it "returns false when there is not a subscriber for a matching event type" do
|
|
108
|
+
SquareEvent.subscribe('customer.', &subscriber)
|
|
109
|
+
|
|
110
|
+
expect(SquareEvent.listening?('account')).to be false
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
it "returns true when a subscriber is subscribed to all events" do
|
|
114
|
+
SquareEvent.all(&subscriber)
|
|
115
|
+
|
|
116
|
+
expect(SquareEvent.listening?('customer.')).to be true
|
|
117
|
+
expect(SquareEvent.listening?('account')).to be true
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
describe SquareEvent::NotificationAdapter do
|
|
122
|
+
let(:adapter) { SquareEvent.adapter }
|
|
123
|
+
|
|
124
|
+
it "calls the subscriber with the last argument" do
|
|
125
|
+
expect(subscriber).to receive(:call).with(:last)
|
|
126
|
+
|
|
127
|
+
adapter.call(subscriber).call(:first, :last)
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
describe SquareEvent::Namespace do
|
|
132
|
+
let(:namespace) { SquareEvent.namespace }
|
|
133
|
+
|
|
134
|
+
describe "#call" do
|
|
135
|
+
it "prepends the namespace to a given string" do
|
|
136
|
+
expect(namespace.call('foo.bar')).to eq 'square_event.foo.bar'
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
it "returns the namespace given no arguments" do
|
|
140
|
+
expect(namespace.call).to eq 'square_event.'
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
describe "#to_regexp" do
|
|
145
|
+
it "matches namespaced strings" do
|
|
146
|
+
expect(namespace.to_regexp('foo.bar')).to match namespace.call('foo.bar')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
it "matches all namespaced strings given no arguments" do
|
|
150
|
+
expect(namespace.to_regexp).to match namespace.call('foo.bar')
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require 'coveralls'
|
|
2
|
+
Coveralls.wear!
|
|
3
|
+
|
|
4
|
+
require 'webmock/rspec'
|
|
5
|
+
require File.expand_path('../../lib/square_event', __FILE__)
|
|
6
|
+
Dir[File.expand_path('../spec/support/**/*.rb', __FILE__)].each { |f| require f }
|
|
7
|
+
|
|
8
|
+
RSpec.configure do |config|
|
|
9
|
+
config.order = 'random'
|
|
10
|
+
|
|
11
|
+
config.expect_with :rspec do |c|
|
|
12
|
+
c.syntax = :expect
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
config.before do
|
|
16
|
+
@signing_secrets = SquareEvent.signing_secret
|
|
17
|
+
@event_filter = SquareEvent.event_filter
|
|
18
|
+
@notifier = SquareEvent.backend.notifier
|
|
19
|
+
SquareEvent.backend.notifier = @notifier.class.new
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
config.after do
|
|
23
|
+
SquareEvent.signing_secret = @signing_secret
|
|
24
|
+
SquareEvent.event_filter = @event_filter
|
|
25
|
+
SquareEvent.backend.notifier = @notifier
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"merchant_id": "6SSW7HV8K2ST5",
|
|
3
|
+
"type": "payment.created",
|
|
4
|
+
"event_id": "13b867cf-db3d-4b1c-90b6-2f32a9d78124",
|
|
5
|
+
"created_at": "2020-02-06T21:27:30.792Z",
|
|
6
|
+
"data": {
|
|
7
|
+
"type": "payment",
|
|
8
|
+
"id": "KkAkhdMsgzn59SM8A89WgKwekxLZY",
|
|
9
|
+
"object": {
|
|
10
|
+
"payment": {
|
|
11
|
+
"id": "hYy9pRFVxpDsO1FB05SunFWUe9JZY",
|
|
12
|
+
"created_at": "2020-11-22T21:16:51.086Z",
|
|
13
|
+
"updated_at": "2020-11-22T21:16:51.198Z",
|
|
14
|
+
"amount_money": {
|
|
15
|
+
"amount": 100,
|
|
16
|
+
"currency": "USD"
|
|
17
|
+
},
|
|
18
|
+
"status": "APPROVED",
|
|
19
|
+
"delay_duration": "PT168H",
|
|
20
|
+
"source_type": "CARD",
|
|
21
|
+
"card_details": {
|
|
22
|
+
"status": "AUTHORIZED",
|
|
23
|
+
"card": {
|
|
24
|
+
"card_brand": "MASTERCARD",
|
|
25
|
+
"last_4": "9029",
|
|
26
|
+
"exp_month": 11,
|
|
27
|
+
"exp_year": 2022,
|
|
28
|
+
"fingerprint": "sq-1-Tvruf3vPQxlvI6n0IcKYfBukrcv6IqWr8UyBdViWXU2yzGn5VMJvrsHMKpINMhPmVg",
|
|
29
|
+
"card_type": "CREDIT",
|
|
30
|
+
"prepaid_type": "NOT_PREPAID",
|
|
31
|
+
"bin": "540988"
|
|
32
|
+
},
|
|
33
|
+
"entry_method": "KEYED",
|
|
34
|
+
"cvv_status": "CVV_ACCEPTED",
|
|
35
|
+
"avs_status": "AVS_ACCEPTED",
|
|
36
|
+
"statement_description": "SQ *DEFAULT TEST ACCOUNT",
|
|
37
|
+
"card_payment_timeline": {
|
|
38
|
+
"authorized_at": "2020-11-22T21:16:51.198Z"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"location_id": "S8GWD5R9QB376",
|
|
42
|
+
"order_id": "03O3USaPaAaFnI6kkwB1JxGgBsUZY",
|
|
43
|
+
"risk_evaluation": {
|
|
44
|
+
"created_at": "2020-11-22T21:16:51.198Z",
|
|
45
|
+
"risk_level": "NORMAL"
|
|
46
|
+
},
|
|
47
|
+
"total_money": {
|
|
48
|
+
"amount": 100,
|
|
49
|
+
"currency": "USD"
|
|
50
|
+
},
|
|
51
|
+
"approved_money": {
|
|
52
|
+
"amount": 100,
|
|
53
|
+
"currency": "USD"
|
|
54
|
+
},
|
|
55
|
+
"capabilities": [
|
|
56
|
+
"EDIT_TIP_AMOUNT",
|
|
57
|
+
"EDIT_TIP_AMOUNT_UP",
|
|
58
|
+
"EDIT_TIP_AMOUNT_DOWN"
|
|
59
|
+
],
|
|
60
|
+
"receipt_number": "hYy9",
|
|
61
|
+
"delay_action": "CANCEL",
|
|
62
|
+
"delayed_until": "2020-11-29T21:16:51.086Z",
|
|
63
|
+
"version_token": "FfQhQJf9r3VSQIgyWBk1oqhIwiznLwVwJbVVA0bdyEv6o"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
$LOAD_PATH.push File.expand_path("lib", File.dirname(File.realpath(__FILE__)))
|
|
2
|
+
|
|
3
|
+
# Maintain your gem's version:
|
|
4
|
+
require "square_event/version"
|
|
5
|
+
|
|
6
|
+
# Describe your gem and declare its dependencies:
|
|
7
|
+
Gem::Specification.new do |s|
|
|
8
|
+
s.name = "square_event"
|
|
9
|
+
s.version = SquareEvent::VERSION
|
|
10
|
+
s.license = "MIT"
|
|
11
|
+
s.authors = ["Andy Callaghan"]
|
|
12
|
+
s.email = "andy@andycallaghan.com"
|
|
13
|
+
s.homepage = "https://github.com/jammed-org/square_event"
|
|
14
|
+
s.summary = "Square webhook integration for Rails applications"
|
|
15
|
+
s.description = "Square webhook integration for Rails applications"
|
|
16
|
+
|
|
17
|
+
s.files = `git ls-files`.split("\n")
|
|
18
|
+
s.test_files = `git ls-files -- Appraisals {spec,gemfiles}/*`.split("\n")
|
|
19
|
+
|
|
20
|
+
s.add_dependency "activesupport", ">= 3.1"
|
|
21
|
+
|
|
22
|
+
s.add_development_dependency "appraisal"
|
|
23
|
+
s.add_development_dependency "coveralls"
|
|
24
|
+
s.add_development_dependency "rails", [">= 3.1"]
|
|
25
|
+
s.add_development_dependency "rake"
|
|
26
|
+
s.add_development_dependency "rspec-rails", "~> 3.7"
|
|
27
|
+
s.add_development_dependency "webmock", "~> 1.9"
|
|
28
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: square_event
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Andy Callaghan
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: activesupport
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '3.1'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '3.1'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: appraisal
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: coveralls
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rails
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '3.1'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '3.1'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rake
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rspec-rails
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '3.7'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '3.7'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: webmock
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - "~>"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '1.9'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - "~>"
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '1.9'
|
|
111
|
+
description: Square webhook integration for Rails applications
|
|
112
|
+
email: andy@andycallaghan.com
|
|
113
|
+
executables: []
|
|
114
|
+
extensions: []
|
|
115
|
+
extra_rdoc_files: []
|
|
116
|
+
files:
|
|
117
|
+
- ".gitignore"
|
|
118
|
+
- ".rspec"
|
|
119
|
+
- ".travis.yml"
|
|
120
|
+
- Appraisals
|
|
121
|
+
- CHANGELOG.md
|
|
122
|
+
- CONTRIBUTING.md
|
|
123
|
+
- Gemfile
|
|
124
|
+
- LICENSE.md
|
|
125
|
+
- README.md
|
|
126
|
+
- Rakefile
|
|
127
|
+
- app/controllers/square_event/webhook_controller.rb
|
|
128
|
+
- config/routes.rb
|
|
129
|
+
- gemfiles/rails5.1.gemfile
|
|
130
|
+
- gemfiles/rails5.2.gemfile
|
|
131
|
+
- gemfiles/rails6.0.gemfile
|
|
132
|
+
- gemfiles/rails6.1.gemfile
|
|
133
|
+
- gemfiles/rails_master.gemfile
|
|
134
|
+
- lib/square_event.rb
|
|
135
|
+
- lib/square_event/engine.rb
|
|
136
|
+
- lib/square_event/errors.rb
|
|
137
|
+
- lib/square_event/event.rb
|
|
138
|
+
- lib/square_event/version.rb
|
|
139
|
+
- lib/square_event/webhook.rb
|
|
140
|
+
- spec/controllers/webhook_controller_spec.rb
|
|
141
|
+
- spec/dummy/README.rdoc
|
|
142
|
+
- spec/dummy/Rakefile
|
|
143
|
+
- spec/dummy/app/controllers/application_controller.rb
|
|
144
|
+
- spec/dummy/app/helpers/application_helper.rb
|
|
145
|
+
- spec/dummy/app/mailers/.gitkeep
|
|
146
|
+
- spec/dummy/app/models/.gitkeep
|
|
147
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
|
148
|
+
- spec/dummy/config.ru
|
|
149
|
+
- spec/dummy/config/application.rb
|
|
150
|
+
- spec/dummy/config/boot.rb
|
|
151
|
+
- spec/dummy/config/database.yml
|
|
152
|
+
- spec/dummy/config/environment.rb
|
|
153
|
+
- spec/dummy/config/environments/development.rb
|
|
154
|
+
- spec/dummy/config/environments/production.rb
|
|
155
|
+
- spec/dummy/config/environments/test.rb
|
|
156
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
157
|
+
- spec/dummy/config/initializers/inflections.rb
|
|
158
|
+
- spec/dummy/config/initializers/mime_types.rb
|
|
159
|
+
- spec/dummy/config/initializers/new_framework_defaults_5_2.rb
|
|
160
|
+
- spec/dummy/config/initializers/secret_token.rb
|
|
161
|
+
- spec/dummy/config/initializers/session_store.rb
|
|
162
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
163
|
+
- spec/dummy/config/locales/en.yml
|
|
164
|
+
- spec/dummy/config/routes.rb
|
|
165
|
+
- spec/dummy/lib/assets/.gitkeep
|
|
166
|
+
- spec/dummy/log/.gitkeep
|
|
167
|
+
- spec/dummy/public/404.html
|
|
168
|
+
- spec/dummy/public/422.html
|
|
169
|
+
- spec/dummy/public/500.html
|
|
170
|
+
- spec/dummy/public/favicon.ico
|
|
171
|
+
- spec/dummy/script/rails
|
|
172
|
+
- spec/lib/stripe_event_spec.rb
|
|
173
|
+
- spec/rails_helper.rb
|
|
174
|
+
- spec/spec_helper.rb
|
|
175
|
+
- spec/support/fixtures/evt_payment_created.json
|
|
176
|
+
- square_event.gemspec
|
|
177
|
+
homepage: https://github.com/jammed-org/square_event
|
|
178
|
+
licenses:
|
|
179
|
+
- MIT
|
|
180
|
+
metadata: {}
|
|
181
|
+
post_install_message:
|
|
182
|
+
rdoc_options: []
|
|
183
|
+
require_paths:
|
|
184
|
+
- lib
|
|
185
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
186
|
+
requirements:
|
|
187
|
+
- - ">="
|
|
188
|
+
- !ruby/object:Gem::Version
|
|
189
|
+
version: '0'
|
|
190
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
|
+
requirements:
|
|
192
|
+
- - ">="
|
|
193
|
+
- !ruby/object:Gem::Version
|
|
194
|
+
version: '0'
|
|
195
|
+
requirements: []
|
|
196
|
+
rubygems_version: 3.2.3
|
|
197
|
+
signing_key:
|
|
198
|
+
specification_version: 4
|
|
199
|
+
summary: Square webhook integration for Rails applications
|
|
200
|
+
test_files:
|
|
201
|
+
- Appraisals
|
|
202
|
+
- gemfiles/rails5.1.gemfile
|
|
203
|
+
- gemfiles/rails5.2.gemfile
|
|
204
|
+
- gemfiles/rails6.0.gemfile
|
|
205
|
+
- gemfiles/rails6.1.gemfile
|
|
206
|
+
- gemfiles/rails_master.gemfile
|
|
207
|
+
- spec/controllers/webhook_controller_spec.rb
|
|
208
|
+
- spec/dummy/README.rdoc
|
|
209
|
+
- spec/dummy/Rakefile
|
|
210
|
+
- spec/dummy/app/controllers/application_controller.rb
|
|
211
|
+
- spec/dummy/app/helpers/application_helper.rb
|
|
212
|
+
- spec/dummy/app/mailers/.gitkeep
|
|
213
|
+
- spec/dummy/app/models/.gitkeep
|
|
214
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
|
215
|
+
- spec/dummy/config.ru
|
|
216
|
+
- spec/dummy/config/application.rb
|
|
217
|
+
- spec/dummy/config/boot.rb
|
|
218
|
+
- spec/dummy/config/database.yml
|
|
219
|
+
- spec/dummy/config/environment.rb
|
|
220
|
+
- spec/dummy/config/environments/development.rb
|
|
221
|
+
- spec/dummy/config/environments/production.rb
|
|
222
|
+
- spec/dummy/config/environments/test.rb
|
|
223
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
224
|
+
- spec/dummy/config/initializers/inflections.rb
|
|
225
|
+
- spec/dummy/config/initializers/mime_types.rb
|
|
226
|
+
- spec/dummy/config/initializers/new_framework_defaults_5_2.rb
|
|
227
|
+
- spec/dummy/config/initializers/secret_token.rb
|
|
228
|
+
- spec/dummy/config/initializers/session_store.rb
|
|
229
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
230
|
+
- spec/dummy/config/locales/en.yml
|
|
231
|
+
- spec/dummy/config/routes.rb
|
|
232
|
+
- spec/dummy/lib/assets/.gitkeep
|
|
233
|
+
- spec/dummy/log/.gitkeep
|
|
234
|
+
- spec/dummy/public/404.html
|
|
235
|
+
- spec/dummy/public/422.html
|
|
236
|
+
- spec/dummy/public/500.html
|
|
237
|
+
- spec/dummy/public/favicon.ico
|
|
238
|
+
- spec/dummy/script/rails
|
|
239
|
+
- spec/lib/stripe_event_spec.rb
|
|
240
|
+
- spec/rails_helper.rb
|
|
241
|
+
- spec/spec_helper.rb
|
|
242
|
+
- spec/support/fixtures/evt_payment_created.json
|