invokr 0.9.4 → 0.9.5

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: 85451302ca410ddae97b77e6b255882d00f33a19
4
- data.tar.gz: e91e12a4e7025a3b7cb3301032dd6cb2223e46d3
3
+ metadata.gz: 54217bbbc58bdaa01e35ac2136a36f5692e8c9b3
4
+ data.tar.gz: 482641abbb16a1cb72e5cd4029f59ba19bf26531
5
5
  SHA512:
6
- metadata.gz: bf52146b18eabed9c93bea408b3d54d4a9c473928f2b47954f57b6e4fbacacac18818cfb87a9559212069a0dad76d44016703b19dafc7e019e53dd66e2620705
7
- data.tar.gz: 449775825ff9878ae2b67d745a883b3cd0666c75178d45c4a7171f1c39c5f071cf6df7f3b5923f2fc9340a94d46c361ca4a58d2683c888789ea5ce92b61686e0
6
+ metadata.gz: e966c7c7ddb73d96ea9bc7c2cf1d52d854b77c3c34d9f75001cc0c8b6807704ae9c09465a942f84b3919e707c82baa18a46beed6ca965acf9b8cf57671200596
7
+ data.tar.gz: d4bc38723344baf8a3ead9501865e0f1f78c06a8f740705934698eec425ee0d812b19ab314dac51f7ef09f4e51ce3e14514939fbeccda45ddac72520abdaa3e5
@@ -4,7 +4,7 @@ module Invokr
4
4
 
5
5
  def inject obj, using
6
6
  meth = case obj
7
- when -> (obj) { obj.respond_to?(:call) } then :inject_proc
7
+ when lambda { |obj| obj.respond_to?(:call) } then :inject_proc
8
8
  when Class then :inject_klass
9
9
  else raise ArgumentError, "can't inject #{obj.inspect}"
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module Invokr
2
- VERSION = "0.9.4"
2
+ VERSION = "0.9.5"
3
3
  end
@@ -16,7 +16,7 @@ class DependencyInjectionExampleTest < Minitest::Test
16
16
  end
17
17
 
18
18
  def test_injecting_a_proc
19
- my_proc = -> (foo,bar) do OpenStruct.new foo: foo, bar: bar end
19
+ my_proc = lambda { |foo,bar| OpenStruct.new foo: foo, bar: bar }
20
20
 
21
21
  obj = Invokr.inject(
22
22
  my_proc,
@@ -47,7 +47,7 @@ class DependencyInjectionExampleTest < Minitest::Test
47
47
  class TestObject
48
48
  attr :album, :guitarist
49
49
 
50
- def initialize album, guitarist: 'jimmy'
50
+ def initialize album, guitarist = 'jimmy'
51
51
  @album = album
52
52
  @guitarist = guitarist
53
53
  end
@@ -1,7 +1,7 @@
1
1
  module KeywordArgsTest
2
2
  class OptionalKeywordArgsTest < Minitest::Test
3
3
  def setup
4
- skip unless RUBY_VERSION >= '2.0'
4
+ skip unless RUBY_VERSION >= '2.0' and RUBY_ENGINE == 'ruby'
5
5
  end
6
6
 
7
7
  def test_overriding_optional_keyword_argument
@@ -48,7 +48,7 @@ module KeywordArgsTest
48
48
 
49
49
  class RequiredKeywordArgsTest < Minitest::Test
50
50
  def setup
51
- skip unless RUBY_VERSION >= '2.1'
51
+ skip unless RUBY_VERSION >= '2.0' and RUBY_ENGINE == 'ruby'
52
52
  end
53
53
 
54
54
  def test_supplying_required_keyword_argument
data/test/query_test.rb CHANGED
@@ -49,7 +49,7 @@ class QueryTest < Minitest::Test
49
49
 
50
50
  def test_trimming_arguments
51
51
  hsh = { album: 'junta', guitarist: 'trey', drummer: 'phish' }
52
- assert_equal %i(album guitarist), @method.trim_args(hsh).keys
52
+ assert_equal [:album, :guitarist], @method.trim_args(hsh).keys
53
53
  end
54
54
 
55
55
  private
data/test/test_helper.rb CHANGED
@@ -43,7 +43,7 @@ module TestMethodBank
43
43
  "#<#{name}:0xdeadbeef>"
44
44
  end
45
45
 
46
- if RUBY_VERSION >= '2.0'
46
+ if RUBY_VERSION >= '2.0' and RUBY_ENGINE == 'ruby'
47
47
  module_eval <<-RB, __FILE__, __LINE__
48
48
  def optional_keyword_argument album: 'pitcher_of_nectar'
49
49
  album
@@ -55,7 +55,7 @@ module TestMethodBank
55
55
  RB
56
56
  end
57
57
 
58
- if RUBY_VERSION >= '2.1'
58
+ if RUBY_VERSION >= '2.1' and RUBY_ENGINE == 'ruby'
59
59
  module_eval <<-RB, __FILE__, __LINE__
60
60
  def required_keyword_argument(album:)
61
61
  album
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invokr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ntl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2014-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler