radiator 0.4.6 → 0.4.8

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.
Files changed (121) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +27 -12
  3. data/Rakefile +53 -23
  4. data/lib/radiator.rb +3 -1
  5. data/lib/radiator/api.rb +111 -16
  6. data/lib/radiator/bridge.rb +34 -0
  7. data/lib/radiator/broadcast_operations.json +7 -7
  8. data/lib/radiator/chain.rb +1 -1
  9. data/lib/radiator/chain_config.rb +9 -2
  10. data/lib/radiator/database_api.rb +1 -1
  11. data/lib/radiator/error_parser.rb +1 -1
  12. data/lib/radiator/follow_api.rb +1 -1
  13. data/lib/radiator/market_history_api.rb +1 -1
  14. data/lib/radiator/mixins/acts_as_poster.rb +4 -4
  15. data/lib/radiator/operation.rb +3 -2
  16. data/lib/radiator/operation_types.rb +43 -27
  17. data/lib/radiator/ssc/base_steem_smart_contract_rpc.rb +1 -1
  18. data/lib/radiator/stream.rb +21 -8
  19. data/lib/radiator/transaction.rb +43 -3
  20. data/lib/radiator/type/amount.rb +8 -50
  21. data/lib/radiator/type/beneficiaries.rb +8 -1
  22. data/lib/radiator/type/price.rb +2 -2
  23. data/lib/radiator/version.rb +1 -1
  24. data/radiator.gemspec +17 -13
  25. data/test/fixtures/empty.json +1 -0
  26. data/test/fixtures/error.json +29 -0
  27. data/test/fixtures/follow_api_get_followers.json +1 -0
  28. data/test/fixtures/get_account.json +165 -0
  29. data/test/fixtures/get_account_count.json +1 -0
  30. data/test/fixtures/get_account_references.json +1 -0
  31. data/test/fixtures/get_block.json +193 -0
  32. data/test/fixtures/get_dynamic_global_properties.json +32 -0
  33. data/test/fixtures/get_feed_history.json +684 -0
  34. data/test/fixtures/get_hardfork_version.json +1 -0
  35. data/test/fixtures/get_key_references.json +14 -0
  36. data/test/fixtures/get_stats_for_time.json +57 -0
  37. data/test/fixtures/get_vesting_delegation.json +936 -0
  38. data/test/fixtures/golos_get_dynamic_global_properties.json +32 -0
  39. data/test/fixtures/market_history_api_get_market_history_buckets.json +1 -0
  40. data/test/fixtures/market_history_api_get_order_book.json +109 -0
  41. data/test/fixtures/market_history_api_get_recent_trades.json +55 -0
  42. data/test/fixtures/market_history_api_get_ticker.json +11 -0
  43. data/test/fixtures/market_history_api_get_volume.json +1 -0
  44. data/test/fixtures/null.json +1 -0
  45. data/test/fixtures/vcr_cassettes/account_by_key_api_all_methods.yml +1465 -0
  46. data/test/fixtures/vcr_cassettes/account_by_key_api_jsonrpc.yml +199 -0
  47. data/test/fixtures/vcr_cassettes/api_all_methods.yml +13802 -0
  48. data/test/fixtures/vcr_cassettes/api_jsonrpc.yml +53 -0
  49. data/test/fixtures/vcr_cassettes/base_per_debt.yml +11068 -0
  50. data/test/fixtures/vcr_cassettes/base_per_mvest.yml +6024 -0
  51. data/test/fixtures/vcr_cassettes/block_time.yml +5368 -0
  52. data/test/fixtures/vcr_cassettes/broadcast_transaction.yml +1723 -0
  53. data/test/fixtures/vcr_cassettes/chain_stats_api_jsonrpc.yml +51 -0
  54. data/test/fixtures/vcr_cassettes/condenser_all_all_methods.yml +13770 -0
  55. data/test/fixtures/vcr_cassettes/condenser_api_jsonrpc.yml +103 -0
  56. data/test/fixtures/vcr_cassettes/expiration_initialize.yml +16108 -0
  57. data/test/fixtures/vcr_cassettes/find_account.yml +5732 -0
  58. data/test/fixtures/vcr_cassettes/find_block.yml +5322 -0
  59. data/test/fixtures/vcr_cassettes/find_comment.yml +16386 -0
  60. data/test/fixtures/vcr_cassettes/follow_api_jsonrpc.yml +99 -0
  61. data/test/fixtures/vcr_cassettes/get_account_count.yml +783 -0
  62. data/test/fixtures/vcr_cassettes/get_account_references.yml +773 -0
  63. data/test/fixtures/vcr_cassettes/get_accounts.yml +918 -0
  64. data/test/fixtures/vcr_cassettes/get_accounts_no_argument.yml +773 -0
  65. data/test/fixtures/vcr_cassettes/get_dynamic_global_properties.yml +893 -0
  66. data/test/fixtures/vcr_cassettes/get_feed_history.yml +1432 -0
  67. data/test/fixtures/vcr_cassettes/get_hardfork_version.yml +835 -0
  68. data/test/fixtures/vcr_cassettes/get_key_references.yml +1571 -0
  69. data/test/fixtures/vcr_cassettes/get_market_history.yml +1563 -0
  70. data/test/fixtures/vcr_cassettes/get_market_history_buckets.yml +1665 -0
  71. data/test/fixtures/vcr_cassettes/get_order_book.yml +1459 -0
  72. data/test/fixtures/vcr_cassettes/get_recent_trades.yml +1459 -0
  73. data/test/fixtures/vcr_cassettes/get_ticker.yml +1563 -0
  74. data/test/fixtures/vcr_cassettes/get_trade_history.yml +1459 -0
  75. data/test/fixtures/vcr_cassettes/get_vesting_delegations.yml +731 -0
  76. data/test/fixtures/vcr_cassettes/get_volume.yml +1561 -0
  77. data/test/fixtures/vcr_cassettes/get_witness_by_account.yml +835 -0
  78. data/test/fixtures/vcr_cassettes/look_up_witnesses.yml +831 -0
  79. data/test/fixtures/vcr_cassettes/market_history_api_all_methods.yml +10191 -0
  80. data/test/fixtures/vcr_cassettes/market_history_api_jsonrpc.yml +51 -0
  81. data/test/fixtures/vcr_cassettes/network_broadcast_api_all_methods.yml +2455 -0
  82. data/test/fixtures/vcr_cassettes/network_broadcast_api_jsonrpc.yml +51 -0
  83. data/test/fixtures/vcr_cassettes/properties.yml +5551 -0
  84. data/test/fixtures/vcr_cassettes/recover_transaction.yml +1815 -0
  85. data/test/fixtures/vcr_cassettes/ssc_blockchain_block_info.yml +90 -0
  86. data/test/fixtures/vcr_cassettes/ssc_blockchain_block_info_invalid.yml +88 -0
  87. data/test/fixtures/vcr_cassettes/ssc_blockchain_latest_block_info.yml +90 -0
  88. data/test/fixtures/vcr_cassettes/ssc_blockchain_transaction_info.yml +90 -0
  89. data/test/fixtures/vcr_cassettes/ssc_contracts_contract.yml +364 -0
  90. data/test/fixtures/vcr_cassettes/ssc_contracts_find.yml +89 -0
  91. data/test/fixtures/vcr_cassettes/ssc_contracts_find_one.yml +87 -0
  92. data/test/fixtures/vcr_cassettes/stream_jsonrpc.yml +27502 -0
  93. data/test/fixtures/vcr_cassettes/tag_api_jsonrpc.yml +155 -0
  94. data/test/fixtures/vcr_cassettes/transaction_expiration_initialize_nil.yml +17597 -0
  95. data/test/fixtures/vcr_cassettes/transaction_jsonrpc.yml +61 -0
  96. data/test/fixtures/vcr_cassettes/unknown_chain_id.yml +13038 -0
  97. data/test/fixtures/vcr_cassettes/valid_chains.yml +11450 -0
  98. data/test/radiator/account_by_key_api_test.rb +46 -0
  99. data/test/radiator/api_test.rb +135 -0
  100. data/test/radiator/chain_stats_api_test.rb +49 -0
  101. data/test/radiator/chain_test.rb +153 -0
  102. data/test/radiator/condenser_api_test.rb +48 -0
  103. data/test/radiator/follow_api_test.rb +48 -0
  104. data/test/radiator/market_history_api_test.rb +100 -0
  105. data/test/radiator/network_broadcast_api_test.rb +48 -0
  106. data/test/radiator/operation_test.rb +116 -0
  107. data/test/radiator/ssc/blockchain_test.rb +58 -0
  108. data/test/radiator/ssc/contracts_test.rb +65 -0
  109. data/test/radiator/stream_test.rb +48 -0
  110. data/test/radiator/tag_api_test.rb +40 -0
  111. data/test/radiator/transaction_test.rb +755 -0
  112. data/test/test_helper.rb +66 -0
  113. metadata +187 -79
  114. data/.codeclimate.yml +0 -19
  115. data/.gitignore +0 -52
  116. data/.travis.yml +0 -23
  117. data/gource.sh +0 -8
  118. data/images/Anthony Martin.png +0 -0
  119. data/images/Marvin Hofmann.jpg +0 -0
  120. data/images/Marvin Hofmann.png +0 -0
  121. data/lib/steem.rb +0 -17
