seventeen_mon 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3816820a4d39a1a9fc124fac3d42230a1588ad73
4
- data.tar.gz: 7a561c05d0fb81b14b82ec508983dd5e1871f091
3
+ metadata.gz: 5af503ff8c728eb599c1bf24f449d736e5ff58e9
4
+ data.tar.gz: a70035346ddb5d2d1f6c84034104b23ee5da86cf
5
5
  SHA512:
6
- metadata.gz: 799a076d2dee1a812cbec59cf30f1bfed85840e69c7f02a8a746180cba45a80e637d7617e8f4158df8919a9682684a377523fc80c4b6a396d2725e85ff8e3d62
7
- data.tar.gz: 4da438b706f10351ec55f3055b9b540b793bb0e9a1b2cae0c63967bf9b96147e9747ca4de33356aded0e67a17a3ab1412961d8818d8977faa685b822db402ff1
6
+ metadata.gz: 1eb3f4953c7987a696aa0577ded94565bd696d326cade2d7d642e0932822ec47ce9fad625bd9c59ef401dc6be493ca09ef42fcfa4aaae00dd71dd99ac1135792
7
+ data.tar.gz: 0eb6cc971cacbd4551cf1636bf1bc7972541cd9bb2865a9965e3f916bb21f8ad74363396a4774e7b09d461836e396916048a200cd5b98c777dbec4305e514228
data/README.md CHANGED
@@ -25,24 +25,26 @@ Or you can install simply by
25
25
 
26
26
  ### In Ruby
27
27
  ```(ruby)
28
- SM.find_by_ip "188.74.78.234"
29
- # => {:country=>"英国", :city=>"英国"}
28
+ SM.find_by_ip "119.75.216.20"
29
+ # => {:country=>"中国", :province=>"北京", :city=>"北京"}
30
30
 
31
- SM.find_by_address "http://ruby-lang.com"
32
- # => {:country=>"荷兰", :city=>"荷兰"}
31
+ SM.find_by_address "http://taobao.com"
32
+ # => {:country=>"中国", :province=>"浙江", :city=>"杭州"}
33
33
  ```
34
34
 
35
35
  ### In Command Line
36
36
 
37
37
  ```(bash)
38
- $ seventeen ip 188.74.78.234
39
- Country: 英国
40
- City: 英国
38
+ $ seventeen ip 119.75.216.20
39
+ Country: 中国
40
+ Province: 北京
41
+ City: 北京
41
42
 
42
43
 
43
- $ seventeen address https://github.com
44
- Country: 美国
45
- City: 美国
44
+ $ seventeen seventeen address http://taobao.com
45
+ Country: 中国
46
+ Province: 浙江
47
+ City: 杭州
46
48
  ```
47
49
 
48
50
  ## Contributing
data/bin/seventeen CHANGED
@@ -37,6 +37,7 @@ if OPERATIONS.include?(op)
37
37
  if result.is_a? Hash
38
38
  puts <<-EOS
39
39
  Country: #{result[:country]}
40
+ Province: #{result[:province]}
40
41
  City: #{result[:city]}
41
42
  EOS
42
43
  else
@@ -55,7 +55,8 @@ module SeventeenMon
55
55
 
56
56
  {
57
57
  country: result[0],
58
- city: result[1]
58
+ province: result[1],
59
+ city: result[2]
59
60
  }
60
61
  end
61
62
  end
@@ -1,3 +1,3 @@
1
1
  module SeventeenMon
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -19,12 +19,14 @@ describe SeventeenMon do
19
19
  it "can find location by ip" do
20
20
  result = SM.find_by_ip @ip_param
21
21
  result.should include(:city)
22
+ result.should include(:province)
22
23
  result.should include(:country)
23
24
  end
24
25
 
25
26
  it "can find location by address" do
26
27
  result = SM.find_by_address @url_param
27
28
  result.should include(:city)
29
+ result.should include(:province)
28
30
  result.should include(:country)
29
31
  end
30
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seventeen_mon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jingkai He
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-20 00:00:00.000000000 Z
11
+ date: 2014-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler