Skip to content

Commit bc5ef12

Browse files
committed
Prepare for initial gem release
Add Rakefile with "bundler/gem_tasks" Add instructions for releasing to README.md Add authors and emails to gemspec
1 parent ecfefe4 commit bc5ef12

File tree

6 files changed

+54
-7
lines changed

6 files changed

+54
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Memoization of class methods
1313
- Support for instances created with `Class#allocate`
1414
- Official testing and benchmarks for Ruby 3.0
15+
- Release procedure for gem
1516

1617
## [0.2.0] - 2020-10-28
1718
### Added

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ group :docs do
2323
gem "yard", "~> 0.9"
2424
gem "yard-doctest", "~> 0.1"
2525
end
26+
27+
# Optional, only used locally to release to rubygems.org
28+
group :release, optional: true do
29+
gem "rake"
30+
end

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ GEM
3838
ast (~> 2.4.1)
3939
rack (2.2.3)
4040
rainbow (3.0.0)
41+
rake (13.0.3)
4142
redcarpet (3.5.1)
4243
regexp_parser (2.0.3)
4344
rexml (3.2.4)
@@ -99,6 +100,7 @@ DEPENDENCIES
99100
codecov
100101
memo_wise!
101102
panolint!
103+
rake
102104
redcarpet (~> 3.5)
103105
rspec (~> 3.10)
104106
values (~> 1)

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,30 @@ https://github.com/panorama-ed/memo_wise. This project is intended to be a safe,
155155
welcoming space for collaboration, and contributors are expected to adhere to
156156
the [code of conduct](https://github.com/panorama-ed/memo_wise/blob/main/CODE_OF_CONDUCT.md).
157157

158+
## Releasing
159+
160+
To make a new release of `MemoWise` to
161+
[RubyGems](https://rubygems.org/gems/memo_wise), first install the release
162+
dependencies (e.g. `rake`) as follows:
163+
164+
```shell
165+
bundle config set --local with 'release'
166+
bundle install
167+
```
168+
169+
Then carry out these steps:
170+
171+
1. Update `CHANGELOG.md`:
172+
- Add an entry for the upcoming version _x.y.z_
173+
- Move content from _Unreleased_ to the upcoming version _x.y.z_
174+
- Commit with title `Update CHANGELOG.md for x.y.z`
175+
176+
2. Update `lib/memo_wise/version.rb`
177+
- Replace with upcoming version _x.y.z_
178+
- Commit with title `Bump version to x.y.z`
179+
180+
3. `bundle exec rake release`
181+
158182
## License
159183

160184
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# frozen_string_literal: true
2+
3+
require "bundler/gem_tasks"

memo_wise.gemspec

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@
33
require_relative "lib/memo_wise/version"
44

55
Gem::Specification.new do |spec|
6-
spec.name = "memo_wise"
7-
spec.version = MemoWise::VERSION
8-
spec.authors = ["Panorama Education"]
9-
spec.email = ["[email protected]"]
6+
spec.name = "memo_wise"
7+
spec.version = MemoWise::VERSION
8+
spec.summary = "The wise choice for Ruby memoization"
9+
spec.homepage = "https://github.com/panorama-ed/memo_wise"
10+
spec.license = "MIT"
11+
12+
spec.authors = [
13+
"Panorama Education",
14+
"Jacob Evelyn",
15+
"Jemma Issroff",
16+
"Marc Siegel",
17+
]
18+
19+
spec.email = [
20+
21+
22+
23+
24+
]
1025

11-
spec.summary = "The wise choice for Ruby memoization"
12-
spec.homepage = "https://github.com/panorama-ed/memo_wise"
13-
spec.license = "MIT"
1426
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
1527

1628
# Specify which files should be added to the gem when it is released.

0 commit comments

Comments
 (0)