argv 2.2.0 → 2.2.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: 0d1674c456132510816a46e17e273375a62b3af9
4
- data.tar.gz: 1fc5186e5020df4394ebc0f1caa6a71c91bb47ea
3
+ metadata.gz: 4b116f21bd831b039d26501cb7d02b0e0829fd40
4
+ data.tar.gz: 9aba04ed33004f747b5d7659cd5e001dcc04edd6
5
5
  SHA512:
6
- metadata.gz: e2c3aa823da8edcf2e22f2b624cc04bdc66782061c3ecc9f5a197d120bdd9a9b3200091ed4908d439e7f7dcfd86bd8b0d1dd94eeb31d8baf1ab0cbb15941e521
7
- data.tar.gz: dec3f2ea6b21a2537bd27967077905dd9aa195dda3b988390c994cca57c91c37f7e7514813a0568f7f7dff48ce90a3256bc3038a04573d2207d95f92a4bbe6b4
6
+ metadata.gz: 101c45711c3388f4de7b207a7c36bc2f0c10fee3bff3316f3b710a5cb156b9876c4289ca43c41ca8549f7f9fa3318fc54646b831defc97a2b19c3ce5186569c6
7
+ data.tar.gz: d1437ce61e3560a01d564cba0ea7ef9f4722aea4420ce631de6b1a2cadd65b321b3966e34ece6730857310549706b7b5bbd6155202261ad4e05b7f94d20fd2de
data/LICENSE CHANGED
@@ -1,21 +1,8 @@
1
- The MIT License (MIT)
2
-
3
1
  Copyright (c) 2014 Adam Luzsi
4
2
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
3
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
4
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
5
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
6
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
7
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
8
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.2.1
@@ -6,9 +6,11 @@ Gem::Specification.new do |spec|
6
6
  spec.version = File.open(File.join(File.dirname(__FILE__),"VERSION")).read.split("\n")[0].chomp.gsub(' ','')
7
7
  spec.authors = ["Adam Luzsi"]
8
8
  spec.email = ["adamluzsi@gmail.com"]
9
+
9
10
  spec.description = %q{ ARGV object extension for parsing flags, inputs, so you can have easy hash objects that contain tag value, and so on :) }
10
11
  spec.summary = %q{ argv object extension for parsing flags, inputs }
11
12
 
13
+ spec.homepage = "https://github.com/adamluzsi/#{__FILE__.split(File::Separator).last.split('.').first}"
12
14
  spec.files = `git ls-files`.split($/)
13
15
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
@@ -0,0 +1,13 @@
1
+ require "argv"
2
+
3
+ ARGV.push('-asd')
4
+
5
+ puts ARGV.sym_flags(s:true)[:asd].inspect
6
+ puts ARGV.to_hash(s:true)[:asd].inspect
7
+ puts ARGV.to_hash(s:true)[:asd].nil?
8
+
9
+ ARGV.push('hmm')
10
+
11
+ puts ARGV.to_hash(s:true)[:asd].inspect
12
+ puts ARGV.to_hash(s:true)[:asd].inspect
13
+ puts ARGV.to_hash(s:true)[:asd].nil?
File without changes
@@ -62,8 +62,11 @@ module ARGVEXT
62
62
  self.flags.map { |e| e.to_s.dup.gsub!(/^-*/,'').to_sym }
63
63
  end
64
64
 
65
+ alias :sym_tags :sym_flags
66
+
65
67
  alias :flag_syms :sym_flags
66
68
  alias :flag_sym :sym_flags
69
+
67
70
  alias :tag_syms :sym_flags
68
71
  alias :key_syms :sym_flags
69
72
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: argv
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-25 00:00:00.000000000 Z
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -54,11 +54,12 @@ files:
54
54
  - Rakefile
55
55
  - VERSION
56
56
  - argv.gemspec
57
+ - exsample/is_nil.rb
58
+ - exsample/test.rb
57
59
  - lib/argv.rb
58
60
  - lib/argv/cms.rb
59
61
  - lib/argv/ext.rb
60
- - sample/test.rb
61
- homepage:
62
+ homepage: https://github.com/adamluzsi/argv
62
63
  licenses: []
63
64
  metadata: {}
64
65
  post_install_message: