Skip to content

Commit

Permalink
📦️ Ship rake tasks in gem package
Browse files Browse the repository at this point in the history
  • Loading branch information
pboling committed May 22, 2023
1 parent 694e505 commit 719ee95
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Removed

## [2.0.4] 2023-05-22
### Fixed
- install_tasks and Railtie loading of rake tasks

## [2.0.3] 2023-05-21
### Fixed
- Ship rake tasks in gem package
Expand All @@ -21,6 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [2.0.1] 2023-05-18
### Fixed
- Fix rake_tasks hook on Railtie
### Changed
- tasks.rake => tasks.rb

## [2.0.0] 2023-05-17 [YANKED]
### Added
Expand Down Expand Up @@ -79,7 +85,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[Unreleased]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v2.0.3...HEAD
[Unreleased]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v2.0.4...HEAD
[2.0.4]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v2.0.3...v2.0.4
[2.0.3]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v2.0.2...v2.0.3
[2.0.2]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v2.0.0...v2.0.1
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GIT
PATH
remote: .
specs:
rubocop-ruby1_9 (2.0.3)
rubocop-ruby1_9 (2.0.4)
rubocop-gradual (~> 0.3)
rubocop-md (~> 1.2)
rubocop-rake (~> 0.6)
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ begin
YARD::Rake::YardocTask.new do |t|
t.files = [
# Splats (alphabetical)
"lib/**/*.rake",
"lib/**/*.rb",
"sig/**/*.rbs",
# Files (alphabetical)
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/ruby1_9.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module Rubocop
# Namespace of this library
module Ruby19
module_function def install_tasks
load "rubocop/ruby1_9/tasks.rake"
load "rubocop/ruby1_9/tasks.rb"
end
end
end
Expand Down
3 changes: 1 addition & 2 deletions lib/rubocop/ruby1_9/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ class Railtie < Rails::Railtie

if Rails.env.test? || Rails.env.development?
rake_tasks do
path = File.expand_path(__dir__)
Dir.glob("#{path}/rakelib/**/*.rake").each { |f| load f }
Rubocop::Ruby19.install_tasks
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Load from a "rakelib" directory is automatic!
# Adding our custom directory of tasks as a rakelib directory makes them available.
rakelib = "lib/rubocop/ruby1_9/rakelib"
abs_path = File.expand_path(__dir__)
rakelib = "#{abs_path}/rakelib"
Rake.add_rakelib(rakelib)
2 changes: 1 addition & 1 deletion lib/rubocop/ruby1_9/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Rubocop
module Ruby19
module Version
VERSION = "2.0.3"
VERSION = "2.0.4"
end
end
end

0 comments on commit 719ee95

Please sign in to comment.