enum_args 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/enum_args.gemspec +2 -0
- data/lib/enum_args/proxy.rb +1 -5
- data/lib/enum_args/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d30df69cd412bd2fd7ab806e32739eb3283058fd
|
4
|
+
data.tar.gz: 54bf76bb749fdff1b1aa5bc5af29974ae4ad9228
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8f79beac8e7242382e529b1e6853c6f23516c075dd8629cde523e8d270d58a4351f9e401713383e7838482a499cc29cadafe46ad2c75c08b36a04c2d9b53297
|
7
|
+
data.tar.gz: 390433118a98e132fb0bf2ab34295060af0236d37aa21d9fcdfa0f2856d7c3b56a91be45916544c374e5e58729d7b3f012c0b8e95a5e95394d374b4c77af01aa
|
data/.travis.yml
CHANGED
data/enum_args.gemspec
CHANGED
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
+
spec.required_ruby_version = '>= 2.1.0'
|
23
|
+
|
22
24
|
spec.add_development_dependency "bundler", "~> 1.10"
|
23
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
26
|
spec.add_development_dependency "rspec"
|
data/lib/enum_args/proxy.rb
CHANGED
@@ -34,7 +34,7 @@ module EnumArgs
|
|
34
34
|
# remove specific 'using' options from method call
|
35
35
|
iterator_params = extract_iterator_params_from options
|
36
36
|
|
37
|
-
m_args
|
37
|
+
m_args << options unless options.empty?
|
38
38
|
e = if iterator_params.empty?
|
39
39
|
# no changes, use default enumerator
|
40
40
|
enum
|
@@ -42,10 +42,6 @@ module EnumArgs
|
|
42
42
|
build_enum(iterator_params)
|
43
43
|
end
|
44
44
|
e.send m, *m_args, &blk
|
45
|
-
rescue TypeError => e
|
46
|
-
# this happens when options is not empty and the method won't accept it
|
47
|
-
raise e unless e.message == 'no implicit conversion of Hash into Array'
|
48
|
-
raise ArgumentError, "#{m} does not accept parameter #{options}"
|
49
45
|
end
|
50
46
|
|
51
47
|
def extract_iterator_params_from(options)
|
data/lib/enum_args/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enum_args
|
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
|
- Alejandro Martinez Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,7 +87,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: 2.1.0
|
91
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - ">="
|