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: 54c8cdfb2441a930457233aa18eb94b203afba08731c9eff8574d3308bb979df
4
- data.tar.gz: e738dbb089e23a0148e112b250a9aead31d40cc8147e4403c911038e5d1c7c08
3
+ metadata.gz: ff2b4585a53f23921eae482722fde429421811305f463cd66fcfb74476ee1339
4
+ data.tar.gz: 34736b322ef447ce571c251f6adddb2544de93c336420f93d2213d51d1a3d7e6
5
5
  SHA512:
6
- metadata.gz: 0453d5a5de52cf2b6888a01e97658ee40155796156e7d09595f9249917baf036bce45a53d7c7ae180c9a184bd89e98c76df7fd960f49b4542d814f4bd8a725a3
7
- data.tar.gz: ffe831732748530de95c35e7ed4ff91e9d9c9710b483c80e99048186636d36d24b3e432811c713b7e04c452bf91a190768970d827a3c402fdc6b91b4c374fd78
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.dup
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!.dup
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!.dup
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Wallaby
4
4
  module Core
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
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.0
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-05 00:00:00.000000000 Z
11
+ date: 2019-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet