peatio-goldcoin 2.6.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a44b68aa25e27515c869b56433eba2a57eeb916871a9ce24c333efe45ab64a27
4
+ data.tar.gz: 9defd08215cb9fb5b3012c1a79694da41842176071e07980d47b7e59a29d979d
5
+ SHA512:
6
+ metadata.gz: 267070b8a93fbbffcd634829671d5d78fbb04d873d9d56f9c2c12d00a4ce17af156fe58455df22c3965213d4d0236d04eb033a513499f73ee2e674f105586753
7
+ data.tar.gz: 0d09f1add62bcef8cccfa4716eca2f95a1e098ac546f2d5940cec74a544cbe928f9fb4bde00a1f30e544161ef1b2d53ef2a48a2bcf5737e802de46934409551e
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.2
7
+ before_install: gem install bundler -v 1.17.2
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in peatio-goldcoin.gemspec
8
+ gemspec
@@ -0,0 +1,184 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ peatio-goldcoin (2.6.1)
5
+ activesupport (~> 5.2.3)
6
+ better-faraday (~> 1.0.5)
7
+ faraday (~> 0.17)
8
+ memoist (~> 0.16.0)
9
+ net-http-persistent (~> 3.0.1)
10
+ peatio (>= 0.6.3)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ activemodel (5.2.4.3)
16
+ activesupport (= 5.2.4.3)
17
+ activesupport (5.2.4.3)
18
+ concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ i18n (>= 0.7, < 2)
20
+ minitest (~> 5.1)
21
+ tzinfo (~> 1.1)
22
+ addressable (2.7.0)
23
+ public_suffix (>= 2.0.2, < 5.0)
24
+ amq-protocol (2.3.1)
25
+ amqp (1.8.0)
26
+ amq-protocol (>= 2.2.0)
27
+ eventmachine
28
+ ast (2.4.0)
29
+ better-faraday (1.0.8)
30
+ activesupport (>= 4.0, < 6.0)
31
+ faraday (~> 0.12)
32
+ bunny (2.15.0)
33
+ amq-protocol (~> 2.3, >= 2.3.1)
34
+ byebug (11.1.1)
35
+ clamp (1.3.1)
36
+ coderay (1.1.2)
37
+ concurrent-ruby (1.1.6)
38
+ connection_pool (2.2.3)
39
+ cookiejar (0.3.3)
40
+ crack (0.4.3)
41
+ safe_yaml (~> 1.0.0)
42
+ daemons (1.3.1)
43
+ diff-lcs (1.3)
44
+ docile (1.3.2)
45
+ em-http-request (1.1.6)
46
+ addressable (>= 2.3.4)
47
+ cookiejar (!= 0.3.1)
48
+ em-socksify (>= 0.3)
49
+ eventmachine (>= 1.0.3)
50
+ http_parser.rb (>= 0.6.0)
51
+ em-socksify (0.3.2)
52
+ eventmachine (>= 1.0.0.beta.4)
53
+ em-synchrony (1.0.6)
54
+ eventmachine (>= 1.0.0.beta.1)
55
+ em-websocket (0.5.1)
56
+ eventmachine (>= 0.12.9)
57
+ http_parser.rb (~> 0.6.0)
58
+ eventmachine (1.2.7)
59
+ faraday (0.17.3)
60
+ multipart-post (>= 1.2, < 3)
61
+ faraday_middleware (0.13.1)
62
+ faraday (>= 0.7.4, < 1.0)
63
+ faye (1.3.0)
64
+ cookiejar (>= 0.3.0)
65
+ em-http-request (>= 0.3.0)
66
+ eventmachine (>= 0.12.0)
67
+ faye-websocket (>= 0.9.1)
68
+ multi_json (>= 1.0.0)
69
+ rack (>= 1.0.0)
70
+ websocket-driver (>= 0.5.1)
71
+ faye-websocket (0.10.9)
72
+ eventmachine (>= 0.12.0)
73
+ websocket-driver (>= 0.5.1)
74
+ hashdiff (1.0.1)
75
+ http_parser.rb (0.6.0)
76
+ i18n (1.8.3)
77
+ concurrent-ruby (~> 1.0)
78
+ io-console (0.5.6)
79
+ irb (1.2.3)
80
+ reline (>= 0.0.1)
81
+ jaro_winkler (1.5.4)
82
+ jwt (2.2.1)
83
+ memoist (0.16.2)
84
+ method_source (1.0.0)
85
+ minitest (5.14.1)
86
+ mocha (1.11.2)
87
+ multi_json (1.14.1)
88
+ multipart-post (2.1.1)
89
+ mysql2 (0.5.3)
90
+ net-http-persistent (3.0.1)
91
+ connection_pool (~> 2.2)
92
+ parallel (1.19.1)
93
+ parser (2.7.0.5)
94
+ ast (~> 2.4.0)
95
+ peatio (2.6.1)
96
+ activemodel (> 5.2, <= 6.0.0)
97
+ amqp
98
+ bunny
99
+ clamp
100
+ em-synchrony (~> 1.0)
101
+ em-websocket
102
+ eventmachine
103
+ faraday_middleware (~> 0.13.1)
104
+ faye (~> 1.2)
105
+ jwt
106
+ mysql2
107
+ prometheus-client
108
+ thin
109
+ prometheus-client (2.0.0)
110
+ pry (0.13.0)
111
+ coderay (~> 1.1)
112
+ method_source (~> 1.0)
113
+ pry-byebug (3.9.0)
114
+ byebug (~> 11.0)
115
+ pry (~> 0.13.0)
116
+ public_suffix (4.0.4)
117
+ rack (2.2.3)
118
+ rainbow (3.0.0)
119
+ rake (13.0.1)
120
+ reline (0.1.3)
121
+ io-console (~> 0.5)
122
+ rexml (3.2.4)
123
+ rspec (3.9.0)
124
+ rspec-core (~> 3.9.0)
125
+ rspec-expectations (~> 3.9.0)
126
+ rspec-mocks (~> 3.9.0)
127
+ rspec-core (3.9.1)
128
+ rspec-support (~> 3.9.1)
129
+ rspec-expectations (3.9.1)
130
+ diff-lcs (>= 1.2.0, < 2.0)
131
+ rspec-support (~> 3.9.0)
132
+ rspec-mocks (3.9.1)
133
+ diff-lcs (>= 1.2.0, < 2.0)
134
+ rspec-support (~> 3.9.0)
135
+ rspec-support (3.9.2)
136
+ rubocop (0.80.1)
137
+ jaro_winkler (~> 1.5.1)
138
+ parallel (~> 1.10)
139
+ parser (>= 2.7.0.1)
140
+ rainbow (>= 2.2.2, < 4.0)
141
+ rexml
142
+ ruby-progressbar (~> 1.7)
143
+ unicode-display_width (>= 1.4.0, < 1.7)
144
+ rubocop-github (0.14.0)
145
+ rubocop (~> 0.59)
146
+ ruby-progressbar (1.10.1)
147
+ safe_yaml (1.0.5)
148
+ simplecov (0.18.5)
149
+ docile (~> 1.1)
150
+ simplecov-html (~> 0.11)
151
+ simplecov-html (0.12.2)
152
+ thin (1.7.2)
153
+ daemons (~> 1.0, >= 1.0.9)
154
+ eventmachine (~> 1.0, >= 1.0.4)
155
+ rack (>= 1, < 3)
156
+ thread_safe (0.3.6)
157
+ tzinfo (1.2.7)
158
+ thread_safe (~> 0.1)
159
+ unicode-display_width (1.6.1)
160
+ webmock (3.8.3)
161
+ addressable (>= 2.3.6)
162
+ crack (>= 0.3.2)
163
+ hashdiff (>= 0.4.0, < 2.0.0)
164
+ websocket-driver (0.7.2)
165
+ websocket-extensions (>= 0.1.0)
166
+ websocket-extensions (0.1.5)
167
+
168
+ PLATFORMS
169
+ ruby
170
+
171
+ DEPENDENCIES
172
+ bundler (~> 1.17)
173
+ irb
174
+ mocha (~> 1.8)
175
+ peatio-goldcoin!
176
+ pry-byebug
177
+ rake (~> 13.0)
178
+ rspec (~> 3.0)
179
+ rubocop-github
180
+ simplecov
181
+ webmock (~> 3.5)
182
+
183
+ BUNDLED WITH
184
+ 1.17.3
@@ -0,0 +1,12 @@
1
+ Copyright (C) Alcox - All Rights Reserved
2
+
3
+ NOTICE: All information contained herein is, and remains
4
+ the property of Alcox and its suppliers, if any.
5
+ The intellectual and technical concepts contained herein are proprietary to Alcox
6
+ and its suppliers and may be covered by U.S. and Foreign Patents,
7
+ patents in process, and are protected by trade secret or copyright law.
8
+ Dissemination of this information or reproduction of this material
9
+ is strictly forbidden unless prior written permission is obtained
10
+ from Alcox.
11
+
12
+ Proprietary and confidential
@@ -0,0 +1,39 @@
1
+ # Peatio::Goldcoin
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/peatio/gold`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'peatio-goldcoin'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install peatio-goldcoin
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ 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.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/peatio-goldcoin.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "peatio/goldcoin"
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__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/core_ext/object/blank"
4
+ require "active_support/core_ext/enumerable"
5
+ require "peatio"
6
+
7
+ module Peatio
8
+ module Goldcoin
9
+ require "bigdecimal"
10
+ require "bigdecimal/util"
11
+
12
+ require "peatio/goldcoin/blockchain"
13
+ require "peatio/goldcoin/client"
14
+ require "peatio/goldcoin/wallet"
15
+
16
+ require "peatio/goldcoin/hooks"
17
+
18
+ require "peatio/goldcoin/version"
19
+ end
20
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Peatio
4
+ module Goldcoin
5
+ # TODO: Processing of unconfirmed transactions from mempool isn't supported now.
6
+ class Blockchain < Peatio::Blockchain::Abstract
7
+ DEFAULT_FEATURES = {case_sensitive: true, cash_addr_format: false}.freeze
8
+
9
+ def initialize(custom_features={})
10
+ @features = DEFAULT_FEATURES.merge(custom_features).slice(*SUPPORTED_FEATURES)
11
+ @settings = {}
12
+ end
13
+
14
+ def configure(settings={})
15
+ # Clean client state during configure.
16
+ @client = nil
17
+ @settings.merge!(settings.slice(*SUPPORTED_SETTINGS))
18
+ end
19
+
20
+ def fetch_block!(block_number)
21
+ block_hash = client.json_rpc(:getblockhash, [block_number])
22
+
23
+ block_txs = client.json_rpc(:getblock, [block_hash])
24
+ .fetch("tx").each_with_object([]) do |tx, txs_array|
25
+ txs = build_transaction(tx).map do |ntx|
26
+ Peatio::Transaction.new(ntx.merge(block_number: block_number))
27
+ end
28
+ txs_array.append(*txs)
29
+ end
30
+
31
+ Peatio::Block.new(block_number, block_txs)
32
+ rescue Client::Error => e
33
+ raise Peatio::Blockchain::ClientError, e
34
+ end
35
+
36
+ def latest_block_number
37
+ client.json_rpc(:getblockcount)
38
+ rescue Client::Error => e
39
+ raise Peatio::Blockchain::ClientError, e
40
+ end
41
+
42
+ def load_balance_of_address!(address, _currency_id)
43
+ address_with_balance = client.json_rpc(:listaddressgroupings)
44
+ .flatten(1)
45
+ .find {|addr| addr[0] == address }
46
+
47
+ raise Peatio::Blockchain::UnavailableAddressBalanceError, address if address_with_balance.blank?
48
+
49
+ address_with_balance[1].to_d
50
+ rescue Client::Error => e
51
+ raise Peatio::Blockchain::ClientError, e
52
+ end
53
+
54
+ private
55
+
56
+ def filter_vout(tx_hash)
57
+ tx_hash.fetch("vout").select do |entry|
58
+ entry.fetch("value").to_d.positive? && entry["scriptPubKey"].has_key?("addresses")
59
+ end
60
+ end
61
+
62
+ def build_transaction(tx_hash)
63
+ filter_vout(tx_hash).each_with_object([]) do |entry, formatted_txs|
64
+ no_currency_tx = {hash: tx_hash["txid"], txout: entry["n"],
65
+ to_address: entry["scriptPubKey"]["addresses"][0],
66
+ amount: entry.fetch("value").to_d,
67
+ status: "success"}
68
+
69
+ # Build transaction for each currency belonging to blockchain.
70
+ settings_fetch(:currencies).pluck(:id).each do |currency_id|
71
+ formatted_txs << no_currency_tx.merge(currency_id: currency_id)
72
+ end
73
+ end
74
+ end
75
+
76
+ def client
77
+ @client ||= Client.new(settings_fetch(:server))
78
+ end
79
+
80
+ def settings_fetch(key)
81
+ @settings.fetch(key) { raise Peatio::Blockchain::MissingSettingError, key.to_s }
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "memoist"
4
+ require "faraday"
5
+ require "better-faraday"
6
+
7
+ module Peatio
8
+ module Goldcoin
9
+ class Client
10
+ Error = Class.new(StandardError)
11
+ ConnectionError = Class.new(Error)
12
+
13
+ class ResponseError < Error
14
+ def initialize(code, msg)
15
+ @code = code
16
+ @msg = msg
17
+ end
18
+
19
+ def message
20
+ "#{@msg} (#{@code})"
21
+ end
22
+ end
23
+
24
+ extend Memoist
25
+
26
+ def initialize(endpoint)
27
+ @json_rpc_endpoint = URI.parse(endpoint)
28
+ end
29
+
30
+ def json_rpc(method, params=[])
31
+ response = post(method, params)
32
+
33
+ response.assert_2xx!
34
+ response = JSON.parse(response.body)
35
+
36
+ response["error"].tap do |e|
37
+ raise ResponseError.new(e["code"], e["message"]) if e
38
+ end
39
+
40
+ response.fetch("result")
41
+ rescue Faraday::Error => e
42
+ raise ConnectionError, e
43
+ end
44
+
45
+ private
46
+
47
+ def post(method, params)
48
+ connection.post("/", {jsonrpc: "1.0", method: method, params: params}.to_json,
49
+ "Accept" => "application/json", "Content-Type" => "application/json")
50
+ end
51
+
52
+ def connection
53
+ @connection ||= Faraday.new(@json_rpc_endpoint) do |f|
54
+ f.adapter :net_http_persistent, pool_size: 5
55
+ end.tap do |connection|
56
+ unless @json_rpc_endpoint.user.blank?
57
+ connection.basic_auth(@json_rpc_endpoint.user,
58
+ @json_rpc_endpoint.password)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Peatio
4
+ module Goldcoin
5
+ module Hooks
6
+ BLOCKCHAIN_VERSION_REQUIREMENT = "~> 1.0.0"
7
+ WALLET_VERSION_REQUIREMENT = "~> 1.0.0"
8
+
9
+ class << self
10
+ def check_compatibility
11
+ unless Gem::Requirement.new(BLOCKCHAIN_VERSION_REQUIREMENT)
12
+ .satisfied_by?(Gem::Version.new(Peatio::Blockchain::VERSION))
13
+ [
14
+ "Goldcoin blockchain version requiremnt was not suttisfied by Peatio::Blockchain.",
15
+ "Goldcoin blockchain requires #{BLOCKCHAIN_VERSION_REQUIREMENT}.",
16
+ "Peatio::Blockchain version is #{Peatio::Blockchain::VERSION}"
17
+ ].join('\n').tap {|s| Kernel.abort s }
18
+ end
19
+
20
+ unless Gem::Requirement.new(WALLET_VERSION_REQUIREMENT)
21
+ .satisfied_by?(Gem::Version.new(Peatio::Wallet::VERSION))
22
+ [
23
+ "Goldcoin wallet version requiremnt was not suttisfied by Peatio::Wallet.",
24
+ "Goldcoin wallet requires #{WALLET_VERSION_REQUIREMENT}.",
25
+ "Peatio::Wallet version is #{Peatio::Wallet::VERSION}"
26
+ ].join('\n').tap {|s| Kernel.abort s }
27
+ end
28
+ end
29
+
30
+ def register
31
+ Peatio::Blockchain.registry[:goldcoin] = Goldcoin::Blockchain
32
+ Peatio::Wallet.registry[:goldcoind] = Goldcoin::Wallet
33
+ end
34
+ end
35
+
36
+ if defined?(Rails::Railtie)
37
+ require "peatio/goldcoin/railtie"
38
+ else
39
+ check_compatibility
40
+ register
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Peatio
4
+ module Goldcoin
5
+ class Railtie < Rails::Railtie
6
+ config.before_initialize do
7
+ Hooks.check_compatibility
8
+ end
9
+
10
+ config.after_initialize do
11
+ Hooks.register
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Peatio
4
+ module Goldcoin
5
+ VERSION = "2.6.1".freeze
6
+ end
7
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Peatio
4
+ module Goldcoin
5
+ class Wallet < Peatio::Wallet::Abstract
6
+ DEFAULT_FEATURES = { skip_deposit_collection: false }.freeze
7
+
8
+ def initialize(custom_features = {})
9
+ @features = DEFAULT_FEATURES.merge(custom_features).slice(*SUPPORTED_FEATURES)
10
+ @settings = {}
11
+ end
12
+
13
+ def configure(settings={})
14
+ # Clean client state during configure.
15
+ @client = nil
16
+
17
+ @settings.merge!(settings.slice(*SUPPORTED_SETTINGS))
18
+
19
+ @wallet = @settings.fetch(:wallet) {
20
+ raise Peatio::Wallet::MissingSettingError, :wallet
21
+ }.slice(:uri, :address)
22
+
23
+ @currency = @settings.fetch(:currency) {
24
+ raise Peatio::Wallet::MissingSettingError, :currency
25
+ }.slice(:id, :base_factor, :options)
26
+ end
27
+
28
+ def create_address!(_options={})
29
+ {address: client.json_rpc(:getnewaddress)}
30
+ rescue Goldcoin::Client::Error => e
31
+ raise Peatio::Wallet::ClientError, e
32
+ end
33
+
34
+ def create_transaction!(transaction, options={})
35
+ txid = client.json_rpc(:sendtoaddress,
36
+ [
37
+ transaction.to_address,
38
+ transaction.amount,
39
+ "",
40
+ "",
41
+ options[:subtract_fee].to_s == "true" # subtract fee from transaction amount.
42
+ ])
43
+ transaction.hash = txid
44
+ transaction
45
+ rescue Goldcoin::Client::Error => e
46
+ raise Peatio::Wallet::ClientError, e
47
+ end
48
+
49
+ def load_balance!
50
+ client.json_rpc(:getbalance).to_d
51
+ rescue Goldcoin::Client::Error => e
52
+ raise Peatio::Wallet::ClientError, e
53
+ end
54
+
55
+ private
56
+
57
+ def client
58
+ uri = @wallet.fetch(:uri) { raise Peatio::Wallet::MissingSettingError, :uri }
59
+ @client ||= Client.new(uri)
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("lib", __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "peatio/goldcoin/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "peatio-goldcoin"
9
+ spec.version = Peatio::Goldcoin::VERSION
10
+ spec.authors = ["D.H."]
11
+ spec.email = ["olaf@alcox.biz"]
12
+
13
+ spec.summary = "Peatio Blockchain Plugin"
14
+ spec.description = "Peatio Blockchain Plugin for Rubykube"
15
+ spec.homepage = "https://www.alcox.biz"
16
+ spec.license = "Proprietary"
17
+
18
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
19
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
20
+ if spec.respond_to?(:metadata)
21
+
22
+ spec.metadata["homepage_uri"] = spec.homepage
23
+ spec.metadata["source_code_uri"] = "https://github.com/alcox.biz/peatio-goldcoin"
24
+ spec.metadata["changelog_uri"] = "https://github.com/alcox.biz/peatio-goldcoin/blob/master/CHANGELOG.md"
25
+ else
26
+ raise "RubyGems 2.0 or newer is required to protect against " \
27
+ "public gem pushes."
28
+ end
29
+
30
+ # Specify which files should be added to the gem when it is released.
31
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
32
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
33
+ `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
34
+ end
35
+ spec.bindir = "exe"
36
+ spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
37
+ spec.require_paths = ["lib"]
38
+
39
+ spec.add_dependency "activesupport", "~> 5.2.3"
40
+ spec.add_dependency "better-faraday", "~> 1.0.5"
41
+ spec.add_dependency "faraday", "~> 0.17"
42
+ spec.add_dependency "memoist", "~> 0.16.0"
43
+ spec.add_dependency "peatio", ">= 0.6.3"
44
+ spec.add_dependency 'net-http-persistent', '~> 3.0.1'
45
+
46
+ spec.add_development_dependency "bundler", "~> 1.17"
47
+ spec.add_development_dependency "irb"
48
+ spec.add_development_dependency "mocha", "~> 1.8"
49
+ spec.add_development_dependency "pry-byebug"
50
+ spec.add_development_dependency "rake", "~> 13.0"
51
+ spec.add_development_dependency "rspec", "~> 3.0"
52
+ spec.add_development_dependency "rubocop-github"
53
+ spec.add_development_dependency "simplecov"
54
+ spec.add_development_dependency "webmock", "~> 3.5"
55
+ end
metadata ADDED
@@ -0,0 +1,275 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: peatio-goldcoin
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.6.1
5
+ platform: ruby
6
+ authors:
7
+ - D.H.
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-09-07 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: 5.2.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 5.2.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: better-faraday
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.5
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.5
41
+ - !ruby/object:Gem::Dependency
42
+ name: faraday
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.17'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.17'
55
+ - !ruby/object:Gem::Dependency
56
+ name: memoist
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.16.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.16.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: peatio
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 0.6.3
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.6.3
83
+ - !ruby/object:Gem::Dependency
84
+ name: net-http-persistent
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.17'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.17'
111
+ - !ruby/object:Gem::Dependency
112
+ name: irb
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: mocha
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.8'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '1.8'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pry-byebug
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: rake
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '13.0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '13.0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rspec
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '3.0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '3.0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rubocop-github
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: simplecov
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: webmock
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '3.5'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '3.5'
223
+ description: Peatio Blockchain Plugin for Rubykube
224
+ email:
225
+ - olaf@alcox.biz
226
+ executables: []
227
+ extensions: []
228
+ extra_rdoc_files: []
229
+ files:
230
+ - ".gitattributes"
231
+ - ".gitignore"
232
+ - ".rspec"
233
+ - ".travis.yml"
234
+ - Gemfile
235
+ - Gemfile.lock
236
+ - LICENSE.txt
237
+ - README.md
238
+ - Rakefile
239
+ - bin/console
240
+ - bin/setup
241
+ - lib/peatio/goldcoin.rb
242
+ - lib/peatio/goldcoin/blockchain.rb
243
+ - lib/peatio/goldcoin/client.rb
244
+ - lib/peatio/goldcoin/hooks.rb
245
+ - lib/peatio/goldcoin/railtie.rb
246
+ - lib/peatio/goldcoin/version.rb
247
+ - lib/peatio/goldcoin/wallet.rb
248
+ - peatio-goldcoin.gemspec
249
+ homepage: https://www.alcox.biz
250
+ licenses:
251
+ - Proprietary
252
+ metadata:
253
+ homepage_uri: https://www.alcox.biz
254
+ source_code_uri: https://github.com/alcox.biz/peatio-goldcoin
255
+ changelog_uri: https://github.com/alcox.biz/peatio-goldcoin/blob/master/CHANGELOG.md
256
+ post_install_message:
257
+ rdoc_options: []
258
+ require_paths:
259
+ - lib
260
+ required_ruby_version: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - ">="
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
265
+ required_rubygems_version: !ruby/object:Gem::Requirement
266
+ requirements:
267
+ - - ">="
268
+ - !ruby/object:Gem::Version
269
+ version: '0'
270
+ requirements: []
271
+ rubygems_version: 3.0.6
272
+ signing_key:
273
+ specification_version: 4
274
+ summary: Peatio Blockchain Plugin
275
+ test_files: []