rib 1.2.2 → 1.2.3

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
  SHA1:
3
- metadata.gz: 71f4bd09ed661c3e6344b4370d4611ed34e230ce
4
- data.tar.gz: 036e0c2191ac6edac8ef36465474d22347519e90
3
+ metadata.gz: 5c1a6d608c225a5dc61d4a9b58f6de671d17b7b0
4
+ data.tar.gz: 07430433a3cee05dd733726a1ef07522a09f585f
5
5
  SHA512:
6
- metadata.gz: c40b597bbe06db537996568524f21f17789db421e6a15dbc9f269057003f7f037d4d2f3ad38f92ed1d7678cd373f5c5aabbedf8a0a749e94cab8190af23363e3
7
- data.tar.gz: 74934c6bf5916c62ad455cde90a4abe3bc6aa72cd57c9a5792b749a0fb0cb65d516b9bc757db14af656116b4f099033b84489b91c87a69edba1c9fcea48105fa
6
+ metadata.gz: 1783b25cca7c85a1b79db3581568111ef077bf9e631037d1a0dbf8faeafb0d1514c8c35cdea6e95bdebc4d5e7847a151c101de426449d0555aa62cb158ea9600
7
+ data.tar.gz: 9fbca213d0d22a3dd45d5a16a9b60c6e26cac2c971ee5fd09aa8983fabf7b43486f445183507272989484e43a1aa53dc957e115e58d8d1a547a8164972e8397c
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGES
2
2
 
3
+ ## Rib 1.2.3 -- 2014-02-08
4
+
5
+ * [extra/paging] Properly disable paging if less or ENV['PAGER'] is not
6
+ available.
7
+
3
8
  ## Rib 1.2.2 -- 2014-01-23
4
9
 
5
10
  * From now on, we support project specific config file located on
@@ -10,6 +10,7 @@ module Rib::Paging
10
10
  # Print result if the it fits one screen,
11
11
  # paging it through a pager otherwise.
12
12
  def print_result result
13
+ return super if Paging.disabled?
13
14
  output = format_result(result)
14
15
  if one_screen?(output)
15
16
  puts output
@@ -32,11 +33,18 @@ module Rib::Paging
32
33
  less = IO.popen(pager, 'w')
33
34
  less.write(output)
34
35
  less.close_write
35
- rescue Errno::EPIPE => e
36
- Rib.warn("Error while paging result:\n #{format_error(e)}")
36
+ rescue Errno::EPIPE
37
+ # less quit without consuming all the input
37
38
  end
38
39
 
39
40
  def pager
40
41
  ENV['PAGER'] || 'less -R'
41
42
  end
42
43
  end
44
+
45
+ pager = ENV['PAGER'] || 'less'
46
+
47
+ if `which #{pager}`.empty?
48
+ Rib.warn("#{pager} is not available, disabling Rib::Paging")
49
+ Rib::Paging.disable
50
+ end
data/lib/rib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Rib
3
- VERSION = '1.2.2'
3
+ VERSION = '1.2.3'
4
4
  end
data/rib.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: rib 1.2.2 ruby lib
2
+ # stub: rib 1.2.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rib"
6
- s.version = "1.2.2"
6
+ s.version = "1.2.3"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
10
10
  s.authors = ["Lin Jen-Shin (godfat)"]
11
- s.date = "2014-01-23"
11
+ s.date = "2014-02-08"
12
12
  s.description = "Ruby-Interactive-ruBy -- Yet another interactive Ruby shell\n\nRib is based on the design of [ripl][] and the work of [ripl-rc][], some of\nthe features are also inspired by [pry][]. The aim of Rib is to be fully\nfeatured and yet very easy to opt-out or opt-in other features. It shall\nbe simple, lightweight and modular so that everyone could customize Rib.\n\n[ripl]: https://github.com/cldwalker/ripl\n[ripl-rc]: https://github.com/godfat/ripl-rc\n[pry]: https://github.com/pry/pry"
13
13
  s.email = ["godfat (XD) godfat.org"]
14
14
  s.executables = [
@@ -88,7 +88,7 @@ Gem::Specification.new do |s|
88
88
  "test/test_shell.rb"]
89
89
  s.homepage = "https://github.com/godfat/rib"
90
90
  s.licenses = ["Apache License 2.0"]
91
- s.rubygems_version = "2.2.1"
91
+ s.rubygems_version = "2.2.2"
92
92
  s.summary = "Ruby-Interactive-ruBy -- Yet another interactive Ruby shell"
93
93
  s.test_files = [
94
94
  "test/core/test_completion.rb",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lin Jen-Shin (godfat)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-23 00:00:00.000000000 Z
11
+ date: 2014-02-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Ruby-Interactive-ruBy -- Yet another interactive Ruby shell
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.2.1
123
+ rubygems_version: 2.2.2
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Ruby-Interactive-ruBy -- Yet another interactive Ruby shell