yerba 0.4.1 → 0.4.2

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: 9f0b8b264602f7f31483cff42e8c1c17266e6caa3f5fd8d2c737e6bec285b034
4
- data.tar.gz: a0b706d50c311af27a7f0b58f64323dbb9dd38849ff31d372184b5ec4e417793
3
+ metadata.gz: 00b4035922cae463166de2d7479ea0fff23fa7f6975d4a450446a17404108bbe
4
+ data.tar.gz: b1ea6dd0cc94bf3db590a98b6b995cd71f2c271e1cc286fbd8bb38d430987af6
5
5
  SHA512:
6
- metadata.gz: a246cdd95c9d1b41b3e79c49501b61edef83e390d6915e43a9350d26b2012d98f319770e993f15e73e6903a7c611745f681220d9eb7569a0cb478442fd2941f4
7
- data.tar.gz: 93aef7a57eae55c8b66f3271e54a7eb6021afa7cb54005ea74accab405ad584a96d998886c1eae4af7ee56442be99c0c75583715c811b5298f89f9102a83561f
6
+ metadata.gz: d2c6bb4655e7a200b824fc6751401bd5243c16e771c684e9c2ad0ce270666fee8bc4dad1c55457783811274830801bffec04802d2c51207fd907f2e28f8e3e80
7
+ data.tar.gz: 993641b96a53b84313ff0897fab50f6912199866b4b31a0a929ff741fdccfc0b1c1ee3b457367988546e6483b8efdcdd41c0fa1ff41090cede263a18b2e32d22
data/lib/yerba/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yerba
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
5
5
  end
data/lib/yerba.rb CHANGED
@@ -35,9 +35,9 @@ module Yerba
35
35
  NATIVE_PLATFORMS = {
36
36
  "arm64-darwin" => "arm64-darwin",
37
37
  "x86_64-darwin" => "x86_64-darwin",
38
- "aarch64-linux" => "aarch64-linux",
39
- "arm64-linux" => "aarch64-linux",
40
- "x86_64-linux" => "x86_64-linux",
38
+ "aarch64-linux" => "aarch64-linux-gnu",
39
+ "arm64-linux" => "aarch64-linux-gnu",
40
+ "x86_64-linux" => "x86_64-linux-gnu",
41
41
  }.freeze
42
42
 
43
43
  def self.executable(exe_path: nil)
@@ -104,14 +104,18 @@ module Yerba
104
104
 
105
105
  FileUtils.mkdir_p(exe_directory)
106
106
 
107
- unless system("cd #{rust_dir} && cargo build --release")
107
+ root_dir = File.expand_path(File.join("..", ".."), __dir__)
108
+ workspace_target = File.join(root_dir, "target", "release", EXECUTABLE_NAME)
109
+ crate_target = File.join(rust_dir, "target", "release", EXECUTABLE_NAME)
110
+
111
+ unless system("cd #{root_dir} && cargo build --release")
108
112
  raise CompilationError, "Failed to compile yerba from source. Is Rust installed?"
109
113
  end
110
114
 
111
- source_binary = File.join(rust_dir, "target", "release", EXECUTABLE_NAME)
115
+ source_binary = [workspace_target, crate_target].find { |p| File.exist?(p) }
112
116
 
113
- unless File.exist?(source_binary)
114
- raise CompilationError, "Compilation succeeded but binary not found at #{source_binary}"
117
+ unless source_binary
118
+ raise CompilationError, "Compilation succeeded but binary not found at #{workspace_target} or #{crate_target}"
115
119
  end
116
120
 
117
121
  FileUtils.cp(source_binary, exe_file)
data/rust/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "yerba"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  edition = "2021"
5
5
  authors = ["Marco Roth <marco.roth@intergga.ch>"]
6
6
  description = "YAML Editing and Refactoring with Better Accuracy"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yerba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Roth