emojidex 0.2.0 → 0.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5410198fbf7a8a192c52c7f321bf0c82549a7076
|
4
|
+
data.tar.gz: fc92c715b7aa8f648adadfe0ed2212b280c8e449
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 575d1d4702c789d39b5189af25acead411053da281431cb4ac0d34ab79d9d26a4994249058f5246e9cd47173c1e0012dee779c0b9adb5988d67aa1268da2eb81
|
7
|
+
data.tar.gz: 6c4edaf23c04dbe9cb81f51ea21a53b4f3b2bcdfeedf5c43d54fdc56b0fe2f1b0ebefa803f27c4c46165e5a0753e5067f399698d1b65af50af81a3612cc580f7
|
data/emojidex.gemspec
CHANGED
@@ -84,7 +84,7 @@ module Emojidex
|
|
84
84
|
@vector_source_path = @source_path if @vector_source_path.nil?
|
85
85
|
src = "#{@vector_source_path}/#{moji.code}.svg"
|
86
86
|
if File.exist? "#{src}"
|
87
|
-
unless File.exist?("#{@cache_path}/#{moji.code}") &&
|
87
|
+
unless File.exist?("#{@cache_path}/#{moji.code}.svg") &&
|
88
88
|
FileUtils.compare_file("#{src}", "#{@cache_path}/#{moji.code}.svg")
|
89
89
|
FileUtils.cp("#{src}", @cache_path)
|
90
90
|
end
|
@@ -6,7 +6,7 @@ module Emojidex
|
|
6
6
|
# mixin module to enable static collections
|
7
7
|
module StaticCollection
|
8
8
|
def load_from_server(detailed = true, locale = '??')
|
9
|
-
locale = Emojidex::EnvHelper.lang? if locale == '??'
|
9
|
+
locale = @locale || Emojidex::EnvHelper.lang? if locale == '??'
|
10
10
|
begin
|
11
11
|
res = Emojidex::Service::Transactor.get(@endpoint, detailed: detailed, locale: locale)
|
12
12
|
rescue
|
@@ -10,7 +10,9 @@ module Emojidex
|
|
10
10
|
def initialize(opts = {})
|
11
11
|
super(opts)
|
12
12
|
@endpoint = 'extended_emoji'
|
13
|
-
|
13
|
+
@locale = opts[:locale] || Emojidex::Defaults.locale
|
14
|
+
load_from_server((opts[:detailed] || true),
|
15
|
+
@locale) unless check_and_load_static('extended')
|
14
16
|
@emoji
|
15
17
|
end
|
16
18
|
end
|
data/lib/emojidex/data/utf.rb
CHANGED
@@ -10,7 +10,8 @@ module Emojidex
|
|
10
10
|
def initialize(opts = {})
|
11
11
|
super(opts)
|
12
12
|
@endpoint = 'utf_emoji'
|
13
|
-
|
13
|
+
@locale = opts[:locale] || Emojidex::Defaults.locale
|
14
|
+
load_from_server((opts[:detailed] || true), @locale) unless check_and_load_static('utf')
|
14
15
|
@emoji
|
15
16
|
end
|
16
17
|
end
|
data/lib/emojidex/defaults.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emojidex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rei Kagetsuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|