prawn-emoji 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +12 -0
- data/README.md +9 -1
- data/Rakefile +14 -0
- data/emoji/index.yml +51 -51
- data/lib/prawn/emoji/image.rb +1 -1
- data/lib/prawn/emoji/version.rb +1 -1
- data/test/gemfiles/prawn-2.1 +8 -0
- data/test/prawn/emoji/image_spec.rb +7 -3
- data/test/prawn/emoji/index_spec.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68c23f219ecd72d5d495882e924aeba835f05286
|
4
|
+
data.tar.gz: bfe0cc94b97b5d518379ef8f731522a0b4c673d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 199dfe4ae9bd3118c124062fbaf41460a147f4761d174efe045419e26a743f5f33071928ad3657b7cc436ed538505d5d7341e7368dc8413d27160ec69ccc0341
|
7
|
+
data.tar.gz: 8009c20d6cf75808cb35ba8fb510cbd7d2ce99c1d2db421b863687ecf9bd5a0394cf4286dc2e86fc88658cd872f0812bdf606772fc0f37a1dbff283ebe83c435
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
## 1.0.2
|
2
|
+
|
3
|
+
* Fixed: © \u{00a9} is not rendered (commit: 32d55b0)
|
4
|
+
* Development: Add task for generating emoji index from emoji images (commit: 2d41247)
|
5
|
+
|
6
|
+
## 1.0.1
|
7
|
+
|
8
|
+
* Skip drawing if the text encoding is not UTF-8 (commit: 033f05e)
|
9
|
+
|
10
|
+
## 1.0.0
|
11
|
+
|
12
|
+
First release.
|
data/README.md
CHANGED
@@ -57,7 +57,7 @@ In order to draw emoji, you must use a TTF - True Type Font. I recommend you use
|
|
57
57
|
## Supported versions
|
58
58
|
|
59
59
|
* Ruby 2.1, 2.2, 2.3
|
60
|
-
* Prawn 1.3, 2.
|
60
|
+
* Prawn 1.3, 2.1
|
61
61
|
|
62
62
|
See https://travis-ci.org/hidakatsuya/prawn-emoji.
|
63
63
|
|
@@ -65,6 +65,14 @@ See https://travis-ci.org/hidakatsuya/prawn-emoji.
|
|
65
65
|
|
66
66
|
Bug reports and pull requests are welcome on GitHub at https://github.com/hidakatsuya/prawn-emoji.
|
67
67
|
|
68
|
+
### How to update `emoji/index.yml`
|
69
|
+
|
70
|
+
If you update emoji image in `emoji/images`, you need to update `emoji/index.yml` to run the following task:
|
71
|
+
|
72
|
+
```
|
73
|
+
$ bundle exec rake emoji:generate_index
|
74
|
+
```
|
75
|
+
|
68
76
|
## Credit
|
69
77
|
|
70
78
|
### Emoji One
|
data/Rakefile
CHANGED
@@ -8,3 +8,17 @@ Rake::TestTask.new(:test) do |t|
|
|
8
8
|
end
|
9
9
|
|
10
10
|
task default: :test
|
11
|
+
|
12
|
+
namespace :emoji do
|
13
|
+
desc 'Generate emoji/index.yml from emoji/images'
|
14
|
+
task :generate_index do
|
15
|
+
require 'prawn/emoji'
|
16
|
+
require 'yaml'
|
17
|
+
|
18
|
+
emoji_files = Prawn::Emoji.root / 'emoji' / 'images' / '*.png'
|
19
|
+
emoji_names = Pathname.glob(emoji_files).map { |f| f.basename('.png').to_s }
|
20
|
+
|
21
|
+
index_file = Prawn::Emoji.root / 'emoji' / 'index.yml'
|
22
|
+
index_file.write emoji_names.to_yaml
|
23
|
+
end
|
24
|
+
end
|
data/emoji/index.yml
CHANGED
@@ -900,15 +900,15 @@
|
|
900
900
|
- 1F6F2
|
901
901
|
- 1F6F3
|
902
902
|
- 203C
|
903
|
-
- 2049
|
904
|
-
- 2122
|
905
|
-
- 2139
|
906
|
-
- 2194
|
907
|
-
- 2195
|
908
|
-
- 2196
|
909
|
-
- 2197
|
910
|
-
- 2198
|
911
|
-
- 2199
|
903
|
+
- '2049'
|
904
|
+
- '2122'
|
905
|
+
- '2139'
|
906
|
+
- '2194'
|
907
|
+
- '2195'
|
908
|
+
- '2196'
|
909
|
+
- '2197'
|
910
|
+
- '2198'
|
911
|
+
- '2199'
|
912
912
|
- 21A9
|
913
913
|
- 21AA
|
914
914
|
- 231A
|
@@ -928,34 +928,34 @@
|
|
928
928
|
- 25FC
|
929
929
|
- 25FD
|
930
930
|
- 25FE
|
931
|
-
- 2600
|
932
|
-
- 2601
|
931
|
+
- '2600'
|
932
|
+
- '2601'
|
933
933
|
- 260E
|
934
|
-
- 2611
|
935
|
-
- 2614
|
936
|
-
- 2615
|
934
|
+
- '2611'
|
935
|
+
- '2614'
|
936
|
+
- '2615'
|
937
937
|
- 261D
|
938
938
|
- 263A
|
939
|
-
- 2648
|
940
|
-
- 2649
|
939
|
+
- '2648'
|
940
|
+
- '2649'
|
941
941
|
- 264A
|
942
942
|
- 264B
|
943
943
|
- 264C
|
944
944
|
- 264D
|
945
945
|
- 264E
|
946
946
|
- 264F
|
947
|
-
- 2650
|
948
|
-
- 2651
|
949
|
-
- 2652
|
950
|
-
- 2653
|
951
|
-
- 2660
|
952
|
-
- 2663
|
953
|
-
- 2665
|
954
|
-
- 2666
|
955
|
-
- 2668
|
947
|
+
- '2650'
|
948
|
+
- '2651'
|
949
|
+
- '2652'
|
950
|
+
- '2653'
|
951
|
+
- '2660'
|
952
|
+
- '2663'
|
953
|
+
- '2665'
|
954
|
+
- '2666'
|
955
|
+
- '2668'
|
956
956
|
- 267B
|
957
957
|
- 267F
|
958
|
-
- 2693
|
958
|
+
- '2693'
|
959
959
|
- 26A0
|
960
960
|
- 26A1
|
961
961
|
- 26AA
|
@@ -972,37 +972,37 @@
|
|
972
972
|
- 26F5
|
973
973
|
- 26FA
|
974
974
|
- 26FD
|
975
|
-
- 2702
|
976
|
-
- 2705
|
977
|
-
- 2708
|
978
|
-
- 2709
|
975
|
+
- '2702'
|
976
|
+
- '2705'
|
977
|
+
- '2708'
|
978
|
+
- '2709'
|
979
979
|
- 270A
|
980
980
|
- 270B
|
981
981
|
- 270C
|
982
982
|
- 270F
|
983
|
-
- 2712
|
984
|
-
- 2714
|
985
|
-
- 2716
|
986
|
-
- 2728
|
987
|
-
- 2733
|
988
|
-
- 2734
|
989
|
-
- 2744
|
990
|
-
- 2747
|
983
|
+
- '2712'
|
984
|
+
- '2714'
|
985
|
+
- '2716'
|
986
|
+
- '2728'
|
987
|
+
- '2733'
|
988
|
+
- '2734'
|
989
|
+
- '2744'
|
990
|
+
- '2747'
|
991
991
|
- 274C
|
992
992
|
- 274E
|
993
|
-
- 2753
|
994
|
-
- 2754
|
995
|
-
- 2755
|
996
|
-
- 2757
|
997
|
-
- 2764
|
998
|
-
- 2795
|
999
|
-
- 2796
|
1000
|
-
- 2797
|
993
|
+
- '2753'
|
994
|
+
- '2754'
|
995
|
+
- '2755'
|
996
|
+
- '2757'
|
997
|
+
- '2764'
|
998
|
+
- '2795'
|
999
|
+
- '2796'
|
1000
|
+
- '2797'
|
1001
1001
|
- 27A1
|
1002
1002
|
- 27B0
|
1003
1003
|
- 27BF
|
1004
|
-
- 2934
|
1005
|
-
- 2935
|
1004
|
+
- '2934'
|
1005
|
+
- '2935'
|
1006
1006
|
- 2B05
|
1007
1007
|
- 2B06
|
1008
1008
|
- 2B07
|
@@ -1010,7 +1010,7 @@
|
|
1010
1010
|
- 2B1C
|
1011
1011
|
- 2B50
|
1012
1012
|
- 2B55
|
1013
|
-
- 3030
|
1013
|
+
- '3030'
|
1014
1014
|
- 303D
|
1015
|
-
- 3297
|
1016
|
-
- 3299
|
1015
|
+
- '3297'
|
1016
|
+
- '3299'
|
data/lib/prawn/emoji/image.rb
CHANGED
data/lib/prawn/emoji/version.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
describe Prawn::Emoji::Image do
|
4
|
-
|
5
|
-
subject { Prawn::Emoji::Image.new('😀').path }
|
4
|
+
let(:emojis) { %w( 😀 © ) }
|
6
5
|
|
7
|
-
|
6
|
+
it 'possible to find the image file' do
|
7
|
+
emojis.each do |emoji|
|
8
|
+
emoji_image = Prawn::Emoji::Image.new(emoji)
|
9
|
+
|
10
|
+
assert File.exist?(emoji_image.path), "#{emoji} not found"
|
11
|
+
end
|
8
12
|
end
|
9
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-emoji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katsuya HIDAKA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prawn
|
@@ -104,6 +104,7 @@ extra_rdoc_files: []
|
|
104
104
|
files:
|
105
105
|
- ".gitignore"
|
106
106
|
- ".travis.yml"
|
107
|
+
- CHANGELOG.md
|
107
108
|
- Gemfile
|
108
109
|
- MIT-LICENSE
|
109
110
|
- README.md
|
@@ -1137,6 +1138,7 @@ files:
|
|
1137
1138
|
- test/fonts/ipag.ttf
|
1138
1139
|
- test/gemfiles/prawn-1.3
|
1139
1140
|
- test/gemfiles/prawn-2.0
|
1141
|
+
- test/gemfiles/prawn-2.1
|
1140
1142
|
- test/prawn/emoji/drawable_spec.rb
|
1141
1143
|
- test/prawn/emoji/drawer_spec.rb
|
1142
1144
|
- test/prawn/emoji/image_spec.rb
|
@@ -1169,4 +1171,3 @@ signing_key:
|
|
1169
1171
|
specification_version: 4
|
1170
1172
|
summary: Provides support for Emoji in Prawn
|
1171
1173
|
test_files: []
|
1172
|
-
has_rdoc:
|