idcf-your 0.1.0
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 +7 -0
- data/.codeclimate.yml +19 -0
- data/.gitignore +15 -0
- data/.pryrc +4 -0
- data/.rspec +2 -0
- data/.rubocop.yml +18 -0
- data/.travis.yml +5 -0
- data/Gemfile +10 -0
- data/LICENSE.txt +21 -0
- data/README.md +78 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/idcf-your.gemspec +40 -0
- data/lib/idcf/your/client.rb +75 -0
- data/lib/idcf/your/client_extensions/billing.rb +110 -0
- data/lib/idcf/your/client_extensions.rb +11 -0
- data/lib/idcf/your/errors.rb +8 -0
- data/lib/idcf/your/request.rb +42 -0
- data/lib/idcf/your/response.rb +71 -0
- data/lib/idcf/your/version.rb +7 -0
- data/lib/idcf/your.rb +19 -0
- metadata +219 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e5a6f1d89c02e43c678a1fae1c3554a2695426a3
|
4
|
+
data.tar.gz: e016f4fe60435ba9d83706ccbead5c9fa15fa253
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7862b2802dd7e23897cf4400f72caaf9e2dd8e17a5b1aec1fed45ead9934c899ba90f9ab42b6c8336a471ffe3455afd1b8e2f5f84ae04d48f376f3a7d97272fb
|
7
|
+
data.tar.gz: 626ced5f8680fea567839a7c6aa3e40a70d20d6a5dd23d24db39af4d5a1a4b5822396ca75cc12e81b560a516a678651be1d75a4f473dbc543c108cbc34a4becb
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
engines:
|
3
|
+
duplication:
|
4
|
+
enabled: true
|
5
|
+
exclude_paths:
|
6
|
+
- spec/
|
7
|
+
config:
|
8
|
+
languages:
|
9
|
+
- ruby
|
10
|
+
fixme:
|
11
|
+
enabled: true
|
12
|
+
rubocop:
|
13
|
+
enabled: true
|
14
|
+
ratings:
|
15
|
+
paths:
|
16
|
+
- Gemfile.lock
|
17
|
+
- "**.rb"
|
18
|
+
exclude_paths:
|
19
|
+
- vendor/
|
data/.gitignore
ADDED
data/.pryrc
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "vendor/**/*"
|
4
|
+
TargetRubyVersion: 2.4
|
5
|
+
|
6
|
+
Style/BlockComments:
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
Style/AsciiComments:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
Style/StringLiterals:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Metrics/BlockLength:
|
16
|
+
Exclude:
|
17
|
+
- "idcf-your.gemspec"
|
18
|
+
- "spec/**/*"
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 IDC Frontier Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# Idcf::Your
|
2
|
+
[](https://codeclimate.com/github/idcf/idcf-your-ruby)
|
3
|
+
[](https://codeclimate.com/github/idcf/idcf-your-ruby)
|
4
|
+
|
5
|
+
A Ruby client for [IDCF Cloud Your API](http://docs.idcf.jp/cloud/billing/)
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'idcf-your'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install idcf-your
|
22
|
+
|
23
|
+
## Dependencies
|
24
|
+
|
25
|
+
* Ruby 1.9.3 or higher
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
### Basic usage
|
29
|
+
#### Client
|
30
|
+
```ruby
|
31
|
+
require 'idcf/your'
|
32
|
+
|
33
|
+
client =
|
34
|
+
Idcf::Your::Client.new(
|
35
|
+
api_key: ENV['IDCF_API_KEY'],
|
36
|
+
secret_key: ENV['IDCF_SECRET_KEY']
|
37
|
+
)
|
38
|
+
|
39
|
+
# Call GET request directly
|
40
|
+
# returns Response object
|
41
|
+
response = client.get('billings/history')
|
42
|
+
response.success? #=> true
|
43
|
+
response.status #=> 200
|
44
|
+
|
45
|
+
# Response#body returns HTTP response body as a hash or an array
|
46
|
+
response.body #=> [meta, data[...]]
|
47
|
+
response.body["data"][0] #=> ["month": "2017-07", "billing_amount": 58709, "payment_status": 3]
|
48
|
+
|
49
|
+
# Response#[] is alias to Response#body[]
|
50
|
+
response["data"][0] #=> ["month": "2017-07", "billing_amount": 58709, "payment_status": 3]
|
51
|
+
```
|
52
|
+
|
53
|
+
### Payment history
|
54
|
+
```ruby
|
55
|
+
client.get('billings/history')
|
56
|
+
client.list_billing_history
|
57
|
+
```
|
58
|
+
|
59
|
+
### Bills
|
60
|
+
```ruby
|
61
|
+
client.get('billings/2017-07')
|
62
|
+
client.list_billing_detail('2017-07')
|
63
|
+
```
|
64
|
+
|
65
|
+
## Development
|
66
|
+
|
67
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
68
|
+
|
69
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
70
|
+
|
71
|
+
## Contributing
|
72
|
+
|
73
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/idcf/idcf-your-ruby.
|
74
|
+
|
75
|
+
|
76
|
+
## License
|
77
|
+
|
78
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'idcf/your'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
require 'pry'
|
12
|
+
Pry.start
|
13
|
+
|
14
|
+
# require 'irb'
|
15
|
+
# IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/idcf-your.gemspec
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'idcf/your/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'idcf-your'
|
9
|
+
spec.version = Idcf::Your::VERSION
|
10
|
+
spec.authors = ['IDC Frontier Inc.']
|
11
|
+
|
12
|
+
spec.summary = 'A Ruby client for IDCF Cloud Your API Service.'
|
13
|
+
# spec.description = ''
|
14
|
+
spec.homepage = 'https://www.idcf.jp/english/cloud/'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = 'exe'
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
spec.metadata['yard.run'] = 'yri'
|
25
|
+
|
26
|
+
spec.add_runtime_dependency 'activesupport'
|
27
|
+
spec.add_runtime_dependency 'faraday'
|
28
|
+
spec.add_runtime_dependency 'faraday_middleware'
|
29
|
+
spec.add_runtime_dependency 'faraday-cookie_jar'
|
30
|
+
|
31
|
+
spec.add_development_dependency 'bundler', '~> 1.14'
|
32
|
+
spec.add_development_dependency 'yard'
|
33
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
34
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
35
|
+
spec.add_development_dependency 'simplecov'
|
36
|
+
spec.add_development_dependency 'pry'
|
37
|
+
spec.add_development_dependency 'awesome_print'
|
38
|
+
|
39
|
+
spec.required_ruby_version = '>= 1.9.3'
|
40
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'faraday'
|
4
|
+
require 'faraday_middleware'
|
5
|
+
require 'faraday-cookie_jar'
|
6
|
+
require 'idcf/faraday_middleware'
|
7
|
+
|
8
|
+
module Idcf
|
9
|
+
module Your
|
10
|
+
# Your API Client
|
11
|
+
class Client
|
12
|
+
include ClientExtensions::Billing
|
13
|
+
|
14
|
+
attr_reader :api_key, :secret_key, :host, :endpoint, :verify_ssl
|
15
|
+
|
16
|
+
def initialize(api_key:, secret_key:, host: 'your.idcfcloud.com',
|
17
|
+
endpoint: '/api/v1', verify_ssl: true)
|
18
|
+
@api_key = api_key
|
19
|
+
@secret_key = secret_key
|
20
|
+
@host = host
|
21
|
+
@endpoint = endpoint
|
22
|
+
@verify_ssl = verify_ssl
|
23
|
+
Faraday::Request.register_middleware(
|
24
|
+
signature: Idcf::FaradayMiddleware::Signature
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
def connection
|
29
|
+
@connection ||=
|
30
|
+
Faraday.new(url: url_prefix, ssl: ssl_options) do |faraday|
|
31
|
+
faraday.request :json
|
32
|
+
faraday.request :signature, api_key: api_key, secret_key: secret_key
|
33
|
+
faraday.response :json
|
34
|
+
faraday.use :cookie_jar
|
35
|
+
faraday.adapter Faraday.default_adapter
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def get(resource, parameters = {}, headers = {})
|
40
|
+
send 'get', resource, parameters, headers
|
41
|
+
end
|
42
|
+
|
43
|
+
def get!(resource, parameters = {}, headers = {})
|
44
|
+
send! 'get', resource, parameters, headers
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def send(method, resource, parameters = {}, headers = {})
|
50
|
+
Request.new(self, method, resource, parameters, headers).send
|
51
|
+
end
|
52
|
+
|
53
|
+
def send!(method, resource, parameters = {}, headers = {})
|
54
|
+
response = send(method, resource, parameters, headers)
|
55
|
+
unless response.success?
|
56
|
+
raise(
|
57
|
+
ApiError,
|
58
|
+
"HTTP status code: #{response.status}, " \
|
59
|
+
"Error message: #{response.message}, " \
|
60
|
+
"Reference: #{response.reference}"
|
61
|
+
)
|
62
|
+
end
|
63
|
+
response
|
64
|
+
end
|
65
|
+
|
66
|
+
def ssl_options
|
67
|
+
{ verify: verify_ssl }
|
68
|
+
end
|
69
|
+
|
70
|
+
def url_prefix
|
71
|
+
"https://#{host}"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Idcf
|
4
|
+
module Your
|
5
|
+
module ClientExtensions
|
6
|
+
# For Billing API
|
7
|
+
module Billing
|
8
|
+
# List payment history.
|
9
|
+
#
|
10
|
+
# @param parameters [Hash] HTTP request query string
|
11
|
+
# @param headers [Hash] HTTP request headers
|
12
|
+
# @return [Response] HTTP response object
|
13
|
+
# @example
|
14
|
+
# response =
|
15
|
+
# client.list_payment_history(
|
16
|
+
# '2017-07'
|
17
|
+
# )
|
18
|
+
#
|
19
|
+
# response.body #=>
|
20
|
+
# {
|
21
|
+
# "meta" => {
|
22
|
+
# "account_id" => "71000000000",
|
23
|
+
# "updated_at" => "2017-07-19T00:53:27+09:00"
|
24
|
+
# },
|
25
|
+
# "data" => [
|
26
|
+
# {
|
27
|
+
# "month" => "2017-07",
|
28
|
+
# "billing_amount" => 58709,
|
29
|
+
# "payment_status" => 3
|
30
|
+
# },
|
31
|
+
# {
|
32
|
+
# "month" => "2017-07",
|
33
|
+
# "billing_amount" => 58709,
|
34
|
+
# "payment_status" => 3
|
35
|
+
# }
|
36
|
+
# ]
|
37
|
+
# }
|
38
|
+
#
|
39
|
+
def list_billing_history(parameters = {}, headers = {})
|
40
|
+
get! "/billings/history", parameters, headers
|
41
|
+
end
|
42
|
+
|
43
|
+
# List payment monthly detail.
|
44
|
+
#
|
45
|
+
# @param month [String] Settlement month (required)
|
46
|
+
# (YYYY-MM)
|
47
|
+
# @param parameters [Hash] HTTP request query string
|
48
|
+
# @param headers [Hash] HTTP request headers
|
49
|
+
# @return [Response] HTTP response object
|
50
|
+
# @example
|
51
|
+
# response =
|
52
|
+
# client.list_payment_history(
|
53
|
+
# '2017-07'
|
54
|
+
# )
|
55
|
+
#
|
56
|
+
# response.body #=>
|
57
|
+
# {
|
58
|
+
# "meta": {
|
59
|
+
# "account_id": "7100000000",
|
60
|
+
# "taxable_amount": 2791,
|
61
|
+
# "tax": 215,
|
62
|
+
# "total": 0,
|
63
|
+
# "updated_at": "2017-07-19T02:12:30+09:00",
|
64
|
+
# "billing_period_start_at": "2017-07-01",
|
65
|
+
# "billing_period_end_at": "2017-07-18",
|
66
|
+
# "invoice_no": null
|
67
|
+
# },
|
68
|
+
# "data": [{
|
69
|
+
# "Region": "jp-east",
|
70
|
+
# "ServiceName": "Cloud Computing",
|
71
|
+
# "ZoneName": "pascal",
|
72
|
+
# "Category": "VirtualMachine",
|
73
|
+
# "Menu": "light.S1",
|
74
|
+
# "ResourceDisplayName": "VM-6cfbf5b5-e7e1-44d8-aa5d-c3d8246d3",
|
75
|
+
# "StartDate": "2017-07-06",
|
76
|
+
# "EndDate": "2017-07-14",
|
77
|
+
# "Usage": 0.26277834177017,
|
78
|
+
# "Allocated": 184.31944513321,
|
79
|
+
# "Running": 0.26277834177017,
|
80
|
+
# "Stopped": 184.05666679144,
|
81
|
+
# "Amount": 0,
|
82
|
+
# "Tax": 0,
|
83
|
+
# "Net": 0
|
84
|
+
# },
|
85
|
+
# {
|
86
|
+
# "Region": "jp-east",
|
87
|
+
# "ServiceName": "Cloud Computing",
|
88
|
+
# "ZoneName": "pascal",
|
89
|
+
# "Category": "VirtualMachine",
|
90
|
+
# "Menu": "light.S1",
|
91
|
+
# "ResourceDisplayName": "VM-73e1df36-a9a3-4519-b40e-4679bf03e",
|
92
|
+
# "StartDate": "2017-07-06",
|
93
|
+
# "EndDate": "2017-07-14",
|
94
|
+
# "Usage": 184.09611105919,
|
95
|
+
# "Allocated": 184.18222308159,
|
96
|
+
# "Running": 184.09611105919,
|
97
|
+
# "Stopped": 0.086112022399902,
|
98
|
+
# "Amount": 73,
|
99
|
+
# "Tax": 5,
|
100
|
+
# "Net": 78
|
101
|
+
# }]
|
102
|
+
# }
|
103
|
+
#
|
104
|
+
def list_billing_detail(month, parameters = {}, headers = {})
|
105
|
+
get! "/billings/#{month}", parameters, headers
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Idcf
|
4
|
+
module Your
|
5
|
+
# Send HTTP request
|
6
|
+
class Request
|
7
|
+
attr_reader :client, :method, :resource, :parameters, :headers
|
8
|
+
|
9
|
+
# @private
|
10
|
+
def initialize(client, method, resource, parameters, headers)
|
11
|
+
@client = client
|
12
|
+
@method = method
|
13
|
+
@resource = resource
|
14
|
+
@parameters = parameters
|
15
|
+
@headers = headers
|
16
|
+
end
|
17
|
+
|
18
|
+
# @private
|
19
|
+
def send
|
20
|
+
Response.new(
|
21
|
+
client.connection.send(
|
22
|
+
method,
|
23
|
+
path,
|
24
|
+
parameters,
|
25
|
+
req_headers
|
26
|
+
)
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def req_headers
|
33
|
+
ua = { 'User-Agent': "IDCF Your API Client v#{VERSION}" }
|
34
|
+
ua.merge(headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
def path
|
38
|
+
"#{client.endpoint}/#{resource}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "forwardable"
|
4
|
+
|
5
|
+
module Idcf
|
6
|
+
module Your
|
7
|
+
# HTTP response
|
8
|
+
class Response
|
9
|
+
extend Forwardable
|
10
|
+
|
11
|
+
# @!attribute [r] body
|
12
|
+
# @return [Hash, Array, nil] response body as a hash,
|
13
|
+
# an array of hashes or nil.
|
14
|
+
# @!attribute [r] headers
|
15
|
+
# @return [Hash] HTTP response headers
|
16
|
+
# @!attribute [r] status
|
17
|
+
# @return [Integer] HTTP status code
|
18
|
+
attr_reader :body, :headers, :status
|
19
|
+
|
20
|
+
# @param faraday_response [Faraday::Response]
|
21
|
+
def initialize(response)
|
22
|
+
@body = response.body
|
23
|
+
@headers = response.headers
|
24
|
+
@status = response.status
|
25
|
+
end
|
26
|
+
|
27
|
+
def_delegator :@body, :[]
|
28
|
+
|
29
|
+
# Returns error message.
|
30
|
+
# When request succeed, this returns nil.
|
31
|
+
#
|
32
|
+
# @return [String] API error message
|
33
|
+
def message
|
34
|
+
if success?
|
35
|
+
nil
|
36
|
+
else
|
37
|
+
body ? self["message"] : "Resource not found."
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns error reference.
|
42
|
+
# When request succeed, this returns nil.
|
43
|
+
#
|
44
|
+
# @return [String] API error reference
|
45
|
+
def reference
|
46
|
+
if success?
|
47
|
+
nil
|
48
|
+
else
|
49
|
+
body ? self["reference"] : "No reference"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Returns an array of resource hashes.
|
54
|
+
#
|
55
|
+
# @return [Array<Hash>] an array of resource hashes
|
56
|
+
def resources
|
57
|
+
body && [*body]
|
58
|
+
end
|
59
|
+
|
60
|
+
# @return [Boolean] request success?
|
61
|
+
def success?
|
62
|
+
status < 400
|
63
|
+
end
|
64
|
+
|
65
|
+
# @return [String] UUID of a resource
|
66
|
+
def uuid
|
67
|
+
body.is_a?(Hash) && body.key?("uuid") ? self["uuid"] : nil
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
data/lib/idcf/your.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support'
|
4
|
+
require 'active_support/core_ext/class/attribute'
|
5
|
+
require 'active_support/dependencies/autoload'
|
6
|
+
|
7
|
+
require 'idcf/your/version'
|
8
|
+
require 'idcf/your/errors'
|
9
|
+
|
10
|
+
module Idcf
|
11
|
+
# Your API Library
|
12
|
+
module Your
|
13
|
+
extend ActiveSupport::Autoload
|
14
|
+
autoload :Client, 'idcf/your/client'
|
15
|
+
autoload :ClientExtensions, 'idcf/your/client_extensions'
|
16
|
+
autoload :Request, 'idcf/your/request'
|
17
|
+
autoload :Response, 'idcf/your/response'
|
18
|
+
end
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: idcf-your
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- IDC Frontier Inc.
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday_middleware
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: faraday-cookie_jar
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.14'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.14'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: yard
|
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'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '10.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '10.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: awesome_print
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description:
|
168
|
+
email:
|
169
|
+
executables: []
|
170
|
+
extensions: []
|
171
|
+
extra_rdoc_files: []
|
172
|
+
files:
|
173
|
+
- ".codeclimate.yml"
|
174
|
+
- ".gitignore"
|
175
|
+
- ".pryrc"
|
176
|
+
- ".rspec"
|
177
|
+
- ".rubocop.yml"
|
178
|
+
- ".travis.yml"
|
179
|
+
- Gemfile
|
180
|
+
- LICENSE.txt
|
181
|
+
- README.md
|
182
|
+
- Rakefile
|
183
|
+
- bin/console
|
184
|
+
- bin/setup
|
185
|
+
- idcf-your.gemspec
|
186
|
+
- lib/idcf/your.rb
|
187
|
+
- lib/idcf/your/client.rb
|
188
|
+
- lib/idcf/your/client_extensions.rb
|
189
|
+
- lib/idcf/your/client_extensions/billing.rb
|
190
|
+
- lib/idcf/your/errors.rb
|
191
|
+
- lib/idcf/your/request.rb
|
192
|
+
- lib/idcf/your/response.rb
|
193
|
+
- lib/idcf/your/version.rb
|
194
|
+
homepage: https://www.idcf.jp/english/cloud/
|
195
|
+
licenses:
|
196
|
+
- MIT
|
197
|
+
metadata:
|
198
|
+
yard.run: yri
|
199
|
+
post_install_message:
|
200
|
+
rdoc_options: []
|
201
|
+
require_paths:
|
202
|
+
- lib
|
203
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: 1.9.3
|
208
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '0'
|
213
|
+
requirements: []
|
214
|
+
rubyforge_project:
|
215
|
+
rubygems_version: 2.6.8
|
216
|
+
signing_key:
|
217
|
+
specification_version: 4
|
218
|
+
summary: A Ruby client for IDCF Cloud Your API Service.
|
219
|
+
test_files: []
|