loadrunner 0.4.3 → 0.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd9af2dc326ef685b9146a1b8a298abf9ed016561863165fd08e7aa5e4b5e79a
4
- data.tar.gz: 75fc0ebe16b294f51f0f6aa324170cb9e653315a26b0be8af42f98ee90c2a014
3
+ metadata.gz: 1459ae4f2cd14822f022f6cbc8f752c387afee3642609391387a6f1fa5c0d355
4
+ data.tar.gz: 9a8f9f8470bc7044e9b47e841f939b9bbfff2e3c340cd2d760cbd37c5fed597c
5
5
  SHA512:
6
- metadata.gz: b85c8c7f3bf7d681c6e0ebc7adec6a968a78317723c47492782859068414cfe632cd25b75cf26e5f1c69e336c8b3b779718830ace0f98c8784bf235de1592323
7
- data.tar.gz: d577629537efad165e299e9d9b0853239d89369f7660f455c34d54f78b468f57f5edad85f831c654ed8affe5e4765740db7a7855b323d12b2f709ff6e523a78b
6
+ metadata.gz: 7cc3843219f3249f16812b740782d7a716660ae7d1532117b59799658da8abe7248573039e45ecbb87e3a4b63d6faf80490bf9ed6b2e91a63673e48fe282089b
7
+ data.tar.gz: a91ed21a6f56e4f6b7df7b7fb49e04c93714e5631d98ad6dc126c532d8ea43b3fd3b9f47b5e66b252809e0fd78399709d53af88f6a47c0af3ea43d0fa934301b
data/README.md CHANGED
@@ -12,7 +12,7 @@ statuses.
12
12
 
13
13
  It provides these features:
14
14
 
15
- - A webserver that responds to GitHub webhook events and can run any
15
+ - A web server that responds to GitHub webhook events and can run any
16
16
  arbitrary script written in any language.
17
17
  - A command line utility for testing your webhook server configuration by
18
18
  sending simulated events.
@@ -35,8 +35,8 @@ Getting Started
35
35
  --------------------------------------------------
36
36
 
37
37
  1. Download the [hooks](hooks) directory from this repository, as an
38
- exmaple. This directory contains several hook examples.
39
- 2. Make sure that all files within that folder are executables.
38
+ example. This directory contains several hook examples.
39
+ 2. Make sure that all files within that folder are executable.
40
40
  3. Start the server (from the `hooks` **parent** directory):
41
41
  `loadrunner server`
42
42
  4. In another terminal, send a sample webhook event:
@@ -66,7 +66,8 @@ the `./hooks` directory, using one of these format:
66
66
  hooks/<repo name>/global
67
67
  hooks/<repo name>/<event type>
68
68
  hooks/<repo name>/<event type>@branch=<branch name>
69
- hooks/<repo name>/<event type>@tag=<branch name>
69
+ hooks/<repo name>/<event type>@tag=<tag name>
70
+ hooks/<repo name>/<event type>@tag
70
71
 
71
72
  For example:
72
73
 
@@ -75,18 +76,20 @@ For example:
75
76
  hooks/myrepo/push
76
77
  hooks/myrepo/push@branch=master
77
78
  hooks/myrepo/push@tag=release
79
+ hooks/myrepo/push@tag
78
80
 
79
81
  When none of the hooks are found, Loadrunner will respond with a list of
80
82
  hooks it was looking for, so you can use this response to figure out what
81
83
  it needs.
82
84
 
83
- The hooks can be written in any language, and should simply be executables.
85
+ The hooks can be written in any language, and should simply be executable.
84
86
 
85
87
  ### Environment Variables
86
88
 
87
89
  These environment variables are available to your hooks:
88
90
 
89
91
  - `LOADRUNNER_REPO`
92
+ - `LOADRUNNER_OWNER`
90
93
  - `LOADRUNNER_EVENT`
91
94
  - `LOADRUNNER_BRANCH`
92
95
  - `LOADRUNNER_COMMIT`
@@ -63,16 +63,21 @@ module Loadrunner
63
63
 
64
64
  def matching_hooks
65
65
  base = "#{hooks_dir}/#{opts[:repo]}/#{opts[:event]}"
66
+
66
67
  hooks = [
67
68
  "#{hooks_dir}/global",
68
69
  "#{hooks_dir}/#{opts[:repo]}/global",
69
70
  "#{base}"
70
71
  ]
71
72
 
72
- hooks.tap do |h|
73
- h << "#{base}@branch=#{opts[:branch]}" if opts[:branch]
74
- h << "#{base}@tag=#{opts[:tag]}" if opts[:tag]
73
+ hooks << "#{base}@branch=#{opts[:branch]}" if opts[:branch]
74
+
75
+ if opts[:tag]
76
+ hooks << "#{base}@tag=#{opts[:tag]}"
77
+ hooks << "#{base}@tag"
75
78
  end
79
+
80
+ hooks
76
81
  end
77
82
 
78
83
  end
@@ -32,6 +32,7 @@ module Loadrunner
32
32
 
33
33
  opts = {}
34
34
  opts[:repo] = payload.dig('repository', 'name')
35
+ opts[:owner] = payload.dig('repository', 'owner', 'name')
35
36
  opts[:commit] = payload['after']
36
37
  opts[:event] = request.env['HTTP_X_GITHUB_EVENT']
37
38
  opts[:ref] = payload['ref']
@@ -1,3 +1,3 @@
1
1
  module Loadrunner
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loadrunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-25 00:00:00.000000000 Z
11
+ date: 2019-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: super_docopt