cybrid_api_bank_ruby 0.62.65 → 0.62.67

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +5 -5
  4. data/cybrid_api_bank_ruby.gemspec +1 -1
  5. data/lib/cybrid_api_bank_ruby/api/accounts_bank_api.rb +1 -1
  6. data/lib/cybrid_api_bank_ruby/api/assets_bank_api.rb +1 -1
  7. data/lib/cybrid_api_bank_ruby/api/banks_bank_api.rb +1 -1
  8. data/lib/cybrid_api_bank_ruby/api/customers_bank_api.rb +1 -1
  9. data/lib/cybrid_api_bank_ruby/api/deposit_addresses_bank_api.rb +1 -1
  10. data/lib/cybrid_api_bank_ruby/api/external_bank_accounts_bank_api.rb +1 -1
  11. data/lib/cybrid_api_bank_ruby/api/fee_configurations_bank_api.rb +1 -1
  12. data/lib/cybrid_api_bank_ruby/api/identity_records_bank_api.rb +1 -1
  13. data/lib/cybrid_api_bank_ruby/api/identity_verifications_bank_api.rb +1 -1
  14. data/lib/cybrid_api_bank_ruby/api/prices_bank_api.rb +1 -1
  15. data/lib/cybrid_api_bank_ruby/api/quotes_bank_api.rb +1 -1
  16. data/lib/cybrid_api_bank_ruby/api/rewards_bank_api.rb +1 -1
  17. data/lib/cybrid_api_bank_ruby/api/symbols_bank_api.rb +1 -1
  18. data/lib/cybrid_api_bank_ruby/api/trades_bank_api.rb +1 -1
  19. data/lib/cybrid_api_bank_ruby/api/transfers_bank_api.rb +1 -1
  20. data/lib/cybrid_api_bank_ruby/api/verification_keys_bank_api.rb +1 -1
  21. data/lib/cybrid_api_bank_ruby/api/workflows_bank_api.rb +1 -1
  22. data/lib/cybrid_api_bank_ruby/api_client.rb +1 -1
  23. data/lib/cybrid_api_bank_ruby/api_error.rb +1 -1
  24. data/lib/cybrid_api_bank_ruby/configuration.rb +1 -1
  25. data/lib/cybrid_api_bank_ruby/models/account_bank_model.rb +1 -1
  26. data/lib/cybrid_api_bank_ruby/models/account_list_bank_model.rb +1 -1
  27. data/lib/cybrid_api_bank_ruby/models/asset_bank_model.rb +1 -1
  28. data/lib/cybrid_api_bank_ruby/models/asset_list_bank_model.rb +1 -1
  29. data/lib/cybrid_api_bank_ruby/models/attestation_details_bank_model.rb +1 -1
  30. data/lib/cybrid_api_bank_ruby/models/bank_bank_model.rb +1 -1
  31. data/lib/cybrid_api_bank_ruby/models/bank_list_bank_model.rb +1 -1
  32. data/lib/cybrid_api_bank_ruby/models/customer_bank_model.rb +1 -1
  33. data/lib/cybrid_api_bank_ruby/models/customer_list_bank_model.rb +1 -1
  34. data/lib/cybrid_api_bank_ruby/models/deposit_address_bank_model.rb +1 -1
  35. data/lib/cybrid_api_bank_ruby/models/deposit_address_list_bank_model.rb +1 -1
  36. data/lib/cybrid_api_bank_ruby/models/error_response_bank_model.rb +1 -1
  37. data/lib/cybrid_api_bank_ruby/models/external_bank_account_bank_model.rb +1 -1
  38. data/lib/cybrid_api_bank_ruby/models/external_bank_account_list_bank_model.rb +1 -1
  39. data/lib/cybrid_api_bank_ruby/models/fee_bank_model.rb +1 -1
  40. data/lib/cybrid_api_bank_ruby/models/fee_configuration_bank_model.rb +1 -1
  41. data/lib/cybrid_api_bank_ruby/models/fee_configuration_list_bank_model.rb +1 -1
  42. data/lib/cybrid_api_bank_ruby/models/identity_record_bank_model.rb +1 -1
  43. data/lib/cybrid_api_bank_ruby/models/identity_record_list_bank_model.rb +1 -1
  44. data/lib/cybrid_api_bank_ruby/models/identity_verification_bank_model.rb +1 -1
  45. data/lib/cybrid_api_bank_ruby/models/identity_verification_list_bank_model.rb +1 -1
  46. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_all_of_bank_model.rb +1 -1
  47. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_bank_model.rb +1 -1
  48. data/lib/cybrid_api_bank_ruby/models/patch_bank_bank_model.rb +1 -1
  49. data/lib/cybrid_api_bank_ruby/models/patch_external_bank_account_bank_model.rb +1 -1
  50. data/lib/cybrid_api_bank_ruby/models/post_account_bank_model.rb +1 -1
  51. data/lib/cybrid_api_bank_ruby/models/post_bank_bank_model.rb +1 -1
  52. data/lib/cybrid_api_bank_ruby/models/post_customer_bank_model.rb +1 -1
  53. data/lib/cybrid_api_bank_ruby/models/post_deposit_address_bank_model.rb +1 -1
  54. data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_bank_model.rb +1 -1
  55. data/lib/cybrid_api_bank_ruby/models/post_fee_bank_model.rb +1 -1
  56. data/lib/cybrid_api_bank_ruby/models/post_fee_configuration_bank_model.rb +1 -1
  57. data/lib/cybrid_api_bank_ruby/models/post_identity_record_attestation_details_bank_model.rb +1 -1
  58. data/lib/cybrid_api_bank_ruby/models/post_identity_record_bank_model.rb +1 -1
  59. data/lib/cybrid_api_bank_ruby/models/post_identity_verification_bank_model.rb +1 -1
  60. data/lib/cybrid_api_bank_ruby/models/post_one_time_address_bank_model.rb +1 -1
  61. data/lib/cybrid_api_bank_ruby/models/post_quote_bank_model.rb +1 -1
  62. data/lib/cybrid_api_bank_ruby/models/post_reward_bank_model.rb +1 -1
  63. data/lib/cybrid_api_bank_ruby/models/post_trade_bank_model.rb +1 -1
  64. data/lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb +1 -1
  65. data/lib/cybrid_api_bank_ruby/models/post_verification_key_bank_model.rb +1 -1
  66. data/lib/cybrid_api_bank_ruby/models/post_workflow_bank_model.rb +1 -1
  67. data/lib/cybrid_api_bank_ruby/models/quote_bank_model.rb +1 -1
  68. data/lib/cybrid_api_bank_ruby/models/quote_list_bank_model.rb +1 -1
  69. data/lib/cybrid_api_bank_ruby/models/reward_bank_model.rb +1 -1
  70. data/lib/cybrid_api_bank_ruby/models/reward_list_bank_model.rb +1 -1
  71. data/lib/cybrid_api_bank_ruby/models/symbol_price_bank_model.rb +1 -1
  72. data/lib/cybrid_api_bank_ruby/models/trade_bank_model.rb +1 -1
  73. data/lib/cybrid_api_bank_ruby/models/trade_list_bank_model.rb +1 -1
  74. data/lib/cybrid_api_bank_ruby/models/transfer_bank_model.rb +1 -1
  75. data/lib/cybrid_api_bank_ruby/models/transfer_list_bank_model.rb +1 -1
  76. data/lib/cybrid_api_bank_ruby/models/verification_key_bank_model.rb +1 -1
  77. data/lib/cybrid_api_bank_ruby/models/verification_key_list_bank_model.rb +1 -1
  78. data/lib/cybrid_api_bank_ruby/models/workflow_bank_model.rb +1 -1
  79. data/lib/cybrid_api_bank_ruby/models/workflow_with_details_all_of_bank_model.rb +1 -1
  80. data/lib/cybrid_api_bank_ruby/models/workflow_with_details_bank_model.rb +1 -1
  81. data/lib/cybrid_api_bank_ruby/models/workflows_list_bank_model.rb +1 -1
  82. data/lib/cybrid_api_bank_ruby/version.rb +2 -2
  83. data/lib/cybrid_api_bank_ruby.rb +1 -1
  84. data/spec/api/accounts_bank_api_spec.rb +1 -1
  85. data/spec/api/assets_bank_api_spec.rb +1 -1
  86. data/spec/api/banks_bank_api_spec.rb +1 -1
  87. data/spec/api/customers_bank_api_spec.rb +1 -1
  88. data/spec/api/deposit_addresses_bank_api_spec.rb +1 -1
  89. data/spec/api/external_bank_accounts_bank_api_spec.rb +1 -1
  90. data/spec/api/fee_configurations_bank_api_spec.rb +1 -1
  91. data/spec/api/identity_records_bank_api_spec.rb +1 -1
  92. data/spec/api/identity_verifications_bank_api_spec.rb +1 -1
  93. data/spec/api/prices_bank_api_spec.rb +1 -1
  94. data/spec/api/quotes_bank_api_spec.rb +1 -1
  95. data/spec/api/rewards_bank_api_spec.rb +1 -1
  96. data/spec/api/symbols_bank_api_spec.rb +1 -1
  97. data/spec/api/trades_bank_api_spec.rb +1 -1
  98. data/spec/api/transfers_bank_api_spec.rb +1 -1
  99. data/spec/api/verification_keys_bank_api_spec.rb +1 -1
  100. data/spec/api/workflows_bank_api_spec.rb +1 -1
  101. data/spec/api_client_spec.rb +1 -1
  102. data/spec/configuration_spec.rb +1 -1
  103. data/spec/models/account_bank_model_spec.rb +1 -1
  104. data/spec/models/account_list_bank_model_spec.rb +1 -1
  105. data/spec/models/asset_bank_model_spec.rb +1 -1
  106. data/spec/models/asset_list_bank_model_spec.rb +1 -1
  107. data/spec/models/attestation_details_bank_model_spec.rb +1 -1
  108. data/spec/models/bank_bank_model_spec.rb +1 -1
  109. data/spec/models/bank_list_bank_model_spec.rb +1 -1
  110. data/spec/models/customer_bank_model_spec.rb +1 -1
  111. data/spec/models/customer_list_bank_model_spec.rb +1 -1
  112. data/spec/models/deposit_address_bank_model_spec.rb +1 -1
  113. data/spec/models/deposit_address_list_bank_model_spec.rb +1 -1
  114. data/spec/models/error_response_bank_model_spec.rb +1 -1
  115. data/spec/models/external_bank_account_bank_model_spec.rb +1 -1
  116. data/spec/models/external_bank_account_list_bank_model_spec.rb +1 -1
  117. data/spec/models/fee_bank_model_spec.rb +1 -1
  118. data/spec/models/fee_configuration_bank_model_spec.rb +1 -1
  119. data/spec/models/fee_configuration_list_bank_model_spec.rb +1 -1
  120. data/spec/models/identity_record_bank_model_spec.rb +1 -1
  121. data/spec/models/identity_record_list_bank_model_spec.rb +1 -1
  122. data/spec/models/identity_verification_bank_model_spec.rb +1 -1
  123. data/spec/models/identity_verification_list_bank_model_spec.rb +1 -1
  124. data/spec/models/identity_verification_with_details_all_of_bank_model_spec.rb +1 -1
  125. data/spec/models/identity_verification_with_details_bank_model_spec.rb +1 -1
  126. data/spec/models/patch_bank_bank_model_spec.rb +1 -1
  127. data/spec/models/patch_external_bank_account_bank_model_spec.rb +1 -1
  128. data/spec/models/post_account_bank_model_spec.rb +1 -1
  129. data/spec/models/post_bank_bank_model_spec.rb +1 -1
  130. data/spec/models/post_customer_bank_model_spec.rb +1 -1
  131. data/spec/models/post_deposit_address_bank_model_spec.rb +1 -1
  132. data/spec/models/post_external_bank_account_bank_model_spec.rb +1 -1
  133. data/spec/models/post_fee_bank_model_spec.rb +1 -1
  134. data/spec/models/post_fee_configuration_bank_model_spec.rb +1 -1
  135. data/spec/models/post_identity_record_attestation_details_bank_model_spec.rb +1 -1
  136. data/spec/models/post_identity_record_bank_model_spec.rb +1 -1
  137. data/spec/models/post_identity_verification_bank_model_spec.rb +1 -1
  138. data/spec/models/post_one_time_address_bank_model_spec.rb +1 -1
  139. data/spec/models/post_quote_bank_model_spec.rb +1 -1
  140. data/spec/models/post_reward_bank_model_spec.rb +1 -1
  141. data/spec/models/post_trade_bank_model_spec.rb +1 -1
  142. data/spec/models/post_transfer_bank_model_spec.rb +1 -1
  143. data/spec/models/post_verification_key_bank_model_spec.rb +1 -1
  144. data/spec/models/post_workflow_bank_model_spec.rb +1 -1
  145. data/spec/models/quote_bank_model_spec.rb +1 -1
  146. data/spec/models/quote_list_bank_model_spec.rb +1 -1
  147. data/spec/models/reward_bank_model_spec.rb +1 -1
  148. data/spec/models/reward_list_bank_model_spec.rb +1 -1
  149. data/spec/models/symbol_price_bank_model_spec.rb +1 -1
  150. data/spec/models/trade_bank_model_spec.rb +1 -1
  151. data/spec/models/trade_list_bank_model_spec.rb +1 -1
  152. data/spec/models/transfer_bank_model_spec.rb +1 -1
  153. data/spec/models/transfer_list_bank_model_spec.rb +1 -1
  154. data/spec/models/verification_key_bank_model_spec.rb +1 -1
  155. data/spec/models/verification_key_list_bank_model_spec.rb +1 -1
  156. data/spec/models/workflow_bank_model_spec.rb +1 -1
  157. data/spec/models/workflow_with_details_all_of_bank_model_spec.rb +1 -1
  158. data/spec/models/workflow_with_details_bank_model_spec.rb +1 -1
  159. data/spec/models/workflows_list_bank_model_spec.rb +1 -1
  160. data/spec/spec_helper.rb +1 -1
  161. data/vendor/bundle/ruby/3.2.0/cache/ruby-progressbar-1.12.0.gem +0 -0
  162. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
  163. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/gem_make.out +5 -5
  164. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.4/gem_make.out +5 -5
  165. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.0/gem_make.out +5 -5
  166. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.5/gem_make.out +5 -5
  167. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/base.rb +36 -24
  168. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/calculators/length.rb +0 -2
  169. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/calculators/smoothed_average.rb +9 -0
  170. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/components/percentage.rb +1 -3
  171. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/components/rate.rb +3 -7
  172. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/components/time.rb +27 -29
  173. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/format/formatter.rb +1 -1
  174. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/format/molecule.rb +61 -0
  175. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/format/string.rb +2 -0
  176. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/output.rb +3 -0
  177. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/progress.rb +21 -9
  178. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/time.rb +3 -5
  179. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/timer.rb +6 -0
  180. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/version.rb +3 -0
  181. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar.rb +12 -0
  182. data/vendor/bundle/ruby/3.2.0/specifications/{ruby-progressbar-1.11.0.gemspec → ruby-progressbar-1.12.0.gemspec} +6 -6
  183. metadata +31 -33
  184. data/vendor/bundle/ruby/3.2.0/cache/ruby-progressbar-1.11.0.gem +0 -0
  185. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/calculators/running_average.rb +0 -9
  186. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/components.rb +0 -5
  187. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/format/molecule.rb +0 -60
  188. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/format.rb +0 -3
  189. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/version.rb +0 -3
  190. data/vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar.rb +0 -22
  191. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/LICENSE.txt +0 -0
  192. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/README.md +0 -0
  193. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/Rakefile +0 -0
  194. data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/components/bar.rb +22 -22
  195. /data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/components/title.rb +0 -0
  196. /data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/errors/invalid_progress_error.rb +0 -0
  197. /data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/outputs/non_tty.rb +0 -0
  198. /data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/outputs/null.rb +0 -0
  199. /data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/outputs/tty.rb +0 -0
  200. /data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/refinements/enumerator.rb +0 -0
  201. /data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/refinements.rb +0 -0
  202. /data/vendor/bundle/ruby/3.2.0/gems/{ruby-progressbar-1.11.0 → ruby-progressbar-1.12.0}/lib/ruby-progressbar/throttle.rb +0 -0
@@ -0,0 +1,61 @@
1
+ class ProgressBar
2
+ module Format
3
+ class Molecule
4
+ MOLECULES = {
5
+ :t => [:title_component, :title],
6
+ :T => [:title_component, :title],
7
+ :c => [:progressable, :progress],
8
+ :C => [:progressable, :total],
9
+ :u => [:progressable, :total_with_unknown_indicator],
10
+ :p => [:percentage_component, :percentage],
11
+ :P => [:percentage_component, :percentage_with_precision],
12
+ :j => [:percentage_component, :justified_percentage],
13
+ :J => [:percentage_component, :justified_percentage_with_precision],
14
+ :a => [:time_component, :elapsed_with_label],
15
+ :e => [:time_component, :estimated_with_unknown_oob],
16
+ :E => [:time_component, :estimated_with_friendly_oob],
17
+ :f => [:time_component, :estimated_with_no_oob],
18
+ :l => [:time_component, :estimated_wall_clock],
19
+ :B => [:bar_component, :complete_bar],
20
+ :b => [:bar_component, :bar],
21
+ :W => [:bar_component, :complete_bar_with_percentage],
22
+ :w => [:bar_component, :bar_with_percentage],
23
+ :i => [:bar_component, :incomplete_space],
24
+ :r => [:rate_component, :rate_of_change],
25
+ :R => [:rate_component, :rate_of_change_with_precision]
26
+ }.freeze
27
+
28
+ BAR_MOLECULES = %w{W w B b i}.freeze
29
+
30
+ attr_accessor :key,
31
+ :method_name
32
+
33
+ def initialize(letter)
34
+ self.key = letter
35
+ self.method_name = MOLECULES.fetch(key.to_sym)
36
+ end
37
+
38
+ def bar_molecule?
39
+ BAR_MOLECULES.include? key
40
+ end
41
+
42
+ def non_bar_molecule?
43
+ !bar_molecule?
44
+ end
45
+
46
+ def full_key
47
+ "%#{key}"
48
+ end
49
+
50
+ def lookup_value(environment, length = 0)
51
+ component = environment.__send__(method_name[0])
52
+
53
+ if bar_molecule?
54
+ component.__send__(method_name[1], length).to_s
55
+ else
56
+ component.__send__(method_name[1]).to_s
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -1,3 +1,5 @@
1
+ require 'ruby-progressbar/format/molecule'
2
+
1
3
  class ProgressBar
2
4
  module Format
3
5
  class String < ::String
@@ -1,3 +1,6 @@
1
+ require 'ruby-progressbar/calculators/length'
2
+ require 'ruby-progressbar/throttle'
3
+
1
4
  class ProgressBar
2
5
  class Output
3
6
  DEFAULT_OUTPUT_STREAM = $stdout
@@ -1,21 +1,33 @@
1
1
  require 'ruby-progressbar/errors/invalid_progress_error'
2
+ require 'ruby-progressbar/calculators/smoothed_average'
2
3
 
3
4
  class ProgressBar
4
5
  class Progress
5
- DEFAULT_TOTAL = 100
6
- DEFAULT_BEGINNING_POSITION = 0
7
- DEFAULT_SMOOTHING = 0.1
6
+ DEFAULT_TOTAL = 100
7
+ DEFAULT_BEGINNING_POSITION = 0
8
+ DEFAULT_RUNNING_AVERAGE_RATE = 0.1
9
+ DEFAULT_RUNNING_AVERAGE_CALCULATOR = ProgressBar::Calculators::SmoothedAverage
10
+
11
+ RUNNING_AVERAGE_CALCULATOR_MAP = {
12
+ 'smoothing' => ProgressBar::Calculators::SmoothedAverage
13
+ }.freeze
8
14
 
9
15
  attr_reader :total,
10
16
  :progress
11
17
 
12
18
  attr_accessor :starting_position,
13
19
  :running_average,
14
- :smoothing
20
+ :running_average_calculator,
21
+ :running_average_rate
15
22
 
16
23
  def initialize(options = {})
17
- self.total = options.fetch(:total, DEFAULT_TOTAL)
18
- self.smoothing = options[:smoothing] || DEFAULT_SMOOTHING
24
+ self.total = options.fetch(:total, DEFAULT_TOTAL)
25
+ self.running_average_rate = options[:smoothing] ||
26
+ options[:running_average_rate] ||
27
+ DEFAULT_RUNNING_AVERAGE_RATE
28
+ self.running_average_calculator = RUNNING_AVERAGE_CALCULATOR_MAP.
29
+ fetch(options[:running_average_calculator],
30
+ DEFAULT_RUNNING_AVERAGE_CALCULATOR)
19
31
 
20
32
  start :at => DEFAULT_BEGINNING_POSITION
21
33
  end
@@ -66,9 +78,9 @@ class Progress
66
78
 
67
79
  @progress = new_progress
68
80
 
69
- self.running_average = Calculators::RunningAverage.calculate(running_average,
70
- absolute,
71
- smoothing)
81
+ self.running_average = running_average_calculator.calculate(running_average,
82
+ absolute,
83
+ running_average_rate)
72
84
  end
73
85
 
74
86
  def total=(new_total)
@@ -17,11 +17,9 @@ class Time
17
17
  end
18
18
 
19
19
  def unmocked_time_method
20
- @unmocked_time_method ||= begin
21
- TIME_MOCKING_LIBRARY_METHODS.find do |method|
22
- time.respond_to? method
23
- end
24
- end
20
+ @unmocked_time_method ||= TIME_MOCKING_LIBRARY_METHODS.find do |method|
21
+ time.respond_to? method
22
+ end
25
23
  end
26
24
 
27
25
  protected
@@ -28,6 +28,10 @@ class Timer
28
28
  start
29
29
  end
30
30
 
31
+ def now
32
+ time.now
33
+ end
34
+
31
35
  def started?
32
36
  started_at
33
37
  end
@@ -51,6 +55,8 @@ class Timer
51
55
  end
52
56
 
53
57
  def elapsed_seconds
58
+ return 0 unless started?
59
+
54
60
  ((stopped_at || time.now) - started_at)
55
61
  end
56
62
 
@@ -0,0 +1,3 @@
1
+ class ProgressBar
2
+ VERSION = '1.12.0'.freeze
3
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ruby-progressbar/base'
4
+ require 'ruby-progressbar/refinements' if Module.
5
+ private_instance_methods.
6
+ include?(:using)
7
+
8
+ class ProgressBar
9
+ def self.create(*args)
10
+ ProgressBar::Base.new(*args)
11
+ end
12
+ end
@@ -1,16 +1,16 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: ruby-progressbar 1.11.0 ruby lib
2
+ # stub: ruby-progressbar 1.12.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby-progressbar".freeze
6
- s.version = "1.11.0"
6
+ s.version = "1.12.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
- s.metadata = { "bug_tracker_uri" => "https://github.com/jfelchner/ruby-progressbar/issues", "changelog_uri" => "https://github.com/jfelchner/ruby-progressbar/blob/master/CHANGELOG.md", "documentation_uri" => "https://github.com/jfelchner/ruby-progressbar/tree/releases/v1.11.0", "homepage_uri" => "https://github.com/jfelchner/ruby-progressbar", "source_code_uri" => "https://github.com/jfelchner/ruby-progressbar", "wiki_uri" => "https://github.com/jfelchner/ruby-progressbar/wiki" } if s.respond_to? :metadata=
9
+ s.metadata = { "bug_tracker_uri" => "https://github.com/jfelchner/ruby-progressbar/issues", "changelog_uri" => "https://github.com/jfelchner/ruby-progressbar/blob/master/CHANGELOG.md", "documentation_uri" => "https://github.com/jfelchner/ruby-progressbar/tree/releases/v1.12.0", "homepage_uri" => "https://github.com/jfelchner/ruby-progressbar", "source_code_uri" => "https://github.com/jfelchner/ruby-progressbar", "wiki_uri" => "https://github.com/jfelchner/ruby-progressbar/wiki" } if s.respond_to? :metadata=
10
10
  s.require_paths = ["lib".freeze]
11
11
  s.authors = ["thekompanee".freeze, "jfelchner".freeze]
12
- s.cert_chain = ["-----BEGIN CERTIFICATE-----\nMIIEGDCCAoCgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAyMTAwLgYDVQQDDCdhY2Nv\ndW50c19ydWJ5Z2Vtcy9EQz10aGVrb21wYW5lZS9EQz1jb20wHhcNMjAxMjI2MjIz\nMTE2WhcNMjExMjI2MjIzMTE2WjAyMTAwLgYDVQQDDCdhY2NvdW50c19ydWJ5Z2Vt\ncy9EQz10aGVrb21wYW5lZS9EQz1jb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAw\nggGKAoIBgQCqhYn5ODEoLvuBIF2M1GzoaZU28+ntP5QApvDE0Te04n0JbBC1cNYH\nmr71neeSx7tlZ9w9kJ/8GNcY5bm7pNJqhyhfc+uG9M7FttcxM8AYXogjcdUDP234\n+TdmZIz20JxtWBgAZK2I3ktlgLFLC3Pxq63yzhJ75Xok07Wh+ypwjGzDNofPhz+y\nXR+UeUTp2UGe7kDVoqu/AwwPVhk1qUIRFLfC8SLDTD0CuNW3/AnkwQrKSm8vkiIn\nq9GCnOq0+jQly0b6a1Gi3ZDYEEswnTzziw2gotUZnQkF5bcOcxK1CB/Okk2jtG7i\nztMEU785tERbOSszZrz9rBS/+GnMxlD0pxy50zFfHX3jY1hwnwGjE8Gg+0iYr/tm\neysjhcbZfKrMynoqAioCSwstIwtYYYYpYzCPZzwaIBaBqQmUTkuMeiGbAdOdFOrR\nlOgl5jxCYbNOOTaXbm0nGBFaTucB88+JLbsNAuoNGUf/ybDcZ1zKRkMr2vtb+OtL\nGoP81fN6l88CAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O\nBBYEFC+HleDjPYe35DNu6n/aeK2oB4ugMA0GCSqGSIb3DQEBCwUAA4IBgQCbuxKj\nZyvFu5mUDEWCf1dT5mqFSyFznVCjQAQygDnz6JkCQlIG93IDtVLEmHrx7hm3dOYt\nHgPlsSgkoYIgsLYsR9ZIKjA2O5m3QUbo9uOtF4iRi0Obni8fVv7VZVebRfA7ypCo\nn625lDRIzc/zGVcI37bzIlDXC0aK3oaBVFmN1Uj5LNMW62hTDdMBx4HcUKI45R3g\nclUG96OBIyrYky3j6zpy6EpBaEdRWR68Yn4Tdba7xE9WzP3DCInjX3KPx+f0PPVK\nHzsXX6TlwXk2P9DwOTZRjz7vAmvTgZGWjlfq3dgQJBgjB+UKQVHxKEGUC/comr7c\nvPnXgn+nF38pK/hp/O9/lTpNplKrUvOB9+6nkwbxCPTQQO8In3pC6ixUzr/6wx9R\nURbz4/Czf5LMUmzqDni0GvBkXElaXzaIRoPM/T7b1LrRsZO3DwGFAasSrR27+ZgU\nSv+7zM1SqVOK2Vhp99UBBVIZTHSJWh4sCU7dJrUJTqvwwS3ayTiUlIi5TdQ=\n-----END CERTIFICATE-----\n".freeze]
13
- s.date = "2020-12-31"
12
+ s.cert_chain = ["-----BEGIN CERTIFICATE-----\nMIIEdjCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADAyMTAwLgYDVQQDDCdhY2Nv\ndW50c19ydWJ5Z2Vtcy9EQz10aGVrb21wYW5lZS9EQz1jb20wHhcNMjMwMjI2MTcx\nMDI1WhcNMjYwMjI1MTcxMDI1WjAyMTAwLgYDVQQDDCdhY2NvdW50c19ydWJ5Z2Vt\ncy9EQz10aGVrb21wYW5lZS9EQz1jb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAw\nggGKAoIBgQCqhYn5ODEoLvuBIF2M1GzoaZU28+ntP5QApvDE0Te04n0JbBC1cNYH\nmr71neeSx7tlZ9w9kJ/8GNcY5bm7pNJqhyhfc+uG9M7FttcxM8AYXogjcdUDP234\n+TdmZIz20JxtWBgAZK2I3ktlgLFLC3Pxq63yzhJ75Xok07Wh+ypwjGzDNofPhz+y\nXR+UeUTp2UGe7kDVoqu/AwwPVhk1qUIRFLfC8SLDTD0CuNW3/AnkwQrKSm8vkiIn\nq9GCnOq0+jQly0b6a1Gi3ZDYEEswnTzziw2gotUZnQkF5bcOcxK1CB/Okk2jtG7i\nztMEU785tERbOSszZrz9rBS/+GnMxlD0pxy50zFfHX3jY1hwnwGjE8Gg+0iYr/tm\neysjhcbZfKrMynoqAioCSwstIwtYYYYpYzCPZzwaIBaBqQmUTkuMeiGbAdOdFOrR\nlOgl5jxCYbNOOTaXbm0nGBFaTucB88+JLbsNAuoNGUf/ybDcZ1zKRkMr2vtb+OtL\nGoP81fN6l88CAwEAAaOBljCBkzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV\nHQ4EFgQUL4eV4OM9h7fkM27qf9p4ragHi6AwLAYDVR0RBCUwI4EhYWNjb3VudHMr\ncnVieWdlbXNAdGhla29tcGFuZWUuY29tMCwGA1UdEgQlMCOBIWFjY291bnRzK3J1\nYnlnZW1zQHRoZWtvbXBhbmVlLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAD/tBN1cM\n8Qu6u+rPM3SEtlEK/ZdVY0IowXtXMskkderNBJ4HY+xBfIWyAXLTr3Fy6xscVZ95\nraFCiWHqvR577u3/BsVZ5BoQ0g25oY2bwoamQSdx71ygs25Q+UFbg6lHq6olszj0\nHqKXUy/iPFb+OzGq7NOtKOD5pHl3ew8H7U5tfh0kx6B5TdL9BZLurjskW0n2G+kY\nNSGCTGYU8wY4Bsk/AmfoFT/ATwmrf68CTD+IBY5yvt2DGvcyuSrX1RQP8Vk//0EP\nJ2ezTNGIBeQFcyyo09gMfy1yxv9XAvwmy6pAx7/m/F2XzTiXuzmJ7zJ6J0OaHUG4\nsvJgf3o9Eor2okQND60Qdpdl4qdSy3KaNqvQQbTRB96e/+K8ksz4rras5jPaAs0p\nDV37k4cni6c/jUm2CqepsJ/dbzeWdkhcuO6hwEQV0jvFky5C6d5hHcrbJwxl1sTL\nV+pWW6L9MSZzKkjWVJXD43B3tWBjIDthQVTzS4j90PUkUXgBXjS7Jxj/\n-----END CERTIFICATE-----\n".freeze]
13
+ s.date = "2023-03-01"
14
14
  s.description = "Ruby/ProgressBar is an extremely flexible text progress bar library for Ruby. The output can be customized with a flexible formatting system including: percentage, bars of various formats, elapsed time and estimated time remaining.".freeze
15
15
  s.email = ["support@thekompanee.com".freeze]
16
16
  s.homepage = "https://github.com/jfelchner/ruby-progressbar".freeze
@@ -25,5 +25,5 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency(%q<rspec>.freeze, ["~> 3.7"])
26
26
  s.add_development_dependency(%q<rspectacular>.freeze, ["~> 0.70.6"])
27
27
  s.add_development_dependency(%q<fuubar>.freeze, ["~> 2.3"])
28
- s.add_development_dependency(%q<timecop>.freeze, ["= 0.6.0"])
28
+ s.add_development_dependency(%q<timecop>.freeze, ["~> 0.9"])
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cybrid_api_bank_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.62.65
4
+ version: 0.62.67
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cybrid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-01 00:00:00.000000000 Z
11
+ date: 2023-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -324,7 +324,7 @@ files:
324
324
  - vendor/bundle/ruby/3.2.0/cache/rspec-mocks-3.12.3.gem
325
325
  - vendor/bundle/ruby/3.2.0/cache/rspec-support-3.12.0.gem
326
326
  - vendor/bundle/ruby/3.2.0/cache/rubocop-0.66.0.gem
327
- - vendor/bundle/ruby/3.2.0/cache/ruby-progressbar-1.11.0.gem
327
+ - vendor/bundle/ruby/3.2.0/cache/ruby-progressbar-1.12.0.gem
328
328
  - vendor/bundle/ruby/3.2.0/cache/stringio-3.0.5.gem
329
329
  - vendor/bundle/ruby/3.2.0/cache/typhoeus-1.4.0.gem
330
330
  - vendor/bundle/ruby/3.2.0/cache/unicode-display_width-1.5.0.gem
@@ -2574,35 +2574,33 @@ files:
2574
2574
  - vendor/bundle/ruby/3.2.0/gems/rubocop-0.66.0/lib/rubocop/version.rb
2575
2575
  - vendor/bundle/ruby/3.2.0/gems/rubocop-0.66.0/lib/rubocop/warning.rb
2576
2576
  - vendor/bundle/ruby/3.2.0/gems/rubocop-0.66.0/lib/rubocop/yaml_duplication_checker.rb
2577
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/LICENSE.txt
2578
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/README.md
2579
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/Rakefile
2580
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar.rb
2581
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/base.rb
2582
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/calculators/length.rb
2583
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/calculators/running_average.rb
2584
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/components.rb
2585
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/components/bar.rb
2586
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/components/percentage.rb
2587
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/components/rate.rb
2588
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/components/time.rb
2589
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/components/title.rb
2590
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/errors/invalid_progress_error.rb
2591
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/format.rb
2592
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/format/formatter.rb
2593
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/format/molecule.rb
2594
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/format/string.rb
2595
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/output.rb
2596
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/outputs/non_tty.rb
2597
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/outputs/null.rb
2598
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/outputs/tty.rb
2599
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/progress.rb
2600
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/refinements.rb
2601
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/refinements/enumerator.rb
2602
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/throttle.rb
2603
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/time.rb
2604
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/timer.rb
2605
- - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/version.rb
2577
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/LICENSE.txt
2578
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/README.md
2579
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/Rakefile
2580
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar.rb
2581
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/base.rb
2582
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/calculators/length.rb
2583
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/calculators/smoothed_average.rb
2584
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/components/bar.rb
2585
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/components/percentage.rb
2586
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/components/rate.rb
2587
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/components/time.rb
2588
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/components/title.rb
2589
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/errors/invalid_progress_error.rb
2590
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/format/formatter.rb
2591
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/format/molecule.rb
2592
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/format/string.rb
2593
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/output.rb
2594
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/outputs/non_tty.rb
2595
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/outputs/null.rb
2596
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/outputs/tty.rb
2597
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/progress.rb
2598
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/refinements.rb
2599
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/refinements/enumerator.rb
2600
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/throttle.rb
2601
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/time.rb
2602
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/timer.rb
2603
+ - vendor/bundle/ruby/3.2.0/gems/ruby-progressbar-1.12.0/lib/ruby-progressbar/version.rb
2606
2604
  - vendor/bundle/ruby/3.2.0/gems/stringio-3.0.5/README.md
2607
2605
  - vendor/bundle/ruby/3.2.0/gems/stringio-3.0.5/ext/stringio/Makefile
2608
2606
  - vendor/bundle/ruby/3.2.0/gems/stringio-3.0.5/ext/stringio/extconf.rb
@@ -2734,7 +2732,7 @@ files:
2734
2732
  - vendor/bundle/ruby/3.2.0/specifications/rspec-mocks-3.12.3.gemspec
2735
2733
  - vendor/bundle/ruby/3.2.0/specifications/rspec-support-3.12.0.gemspec
2736
2734
  - vendor/bundle/ruby/3.2.0/specifications/rubocop-0.66.0.gemspec
2737
- - vendor/bundle/ruby/3.2.0/specifications/ruby-progressbar-1.11.0.gemspec
2735
+ - vendor/bundle/ruby/3.2.0/specifications/ruby-progressbar-1.12.0.gemspec
2738
2736
  - vendor/bundle/ruby/3.2.0/specifications/stringio-3.0.5.gemspec
2739
2737
  - vendor/bundle/ruby/3.2.0/specifications/typhoeus-1.4.0.gemspec
2740
2738
  - vendor/bundle/ruby/3.2.0/specifications/unicode-display_width-1.5.0.gemspec
@@ -1,9 +0,0 @@
1
- class ProgressBar
2
- module Calculators
3
- class RunningAverage
4
- def self.calculate(current_average, new_value_to_average, smoothing_factor)
5
- new_value_to_average * (1.0 - smoothing_factor) + current_average * smoothing_factor
6
- end
7
- end
8
- end
9
- end
@@ -1,5 +0,0 @@
1
- require 'ruby-progressbar/components/bar'
2
- require 'ruby-progressbar/components/percentage'
3
- require 'ruby-progressbar/components/rate'
4
- require 'ruby-progressbar/components/time'
5
- require 'ruby-progressbar/components/title'
@@ -1,60 +0,0 @@
1
- class ProgressBar
2
- module Format
3
- class Molecule
4
- MOLECULES = {
5
- :t => [:title_comp, :title],
6
- :T => [:title_comp, :title],
7
- :c => [:progressable, :progress],
8
- :C => [:progressable, :total],
9
- :u => [:progressable, :total_with_unknown_indicator],
10
- :p => [:percentage, :percentage],
11
- :P => [:percentage, :percentage_with_precision],
12
- :j => [:percentage, :justified_percentage],
13
- :J => [:percentage, :justified_percentage_with_precision],
14
- :a => [:time, :elapsed_with_label],
15
- :e => [:time, :estimated_with_unknown_oob],
16
- :E => [:time, :estimated_with_friendly_oob],
17
- :f => [:time, :estimated_with_no_oob],
18
- :B => [:bar, :complete_bar],
19
- :b => [:bar, :bar],
20
- :W => [:bar, :complete_bar_with_percentage],
21
- :w => [:bar, :bar_with_percentage],
22
- :i => [:bar, :incomplete_space],
23
- :r => [:rate, :rate_of_change],
24
- :R => [:rate, :rate_of_change_with_precision]
25
- }.freeze
26
-
27
- BAR_MOLECULES = %w{W w B b i}.freeze
28
-
29
- attr_accessor :key,
30
- :method_name
31
-
32
- def initialize(letter)
33
- self.key = letter
34
- self.method_name = MOLECULES.fetch(key.to_sym)
35
- end
36
-
37
- def bar_molecule?
38
- BAR_MOLECULES.include? key
39
- end
40
-
41
- def non_bar_molecule?
42
- !bar_molecule?
43
- end
44
-
45
- def full_key
46
- "%#{key}"
47
- end
48
-
49
- def lookup_value(environment, length = 0)
50
- component = environment.__send__(method_name[0])
51
-
52
- if bar_molecule?
53
- component.__send__(method_name[1], length).to_s
54
- else
55
- component.__send__(method_name[1]).to_s
56
- end
57
- end
58
- end
59
- end
60
- end
@@ -1,3 +0,0 @@
1
- require 'ruby-progressbar/format/molecule'
2
- require 'ruby-progressbar/format/formatter'
3
- require 'ruby-progressbar/format/string'
@@ -1,3 +0,0 @@
1
- class ProgressBar
2
- VERSION = '1.11.0'.freeze
3
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'ruby-progressbar/output'
4
- require 'ruby-progressbar/outputs/tty'
5
- require 'ruby-progressbar/outputs/non_tty'
6
- require 'ruby-progressbar/timer'
7
- require 'ruby-progressbar/progress'
8
- require 'ruby-progressbar/throttle'
9
- require 'ruby-progressbar/calculators/length'
10
- require 'ruby-progressbar/calculators/running_average'
11
- require 'ruby-progressbar/components'
12
- require 'ruby-progressbar/format'
13
- require 'ruby-progressbar/base'
14
- require 'ruby-progressbar/refinements' if Module.
15
- private_instance_methods.
16
- include?(:using)
17
-
18
- class ProgressBar
19
- def self.create(*args)
20
- ProgressBar::Base.new(*args)
21
- end
22
- end
@@ -32,22 +32,6 @@ class Bar
32
32
  end
33
33
  end
34
34
 
35
- private
36
-
37
- def integrated_percentage_complete_string
38
- return standard_complete_string if completed_length < 5
39
-
40
- " #{progress.percentage_completed} ".to_s.center(completed_length, progress_mark)
41
- end
42
-
43
- def standard_complete_string
44
- progress_mark * completed_length
45
- end
46
-
47
- def incomplete_string
48
- remainder_mark * (length - completed_length)
49
- end
50
-
51
35
  def bar(length)
52
36
  self.length = length
53
37
 
@@ -66,12 +50,6 @@ class Bar
66
50
  to_s(:format => :integrated_percentage)
67
51
  end
68
52
 
69
- def unknown_string
70
- unknown_frame_string = unknown_progress_frame * ((length / upa_steps.size) + 2)
71
-
72
- unknown_frame_string[0, length]
73
- end
74
-
75
53
  def incomplete_space(length)
76
54
  self.length = length
77
55
 
@@ -88,6 +66,28 @@ class Bar
88
66
  integrated_percentage_complete_string
89
67
  end
90
68
 
69
+ private
70
+
71
+ def integrated_percentage_complete_string
72
+ return standard_complete_string if completed_length < 5
73
+
74
+ " #{progress.percentage_completed} ".to_s.center(completed_length, progress_mark)
75
+ end
76
+
77
+ def standard_complete_string
78
+ progress_mark * completed_length
79
+ end
80
+
81
+ def incomplete_string
82
+ remainder_mark * (length - completed_length)
83
+ end
84
+
85
+ def unknown_string
86
+ unknown_frame_string = unknown_progress_frame * ((length / upa_steps.size) + 2)
87
+
88
+ unknown_frame_string[0, length]
89
+ end
90
+
91
91
  def completed_length
92
92
  (length * progress.percentage_completed / 100).floor
93
93
  end