koshigoe_gem_playground 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/action/publish_gem/Dockerfile +14 -0
- data/.github/action/publish_gem/entrypoint.sh +12 -0
- data/.github/action/write_github_release/Dockerfile +14 -0
- data/.github/action/write_github_release/entrypoint.sh +43 -0
- data/.github/main.workflow +14 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.rubocop.yml +23 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +3 -0
- data/Rakefile +8 -0
- data/bin/console +12 -0
- data/bin/setup +8 -0
- data/koshigoe_gem_playground.gemspec +32 -0
- data/lib/koshigoe_gem_playground/version.rb +5 -0
- data/lib/koshigoe_gem_playground.rb +8 -0
- metadata +131 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 014f4bb7c2b231b24637232b72a36949c829b17afbbbc45f92d354cedfe7928f
|
4
|
+
data.tar.gz: 8c7af98ad0a77e5e3777e6ecf8ade14e8f87b946c8f690b35c4c2b7c0c1120ea
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 38adeeade2c5d7a7e4d5784c420a1b8efcc7e1f1a5c6cae95b9e1a24fcbd66e33eca9cecf9eb4255b1957de318f57ed43eb97913c20f6c406bc4b670fa05f429
|
7
|
+
data.tar.gz: c58c43346f3a153c3e64d15d1be07cb34d258f342981f5dff69746b3dd819a609fcd20174c52491c0e554ceef848fdbac52010838e2b2700ac774cf12381c459
|
@@ -0,0 +1,14 @@
|
|
1
|
+
FROM ruby:alpine
|
2
|
+
LABEL "com.github.actions.name"="Publish Gem"
|
3
|
+
LABEL "com.github.actions.description"="Publish gem to rubygems.org"
|
4
|
+
LABEL "com.github.actions.icon"="edit"
|
5
|
+
LABEL "com.github.actions.color"="blue"
|
6
|
+
LABEL "repository"="https://github.com/koshigoe/koshigoe_gem_playground"
|
7
|
+
LABEL "homepage"="https://github.com/koshigoe/koshigoe_gem_playground"
|
8
|
+
LABEL "maintainer"="koshigoe <koshigoeb@gmail.com>"
|
9
|
+
|
10
|
+
RUN apk update -q \
|
11
|
+
&& apk add -q --no-cache curl jq git
|
12
|
+
|
13
|
+
ADD entrypoint.sh /entrypoint.sh
|
14
|
+
ENTRYPOINT ["/entrypoint.sh"]
|
@@ -0,0 +1,14 @@
|
|
1
|
+
FROM alpine:3.8
|
2
|
+
LABEL "com.github.actions.name"="Write GitHub Release"
|
3
|
+
LABEL "com.github.actions.description"="Write merged PRs into latest GitHub Release"
|
4
|
+
LABEL "com.github.actions.icon"="edit"
|
5
|
+
LABEL "com.github.actions.color"="blue"
|
6
|
+
LABEL "repository"="https://github.com/koshigoe/koshigoe_gem_playground"
|
7
|
+
LABEL "homepage"="https://github.com/koshigoe/koshigoe_gem_playground"
|
8
|
+
LABEL "maintainer"="koshigoe <koshigoeb@gmail.com>"
|
9
|
+
|
10
|
+
RUN apk update -q \
|
11
|
+
&& apk add -q --no-cache curl jq
|
12
|
+
|
13
|
+
ADD entrypoint.sh /entrypoint.sh
|
14
|
+
ENTRYPOINT ["/entrypoint.sh"]
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/bin/ash -eu
|
2
|
+
|
3
|
+
# Get previous GitHub Release.
|
4
|
+
curl --fail -s \
|
5
|
+
-u $GITHUB_ACTOR:$GITHUB_TOKEN \
|
6
|
+
https://api.github.com/repos/$GITHUB_REPOSITORY/releases \
|
7
|
+
| jq -r '.[1]' \
|
8
|
+
> previous_release.json
|
9
|
+
previous_published_date=$(jq -r '.published_at' previous_release.json)
|
10
|
+
|
11
|
+
# Get latest published date.
|
12
|
+
latest_published_date=$(jq -r '.release.published_at' $GITHUB_EVENT_PATH)
|
13
|
+
|
14
|
+
# Get latest GitHub Release ID.
|
15
|
+
latest_release_id=$(jq -r '.release.id' $GITHUB_EVENT_PATH)
|
16
|
+
|
17
|
+
# Get merged PRs
|
18
|
+
merged_pr_list=$(
|
19
|
+
curl --fail -s \
|
20
|
+
-u $GITHUB_ACTOR:$GITHUB_TOKEN \
|
21
|
+
"https://api.github.com/search/issues?q=repo:${GITHUB_REPOSITORY}+is:pr+base:master+merged:${previous_published_date}..${latest_published_date}" \
|
22
|
+
| jq -r '.items[] | ["- #" + (.number | tostring) + " " + .title] | @tsv' \
|
23
|
+
| sort -k 3)
|
24
|
+
|
25
|
+
# Get comparable tags
|
26
|
+
previous_tag_name=$(jq -r '.tag_name' previous_release.json)
|
27
|
+
latest_tag_name=$(jq -r '.release.tag_name' $GITHUB_EVENT_PATH)
|
28
|
+
|
29
|
+
# Make release note.
|
30
|
+
release_note=$(cat <<EOF | sed ':a;N;$!ba;s/\n/\\n/g')
|
31
|
+
https://github.com/$GITHUB_REPOSITORY/compare/${previous_tag_name}...${latest_tag_name}
|
32
|
+
|
33
|
+
### Merged
|
34
|
+
|
35
|
+
$merged_pr_list
|
36
|
+
EOF
|
37
|
+
|
38
|
+
# Update body of latest GitHub Release.
|
39
|
+
curl --fail -s \
|
40
|
+
-u $GITHUB_ACTOR:$GITHUB_TOKEN \
|
41
|
+
-X PATCH \
|
42
|
+
-d "{\"body\":\"${release_note}\"}" \
|
43
|
+
https://api.github.com/repos/$GITHUB_REPOSITORY/releases/$latest_release_id
|
@@ -0,0 +1,14 @@
|
|
1
|
+
workflow "Release" {
|
2
|
+
on = "release"
|
3
|
+
resolves = ["Write GitHub Release"]
|
4
|
+
}
|
5
|
+
|
6
|
+
action "Write GitHub Release" {
|
7
|
+
uses = "./.github/action/write_github_release"
|
8
|
+
secrets = ["GITHUB_TOKEN"]
|
9
|
+
}
|
10
|
+
|
11
|
+
action "Publish Gem" {
|
12
|
+
uses = "./.github/action/publish_gem"
|
13
|
+
secrets = ["GITHUB_TOKEN", "RUBYGEMS_TOKEN"]
|
14
|
+
}
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.6
|
3
|
+
|
4
|
+
Style/FormatStringToken:
|
5
|
+
EnforcedStyle: template
|
6
|
+
|
7
|
+
Style/TrailingCommaInHashLiteral:
|
8
|
+
EnforcedStyleForMultiline: consistent_comma
|
9
|
+
|
10
|
+
Style/TrailingCommaInArrayLiteral:
|
11
|
+
EnforcedStyleForMultiline: consistent_comma
|
12
|
+
|
13
|
+
Metrics/LineLength:
|
14
|
+
Max: 124
|
15
|
+
AllowURI: true
|
16
|
+
URISchemes:
|
17
|
+
- http
|
18
|
+
- https
|
19
|
+
IgnoredPatterns: ['\A(?:\s)*?#']
|
20
|
+
|
21
|
+
Metrics/BlockLength:
|
22
|
+
Exclude:
|
23
|
+
- 'spec/**/*'
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2016 Masataka Suzuki
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'koshigoe_gem_playground'
|
7
|
+
|
8
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
9
|
+
# with your gem easier. You can also use a different console, if you like.
|
10
|
+
|
11
|
+
require 'pry'
|
12
|
+
Pry.start
|
data/bin/setup
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'koshigoe_gem_playground/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'koshigoe_gem_playground'
|
9
|
+
spec.version = KoshigoeGemPlayground::VERSION
|
10
|
+
spec.license = 'MIT'
|
11
|
+
spec.authors = ['koshigoe']
|
12
|
+
spec.email = ['koshigoeb@gmail.com']
|
13
|
+
|
14
|
+
spec.summary = 'The playground for me.'
|
15
|
+
spec.description = 'The playground for me.'
|
16
|
+
spec.homepage = 'https://github.com/koshigoe/koshigoe_gem_playground'
|
17
|
+
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
+
spec.files = Dir.chdir(File.expand_path('.', __dir__)) do
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
end
|
23
|
+
spec.bindir = 'exe'
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ['lib']
|
26
|
+
|
27
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
28
|
+
spec.add_development_dependency 'pry', '~> 0.12.2'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 0.66'
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: koshigoe_gem_playground
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- koshigoe
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.17'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.17'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.12.2
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.12.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.66'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.66'
|
83
|
+
description: The playground for me.
|
84
|
+
email:
|
85
|
+
- koshigoeb@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".github/action/publish_gem/Dockerfile"
|
91
|
+
- ".github/action/publish_gem/entrypoint.sh"
|
92
|
+
- ".github/action/write_github_release/Dockerfile"
|
93
|
+
- ".github/action/write_github_release/entrypoint.sh"
|
94
|
+
- ".github/main.workflow"
|
95
|
+
- ".gitignore"
|
96
|
+
- ".rspec"
|
97
|
+
- ".rubocop.yml"
|
98
|
+
- Gemfile
|
99
|
+
- LICENSE.txt
|
100
|
+
- README.md
|
101
|
+
- Rakefile
|
102
|
+
- bin/console
|
103
|
+
- bin/setup
|
104
|
+
- koshigoe_gem_playground.gemspec
|
105
|
+
- lib/koshigoe_gem_playground.rb
|
106
|
+
- lib/koshigoe_gem_playground/version.rb
|
107
|
+
homepage: https://github.com/koshigoe/koshigoe_gem_playground
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 2.7.7
|
128
|
+
signing_key:
|
129
|
+
specification_version: 4
|
130
|
+
summary: The playground for me.
|
131
|
+
test_files: []
|