kokki 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/docker/Dockerfile +11 -0
- data/kokki.gemspec +1 -1
- data/lib/kokki/converter.rb +5 -1
- data/lib/kokki/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c2c83c5f3ff4759a6f79d02d164a11b56773e15ca13396150856486ce7e2685
|
4
|
+
data.tar.gz: a3dd417445e9724a640875ce2b1ab55a30835387fb51c75166d96c300b16f3c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8fb83e290ac1b2c2987d257539bcb33e715c9bad2716f9836f73efc16262cab862603ff6d5dd52d6dbefbee1164cb8d0684fcf176e60e173a86cf3834f47517
|
7
|
+
data.tar.gz: 578ac0d77f752558f47612017c21e7ff92a25e421d13099ab1b3e3f903e4b96a4c1a8cfd9707c89fada1d210335916160693fd0eeb3f658a315f30181f884c6b
|
data/README.md
CHANGED
data/docker/Dockerfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
FROM ruby:2.6-alpine3.10
|
2
|
+
RUN apk --no-cache add git build-base ruby-dev \
|
3
|
+
&& cd /tmp/ \
|
4
|
+
&& git clone https://github.com/ninoseki/kokki.git \
|
5
|
+
&& cd kokki \
|
6
|
+
&& gem build kokki.gemspec -o kokki.gem \
|
7
|
+
&& gem install kokki.gem \
|
8
|
+
&& rm -rf /tmp/kokki \
|
9
|
+
&& apk del --purge git build-base ruby-dev
|
10
|
+
|
11
|
+
ENTRYPOINT ["kokki"]
|
data/kokki.gemspec
CHANGED
@@ -29,5 +29,5 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "rake", "~> 12.3"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.8"
|
31
31
|
spec.add_development_dependency "vcr", "~> 5.0"
|
32
|
-
spec.add_development_dependency "webmock", "~> 3.
|
32
|
+
spec.add_development_dependency "webmock", "~> 3.7"
|
33
33
|
end
|
data/lib/kokki/converter.rb
CHANGED
@@ -36,8 +36,12 @@ module Kokki
|
|
36
36
|
|
37
37
|
private
|
38
38
|
|
39
|
+
def refang(input)
|
40
|
+
input.gsub("[.]", ".").gsub("(.)", ".")
|
41
|
+
end
|
42
|
+
|
39
43
|
def convert_as_ip_address(ip_address)
|
40
|
-
ip = IPAddress.new(ip_address)
|
44
|
+
ip = IPAddress.new(refang(ip_address))
|
41
45
|
dict.lookup_by_alpha_2_code ip.country_code
|
42
46
|
end
|
43
47
|
end
|
data/lib/kokki/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kokki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.7'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
96
|
+
version: '3.7'
|
97
97
|
description: Convert a country name / code & IP address to an emoji flag
|
98
98
|
email:
|
99
99
|
- manabu.niseki@gmail.com
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- Rakefile
|
112
112
|
- bin/console
|
113
113
|
- bin/setup
|
114
|
+
- docker/Dockerfile
|
114
115
|
- exe/kokki
|
115
116
|
- kokki.gemspec
|
116
117
|
- lib/kokki.rb
|
@@ -141,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
142
|
- !ruby/object:Gem::Version
|
142
143
|
version: '0'
|
143
144
|
requirements: []
|
144
|
-
rubygems_version: 3.0.
|
145
|
+
rubygems_version: 3.0.4
|
145
146
|
signing_key:
|
146
147
|
specification_version: 4
|
147
148
|
summary: Convert a country name / code & IP address to an emoji flag
|