Hello community,

here is the log from the commit of package rubygem-slop for openSUSE:Factory 
checked in at 2014-10-15 16:19:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-slop (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-slop.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-slop"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-slop/rubygem-slop.changes        
2014-03-21 13:50:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-slop.new/rubygem-slop.changes   
2014-10-15 16:20:01.000000000 +0200
@@ -1,0 +2,8 @@
+Sun Oct 12 17:11:28 UTC 2014 - co...@suse.com
+
+- updated to version 3.6.0
+  * Add example of rest arguments usage in the readme file #139
+  * Default values on options are printed in the help message #134
+- new rubygem packaging
+
+-------------------------------------------------------------------

Old:
----
  slop-3.5.0.gem

New:
----
  slop-3.6.0.gem

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

Other differences:
------------------
++++++ rubygem-slop.spec ++++++
--- /var/tmp/diff_new_pack.e8NjvP/_old  2014-10-15 16:20:02.000000000 +0200
+++ /var/tmp/diff_new_pack.e8NjvP/_new  2014-10-15 16:20:02.000000000 +0200
@@ -17,15 +17,14 @@
 
 
 Name:           rubygem-slop
-Version:        3.5.0
+Version:        3.6.0
 Release:        0
 %define mod_name slop
 %define mod_full_name %{mod_name}-%{version}
-
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  ruby-macros >= 3
-Requires:       ruby >= 1.8.7
-BuildRequires:  ruby >= 1.8.7
+BuildRequires:  %{ruby >= 1.8.7}
+BuildRequires:  %{rubygem gem2rpm}
+BuildRequires:  ruby-macros >= 5
 Url:            http://github.com/leejarvis/slop
 Source:         http://rubygems.org/gems/%{mod_full_name}.gem
 Summary:        Simple Lightweight Option Parsing
@@ -33,53 +32,17 @@
 Group:          Development/Languages/Ruby
 
 %description
-A simple DSL for gathering options and parsing the command line
-
-%package doc
-Summary:        RDoc documentation for %{mod_name}
-Group:          Development/Languages/Ruby
-Requires:       %{name} = %{version}
-
-%description doc
-Documentation generated at gem installation time.
-Usually in RDoc and RI formats.
-
-%package testsuite
-Summary:        Test suite for %{mod_name}
-Group:          Development/Languages/Ruby
-Requires:       %{name} = %{version}
-
-%description testsuite
-Test::Unit or RSpec files, useful for developers.
+A simple DSL for gathering options and parsing the command line.
 
 %prep
-#gem_unpack
-#if you need patches, apply them here and replace the # with a % sign in the 
surrounding lines
-#gem_build
 
 %build
 
 %install
-%gem_install -f
-mkdir -p %{buildroot}%{_docdir}/%{name}
-ln -s %{gem_base}/gems/%{mod_full_name}/CHANGES.md 
%buildroot/%{_docdir}/%{name}/CHANGES.md
-ln -s %{gem_base}/gems/%{mod_full_name}/LICENSE 
%buildroot/%{_docdir}/%{name}/LICENSE
-ln -s %{gem_base}/gems/%{mod_full_name}/README.md 
%buildroot/%{_docdir}/%{name}/README.md
-
-%files
-%defattr(-,root,root,-)
-%{_docdir}/%{name}
-%{gem_base}/cache/%{mod_full_name}.gem
-%{gem_base}/gems/%{mod_full_name}/
-%exclude %{gem_base}/gems/%{mod_full_name}/test
-%{gem_base}/specifications/%{mod_full_name}.gemspec
-
-%files doc
-%defattr(-,root,root,-)
-%doc %{gem_base}/doc
-
-%files testsuite
-%defattr(-,root,root,-)
-%{gem_base}/gems/%{mod_full_name}/test
+%gem_install \
+  --doc-files="CHANGES.md LICENSE README.md" \
+  -f
+
+%gem_packages
 
 %changelog

++++++ slop-3.5.0.gem -> slop-3.6.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml     2014-03-12 22:16:52.000000000 +0100
+++ new/.travis.yml     1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +1,8 @@
 rvm:
-  - 1.8.7
-  - 1.9.2
   - 1.9.3
+  - 2.1
   - ruby-head
-  - jruby-18mode
   - jruby-19mode
-  - rbx-18mode
 notifications:
   email:
     on_success: change
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGES.md new/CHANGES.md
--- old/CHANGES.md      2014-03-12 22:16:52.000000000 +0100
+++ new/CHANGES.md      1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +1,9 @@
+3.6.0 (2014-06-18)
+------------------
+
+* Add example of rest arguments usage in the readme file #139
+* Default values on options are printed in the help message #134
+
 3.5.0 (2014-03-12)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2014-03-12 22:16:52.000000000 +0100
+++ new/README.md       1970-01-01 01:00:00.000000000 +0100
@@ -41,20 +41,16 @@
 
 All of these options can be sent to `Slop.new` or `Slop.parse` in Hash form.
 
-* `strict` - Enable strict mode. When processing unknown options, Slop will
-  raise an `InvalidOptionError`. **default:** *false*.
-* `help` - Automatically add the `--help` option. **default:** *false*.
-* `banner` - Set the help banner text. **default:** *nil*.
-* `ignore_case` - When enabled, `-A` will look for the `-a` option if `-A`
-  does not exist. **default:** *false*.
-* `autocreate` - Autocreate options on the fly. **default:** *false*.
-* `arguments` - Force all options to expect arguments. **default:** *false*.
-* `optional_arguments` - Force all options to accept optional arguments.
-  **default:** *false*.
-* `multiple_switches` - When disabled, Slop will parse `-abc` as the option `a`
-   with the argument `bc` rather than 3 separate options. **default:** *true*.
-* `longest_flag` - The longest string flag, used to aid configuring help
-   text. **default:** *0*.
+| Option | Description | Default/Example |
+| ------ | ----------- | --------------- |
+| strict | Enable strict mode. Slop will raise an `InvalidOptionError` for 
unkown options. | `false` |
+| help   | Automatically add the `--help` option. | `false` |
+| banner | Set the help banner text. | `nil` |
+| ignore_case | When enabled, `-A` will look for the `-a` option if `-A` does 
not exist. | `false` |
+| autocreate | Autocreate options on the fly. | `false` |
+| arguments | Force all options to expect arguments. | `false` |
+| optional_arguments | Force all options to accept optional arguments. | 
`false` |
+| multiple_switches | When disabled, Slop will parse `-abc` as the option `a` 
with the argument `bc` rather than 3 separate options. | `true` |
 
 Lists
 -----
@@ -139,6 +135,30 @@
 # => { :v => nil, :add => { :v => true, :name => "Lee" } }
 ```
 
+Remaining arguments
+-------------------
+
+The *parse!*  method will remove any options and option arguments from the 
original Array:
+
+```ruby
+# restarguments.rb
+opts = Slop.parse! do
+  on :foo
+end
+```
+
+Example:
+
+```
+ruby restarguments.rb --foo bar
+```
+
+```
+opts.to_hash = { :foo => true }
+
+ARGV #=> ["bar"]
+```
+
 Woah woah, why you hating on OptionParser?
 ------------------------------------------
 
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/slop/option.rb new/lib/slop/option.rb
--- old/lib/slop/option.rb      2014-03-12 22:16:52.000000000 +0100
+++ new/lib/slop/option.rb      1970-01-01 01:00:00.000000000 +0100
@@ -138,7 +138,12 @@
         out << (' ' * (@slop.config[:longest_flag] + 8))
       end
 
-      "#{out}#{description}"
+      if config[:default]
+        default = config[:default]
+        "#{out}#{description} (default: #{default})"
+      else
+        "#{out}#{description}"
+      end
     end
     alias help to_s
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/slop.rb new/lib/slop.rb
--- old/lib/slop.rb     2014-03-12 22:16:52.000000000 +0100
+++ new/lib/slop.rb     1970-01-01 01:00:00.000000000 +0100
@@ -4,7 +4,7 @@
 class Slop
   include Enumerable
 
-  VERSION = '3.5.0'
+  VERSION = '3.6.0'
 
   # The main Error class, all Exception classes inherit from this class.
   class Error < StandardError; end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2014-03-12 22:16:52.000000000 +0100
+++ new/metadata        1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +1,41 @@
 --- !ruby/object:Gem::Specification
 name: slop
 version: !ruby/object:Gem::Version
-  version: 3.5.0
+  version: 3.6.0
 platform: ruby
 authors:
 - Lee Jarvis
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2014-03-12 00:00:00.000000000 Z
+date: 2014-07-18 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ">="
+    - - '>='
       - !ruby/object:Gem::Version
         version: '0'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ">="
+    - - '>='
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
   name: minitest
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - "~>"
+    - - ~>
       - !ruby/object:Gem::Version
         version: 5.0.0
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - "~>"
+    - - ~>
       - !ruby/object:Gem::Version
         version: 5.0.0
 description: A simple DSL for gathering options and parsing the command line
@@ -44,8 +44,8 @@
 extensions: []
 extra_rdoc_files: []
 files:
-- ".gitignore"
-- ".travis.yml"
+- .gitignore
+- .travis.yml
 - CHANGES.md
 - Gemfile
 - LICENSE
@@ -69,17 +69,17 @@
 - lib
 required_ruby_version: !ruby/object:Gem::Requirement
   requirements:
-  - - ">="
+  - - '>='
     - !ruby/object:Gem::Version
       version: 1.8.7
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
-  - - ">="
+  - - '>='
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.2.0
+rubygems_version: 2.0.14
 signing_key: 
 specification_version: 4
 summary: Simple Lightweight Option Parsing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slop.gemspec new/slop.gemspec
--- old/slop.gemspec    2014-03-12 22:16:52.000000000 +0100
+++ new/slop.gemspec    1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Gem::Specification.new do |s|
   s.name        = 'slop'
-  s.version     = '3.5.0'
+  s.version     = '3.6.0'
   s.summary     = 'Simple Lightweight Option Parsing'
   s.description = 'A simple DSL for gathering options and parsing the command 
line'
   s.author      = 'Lee Jarvis'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/option_test.rb new/test/option_test.rb
--- old/test/option_test.rb     2014-03-12 22:16:52.000000000 +0100
+++ new/test/option_test.rb     1970-01-01 01:00:00.000000000 +0100
@@ -130,6 +130,13 @@
     assert_equal "    -V,             Display the version", 
slop.fetch_option(:V).help
   end
 
+  test "printing options that have defaults" do
+    opts = Slop.new
+    opts.on :n, :name=, 'Your name', :default => 'Lee'
+
+    assert_equal "    -n, --name      Your name (default: Lee)", 
opts.fetch_option(:name).to_s
+  end
+
   test "overwriting the help text" do
     slop = Slop.new
     slop.on :foo, :help => '    -f, --foo  SOMETHING FOOEY'

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to