blupee 0.1.6 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bloopi.rb +28 -0
- data/lib/{blupee → bloopi}/api/auth.rb +12 -12
- data/lib/{blupee → bloopi}/api/ether.rb +17 -4
- data/lib/{blupee → bloopi}/api/omise_go.rb +3 -3
- data/lib/{blupee → bloopi}/api/token.rb +3 -3
- data/lib/{blupee → bloopi}/configuration.rb +3 -3
- data/lib/{blupee → bloopi}/errors.rb +6 -6
- data/lib/{blupee → bloopi}/http_service.rb +10 -10
- data/lib/{blupee → bloopi}/http_service/request.rb +7 -7
- data/lib/{blupee → bloopi}/http_service/response.rb +3 -3
- data/lib/bloopi/version.rb +3 -0
- metadata +49 -49
- data/lib/blupee.rb +0 -28
- data/lib/blupee/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94b63771aa33b10a21f24da9953482e715af0906
|
4
|
+
data.tar.gz: b93e58112c59a6f4aca81239cd84973876e4194a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e7801fe0889bebb21216fdd45828a2e84e2f7e0fa83654077c18869a1b686299e151e82ed28524186d75f2eedd2adaaa548a6f3050a2134228f1a8dd47ee046
|
7
|
+
data.tar.gz: 96a01191d2e70e2e725f3b65a4dc01c727076140f485f1de5a78f23a77aa9b31085604f99777fd3dc5756b1e7794bee5fa6921ac376569898e168d7a7e0a2104
|
data/lib/bloopi.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative "bloopi/version"
|
2
|
+
require_relative 'bloopi/errors'
|
3
|
+
require_relative "bloopi/configuration"
|
4
|
+
require_relative "bloopi/http_service"
|
5
|
+
require_relative "bloopi/http_service/request"
|
6
|
+
require_relative "bloopi/http_service/response"
|
7
|
+
require_relative "bloopi/api/auth"
|
8
|
+
require_relative "bloopi/api/ether"
|
9
|
+
require_relative "bloopi/api/omise_go"
|
10
|
+
require_relative "bloopi/api/token"
|
11
|
+
|
12
|
+
module Bloopi
|
13
|
+
|
14
|
+
class << self
|
15
|
+
def configure
|
16
|
+
yield config
|
17
|
+
end
|
18
|
+
|
19
|
+
# See Bloopi::Configuration.
|
20
|
+
def config
|
21
|
+
@config ||= Configuration.new
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.make_request(path, args, verb, options = {})
|
26
|
+
HTTPService.make_request(HTTPService::Request.new(path: path, args: args, verb: verb, options: options))
|
27
|
+
end
|
28
|
+
end
|
@@ -2,34 +2,34 @@
|
|
2
2
|
require 'openssl'
|
3
3
|
require 'base64'
|
4
4
|
|
5
|
-
module
|
5
|
+
module Bloopi
|
6
6
|
module API
|
7
7
|
class Auth
|
8
8
|
attr_reader :client_id, :client_secret
|
9
9
|
|
10
10
|
# Creates a new client.
|
11
11
|
#
|
12
|
-
# @param client_id [String, Integer] a
|
13
|
-
# @param client_secret a
|
12
|
+
# @param client_id [String, Integer] a Bloopi client ID
|
13
|
+
# @param client_secret a Bloopi client secret
|
14
14
|
def initialize(client_id = nil, client_secret = nil)
|
15
|
-
@client_id = client_id ||
|
16
|
-
@client_secret = client_secret ||
|
15
|
+
@client_id = client_id || Bloopi.config.client_id
|
16
|
+
@client_secret = client_secret || Bloopi.config.client_secret
|
17
17
|
end
|
18
18
|
|
19
19
|
# access tokens
|
20
20
|
|
21
|
-
# Fetches an access token, token expiration, and other info from
|
21
|
+
# Fetches an access token, token expiration, and other info from Bloopi.
|
22
22
|
# Useful when you've received an OAuth code using the server-side authentication process.
|
23
23
|
# @see url_for_oauth_code
|
24
24
|
#
|
25
25
|
# @note (see #url_for_oauth_code)
|
26
26
|
#
|
27
27
|
# @param code (see #url_for_access_token)
|
28
|
-
# @param options any additional parameters to send to
|
28
|
+
# @param options any additional parameters to send to Bloopi when redeeming the token
|
29
29
|
#
|
30
|
-
# @raise
|
30
|
+
# @raise Bloopi::OAuthTokenRequestError if Bloopi returns an error response
|
31
31
|
#
|
32
|
-
# @return a hash of the access token info returned by
|
32
|
+
# @return a hash of the access token info returned by Bloopi (token, expiration, etc.)
|
33
33
|
def get_access_token_info(options = {})
|
34
34
|
# convenience method to get a the application's sessionless access token
|
35
35
|
get_token_from_server({}, true, options)
|
@@ -43,14 +43,14 @@ module Blupee
|
|
43
43
|
# @return the application access token
|
44
44
|
def get_access_token(options = {})
|
45
45
|
if info = get_access_token_info(options)
|
46
|
-
|
46
|
+
Bloopi.config.access_token = info["access_token"]
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
50
|
protected
|
51
51
|
|
52
52
|
def get_token_from_server(args, post = false, options = {})
|
53
|
-
# fetch the result from
|
53
|
+
# fetch the result from Bloopi's servers
|
54
54
|
response = fetch_token_string(args, post, "auth", options)
|
55
55
|
parse_access_token(response)
|
56
56
|
end
|
@@ -68,7 +68,7 @@ module Blupee
|
|
68
68
|
def fetch_token_string(args, post = false, endpoint = "auth", options = {})
|
69
69
|
raise ClientError if @client_id == nil
|
70
70
|
raise ClientError if @client_secret == nil
|
71
|
-
response =
|
71
|
+
response = Bloopi.make_request("/#{endpoint}", {
|
72
72
|
:client_id => @client_id,
|
73
73
|
:client_secret => @client_secret
|
74
74
|
}.merge!(args), post ? "post" : "get", {:use_ssl => true, format: :json}.merge!(options))
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'json'
|
3
3
|
|
4
|
-
module
|
4
|
+
module Bloopi
|
5
5
|
module API
|
6
6
|
class Ether
|
7
7
|
attr_reader :coin_symbol, :balance, :wallet, :transaction_hash
|
@@ -15,7 +15,7 @@ module Blupee
|
|
15
15
|
# {:wallet_address=>""}
|
16
16
|
def self.balance(args, options = {})
|
17
17
|
wallet_address = args[:wallet_address]
|
18
|
-
response =
|
18
|
+
response = Bloopi.make_request("/eth/#{wallet_address}", {}, "get", {:use_ssl => true}.merge!(options))
|
19
19
|
raise ServerError.new(response.status, response.body) if response.status >= 500
|
20
20
|
raise OAuthTokenRequestError.new(response.status, response.body) if response.status >= 400
|
21
21
|
response
|
@@ -23,7 +23,7 @@ module Blupee
|
|
23
23
|
|
24
24
|
|
25
25
|
def self.new_wallet(args, options = {})
|
26
|
-
response =
|
26
|
+
response = Bloopi.make_request("/eth/new",
|
27
27
|
{}.merge!(args),
|
28
28
|
"post",
|
29
29
|
{:use_ssl => true,
|
@@ -35,7 +35,20 @@ module Blupee
|
|
35
35
|
|
36
36
|
# {:to_address=>"", :from_address=>"", :password=>"", :quantity=>0.001}
|
37
37
|
def self.transfer(args, options = {})
|
38
|
-
response =
|
38
|
+
response = Bloopi.make_request("/eth/send",
|
39
|
+
{}.merge!(args),
|
40
|
+
"post",
|
41
|
+
{:use_ssl => true,
|
42
|
+
format: :json}.merge!(options))
|
43
|
+
|
44
|
+
raise ServerError.new(response.status, response.body) if response.status >= 500
|
45
|
+
raise OAuthTokenRequestError.new(response.status, response.body) if response.status >= 400
|
46
|
+
response
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
def self.exchange(args, options = {})
|
51
|
+
response = Bloopi.make_request("/eth/exchange/omg",
|
39
52
|
{}.merge!(args),
|
40
53
|
"post",
|
41
54
|
{:use_ssl => true,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'json'
|
3
3
|
|
4
|
-
module
|
4
|
+
module Bloopi
|
5
5
|
module API
|
6
6
|
class OmiseGo
|
7
7
|
attr_reader :coin_symbol, :balance, :wallet, :transaction_hash
|
@@ -15,7 +15,7 @@ module Blupee
|
|
15
15
|
# {:wallet_address=>""}
|
16
16
|
def self.balance(args, options = {})
|
17
17
|
wallet_address = args[:wallet_address]
|
18
|
-
response =
|
18
|
+
response = Bloopi.make_request("/omg/#{wallet_address}", {}, "get", {:use_ssl => true}.merge!(options))
|
19
19
|
raise ServerError.new(response.status, response.body) if response.status >= 500
|
20
20
|
raise OAuthTokenRequestError.new(response.status, response.body) if response.status >= 400
|
21
21
|
response
|
@@ -23,7 +23,7 @@ module Blupee
|
|
23
23
|
|
24
24
|
# {:to_address=>"", :from_address=>"", :password=>"", :quantity=>0.001}
|
25
25
|
def self.transfer(args, options = {})
|
26
|
-
response =
|
26
|
+
response = Bloopi.make_request("/omg/send",
|
27
27
|
{}.merge!(args),
|
28
28
|
"post",
|
29
29
|
{:use_ssl => true,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'json'
|
3
3
|
|
4
|
-
module
|
4
|
+
module Bloopi
|
5
5
|
module API
|
6
6
|
class Token
|
7
7
|
attr_reader :coin_symbol, :balance, :wallet, :transaction_hash
|
@@ -16,7 +16,7 @@ module Blupee
|
|
16
16
|
def self.balance(args, options = {})
|
17
17
|
contract_id = args[:contract_id]
|
18
18
|
wallet_address = args[:wallet_address]
|
19
|
-
response =
|
19
|
+
response = Bloopi.make_request("/token/#{contract_id}/#{wallet_address}", {}, "get", {:use_ssl => true}.merge!(options))
|
20
20
|
raise ServerError.new(response.status, response.body) if response.status >= 500
|
21
21
|
raise OAuthTokenRequestError.new(response.status, response.body) if response.status >= 400
|
22
22
|
response
|
@@ -24,7 +24,7 @@ module Blupee
|
|
24
24
|
|
25
25
|
# {:to_address=>"", :from_address=>"", :password=>"", :quantity=>0.001, :contract_address=>""}
|
26
26
|
def self.transfer(args, options = {})
|
27
|
-
response =
|
27
|
+
response = Bloopi.make_request("/token/send",
|
28
28
|
{}.merge!(args),
|
29
29
|
"post",
|
30
30
|
{:use_ssl => true,
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# Global configuration for
|
2
|
-
class
|
1
|
+
# Global configuration for Bloopi.
|
2
|
+
class Bloopi::Configuration
|
3
3
|
# The default access token to be used if none is otherwise supplied.
|
4
4
|
attr_accessor :access_token
|
5
5
|
|
@@ -14,7 +14,7 @@ class Blupee::Configuration
|
|
14
14
|
attr_accessor :api_version
|
15
15
|
|
16
16
|
def initialize
|
17
|
-
self.api_server = "api.
|
17
|
+
self.api_server = "api.bloopi.io"
|
18
18
|
self.api_version = "v1"
|
19
19
|
end
|
20
20
|
end
|
@@ -1,18 +1,18 @@
|
|
1
|
-
module
|
1
|
+
module Bloopi
|
2
2
|
|
3
|
-
class
|
3
|
+
class BloopiError < StandardError; end
|
4
4
|
|
5
5
|
module API
|
6
6
|
|
7
7
|
# The OAuth signature is incomplete, invalid, or using an unsupported algorithm
|
8
|
-
class OAuthSignatureError < ::
|
8
|
+
class OAuthSignatureError < ::Bloopi::BloopiError; end
|
9
9
|
|
10
10
|
# Required for realtime updates validation
|
11
|
-
class AppSecretNotDefinedError < ::
|
11
|
+
class AppSecretNotDefinedError < ::Bloopi::BloopiError; end
|
12
12
|
|
13
13
|
# Facebook responded with an error to an API request. If the exception contains a nil
|
14
14
|
# http_status, then the error was detected before making a call to Facebook. (e.g. missing access token)
|
15
|
-
class APIError < ::
|
15
|
+
class APIError < ::Bloopi::BloopiError
|
16
16
|
attr_accessor :http_status,
|
17
17
|
:response_body,
|
18
18
|
:error_type,
|
@@ -81,7 +81,7 @@ module Blupee
|
|
81
81
|
end
|
82
82
|
|
83
83
|
# Facebook returned an invalid response body
|
84
|
-
class
|
84
|
+
class BadBloopiAPIResponse < APIError; end
|
85
85
|
|
86
86
|
# Facebook responded with an error while attempting to request an access token
|
87
87
|
class OAuthTokenRequestError < APIError; end
|
@@ -2,7 +2,7 @@ require 'faraday'
|
|
2
2
|
require_relative 'http_service/request'
|
3
3
|
require_relative 'http_service/response'
|
4
4
|
|
5
|
-
module
|
5
|
+
module Bloopi
|
6
6
|
module HTTPService
|
7
7
|
class << self
|
8
8
|
# A customized stack of Faraday middleware that will be used to make each request.
|
@@ -12,22 +12,22 @@ module Blupee
|
|
12
12
|
|
13
13
|
@http_options ||= {}
|
14
14
|
|
15
|
-
#
|
15
|
+
# Bloopi's default middleware stack.
|
16
16
|
# and use whichever adapter has been configured for this application.
|
17
17
|
DEFAULT_MIDDLEWARE = Proc.new do |builder|
|
18
18
|
builder.request :url_encoded
|
19
19
|
builder.adapter Faraday.default_adapter
|
20
20
|
end
|
21
21
|
|
22
|
-
# Makes a request directly to
|
22
|
+
# Makes a request directly to Bloopi.
|
23
23
|
# @note You'll rarely need to call this method directly.
|
24
24
|
#
|
25
25
|
#
|
26
|
-
# @param request a
|
26
|
+
# @param request a Bloopi::HTTPService::Request object
|
27
27
|
#
|
28
|
-
# @raise an appropriate connection error if unable to make the request to
|
28
|
+
# @raise an appropriate connection error if unable to make the request to Bloopi
|
29
29
|
#
|
30
|
-
# @return [
|
30
|
+
# @return [Bloopi::HTTPService::Response] a response object representing the results from Bloopi
|
31
31
|
def self.make_request(request)
|
32
32
|
# set up our Faraday connection
|
33
33
|
conn = Faraday.new(request.server, faraday_options(request.options), &(faraday_middleware || DEFAULT_MIDDLEWARE))
|
@@ -37,7 +37,7 @@ module Blupee
|
|
37
37
|
response = conn.post do |req|
|
38
38
|
req.path = request.path
|
39
39
|
req.headers["Content-Type"] = "application/json"
|
40
|
-
req.headers['Bearer'] =
|
40
|
+
req.headers['Bearer'] = Bloopi.config.access_token if Bloopi.config.access_token
|
41
41
|
req.body = request.post_args.to_json
|
42
42
|
req
|
43
43
|
end
|
@@ -45,13 +45,13 @@ module Blupee
|
|
45
45
|
# response = conn.send(request.verb, request.path, request.post_args)
|
46
46
|
response = conn.get do |req|
|
47
47
|
req.path = request.path
|
48
|
-
req.headers['Bearer'] =
|
48
|
+
req.headers['Bearer'] = Bloopi.config.access_token if Bloopi.config.access_token
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
52
|
# Log URL information
|
53
|
-
#
|
54
|
-
|
53
|
+
# Bloopi::Utils.debug "#{request.verb.upcase}: #{request.path} params: #{request.raw_args.inspect}"
|
54
|
+
Bloopi::HTTPService::Response.new(response.status.to_i, response.body, response.headers)
|
55
55
|
end
|
56
56
|
|
57
57
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Bloopi
|
2
2
|
module HTTPService
|
3
3
|
class Request
|
4
4
|
attr_reader :raw_path, :raw_args, :raw_verb, :raw_options
|
@@ -11,7 +11,7 @@ module Blupee
|
|
11
11
|
# @param options various flags to indicate which server to use.
|
12
12
|
# @param options
|
13
13
|
# @option options :use_ssl force https, even if not needed
|
14
|
-
# @option options :json whether or not to send JSON to
|
14
|
+
# @option options :json whether or not to send JSON to Bloopi
|
15
15
|
def initialize(path: path, verb: verb, args: {}, options: {})
|
16
16
|
@raw_path = path
|
17
17
|
@raw_args = args
|
@@ -19,20 +19,20 @@ module Blupee
|
|
19
19
|
@raw_options = options
|
20
20
|
end
|
21
21
|
|
22
|
-
# Determines which type of request to send to
|
22
|
+
# Determines which type of request to send to Bloopi. Bloopi natively accepts GETs and POSTs, for others we have to include the method in the post body.
|
23
23
|
#
|
24
24
|
# @return one of get or post
|
25
25
|
def verb
|
26
26
|
["get", "post"].include?(raw_verb) ? raw_verb : "post"
|
27
27
|
end
|
28
28
|
|
29
|
-
# Determines the path to be requested on
|
29
|
+
# Determines the path to be requested on Bloopi, incorporating an API version if specified.
|
30
30
|
#
|
31
31
|
# @return the original path, with API version if appropriate.
|
32
32
|
def path
|
33
33
|
# if an api_version is specified and the path does not already contain
|
34
34
|
# one, prepend it to the path
|
35
|
-
api_version = raw_options[:api_version] ||
|
35
|
+
api_version = raw_options[:api_version] || Bloopi.config.api_version
|
36
36
|
"/#{api_version}/#{raw_path}"
|
37
37
|
end
|
38
38
|
|
@@ -73,11 +73,11 @@ module Blupee
|
|
73
73
|
raw_options[:format] == :json
|
74
74
|
end
|
75
75
|
|
76
|
-
# The address of the appropriate
|
76
|
+
# The address of the appropriate Bloopi server.
|
77
77
|
#
|
78
78
|
# @return a complete server address with protocol
|
79
79
|
def server
|
80
|
-
uri = "#{options[:use_ssl] ? "https" : "http"}://#{
|
80
|
+
uri = "#{options[:use_ssl] ? "https" : "http"}://#{Bloopi.config.api_server}"
|
81
81
|
end
|
82
82
|
|
83
83
|
protected
|
@@ -1,9 +1,9 @@
|
|
1
|
-
module
|
1
|
+
module Bloopi
|
2
2
|
module HTTPService
|
3
3
|
class Response
|
4
4
|
attr_reader :status, :body, :headers
|
5
5
|
|
6
|
-
# Creates a new Response object, which standardizes the response received by
|
6
|
+
# Creates a new Response object, which standardizes the response received by Bloopi API for use within Bloopi.
|
7
7
|
def initialize(status, body, headers)
|
8
8
|
@status = status
|
9
9
|
@body = body
|
@@ -11,7 +11,7 @@ module Blupee
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def data
|
14
|
-
# quirks_mode is needed because
|
14
|
+
# quirks_mode is needed because Bloopi sometimes returns a raw true or false value --
|
15
15
|
# in Ruby 2.4 we can drop that.
|
16
16
|
@data ||= JSON.parse(body, quirks_mode: true) unless body.empty?
|
17
17
|
end
|
metadata
CHANGED
@@ -1,182 +1,182 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blupee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Bloopi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.6'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 10.4.2
|
34
|
-
- -
|
34
|
+
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 12.0.1
|
37
37
|
type: :development
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - ~>
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 10.4.2
|
44
|
-
- -
|
44
|
+
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 12.0.1
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: minitest
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - ~>
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: 5.8.3
|
54
|
-
- -
|
54
|
+
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: 5.10.2
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - ~>
|
61
|
+
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: 5.8.3
|
64
|
-
- -
|
64
|
+
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 5.10.2
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: vcr
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- - ~>
|
71
|
+
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: 3.0.0
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: 3.0.3
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- - ~>
|
81
|
+
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: 3.0.0
|
84
|
-
- -
|
84
|
+
- - ">="
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: 3.0.3
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: pry
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- - ~>
|
91
|
+
- - "~>"
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: 0.10.0
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.10.9
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.10.0
|
104
|
-
- -
|
104
|
+
- - ">="
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: 0.10.9
|
107
107
|
- !ruby/object:Gem::Dependency
|
108
108
|
name: webmock
|
109
109
|
requirement: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- - ~>
|
111
|
+
- - "~>"
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: 3.1.0
|
114
|
-
- -
|
114
|
+
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: 3.1.9
|
117
117
|
type: :development
|
118
118
|
prerelease: false
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - ~>
|
121
|
+
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: 3.1.0
|
124
|
-
- -
|
124
|
+
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: 3.1.9
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: faraday
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- - ~>
|
131
|
+
- - "~>"
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: 0.11.0
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
|
-
- - ~>
|
138
|
+
- - "~>"
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: 0.11.0
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: json
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
|
-
- - ~>
|
145
|
+
- - "~>"
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '1.8'
|
148
|
-
- -
|
148
|
+
- - ">="
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: 1.8.3
|
151
151
|
type: :runtime
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- - ~>
|
155
|
+
- - "~>"
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '1.8'
|
158
|
-
- -
|
158
|
+
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: 1.8.3
|
161
|
-
description:
|
161
|
+
description: Ethereum, OmiseGo, ERC20 API
|
162
162
|
email:
|
163
|
-
- admin@
|
163
|
+
- admin@bloopi.io
|
164
164
|
executables: []
|
165
165
|
extensions: []
|
166
166
|
extra_rdoc_files: []
|
167
167
|
files:
|
168
|
-
- lib/
|
169
|
-
- lib/
|
170
|
-
- lib/
|
171
|
-
- lib/
|
172
|
-
- lib/
|
173
|
-
- lib/
|
174
|
-
- lib/
|
175
|
-
- lib/
|
176
|
-
- lib/
|
177
|
-
- lib/
|
178
|
-
- lib/
|
179
|
-
homepage: https://github.com/
|
168
|
+
- lib/bloopi.rb
|
169
|
+
- lib/bloopi/api/auth.rb
|
170
|
+
- lib/bloopi/api/ether.rb
|
171
|
+
- lib/bloopi/api/omise_go.rb
|
172
|
+
- lib/bloopi/api/token.rb
|
173
|
+
- lib/bloopi/configuration.rb
|
174
|
+
- lib/bloopi/errors.rb
|
175
|
+
- lib/bloopi/http_service.rb
|
176
|
+
- lib/bloopi/http_service/request.rb
|
177
|
+
- lib/bloopi/http_service/response.rb
|
178
|
+
- lib/bloopi/version.rb
|
179
|
+
homepage: https://github.com/Bloopi-Ethereum-API/bloopi_ruby
|
180
180
|
licenses:
|
181
181
|
- MIT
|
182
182
|
metadata: {}
|
@@ -186,18 +186,18 @@ require_paths:
|
|
186
186
|
- lib
|
187
187
|
required_ruby_version: !ruby/object:Gem::Requirement
|
188
188
|
requirements:
|
189
|
-
- -
|
189
|
+
- - ">="
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
193
|
requirements:
|
194
|
-
- -
|
194
|
+
- - ">="
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.
|
199
|
+
rubygems_version: 2.6.13
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
|
-
summary: Gem to wrap
|
202
|
+
summary: Gem to wrap Bloopi Ethereum API
|
203
203
|
test_files: []
|
data/lib/blupee.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
require_relative "blupee/version"
|
2
|
-
require_relative 'blupee/errors'
|
3
|
-
require_relative "blupee/configuration"
|
4
|
-
require_relative "blupee/http_service"
|
5
|
-
require_relative "blupee/http_service/request"
|
6
|
-
require_relative "blupee/http_service/response"
|
7
|
-
require_relative "blupee/api/auth"
|
8
|
-
require_relative "blupee/api/ether"
|
9
|
-
require_relative "blupee/api/omise_go"
|
10
|
-
require_relative "blupee/api/token"
|
11
|
-
|
12
|
-
module Blupee
|
13
|
-
|
14
|
-
class << self
|
15
|
-
def configure
|
16
|
-
yield config
|
17
|
-
end
|
18
|
-
|
19
|
-
# See Blupee::Configuration.
|
20
|
-
def config
|
21
|
-
@config ||= Configuration.new
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def self.make_request(path, args, verb, options = {})
|
26
|
-
HTTPService.make_request(HTTPService::Request.new(path: path, args: args, verb: verb, options: options))
|
27
|
-
end
|
28
|
-
end
|
data/lib/blupee/version.rb
DELETED