prawn-rtl-support 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/prawn/rtl/connector.rb +33 -0
- data/lib/prawn/rtl/connector/logic.rb +154 -0
- data/lib/prawn/rtl/support.rb +54 -0
- data/lib/prawn/rtl/support/version.rb +7 -0
- data/prawn-rtl-support.gemspec +31 -0
- metadata +157 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cc72aa1fc22ffa115e32a459fc9ba9f597bf428d
|
4
|
+
data.tar.gz: f0baf2c4b7fc29ae6987559112d7cc237069422c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f524c73c79d0740fb18b5544f914d0f8159348bfa783f3c741446b5f2b84facddce5df9a5a3c101751c5ef5df970e24c7251d134f9f35b1b3983726406f2ce0b
|
7
|
+
data.tar.gz: cdcb26939d6f9a1548f3089b204848270ff15cdef1f5a5bc251588da8ebb4efe47f95f2fe2c0db585066f561e0b508a86565b551055603a54efa03830f215a4c
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at ozeron@me.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Oleksandr Lapchenko
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Prawn::Rtl::Support
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/prawn/rtl/support`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'prawn-rtl-support'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install prawn-rtl-support
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/prawn-rtl-support. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "prawn/rtl/support"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "pry"
|
14
|
+
Pry.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'prawn/rtl/connector/logic'
|
4
|
+
require 'twitter_cldr'
|
5
|
+
|
6
|
+
module Prawn
|
7
|
+
module Rtl
|
8
|
+
module Connector
|
9
|
+
def self.connect(string)
|
10
|
+
Prawn::Rtl::Connector::Logic.transform(string)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.fix_rtl(string)
|
14
|
+
return string unless include_rtl?(string)
|
15
|
+
reorder(connect(string))
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.reorder(string)
|
19
|
+
TwitterCldr::Shared::Bidi
|
20
|
+
.from_string(string, direction: :RTL)
|
21
|
+
.reorder_visually!
|
22
|
+
.to_s
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.include_rtl?(string)
|
26
|
+
TwitterCldr::Shared::Bidi
|
27
|
+
.from_string(string)
|
28
|
+
.types
|
29
|
+
.include?(:R)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,154 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Prawn
|
4
|
+
module Rtl
|
5
|
+
module Connector
|
6
|
+
module Logic
|
7
|
+
|
8
|
+
@@charinfos = nil
|
9
|
+
|
10
|
+
class CharacterInfo
|
11
|
+
attr_accessor :common, :formatted
|
12
|
+
|
13
|
+
def initialize(common, isolated, final, initial, medial, connects, diacritic)
|
14
|
+
@common = common
|
15
|
+
@formatted = {
|
16
|
+
isolated: isolated,
|
17
|
+
final: final,
|
18
|
+
initial: initial,
|
19
|
+
medial: medial,
|
20
|
+
}
|
21
|
+
@connects = connects
|
22
|
+
@diacritic = diacritic
|
23
|
+
end
|
24
|
+
|
25
|
+
def connects?
|
26
|
+
@connects
|
27
|
+
end
|
28
|
+
|
29
|
+
def diacritic?
|
30
|
+
@diacritic
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
# Determine the form of the current character (:isolated, :initial, :medial,
|
36
|
+
# or :final), given the previous character and the next one. In Arabic, all
|
37
|
+
# characters can connect with a previous character, but not all letters can
|
38
|
+
# connect with the next character (this is determined by
|
39
|
+
# CharacterInfo#connects?).
|
40
|
+
def self.determine_form(previous_previous_char, previous_char, next_char, next_next_char)
|
41
|
+
charinfos = self.charinfos
|
42
|
+
next_char = next_next_char if charinfos[next_char] && charinfos[next_char].diacritic?
|
43
|
+
previous_char = previous_previous_char if charinfos[previous_char] && charinfos[previous_char].diacritic?
|
44
|
+
if charinfos[previous_char] && charinfos[next_char]
|
45
|
+
charinfos[previous_char].connects? ? :medial : :initial # If the current character does not connect,
|
46
|
+
# its medial form will map to its final form,
|
47
|
+
# and its initial form will map to its isolated form.
|
48
|
+
elsif charinfos[previous_char] # The next character is not an arabic character.
|
49
|
+
charinfos[previous_char].connects? ? :final : :isolated
|
50
|
+
elsif charinfos[next_char] # The previous character is not an arabic character.
|
51
|
+
:initial # If the current character does not connect, its initial form will map to its isolated form.
|
52
|
+
else # Neither of the surrounding characters are arabic characters.
|
53
|
+
:isolated
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.transform(str)
|
58
|
+
res = ''
|
59
|
+
charinfos = self.charinfos
|
60
|
+
previous_previous_char = nil
|
61
|
+
previous_char = nil
|
62
|
+
current_char = nil
|
63
|
+
next_char = nil
|
64
|
+
next_next_char = nil
|
65
|
+
consume_character = lambda do |char|
|
66
|
+
previous_previous_char = previous_char
|
67
|
+
previous_char = current_char
|
68
|
+
current_char = next_char
|
69
|
+
next_char = next_next_char
|
70
|
+
next_next_char = char
|
71
|
+
return unless current_char
|
72
|
+
if charinfos.keys.include?(current_char)
|
73
|
+
form = determine_form(previous_previous_char, previous_char, next_char, next_next_char)
|
74
|
+
res += charinfos[current_char].formatted[form]
|
75
|
+
else
|
76
|
+
res += current_char
|
77
|
+
end
|
78
|
+
end
|
79
|
+
str.each_char { |char| consume_character.call(char) }
|
80
|
+
2.times { consume_character.call(nil) }
|
81
|
+
return res
|
82
|
+
end
|
83
|
+
|
84
|
+
private
|
85
|
+
|
86
|
+
def self.charinfos
|
87
|
+
return @@charinfos unless @@charinfos.nil?
|
88
|
+
@@charinfos = {}
|
89
|
+
add('0627', 'fe8d', 'fe8e', 'fe8d', 'fe8e', false) # Alef
|
90
|
+
add('0628', 'fe8f', 'fe90', 'fe91', 'fe92', true) # Ba2
|
91
|
+
add('062a', 'fe95', 'fe96', 'fe97', 'fe98', true) # Ta2
|
92
|
+
add('062b', 'fe99', 'fe9a', 'fe9b', 'fe9c', true) # Tha2
|
93
|
+
add('062c', 'fe9d', 'fe9e', 'fe9f', 'fea0', true) # Jeem
|
94
|
+
add('062d', 'fea1', 'fea2', 'fea3', 'fea4', true) # 7a2
|
95
|
+
add('062e', 'fea5', 'fea6', 'fea7', 'fea8', true) # 7'a2
|
96
|
+
add('062f', 'fea9', 'feaa', 'fea9', 'feaa', false) # Dal
|
97
|
+
add('0630', 'feab', 'feac', 'feab', 'feac', false) # Thal
|
98
|
+
add('0631', 'fead', 'feae', 'fead', 'feae', false) # Ra2
|
99
|
+
add('0632', 'feaf', 'feb0', 'feaf', 'feb0', false) # Zain
|
100
|
+
add('0633', 'feb1', 'feb2', 'feb3', 'feb4', true) # Seen
|
101
|
+
add('0634', 'feb5', 'feb6', 'feb7', 'feb8', true) # Sheen
|
102
|
+
add('0635', 'feb9', 'feba', 'febb', 'febc', true) # 9ad
|
103
|
+
add('0636', 'febd', 'febe', 'febf', 'fec0', true) # 9'ad
|
104
|
+
add('0637', 'fec1', 'fec2', 'fec3', 'fec4', true) # 6a2
|
105
|
+
add('0638', 'fec5', 'fec6', 'fec7', 'fec8', true) # 6'a2
|
106
|
+
add('0639', 'fec9', 'feca', 'fecb', 'fecc', true) # 3ain
|
107
|
+
add('063a', 'fecd', 'fece', 'fecf', 'fed0', true) # 3'ain
|
108
|
+
add('0641', 'fed1', 'fed2', 'fed3', 'fed4', true) # Fa2
|
109
|
+
add('0642', 'fed5', 'fed6', 'fed7', 'fed8', true) # Qaf
|
110
|
+
add('0643', 'fed9', 'feda', 'fedb', 'fedc', true) # Kaf
|
111
|
+
add('0644', 'fedd', 'fede', 'fedf', 'fee0', true) # Lam
|
112
|
+
add('0645', 'fee1', 'fee2', 'fee3', 'fee4', true) # Meem
|
113
|
+
add('0646', 'fee5', 'fee6', 'fee7', 'fee8', true) # Noon
|
114
|
+
add('0647', 'fee9', 'feea', 'feeb', 'feec', true) # Ha2
|
115
|
+
add('0648', 'feed', 'feee', 'feed', 'feee', false) # Waw
|
116
|
+
add('064a', 'fef1', 'fef2', 'fef3', 'fef4', true) # Ya2
|
117
|
+
add('0621', 'fe80', 'fe80', 'fe80', 'fe80', false) # Hamza
|
118
|
+
add('0622', 'fe81', 'fe82', 'fe81', 'fe82', false) # Alef Madda
|
119
|
+
add('0623', 'fe83', 'fe84', 'fe83', 'fe84', false) # Alef Hamza Above
|
120
|
+
add('0624', 'fe85', 'fe86', 'fe85', 'fe86', false) # Waw Hamza
|
121
|
+
add('0625', 'fe87', 'fe88', 'fe87', 'fe88', false) # Alef Hamza Below
|
122
|
+
add('0626', 'fe89', 'fe8a', 'fe8b', 'fe8c', true) # Ya2 Hamza
|
123
|
+
add('0629', 'fe93', 'fe94', 'fe93', 'fe94', false) # Ta2 Marbu6a
|
124
|
+
add('0640', '0640', '0640', '0640', '0640', true) # Tatweel
|
125
|
+
add('0649', 'feef', 'fef0', 'feef', 'fef0', false) # Alef Layyina
|
126
|
+
add('0651', 'fe7c', 'fe7c', 'fe7c', 'fe7d', false, true) # Shadda
|
127
|
+
add('0652', 'fe7e', 'fe7e', 'fe7e', 'fe7f', false, true) # Sukun
|
128
|
+
add('064e', 'fe76', 'fe76', 'fe76', 'fe77', false, true) # Fatha
|
129
|
+
add('0650', 'fe7a', 'fe7a', 'fe7a', 'fe7b', false, true) # Kasra
|
130
|
+
add('064f', 'fe78', 'fe78', 'fe78', 'fe79', false, true) # Damma
|
131
|
+
add('0653', '0653', '0653', '0653', '0653', false, true) # Madda
|
132
|
+
add('064b', 'fe79', 'fe70', 'fe70', 'fe71', false, true) # Fathatan
|
133
|
+
add('064d', 'fe74', 'fe74', 'fe74', 'fe74', false, true) # Kasratan
|
134
|
+
add('064c', 'fe72', 'fe72', 'fe72', 'fe72', false, true) # Dammatan
|
135
|
+
@@charinfos
|
136
|
+
end
|
137
|
+
|
138
|
+
def self.add(common, isolated, final, initial, medial, connects, diacritic = false)
|
139
|
+
charinfo = CharacterInfo.new(
|
140
|
+
[common.hex].pack('U'),
|
141
|
+
[isolated.hex].pack('U'),
|
142
|
+
[final.hex].pack('U'),
|
143
|
+
[initial.hex].pack('U'),
|
144
|
+
[medial.hex].pack('U'),
|
145
|
+
connects,
|
146
|
+
diacritic
|
147
|
+
)
|
148
|
+
@@charinfos[charinfo.common] = charinfo
|
149
|
+
end
|
150
|
+
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'prawn'
|
3
|
+
require 'prawn/rtl/support/version'
|
4
|
+
require 'prawn/rtl/connector'
|
5
|
+
|
6
|
+
module PrawnPatch
|
7
|
+
def array_from_tokens(tokens)
|
8
|
+
super.map do |record|
|
9
|
+
if record.include?(:text)
|
10
|
+
record[:text] = Prawn::Rtl::Connector(record[:text])
|
11
|
+
end
|
12
|
+
record
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
module Prawn
|
18
|
+
module Text
|
19
|
+
module Formatted
|
20
|
+
class Parser
|
21
|
+
class << self
|
22
|
+
prepend PrawnPatch
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
module Prawn
|
30
|
+
module Text
|
31
|
+
def text(string, options = {})
|
32
|
+
return false if string.nil?
|
33
|
+
# we modify the options. don't change the user's hash
|
34
|
+
options = options.dup
|
35
|
+
|
36
|
+
p = options[:inline_format]
|
37
|
+
if p
|
38
|
+
p = [] unless p.is_a?(Array)
|
39
|
+
options.delete(:inline_format)
|
40
|
+
array = text_formatter.format(string, *p)
|
41
|
+
else
|
42
|
+
array = [{ text: Prawn::Rtl::Connector(string) }]
|
43
|
+
end
|
44
|
+
|
45
|
+
formatted_text(array, options)
|
46
|
+
end
|
47
|
+
|
48
|
+
class Box
|
49
|
+
def initialize(string, options = {})
|
50
|
+
super([{ text: Prawn::Rtl::Connector(string) }], options)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'prawn/rtl/support/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "prawn-rtl-support"
|
8
|
+
spec.version = Prawn::Rtl::Support::VERSION
|
9
|
+
spec.authors = ["Oleksandr Lapchenko"]
|
10
|
+
spec.email = ["ozeron@me.com"]
|
11
|
+
|
12
|
+
spec.summary = 'Gem which patch prawn to provide support of arabic language.'
|
13
|
+
spec.description = 'Add suport for arabic language in prawn. '
|
14
|
+
spec.homepage = "https://github.com/cropio/prawn-rtl-support"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "pry", "~> 0.10"
|
28
|
+
spec.add_development_dependency "rubocop", "~> 0.48"
|
29
|
+
spec.add_dependency "prawn", "~> 2.2"
|
30
|
+
spec.add_dependency "twitter_cldr", "~> 4.3"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: prawn-rtl-support
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Oleksandr Lapchenko
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.14'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.14'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.10'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.10'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.48'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.48'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: prawn
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2.2'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: twitter_cldr
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '4.3'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '4.3'
|
111
|
+
description: 'Add suport for arabic language in prawn. '
|
112
|
+
email:
|
113
|
+
- ozeron@me.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
120
|
+
- ".travis.yml"
|
121
|
+
- CODE_OF_CONDUCT.md
|
122
|
+
- Gemfile
|
123
|
+
- LICENSE.txt
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- bin/console
|
127
|
+
- bin/setup
|
128
|
+
- lib/prawn/rtl/connector.rb
|
129
|
+
- lib/prawn/rtl/connector/logic.rb
|
130
|
+
- lib/prawn/rtl/support.rb
|
131
|
+
- lib/prawn/rtl/support/version.rb
|
132
|
+
- prawn-rtl-support.gemspec
|
133
|
+
homepage: https://github.com/cropio/prawn-rtl-support
|
134
|
+
licenses:
|
135
|
+
- MIT
|
136
|
+
metadata: {}
|
137
|
+
post_install_message:
|
138
|
+
rdoc_options: []
|
139
|
+
require_paths:
|
140
|
+
- lib
|
141
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
requirements: []
|
152
|
+
rubyforge_project:
|
153
|
+
rubygems_version: 2.5.1
|
154
|
+
signing_key:
|
155
|
+
specification_version: 4
|
156
|
+
summary: Gem which patch prawn to provide support of arabic language.
|
157
|
+
test_files: []
|