sinatra-github_webhooks 0.2.0 → 0.2.1

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: 95672e1171e1f3205042fca7f7ff8a6de76a71b1
4
- data.tar.gz: f0a285d54e3a6d5e496f21e0c29809c1915b3f7b
2
+ SHA256:
3
+ metadata.gz: 57345efc53fd554a9ed477b34594a9510859f12b38bf284650a13e95210edcb4
4
+ data.tar.gz: f951ea84939fb1faa210a05510070a34cb9bbe475c3c1dad4a27f5c447216cba
5
5
  SHA512:
6
- metadata.gz: a7a62b8579cccb4add386d7bfa847fdf033aefe9ba478d0d56e35dbac8da517433b4eea7614d76e5f2feccda49e4baa9fcba12d81d88f23977cc5e38961238dd
7
- data.tar.gz: 0001659f2e011ca76535efdd8472e2459ee43443935809d38acf32580face50a57db41a8f97ce4bff167bb7ea452c6453901f12680186e2e3a7edf5fb5fb7156
6
+ metadata.gz: c36cafe2786a150d72cb8b64a93f90ef5549d8e028eb2398058ce21bfcd1b9b873992dc626edc42080361549641b0c2780ba07febf6f77e21ac76d87d01148da
7
+ data.tar.gz: 68af9a2fd9dfc65239cb769a20f06cfdc94c766725731d7bb6c4cb7fd5c97da7969fb895240308c79de7c6d23942c713ccd36704541a9c9ad68ed78446214e8e
@@ -0,0 +1,33 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Test
9
+
10
+ on: [push, pull_request]
11
+
12
+ jobs:
13
+ test:
14
+ name: Test on Ruby ${{ matrix.ruby_version }}
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ ruby_version: ['2.5', '2.6', '2.7']
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby ${{ matrix.ruby_version }}
24
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
25
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
26
+ # uses: ruby/setup-ruby@v1
27
+ uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
28
+ with:
29
+ ruby-version: ${{ matrix.ruby_version }}
30
+ - name: Install dependencies
31
+ run: bundle install
32
+ - name: Run tests
33
+ run: bundle exec rake
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.2.1] - 2020-11-11
7
+
8
+ ### Fixed
9
+
10
+ - Fix conflict with Sinatra::JSON ([#1](https://github.com/chrismytton/sinatra-github_webhooks/pull/1))
11
+
6
12
  ## [0.2.0] - 2015-11-29
7
13
 
8
14
  ### Changed
@@ -17,3 +23,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
17
23
  - `payload` method which returns a Hash of the request body after verifying the request signature.
18
24
 
19
25
  [0.2.0]: https://github.com/chrismytton/rack-github_webhooks/compare/v0.1.0...v0.2.0
26
+ [0.2.1]: https://github.com/chrismytton/rack-github_webhooks/compare/v0.2.0...v0.2.1
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in sinatra-github_webhooks.gemspec
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rake/testtask'
3
5
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'sinatra/github_webhooks'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sinatra/github_webhooks/version'
2
4
 
3
5
  require 'sinatra/base'
@@ -11,7 +13,7 @@ module Sinatra
11
13
  end
12
14
 
13
15
  def payload
14
- JSON.parse(payload_body)
16
+ ::JSON.parse(payload_body)
15
17
  end
16
18
 
17
19
  private
@@ -26,7 +28,7 @@ module Sinatra
26
28
  # Taken from https://developer.github.com/webhooks/securing/
27
29
  def verify_signature(payload_body)
28
30
  unless settings.respond_to?(:github_webhook_secret)
29
- logger.warn "No :github_webhook_secret setting found, skipping signature verification"
31
+ logger.warn 'No :github_webhook_secret setting found, skipping signature verification'
30
32
  return
31
33
  end
32
34
  signature = Rack::GithubWebhooks::Signature.new(
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sinatra
2
4
  module GithubWebhooks
3
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
4
6
  end
5
7
  end
@@ -1,7 +1,6 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'sinatra/github_webhooks/version'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/sinatra/github_webhooks/version'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
6
  spec.name = 'sinatra-github_webhooks'
@@ -18,13 +17,13 @@ Gem::Specification.new do |spec|
18
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
18
  spec.require_paths = ['lib']
20
19
 
21
- spec.add_dependency 'sinatra'
22
20
  spec.add_dependency 'rack-github_webhooks', '>= 0.3.0'
21
+ spec.add_dependency 'sinatra'
23
22
 
24
- spec.add_development_dependency 'bundler', '~> 1.10'
25
- spec.add_development_dependency 'rake', '~> 10.0'
23
+ spec.add_development_dependency 'bundler'
26
24
  spec.add_development_dependency 'minitest'
27
25
  spec.add_development_dependency 'pry'
28
26
  spec.add_development_dependency 'rack-test'
27
+ spec.add_development_dependency 'rake'
29
28
  spec.add_development_dependency 'simplecov'
30
29
  end
metadata CHANGED
@@ -1,73 +1,73 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-github_webhooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Mytton
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-29 00:00:00.000000000 Z
11
+ date: 2020-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: sinatra
14
+ name: rack-github_webhooks
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.3.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: rack-github_webhooks
28
+ name: sinatra
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.0
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.0
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.10'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.10'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
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: '10.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: minitest
70
+ name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: pry
84
+ name: rack-test
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rack-test
98
+ name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -122,13 +122,14 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description:
125
+ description:
126
126
  email:
127
127
  - chrismytton@gmail.com
128
128
  executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ".github/workflows/test.yml"
132
133
  - ".gitignore"
133
134
  - ".travis.yml"
134
135
  - CHANGELOG.md
@@ -145,7 +146,7 @@ homepage: https://github.com/chrismytton/sinatra-github_webhooks
145
146
  licenses:
146
147
  - MIT
147
148
  metadata: {}
148
- post_install_message:
149
+ post_install_message:
149
150
  rdoc_options: []
150
151
  require_paths:
151
152
  - lib
@@ -160,9 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
161
  - !ruby/object:Gem::Version
161
162
  version: '0'
162
163
  requirements: []
163
- rubyforge_project:
164
- rubygems_version: 2.4.5.1
165
- signing_key:
164
+ rubygems_version: 3.1.2
165
+ signing_key:
166
166
  specification_version: 4
167
167
  summary: Helper methods for receiving GitHub webhooks with Sinatra
168
168
  test_files: []