powerbar 1.0.18 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ad2018dfce11de9b6456f7ab23796b3d03539ae
4
- data.tar.gz: 522905a1c1fc0aa96a4fbdd99f7bd564d225e46c
3
+ metadata.gz: 9a0cc486f2515e27672f8fe8bf716da2005163ac
4
+ data.tar.gz: 66c156e5fbb12d5b6e8635a53e8b320508fd5724
5
5
  SHA512:
6
- metadata.gz: 4a31bd0d27710a2868b14e0ea26987bc1603d91f1fdb8c6f9905f7a6a5fdcc6179fdfa97ae5a0d00901dd63a02580ed74ff57bbd9596c5da3a5b99b510012359
7
- data.tar.gz: 1b54b4cdb4e797bf9dc8f72f5938e536d2923dfbc4e31b9f45ae99f79756f71d9b55c958dbe8a1cc298c81d8cabf1f0784e53362b4a3ce9db1d2a1a562d338a0
6
+ metadata.gz: e1e2fd86539ab93e1b009d29785efe072e210bc355156e86f631f2edbd3b71a7c6e095d2618426cbcfec60449d8b554c9e8fe1508459bd04b568d1c958f9c83a
7
+ data.tar.gz: c8b568d9fc756e64a67886ff4624a858d72b78b6bf440c21d7a9c1f4f0fa81a5d590b3d7b62bd3bde826db25531a1a249d7ba48f6b49ed4504c6f656cc85332d
@@ -22,6 +22,7 @@
22
22
 
23
23
  require 'powerbar/version'
24
24
  require 'hashie/mash'
25
+ require 'io/console'
25
26
 
26
27
  #
27
28
  # This is PowerBar - The last progressbar-library you'll ever need.
@@ -308,14 +309,9 @@ class PowerBar
308
309
  end
309
310
 
310
311
  def terminal_width
311
- if /solaris/ =~ RUBY_PLATFORM && (`stty` =~ /\brows = (\d+).*\bcolumns = (\d+)/)
312
- w, r = [$2, $1]
313
- else
314
- w, r = `stty size 2>/dev/null`.split.reverse
315
- end
316
- w = `tput cols` unless w
317
- w = w.to_i if w
318
- w
312
+ rows, cols = IO.console.winsize
313
+ cols -= 1 if Gem.win_platform?
314
+ cols
319
315
  end
320
316
 
321
317
  private
@@ -1,3 +1,3 @@
1
1
  class Powerbar
2
- VERSION = "1.0.18"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -12,6 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.description = %q{The last progressbar-library you'll ever need}
13
13
  s.license = "MIT"
14
14
 
15
+ s.required_ruby_version = '> 1.9.3'
15
16
  s.add_dependency "hashie", ">= 1.1.0"
16
17
 
17
18
  s.files = `git ls-files`.split("\n").reject {|e| e.start_with? 'ass/'}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: powerbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.18
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-25 00:00:00.000000000 Z
11
+ date: 2018-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -51,9 +51,9 @@ require_paths:
51
51
  - lib
52
52
  required_ruby_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ">="
54
+ - - ">"
55
55
  - !ruby/object:Gem::Version
56
- version: '0'
56
+ version: 1.9.3
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="