method-ray 0.1.2-aarch64-linux → 0.1.3-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1134c7392a80a1098d38f97eb62d1aa3e6a6f0e58ce5eb6a350baa7681b3a08a
4
- data.tar.gz: b023185b738817f087d19275552c8d7cbe85dee182b7c58073d87d991212d537
3
+ metadata.gz: 3b41b6ec06b23bd58bcd83c77c5f8e03b72981fe45818eb7ff862b5132c505a3
4
+ data.tar.gz: 5f37b7bf3e49581e20f082c47455ec55e8f439165b7209e75b3192e5e52f281d
5
5
  SHA512:
6
- metadata.gz: eac80e0ed22c77157e37cb73a2af2a36ec3d486900543c7784813a98b962fdeb22e5867886624e4258bb090362b5b4e95cce0a6071dfec07c36d04bf31d5cb82
7
- data.tar.gz: 61f6e419e9f6600f3e5b98d12d285ec15977186d256c1129d9e410e1de2f02a2a089e43e7e1b38fa031c9e84d543fb1647cf1089a197fbd677992034ffc3725a
6
+ metadata.gz: c273b10bbb1aedcc08b8c0c55d1aee17a1d6dc67a04cc32caeef967c11faeeebde756ec818ff05c553eac05c68b015a4a29d078ef8dc16c1cc1a1b167e8b6eb8
7
+ data.tar.gz: 16ec34a560f6663757c3ec7af1e85fe584c93e84a64a8a3b290c45fecf48adf7df4e574038a4c10f66f142c2f5cb4a90e2dfb25151bb3270454022521628d3f7
data/CHANGELOG.md CHANGED
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.3] - 2025-02-08
9
+
10
+ ### Added
11
+
12
+ - Method parameter type inference support ([#3](https://github.com/dak2/method-ray/pull/3))
13
+ - Block parameter type variable resolution ([#4](https://github.com/dak2/method-ray/pull/4))
14
+ - Module scope support ([#6](https://github.com/dak2/method-ray/pull/6))
15
+ - Fully qualified name support for nested classes/modules ([#7](https://github.com/dak2/method-ray/pull/7))
16
+ - Float type support ([#8](https://github.com/dak2/method-ray/pull/8))
17
+ - Regexp type support ([#9](https://github.com/dak2/method-ray/pull/9))
18
+ - Range type support ([#10](https://github.com/dak2/method-ray/pull/10))
19
+ - Generic type inference for Range, Hash, and nested Array ([#11](https://github.com/dak2/method-ray/pull/11))
20
+
21
+ ### Fixed
22
+
23
+ - Call operator location ([#12](https://github.com/dak2/method-ray/pull/12))
24
+ - Memory leak ([#13](https://github.com/dak2/method-ray/pull/13))
25
+
26
+ ### Changed
27
+
28
+ - Extract BinaryLocator class from Commands module ([#5](https://github.com/dak2/method-ray/pull/5))
29
+ - Migrate Rust integration tests to Ruby CLI and Rust unit tests ([#14](https://github.com/dak2/method-ray/pull/14))
30
+ - Remove unnecessary test files and logs ([#1](https://github.com/dak2/method-ray/pull/1), [#15](https://github.com/dak2/method-ray/pull/15))
31
+
8
32
  ## [0.1.2] - 2025-01-19
9
33
 
10
34
  ### Added
@@ -30,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
30
54
  - Initial release
31
55
  - `methodray check` - Static type checking for Ruby files
32
56
 
57
+ [0.1.3]: https://github.com/dak2/method-ray/releases/tag/v0.1.3
33
58
  [0.1.2]: https://github.com/dak2/method-ray/releases/tag/v0.1.2
34
59
  [0.1.1]: https://github.com/dak2/method-ray/releases/tag/v0.1.1
35
60
  [0.1.0]: https://github.com/dak2/method-ray/releases/tag/v0.1.0
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A fast static callable method checker for Ruby code.
4
4
 
5
+ No type annotations required, just check callable methods in your Ruby files.
6
+
5
7
  ## Requirements
6
8
 
7
9
  Method-Ray supports Ruby 3.4 or later.
@@ -14,7 +16,7 @@ gem install methodray
14
16
 
15
17
  ## Quick Start
16
18
 
17
- ### VSCode Extension
19
+ ### VSCode Extension (under development)
18
20
 
19
21
  1. Install the [Method-Ray VSCode extension](https://github.com/dak2/method-ray-vscode)
20
22
  2. Open a Ruby file in VSCode
@@ -30,6 +32,30 @@ bundle exec methodray check app/models/user.rb
30
32
  bundle exec methodray watch app/models/user.rb
31
33
  ```
32
34
 
35
+ #### Example
36
+
37
+ `methodray check <file>`: Performs static type checking on the specified Ruby file.
38
+
39
+
40
+ ```ruby
41
+ class User
42
+ def greeting
43
+ name = "Alice"
44
+ message = name.abs
45
+ message
46
+ end
47
+ end
48
+ ```
49
+
50
+ This will output:
51
+
52
+ ```
53
+ $ bundle exec methodray check app/models/user.rb
54
+ app/models/user.rb:4:19: error: undefined method `abs` for String
55
+ message = name.abs
56
+ ^
57
+ ```
58
+
33
59
  ## Contributing
34
60
 
35
61
  Bug reports and pull requests are welcome on GitHub at this repository!
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRay
4
+ class BinaryLocator
5
+ LIB_DIR = __dir__
6
+
7
+ def initialize
8
+ @binary_name = Gem.win_platform? ? 'methodray-cli.exe' : 'methodray-cli'
9
+ @legacy_binary_name = Gem.win_platform? ? 'methodray.exe' : 'methodray'
10
+ end
11
+
12
+ def find
13
+ candidates.find { |path| File.executable?(path) }
14
+ end
15
+
16
+ private
17
+
18
+ def candidates
19
+ [
20
+ # CLI binary built during gem install (lib/methodray directory)
21
+ File.expand_path(@binary_name, LIB_DIR),
22
+ # Development: target/release (project root)
23
+ File.expand_path("../../target/release/#{@binary_name}", LIB_DIR),
24
+ # Development: rust/target/release (legacy standalone binary)
25
+ File.expand_path("../../rust/target/release/#{@legacy_binary_name}", LIB_DIR)
26
+ ]
27
+ end
28
+ end
29
+ end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'binary_locator'
4
+
3
5
  module MethodRay
4
6
  module Commands
5
- COMMANDS_DIR = __dir__
6
-
7
7
  class << self
8
8
  def help
9
9
  puts <<~HELP
@@ -41,7 +41,7 @@ module MethodRay
41
41
  private
42
42
 
43
43
  def exec_rust_cli(command, args)
44
- binary_path = find_rust_binary
44
+ binary_path = BinaryLocator.new.find
45
45
 
46
46
  unless binary_path
47
47
  warn 'Error: CLI binary not found.'
@@ -56,23 +56,6 @@ module MethodRay
56
56
 
57
57
  exec(binary_path, command, *args)
58
58
  end
59
-
60
- def find_rust_binary
61
- # Platform-specific binary name
62
- cli_binary = Gem.win_platform? ? 'methodray-cli.exe' : 'methodray-cli'
63
- legacy_binary = Gem.win_platform? ? 'methodray.exe' : 'methodray'
64
-
65
- candidates = [
66
- # CLI binary built during gem install (lib/methodray directory)
67
- File.expand_path(cli_binary, COMMANDS_DIR),
68
- # Development: target/release (project root)
69
- File.expand_path("../../target/release/#{cli_binary}", COMMANDS_DIR),
70
- # Development: rust/target/release (legacy standalone binary)
71
- File.expand_path("../../rust/target/release/#{legacy_binary}", COMMANDS_DIR)
72
- ]
73
-
74
- candidates.find { |path| File.executable?(path) }
75
- end
76
59
  end
77
60
  end
78
61
  end
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MethodRay
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
data/lib/methodray.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'rbs'
4
4
  require_relative 'methodray/version'
5
- require_relative 'methodray/methodray' # ネイティブ拡張
5
+ require_relative 'methodray/methodray'
6
6
 
7
7
  module MethodRay
8
8
  class Error < StandardError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: method-ray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - dak2
@@ -37,6 +37,7 @@ files:
37
37
  - README.md
38
38
  - exe/methodray
39
39
  - lib/methodray.rb
40
+ - lib/methodray/binary_locator.rb
40
41
  - lib/methodray/cli.rb
41
42
  - lib/methodray/commands.rb
42
43
  - lib/methodray/methodray-cli