octopoller 0.2.0 → 0.3.0
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/Gemfile.lock +1 -1
- data/RELEASE.md +10 -7
- data/lib/octopoller/version.rb +1 -1
- data/script/package +12 -1
- data/script/release +46 -9
- data/script/validate +44 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f208e25fceb01c8bfaa93d95fa6c9f7ea7fa3f364c1edc0e6560e21e60eab713
|
4
|
+
data.tar.gz: 55bb40825baf87505dcd14385c526bedb7cc60f0fcd105b9288daec4e1711042
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fbddcca87baec1bf16d14c34e0b92bfbace2050bad8d67d479ad41af76563bf7716f3b45e3cba31d8989a3517bdddcfcbdf39e7cb455c3d6ce8c35a3b973632
|
7
|
+
data.tar.gz: e926410535fa00cbc7f8d6247536f8faaba79fb2477e411a45028b0705d1ec982d09c264c4bab510aca63b51c9306864dc167e73a19d40d7ea4cf5ed4566f7c5
|
data/Gemfile.lock
CHANGED
data/RELEASE.md
CHANGED
@@ -2,14 +2,17 @@
|
|
2
2
|
|
3
3
|
1. Create a list of all the changes since the prior release
|
4
4
|
1. Compare the previous release to `master` using `https://github.com/octokit/octopoller.rb/compare/`v1.3.3.7...master` (assuming that the last release was `v1.3.3.7`)
|
5
|
-
|
6
|
-
|
5
|
+
2. Ensure there are no breaking changes _(if there are breaking changes you'll need to create a release branch without those changes or bump the major version)_
|
6
|
+
3. Update the version
|
7
7
|
1. Checkout `master`
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
2. Update the constant in `lib/octopoller/version.rb` (when `bundle` is executed the version in the `Gemfile.lock` will be updated)
|
9
|
+
3. Run `bin/setup` so that `Gemfile.lock` will be updated with the new version
|
10
|
+
4. Commit and push directly to `master`
|
11
|
+
5. (Optional) Run `script/release` with no parameters to execute a dry run of a release
|
12
|
+
6. Run the `script/release -r` script to cut a release (this will also run `script/validate` to perform the permission check)
|
13
|
+
7. Draft a new release at <https://github.com/octokit/octopoller.rb/releases/new> containing the changelog from step 1
|
14
|
+
|
15
|
+
----
|
13
16
|
|
14
17
|
## Prerequisites
|
15
18
|
|
data/lib/octopoller/version.rb
CHANGED
data/script/package
CHANGED
@@ -4,4 +4,15 @@
|
|
4
4
|
|
5
5
|
mkdir -p pkg
|
6
6
|
gem build *.gemspec
|
7
|
-
|
7
|
+
|
8
|
+
./script/validate || rm *.gem
|
9
|
+
|
10
|
+
echo "*** Packing and moving the octopoller gem ***"
|
11
|
+
if [ -f *.gem ]; then
|
12
|
+
mv *.gem pkg
|
13
|
+
echo -e '☑ success'
|
14
|
+
else
|
15
|
+
echo -e '☒ failure'
|
16
|
+
exit 1
|
17
|
+
fi
|
18
|
+
|
data/script/release
CHANGED
@@ -5,12 +5,49 @@
|
|
5
5
|
|
6
6
|
set -e
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
usage() {
|
9
|
+
echo "Usage: $0 [-r] Tags and releases/publishes Octopoller" 1>&2; exit 1;
|
10
|
+
}
|
11
|
+
|
12
|
+
while [ $# -gt 0 ]
|
13
|
+
do
|
14
|
+
case $1 in
|
15
|
+
'-r')
|
16
|
+
r=true
|
17
|
+
;;
|
18
|
+
'-h')
|
19
|
+
usage
|
20
|
+
;;
|
21
|
+
*)
|
22
|
+
echo "No valid parameter passed in, performing a dry run...";
|
23
|
+
;;
|
24
|
+
esac
|
25
|
+
shift
|
26
|
+
done
|
27
|
+
|
28
|
+
if [ -z "${r}" ]; then
|
29
|
+
./script/package
|
30
|
+
echo "*** Dry run: octopoller was not tagged or released ***"
|
31
|
+
echo -e '☑ success'
|
32
|
+
else
|
33
|
+
|
34
|
+
# We execite the script separately to get logging and proper exit conditions
|
35
|
+
./script/package
|
36
|
+
|
37
|
+
# We need to pull the version from the actual file that is about to be published
|
38
|
+
file=$(ls pkg/*.gem| head -1)
|
39
|
+
version=$(echo $file | sed -e 's/.*octopoller-\(.*\).gem.*/\1/')
|
40
|
+
|
41
|
+
[ -n "$version" ] || exit 1
|
42
|
+
|
43
|
+
echo "*** Tagging and publishing $version of octopoller ***"
|
44
|
+
|
45
|
+
git commit --allow-empty -a -m "Release $version"
|
46
|
+
git tag "v$version"
|
47
|
+
git push origin
|
48
|
+
git push origin "v$version"
|
49
|
+
gem push pkg/*-${version}.gem
|
50
|
+
echo -e '☑ success'
|
51
|
+
fi
|
52
|
+
|
53
|
+
|
data/script/validate
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
# Usage: script/gem
|
3
|
+
# Validates the packed gem to determine if file permissions are correct.
|
4
|
+
|
5
|
+
<<'###SCRIPT_COMMENT'
|
6
|
+
Purpose:
|
7
|
+
(Given octopoller.rb is currently shipped "manually")
|
8
|
+
|
9
|
+
Because different environments behave differently, it is recommended that the integrity and file permissions of the files packed in the gem are verified.
|
10
|
+
This is to help prevent things like releasing world writeable files in the gem. The simple check below looks at each file contained in the packed gem and
|
11
|
+
verifies that the files are only owner writeable.
|
12
|
+
|
13
|
+
Requirements:
|
14
|
+
This script expects that script/package, script/release or 'gem build *.gemspec' have been run
|
15
|
+
|
16
|
+
###SCRIPT_COMMENT
|
17
|
+
|
18
|
+
|
19
|
+
FILE=$(ls *.gem| head -1)
|
20
|
+
|
21
|
+
echo "*** Validating file permissions in the octopoller gem ***"
|
22
|
+
|
23
|
+
if [ ! -f "$FILE" ]; then
|
24
|
+
echo "$FILE does not exist. Please run script/package, script/release or 'gem build *.gemspec' to generate the gem to be validated"
|
25
|
+
echo -e '☒ failure'
|
26
|
+
exit 1
|
27
|
+
fi
|
28
|
+
|
29
|
+
tar -xf "${FILE}"
|
30
|
+
|
31
|
+
# naive check to quickly see if any files in the gem are set to the wrong permissions
|
32
|
+
for f in $(tar --numeric-owner -tvf data.tar.gz )
|
33
|
+
do
|
34
|
+
if [ $f == "-rw-rw-rw-" ]; then
|
35
|
+
echo "World writeable files (-rw-rw-rw- | 666) detected in the gem. Please repack and make sure that all files in the gem are owner read write ( -rw-r--r-- | 644 )"
|
36
|
+
echo -e '☒ failure'
|
37
|
+
rm -f checksums.yaml.gz data.tar.gz metadata.gz
|
38
|
+
exit 1
|
39
|
+
fi
|
40
|
+
done
|
41
|
+
|
42
|
+
# Check clean up
|
43
|
+
echo -e '☑ success'
|
44
|
+
rm -f checksums.yaml.gz data.tar.gz metadata.gz
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopoller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BenEmdon
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,11 +81,12 @@ files:
|
|
81
81
|
- octopoller.gemspec
|
82
82
|
- script/package
|
83
83
|
- script/release
|
84
|
+
- script/validate
|
84
85
|
homepage: https://github.com/octokit/octopoller.rb
|
85
86
|
licenses:
|
86
87
|
- MIT
|
87
88
|
metadata: {}
|
88
|
-
post_install_message:
|
89
|
+
post_install_message:
|
89
90
|
rdoc_options: []
|
90
91
|
require_paths:
|
91
92
|
- lib
|
@@ -100,8 +101,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
101
|
- !ruby/object:Gem::Version
|
101
102
|
version: '0'
|
102
103
|
requirements: []
|
103
|
-
rubygems_version: 3.2
|
104
|
-
signing_key:
|
104
|
+
rubygems_version: 3.1.2
|
105
|
+
signing_key:
|
105
106
|
specification_version: 4
|
106
107
|
summary: A Ruby gem for polling and retrying actions
|
107
108
|
test_files: []
|