erbfmt 0.1.5-x64-mingw-ucrt
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 +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +96 -0
- data/erbfmt.gemspec +45 -0
- data/exe/erbfmt +11 -0
- data/lib/erbfmt/binary.rb +29 -0
- data/lib/erbfmt/version.rb +5 -0
- data/lib/erbfmt.rb +4 -0
- data/libexec/erbfmt-bin.exe +0 -0
- metadata +78 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 72f493fc46d5118040eda7e34a741dceea5c4c60db375ceef521dadd6c2d01ca
|
|
4
|
+
data.tar.gz: a3417a9a724428c092efb32c0c3409d52eb867014d2c78ed9620718dac84b83e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: '08ef2b255a6424e903eeb2f885116cd8da45862c4762bbbcacd3c99901f08a733f25eb799dabcec6815359e70a067b58d3a97ebd84bac1db5c93c9a697a8de6c'
|
|
7
|
+
data.tar.gz: 8d05a3860270791294f9298a8c4469fc2f1173b0c822ad3c4b0b6663575947d5f8ebb2328d3ca347fcec4014817ffe01bfdfdb25e33bf71f4313ff0b1692a30c
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 erbfmt contributors
|
|
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
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# erbfmt Ruby wrapper
|
|
2
|
+
|
|
3
|
+
This gem is a thin launcher for the platform-specific erbfmt Rust binary.
|
|
4
|
+
|
|
5
|
+
Initial releases are distributed as platform-specific `.gem` files attached to
|
|
6
|
+
the [erbfmt GitHub Release](https://github.com/hinamimi/erbfmt/releases/tag/v0.1.5).
|
|
7
|
+
Newer releases may also be published to RubyGems.org. To install a downloaded
|
|
8
|
+
release gem directly, choose the file matching the local platform. For example,
|
|
9
|
+
on glibc Linux x64:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
gem install --local ./erbfmt-0.1.5-x86_64-linux-gnu.gem
|
|
13
|
+
erbfmt --version
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Installing from a Gemfile
|
|
17
|
+
|
|
18
|
+
If the erbfmt version you want is available on RubyGems.org, use Bundler:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bundle add erbfmt --group development --require false
|
|
22
|
+
bundle exec erbfmt --version
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If the version is only available as a GitHub Release asset, download the
|
|
26
|
+
matching release asset, unpack it into `vendor/gems`, and reference the
|
|
27
|
+
unpacked path dependency:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
curl -L \
|
|
31
|
+
-o erbfmt-0.1.5-x86_64-linux-gnu.gem \
|
|
32
|
+
https://github.com/hinamimi/erbfmt/releases/download/v0.1.5/erbfmt-0.1.5-x86_64-linux-gnu.gem
|
|
33
|
+
mkdir -p vendor/gems
|
|
34
|
+
gem unpack erbfmt-0.1.5-x86_64-linux-gnu.gem --target vendor/gems
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Add the unpacked gem to the project Gemfile:
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
group :development do
|
|
41
|
+
gem "erbfmt",
|
|
42
|
+
path: "vendor/gems/erbfmt-0.1.5-x86_64-linux-gnu",
|
|
43
|
+
require: false
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then install and run it through Bundler:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bundle install
|
|
51
|
+
bundle exec erbfmt --version
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
New release gems include the gemspec needed by Bundler. If an older downloaded
|
|
55
|
+
asset does not unpack `erbfmt.gemspec`, use the fallback in the Ruby gem docs.
|
|
56
|
+
|
|
57
|
+
Commit the unpacked `vendor/gems/erbfmt-...` directory and `Gemfile.lock` when
|
|
58
|
+
the project should be installable by other team members without a separate
|
|
59
|
+
download step. You can also commit the downloaded `.gem` under `vendor/cache`
|
|
60
|
+
as the original release artifact. See
|
|
61
|
+
[RubyGem.md](../../docs/RubyGem.md#installing-from-a-gemfile) for supported
|
|
62
|
+
platforms, older gem fallback steps, and multi-platform guidance.
|
|
63
|
+
|
|
64
|
+
The wrapper packages one Rust binary and does not implement formatting or
|
|
65
|
+
linting in Ruby.
|
|
66
|
+
|
|
67
|
+
## Development
|
|
68
|
+
|
|
69
|
+
From the repository root:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
cargo build --locked
|
|
73
|
+
BUNDLE_GEMFILE=packages/ruby/Gemfile bundle install
|
|
74
|
+
BUNDLE_GEMFILE=packages/ruby/Gemfile \
|
|
75
|
+
ERBFMT_BINARY="$PWD/target/debug/erbfmt" \
|
|
76
|
+
bundle exec rake -f packages/ruby/Rakefile test verify_version
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The shared version check covers Cargo, this gem, the VSCode extension, and
|
|
80
|
+
their lockfiles. Release versions are updated from the repository root:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
ruby scripts/version.rb set 0.1.5
|
|
84
|
+
ruby scripts/version.rb verify 0.1.5
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Build, install, and execute a local platform-specific gem in isolation:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
BUNDLE_GEMFILE=packages/ruby/Gemfile \
|
|
91
|
+
ERBFMT_BINARY="$PWD/target/debug/erbfmt" \
|
|
92
|
+
bundle exec rake -f packages/ruby/Rakefile gem:verify
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
RubyGems.org publishing is an explicit release step handled from the repository
|
|
96
|
+
root. See [Release.md](../../docs/Release.md#rubygemsorg-publishing).
|
data/erbfmt.gemspec
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/erbfmt/version"
|
|
4
|
+
|
|
5
|
+
erbfmt_version = Erbfmt::VERSION
|
|
6
|
+
configured_platform = ENV["ERBFMT_GEM_PLATFORM"]
|
|
7
|
+
unpacked_platform = File.basename(__dir__).match(/\Aerbfmt-#{Regexp.escape(erbfmt_version)}-(.+)\z/)
|
|
8
|
+
erbfmt_platform = if configured_platform.nil? || configured_platform.empty?
|
|
9
|
+
unpacked_platform ? Gem::Platform.new(unpacked_platform[1]) : Gem::Platform::RUBY
|
|
10
|
+
else
|
|
11
|
+
Gem::Platform.new(configured_platform)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
Gem::Specification.new do |spec|
|
|
15
|
+
spec.name = "erbfmt"
|
|
16
|
+
spec.version = erbfmt_version
|
|
17
|
+
spec.authors = ["erbfmt contributors"]
|
|
18
|
+
spec.summary = "Ruby wrapper for the erbfmt formatter and linter"
|
|
19
|
+
spec.description = "A thin Ruby launcher for the platform-specific erbfmt Rust binary."
|
|
20
|
+
spec.homepage = "https://github.com/hinamimi/erbfmt"
|
|
21
|
+
spec.license = "MIT"
|
|
22
|
+
spec.required_ruby_version = ">= 3.1"
|
|
23
|
+
spec.metadata = {
|
|
24
|
+
"source_code_uri" => "https://github.com/hinamimi/erbfmt",
|
|
25
|
+
"bug_tracker_uri" => "https://github.com/hinamimi/erbfmt/issues",
|
|
26
|
+
"changelog_uri" => "https://github.com/hinamimi/erbfmt/releases"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
spec.bindir = "exe"
|
|
30
|
+
spec.executables = ["erbfmt"]
|
|
31
|
+
spec.require_paths = ["lib"]
|
|
32
|
+
spec.platform = erbfmt_platform
|
|
33
|
+
spec.files = [
|
|
34
|
+
"erbfmt.gemspec",
|
|
35
|
+
"LICENSE.txt",
|
|
36
|
+
"README.md",
|
|
37
|
+
"exe/erbfmt",
|
|
38
|
+
"lib/erbfmt.rb",
|
|
39
|
+
"lib/erbfmt/binary.rb",
|
|
40
|
+
"lib/erbfmt/version.rb"
|
|
41
|
+
] + Dir["libexec/erbfmt-bin*"]
|
|
42
|
+
|
|
43
|
+
spec.add_development_dependency "minitest", "~> 5.25"
|
|
44
|
+
spec.add_development_dependency "rake", "~> 13.2"
|
|
45
|
+
end
|
data/exe/erbfmt
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Erbfmt
|
|
4
|
+
class BinaryNotFound < StandardError; end
|
|
5
|
+
|
|
6
|
+
module Binary
|
|
7
|
+
module_function
|
|
8
|
+
|
|
9
|
+
def path(env = ENV)
|
|
10
|
+
override = env["ERBFMT_BINARY"]
|
|
11
|
+
return validate(File.expand_path(override), "ERBFMT_BINARY") unless override.nil? || override.empty?
|
|
12
|
+
|
|
13
|
+
validate(packaged_path, "packaged erbfmt binary")
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def packaged_path
|
|
17
|
+
name = Gem.win_platform? ? "erbfmt-bin.exe" : "erbfmt-bin"
|
|
18
|
+
File.expand_path("../../libexec/#{name}", __dir__)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def validate(candidate, source)
|
|
22
|
+
return candidate if File.file?(candidate) && File.executable?(candidate)
|
|
23
|
+
|
|
24
|
+
raise BinaryNotFound,
|
|
25
|
+
"#{source} is missing or not executable: #{candidate}"
|
|
26
|
+
end
|
|
27
|
+
private_class_method :validate
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/erbfmt.rb
ADDED
|
Binary file
|
metadata
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: erbfmt
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.5
|
|
5
|
+
platform: x64-mingw-ucrt
|
|
6
|
+
authors:
|
|
7
|
+
- erbfmt contributors
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: minitest
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '5.25'
|
|
19
|
+
type: :development
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '5.25'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: rake
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '13.2'
|
|
33
|
+
type: :development
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '13.2'
|
|
40
|
+
description: A thin Ruby launcher for the platform-specific erbfmt Rust binary.
|
|
41
|
+
executables:
|
|
42
|
+
- erbfmt
|
|
43
|
+
extensions: []
|
|
44
|
+
extra_rdoc_files: []
|
|
45
|
+
files:
|
|
46
|
+
- LICENSE.txt
|
|
47
|
+
- README.md
|
|
48
|
+
- erbfmt.gemspec
|
|
49
|
+
- exe/erbfmt
|
|
50
|
+
- lib/erbfmt.rb
|
|
51
|
+
- lib/erbfmt/binary.rb
|
|
52
|
+
- lib/erbfmt/version.rb
|
|
53
|
+
- libexec/erbfmt-bin.exe
|
|
54
|
+
homepage: https://github.com/hinamimi/erbfmt
|
|
55
|
+
licenses:
|
|
56
|
+
- MIT
|
|
57
|
+
metadata:
|
|
58
|
+
source_code_uri: https://github.com/hinamimi/erbfmt
|
|
59
|
+
bug_tracker_uri: https://github.com/hinamimi/erbfmt/issues
|
|
60
|
+
changelog_uri: https://github.com/hinamimi/erbfmt/releases
|
|
61
|
+
rdoc_options: []
|
|
62
|
+
require_paths:
|
|
63
|
+
- lib
|
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '3.1'
|
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
|
+
requirements:
|
|
71
|
+
- - ">="
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '0'
|
|
74
|
+
requirements: []
|
|
75
|
+
rubygems_version: 3.6.9
|
|
76
|
+
specification_version: 4
|
|
77
|
+
summary: Ruby wrapper for the erbfmt formatter and linter
|
|
78
|
+
test_files: []
|