rake-appraisal 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 05fc436c89b10a44d5b2dfa77fba70bd1f93f514f9d57703b9fb56d3290a3377
4
+ data.tar.gz: 208fe7546464d7f127f3949d149e41d521aaac2c293587cbe3b65e0e718042f3
5
+ SHA512:
6
+ metadata.gz: f512cacdca3447de3c27a9af8b23bd031b8e800f161a86c3af4db74f66c9e8de7266da23f9d6ca2b950bc872841073d42724cef7d4531a5f51b089f675cd878a
7
+ data.tar.gz: ebaa9446d0201f33402eb89208a2e6ae112c88d93fb2b06c73588fddd98ed093670a9f945f8057a2780c93438bc13c9f6a047afcde59f89876045eece4e3dc11
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2026-10-21
4
+
5
+ - Initial release
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Matijs van Zuijlen
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # Rake::Appraisal
2
+
3
+ Rake task check your appraisals are up-to-date
4
+
5
+ ## Installation
6
+
7
+ Add this gem to your gem's development dependencies by adding this line to your
8
+ gem's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'rake-appraisal'
12
+ ```
13
+
14
+ Then execute:
15
+
16
+ ```sh
17
+ $ bundle install
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ After installation, add something like the following to your `Rakefile`:
23
+
24
+ ```ruby
25
+ require "rake/manifest"
26
+
27
+ # Set up appraisal check task
28
+ Rake::Appraisal::Task.new
29
+ ```
30
+
31
+ This will create the task `appraisal:check`. You can also pass a different
32
+ namespace as an argument to `.new`:
33
+
34
+ ```ruby
35
+ Rake::Appraisal::Task.new(:my_namespace)
36
+ ```
37
+
38
+ This will create the task `my_namespace:check`.
39
+
40
+ ## Development
41
+
42
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
43
+ `rake spec` to run the tests. You can also run `bin/console` for an interactive
44
+ prompt that will allow you to experiment.
45
+
46
+ To install this gem onto your local machine, run `bundle exec rake install`. To
47
+ release a new version, update the version number in `version.rb`, and then run
48
+ `bundle exec rake release`, which will create a git tag for the version, push
49
+ git commits and the created tag, and push the `.gem` file to
50
+ [rubygems.org](https://rubygems.org).
51
+
52
+ ## Contributing
53
+
54
+ Bug reports and pull requests are welcome
55
+ [on GitHub](https://github.com/mvz/rake-appraisal).
56
+
57
+ ## License
58
+
59
+ The gem is available as open source under the terms of the
60
+ [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rake/tasklib"
4
+
5
+ module Rake
6
+ module Appraisal
7
+ # Tasks to create and check manifest file
8
+ class Task < Rake::TaskLib
9
+ attr_accessor :name
10
+
11
+ def initialize(name = :appraisal)
12
+ super()
13
+
14
+ self.name = name
15
+
16
+ yield self if block_given?
17
+
18
+ namespace name do
19
+ define_task
20
+ end
21
+ end
22
+
23
+ private
24
+
25
+ def define_task
26
+ desc "Check appraisals"
27
+ task :check do
28
+ Appraisal::AppraisalFile.each do |appraisal|
29
+ existing = File.read(appraisal.gemfile_path)
30
+ expected = expected_content_for(appraisal)
31
+ unless existing.chomp == expected.chomp
32
+ raise "Outdated appraisal: #{appraisal.name}"
33
+ end
34
+ end
35
+ end
36
+ end
37
+
38
+ def expected_content_for(appraisal)
39
+ signature = Appraisal::Customize.heading || "This file was generated by Appraisal"
40
+ header = appraisal.send :comment_lines, signature
41
+ body = appraisal.send :quoted_gemfile
42
+ [header, body].join("\n\n")
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rake
4
+ module Appraisal
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "appraisal/task"
4
+ require_relative "appraisal/version"
5
+
6
+ module Rake
7
+ module Appraisal
8
+ class Error < StandardError; end
9
+ # Your code goes here...
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rake-appraisal
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Matijs van Zuijlen
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: appraisal
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '2.3'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '2.3'
26
+ description: |
27
+ When you update your Gemfile, your appraisals need to be regenerated.
28
+ This simple task makes sure you do not forget to do so.
29
+ email:
30
+ - matijs@matijs.net
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - CHANGELOG.md
36
+ - LICENSE.txt
37
+ - README.md
38
+ - lib/rake/appraisal.rb
39
+ - lib/rake/appraisal/task.rb
40
+ - lib/rake/appraisal/version.rb
41
+ homepage: https://github.com/mvz/rake-appraisal
42
+ licenses:
43
+ - MIT
44
+ metadata:
45
+ homepage_uri: https://github.com/mvz/rake-appraisal
46
+ source_code_uri: https://github.com/mvz/rake-appraisal
47
+ changelog_uri: https://github.com/mvz/rake-appraisal/blob/master/CHANGELOG.md
48
+ rubygems_mfa_required: 'true'
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 3.2.0
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubygems_version: 4.0.22
64
+ specification_version: 4
65
+ summary: Check that your appraisals are up-to-date
66
+ test_files: []