somemoji 0.4.1 → 0.4.2

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: cb1681fec88ea7e3b58928b814d378e6357b6a20
4
- data.tar.gz: 38f29985aed875e1746835c0f394b1901c0e8468
3
+ metadata.gz: 9579bce4804e42f336f9a666e2a1808cc3ddea78
4
+ data.tar.gz: 8f3d6fe0cda5564bda0b0c71545ec56addadf700
5
5
  SHA512:
6
- metadata.gz: c46370c047b7bf0a952a05ad4477843874c48f63c01ddf9e7ffd7b07c0e59407b6134592f7bfb10aa42aa8952f6829214f1156e32733be83924b19b821a6b9d8
7
- data.tar.gz: d2659e21660c34e5f85087fb1c780f0efca2e1298f4c2ea4d05a76a5389f0633041e455d3aa50b1ea4ad9050874427ce26ef409646a5cd58ce63c01bdb7a0a61
6
+ metadata.gz: 024c1ada58e30358a51dbc70d63da21e7d1f99afc8103b76db67596420eccc1304a5409b423126bf464ff90cf49f94273e709e5897782ffe480e272cfb48e3ef
7
+ data.tar.gz: a8509eae9da5c47bb6572671486b136f496c2e11bfbbcb69ced9a09f07f27bc8ae4414a75f24c29b109ae3e18394abf1a3e6d1e3de5e4e5b9d957812b6aeb217
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.4.2
2
+
3
+ - Support slop both v3 and v4
4
+
1
5
  ## v0.4.1
2
6
 
3
7
  - Add more available emojis on Noto emojis
data/README.md CHANGED
@@ -8,10 +8,12 @@ A grand unified emoji mapper for some emoji providers.
8
8
 
9
9
  ## Supported emoji
10
10
 
11
- - [Apple Emoji](https://support.apple.com/en-us/HT202332) (Licensed by Apple Inc.)
12
- - [EmojiOne](https://github.com/Ranks/emojione) (CC-BY 4.0)
13
- - [Noto Emoji](https://github.com/googlei18n/noto-emoji) (SIL Open Font License 1.1)
14
- - [Twemoji](https://github.com/twitter/twemoji) (CC-BY 4.0)
11
+ |Provider|Count|License|
12
+ |---|---|---|
13
+ |[Apple Emoji](https://support.apple.com/en-us/HT202332)|1,285 emojis|Licensed by Apple Inc.|
14
+ |[EmojiOne](https://github.com/Ranks/emojione)|1,794 emojis|CC-BY 4.0|
15
+ |[Noto Emoji](https://github.com/googlei18n/noto-emoji)|1,541 emojis|SIL Open Font License 1.1|
16
+ |[Twemoji](https://github.com/twitter/twemoji)|1,626 emojis|CC-BY 4.0|
15
17
 
16
18
  ## Installation
17
19
 
@@ -45,21 +45,44 @@ module Somemoji
45
45
  # @return [Slop::Options]
46
46
  def slop_options
47
47
  @slop_options ||= begin
48
- slop_options = ::Slop::Options.new
49
- slop_options.banner = "Usage: somemoji extract [options]"
50
- slop_options.string "-p", "--provider", "(required) apple, emoji_one, noto, or twemoji"
51
- slop_options.string "-d", "--destination", "(required) directory path to locate extracted image files"
52
- slop_options.string "-f", "--format", "png or svg (default: png)"
53
- slop_options.integer "-s", "--size", "Some providers have different size image files"
54
- slop_options.bool "-h", "--help", "Display this help message"
55
- slop_options
48
+ if using_slop_version_4?
49
+ slop_options = ::Slop::Options.new
50
+ slop_options.banner = "Usage: somemoji extract [options]"
51
+ slop_options.string "-p", "--provider", "(required) apple, emoji_one, noto, or twemoji"
52
+ slop_options.string "-d", "--destination", "(required) directory path to locate extracted image files"
53
+ slop_options.string "-f", "--format", "png or svg (default: png)"
54
+ slop_options.integer "-s", "--size", "Some providers have different size image files"
55
+ slop_options.bool "-h", "--help", "Display this help message"
56
+ slop_options
57
+ else
58
+ ::Slop.new do
59
+ banner "Usage: somemoji extract [options]"
60
+ on "p", "provider=", "(required) apple, emoji_one, noto, or twemoji"
61
+ on "d", "destination=", "(required) directory path to locate extracted image files"
62
+ on "f", "format=", "png or svg (default: png)"
63
+ on "s", "size=", "Some providers have different size image files"
64
+ on "h", "help", "Display this help message"
65
+ end
66
+ end
56
67
  end
57
68
  end
58
69
 
59
70
  # @return [Slop::Result]
60
71
  def slop_parse_result
61
- @slop_parse_result ||= ::Slop::Parser.new(slop_options).parse(@argv)
62
- rescue ::Slop::UnknownOption
72
+ @slop_parse_result ||= begin
73
+ if using_slop_version_4?
74
+ ::Slop::Parser.new(slop_options).parse(@argv)
75
+ else
76
+ slop_options.parse!(@argv)
77
+ slop_options
78
+ end
79
+ end
80
+ rescue ::Slop::Error
81
+ end
82
+
83
+ # @return [Boolean]
84
+ def using_slop_version_4?
85
+ ::Slop::VERSION >= "4.0.0"
63
86
  end
64
87
  end
65
88
  end
@@ -1,3 +1,3 @@
1
1
  module Somemoji
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
data/somemoji.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_dependency "gemoji", "3.0.0.rc1"
26
26
  spec.add_dependency "json"
27
- spec.add_dependency "slop", ">= 4.0.0"
27
+ spec.add_dependency "slop"
28
28
  spec.add_development_dependency "bundler", "~> 1.13"
29
29
  spec.add_development_dependency "gemojione", "3.2.0"
30
30
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: somemoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-09 00:00:00.000000000 Z
11
+ date: 2016-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gemoji
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 4.0.0
47
+ version: '0'
48
48
  type: :runtime
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: 4.0.0
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement