texd 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,189 +1,221 @@
1
1
  GIT
2
2
  remote: https://github.com/rails/rails.git
3
- revision: 3258979977e8aa80c9592ad105ae8b76ea77064c
3
+ revision: a42ca9cf1436ac7c6051dc6530d27eb4b04ab5f9
4
4
  branch: main
5
5
  specs:
6
- actioncable (7.1.0.alpha)
7
- actionpack (= 7.1.0.alpha)
8
- activesupport (= 7.1.0.alpha)
6
+ actioncable (7.2.0.alpha)
7
+ actionpack (= 7.2.0.alpha)
8
+ activesupport (= 7.2.0.alpha)
9
9
  nio4r (~> 2.0)
10
10
  websocket-driver (>= 0.6.1)
11
11
  zeitwerk (~> 2.6)
12
- actionmailbox (7.1.0.alpha)
13
- actionpack (= 7.1.0.alpha)
14
- activejob (= 7.1.0.alpha)
15
- activerecord (= 7.1.0.alpha)
16
- activestorage (= 7.1.0.alpha)
17
- activesupport (= 7.1.0.alpha)
18
- mail (>= 2.7.1)
19
- net-imap
20
- net-pop
21
- net-smtp
22
- actionmailer (7.1.0.alpha)
23
- actionpack (= 7.1.0.alpha)
24
- actionview (= 7.1.0.alpha)
25
- activejob (= 7.1.0.alpha)
26
- activesupport (= 7.1.0.alpha)
27
- mail (~> 2.5, >= 2.5.4)
28
- net-imap
29
- net-pop
30
- net-smtp
31
- rails-dom-testing (~> 2.0)
32
- actionpack (7.1.0.alpha)
33
- actionview (= 7.1.0.alpha)
34
- activesupport (= 7.1.0.alpha)
35
- rack (~> 2.0, >= 2.2.4)
12
+ actionmailbox (7.2.0.alpha)
13
+ actionpack (= 7.2.0.alpha)
14
+ activejob (= 7.2.0.alpha)
15
+ activerecord (= 7.2.0.alpha)
16
+ activestorage (= 7.2.0.alpha)
17
+ activesupport (= 7.2.0.alpha)
18
+ mail (>= 2.8.0)
19
+ actionmailer (7.2.0.alpha)
20
+ actionpack (= 7.2.0.alpha)
21
+ actionview (= 7.2.0.alpha)
22
+ activejob (= 7.2.0.alpha)
23
+ activesupport (= 7.2.0.alpha)
24
+ mail (>= 2.8.0)
25
+ rails-dom-testing (~> 2.2)
26
+ actionpack (7.2.0.alpha)
27
+ actionview (= 7.2.0.alpha)
28
+ activesupport (= 7.2.0.alpha)
29
+ nokogiri (>= 1.8.5)
30
+ racc
31
+ rack (>= 2.2.4)
32
+ rack-session (>= 1.0.1)
36
33
  rack-test (>= 0.6.3)
37
- rails-dom-testing (~> 2.0)
38
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
39
- actiontext (7.1.0.alpha)
40
- actionpack (= 7.1.0.alpha)
41
- activerecord (= 7.1.0.alpha)
42
- activestorage (= 7.1.0.alpha)
43
- activesupport (= 7.1.0.alpha)
34
+ rails-dom-testing (~> 2.2)
35
+ rails-html-sanitizer (~> 1.6)
36
+ useragent (~> 0.16)
37
+ actiontext (7.2.0.alpha)
38
+ actionpack (= 7.2.0.alpha)
39
+ activerecord (= 7.2.0.alpha)
40
+ activestorage (= 7.2.0.alpha)
41
+ activesupport (= 7.2.0.alpha)
44
42
  globalid (>= 0.6.0)
45
43
  nokogiri (>= 1.8.5)
46
- actionview (7.1.0.alpha)
47
- activesupport (= 7.1.0.alpha)
44
+ actionview (7.2.0.alpha)
45
+ activesupport (= 7.2.0.alpha)
48
46
  builder (~> 3.1)
