rfmt 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: 8db0c10b7d9b832a25b270fc05bed3e98b278d6eeaf5871f5f96d3a816823804
4
+ data.tar.gz: cacef161fa9254e285c0df5980adef53a400d4cfb46e1b65d95ca563e34d5853
5
+ SHA512:
6
+ metadata.gz: 8874561432bedcc7d7473e37fe0417086fde901398e22dca4c574184d0cff4e9140ef616c3fbd57ea9cbf376ec5da187878d213e668932c384410a137e53c8e3
7
+ data.tar.gz: a5600d4ef6690add20848cd3076dca3d37a9155935c93d86de6c14139836a74e7ffd64824d09e31a64e11e95e1cefeee9a5bee4e01edf77a9b112633179cb7d6
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-09-08
4
+
5
+ - Initial release
data/Cargo.lock ADDED
@@ -0,0 +1,354 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "aho-corasick"
7
+ version = "1.1.3"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
10
+ dependencies = [
11
+ "memchr",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "bindgen"
16
+ version = "0.69.5"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
19
+ dependencies = [
20
+ "bitflags",
21
+ "cexpr",
22
+ "clang-sys",
23
+ "itertools",
24
+ "lazy_static",
25
+ "lazycell",
26
+ "proc-macro2",
27
+ "quote",
28
+ "regex",
29
+ "rustc-hash",
30
+ "shlex",
31
+ "syn",
32
+ ]
33
+
34
+ [[package]]
35
+ name = "bitflags"
36
+ version = "2.9.4"
37
+ source = "registry+https://github.com/rust-lang/crates.io-index"
38
+ checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
39
+
40
+ [[package]]
41
+ name = "cexpr"
42
+ version = "0.6.0"
43
+ source = "registry+https://github.com/rust-lang/crates.io-index"
44
+ checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
45
+ dependencies = [
46
+ "nom",
47
+ ]
48
+
49
+ [[package]]
50
+ name = "cfg-if"
51
+ version = "1.0.3"
52
+ source = "registry+https://github.com/rust-lang/crates.io-index"
53
+ checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
54
+
55
+ [[package]]
56
+ name = "clang-sys"
57
+ version = "1.8.1"
58
+ source = "registry+https://github.com/rust-lang/crates.io-index"
59
+ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
60
+ dependencies = [
61
+ "glob",
62
+ "libc",
63
+ "libloading",
64
+ ]
65
+
66
+ [[package]]
67
+ name = "either"
68
+ version = "1.15.0"
69
+ source = "registry+https://github.com/rust-lang/crates.io-index"
70
+ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
71
+
72
+ [[package]]
73
+ name = "glob"
74
+ version = "0.3.3"
75
+ source = "registry+https://github.com/rust-lang/crates.io-index"
76
+ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
77
+
78
+ [[package]]
79
+ name = "itertools"
80
+ version = "0.12.1"
81
+ source = "registry+https://github.com/rust-lang/crates.io-index"
82
+ checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
83
+ dependencies = [
84
+ "either",
85
+ ]
86
+
87
+ [[package]]
88
+ name = "lazy_static"
89
+ version = "1.5.0"
90
+ source = "registry+https://github.com/rust-lang/crates.io-index"
91
+ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
92
+
93
+ [[package]]
94
+ name = "lazycell"
95
+ version = "1.3.0"
96
+ source = "registry+https://github.com/rust-lang/crates.io-index"
97
+ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
98
+
99
+ [[package]]
100
+ name = "libc"
101
+ version = "0.2.175"
102
+ source = "registry+https://github.com/rust-lang/crates.io-index"
103
+ checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
104
+
105
+ [[package]]
106
+ name = "libloading"
107
+ version = "0.8.8"
108
+ source = "registry+https://github.com/rust-lang/crates.io-index"
109
+ checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
110
+ dependencies = [
111
+ "cfg-if",
112
+ "windows-targets",
113
+ ]
114
+
115
+ [[package]]
116
+ name = "magnus"
117
+ version = "0.6.4"
118
+ source = "registry+https://github.com/rust-lang/crates.io-index"
119
+ checksum = "b1597ef40aa8c36be098249e82c9a20cf7199278ac1c1a1a995eeead6a184479"
120
+ dependencies = [
121
+ "magnus-macros",
122
+ "rb-sys",
123
+ "rb-sys-env",
124
+ "seq-macro",
125
+ ]
126
+
127
+ [[package]]
128
+ name = "magnus-macros"
129
+ version = "0.6.0"
130
+ source = "registry+https://github.com/rust-lang/crates.io-index"
131
+ checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3"
132
+ dependencies = [
133
+ "proc-macro2",
134
+ "quote",
135
+ "syn",
136
+ ]
137
+
138
+ [[package]]
139
+ name = "memchr"
140
+ version = "2.7.5"
141
+ source = "registry+https://github.com/rust-lang/crates.io-index"
142
+ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
143
+
144
+ [[package]]
145
+ name = "minimal-lexical"
146
+ version = "0.2.1"
147
+ source = "registry+https://github.com/rust-lang/crates.io-index"
148
+ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
149
+
150
+ [[package]]
151
+ name = "nom"
152
+ version = "7.1.3"
153
+ source = "registry+https://github.com/rust-lang/crates.io-index"
154
+ checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
155
+ dependencies = [
156
+ "memchr",
157
+ "minimal-lexical",
158
+ ]
159
+
160
+ [[package]]
161
+ name = "proc-macro2"
162
+ version = "1.0.101"
163
+ source = "registry+https://github.com/rust-lang/crates.io-index"
164
+ checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
165
+ dependencies = [
166
+ "unicode-ident",
167
+ ]
168
+
169
+ [[package]]
170
+ name = "quote"
171
+ version = "1.0.40"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
174
+ dependencies = [
175
+ "proc-macro2",
176
+ ]
177
+
178
+ [[package]]
179
+ name = "rb-sys"
180
+ version = "0.9.117"
181
+ source = "registry+https://github.com/rust-lang/crates.io-index"
182
+ checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44"
183
+ dependencies = [
184
+ "rb-sys-build",
185
+ ]
186
+
187
+ [[package]]
188
+ name = "rb-sys-build"
189
+ version = "0.9.117"
190
+ source = "registry+https://github.com/rust-lang/crates.io-index"
191
+ checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59"
192
+ dependencies = [
193
+ "bindgen",
194
+ "lazy_static",
195
+ "proc-macro2",
196
+ "quote",
197
+ "regex",
198
+ "shell-words",
199
+ "syn",
200
+ ]
201
+
202
+ [[package]]
203
+ name = "rb-sys-env"
204
+ version = "0.1.2"
205
+ source = "registry+https://github.com/rust-lang/crates.io-index"
206
+ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
207
+
208
+ [[package]]
209
+ name = "regex"
210
+ version = "1.11.2"
211
+ source = "registry+https://github.com/rust-lang/crates.io-index"
212
+ checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
213
+ dependencies = [
214
+ "aho-corasick",
215
+ "memchr",
216
+ "regex-automata",
217
+ "regex-syntax",
218
+ ]
219
+
220
+ [[package]]
221
+ name = "regex-automata"
222
+ version = "0.4.10"
223
+ source = "registry+https://github.com/rust-lang/crates.io-index"
224
+ checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
225
+ dependencies = [
226
+ "aho-corasick",
227
+ "memchr",
228
+ "regex-syntax",
229
+ ]
230
+
231
+ [[package]]
232
+ name = "regex-syntax"
233
+ version = "0.8.6"
234
+ source = "registry+https://github.com/rust-lang/crates.io-index"
235
+ checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
236
+
237
+ [[package]]
238
+ name = "rfmt"
239
+ version = "0.1.0"
240
+ dependencies = [
241
+ "magnus",
242
+ ]
243
+
244
+ [[package]]
245
+ name = "rustc-hash"
246
+ version = "1.1.0"
247
+ source = "registry+https://github.com/rust-lang/crates.io-index"
248
+ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
249
+
250
+ [[package]]
251
+ name = "seq-macro"
252
+ version = "0.3.6"
253
+ source = "registry+https://github.com/rust-lang/crates.io-index"
254
+ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
255
+
256
+ [[package]]
257
+ name = "shell-words"
258
+ version = "1.1.0"
259
+ source = "registry+https://github.com/rust-lang/crates.io-index"
260
+ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
261
+
262
+ [[package]]
263
+ name = "shlex"
264
+ version = "1.3.0"
265
+ source = "registry+https://github.com/rust-lang/crates.io-index"
266
+ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
267
+
268
+ [[package]]
269
+ name = "syn"
270
+ version = "2.0.106"
271
+ source = "registry+https://github.com/rust-lang/crates.io-index"
272
+ checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
273
+ dependencies = [
274
+ "proc-macro2",
275
+ "quote",
276
+ "unicode-ident",
277
+ ]
278
+
279
+ [[package]]
280
+ name = "unicode-ident"
281
+ version = "1.0.18"
282
+ source = "registry+https://github.com/rust-lang/crates.io-index"
283
+ checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
284
+
285
+ [[package]]
286
+ name = "windows-link"
287
+ version = "0.1.3"
288
+ source = "registry+https://github.com/rust-lang/crates.io-index"
289
+ checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
290
+
291
+ [[package]]
292
+ name = "windows-targets"
293
+ version = "0.53.3"
294
+ source = "registry+https://github.com/rust-lang/crates.io-index"
295
+ checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
296
+ dependencies = [
297
+ "windows-link",
298
+ "windows_aarch64_gnullvm",
299
+ "windows_aarch64_msvc",
300
+ "windows_i686_gnu",
301
+ "windows_i686_gnullvm",
302
+ "windows_i686_msvc",
303
+ "windows_x86_64_gnu",
304
+ "windows_x86_64_gnullvm",
305
+ "windows_x86_64_msvc",
306
+ ]
307
+
308
+ [[package]]
309
+ name = "windows_aarch64_gnullvm"
310
+ version = "0.53.0"
311
+ source = "registry+https://github.com/rust-lang/crates.io-index"
312
+ checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
313
+
314
+ [[package]]
315
+ name = "windows_aarch64_msvc"
316
+ version = "0.53.0"
317
+ source = "registry+https://github.com/rust-lang/crates.io-index"
318
+ checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
319
+
320
+ [[package]]
321
+ name = "windows_i686_gnu"
322
+ version = "0.53.0"
323
+ source = "registry+https://github.com/rust-lang/crates.io-index"
324
+ checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
325
+
326
+ [[package]]
327
+ name = "windows_i686_gnullvm"
328
+ version = "0.53.0"
329
+ source = "registry+https://github.com/rust-lang/crates.io-index"
330
+ checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
331
+
332
+ [[package]]
333
+ name = "windows_i686_msvc"
334
+ version = "0.53.0"
335
+ source = "registry+https://github.com/rust-lang/crates.io-index"
336
+ checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
337
+
338
+ [[package]]
339
+ name = "windows_x86_64_gnu"
340
+ version = "0.53.0"
341
+ source = "registry+https://github.com/rust-lang/crates.io-index"
342
+ checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
343
+
344
+ [[package]]
345
+ name = "windows_x86_64_gnullvm"
346
+ version = "0.53.0"
347
+ source = "registry+https://github.com/rust-lang/crates.io-index"
348
+ checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
349
+
350
+ [[package]]
351
+ name = "windows_x86_64_msvc"
352
+ version = "0.53.0"
353
+ source = "registry+https://github.com/rust-lang/crates.io-index"
354
+ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
data/Cargo.toml ADDED
@@ -0,0 +1,7 @@
1
+ # This Cargo.toml is here to let externals tools (IDEs, etc.) know that this is
2
+ # a Rust project. Your extensions dependencies should be added to the Cargo.toml
3
+ # in the ext/ directory.
4
+
5
+ [workspace]
6
+ members = ["./ext/rfmt"]
7
+ resolver = "2"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 fujitani sora
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,55 @@
1
+ # rfmt
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rfmt`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ ### Gemfile
10
+ ```ruby
11
+ gem 'rfmt'
12
+ ```
13
+
14
+ ### gem install
15
+ ```bash
16
+ gem install rfmt
17
+ ```
18
+
19
+ ## Development Build
20
+ ```bash
21
+ bundle exec rake clobber
22
+ bundle exec rake compile
23
+
24
+ # gem build
25
+ gem build r_format.gemspec
26
+
27
+ # local install
28
+ gem install ./r_format-0.0.1.gem
29
+ ```
30
+ ## release
31
+ ```bash
32
+ bundle exec rake release
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ TODO: Write usage instructions here
38
+
39
+ ## Development
40
+
41
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
42
+
43
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
+
45
+ ## Contributing
46
+
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rfmt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/rfmt/blob/main/CODE_OF_CONDUCT.md).
48
+
49
+ ## License
50
+
51
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
52
+
53
+ ## Code of Conduct
54
+
55
+ Everyone interacting in the rfmt project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rfmt/blob/main/CODE_OF_CONDUCT.md).
@@ -0,0 +1,14 @@
1
+ [package]
2
+ name = "rfmt"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ authors = ["fujitani sora <fujitanisora0414@gmail.com>"]
6
+ license = "MIT"
7
+ publish = false
8
+
9
+ [lib]
10
+ name = "rfmt"
11
+ crate-type = ["cdylib"]
12
+
13
+ [dependencies]
14
+ magnus = { version = "0.6.2" }
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "mkmf"
4
+ require "rb_sys/mkmf"
5
+
6
+ # Set the cargo build target to match the system architecture
7
+ if RUBY_PLATFORM =~ /arm64-darwin/
8
+ ENV["CARGO_BUILD_TARGET"] = "aarch64-apple-darwin"
9
+ elsif RUBY_PLATFORM =~ /x86_64-darwin/
10
+ ENV["CARGO_BUILD_TARGET"] = "x86_64-apple-darwin"
11
+ end
12
+
13
+ create_rust_makefile("rfmt/rfmt")
@@ -0,0 +1,48 @@
1
+ use magnus::{define_module, function, prelude::*, Error, Ruby};
2
+
3
+ fn format_ruby_code(source: String) -> String {
4
+ // indent with 2 spaces
5
+ let lines: Vec<&str> = source.lines().collect();
6
+ let mut result = Vec::new();
7
+ let mut indent_level: i32 = 0;
8
+
9
+ for line in lines {
10
+ let trimmed = line.trim();
11
+
12
+ if trimmed == "end" || trimmed.starts_with("end ")
13
+ || trimmed == "}" || trimmed == "]" {
14
+ indent_level = indent_level.saturating_sub(1);
15
+ }
16
+
17
+ // eval indent
18
+ if !trimmed.is_empty() {
19
+ result.push(format!("{}{}", " ".repeat(indent_level as usize), trimmed));
20
+ } else {
21
+ result.push(String::new());
22
+ }
23
+
24
+ // add indent lebel
25
+ if trimmed.starts_with("def ") || trimmed.starts_with("class ")
26
+ || trimmed.starts_with("module ") || trimmed.starts_with("if ")
27
+ || trimmed.starts_with("unless ") || trimmed.starts_with("while ")
28
+ || trimmed.starts_with("for ") || trimmed.starts_with("do ")
29
+ || trimmed == "do" || trimmed.ends_with(" do")
30
+ || trimmed == "{" || trimmed == "[" {
31
+ indent_level += 1;
32
+ }
33
+ }
34
+
35
+ result.join("\n")
36
+ }
37
+
38
+ fn rust_version() -> String {
39
+ "0.1.0 (Rust)".to_string()
40
+ }
41
+
42
+ #[magnus::init]
43
+ fn init(_ruby: &Ruby) -> Result<(), Error> {
44
+ let module = define_module("Rfmt")?;
45
+ module.define_singleton_method("format_code", function!(format_ruby_code, 1))?;
46
+ module.define_singleton_method("rust_version", function!(rust_version, 0))?;
47
+ Ok(())
48
+ }
Binary file
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rfmt
4
+ VERSION = "0.1.0"
5
+ end
data/lib/rfmt.rb ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rfmt/version"
4
+ require_relative "rfmt/rfmt"
5
+
6
+ module Rfmt
7
+ class Error < StandardError; end
8
+ def self.format(source)
9
+ format_code(source)
10
+ end
11
+
12
+ def self.format_file(path)
13
+ source = File.read(path)
14
+ formatted = format(source)
15
+ formatted
16
+ end
17
+
18
+ def self.version_info
19
+ "Ruby: #{VERSION}, Rust: #{rust_version}"
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rfmt
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - fujitani sora
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: rb_sys
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: 0.9.91
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: 0.9.91
26
+ description: Write a longer description or delete this line.
27
+ email:
28
+ - fujitanisora0414@gmail.com
29
+ executables: []
30
+ extensions:
31
+ - ext/rfmt/extconf.rb
32
+ extra_rdoc_files: []
33
+ files:
34
+ - CHANGELOG.md
35
+ - Cargo.lock
36
+ - Cargo.toml
37
+ - LICENSE.txt
38
+ - README.md
39
+ - ext/rfmt/Cargo.toml
40
+ - ext/rfmt/extconf.rb
41
+ - ext/rfmt/src/lib.rs
42
+ - lib/rfmt.rb
43
+ - lib/rfmt/rfmt.bundle
44
+ - lib/rfmt/version.rb
45
+ homepage: https://github.com/fs0414/rfmt
46
+ licenses:
47
+ - MIT
48
+ metadata:
49
+ allowed_push_host: https://rubygems.org
50
+ homepage_uri: https://github.com/fs0414/rfmt
51
+ source_code_uri: https://github.com/fs0414/rfmt
52
+ changelog_uri: https://github.com/fs0414/rfmt/releases
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 3.2.0
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 3.3.11
66
+ requirements: []
67
+ rubygems_version: 3.7.1
68
+ specification_version: 4
69
+ summary: Ruby Formatter impl Rust lang.
70
+ test_files: []