somemoji 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d685255a884fcb091c0b5dba41ce37e916f3c7d
4
- data.tar.gz: b2c58701cb9f2ff4a95a7e3d42ae0bbd4d40aab3
3
+ metadata.gz: 0ccf34291e0c2e7e64661b6e82874ef7e3c321a3
4
+ data.tar.gz: bed7df7665ad7fd7a6a44cb5b647435251c4c5e6
5
5
  SHA512:
6
- metadata.gz: 47895ac3fa27eaf37273630fc57b893394b0da30adce5c307514e76072a716bf8c0e70c1f1520fa47b917a9c2fd5f2a74dd4e7a8cd22ef7e7bf4a78122b50225
7
- data.tar.gz: 06b75543fa44c51ffdba362ff5a06236c2ce983d0541edc1c1a70a2cc5e01cd1242a6b9fa9860bc77ff6c8b96b05aed721b01d19c7a9ad69c7a6be475012a0cf
6
+ metadata.gz: e6a1c6081784a870617846ad450cc54346d4f8746d52fe4635dbc44aab7e87e5d72d72f099a236e016e9928e6fbe67440f6158762890ff5fe3a193601c33e34e
7
+ data.tar.gz: 893fb85300fb414eabc2d0d03899d7c5d5abeefddb67a443d58a534f97db90197f5d0231019416fe7d318bfd1b569fce4d53004797605ca0e2bca099752b321c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.3.1
2
+
3
+ - Add Noto emoji extractor
4
+ - Use down-cased file name for extracted emoji
5
+ - Print progress on downloading emojis
6
+
1
7
  ## v0.3.0
2
8
 
3
9
  - Support Noto emoji
@@ -96,7 +96,7 @@ module Somemoji
96
96
  if code_points.empty?
97
97
  code
98
98
  else
99
- "unicode/#{code_points.join('-')}"
99
+ "unicode/#{code_points.join('-').downcase}"
100
100
  end
101
101
  end
102
102
 
@@ -5,10 +5,12 @@ module Somemoji
5
5
  class BaseEmojiExtractor
6
6
  # @param directory_path [String]
7
7
  # @param format [String]
8
+ # @param silence [Boolean]
8
9
  # @param size [Integer, nil]
9
- def initialize(format: nil, directory_path:, size: nil)
10
+ def initialize(format: nil, directory_path:, silence: nil, size: nil)
10
11
  @directory_path = directory_path
11
12
  @format = format || "png"
13
+ @silence = silence || false
12
14
  @size = size
13
15
  end
14
16
 
@@ -21,6 +23,10 @@ module Somemoji
21
23
  def make_directory
22
24
  ::FileUtils.mkdir_p(@directory_path)
23
25
  end
26
+
27
+ def silence?
28
+ !!@silence
29
+ end
24
30
  end
25
31
  end
26
32
  end
@@ -9,7 +9,9 @@ module Somemoji
9
9
  make_directory
10
10
  emojis.each do |emoji|
11
11
  download(emoji)
12
+ print emoji.character unless silence?
12
13
  end
14
+ puts unless silence?
13
15
  end
14
16
 
15
17
  private
@@ -1,3 +1,3 @@
1
1
  module Somemoji
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/somemoji.rb CHANGED
@@ -5,6 +5,7 @@ require "somemoji/emoji_extractors/base_emoji_extractor"
5
5
  require "somemoji/emoji_extractors/apple_emoji_extractor"
6
6
  require "somemoji/emoji_extractors/downloadable_emoji_extractor"
7
7
  require "somemoji/emoji_extractors/emoji_one_emoji_extractor"
8
+ require "somemoji/emoji_extractors/noto_emoji_extractor"
8
9
  require "somemoji/emoji_extractors/twemoji_emoji_extractor"
9
10
  require "somemoji/version"
10
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: somemoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura