progress 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmExNzc5ZGQ5Mzc1ZGQzY2Y4Zjg0N2ExNGMyZGNlNzQ0NDhmZTIyYQ==
4
+ NDYxYmQzMDY4NTI1ZmYyOTZlNmFhZTE3MzRlZDc5ZjM2MjYwNDQ1NQ==
5
5
  data.tar.gz: !binary |-
6
- MThiNTU2Yzc1MTAzMGI3ZDY5M2UwNDBhZmZhOTM1ZWI0YzMyNDEyNg==
6
+ NWJkMDUyYmIyOTg3MzM5NGViMWVmMDRkYTk0ZTYyMGI0ZTNhN2EyZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjIxMGI1Y2Q3OGI1MzJhZDZmMzJmNTllZDFjMTE1ODhjZTM0OTliZWQwODhm
10
- MDdmOWM1NWU5NGM2Y2I1OTFkMjJkYjdhZTE5ZmRlOThmZGNhZDdjYzRhYTJj
11
- NGNjOTM2YmNkMjdiOThlYWE1ZDNhM2EyZWRhMTgyYTVjMjJlMGU=
9
+ OTA2NWQxNDlhMDA1Y2Y5ZjZhMzEzOTVmNmEyYWY1ZjJlMGNjZWIzYTU0MTY3
10
+ YWM0ZTQ3MmUzNGUxZWMzNDNiNzIzZTA2NDM0ZDEzZTVlYWNlOWY0MjRjOWJl
11
+ Nzg0N2ZiZjA5ZTU1MjlkMTZkZDNhZTBiOGE4YWJhNzNhZGVmNjM=
12
12
  data.tar.gz: !binary |-
13
- ZmE3MDVkNDgxOTY4NmUxMGY1MjAzMjMwMzEwNTkwYmFhYzA3ZmExYjExZGZm
14
- YjYyZDRiMzc4MDBjOGQ1ZWRiYWZjNDA2NzkwNDk4NjU5NTM0NjljNTE0MjM4
15
- OTcxOGRlY2U4NjhmZWQzZDUyZDNlNzFkNDljZWIwOWQzYWVkZTI=
13
+ ZjJiYzE4OTY4YmM0OThhYzMwNGE2YmRjZTQ5MmM4MzFhZWIyNzVjM2U5YTg5
14
+ ZGFmMjUxZThkNjA4MzhiNjFiZmZjNDk4YzA5MDcxZjRlZmQ4NzdjYThkMDg5
15
+ YTIwM2QwZTJkOWNkYzJhNGYyNWNkMDY2NmRiMGViZWM5MjI2ODI=
@@ -17,6 +17,9 @@ Metrics/CyclomaticComplexity:
17
17
  Metrics/MethodLength:
18
18
  Max: 20
19
19
 
20
+ Metrics/ModuleLength:
21
+ Max: 160
22
+
20
23
  Metrics/PerceivedComplexity:
21
24
  Max: 10
22
25
 
@@ -47,6 +50,9 @@ Style/IfUnlessModifier:
47
50
  Style/IndentHash:
48
51
  EnforcedStyle: consistent
49
52
 
53
+ Style/ParallelAssignment:
54
+ Enabled: false
55
+
50
56
  Style/PercentLiteralDelimiters:
51
57
  PreferredDelimiters:
52
58
  '%w': '[]'
@@ -1,10 +1,14 @@
1
+ sudo: false
1
2
  language: ruby
3
+ before_install:
4
+ - gem update bundler
2
5
  rvm:
3
- - 1.8.7
4
- - 1.9.2
5
- - 1.9.3
6
+ - '1.8'
7
+ - '1.9'
6
8
  - '2.0'
7
9
  - '2.1'
10
+ - '2.2'
11
+ - '2.3.0'
8
12
  - jruby-18mode
9
13
  - jruby-19mode
10
14
  - ree
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2014 Ivan Kuchin
1
+ Copyright (c) 2010-2016 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) 2010-2014 Ivan Kuchin. See LICENSE.txt for details.
140
+ Copyright (c) 2010-2016 Ivan Kuchin. See LICENSE.txt for details.
@@ -60,6 +60,7 @@ class Progress
60
60
  @total = total
61
61
  @current = 0.0
62
62
  @title = title
63
+ @mutex = Mutex.new
63
64
  end
64
65
 
65
66
  def to_f(inner)
@@ -77,7 +78,7 @@ class Progress
77
78
  @step = step
78
79
  @note = note
79
80
  ret = yield if block_given?
80
- Thread.exclusive do
81
+ @mutex.synchronize do
81
82
  @current += step
82
83
  end
83
84
  ret
@@ -87,7 +88,7 @@ class Progress
87
88
  @step = new_current - @current
88
89
  @note = note
89
90
  ret = yield if block_given?
90
- Thread.exclusive do
91
+ @mutex.synchronize do
91
92
  @current = new_current
92
93
  end
93
94
  ret
@@ -176,7 +176,7 @@ class Progress
176
176
  if terminal_title?
177
177
  out << "\e]0;"
178
178
  unless options[:finish]
179
- out << message.gsub(/\e\[\dm/, '').gsub("\a", '␇')
179
+ out << message.gsub(/\e\[\dm/, '').tr("\a", '␇')
180
180
  end
181
181
  out << "\a"
182
182
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'progress'
5
- s.version = '3.1.0'
5
+ s.version = '3.1.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']
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.1.0
4
+ version: 3.1.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: 2014-12-22 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project: progress
85
- rubygems_version: 2.4.5
85
+ rubygems_version: 2.4.7
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Show progress of long running tasks