Sha256: 786d047f09f02cfef52ea8c6699831400b5e8d12cf53385ff126113b3064a7d2
Contents?: true
Size: 1.5 KB
Versions: 2
Compression:
Stored size: 1.5 KB
Contents
module Peatio module Sinovate module Hooks BLOCKCHAIN_VERSION_REQUIREMENT = "~> 1.0.0" WALLET_VERSION_REQUIREMENT = "~> 1.0.0" class << self def check_compatibility unless Gem::Requirement.new(BLOCKCHAIN_VERSION_REQUIREMENT) .satisfied_by?(Gem::Version.new(Peatio::Blockchain::VERSION)) [ "Sinovate blockchain version requiremnt was not suttisfied by Peatio::Blockchain.", "Sinovate blockchain requires #{BLOCKCHAIN_VERSION_REQUIREMENT}.", "Peatio::Blockchain version is #{Peatio::Blockchain::VERSION}" ].join('\n').tap { |s| Kernel.abort s } end unless Gem::Requirement.new(WALLET_VERSION_REQUIREMENT) .satisfied_by?(Gem::Version.new(Peatio::Wallet::VERSION)) [ "Sinovate wallet version requiremnt was not suttisfied by Peatio::Wallet.", "Sinovate wallet requires #{WALLET_VERSION_REQUIREMENT}.", "Peatio::Wallet version is #{Peatio::Wallet::VERSION}" ].join('\n').tap { |s| Kernel.abort s } end end def register Peatio::Blockchain.registry[:sinovate] = Sinovate::Blockchain.new Peatio::Wallet.registry[:sinovated] = Sinovate::Wallet.new end end if defined?(Rails::Railtie) require "peatio/sinovate/railtie" else check_compatibility register end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
peatio-sinovate-0.2.3 | lib/peatio/sinovate/hooks.rb |
ultex-sinovate-0.2.1 | lib/peatio/sinovate/hooks.rb |