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 +4 -4
- data/README.md +8 -5
- data/lib/loadrunner/runner.rb +8 -3
- data/lib/loadrunner/server.rb +1 -0
- data/lib/loadrunner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1459ae4f2cd14822f022f6cbc8f752c387afee3642609391387a6f1fa5c0d355
|
4
|
+
data.tar.gz: 9a8f9f8470bc7044e9b47e841f939b9bbfff2e3c340cd2d760cbd37c5fed597c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
39
|
-
2. Make sure that all files within that folder are
|
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=<
|
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
|
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`
|
data/lib/loadrunner/runner.rb
CHANGED
@@ -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
|
73
|
-
|
74
|
-
|
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
|
data/lib/loadrunner/server.rb
CHANGED
@@ -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']
|
data/lib/loadrunner/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: super_docopt
|