prawn-rtl-support 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +5 -3
- data/README.md +6 -4
- data/lib/prawn/rtl/support/version.rb +1 -1
- data/prawn-rtl-support.gemspec +10 -8
- metadata +43 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d3134e42bb0267a904d698f9142d437de7be7faf41e136151feffce46fdf459a
|
4
|
+
data.tar.gz: ba9d1e7ff7820f6fd800a4c7adce38de8cf98013b3ff06d0663350de03f793c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f6d9f0c5f7ee15ead2ed0592cfab0acb593da5c1c4c8a9d0cd5997951ae57c0fd130ee736c5f65568d812a61bdc90c4cad76b007ee864f6928588f6ac63fed6
|
7
|
+
data.tar.gz: 79c66b1f09affed1a76f32f690bbb2ac9fefae656fb5475663b82b655d6933c1f8d91fbd4346e78547e3fc26f046a6e27795155e688c427abbd84909d1710fbf
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
# Prawn::Rtl::Support
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](https://travis-ci.org/cropio/prawn-rtl-support.svg?branch=master)](https://travis-ci.org/cropio/prawn-rtl-support)
|
4
|
+
|
5
|
+
This gem provide bidirectional text support for Prawn. It uses Unicode Bidirectional Algorithm for displaying text from [TwitterCldr::Shared::Bidi](https://github.com/twitter/twitter-cldr-rb) and connect arabic letters using [Arabic Letter Connector](https://github.com/staii/arabic-letter-connector). Prawn patching is minimal, we patch only [`Prawn::Text::Formatted::Box#original_text`](https://github.com/prawnpdf/prawn/blob/master/lib/prawn/text/formatted/box.rb#L367).
|
4
6
|
|
5
7
|
## Motivation
|
6
8
|
|
7
9
|
Ruby and Rails internally provide unicode string normalization and store normalized letters inside. But Prawn don't connect arabic glyphs back and don't suport mixet LTR and RTL string. This gem add this suport.
|
8
10
|
|
9
11
|
## Acknowledgment
|
10
|
-
This gem use same code as [Arabic Letter Connector](https://github.com/staii/arabic-letter-connector) by [@staii](https://github.com/staii) and therefore based on [Arabic-Prawn](https://rubygems.org/gems/Arabic-Prawn/versions/0.0.1) by Dynamix Solutions (Ahmed Nasser)
|
12
|
+
This gem use same code as [Arabic Letter Connector](https://github.com/staii/arabic-letter-connector) by [@staii](https://github.com/staii) and therefore based on [Arabic-Prawn](https://rubygems.org/gems/Arabic-Prawn/versions/0.0.1) by Dynamix Solutions (Ahmed Nasser).
|
11
13
|
|
12
14
|
## Installation
|
13
15
|
|
@@ -25,8 +27,8 @@ Or install it yourself as:
|
|
25
27
|
|
26
28
|
## Usage
|
27
29
|
|
28
|
-
`prawn-rtl-support` provide method `Prawn::Rtl::Connector#fix_rtl(string)` which reverse string and connect arabic letters.
|
29
|
-
Prawn patching is minimal, we patch only [Prawn::Text::Formatted::Box#original_text]
|
30
|
+
`prawn-rtl-support` provide method [`Prawn::Rtl::Connector#fix_rtl(string)`](https://github.com/cropio/prawn-rtl-support/blob/master/lib/prawn/rtl/connector.rb#L13) which reverse string and connect arabic letters.
|
31
|
+
Prawn patching is minimal, we patch only [`Prawn::Text::Formatted::Box#original_text`](https://github.com/prawnpdf/prawn/blob/master/lib/prawn/text/formatted/box.rb#L367).
|
30
32
|
|
31
33
|
## Development
|
32
34
|
|
data/prawn-rtl-support.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["ozeron@me.com"]
|
11
11
|
|
12
12
|
spec.summary = 'Gem which patch prawn to provide support of arabic language.'
|
13
|
-
spec.description = 'Add suport for arabic language in prawn.
|
13
|
+
spec.description = 'Add suport for arabic language in prawn.'
|
14
14
|
spec.homepage = "https://github.com/cropio/prawn-rtl-support"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
@@ -21,11 +21,13 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
27
|
-
spec.add_development_dependency
|
28
|
-
spec.add_development_dependency
|
29
|
-
spec.
|
30
|
-
|
24
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
26
|
+
spec.add_development_dependency 'pry', '~> 0.12'
|
27
|
+
spec.add_development_dependency 'rubocop', '~> 0.77'
|
28
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.5'
|
29
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.37'
|
30
|
+
|
31
|
+
spec.add_dependency 'prawn', '~> 2.2'
|
32
|
+
spec.add_dependency 'twitter_cldr', '>= 4.0', '< 6.0'
|
31
33
|
end
|
metadata
CHANGED
@@ -1,85 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-rtl-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleksandr Lapchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '13.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '13.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.9'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3.9'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0.12'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0.12'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.77'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.77'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubocop
|
70
|
+
name: rubocop-performance
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '1.5'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '1.5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.37'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.37'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: prawn
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,17 +112,23 @@ dependencies:
|
|
98
112
|
name: twitter_cldr
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- - "
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '4.0'
|
118
|
+
- - "<"
|
102
119
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
120
|
+
version: '6.0'
|
104
121
|
type: :runtime
|
105
122
|
prerelease: false
|
106
123
|
version_requirements: !ruby/object:Gem::Requirement
|
107
124
|
requirements:
|
108
|
-
- - "
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '4.0'
|
128
|
+
- - "<"
|
109
129
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
111
|
-
description:
|
130
|
+
version: '6.0'
|
131
|
+
description: Add suport for arabic language in prawn.
|
112
132
|
email:
|
113
133
|
- ozeron@me.com
|
114
134
|
executables: []
|
@@ -149,8 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
169
|
- !ruby/object:Gem::Version
|
150
170
|
version: '0'
|
151
171
|
requirements: []
|
152
|
-
|
153
|
-
rubygems_version: 2.5.1
|
172
|
+
rubygems_version: 3.0.2
|
154
173
|
signing_key:
|
155
174
|
specification_version: 4
|
156
175
|
summary: Gem which patch prawn to provide support of arabic language.
|