49
47
  erubi (~> 1.11)
50
- rails-dom-testing (~> 2.0)
51
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
52
- activejob (7.1.0.alpha)
53
- activesupport (= 7.1.0.alpha)
48
+ rails-dom-testing (~> 2.2)
49
+ rails-html-sanitizer (~> 1.6)
50
+ activejob (7.2.0.alpha)
51
+ activesupport (= 7.2.0.alpha)
54
52
  globalid (>= 0.3.6)
55
- activemodel (7.1.0.alpha)
56
- activesupport (= 7.1.0.alpha)
57
- activerecord (7.1.0.alpha)
58
- activemodel (= 7.1.0.alpha)
59
- activesupport (= 7.1.0.alpha)
60
- activestorage (7.1.0.alpha)
61
- actionpack (= 7.1.0.alpha)
62
- activejob (= 7.1.0.alpha)
63
- activerecord (= 7.1.0.alpha)
64
- activesupport (= 7.1.0.alpha)
53
+ activemodel (7.2.0.alpha)
54
+ activesupport (= 7.2.0.alpha)
55
+ activerecord (7.2.0.alpha)
56
+ activemodel (= 7.2.0.alpha)
57
+ activesupport (= 7.2.0.alpha)
58
+ timeout (>= 0.4.0)
59
+ activestorage (7.2.0.alpha)
60
+ actionpack (= 7.2.0.alpha)
61
+ activejob (= 7.2.0.alpha)
62
+ activerecord (= 7.2.0.alpha)
63
+ activesupport (= 7.2.0.alpha)
65
64
  marcel (~> 1.0)
66
- mini_mime (>= 1.1.0)
67
- activesupport (7.1.0.alpha)
65
+ activesupport (7.2.0.alpha)
66
+ base64
67
+ bigdecimal
68
68
  concurrent-ruby (~> 1.0, >= 1.0.2)
69
69
  connection_pool (>= 2.2.5)
70
+ drb
70
71
  i18n (>= 1.6, < 2)
71
- minitest (>= 5.1)
72
- tzinfo (~> 2.0)
73
- rails (7.1.0.alpha)
74
- actioncable (= 7.1.0.alpha)
75
- actionmailbox (= 7.1.0.alpha)
76
- actionmailer (= 7.1.0.alpha)
77
- actionpack (= 7.1.0.alpha)
78
- actiontext (= 7.1.0.alpha)
79
- actionview (= 7.1.0.alpha)
80
- activejob (= 7.1.0.alpha)
81
- activemodel (= 7.1.0.alpha)
82
- activerecord (= 7.1.0.alpha)
83
- activestorage (= 7.1.0.alpha)
84
- activesupport (= 7.1.0.alpha)
72
+ minitest (>= 5.1, < 5.22.0)
73
+ tzinfo (~> 2.0, >= 2.0.5)
74
+ rails (7.2.0.alpha)
75
+ actioncable (= 7.2.0.alpha)
76
+ actionmailbox (= 7.2.0.alpha)
77
+ actionmailer (= 7.2.0.alpha)
78
+ actionpack (= 7.2.0.alpha)
79
+ actiontext (= 7.2.0.alpha)
80
+ actionview (= 7.2.0.alpha)
81
+ activejob (= 7.2.0.alpha)
82
+ activemodel (= 7.2.0.alpha)
83
+ activerecord (= 7.2.0.alpha)
84
+ activestorage (= 7.2.0.alpha)
85
+ activesupport (= 7.2.0.alpha)
85
86
  bundler (>= 1.15.0)
86
- railties (= 7.1.0.alpha)
87
- railties (7.1.0.alpha)
88
- actionpack (= 7.1.0.alpha)
89
- activesupport (= 7.1.0.alpha)
90
- method_source
87
+ railties (= 7.2.0.alpha)
88
+ railties (7.2.0.alpha)
89
+ actionpack (= 7.2.0.alpha)
90
+ activesupport (= 7.2.0.alpha)
91
+ irb
92
+ rackup (>= 1.0.0)
91
93
  rake (>= 12.2)
