omnihooks 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a903371f84e0b5f5115f1d1045e341c4de849a64
4
- data.tar.gz: 42b89a3fe407b4e47cb814e5bf48ef2ef4255587
2
+ SHA256:
3
+ metadata.gz: f8ed31eb8cc2700bd4478c12d3050c62e8a91e863c492078584b2840e1808dbd
4
+ data.tar.gz: eea3cd6d8f70ff68e20dfc1412c1fdeae0f4dea800b1be91217afc8b6771d82f
5
5
  SHA512:
6
- metadata.gz: 107bf07dcd06cec7f7c9e2fba4745dcc16eed9f866dd54bb2d99970918217528e96d2df19826039cb31c0c8c92df13c05e3c9bd1bcfd57d5755c76b9f27c1f01
7
- data.tar.gz: d555956919f628e9b81c3ec2bf04cc63a4adc51d573d2110caa71fac663010dfd56e9e6efa31f0222416381661b812f0d930230246553fa959bab2d8bfe6f4d6
6
+ metadata.gz: 4f6778e10925e79babec7b15ab045597573bce5161a694aeb36c90b6308286f60c74b3b19e349d58eb4215643abd390330fc291aa136d0c8608647a4cb26ada6
7
+ data.tar.gz: 0f0b40f402d57f36781723fb2450f4816064868ff127a35e4bb86e820ab919d7750a8954f830b1bd4f4c76fade776f5f47bf73b17b13dcf1c61cb80cda6c2e6a
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.1.6
1
+ ruby-2.4.5
data/README.md CHANGED
@@ -1,31 +1,52 @@
1
- # OmniHooks
1
+ # OmniHooks: Standardized Multi-Provider Webhooks
2
2
 
3
- TODO: Write a gem description
3
+ ## Introduction
4
4
 
5
- ## Installation
5
+ OmniHooks is a library that standardizes multi-provider webhooks for web applications. It was created to be powerful, flexible, and do as little as possible. Any developer can create strategies for OmniHooks that can handle webhooks via disparate systems.
6
6
 
7
- Add this line to your application's Gemfile:
7
+ In order to use OmniHooks in your applications, you will need to leverage one or more strategies. These strategies are generally released individually as RubyGems, and you can see a [community maintained list](https://github.com/dropstream/omnihooks/wiki/List-of-Strategies) on the wiki for this project.
8
8
 
9
- ```ruby
10
- gem 'omnihooks'
11
- ```
9
+ ## Getting Started
12
10
 
13
- And then execute:
11
+ Each OmniHook strategy is a Rack Middleware. That means that you can use it the same way that you use any other Rack middleware. For example, to use the built-in Developer strategy in a Sinatra application I might do this:
14
12
 
15
- $ bundle
13
+ ````ruby
14
+ require 'sinatra'
15
+ require 'omnihooks'
16
16
 
17
- Or install it yourself as:
17
+ class MyApplication < Sinatra::Base
18
+ use Rack::Session::Cookie
19
+ use OmniHooks::Strategies::Developer
20
+ end
21
+ ````
18
22
 
19
- $ gem install omnihooks
23
+ Because OmniHooks is built for multi-provider webhooks, I may want to leave room to run multiple strategies. For this, the built-in OmniHooks::Builder class gives you an easy way to specify multiple strategies.
20
24
 
21
- ## Usage
25
+ ````ruby
26
+ require 'sinatra'
27
+ require 'omnihooks'
22
28
 
23
- TODO: Write usage instructions here
29
+ class MyApplication < Sinatra::Base
30
+ use Rack::Session::Cookie
31
+ use OmniHooks::Builder do
32
+ provider :developer do |p|
33
+ p.configure do |c|
34
+ c.subscribe 'foo', Proc.new { |event| nil }
35
+ end
36
+ end
37
+ provider :core_warehouse do |p|
38
+ p.configure do |c|
39
+ c.subscribe 'Shipment', Proc.new { |event| nil }
40
+ end
41
+ end
42
+ end
43
+ end
44
+ ````
24
45
 
25
- ## Contributing
46
+ ## Logging
26
47
 
27
- 1. Fork it ( https://github.com/[my-github-username]/omnihooks/fork )
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 5. Create a new Pull Request
48
+ OmniHooks supports a configurable logger. By default, OmniHooks will log to STDOUT but you can configure this using `OmniHooks.config.logger`:
49
+
50
+ ## Resources
51
+
52
+ The [OmniHooks Wiki](https://github.com/dropstream/omnihooks/wiki) has actively maintained in-depth documentation for OmniHooks. It should be your first stop if you are wondering about a more in-depth look at OmniHooks, how it works, and how to use it.
@@ -1,3 +1,3 @@
1
1
  module OmniHooks
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/omnihooks.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "activesupport", ">= 3.1"
21
- spec.add_dependency 'rack', '~> 1.0'
21
+ spec.add_dependency 'rack', ">= 1.2", "< 3"
22
22
  spec.add_dependency 'hashie', ['>= 1.2', '< 4']
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.7"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnihooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Falconer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-21 00:00:00.000000000 Z
11
+ date: 2020-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '1.2'
34
+ - - "<"
32
35
  - !ruby/object:Gem::Version
33
- version: '1.0'
36
+ version: '3'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '1.2'
44
+ - - "<"
39
45
  - !ruby/object:Gem::Version
40
- version: '1.0'
46
+ version: '3'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: hashie
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -144,8 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
150
  - !ruby/object:Gem::Version
145
151
  version: '0'
146
152
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.4.8
153
+ rubygems_version: 3.0.6
149
154
  signing_key:
150
155
  specification_version: 4
151
156
  summary: A generalized framework for multiple-provider webhooks subscriptions.