currency_by_ip 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -0
- data/CHANGELOG.md +10 -0
- data/README.md +6 -5
- data/currency_by_ip.gemspec +0 -1
- data/lib/currency_by_ip/country_to_currency.rb +4 -2
- data/lib/currency_by_ip/version.rb +1 -1
- metadata +16 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2415da7d6e8015cd95e14c3c0ee8839f112f3504750c43f449a10aafb020d484
|
4
|
+
data.tar.gz: c4bfc4a5286885670e5ff61c84848b1f0fb5d0cfa342d78dc4fe638fcf2a8dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bea8eda34c6a2bc49472da30ddbdb320f9f6e1992303682db9366bb3bc028cd0e11f98f374f9b259447ebbcbd86cb8240c292b10e2c2f3fcf21d0651c604437
|
7
|
+
data.tar.gz: a7873e6a7601bc2db0d642413a938c3a07a633ca6bd5e3684537a4752e3ea15786aea0bfbaeb794b98353e3bf6382c0b7448ec8ae4e28f0cf1d23c67c5899a7b
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.5.0
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -5,10 +5,11 @@ database.
|
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
8
|
-
Add
|
8
|
+
Add the following lines to your application's Gemfile:
|
9
9
|
|
10
10
|
```ruby
|
11
|
-
|
11
|
+
# Detect the currency from an IP address
|
12
|
+
gem "currency_by_ip"
|
12
13
|
```
|
13
14
|
|
14
15
|
And then execute:
|
@@ -34,9 +35,9 @@ After checking out the repo, run `bin/setup` to install dependencies. Then,
|
|
34
35
|
run `bin/console` for an interactive prompt that will allow you to experiment.
|
35
36
|
|
36
37
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
37
|
-
To release a new version, update the version number in `version.rb`,
|
38
|
-
run `bundle exec rake release` to create a git tag for the version,
|
39
|
-
commits and tags, and push the `.gem` file to
|
38
|
+
To release a new version, update the version number in `version.rb`, commit,
|
39
|
+
and then run `bundle exec rake release` to create a git tag for the version,
|
40
|
+
push git commits and tags, and push the `.gem` file to
|
40
41
|
[rubygems.org](https://rubygems.org).
|
41
42
|
|
42
43
|
Run the specs with:
|
data/currency_by_ip.gemspec
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
module CurrencyByIp
|
2
|
-
# ISO2 country codes to country currency codes
|
3
|
-
# via http://country.io/data/
|
4
2
|
COUNTRY_TO_CURRENCY= {
|
3
|
+
"EU" => "EUR",
|
4
|
+
|
5
|
+
# ISO2 country codes to country currency codes
|
6
|
+
# via http://country.io/data/
|
5
7
|
"AD" => "EUR",
|
6
8
|
"AE" => "AED",
|
7
9
|
"AF" => "AFN",
|
metadata
CHANGED
@@ -1,69 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: currency_by_ip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sunny Ripert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: geoip
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.8'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.8'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rake
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
|
-
- - ~>
|
31
|
+
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
33
|
version: '10.0'
|
48
34
|
type: :development
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
|
-
- - ~>
|
38
|
+
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '10.0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
|
-
- -
|
45
|
+
- - ">="
|
60
46
|
- !ruby/object:Gem::Version
|
61
47
|
version: '0'
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
|
-
- -
|
52
|
+
- - ">="
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
55
|
description: Returns a currency string thanks to GeoIP's ip database.
|
@@ -73,9 +59,11 @@ executables: []
|
|
73
59
|
extensions: []
|
74
60
|
extra_rdoc_files: []
|
75
61
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .rspec
|
78
|
-
- .
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".ruby-version"
|
65
|
+
- ".travis.yml"
|
66
|
+
- CHANGELOG.md
|
79
67
|
- CODE_OF_CONDUCT.md
|
80
68
|
- Gemfile
|
81
69
|
- LICENSE.txt
|
@@ -98,17 +86,17 @@ require_paths:
|
|
98
86
|
- lib
|
99
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
100
88
|
requirements:
|
101
|
-
- -
|
89
|
+
- - ">="
|
102
90
|
- !ruby/object:Gem::Version
|
103
91
|
version: '0'
|
104
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
93
|
requirements:
|
106
|
-
- -
|
94
|
+
- - ">="
|
107
95
|
- !ruby/object:Gem::Version
|
108
96
|
version: '0'
|
109
97
|
requirements: []
|
110
98
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.7.3
|
112
100
|
signing_key:
|
113
101
|
specification_version: 4
|
114
102
|
summary: Guess the currency from the IP address.
|