lowkey 0.7.4 → 0.7.5

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lowkey.rb +3 -1
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68c11d0bf42929bb136e505d079922296c220680cce1412729ca336d968413d4
4
- data.tar.gz: 23a78b8a98d7ad37d2a5ec7e202ddf6707c6527b83f2a98e851b60e99376bb6a
3
+ metadata.gz: 4f4720b7f316e420b6ae339471c745699a329588893d1bcbd427b01c684edd99
4
+ data.tar.gz: f07a9c88cac3a3c0c5ba868fd0314c583e5ac62661a9d1dc4e27b0ff14e0e856
5
5
  SHA512:
6
- metadata.gz: db2f55d46929f94e7feb221a250092184706f824cbcb87dfbfac96c2b9206d3719126e6468ba5d9e43dff4250c6d3ab075e379619b14faff10c0f5aaa8c0ae97
7
- data.tar.gz: d0b993346e45f61ed66c008c6a3a2dfa400166e3993d7cc2b0ab124c9932153fb2a3d0d9fc982d4aaf07e9fbe4fcfe50f591542f67e225e226040acc69f12f2a
6
+ metadata.gz: 47acdeff0183ee3bf789e21bb72503850228a92423f38b8c030b8f7c52b939d79696b0b20f4e7081f56fb485ec49fb410c97cbc2212334ab17957842e5a3668e
7
+ data.tar.gz: d2edae3e7156581a7a36eda2de777429357aebb3346208cd468814b8cf306fe6c73171be61506be06ecd2e3e58dbf166e3ac85ab7dae868ddde1916f229ac2df
data/lib/lowkey.rb CHANGED
@@ -49,8 +49,10 @@ module Lowkey
49
49
 
50
50
  # Parses a file, and parses it again with the methods Prism couldn't parse masked, like an RBX file's templates, as
51
51
  # Prism's guesses at where they end can run on through the rest of the file. Returns the file's own lines too.
52
+ # The file is read as UTF-8, as Ruby reads source files, rather than in the locale's encoding, which is US-ASCII on
53
+ # build servers without a UTF-8 locale.
52
54
  def parse(file_path)
53
- source = File.read(file_path)
55
+ source = File.read(file_path, encoding: Encoding::UTF_8)
54
56
  result = Prism.parse(source, filepath: file_path)
55
57
  unless result.errors.empty?
56
58
  masked = MaskedSource.new(source:, error_lines: result.errors.map { it.location.start_line }).to_s
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lowkey
4
- VERSION = '0.7.4'
4
+ VERSION = '0.7.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lowkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedi