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 +5 -5
- data/.travis.yml +7 -0
- data/README.md +3 -2
- data/docodoco_jp.gemspec +8 -14
- data/{bin → exe}/docodoco_jp +0 -0
- data/fixtures/test_apikey.yml +2 -0
- data/lib/docodoco_jp.rb +11 -2
- data/lib/docodoco_jp/cli.rb +1 -1
- data/lib/docodoco_jp/version.rb +1 -1
- metadata +37 -25
- data/fixtures/sample_api_key.yml +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 54262ca6cad6f7eb9fa5f16cc446a906de16230e273f9b2a8bbc5dbaa5e51cca
|
4
|
+
data.tar.gz: 7ff17647ca148aee0f4177c680020cdb5dc0dadd9fc81b6d95e0f83b914a0d69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b00dd321a59dd9bb683b810e3c45a448f40197db60b3fdb399ab8bb4e72625b61355ab7d036bc938dd41df54c6c3084ae46fb186e8bbf9dd59227a492d5a1ef7
|
7
|
+
data.tar.gz: e93d668510c8e8164edfb0f4d97f01c7e1bc93a3a4c9f297d189181d38a6cebd24cb236be9bf9dde77b8761a904c952add33a97d5baa2e44036d740ddd0ace29
|
data/.travis.yml
CHANGED
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 = "
|
40
|
-
apikey2 = "
|
40
|
+
apikey1 = "YOUR_APIKEY_1"
|
41
|
+
apikey2 = "YOUR_APIKEY_2"
|
41
42
|
|
42
43
|
options = {
|
43
44
|
ssl: false, # => default: true
|
data/docodoco_jp.gemspec
CHANGED
@@ -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",
|
31
|
-
spec.add_dependency "faraday", "~> 0
|
32
|
-
spec.add_dependency "hashie", "~>
|
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.
|
27
|
+
spec.add_development_dependency "minitest", "~> 5.14"
|
35
28
|
spec.add_development_dependency "pry"
|
36
|
-
spec.add_development_dependency "
|
37
|
-
spec.add_development_dependency "
|
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
|
data/{bin → exe}/docodoco_jp
RENAMED
File without changes
|
data/lib/docodoco_jp.rb
CHANGED
@@ -13,13 +13,22 @@ require 'rexml/document'
|
|
13
13
|
|
14
14
|
class DocodocoJp
|
15
15
|
|
16
|
-
|
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}://#{
|
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
|
data/lib/docodoco_jp/cli.rb
CHANGED
data/lib/docodoco_jp/version.rb
CHANGED
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.
|
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:
|
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: '
|
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: '
|
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
|
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
|
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:
|
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:
|
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.
|
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.
|
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: '
|
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: '
|
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:
|
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:
|
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
|
-
-
|
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:
|
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
|
-
|
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:
|
data/fixtures/sample_api_key.yml
DELETED