ruby_tree_sitter 0.20.6.4-x86_64-darwin-20 → 0.20.8.1-x86_64-darwin-20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9eb61a81274ef4aac1d80c9dfc476f8d9f8909b7ba378d1215c809af7259b5c4
4
- data.tar.gz: 14f008d70e046ea0e3e07f4f9cebd924bf52af40a40960dd1f2e7a2588973a74
3
+ metadata.gz: 2fbb8a0dcbac5573117dfea5d47deb561c097907f2a6c5df275e59edf4c32468
4
+ data.tar.gz: 537ca1a603543100c603a641a14398865da73d0ea042632a815b06fdc754e441
5
5
  SHA512:
6
- metadata.gz: b4c67bb1d8c1efceac4d93dfb178b6b74e339823de0a0606f83c1addc9a2a7742be743f20aae40f7374e8cb2ec1101176d70d84feacc0d0499d18927304b492a
7
- data.tar.gz: 8f096b60ffa6c11730da3491c792facb26c6f197e7b282fbbdf28e364e938def18dd453ab76065590ec32a686350edb054d86a1359db3f4d0120222712de17f7
6
+ metadata.gz: 4372e61dbe36a59e413a3554070e24dcba690ff9d205fe842de000145cf99a1e332f0b08c11d6b85ea0d3d33e18c14cb7a686ce85fea2f4098102f50a14849ed
7
+ data.tar.gz: f598153124307020d804e93f89307b57d3656d4df36ab6a1e4c4a8e76366473e5650fa0d110fbc8388ad5c7104d3a6fa54a0dc74c240273c1a0f33377e8d3533
data/README.md CHANGED
@@ -41,8 +41,8 @@ allows us to better experiment, and easily port ideas from other projects.
41
41
  This gem follows the `tree-sitter` versioning scheme, and appends its own
42
42
  version at the end.
43
43
 
44
- For instance, `tree-sitter` is now at version `0.20.6`, so this gem's version
45
- will be `0.20.6.x` where x is incremented with every notable batch of
44
+ For instance, `tree-sitter` is now at version `0.20.8`, so this gem's version
45
+ will be `0.20.8.x` where x is incremented with every notable batch of
46
46
  bugfixes or some ruby-only additions.
47
47
 
48
48
  ## Dependencies
@@ -100,9 +100,15 @@ static VALUE tree_changed_ranges(VALUE _self, VALUE old_tree, VALUE new_tree) {
100
100
  static VALUE tree_print_dot_graph(VALUE self, VALUE file) {
101
101
  Check_Type(file, T_STRING);
102
102
  char *path = StringValueCStr(file);
103
- FILE *fd = fopen(path, "w+");
103
+ int fd = open(path, O_CREAT | O_WRONLY | O_TRUNC,
104
+ S_IWUSR | S_IRUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
105
+ if (fd < 0) {
106
+ rb_raise(rb_eRuntimeError, "Could not open file `%s'.\nReason:\n%s", path,
107
+ strerror(fd));
108
+ return Qnil;
109
+ }
104
110
  ts_tree_print_dot_graph(SELF, fd);
105
- fclose(fd);
111
+ close(fd);
106
112
  return Qnil;
107
113
  }
108
114
 
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TreeSitter
4
- VERSION = '0.20.6.4'
4
+ VERSION = '0.20.8.1'
5
5
  end
@@ -38,7 +38,7 @@ end
38
38
 
39
39
  describe 'print_dot_graph' do
40
40
  it 'must save to disk' do
41
- dot = File.expand_path('tmp/tree-dot.gv', FileUtils.getwd)
41
+ dot = File.expand_path('/tmp/tree-dot.gv', FileUtils.getwd)
42
42
  tree.print_dot_graph(dot)
43
43
 
44
44
  assert File.exist?(dot), 'dot file must be exist'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_tree_sitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.6.4
4
+ version: 0.20.8.1
5
5
  platform: x86_64-darwin-20
6
6
  authors:
7
7
  - Firas al-Khalil