txcatcher 0.1.83 → 0.1.84

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2490c3456737004783bc9d04fb086c0c13cabe5
4
- data.tar.gz: 813de1fef0f9d0c28e5dbdcf227bab4ead700c24
3
+ metadata.gz: 0d1a18431d76cce582aecace5022e5015928cb90
4
+ data.tar.gz: a7bb038aacbdb195c050b039f680e4343f0a917c
5
5
  SHA512:
6
- metadata.gz: 2ed2e03aee0673dc2a44774d7d4bd49d71ec70f9f6c60fca564bcb91d5a956ae730802deb208c55e16bf74f9a45c39c507b93f0088e2411f034c946fdcf6ff32
7
- data.tar.gz: c420a2f8c1276a6379448a79461b7c181884cb7512ce29c0d8f0ddabe90083ac9e409cb3998c92292c646640213230eba9e596f5b069c6f911009326d0c4a084
6
+ metadata.gz: 1be43c8df7bc8c4ee696cd3f1f5af5396766b7a68ebbed83ee6aee2e1f1af1241fcaf587ae7c4e236154838f0914acd4a84555b78991d291abbde3f1833b08fa
7
+ data.tar.gz: 5a9c0db19e0b29cade49bf47b9ba85bf2f46ff4607b940f5557bfc8e20a880fc7544c2eab7be8fea2e82781122a95a4c19fe3a870f6172331092edb48ec46351
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.83
1
+ 0.1.84
@@ -47,9 +47,9 @@ module TxCatcher
47
47
 
48
48
  def prepare
49
49
  ConfigFile.set!
50
- initialize_sentry
51
50
  create_config_files
52
51
  read_config_file
52
+ initialize_sentry
53
53
  connect_to_db
54
54
  connect_to_rpc_node
55
55
  run_migrations if migrations_pending?
@@ -154,8 +154,9 @@ module TxCatcher
154
154
 
155
155
  def initialize_sentry
156
156
  Raven.configure do |config|
157
- config.dsn = Config["sentry_dsn"]
158
- end if Config["sentry_dsn"]
157
+ config.dsn = Config["logger"]["sentry_dsn"]
158
+ config.current_environment = Config["environment"]
159
+ end if Config["logger"] && Config["logger"]["sentry_dsn"]
159
160
  end
160
161
 
161
162
  end
@@ -41,8 +41,9 @@ module TxCatcher
41
41
 
42
42
  def report_to_sentry(e, log_level, data: nil, timestamp: timestamp)
43
43
  data ||= {}
44
- data.merge(environment: Config["environment"], host: Config["host"])
45
- e.kind_of?(Exception) ? Raven.capture_exception(e, extra: data) : Raven.capture_message(e, extra: data)
44
+ data.merge!(environment: Config["environment"], host: Config["host"], currency: Config["currency"])
45
+ Raven.tags_context data
46
+ e.kind_of?(Exception) ? Raven.capture_exception(e) : Raven.capture_message(e)
46
47
  end
47
48
 
48
49
  def prepare_message(e, timestamp: false)
@@ -28,5 +28,6 @@ zeromq: bitcoind
28
28
  max_db_transactions_stored: 10
29
29
  db_clean_period_seconds: 300
30
30
  protected_transactions: true
31
+ host: localhost
31
32
  environment: development
32
33
  currency: bitcoin
@@ -0,0 +1,12 @@
1
+ require 'rubygems'
2
+ require 'crypto-unit'
3
+ require_relative '../../lib/txcatcher/utils/crypto_unit'
4
+
5
+ RSpec.describe TxCatcher::CryptoUnit do
6
+
7
+ it "doesn't raise error when an amount of more than 21 million units is used on Litecoin" do
8
+ expect( -> { TxCatcher::CryptoUnit.new(:ltc, 2100000000000001, from_unit: :primary) }).not_to raise_error
9
+ expect( -> { TxCatcher::CryptoUnit.new(:btc, 2100000000000001, from_unit: :primary) }).to raise_error(CryptoUnit::TooLarge)
10
+ end
11
+
12
+ end
data/templates/config.yml CHANGED
@@ -20,16 +20,15 @@ rpcnode:
20
20
  logger:
21
21
  log_queue_info: false
22
22
  stdout_level: info
23
- logfile_level: warn
23
+ logfile_level: error
24
24
  sentry_level: error
25
- sentry:
26
- dsn: null
27
- client_dsn: null
25
+ sentry_dsn: null
28
26
 
29
27
  zeromq: bitcoind
30
28
  max_db_transactions_stored: 100000
31
29
  db_clean_period_seconds: 300
32
30
  server_port: 9498
33
31
  daemonize: false
34
- environment: production
32
+ host: localhost
33
+ environment: development
35
34
  currency: bitcoin
data/txcatcher.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: txcatcher 0.1.83 ruby lib
5
+ # stub: txcatcher 0.1.84 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "txcatcher"
9
- s.version = "0.1.83"
9
+ s.version = "0.1.84"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txcatcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.83
4
+ version: 0.1.84
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko
@@ -159,6 +159,7 @@ files:
159
159
  - spec/logger_spec.rb
160
160
  - spec/models/transaction_spec.rb
161
161
  - spec/spec_helper.rb
162
+ - spec/utils/crypto_unit.rb
162
163
  - templates/config.yml
163
164
  - txcatcher.gemspec
164
165
  homepage: http://github.com/snitko/txcatcher