rsyntaxtree 0.7.6 → 0.7.7

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: e462e9c9f54ec8ff3c9b909e3c8178f631b49cb6fc9c28634a3ebf9e988d7e82
4
- data.tar.gz: 8c5058606220ed95d08c6307f32fe5caf5f00390ac195e150c13358527636aad
3
+ metadata.gz: b2b0490e0b866d5e82213a7e131af2eb12f4561b5d2132298324e2309303ad65
4
+ data.tar.gz: aa27a23a4c922af2c2d3f701ca6cc571fab074eecc3cd327c2296fd79b1d42ff
5
5
  SHA512:
6
- metadata.gz: da9005c4b25d98de2690cb8db7d72d69dff7fbf858ae1fc4410419cf2518d4a75f80a8ad1ce0c216fce8c62c652197b477fb3da32962a0bc7e878a12f927759d
7
- data.tar.gz: 2b17215556abcbfef3f270d6f07fdfb10ba7ec8b4b6959c6252ba083f56690b69f1c8612cc9a9fc5c7a5db7d5dfd5e03e592f20e7688fa8bbaa0c1795b99d803
6
+ metadata.gz: c2885be41a0cda5efb42ee408f2ec24fc6da741a9460c50a4bb3376a7f70463748960de0be1c7a5f7822592d04c4b79b50f4e90ebe4b1c0964e2d4acffd28be8
7
+ data.tar.gz: b861f941a2082d9c02119bb404e96dd121b739315df0188d31382adccf6810f85b57289c3675fcb1e07bc287387720a33df8892c1e02a13f6f524f76e0b41d97
data/bin/rsyntaxtree CHANGED
@@ -7,7 +7,7 @@ require 'rsyntaxtree'
7
7
  require 'optimist'
8
8
 
9
9
  opts = Optimist::options do
10
- version "RSyntaxTree #{RSyntaxTree::VERSION} (c) 2018 Yoichiro Hasebe"
10
+ version "RSyntaxTree #{RSyntaxTree::VERSION} (c) 2021 Yoichiro Hasebe"
11
11
  banner <<-EOS
12
12
  RSyntaxTree, (linguistic) syntax tree generator written in Ruby.
13
13
 
data/lib/rsyntaxtree.rb CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  $LOAD_PATH << File.join( File.dirname(__FILE__), 'rsyntaxtree')
17
17
 
18
- require 'uri'
18
+ require 'cgi'
19
19
  require 'utils'
20
20
  require 'element'
21
21
  require 'elementlist'
@@ -39,7 +39,7 @@ class RSGenerator
39
39
  key = keystr.to_sym
40
40
  case key
41
41
  when :data
42
- data = URI.unescape(value)
42
+ data = CGI.unescape(value)
43
43
  data = data.gsub('-AMP-', '&')
44
44
  .gsub('-PERCENT-', "%")
45
45
  .gsub('-PRIME-', "'")
@@ -10,7 +10,7 @@
10
10
  # This file is part of RSyntaxTree, which is a ruby port of Andre Eisenbach's
11
11
  # excellent program phpSyntaxTree.
12
12
  #
13
- # Copyright (c) 2007-2018 Yoichiro Hasebe <yohasebe@gmail.com>
13
+ # Copyright (c) 2007-2021 Yoichiro Hasebe <yohasebe@gmail.com>
14
14
  # Copyright (c) 2003-2004 Andre Eisenbach <andre@ironcreek.net>
15
15
 
16
16
  class Element
@@ -10,7 +10,7 @@
10
10
  # This file is part of RSyntaxTree, which is a ruby port of Andre Eisenbach's
11
11
  # excellent program phpSyntaxTree.
12
12
  #
13
- # Copyright (c) 2007-2018 Yoichiro Hasebe <yohasebe@gmail.com>
13
+ # Copyright (c) 2007-2021 Yoichiro Hasebe <yohasebe@gmail.com>
14
14
  # Copyright (c) 2003-2004 Andre Eisenbach <andre@ironcreek.net>
15
15
 
16
16
  require 'element'
@@ -10,7 +10,7 @@
10
10
  # This file is part of RSyntaxTree, which is a ruby port of Andre Eisenbach's
11
11
  # excellent program phpSyntaxTree.
12
12
  #
13
- # Copyright (c) 2007-2018 Yoichiro Hasebe <yohasebe@gmail.com>
13
+ # Copyright (c) 2007-2021 Yoichiro Hasebe <yohasebe@gmail.com>
14
14
  # Copyright (c) 2003-2004 Andre Eisenbach <andre@ironcreek.net>
15
15
 
16
16
  class ErrorMessage
@@ -10,7 +10,7 @@
10
10
  # This file is part of RSyntaxTree, which is a ruby port of Andre Eisenbach's
11
11
  # excellent program phpSyntaxTree.
12
12
  #
13
- # Copyright (c) 2007-2018 Yoichiro Hasebe <yohasebe@gmail.com>
13
+ # Copyright (c) 2007-2021 Yoichiro Hasebe <yohasebe@gmail.com>
14
14
  # Copyright (c) 2003-2004 Andre Eisenbach <andre@ironcreek.net>
15
15
 
16
16
  require 'rmagick'
@@ -11,7 +11,7 @@
11
11
  # This file is part of RSyntaxTree, which is a ruby port of Andre Eisenbach's
12
12
  # excellent program phpSyntaxTree.
13
13
  #
14
- # Copyright (c) 2007-2018 Yoichiro Hasebe <yohasebe@gmail.com>
14
+ # Copyright (c) 2007-2021 Yoichiro Hasebe <yohasebe@gmail.com>
15
15
  # Copyright (c) 2003-2004 Andre Eisenbach <andre@ironcreek.net>
16
16
 
17
17
  require 'elementlist'
@@ -10,7 +10,7 @@
10
10
  # This file is part of RSyntaxTree, which is a ruby port of Andre Eisenbach's
11
11
  # excellent program phpSyntaxTree.
12
12
  #
13
- # Copyright (c) 2007-2018 Yoichiro Hasebe <yohasebe@gmail.com>
13
+ # Copyright (c) 2007-2021 Yoichiro Hasebe <yohasebe@gmail.com>
14
14
  # Copyright (c) 2003-2004 Andre Eisenbach <andre@ironcreek.net>
15
15
 
16
16
  require "tempfile"
@@ -10,7 +10,7 @@
10
10
  # This file is part of RSyntaxTree, which is a ruby port of Andre Eisenbach's
11
11
  # excellent program phpSyntaxTree.
12
12
  #
13
- # Copyright (c) 2007-2018 Yoichiro Hasebe <yohasebe@gmail.com>
13
+ # Copyright (c) 2007-2021 Yoichiro Hasebe <yohasebe@gmail.com>
14
14
  # Copyright (c) 2003-2004 Andre Eisenbach <andre@ironcreek.net>
15
15
 
16
16
  require 'graph'
@@ -66,24 +66,24 @@ class TreeGraph < Graph
66
66
  self.format = fileformat
67
67
  self.interlace = PlaneInterlace
68
68
  end
69
- end
69
+ end
70
70
 
71
71
  :private
72
72
 
73
73
  # Add the element into the tree (draw it)
74
74
  def draw_element(x, y, w, string, type)
75
- string = string.sub(/\^\z/){""}
75
+ string = string.sub(/\^\z/){""}
76
76
  # Calculate element dimensions and position
77
77
  if (type == ETYPE_LEAF) and @leafstyle == "nothing"
78
78
  top = row2px(y - 1) + (@font_size * 1.5)
79
- else
79
+ else
80
80
  top = row2px(y)
81
81
  end
82
82
  left = x + @m[:b_side]
83
83
  bottom = top + @e_height
84
84
  right = left + w
85
85
 
86
- # Split the string into the main part and the
86
+ # Split the string into the main part and the
87
87
  # subscript part of the element (if any)
88
88
  parts = string.split("_", 2)
89
89
  if(parts.length > 1 )
@@ -126,7 +126,7 @@ class TreeGraph < Graph
126
126
  main_font = @font
127
127
  end
128
128
 
129
- # Calculate text size for the main and the
129
+ # Calculate text size for the main and the
130
130
  # subscript part of the element
131
131
  # symbols for underline/overline removed temporarily
132
132
 
@@ -182,7 +182,7 @@ class TreeGraph < Graph
182
182
  if(type == ETYPE_LEAF)
183
183
  col = @col_leaf
184
184
  else
185
- col = @col_node
185
+ col = @col_node
186
186
  end
187
187
 
188
188
  if(main[0].chr == "<" && main[-1].chr == ">")
@@ -252,7 +252,7 @@ class TreeGraph < Graph
252
252
 
253
253
  @gc.fill("none")
254
254
  @gc.stroke @col_line
255
- @gc.stroke_width 1
255
+ @gc.stroke_width 1
256
256
  @gc.line(fromLeft1, fromTop, toLeft, toBot)
257
257
  @gc.line(fromLeft2, fromTop, toLeft, toBot)
258
258
  @gc.line(fromLeft1, fromTop, fromLeft2, fromTop)
@@ -267,9 +267,9 @@ class TreeGraph < Graph
267
267
  children = @e_list.get_children(id)
268
268
  @e_list.set_element_width(id, target)
269
269
 
270
- if(children.length > 0 )
270
+ if(children.length > 0 )
271
271
  delta = target - current
272
- target_delta = delta / children.length
272
+ target_delta = delta / children.length
273
273
 
274
274
  children.each do |child|
275
275
  child_width = @e_list.get_element_width(child)
@@ -10,7 +10,7 @@
10
10
  # This file is part of RSyntaxTree, which is a ruby port of Andre Eisenbach's
11
11
  # excellent program phpSyntaxTree.
12
12
  #
13
- # Copyright (c) 2007-2018 Yoichiro Hasebe <yohasebe@gmail.com>
13
+ # Copyright (c) 2007-2021 Yoichiro Hasebe <yohasebe@gmail.com>
14
14
  # Copyright (c) 2003-2004 Andre Eisenbach <andre@ironcreek.net>
15
15
 
16
16
  class String
@@ -1,4 +1,4 @@
1
1
  module RSyntaxTree
2
- VERSION = "0.7.6"
2
+ VERSION = "0.7.7"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsyntaxtree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoichiro Hasebe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-13 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick
@@ -77,7 +77,7 @@ homepage: http://github.com/yohasebe/rsyntaxtree
77
77
  licenses:
78
78
  - MIT
79
79
  metadata: {}
80
- post_install_message:
80
+ post_install_message:
81
81
  rdoc_options: []
82
82
  require_paths:
83
83
  - lib
@@ -92,8 +92,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.0.1
96
- signing_key:
95
+ rubygems_version: 3.2.3
96
+ signing_key:
97
97
  specification_version: 4
98
98
  summary: RSyntaxTree is a graphical syntax tree generator written in Ruby
99
99
  test_files: []