mache 3.1.0 → 3.2.0

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
  SHA256:
3
- metadata.gz: 11832198dae61f0592cb8660416cdfae6d19e03fb869ea6265a3e22332e58a6d
4
- data.tar.gz: bfb6a90eb74f0ac4eb607af79f6c013ad8913bf2b8a819fc4ddbf4564b6a308c
3
+ metadata.gz: d3a2af226ce51ad3f1edc15475a67a5b9a2fdd4a81b65d46a2f847e664a58227
4
+ data.tar.gz: 5b66d43a77bb704f598909d34a4f512bb08d81a5f1fcb2ce914ea48ff3b46589
5
5
  SHA512:
6
- metadata.gz: 9713a86de10fecd2c6f1c8a5230a9ce31a69df91c94475ba5cf49416978ca7926bd3dac8582e4e54b94374fa8208019c12e3738e3224185f105ce9665264ab30
7
- data.tar.gz: 8b08ce69b4ceae9a753966655fe3af8bfb2fab1f0b526faf6c6615d8099784decb95f60de1c8a5107ec06f2c6fe40eb4f76b4c6f4e1a756854a92de38194aef4
6
+ metadata.gz: 4e1ab401e8d8763b1ad2e4b582da83268479b3777bb7734ad90cfc7fbe7659cada443391b2e7966ffc99d4c5a3313e904e8988664577943a4512e4c211dd0570
7
+ data.tar.gz: 93d87a2b414db501060f26d4a0bfdeaa4e45c3ed10721a5f4c1313cb27dc16b055638af6ab24cb6887cebcc470c6374608a77ce0e3897a5fc0eaeb20be98d67a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.2.0 (2022-03-29)
2
+
3
+ * Fix Capybara errors on Ruby 3.1
4
+
1
5
  ## 3.1.0 (2019-04-30)
2
6
 
3
7
  * Add `empty` method to `Node` class
data/lib/mache/dsl.rb CHANGED
@@ -65,7 +65,7 @@ module Mache
65
65
  # @param options [Hash] a hash of options to pass to the Capybara finder
66
66
  def element(name, selector, options = {})
67
67
  define_method(name.to_s) do
68
- Node.new(node: @node.find(selector, options))
68
+ Node.new(node: @node.find(selector, **options))
69
69
  end
70
70
 
71
71
  define_helper_methods(name, selector)
@@ -80,7 +80,7 @@ module Mache
80
80
  options = {minimum: 1}.merge(options)
81
81
 
82
82
  define_method(name.to_s) do
83
- @node.all(selector, options).map do |node|
83
+ @node.all(selector, **options).map do |node|
84
84
  Node.new(node: node)
85
85
  end
86
86
  end
@@ -100,7 +100,7 @@ module Mache
100
100
  end
101
101
 
102
102
  define_method(name.to_s) do
103
- klass.new(node: @node.find(selector, options))
103
+ klass.new(node: @node.find(selector, **options))
104
104
  end
105
105
 
106
106
  define_helper_methods(name, selector)
@@ -120,7 +120,7 @@ module Mache
120
120
  options = {minimum: 1}.merge(options)
121
121
 
122
122
  define_method(name.to_s) do
123
- @node.all(selector, options).map do |node|
123
+ @node.all(selector, **options).map do |node|
124
124
  klass.new(node: node)
125
125
  end
126
126
  end
data/lib/mache/node.rb CHANGED
@@ -29,11 +29,21 @@ module Mache
29
29
  end
30
30
 
31
31
  # Forwards any Capybara API calls to the node object.
32
- def method_missing(name, *args, &block)
33
- if @node.respond_to?(name)
34
- @node.send(name, *args, &block)
35
- else
36
- super
32
+ if RUBY_VERSION < "3"
33
+ def method_missing(name, *args, &block)
34
+ if @node.respond_to?(name)
35
+ @node.send(name, *args, &block)
36
+ else
37
+ super
38
+ end
39
+ end
40
+ else
41
+ def method_missing(name, *args, **kwargs, &block)
42
+ if @node.respond_to?(name)
43
+ @node.send(name, *args, **kwargs, &block)
44
+ else
45
+ super
46
+ end
37
47
  end
38
48
  end
39
49
 
data/lib/mache/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mache
2
- VERSION = '3.1.0'.freeze
2
+ VERSION = '3.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mache
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Bassett
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2022-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 2.0.1
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 2.0.1
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rake
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -117,7 +103,7 @@ homepage: https://github.com/nullobject/mache
117
103
  licenses:
118
104
  - MIT
119
105
  metadata: {}
120
- post_install_message:
106
+ post_install_message:
121
107
  rdoc_options: []
122
108
  require_paths:
123
109
  - lib
@@ -125,16 +111,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
111
  requirements:
126
112
  - - ">="
127
113
  - !ruby/object:Gem::Version
128
- version: '0'
114
+ version: '2.7'
129
115
  required_rubygems_version: !ruby/object:Gem::Requirement
130
116
  requirements:
131
117
  - - ">="
132
118
  - !ruby/object:Gem::Version
133
119
  version: '0'
134
120
  requirements: []
135
- rubyforge_project:
136
- rubygems_version: 2.7.6
137
- signing_key:
121
+ rubygems_version: 3.0.3
122
+ signing_key:
138
123
  specification_version: 4
139
124
  summary: A library for writing cleaner and more expressive acceptance tests using
140
125
  page objects.