Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.18.1 #272

Merged
merged 41 commits into from
Apr 21, 2020
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c98ca8d
rbenv -> asdf
gavinballard Apr 4, 2020
9c3e757
Add Node version to initialise.sh
gavinballard Apr 4, 2020
ddbd81c
Add TriggerUsage model to track status of flow triggers
gavinballard Apr 5, 2020
130a90d
Add UpdateTriggerUsage service method
gavinballard Apr 5, 2020
7d5bd02
Add trigger usage controller
gavinballard Apr 5, 2020
2dca220
Fix long index name
gavinballard Apr 5, 2020
b2bff82
Update test schema
gavinballard Apr 5, 2020
4f7618e
Change service call to expect a parsed Time object
gavinballard Apr 5, 2020
36620a0
Add test for trigger usage service
gavinballard Apr 5, 2020
0866152
Add controller tests for trigger usage updates
gavinballard Apr 5, 2020
a79275b
Cleanup
gavinballard Apr 5, 2020
10a3df3
Add (failing) test for skipping triggers
gavinballard Apr 5, 2020
d1c5b5e
Update processing to skip unused triggers
gavinballard Apr 5, 2020
d1c0abd
Add additional flow trigger tests
gavinballard Apr 5, 2020
c130f09
Add Flow Trigger Usage info to README etc
gavinballard Apr 5, 2020
3e7aad2
Parse shop timezone from iana_timezone attribute
gavinballard Apr 6, 2020
9aaa713
Tweak dependencies
gavinballard Apr 13, 2020
1e92991
Update PULL_REQUEST_TEMPLATE.md
gavinballard Apr 16, 2020
fd4a1e4
Update CHANGELOG.md
gavinballard Apr 16, 2020
743b369
Update UPGRADING.md
gavinballard Apr 16, 2020
20c4e04
Remove test matrix line from PR template
gavinballard Apr 16, 2020
32fc33b
Add nodejs version to .tool-versions
gavinballard Apr 16, 2020
165ad88
Add nodejs to .tool-versions template
gavinballard Apr 16, 2020
b445f24
Fix some tests for new timezone method
gavinballard Apr 16, 2020
c0753de
use sass-rails version 6 to match rails version
tomcdisco Apr 16, 2020
af3d05a
sass-rails 6 seems to require manifest.js
tomcdisco Apr 16, 2020
777c62c
Merge pull request #270 from discolabs/bugfix/rails6_incompatible_gem…
tomcdisco Apr 17, 2020
b496a2d
Merge branch 'develop' into add-flow-usage
gavinballard Apr 20, 2020
813e006
Add default jobs and concerns for GDPR webhooks
gavinballard Apr 20, 2020
5a9300f
Add ability to specify fields for webhooks
gavinballard Apr 20, 2020
ab5008b
Add more robust testing for updating webhooks when needed
gavinballard Apr 20, 2020
2d4829b
Add documentation for GDPR webhooks
gavinballard Apr 20, 2020
18abfa5
Document new webhook_fields option
gavinballard Apr 20, 2020
ba6ccaa
Update UPGRADING and CHANGELOG
gavinballard Apr 20, 2020
ae1b454
Fix for fixture
gavinballard Apr 20, 2020
192bd8e
Merge pull request #269 from discolabs/add-flow-usage
gavinballard Apr 20, 2020
0211c0e
Merge branch 'develop' into refactor-webhook-sync
gavinballard Apr 20, 2020
02d3913
Merge pull request #271 from discolabs/refactor-webhook-sync
gavinballard Apr 20, 2020
c05315c
Bump version
gavinballard Apr 20, 2020
906cdca
Merge branch 'release/0.18.1'
gavinballard Apr 20, 2020
b336431
Merge tag '0.18.1' into develop
gavinballard Apr 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document new webhook_fields option
gavinballard committed Apr 20, 2020
commit 18abfa5f9bf02dc8238c66dc86fcc1adc0db03bd
42 changes: 38 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -422,11 +422,45 @@ There shouldn't be any need to extend or override `DiscoApp::WebhooksController`
inside an application - all application logic should simply be placed inside the
relevant `*Job` class.

Webhooks should generally be created inside the `perform` method of the
`DiscoApp::AppInstalledJob` background task. By default, webhooks are set up to
listen for the `app/uninstalled` and `shop/update` webhook topics.
The registration of webhooks for a shop is typically handled automatically by
the `DiscoApp::SynchroniseWebhooksJob` background job, which is either queued
automatically on installation (the default `DiscoApp::AppInstalledJob`) does
this) or by the `webhooks:sync` rake task.

To check which webhooks are registered by your app run `shop.with_api_context{ShopifyAPI::Webhook.find(:all)}` from your console, where `shop = DiscoApp::Shop.find(your_shop_id)`.
To check which webhooks are currently registered by your app for any given
shop, you can run the following from the Rails console:

```ruby
shop = DiscoApp::Shop.find(your_shop_id)
shop.with_api_context { ShopifyAPI::Webhook.find(:all) }
```

All application are configured to register webhooks for the `app/uninstalled`
and `shop/update` webhook topics, as these are almost always required.
Additional webhook topics can be defined in `config/initializers/disco_app.rb`,
with:

```ruby
DiscoApp.configure do |config|

config.webhook_topics = [:'orders/create', :'orders/paid']

end
```

By default, webhooks will be registered with an empty `fields` attribute
(meaning all object fields will be sent in the payload). This can be overridden
on a per-topic basis with the optional `webhook_fields` configuration option:

```ruby
DiscoApp.configure do |config|

config.webhook_fields = {
'orders/paid': [:id, :financial_status]
}

end
```

### Shopify Flow
The gem provides support for [Shopify Flow Connectors][], allowing applications