listpager 1.0 → 1.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: 9d70bf27f951f700d53cc6fb25c3c62d652ae150
4
- data.tar.gz: 8483fcf02b0b1373a10c4d1f5ef0585ef202cc60
3
+ metadata.gz: 99c5f337edc88d63d288790ab7b3d3340a07c8ff
4
+ data.tar.gz: e0258e3a5820063c7458fb5fab6f1bbc742cd0a5
5
5
  SHA512:
6
- metadata.gz: 25c7f7684495706aad4efe72393af0228c02c2a00a258b5c00fdcc1a4b1740a40fe8f7a5e841c9fa2ddc6b7fc6521cfd001e2e5f9ffafe3ca4e9d8fbeabf2027
7
- data.tar.gz: 22e83c69890005484f1e75cac5332965f24992c646bdddab4b81aa5d2ccbcce2392515266fa10b924763ec5cd14578b2c20f45a06c6c0ec8f846155369491bdd
6
+ metadata.gz: a3dc50e4c96303c00c64a860ddbf7756b399f963d23935d65bf8b27aaa74360d15b9d552c979d060c1a29ac150467480709a3761a88831a57be973464118f696
7
+ data.tar.gz: a632c1124f1e3257dac52afd9f25ce76d32ca7bf2e7f4226a51c83906a8a8e1a24b43e5d1fd45958caaa2070351ed4092b16b2c4a3d9959bf7b51758797cae6a
data/ext/mkrf_conf.rb ADDED
@@ -0,0 +1,23 @@
1
+ require 'rubygems'
2
+ require 'rubygems/command.rb'
3
+ require 'rubygems/dependency_installer.rb'
4
+
5
+ begin
6
+ Gem::Command.build_args = ARGV
7
+ rescue NoMethodError
8
+ # We're good
9
+ end
10
+
11
+ inst = Gem::DependencyInstaller.new
12
+ begin
13
+ if RUBY_PLATFORM =~ /\bdarwin/i
14
+ inst.install "ruby-ncurses", "~> 1.2.4"
15
+ else
16
+ inst.install "ncursesw", "~> 1.4.9"
17
+ end
18
+ rescue
19
+ exit 1
20
+ end
21
+
22
+ # create dummy rakefile to indicate success
23
+ File.write(__dir__("Rakefile"), "task: default\n")
@@ -1,4 +1,4 @@
1
- require 'ncurses'
1
+ require 'listpager/ncurses'
2
2
  require 'shellwords'
3
3
  require 'optparse'
4
4
  require 'io/console'
@@ -1,4 +1,4 @@
1
- require 'ncurses'
1
+ require 'listpager/ncurses'
2
2
 
3
3
  module Listpager
4
4
  class Color
@@ -1,4 +1,4 @@
1
- require 'ncurses'
1
+ require 'listpager/ncurses'
2
2
 
3
3
  require 'listpager/color'
4
4
  require 'listpager/scrollbar'
@@ -0,0 +1,8 @@
1
+ # Note: This is a hack to work around ncursesw not building on macOS.
2
+ # Hopefully it can go away soon.
3
+
4
+ if RUBY_PLATFORM =~ /\bdarwin/i
5
+ require 'ncurses'
6
+ else
7
+ require 'ncursesw'
8
+ end
@@ -1,3 +1,5 @@
1
+ require 'listpager/ncurses'
2
+
1
3
  require 'listpager/color'
2
4
 
3
5
  module Listpager
@@ -1,3 +1,3 @@
1
1
  module Listpager
2
- VERSION = "1.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/listpager.gemspec CHANGED
@@ -27,7 +27,17 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- spec.add_runtime_dependency "ncurses-ruby", "~> 1.2.4"
30
+ # Check out the hack in ext/mkrf_conf.rb, which is effectively:
31
+ #
32
+ # if RUBY_PLATFORM =~ /\bdarwin/
33
+ # spec.add_runtime_dependency 'ncurses-ruby'
34
+ # else
35
+ # # Doesn't build on newer macOS...
36
+ # spec.add_runtime_dependency 'ncursesw'
37
+ # end
38
+ #
39
+ # A PR has been submitted to ncursesw, so hopefully this can go away soon.
40
+
31
41
  spec.add_development_dependency "bundler", "~> 1.12"
32
42
  spec.add_development_dependency "rake", "~> 10.0"
33
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: listpager
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Owens
@@ -10,20 +10,6 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2016-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: ncurses-ruby
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 1.2.4
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 1.2.4
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: bundler
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -69,10 +55,12 @@ files:
69
55
  - bin/setup
70
56
  - doc/screenshot.png
71
57
  - exe/listpager
58
+ - ext/mkrf_conf.rb
72
59
  - lib/listpager.rb
73
60
  - lib/listpager/client_terminal.rb
74
61
  - lib/listpager/color.rb
75
62
  - lib/listpager/list.rb
63
+ - lib/listpager/ncurses.rb
76
64
  - lib/listpager/scrollbar.rb
77
65
  - lib/listpager/version.rb
78
66
  - listpager.gemspec