92
- thor (~> 1.0)
94
+ thor (~> 1.0, >= 1.2.2)
93
95
  zeitwerk (~> 2.6)
94
96
 
95
97
  PATH
96
98
  remote: ../..
97
99
  specs:
98
- texd (0.5.1)
100
+ texd (0.6.0)
99
101
  multipart-post (~> 2.0)
100
102
  rails (>= 6.0, < 8)
101
103
 
102
104
  GEM
103
105
  remote: https://rubygems.org/
104
106
  specs:
107
+ base64 (0.2.0)
108
+ bigdecimal (3.1.6)
105
109
  builder (3.2.4)
106
110
  byebug (11.1.3)
107
111
  coderay (1.1.3)
108
- combustion (1.3.7)
112
+ combustion (1.4.0)
109
113
  activesupport (>= 3.0.0)
110
114
  railties (>= 3.0.0)
111
115
  thor (>= 0.14.6)
112
- concurrent-ruby (1.1.10)
113
- connection_pool (2.3.0)
116
+ concurrent-ruby (1.2.3)
117
+ connection_pool (2.4.1)
114
118
  crass (1.0.6)
115
- diff-lcs (1.5.0)
116
- erubi (1.11.0)
117
- globalid (1.0.0)
118
- activesupport (>= 5.0)
119
- i18n (1.12.0)
119
+ date (3.3.4)
120
+ diff-lcs (1.5.1)
121
+ drb (2.2.0)
122
+ ruby2_keywords
123
+ erubi (1.12.0)
124
+ globalid (1.2.1)
125
+ activesupport (>= 6.1)
126
+ i18n (1.14.1)
120
127
  concurrent-ruby (~> 1.0)
121
- loofah (2.19.0)
128
+ io-console (0.7.2)
129
+ irb (1.11.2)
130
+ rdoc
131
+ reline (>= 0.4.2)
132
+ loofah (2.22.0)
122
133
  crass (~> 1.0.2)
123
- nokogiri (>= 1.5.9)
124
- mail (2.7.1)
134
+ nokogiri (>= 1.12.0)
135
+ mail (2.8.1)
125
136
  mini_mime (>= 0.1.1)
137
+ net-imap
138
+ net-pop
139
+ net-smtp
126
140
  marcel (1.0.2)
127
141
  method_source (1.0.0)
128
- mini_mime (1.1.2)
129
- minitest (5.16.3)
130
- multipart-post (2.2.3)
131
- net-imap (0.3.1)
142
+ mini_mime (1.1.5)
143
+ minitest (5.21.2)
144
+ multipart-post (2.4.0)
145
+ net-imap (0.4.10)
146
+ date
132
147
  net-protocol
133
148
  net-pop (0.1.2)
134
149
  net-protocol
135
- net-protocol (0.1.3)
150
+ net-protocol (0.2.2)
136
151
  timeout
137
- net-smtp (0.3.2)
152
+ net-smtp (0.4.0.1)
138
153
  net-protocol
139
- nio4r (2.5.8)
140
- nokogiri (1.13.8-x86_64-linux)
154
+ nio4r (2.7.0)
155
+ nokogiri (1.16.2-x86_64-linux)
141
156
  racc (~> 1.4)
142
- pry (0.14.1)
157
+ pry (0.14.2)
143
158
  coderay (~> 1.1)
144
159
  method_source (~> 1.0)
145
160
  pry-byebug (3.10.1)
146
161
  byebug (~> 11.0)
147
162
  pry (>= 0.13, < 0.15)
148
- racc (1.6.0)
149
- rack (2.2.4)
150
- rack-test (2.0.2)
163
+ psych (5.1.2)
164
+ stringio
165
+ racc (1.7.3)
166
+ rack (3.0.9)
167
+ rack-session (2.0.0)
168
+ rack (>= 3.0.0)
169
+ rack-test (2.1.0)
151
170
  rack (>= 1.3)
