conjur-rack-heartbeat 2.0.0 → 2.2.1.pre.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -2
- data/CHANGELOG.md +30 -0
- data/Dockerfile +17 -0
- data/Gemfile +1 -0
- data/Jenkinsfile +85 -0
- data/Rakefile +1 -1
- data/bin/parse-a-changelog +11 -0
- data/{rack-heartbeat.gemspec → conjur-rack-heartbeat.gemspec} +2 -2
- data/lib/conjur-rack-heartbeat.rb +7 -1
- data/lib/rack/heartbeat/railtie.rb +1 -1
- data/lib/rack/heartbeat/sinatra.rb +20 -0
- data/publish-rubygem.sh +5 -0
- data/test.sh +12 -0
- metadata +27 -20
- data/jenkins.sh +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 78efefef913da2c11c5074a9444bd4d6aa4ea16484d6f3c0e896eef13025bfda
|
4
|
+
data.tar.gz: 16b0ea6dbf199bf11ddb05e88b6de92d56abdce5af1265fe08fdc745a57af4b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72a08c1bffbc85b5f1b5336352cd0efc0479e7435481a98475b0f2cb4206b8c3921b852bf7de07d41d46f975089f9bfa39070c2ca23936f46de1c02581691521
|
7
|
+
data.tar.gz: 46bb0432eff5c4095674a666a3747a281513c8b4c379cba5239bbe1ff26de98baa2ad04ed8d340b3e6a69ba84691d7844643b58ed216633939cda488920df7bc
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
### Changed
|
9
|
+
- Nothing should go in this section, please add to the latest unreleased version
|
10
|
+
(and update the corresponding date), or add a new version.
|
11
|
+
|
12
|
+
## [2.2.1] - 2022-01-19
|
13
|
+
|
14
|
+
## [2.2.0] - 2018-04-24
|
15
|
+
### Added
|
16
|
+
- Use a symbol when loading `Rack::Heartbeat` into the app's middleware. This
|
17
|
+
change means we can support Rails 5.2+. From upstream
|
18
|
+
https://github.com/imajes/rack-heartbeat/commit/cac635cd29a61afd23899128b674443176295ad5
|
19
|
+
|
20
|
+
## [2.1.0] - 2016-04-07
|
21
|
+
### Added
|
22
|
+
- Add Sinatra support [#1](https://github.com/conjurinc/rack-heartbeat/pull/1)
|
23
|
+
|
24
|
+
## [2.0.0] - 2016-01-17
|
25
|
+
### Added
|
26
|
+
- Adapted to provide `OPTIONS /` as a heartbeat URL, for Conjur
|
27
|
+
|
28
|
+
## [1.0.1] - 2015-03-23
|
29
|
+
### Changed
|
30
|
+
- Forked from https://github.com/imajes/rack-heartbeat
|
data/Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
FROM registry.tld/cyberark/ubuntu-ruby-fips:latest
|
2
|
+
|
3
|
+
RUN export DEBIAN_FRONTEND=noninteractive && \
|
4
|
+
apt-get update -y && \
|
5
|
+
apt-get dist-upgrade -y && \
|
6
|
+
apt-get install -y build-essential curl git tzdata
|
7
|
+
|
8
|
+
WORKDIR /usr/src/app
|
9
|
+
|
10
|
+
COPY Gemfile* ./
|
11
|
+
COPY *.gemspec ./
|
12
|
+
COPY VERSION ./
|
13
|
+
RUN bundle install
|
14
|
+
|
15
|
+
COPY . .
|
16
|
+
|
17
|
+
# CMD ["./your-daemon-or-script.rb"]
|
data/Gemfile
CHANGED
data/Jenkinsfile
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
#!/usr/bin/env groovy
|
2
|
+
|
3
|
+
// Automated release, promotion and dependencies
|
4
|
+
properties([
|
5
|
+
release.addParams()
|
6
|
+
])
|
7
|
+
|
8
|
+
if (params.MODE == "PROMOTE") {
|
9
|
+
release.promote(params.VERSION_TO_PROMOTE) { sourceVersion, targetVersion, assetDirectory ->
|
10
|
+
sh './publish-rubygem.sh'
|
11
|
+
}
|
12
|
+
return
|
13
|
+
}
|
14
|
+
|
15
|
+
pipeline {
|
16
|
+
agent { label 'executor-v2' }
|
17
|
+
|
18
|
+
options {
|
19
|
+
timestamps()
|
20
|
+
buildDiscarder(logRotator(numToKeepStr: '30'))
|
21
|
+
}
|
22
|
+
|
23
|
+
triggers {
|
24
|
+
cron(getDailyCronString())
|
25
|
+
}
|
26
|
+
|
27
|
+
environment {
|
28
|
+
MODE = release.canonicalizeMode()
|
29
|
+
}
|
30
|
+
|
31
|
+
stages {
|
32
|
+
|
33
|
+
stage ("Skip build if triggering job didn't create a release") {
|
34
|
+
when {
|
35
|
+
expression {
|
36
|
+
MODE == "SKIP"
|
37
|
+
}
|
38
|
+
}
|
39
|
+
steps {
|
40
|
+
script {
|
41
|
+
currentBuild.result = 'ABORTED'
|
42
|
+
error("Aborting build because this build was triggered from upstream, but no release was built")
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
stage('Validate Changelog and set version') {
|
48
|
+
steps {
|
49
|
+
sh './bin/parse-a-changelog'
|
50
|
+
updateVersion("CHANGELOG.md", "${BUILD_NUMBER}")
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
stage('Test') {
|
55
|
+
steps {
|
56
|
+
sh './test.sh'
|
57
|
+
}
|
58
|
+
post { always {
|
59
|
+
junit 'test/junit.xml'
|
60
|
+
}}
|
61
|
+
}
|
62
|
+
|
63
|
+
stage('Release') {
|
64
|
+
when {
|
65
|
+
expression {
|
66
|
+
MODE == "RELEASE"
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
steps {
|
71
|
+
release { billOfMaterialsDirectory, assetDirectory ->
|
72
|
+
sh './publish-rubygem.sh'
|
73
|
+
sh 'cp conjur-rack-heartbeat-*.gem release-assets/.'
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
}
|
79
|
+
|
80
|
+
post {
|
81
|
+
always {
|
82
|
+
cleanupAndNotify(currentBuild.currentResult)
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
data/Rakefile
CHANGED
@@ -4,14 +4,14 @@ Gem::Specification.new do |gem|
|
|
4
4
|
gem.authors = ["James Cox", "Kevin Gilpin"]
|
5
5
|
gem.email = ["james@imaj.es", "kgilpin@gmail.com"]
|
6
6
|
gem.summary = %q{Provides OPTIONS / as a heartbeat URL}
|
7
|
-
gem.homepage = "https://
|
7
|
+
gem.homepage = "https://rubygems.org/gems/conjur-rack-heartbeat"
|
8
8
|
|
9
9
|
gem.files = `git ls-files`.split($\)
|
10
10
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
11
11
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
12
12
|
gem.name = "conjur-rack-heartbeat"
|
13
13
|
gem.require_paths = ["lib"]
|
14
|
-
gem.version =
|
14
|
+
gem.version = File.open('VERSION', &:readline)
|
15
15
|
|
16
16
|
gem.add_development_dependency('minitest')
|
17
17
|
gem.add_development_dependency('rack-test')
|
data/publish-rubygem.sh
ADDED
data/test.sh
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/bin/bash -e
|
2
|
+
|
3
|
+
docker build -t rack-heartbeat .
|
4
|
+
|
5
|
+
docker run --rm \
|
6
|
+
-v $PWD/coverage:/usr/src/app/coverage \
|
7
|
+
-v $PWD/test:/usr/src/app/test \
|
8
|
+
rack-heartbeat \
|
9
|
+
bundle exec rake jenkins
|
10
|
+
# gem install -N bundler
|
11
|
+
# bundle
|
12
|
+
# bundle exec rake jenkins
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjur-rack-heartbeat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.1.pre.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Cox
|
@@ -9,87 +9,94 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rack-test
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: minitest-junit
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rack
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
description:
|
71
71
|
email:
|
72
72
|
- james@imaj.es
|
73
73
|
- kgilpin@gmail.com
|
74
|
-
executables:
|
74
|
+
executables:
|
75
|
+
- parse-a-changelog
|
75
76
|
extensions: []
|
76
77
|
extra_rdoc_files: []
|
77
78
|
files:
|
78
|
-
- .gitignore
|
79
|
-
- .project
|
79
|
+
- ".gitignore"
|
80
|
+
- ".project"
|
81
|
+
- CHANGELOG.md
|
82
|
+
- Dockerfile
|
80
83
|
- Gemfile
|
84
|
+
- Jenkinsfile
|
81
85
|
- LICENSE
|
82
86
|
- README.md
|
83
87
|
- Rakefile
|
88
|
+
- bin/parse-a-changelog
|
84
89
|
- config.ru
|
85
|
-
-
|
90
|
+
- conjur-rack-heartbeat.gemspec
|
86
91
|
- lib/conjur-rack-heartbeat.rb
|
87
92
|
- lib/rack/heartbeat.rb
|
88
93
|
- lib/rack/heartbeat/railtie.rb
|
89
|
-
- rack
|
94
|
+
- lib/rack/heartbeat/sinatra.rb
|
95
|
+
- publish-rubygem.sh
|
96
|
+
- test.sh
|
90
97
|
- test/helper.rb
|
91
98
|
- test/rack/test_heartbeat.rb
|
92
|
-
homepage: https://
|
99
|
+
homepage: https://rubygems.org/gems/conjur-rack-heartbeat
|
93
100
|
licenses: []
|
94
101
|
metadata: {}
|
95
102
|
post_install_message:
|
@@ -98,17 +105,17 @@ require_paths:
|
|
98
105
|
- lib
|
99
106
|
required_ruby_version: !ruby/object:Gem::Requirement
|
100
107
|
requirements:
|
101
|
-
- -
|
108
|
+
- - ">="
|
102
109
|
- !ruby/object:Gem::Version
|
103
110
|
version: '0'
|
104
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
112
|
requirements:
|
106
|
-
- -
|
113
|
+
- - ">"
|
107
114
|
- !ruby/object:Gem::Version
|
108
|
-
version:
|
115
|
+
version: 1.3.1
|
109
116
|
requirements: []
|
110
117
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
118
|
+
rubygems_version: 2.7.6.2
|
112
119
|
signing_key:
|
113
120
|
specification_version: 4
|
114
121
|
summary: Provides OPTIONS / as a heartbeat URL
|