docodoco_jp 0.1.2 → 1.0.3

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
- SHA1:
3
- metadata.gz: 47e45cbac5876cf397761efc602cd30e02fd62b9
4
- data.tar.gz: a8361be0e40bc0888c620c3ebeaf91bc38fd0e4f
2
+ SHA256:
3
+ metadata.gz: 54262ca6cad6f7eb9fa5f16cc446a906de16230e273f9b2a8bbc5dbaa5e51cca
4
+ data.tar.gz: 7ff17647ca148aee0f4177c680020cdb5dc0dadd9fc81b6d95e0f83b914a0d69
5
5
  SHA512:
6
- metadata.gz: 1f73dcf1b0f539b945c1ff515904c3f14280e44e065bc6db7275980c4d57364370bda3b7ffe37882281bfc119147eaad1035d8c2b7b429800ce0c5926d2294b0
7
- data.tar.gz: c5355741732078a3b1cb1e79a896360f11074236fd3096d80c6f48d6c78420b2ac0ea48eaf810af73562d525ab75aedf139b9eadf1888f855157cdd9a6bc063b
6
+ metadata.gz: b00dd321a59dd9bb683b810e3c45a448f40197db60b3fdb399ab8bb4e72625b61355ab7d036bc938dd41df54c6c3084ae46fb186e8bbf9dd59227a492d5a1ef7
7
+ data.tar.gz: e93d668510c8e8164edfb0f4d97f01c7e1bc93a3a4c9f297d189181d38a6cebd24cb236be9bf9dde77b8761a904c952add33a97d5baa2e44036d740ddd0ace29
@@ -1,3 +1,10 @@
1
+ install: ./bin/setup
2
+ script: bundle exec rake test
1
3
  language: ruby
2
4
  rvm:
3
5
  - 2.2.2
6
+ - 2.1.0
7
+ - 2.0.0
8
+ - 1.9.3
9
+ - jruby-19mode
10
+ - rbx-2
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/docodoco_jp.svg)](http://badge.fury.io/rb/docodoco_jp)
2
+ [![Build Status](https://travis-ci.org/magicdrive/ruby-docodoco_jp.svg?branch=master)](https://travis-ci.org/magicdrive/ruby-docodoco_jp)
2
3
 
3
4
  # DocodocoJp
4
5
 
@@ -36,8 +37,8 @@ Or install it yourself as:
36
37
  ```ruby
37
38
  require 'docodoco_jp'
38
39
 
39
- apikey1 = "YOURAPIKEY1"
40
- apikey2 = "YOURAPIKEY2"
40
+ apikey1 = "YOUR_APIKEY_1"
41
+ apikey2 = "YOUR_APIKEY_2"
41
42
 
42
43
  options = {
43
44
  ssl: false, # => default: true
@@ -4,6 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'docodoco_jp/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
+ spec.required_ruby_version = '>= 2.6.0'
7
8
  spec.name = "docodoco_jp"
8
9
  spec.version = DocodocoJp::VERSION
9
10
  spec.authors = ["Hiroshi IKEGAMI"]
@@ -14,25 +15,18 @@ Gem::Specification.new do |spec|
14
15
  spec.homepage = "https://github.com/magicdrive/ruby-docodoco_jp"
15
16
  spec.license = "MIT"
16
17
 
17
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
- # delete this section to allow pushing this gem to any host.
19
- if spec.respond_to?(:metadata)
20
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
21
- else
22
- raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
- end
24
-
25
18
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
19
  spec.bindir = "exe"
27
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
21
  spec.require_paths = ["lib"]
29
22
 
30
- spec.add_dependency "thor", "~> 0.0"
31
- spec.add_dependency "faraday", "~> 0.9"
32
- spec.add_dependency "hashie", "~> 3.0"
23
+ spec.add_dependency "thor", '~> 1.0'
24
+ spec.add_dependency "faraday", "~> 1.0"
25
+ spec.add_dependency "hashie", "~> 4.1.0"
33
26
 
34
- spec.add_development_dependency "minitest", "~> 5.0"
27
+ spec.add_development_dependency "minitest", "~> 5.14"
35
28
  spec.add_development_dependency "pry"
36
- spec.add_development_dependency "bundler", "~> 1.0"
37
- spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rack"
30
+ spec.add_development_dependency "bundler", "~> 2.0"
31
+ spec.add_development_dependency "rake", ">= 12.3.3"
38
32
  end
File without changes
@@ -0,0 +1,2 @@
1
+ apikey1: "xxxxx"
2
+ apikey2: "yyyyy"
@@ -13,13 +13,22 @@ require 'rexml/document'
13
13
 
14
14
  class DocodocoJp
15
15
 
16
- API_HOST = 'api.docodoco.jp'
16
+ DEFAULT_API_HOST = 'api.docodoco.jp'
17
17
 
18
18
  attr_reader :apikey
19
19
  attr_reader :config
20
20
  attr_reader :user_valid
21
21
 
22
22
  class << self
23
+ def api_host=(host)
24
+ @api_host = host
25
+ end
26
+
27
+ def api_host
28
+ @api_host = DEFAULT_API_HOST if @api_host.nil?
29
+ return @api_host
30
+ end
31
+
23
32
  def default_config
24
33
  return {
25
34
  ssl: true,
@@ -91,7 +100,7 @@ class DocodocoJp
91
100
  return @connection ||= ->() {
92
101
  protocol = config[:ssl] ? "https" : "http"
93
102
  options = config[:ssl] ? { ssl: { verify: true } } : {}
94
- Faraday.new("#{protocol}://#{API_HOST}", options) do |builder|
103
+ Faraday.new("#{protocol}://#{DocodocoJp::api_host}", options) do |builder|
95
104
  builder.request :url_encoded
96
105
  builder.response :logger if config[:faraday_log]
97
106
  builder.adapter :net_http
@@ -9,7 +9,7 @@ require 'docodoco_jp'
9
9
  class DocodocoJp
10
10
  class CLI < Thor
11
11
  desc "search [IP_ADDRESS]", "Search target IP_ADDRESS infomation"
12
- def search(ipaddr)
12
+ def search(ipaddr = nil)
13
13
  $stdout.puts JSON.pretty_generate(client.search(ipaddr))
14
14
  end
15
15
 
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  class DocodocoJp
4
- VERSION = "0.1.2"
4
+ VERSION = "1.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docodoco_jp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi IKEGAMI
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2020-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.0'
19
+ version: '1.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
- version: '0.0'
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.9'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.9'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: hashie
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: 4.1.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: 4.1.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.0'
61
+ version: '5.14'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.0'
68
+ version: '5.14'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,38 +80,53 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rack
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '1.0'
103
+ version: '2.0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '1.0'
110
+ version: '2.0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rake
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - "~>"
115
+ - - ">="
102
116
  - !ruby/object:Gem::Version
103
- version: '10.0'
117
+ version: 12.3.3
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - "~>"
122
+ - - ">="
109
123
  - !ruby/object:Gem::Version
110
- version: '10.0'
124
+ version: 12.3.3
111
125
  description: Location service www.docodoco.jp API Client.
112
126
  email:
113
127
  - hiroshi.ikegami@magicdrive.jp
114
- executables: []
128
+ executables:
129
+ - docodoco_jp
115
130
  extensions: []
116
131
  extra_rdoc_files: []
117
132
  files:
@@ -123,10 +138,10 @@ files:
123
138
  - README.md
124
139
  - Rakefile
125
140
  - bin/console
126
- - bin/docodoco_jp
127
141
  - bin/setup
128
142
  - docodoco_jp.gemspec
129
- - fixtures/sample_api_key.yml
143
+ - exe/docodoco_jp
144
+ - fixtures/test_apikey.yml
130
145
  - lib/docodoco_jp.rb
131
146
  - lib/docodoco_jp/api_key_invalid.rb
132
147
  - lib/docodoco_jp/cli.rb
@@ -135,8 +150,7 @@ files:
135
150
  homepage: https://github.com/magicdrive/ruby-docodoco_jp
136
151
  licenses:
137
152
  - MIT
138
- metadata:
139
- allowed_push_host: https://rubygems.org
153
+ metadata: {}
140
154
  post_install_message:
141
155
  rdoc_options: []
142
156
  require_paths:
@@ -145,17 +159,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
159
  requirements:
146
160
  - - ">="
147
161
  - !ruby/object:Gem::Version
148
- version: '0'
162
+ version: 2.6.0
149
163
  required_rubygems_version: !ruby/object:Gem::Requirement
150
164
  requirements:
151
165
  - - ">="
152
166
  - !ruby/object:Gem::Version
153
167
  version: '0'
154
168
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 2.4.5
169
+ rubygems_version: 3.1.4
157
170
  signing_key:
158
171
  specification_version: 4
159
172
  summary: Location service www.docodoco.jp API Client.
160
173
  test_files: []
161
- has_rdoc:
@@ -1,2 +0,0 @@
1
- api_key1: "xxxxx"
2
- api_key2: "yyyyy"