negarmoji 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,16 +16,16 @@ module Emoji # :nodoc:
16
16
  # A list of names uniquely referring to this emoji.
17
17
  attr_reader :aliases
18
18
 
19
- # The category for this emoji as per Apple's character palette
19
+ # The category for this emoji as per Apple's character palette.
20
20
  attr_accessor :category
21
21
 
22
- # The Unicode description text
22
+ # The Unicode description text.
23
23
  attr_accessor :description
24
24
 
25
- # The Unicode spec version where this emoji first debuted
25
+ # The Unicode spec version where this emoji first debuted.
26
26
  attr_accessor :unicode_version
27
27
 
28
- # The iOS version where this emoji first debuted
28
+ # The iOS version where this emoji first debuted.
29
29
  attr_accessor :ios_version
30
30
 
31
31
  def name
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emoji
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -54,8 +54,12 @@ if new_version == version:
54
54
 
55
55
  if new_major < version_info[0]:
56
56
  raise ValueError("Major version can't be less than current version!")
57
+ elif new_major > version_info[0]:
58
+ pass
57
59
  elif new_minor < version_info[1]:
58
60
  raise ValueError("Minor version can't be less than current version!")
61
+ elif new_minor > version_info[1]:
62
+ pass
59
63
  elif new_patch < version_info[2]:
60
64
  raise ValueError("Patch version can't be less than current version!")
61
65
 
data/test/emoji_test.rb CHANGED
@@ -61,31 +61,17 @@ class EmojiTest < TestCase
61
61
  test "emojis have valid names" do
62
62
  aliases = Emoji.all.flat_map(&:aliases)
63
63
 
64
- gender_mismatch = []
65
- to_another_gender = lambda do |name|
66
- case name
67
- when *GENDER_EXCEPTIONS then name
68
- else
69
- name.sub(%r{(?<=^|_)(?:wo)?man(?=_|$)}) do |match|
70
- match == "woman" ? "man" : "woman"
71
- end
72
- end
73
- end
74
-
75
64
  invalid = []
76
65
  alias_count = Hash.new(0)
77
66
  aliases.each do |name|
78
67
  alias_count[name] += 1
79
68
  invalid << name if name !~ %r{\A[\w+-]+\Z}
80
- another_gender = to_another_gender.call(name)
81
- gender_mismatch << another_gender unless aliases.include?(another_gender)
82
69
  end
83
70
 
84
71
  duplicates = alias_count.select { |_, count| count > 1 }.keys
85
72
 
86
73
  assert_equal [], invalid, "some negarmoji have invalid names"
87
74
  assert_equal [], duplicates, "some negarmoji aliases have duplicates"
88
- assert_equal [], gender_mismatch, "missing gender variants"
89
75
  end
90
76
 
91
77
  test "missing or incorrect unicodes" do
@@ -129,7 +115,10 @@ class EmojiTest < TestCase
129
115
  "Activities",
130
116
  "Objects",
131
117
  "Symbols",
132
- "Flags"
118
+ "Flags",
119
+ "Component",
120
+ "Extras & Openmoji",
121
+ "Extras & Unicode"
133
122
  ], categories
134
123
  end
135
124
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: negarmoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohammad Mahdi Baghbani Pourvahid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-12 00:00:00.000000000 Z
11
+ date: 2019-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler