progress 3.5.0 → 3.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88486a9fc4ddbe22b0ba6c4d398c71827a2dca05ac9fee01a4a715a72e8a1ddc
4
- data.tar.gz: ff8bd4245c78217409212fb60bdc0b3e205604290ffd2005371e0c38cf7c7eee
3
+ metadata.gz: d9c6656ecc53abb76bdb2dab90d3edcab0ee8ab7d44be05ac3107365a5b410db
4
+ data.tar.gz: fc6183213347b561fa6e8c05ded7100df53850c215974c3daaebad5e90e5ea62
5
5
  SHA512:
6
- metadata.gz: a52da0e1033be9ca9069c62c92aa7936c95d4f45df94cbacfb6de439d96fd441a2c59a72750b9728136f11c08ad4e8ade9b51549ee17a3f3da47e915a25cb3a7
7
- data.tar.gz: 1a413c2310ae732d1a3bfbe53e86b1a55dbb6677920e6d2cd3307ec59e67a028de5cafa83e53fb728b76ccdbd9b8bbddc2dcf4b5660887837d1fbc5ac77f26e7
6
+ metadata.gz: eea0fea5cac40f654272d8e0250b310f136bad26b5aa4fdac811c673a51829d9397e1d84a4498657daa050744478fe4c707e96563017c2636df080f2f7d7a1d2
7
+ data.tar.gz: f1d3cf03b6b24311fca2f852e248b741f9a05b68790b8f71d4842b483755c7eb5bc362c921c4bf13732d9882bc8f4ba4cd99428de72241466d7da164ea84adb3
@@ -14,7 +14,7 @@ Layout/DotPosition:
14
14
  Layout/EndAlignment:
15
15
  EnforcedStyleAlignWith: variable
16
16
 
17
- Layout/IndentHash:
17
+ Layout/IndentFirstHashElement:
18
18
  EnforcedStyle: consistent
19
19
 
20
20
  Layout/SpaceBeforeBlockBraces:
@@ -73,6 +73,9 @@ Style/NumericPredicate:
73
73
  Style/ParallelAssignment:
74
74
  Enabled: false
75
75
 
76
+ Style/SafeNavigation:
77
+ Enabled: false
78
+
76
79
  Style/Semicolon:
77
80
  AllowAsExpressionSeparator: true
78
81
 
@@ -1,23 +1,23 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  before_install:
4
- - gem update bundler
4
+ - gem install bundler || gem install bundler --version '< 2'
5
5
  rvm:
6
6
  - '1.9.3-p551'
7
7
  - '2.0.0-p648'
8
8
  - '2.1.10'
9
9
  - '2.2.10'
10
10
  - '2.3.8'
11
- - '2.4.5'
12
- - '2.5.3'
13
- - 'jruby-9.0.5.0'
11
+ - '2.4.6'
12
+ - '2.5.5'
13
+ - '2.6.3'
14
14
  - 'jruby-9.1.9.0'
15
15
  script: bundle exec rspec
16
16
  matrix:
17
17
  include:
18
18
  - env: RUBOCOP=✓
19
- rvm: '2.4.5'
19
+ rvm: '2.4.6'
20
20
  script: bundle exec rubocop
21
21
  - env: CHECK_RUBIES=✓
22
- rvm: '2.4.5'
22
+ rvm: '2.4.6'
23
23
  script: bundle exec travis_check_rubies
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## unreleased
4
4
 
5
+ ## v3.5.1 (2019-05-25)
6
+
7
+ * Enable frozen string literals [@toy](https://github.com/toy)
8
+
5
9
  ## v3.5.0 (2018-10-19)
6
10
 
7
11
  * Add `Progress.without_beeper` for stopping periodical refresh of progress/eta for the duration of the block [@toy](https://github.com/toy)
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008-2018 Ivan Kuchin
1
+ Copyright (c) 2008-2019 Ivan Kuchin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -137,4 +137,4 @@ Or if you know that B runs 9 times faster than C:
137
137
 
138
138
  ## Copyright
139
139
 
140
- Copyright (c) 2008-2018 Ivan Kuchin. See LICENSE.txt for details.
140
+ Copyright (c) 2008-2019 Ivan Kuchin. See LICENSE.txt for details.
@@ -1,4 +1,5 @@
1
1
  # encoding: UTF-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'singleton'
4
5
  require 'thread'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'progress'
2
4
 
3
5
  module ActiveRecord
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Progress
2
4
  # Repeatedly run block of code after time interval
3
5
  class Beeper
@@ -1,4 +1,5 @@
1
1
  # encoding: UTF-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  class Progress
4
5
  # Class methods of Progress
@@ -181,7 +182,7 @@ class Progress
181
182
  def message_for_output(options)
182
183
  message = build_message(options)
183
184
 
184
- out = ''
185
+ out = ''.dup
185
186
  out << "\r" if stay_on_line?
186
187
  out << message
187
188
  out << "\e[K" if stay_on_line?
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'enumerator'
2
4
  require 'progress/with_progress'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Progress
2
4
  # Estimate time of arrival
3
5
  class Eta
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'progress'
2
4
 
3
5
  # Add times_with_progress method to Integer
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'progress'
2
4
 
3
5
  # Add Progress method as alias to Progress.start
4
6
  module Kernel
5
- private
7
+ private # rubocop:disable Layout/IndentationWidth
6
8
 
7
9
  define_method :Progress do |*args, &block|
8
10
  Progress.start(*args, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'progress'
2
4
  require 'stringio'
3
5
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'progress'
5
- s.version = '3.5.0'
5
+ s.version = '3.5.1'
6
6
  s.summary = %q{Show progress of long running tasks}
7
7
  s.homepage = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
@@ -12,6 +12,13 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.rubyforge_project = s.name
14
14
 
15
+ s.metadata = {
16
+ 'bug_tracker_uri' => "https://github.com/toy/#{s.name}/issues",
17
+ 'changelog_uri' => "https://github.com/toy/#{s.name}/blob/master/CHANGELOG.markdown",
18
+ 'documentation_uri' => "https://www.rubydoc.info/gems/#{s.name}/#{s.version}",
19
+ 'source_code_uri' => "https://github.com/toy/#{s.name}",
20
+ }
21
+
15
22
  s.files = `git ls-files`.split("\n")
16
23
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
24
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rspec'
2
4
  require 'progress'
3
5
  require 'tempfile'
@@ -202,7 +204,7 @@ describe Progress do
202
204
 
203
205
  describe String do
204
206
  it 'calls each only once on StringIO' do
205
- enum = "a\nb\nc"
207
+ enum = "a\nb\nc".dup
206
208
  expect(enum).not_to receive(:each)
207
209
  io = StringIO.new(enum)
208
210
  expect(StringIO).to receive(:new).with(enum).and_return(io)
@@ -277,7 +279,8 @@ describe Progress do
277
279
 
278
280
  with_progress = enum.with_progress
279
281
  expect(with_progress).not_to receive(:warn)
280
- expect(with_progress.each{}).to eq(nil)
282
+ expect(with_progress.each{}).
283
+ to eq(CSV.open('spec/test.csv').each{})
281
284
  end
282
285
  else
283
286
  it 'calls each only once for CSV and shows warning' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progress
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-19 00:00:00.000000000 Z
11
+ date: 2019-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -66,7 +66,11 @@ files:
66
66
  homepage: http://github.com/toy/progress
67
67
  licenses:
68
68
  - MIT
69
- metadata: {}
69
+ metadata:
70
+ bug_tracker_uri: https://github.com/toy/progress/issues
71
+ changelog_uri: https://github.com/toy/progress/blob/master/CHANGELOG.markdown
72
+ documentation_uri: https://www.rubydoc.info/gems/progress/3.5.1
73
+ source_code_uri: https://github.com/toy/progress
70
74
  post_install_message:
71
75
  rdoc_options: []
72
76
  require_paths:
@@ -82,8 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
86
  - !ruby/object:Gem::Version
83
87
  version: '0'
84
88
  requirements: []
85
- rubyforge_project: progress
86
- rubygems_version: 2.7.7
89
+ rubygems_version: 3.0.3
87
90
  signing_key:
88
91
  specification_version: 4
89
92
  summary: Show progress of long running tasks