152
- rails-dom-testing (2.0.3)
153
- activesupport (>= 4.2.0)
171
+ rackup (2.1.0)
172
+ rack (>= 3)
173
+ webrick (~> 1.8)
174
+ rails-dom-testing (2.2.0)
175
+ activesupport (>= 5.0.0)
176
+ minitest
154
177
  nokogiri (>= 1.6)
155
- rails-html-sanitizer (1.4.3)
156
- loofah (~> 2.3)
157
- rake (13.0.6)
158
- rspec (3.11.0)
159
- rspec-core (~> 3.11.0)
160
- rspec-expectations (~> 3.11.0)
161
- rspec-mocks (~> 3.11.0)
162
- rspec-core (3.11.0)
163
- rspec-support (~> 3.11.0)
164
- rspec-expectations (3.11.1)
178
+ rails-html-sanitizer (1.6.0)
179
+ loofah (~> 2.21)
180
+ nokogiri (~> 1.14)
181
+ rake (13.1.0)
182
+ rdoc (6.6.2)
183
+ psych (>= 4.0.0)
184
+ reline (0.4.2)
185
+ io-console (~> 0.5)
186
+ rspec (3.13.0)
187
+ rspec-core (~> 3.13.0)
188
+ rspec-expectations (~> 3.13.0)
189
+ rspec-mocks (~> 3.13.0)
190
+ rspec-core (3.13.0)
191
+ rspec-support (~> 3.13.0)
192
+ rspec-expectations (3.13.0)
165
193
  diff-lcs (>= 1.2.0, < 2.0)
166
- rspec-support (~> 3.11.0)
167
- rspec-mocks (3.11.1)
194
+ rspec-support (~> 3.13.0)
195
+ rspec-mocks (3.13.0)
168
196
  diff-lcs (>= 1.2.0, < 2.0)
169
- rspec-support (~> 3.11.0)
170
- rspec-rails (5.1.2)
171
- actionpack (>= 5.2)
172
- activesupport (>= 5.2)
173
- railties (>= 5.2)
174
- rspec-core (~> 3.10)
175
- rspec-expectations (~> 3.10)
176
- rspec-mocks (~> 3.10)
177
- rspec-support (~> 3.10)
178
- rspec-support (3.11.1)
179
- thor (1.2.1)
180
- timeout (0.3.0)
181
- tzinfo (2.0.5)
197
+ rspec-support (~> 3.13.0)
198
+ rspec-rails (6.1.1)
199
+ actionpack (>= 6.1)
200
+ activesupport (>= 6.1)
201
+ railties (>= 6.1)
202
+ rspec-core (~> 3.12)
203
+ rspec-expectations (~> 3.12)
204
+ rspec-mocks (~> 3.12)
205
+ rspec-support (~> 3.12)
206
+ rspec-support (3.13.0)
207
+ ruby2_keywords (0.0.5)
208
+ stringio (3.1.0)
209
+ thor (1.3.0)
210
+ timeout (0.4.1)
211
+ tzinfo (2.0.6)
182
212
  concurrent-ruby (~> 1.0)
183
- websocket-driver (0.7.5)
213
+ useragent (0.16.10)
214
+ webrick (1.8.1)
215
+ websocket-driver (0.7.6)
184
216
  websocket-extensions (>= 0.1.0)
185
217
  websocket-extensions (0.1.5)
186
- zeitwerk (2.6.1)
218
+ zeitwerk (2.6.13)
187
219
 
188
220
  PLATFORMS
189
221
  x86_64-linux
@@ -198,4 +230,4 @@ DEPENDENCIES
198
230
  texd!
199
231
 
200
232
  BUNDLED WITH
201
- 2.3.9
233
+ 2.5.6
data/lib/texd/client.rb CHANGED
@@ -3,7 +3,6 @@
3
3
  require "net/http"
4
4
  require "net/http/post/multipart"
5
5
  require "json"
6
- require "pp"
7
6
 
8
7
  module Texd
9
8
  class Client
data/lib/texd/helpers.rb CHANGED
@@ -22,12 +22,15 @@ module Texd
22
22
  # single quotes
