Hello community,

here is the log from the commit of package rubygem-highline for 
openSUSE:Factory checked in at 2015-10-14 16:45:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-highline (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-highline.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-highline"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-highline/rubygem-highline.changes        
2015-09-27 08:39:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-highline.new/rubygem-highline.changes   
2015-10-14 16:45:02.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Oct 10 04:29:14 UTC 2015 - co...@suse.com
+
+- updated to version 1.7.8
+ see installed Changelog.md
+
+  ### 1.7.8 / 2015-10-09
+  * Fix some issues when paginating. (Nick Carboni (@carbonin) and Abinoam P. 
Marques Jr. (@abinoam), #168, PRs #169 #170)
+
+-------------------------------------------------------------------

Old:
----
  highline-1.7.7.gem

New:
----
  highline-1.7.8.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-highline.spec ++++++
--- /var/tmp/diff_new_pack.eRYQ2o/_old  2015-10-14 16:45:03.000000000 +0200
+++ /var/tmp/diff_new_pack.eRYQ2o/_new  2015-10-14 16:45:03.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-highline
-Version:        1.7.7
+Version:        1.7.8
 Release:        0
 %define mod_name highline
 %define mod_full_name %{mod_name}-%{version}

++++++ highline-1.7.7.gem -> highline-1.7.8.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Changelog.md new/Changelog.md
--- old/Changelog.md    2015-09-23 01:19:45.000000000 +0200
+++ new/Changelog.md    2015-10-09 21:31:29.000000000 +0200
@@ -2,6 +2,9 @@
 
 Below is a complete listing of changes for each revision of HighLine.
 
+### 1.7.8 / 2015-10-09
+* Fix some issues when paginating. (Nick Carboni (@carbonin) and Abinoam P. 
Marques Jr. (@abinoam), #168, PRs #169 #170)
+
 ### 1.7.7 / 2015-09-22
 * Make HighLine::Question coerce its question argument into a String. 
(@97-109-107 and Abinoam P. Marques Jr. (@abinoam), #159, PR #160)
 
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/highline/version.rb new/lib/highline/version.rb
--- old/lib/highline/version.rb 2015-09-23 01:19:45.000000000 +0200
+++ new/lib/highline/version.rb 2015-10-09 21:31:29.000000000 +0200
@@ -1,4 +1,4 @@
 class HighLine
   # The version of the installed library.
-  VERSION = "1.7.7".freeze
+  VERSION = "1.7.8".freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/highline.rb new/lib/highline.rb
--- old/lib/highline.rb 2015-09-23 01:19:45.000000000 +0200
+++ new/lib/highline.rb 2015-10-09 21:31:29.000000000 +0200
@@ -989,12 +989,12 @@
   # instead.  This is to support any special handling for the final sequence.
   #
   def page_print( output )
-    lines = output.scan(/[^\n]*\n?/)
+    lines = output.lines.to_a
     while lines.size > @page_at
       @output.puts lines.slice!(0...@page_at).join
       @output.puts
       # Return last line if user wants to abort paging
-      return (["...\n"] + lines.slice(-2,1)).join unless continue_paging?
+      return "...\n#{lines.last}" unless continue_paging?
     end
     return lines.join
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-09-23 01:19:45.000000000 +0200
+++ new/metadata        2015-10-09 21:31:29.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: highline
 version: !ruby/object:Gem::Version
-  version: 1.7.7
+  version: 1.7.8
 platform: ruby
 authors:
 - James Edward Gray II
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-09-22 00:00:00.000000000 Z
+date: 2015-10-09 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: code_statistics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/tc_highline.rb new/test/tc_highline.rb
--- old/test/tc_highline.rb     2015-09-23 01:19:45.000000000 +0200
+++ new/test/tc_highline.rb     2015-10-09 21:31:29.000000000 +0200
@@ -977,6 +977,48 @@
                   (45..50).map { |n| "This is line #{n}.\n"}.join,
                   @output.string )
   end
+
+  def test_statement_lines_count_equal_to_page_at_shouldnt_paginate
+    @terminal.page_at = 6
+
+    @input << "\n"
+    @input.rewind
+
+    list = "a\nb\nc\nd\ne\nf\n"
+
+    @terminal.say(list)
+    assert_equal(list, @output.string)
+  end
+
+  def test_statement_with_one_line_bigger_than_page_at_should_paginate
+    @terminal.page_at = 6
+
+    @input << "\n"
+    @input.rewind
+
+    list = "a\nb\nc\nd\ne\nf\ng\n"
+
+    paginated =
+      "a\nb\nc\nd\ne\nf\n" \
+      "\n-- press enter/return to continue or q to stop -- \n\n" \
+      "g\n"
+
+    @terminal.say(list)
+    assert_equal(paginated, @output.string)
+  end
+
+  def test_quiting_paging_shouldnt_raise
+    # See https://github.com/JEG2/highline/issues/168
+
+    @terminal.page_at = 6
+
+    @input << "q"
+    @input.rewind
+
+    list = "a\nb\nc\nd\ne\nf\n"
+
+    assert_nothing_raised { @terminal.say(list) }
+  end
   
   def test_range_requirements
     @input << "112\n-541\n28\n"


Reply via email to