@@ -1,19 +0,0 @@
1
- ---
2
- engines:
3
- bundler-audit:
4
- enabled: true
5
- duplication:
6
- enabled: true
7
- config:
8
- languages:
9
- - ruby
10
- fixme:
11
- enabled: true
12
- rubocop:
13
- enabled: true
14
- ratings:
15
- paths:
16
- - Gemfile.lock
17
- - "**.rb"
18
- exclude_paths:
19
- - test/
data/.gitignore DELETED
@@ -1,52 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
-
13
- # Used by dotenv library to load environment variables.
14
- # .env
15
-
16
- ## Specific to RubyMotion:
17
- .dat*
18
- .repl_history
19
- build/
20
- *.bridgesupport
21
- build-iPhoneOS/
22
- build-iPhoneSimulator/
23
-
24
- ## Specific to RubyMotion (use of CocoaPods):
25
- #
26
- # We recommend against adding the Pods directory to your .gitignore. However
27
- # you should judge for yourself, the pros and cons are mentioned at:
28
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
- #
30
- # vendor/Pods/
31
-
32
- ## Documentation cache and generated files:
33
- /.yardoc/
34
- /_yardoc/
35
- /doc/
36
- /rdoc/
37
-
38
- ## Environment normalization:
39
- /.bundle/
40
- /vendor/bundle
41
- /lib/bundler/man/
42
-
43
- # for a library or gem, you might want to ignore these files since the code is
44
- # intended to run in multiple environments; otherwise, check them in:
45
- Gemfile.lock
46
- # .ruby-version
47
- # .ruby-gemset
48
-
49
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
- .rvmrc
51
- hashie.log
52
- output.mp4
@@ -1,23 +0,0 @@
1
- language: ruby
2
- rvm:
3
- # You can enable more than one ruby version target at the same time, but doing
4
- # so will disable code coverage reporting.
5
- # - "2.0.0"
6
- # - "2.1.5"
7
- # - "2.2.1"
8
- # - "2.3.0"
9
- - "2.4.2"
10
- # - "2.5.0" # dev
11
- env:
12
- global:
13
- - CC_TEST_REPORTER_ID=fcda177928c42c93fd981f671305519ffb98b98c479198340ea67bc892ffd028
14
- before_script:
15
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
16
- - chmod +x ./cc-test-reporter
17
- - ./cc-test-reporter before-build
18
- script:
19
- - TESTOPTS="--verbose" bundle exec rake test
20
- after_script:
21
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --coverage-input-type simplecov
22
- notifications:
23
- slack: galacticaactual:rhAXgZ68aoikbxBBA05xIUVC
data/gource.sh DELETED
@@ -1,8 +0,0 @@
1
- #!/bin/bash
2
-
3
- gource ./ --user-image-dir images --hide usernames -s 0.5 -b 000000 \
4
- --start-date '2017-05-27 17:23' \
5
- -1280x720 --output-ppm-stream - |\
6
- ffmpeg -y -r 28 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset slow \
7
- -crf 28 -threads 0 output.mp4
8
-
Binary file
Binary file
Binary file
@@ -1,17 +0,0 @@
1
- # Steem chain client for broadcasting common operations.
2
- #
3
- # @see Radiator::Chain
4
- # @deprecated Using Steem class provided by Radiator is deprecated. Please use: Radiator::Chain.new(chain: :steem)
5
- class Steem < Radiator::Chain
6
- def initialize(options = {})
7
- unless defined? @@deprecated_warning_shown
8
- warn "[DEPRECATED] Using Steem class provided by Radiator is deprecated. Please use: Radiator::Chain.new(chain: :steem)"
9
- @@deprecated_warning_shown = true
10
- end
11
-
12
- super(options.merge(chain: :steem))
13
- end
14
-
15
- alias steem_per_mvest base_per_mvest
16
- alias steem_per_usd base_per_debt
17
- end