mirror of
https://github.com/dkam/paapi.git
synced 2025-12-28 15:14:52 +00:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70cdeef9ac | ||
|
|
00e6b251cc | ||
|
|
53ff78f635 | ||
|
|
b4ffb58592 | ||
|
|
2db1d64720 | ||
|
|
09e635fc6f | ||
|
|
9297799555 | ||
|
|
5d8fd3ffff | ||
|
|
bba10e75fa | ||
|
|
72b413a40e | ||
|
|
ae3577a9fc | ||
|
|
11694b567e | ||
|
|
a6a5cf45c3 | ||
|
|
761df379cf | ||
|
|
6105ea621c | ||
|
|
d09be5f131 | ||
|
|
7aebd186a5 | ||
|
|
e04d258b07 | ||
|
|
b66dda8d79 | ||
|
|
02057fb0d0 | ||
|
|
8c4f4337a3 | ||
|
|
316e71ee46 | ||
|
|
ba6a52ce9c | ||
|
|
747e76fe8f | ||
|
|
6115f72119 | ||
|
|
e47add0064 | ||
|
|
a86acb1ef9 | ||
|
|
8bd8ba1e84 | ||
|
|
706a9fb377 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,3 +1,14 @@
|
|||||||
|
## 0.1.9 (Unreleased)
|
||||||
|
- Fix bug allowing non-title case Request Parameters
|
||||||
|
- Add the required PartnerTag and PartnerType key values to the search body request
|
||||||
|
|
||||||
|
## 0.1.7
|
||||||
|
- Add gem 'net-http-persistent' for connection persistance
|
||||||
|
- Remove the code which would use other http clients if available
|
||||||
|
## 0.1.3
|
||||||
|
- Dropped the HTTP gem and moved to Ruby's Net::HTTP
|
||||||
|
- Merged a branch which adds the Condtion parameter.
|
||||||
|
|
||||||
## 0.1.2
|
## 0.1.2
|
||||||
- Use Contributor RoleType, rather than Role. RoleType uses lowercase, rather than capitalised.
|
- Use Contributor RoleType, rather than Role. RoleType uses lowercase, rather than capitalised.
|
||||||
|
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[](https://travis-ci.org/dkam/paapi)
|
[](https://travis-ci.org/dkam/paapi)
|
||||||
|
|
||||||
If this gem doesn't meet your needs, try the [Vacumm gem](https://github.com/hakanensari/vacuum).
|
If this gem doesn't meet your needs, try the [Vacuum gem](https://github.com/hakanensari/vacuum).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -87,6 +87,14 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|||||||
|
|
||||||
If you create a file `config.rb`, it will be loaded by `bin/console`, allowing you to configure keys and markets.
|
If you create a file `config.rb`, it will be loaded by `bin/console`, allowing you to configure keys and markets.
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
Paapi.configure do |config|
|
||||||
|
config.access_key = 'access_key'
|
||||||
|
config.secret_key = 'secret_key'
|
||||||
|
config.partner_market = {au: 'au_tag', us: 'us_tag', uk: 'uk_tag', ca: 'ca_tag_'}
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
require 'bundler/setup'
|
require 'bundler/setup'
|
||||||
require 'paapi'
|
#require 'paapi'
|
||||||
|
require './lib/paapi.rb'
|
||||||
|
|
||||||
# You can add fixtures and/or initialization code here to make experimenting
|
# You can add fixtures and/or initialization code here to make experimenting
|
||||||
# with your gem easier. You can also use a different console, if you like.
|
# with your gem easier. You can also use a different console, if you like.
|
||||||
|
|||||||
96
lib/paapi.rb
96
lib/paapi.rb
@@ -1,68 +1,70 @@
|
|||||||
require 'paapi/version'
|
require "paapi/version"
|
||||||
|
|
||||||
require 'paapi/client'
|
require "paapi/client"
|
||||||
require 'paapi/item'
|
require "paapi/item"
|
||||||
require 'paapi/listing'
|
require "paapi/listing"
|
||||||
require 'paapi/response'
|
require "paapi/response"
|
||||||
|
|
||||||
module Paapi
|
module Paapi
|
||||||
class Error < StandardError; end
|
class Error < StandardError; end
|
||||||
|
|
||||||
class NotImplemented < StandardError; end
|
class NotImplemented < StandardError; end
|
||||||
SEARCH_PARAMS = %i[keywords actor, artist, author, brand title].freeze
|
SEARCH_PARAMS = %w[Keywords Actor Artist Author Brand Title].freeze
|
||||||
DEFAULT_PARTNER_TYPE = 'Associates'
|
DEFAULT_PARTNER_TYPE = "Associates"
|
||||||
DEFAULT_MARKET = :us
|
DEFAULT_MARKET = :us
|
||||||
|
DEFAULT_CONDITION = "Any"
|
||||||
DEFAULT_RESOURCES = [
|
DEFAULT_RESOURCES = [
|
||||||
'Images.Primary.Large',
|
"Images.Primary.Large",
|
||||||
'ItemInfo.ByLineInfo',
|
"ItemInfo.ByLineInfo",
|
||||||
'ItemInfo.ContentInfo',
|
"ItemInfo.ContentInfo",
|
||||||
'ItemInfo.ExternalIds',
|
"ItemInfo.ExternalIds",
|
||||||
'ItemInfo.Features',
|
"ItemInfo.Features",
|
||||||
'ItemInfo.ManufactureInfo',
|
"ItemInfo.ManufactureInfo",
|
||||||
'ItemInfo.ProductInfo',
|
"ItemInfo.ProductInfo",
|
||||||
'ItemInfo.TechnicalInfo', # Includes format when Kindle
|
"ItemInfo.TechnicalInfo", # Includes format when Kindle
|
||||||
'ItemInfo.Title',
|
"ItemInfo.Title",
|
||||||
'ItemInfo.TradeInInfo',
|
"ItemInfo.TradeInInfo",
|
||||||
'Offers.Listings.Availability.Message',
|
"Offers.Listings.Availability.Message",
|
||||||
'Offers.Listings.Condition',
|
"Offers.Listings.Condition",
|
||||||
'Offers.Listings.Condition.SubCondition',
|
"Offers.Listings.Condition.SubCondition",
|
||||||
'Offers.Listings.DeliveryInfo.IsAmazonFulfilled',
|
"Offers.Listings.DeliveryInfo.IsAmazonFulfilled",
|
||||||
'Offers.Listings.DeliveryInfo.IsFreeShippingEligible',
|
"Offers.Listings.DeliveryInfo.IsFreeShippingEligible",
|
||||||
'Offers.Listings.DeliveryInfo.IsPrimeEligible',
|
"Offers.Listings.DeliveryInfo.IsPrimeEligible",
|
||||||
'Offers.Listings.MerchantInfo',
|
"Offers.Listings.MerchantInfo",
|
||||||
'Offers.Listings.Price',
|
"Offers.Listings.Price",
|
||||||
'Offers.Listings.SavingBasis'
|
"Offers.Listings.SavingBasis"
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
Locale = Struct.new(:key, :name, :host, :region) do
|
Locale = Struct.new(:key, :name, :host, :region) do
|
||||||
def site
|
def site
|
||||||
host.sub('webservices', 'www')
|
host.sub("webservices", "www")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
MARKETPLACES = {
|
MARKETPLACES = {
|
||||||
au: Locale.new(:au, 'Australia', 'webservices.amazon.com.au', 'us-west-2'),
|
au: Locale.new(:au, "Australia", "webservices.amazon.com.au", "us-west-2"),
|
||||||
br: Locale.new(:br, 'Brazil', 'webservices.amazon.com.br' 'us-east-1'),
|
br: Locale.new(:br, "Brazil", "webservices.amazon.com.br", "us-east-1"),
|
||||||
ca: Locale.new(:ca, 'Canada', 'webservices.amazon.ca', 'us-east-1'),
|
ca: Locale.new(:ca, "Canada", "webservices.amazon.ca", "us-east-1"),
|
||||||
fr: Locale.new(:fr, 'France', 'webservices.amazon.fr', 'eu-west-1'),
|
fr: Locale.new(:fr, "France", "webservices.amazon.fr", "eu-west-1"),
|
||||||
de: Locale.new(:de, 'Germany', 'webservices.amazon.de', 'eu-west-1'),
|
de: Locale.new(:de, "Germany", "webservices.amazon.de", "eu-west-1"),
|
||||||
in: Locale.new(:in, 'India', 'webservices.amazon.in', 'eu-west-1'),
|
in: Locale.new(:in, "India", "webservices.amazon.in", "eu-west-1"),
|
||||||
it: Locale.new(:it, 'Italy', 'webservices.amazon.it', 'eu-west-1'),
|
it: Locale.new(:it, "Italy", "webservices.amazon.it", "eu-west-1"),
|
||||||
jp: Locale.new(:jp, 'Japan', 'webservices.amazon.co.jp', 'us-west-2'),
|
jp: Locale.new(:jp, "Japan", "webservices.amazon.co.jp", "us-west-2"),
|
||||||
mx: Locale.new(:mx, 'Mexico', 'webservices.amazon.com.mx', 'us-east-1'),
|
mx: Locale.new(:mx, "Mexico", "webservices.amazon.com.mx", "us-east-1"),
|
||||||
es: Locale.new(:es, 'Spain', 'webservices.amazon.es', 'eu-west-1'),
|
es: Locale.new(:es, "Spain", "webservices.amazon.es", "eu-west-1"),
|
||||||
tr: Locale.new(:tk, 'Turkey', 'webservices.amazon.com.tr', 'eu-west-1'),
|
tr: Locale.new(:tk, "Turkey", "webservices.amazon.com.tr", "eu-west-1"),
|
||||||
ae: Locale.new(:ae, 'United Arab Emirates', 'webservices.amazon.ae', 'eu-west-1'),
|
ae: Locale.new(:ae, "United Arab Emirates", "webservices.amazon.ae", "eu-west-1"),
|
||||||
uk: Locale.new(:uk, 'United Kingdom', 'webservices.amazon.co.uk', 'eu-west-1'),
|
uk: Locale.new(:uk, "United Kingdom", "webservices.amazon.co.uk", "eu-west-1"),
|
||||||
us: Locale.new(:us, 'United States', 'webservices.amazon.com', 'us-east-1'),
|
us: Locale.new(:us, "United States", "webservices.amazon.com", "us-east-1")
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
Operation = Struct.new(:target_name, :endpoint_suffix, :http_method, :service)
|
Operation = Struct.new(:target_name, :endpoint_suffix, :http_method, :service)
|
||||||
|
|
||||||
OPERATIONS = {
|
OPERATIONS = {
|
||||||
get_browse_nodes: Operation.new( 'GetBrowseNodes', 'getbrowsenodes', 'POST', 'ProductAdvertisingAPI' ),
|
get_browse_nodes: Operation.new("GetBrowseNodes", "getbrowsenodes", "POST", "ProductAdvertisingAPI"),
|
||||||
get_items: Operation.new( 'GetItems', 'getitems', 'POST', 'ProductAdvertisingAPI' ),
|
get_items: Operation.new("GetItems", "getitems", "POST", "ProductAdvertisingAPI"),
|
||||||
get_variations: Operation.new( 'GetVariations', 'getvariations', 'POST', 'ProductAdvertisingAPI' ),
|
get_variations: Operation.new("GetVariations", "getvariations", "POST", "ProductAdvertisingAPI"),
|
||||||
search_items: Operation.new( 'SearchItems', 'searchitems', 'POST', 'ProductAdvertisingAPI' )
|
search_items: Operation.new("SearchItems", "searchitems", "POST", "ProductAdvertisingAPI")
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
@@ -72,6 +74,7 @@ module Paapi
|
|||||||
:partner_type,
|
:partner_type,
|
||||||
:market,
|
:market,
|
||||||
:partner_market,
|
:partner_market,
|
||||||
|
:condition,
|
||||||
:resources,
|
:resources,
|
||||||
:test_mode
|
:test_mode
|
||||||
|
|
||||||
@@ -83,7 +86,6 @@ module Paapi
|
|||||||
end
|
end
|
||||||
|
|
||||||
def symbolize_keys(hash)
|
def symbolize_keys(hash)
|
||||||
Hash[hash.map{|k,v| v.is_a?(Hash) ? [k.to_sym, symbolize_keys(v)] : [k.to_sym, v] }]
|
hash.map { |k, v| v.is_a?(Hash) ? [k.to_sym, symbolize_keys(v)] : [k.to_sym, v] }.to_h
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,40 +1,47 @@
|
|||||||
require 'http'
|
require "net/http/persistent"
|
||||||
require 'aws-sigv4'
|
require "aws-sigv4"
|
||||||
|
|
||||||
module Paapi
|
module Paapi
|
||||||
class Client
|
class Client
|
||||||
|
attr_accessor :partner_tag, :marketplace, :resources, :condition
|
||||||
|
attr_reader :partner_type, :access_key, :secret_key, :market, :http
|
||||||
|
|
||||||
attr_accessor :partner_tag, :marketplace, :resources
|
def initialize(
|
||||||
attr_reader :partner_type, :access_key, :secret_key, :market
|
access_key: Paapi.access_key,
|
||||||
|
|
||||||
def initialize(access_key: Paapi.access_key,
|
|
||||||
secret_key: Paapi.secret_key,
|
secret_key: Paapi.secret_key,
|
||||||
partner_tag: Paapi.partner_tag,
|
partner_tag: Paapi.partner_tag,
|
||||||
market: Paapi.market || DEFAULT_MARKET,
|
market: Paapi.market || DEFAULT_MARKET,
|
||||||
|
condition: Paapi.condition || DEFAULT_CONDITION,
|
||||||
resources: Paapi.resources || DEFAULT_RESOURCES,
|
resources: Paapi.resources || DEFAULT_RESOURCES,
|
||||||
partner_type: DEFAULT_PARTNER_TYPE
|
partner_type: DEFAULT_PARTNER_TYPE
|
||||||
)
|
)
|
||||||
raise ArgumentError unless MARKETPLACES.keys.include?(market.to_sym)
|
raise ArgumentError unless MARKETPLACES.key?(market.to_sym)
|
||||||
|
|
||||||
@access_key = access_key
|
@access_key = access_key
|
||||||
@secret_key = secret_key
|
@secret_key = secret_key
|
||||||
@partner_type = partner_type
|
@partner_type = partner_type
|
||||||
@resources = resources unless resources.nil?
|
@resources = resources unless resources.nil?
|
||||||
|
@condition = condition
|
||||||
self.market = market
|
self.market = market
|
||||||
@partner_tag = partner_tag if !partner_tag.nil?
|
@partner_tag = partner_tag if !partner_tag.nil?
|
||||||
|
|
||||||
|
@http = Net::HTTP::Persistent.new(name: "paapi").tap do |c|
|
||||||
|
c.open_timeout = 2
|
||||||
|
c.read_timeout = 5
|
||||||
|
c.write_timeout = 5
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def market=(a_market)
|
def market=(a_market)
|
||||||
@market = a_market
|
@market = a_market
|
||||||
@marketplace = MARKETPLACES[market.to_sym]
|
@marketplace = MARKETPLACES[market.to_sym]
|
||||||
if !Paapi.partner_market.nil?
|
return if Paapi.partner_market.nil?
|
||||||
@partner_tag = Paapi.partner_market.dig(a_market.to_sym) || @partner_tag
|
|
||||||
end
|
@partner_tag = Paapi.partner_market[a_market.to_sym] || @partner_tag
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_items(item_ids:, **options)
|
def get_items(item_ids:, **options)
|
||||||
payload = { ItemIds: Array(item_ids), Resources: @resources }.merge(options)
|
payload = {PartnerTag: partner_tag, PartnerType: "Associates", ItemIds: Array(item_ids), Resources: @resources}.merge(options)
|
||||||
request(op: :get_items, payload: payload)
|
request(op: :get_items, payload: payload)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -43,13 +50,14 @@ module Paapi
|
|||||||
request(op: :get_variations, payload: payload)
|
request(op: :get_variations, payload: payload)
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: Currently we assume Keywords, but we need one of the follow: [Keywords Actor Artist Author Brand Title ]
|
# TODO: Currently we assume Keywords, but we need one of the following: [Keywords Actor Artist Author Brand Title ]
|
||||||
def search_items(keywords: nil, **options )
|
def search_items(**options)
|
||||||
raise ArgumentError("Missing keywords") unless (options.keys | SEARCH_PARAMS).length.positive?
|
options.transform_keys!(&:to_s)
|
||||||
|
raise ArgumentError.new("Missing keywords") unless (options.keys & SEARCH_PARAMS).length.positive?
|
||||||
|
|
||||||
search_index = options.dig(:SearchIndex) ||'All'
|
search_index = options.dig(:SearchIndex) || "All"
|
||||||
|
|
||||||
payload = { Keywords: keywords, Resources: @resources, ItemCount: 10, ItemPage: 1, SearchIndex: search_index }.merge(options)
|
payload = {"PartnerTag" => partner_tag, "PartnerType" => "Associates", "Resources" => @resources, "ItemCount" => 10, "ItemPage" => 1, "SearchIndex" => search_index}.merge(options)
|
||||||
|
|
||||||
request(op: :search_items, payload: payload)
|
request(op: :search_items, payload: payload)
|
||||||
end
|
end
|
||||||
@@ -62,19 +70,20 @@ module Paapi
|
|||||||
private
|
private
|
||||||
|
|
||||||
def request(op:, payload:)
|
def request(op:, payload:)
|
||||||
raise ArguemntError unless Paapi::OPERATIONS.keys.include?(op)
|
raise ArguemntError unless Paapi::OPERATIONS.key?(op)
|
||||||
|
|
||||||
operation = OPERATIONS[op]
|
operation = OPERATIONS[op]
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
'X-Amz-Target' => "com.amazon.paapi5.v1.ProductAdvertisingAPIv1.#{operation.target_name}",
|
"X-Amz-Target" => "com.amazon.paapi5.v1.ProductAdvertisingAPIv1.#{operation.target_name}",
|
||||||
'Content-Encoding' => 'amz-1.0',
|
"Content-Encoding" => "amz-1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
default_payload = {
|
default_payload = {
|
||||||
'PartnerTag' => partner_tag,
|
"Condition" => condition,
|
||||||
'PartnerType' => partner_type,
|
"PartnerTag" => partner_tag,
|
||||||
'Marketplace' => marketplace.site
|
"PartnerType" => partner_type,
|
||||||
|
"Marketplace" => marketplace.site
|
||||||
}
|
}
|
||||||
|
|
||||||
payload = default_payload.merge(payload)
|
payload = default_payload.merge(payload)
|
||||||
@@ -92,15 +101,25 @@ module Paapi
|
|||||||
|
|
||||||
signature = signer.sign_request(http_method: operation.http_method, url: endpoint, headers: headers, body: payload.to_json)
|
signature = signer.sign_request(http_method: operation.http_method, url: endpoint, headers: headers, body: payload.to_json)
|
||||||
|
|
||||||
headers['Host'] = marketplace.host
|
headers["Host"] = marketplace.host
|
||||||
headers['X-Amz-Date'] = signature.headers['x-amz-date']
|
headers["X-Amz-Date"] = signature.headers["x-amz-date"]
|
||||||
headers['X-Amz-Content-Sha256']= signature.headers['x-amz-content-sha256']
|
headers["X-Amz-Content-Sha256"] = signature.headers["x-amz-content-sha256"]
|
||||||
headers['Authorization'] = signature.headers['authorization']
|
headers["Authorization"] = signature.headers["authorization"]
|
||||||
headers['Content-Type'] = 'application/json; charset=utf-8'
|
headers["Content-Type"] = "application/json; charset=utf-8"
|
||||||
|
|
||||||
Response.new( HTTP.headers(headers).post(endpoint, json: payload ) )
|
Response.new(post(url: endpoint, body: payload, headers: headers))
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def post(url:, body:, headers:)
|
||||||
|
uri = URI.parse(url)
|
||||||
|
|
||||||
|
post_request = Net::HTTP::Post.new(uri.path)
|
||||||
|
post_request.content_type = "application/json; charset=UTF-8"
|
||||||
|
|
||||||
|
headers.each { |k, v| post_request[k] = v }
|
||||||
|
post_request.body = body.to_json
|
||||||
|
|
||||||
|
http.request uri, post_request
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -128,22 +128,22 @@ module Paapi
|
|||||||
|
|
||||||
def height
|
def height
|
||||||
data = get(%w{ItemInfo ProductInfo ItemDimensions Height})
|
data = get(%w{ItemInfo ProductInfo ItemDimensions Height})
|
||||||
[data.dig('DisplayValue'), data.dig('Unit')].join(' ')
|
[data&.dig('DisplayValue'), data&.dig('Unit')].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def length
|
def length
|
||||||
data = get(%w{ItemInfo ProductInfo ItemDimensions Length})
|
data = get(%w{ItemInfo ProductInfo ItemDimensions Length})
|
||||||
[data.dig('DisplayValue'), data.dig('Unit')].join(' ')
|
[data&.dig('DisplayValue'), data&.dig('Unit')].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def width
|
def width
|
||||||
data = get(%w{ItemInfo ProductInfo ItemDimensions Width})
|
data = get(%w{ItemInfo ProductInfo ItemDimensions Width})
|
||||||
[data.dig('DisplayValue'), data.dig('Unit')].join(' ')
|
[data&.dig('DisplayValue'), data&.dig('Unit')].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def weight
|
def weight
|
||||||
data = get(%w{ItemInfo ProductInfo ItemDimensions Weight})
|
data = get(%w{ItemInfo ProductInfo ItemDimensions Weight})
|
||||||
[data.dig('DisplayValue'), data.dig('Unit')].join(' ')
|
[data&.dig('DisplayValue'), data&.dig('Unit')].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def kindle?
|
def kindle?
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Paapi
|
module Paapi
|
||||||
VERSION = '0.1.2'
|
VERSION = '0.1.10'
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|||||||
|
|
||||||
spec.metadata['homepage_uri'] = spec.homepage
|
spec.metadata['homepage_uri'] = spec.homepage
|
||||||
spec.metadata['source_code_uri'] = spec.homepage
|
spec.metadata['source_code_uri'] = spec.homepage
|
||||||
#spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
spec.metadata["changelog_uri"] = "https://github.com/dkam/paapi/blob/master/CHANGELOG.md"
|
||||||
|
|
||||||
# Specify which files should be added to the gem when it is released.
|
# Specify which files should be added to the gem when it is released.
|
||||||
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
||||||
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
|
|||||||
spec.add_development_dependency 'rake', '>= 12.3.r3'
|
spec.add_development_dependency 'rake', '>= 12.3.r3'
|
||||||
spec.add_development_dependency 'minitest', '~> 5.0'
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
||||||
spec.add_development_dependency 'byebug', '~> 11'
|
spec.add_development_dependency 'byebug', '~> 11'
|
||||||
spec.add_development_dependency 'awesome_print', '~> 1.8'
|
spec.add_development_dependency 'standard'
|
||||||
|
|
||||||
spec.add_dependency 'http', '~> 4'
|
|
||||||
spec.add_dependency 'aws-sigv4', '~> 1'
|
spec.add_dependency 'aws-sigv4', '~> 1'
|
||||||
|
spec.add_dependency 'net-http-persistent', '~> 4.0', '>= 4.0.1'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user