wallaby-core 0.1.0 → 0.1.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff2b4585a53f23921eae482722fde429421811305f463cd66fcfb74476ee1339
|
4
|
+
data.tar.gz: 34736b322ef447ce571c251f6adddb2544de93c336420f93d2213d51d1a3d7e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e34c066dea44077a351540704c6324c0c8314b4872686d555a25f72aec4947ed7418af447f46ca8075c8119c2440f0be0c96518550d885e8fc21de156cd51f35
|
7
|
+
data.tar.gz: d47d5ed0a609d2bfe6b2415ff64d59d1ebed6640bff8227ce1a68e59dd7885d1c29f73751fe509cfafd8104294f4d60ba2328524a4ce4ca84dc57cdb15a0ebb3
|
@@ -9,6 +9,7 @@ module Wallaby
|
|
9
9
|
# @param defaults [Hash]
|
10
10
|
# @return [Array<Hash, Proc>] html_options and the block
|
11
11
|
def self.normalize(html_options, block, defaults)
|
12
|
+
html_options = Utils.clone html_options
|
12
13
|
block ||= defaults[:block]
|
13
14
|
html_options[:title] ||= defaults[:block].call
|
14
15
|
# allow empty class to be set
|
@@ -22,7 +22,7 @@ module Wallaby
|
|
22
22
|
# @return [ActionController::Parameters]
|
23
23
|
# updated parameters with new sort order for given field
|
24
24
|
def next_params(field_name)
|
25
|
-
params = @params
|
25
|
+
params = Utils.clone @params
|
26
26
|
params[:sort] = complete_sorting_str_with field_name
|
27
27
|
params
|
28
28
|
end
|
@@ -18,7 +18,7 @@ module ActionDispatch
|
|
18
18
|
# @see https://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Resources.html#method-i-resources
|
19
19
|
# ActionDispatch::Routing::Mapper::Resources#resources
|
20
20
|
def wresources(*resource_names, &block)
|
21
|
-
options = resource_names.extract_options
|
21
|
+
options = Wallaby::Utils.clone resource_names.extract_options!
|
22
22
|
resource_names.each do |resource_name|
|
23
23
|
new_options = wallaby_resources_options_for resource_name, options
|
24
24
|
resources resource_name, new_options, &block
|
@@ -39,7 +39,7 @@ module ActionDispatch
|
|
39
39
|
# @see https://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Resources.html#method-i-resource
|
40
40
|
# ActionDispatch::Routing::Mapper::Resources#resource
|
41
41
|
def wresource(*resource_names, &block)
|
42
|
-
options = resource_names.extract_options
|
42
|
+
options = Wallaby::Utils.clone resource_names.extract_options!
|
43
43
|
resource_names.each do |resource_name|
|
44
44
|
new_options = wallaby_resource_options_for resource_name, options
|
45
45
|
resource resource_name, new_options, &block
|
data/lib/wallaby/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wallaby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tian Chen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|