23
23
  [/(^|\W)'\b/, '\1\\glq{}'],
24
24
  [/\b'(\W|$)/, '\\grq{}\1'],
25
+ ].freeze
26
+
27
+ HYPHENATION_REPLACEMENTS = [
25
28
  # proper hyphenation
26
29
  [/(\w)-(\w)/, '\1"=\2'],
27
30
  ].freeze
28
31
 
29
32
  # Escapes the given text, making it safe for use in TeX documents.
30
- def escape(text, line_break = "\\\\\\", typographic: true)
33
+ def escape(text, line_break = "\\\\\\", typographic: true, hyphenation: typographic)
31
34
  return "" if text.blank?
32
35
 
33
36
  text.to_s.dup.tap do |str|
@@ -39,8 +42,13 @@ module Texd
39
42
  end
40
43
  end
41
44
 
42
- if typographic
43
- TYPOGRAPHIC_REPLACEMENTS.each do |re, replacement|
45
+ {
46
+ TYPOGRAPHIC_REPLACEMENTS => typographic,
47
+ HYPHENATION_REPLACEMENTS => hyphenation,
48
+ }.each do |replacements, active|
49
+ next unless active
50
+
51
+ replacements.each do |re, replacement|
44
52
  str.gsub!(re, replacement)
45
53
  end
46
54
  end
data/lib/texd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Texd
4
- VERSION = "0.5.1"
4
+ VERSION = "0.6.0"
5
5
  end
data/texd.gemspec CHANGED
@@ -34,9 +34,4 @@ Gem::Specification.new do |spec|
34
34
 
35
35
  spec.add_dependency "multipart-post", "~> 2.0"
36
36
  spec.add_dependency "rails", ">= 6.0", "< 8"
37
-
38
- spec.add_development_dependency "combustion"
39
- spec.add_development_dependency "rake", "~> 13.0"
40
- spec.add_development_dependency "rspec", "~> 3.0"
41
- spec.add_development_dependency "rspec-rails"
42
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: texd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Menke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-10 00:00:00.000000000 Z
11
+ date: 2024-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multipart-post
@@ -44,62 +44,6 @@ dependencies:
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '8'
47
- - !ruby/object:Gem::Dependency
48
- name: combustion
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- - !ruby/object:Gem::Dependency
62
- name: rake
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '13.0'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '13.0'
75
- - !ruby/object:Gem::Dependency
76
- name: rspec
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '3.0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '3.0'
89
- - !ruby/object:Gem::Dependency
90
- name: rspec-rails
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: '0'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
47
  description: The texd project provides a network reachable TeX compiler. This gem
104
48
  is a client for that.
105
49
  email:
@@ -123,6 +67,8 @@ files:
123
67
  - gemfiles/rails-6.1/Gemfile.lock
124
68
  - gemfiles/rails-7.0/Gemfile
125
69
  - gemfiles/rails-7.0/Gemfile.lock
70
+ - gemfiles/rails-7.1/Gemfile
71
+ - gemfiles/rails-7.1/Gemfile.lock
126
72
  - gemfiles/rails-main/Gemfile
127
73
  - gemfiles/rails-main/Gemfile.lock
128
74
  - lib/texd.rb
@@ -143,7 +89,7 @@ metadata:
143
89
  rubygems_mfa_required: 'true'
144
90
  homepage_uri: https://github.com/digineo/texd-ruby
145
91
  source_code_uri: https://github.com/digineo/texd-ruby
146
- changelog_uri: https://github.com/digineo/texd-ruby/blob/v0.5.1/CHANGELOG.md
92
+ changelog_uri: https://github.com/digineo/texd-ruby/blob/v0.6.0/CHANGELOG.md
147
93
  post_install_message:
148
94
  rdoc_options: []
149
95
  require_paths:
@@ -159,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
105
  - !ruby/object:Gem::Version
160
106
  version: '0'
161
107
  requirements: []
162
- rubygems_version: 3.1.6
108
+ rubygems_version: 3.3.14
163
109
  signing_key:
164
110
  specification_version: 4
165
111
  summary: texd is a Ruby client for the texd web service.