rightsignature-railstyle 1.1.11 → 1.1.13

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
  SHA1:
3
- metadata.gz: fee32dc90b58be2dc5b3242d92f38ff106be67a8
4
- data.tar.gz: bc3a96cb85c3ebcdadbc1b8b463168086882f6f5
3
+ metadata.gz: eb7dca58e78537aa31335b0bb3169c7dda823fd8
4
+ data.tar.gz: 79d07cf428c59857aeba862dde4fdff220444ae2
5
5
  SHA512:
6
- metadata.gz: 9e2aaf64850694f25495505fda199e26b578d984cb22a7429d68d97c8a4e263f1ff7432a0cc8f2b08f97a5ef4f2ed829c93e451c0ae25292746a0eb99c0ad31c
7
- data.tar.gz: da112d6f82f5e24ea82fbaaf63b1ca12c79688ddeeb87ea6b1d283c7c20f699ae48f34f16b4369fea0d24ae744e48ce441f9678a811f81cb9c63281b7dc67000
6
+ metadata.gz: cd163d460fa8ee1b2730f064a0b39a8243df218658640f2e4b9fb14817fab32b206e25ebdf58dd6a884dd6675ddaffa0ffe2c8ff775128138756fced0ef9d26e
7
+ data.tar.gz: 0bf8ed71ba22d01bab81d247b71231e7162c96732f3e2ed15cd63dd432d3a0772cf86daa896f461753f5417599c37139589fd9923e2bda66df324d6516d4b00a
@@ -4,19 +4,28 @@ module RefineHashToIndifferentAccess
4
4
  refine Hash do
5
5
  regular_indexing = instance_method(:[])
6
6
  define_method(:[]) do |key|
7
- if has_key? key.to_sym
7
+ if has_key? key.to_s
8
+ regular_indexing.bind(self).(key.to_s)
9
+ else
8
10
  regular_indexing.bind(self).(key.to_sym)
11
+ end
12
+ end
13
+
14
+ regular_assignment = instance_method(:[]=)
15
+ define_method(:[]=) do |key, value|
16
+ if has_key? key.to_s
17
+ regular_assignment.bind(self).(key.to_s, value)
9
18
  else
10
- regular_indexing.bind(self).(key.to_s)
19
+ regular_assignment.bind(self).(key.to_sym, value)
11
20
  end
12
21
  end
13
22
 
14
23
  regular_deletion = instance_method(:delete)
15
24
  define_method(:delete) do |key|
16
- if has_key? key.to_sym
17
- regular_deletion.bind(self).(key.to_sym)
18
- else
25
+ if has_key? key.to_s
19
26
  regular_deletion.bind(self).(key.to_s)
27
+ else
28
+ regular_deletion.bind(self).(key.to_sym)
20
29
  end
21
30
  end
22
31
  end
@@ -1,3 +1,3 @@
1
1
  module RightSignature
2
- VERSION = "1.1.11"
2
+ VERSION = "1.1.13"
3
3
  end
@@ -270,12 +270,12 @@ describe RightSignature::RailsStyle do
270
270
  metadata: {"abc" => "de:f"},
271
271
  tags: ["hel,lo", "the\"re"],
272
272
  roles: include(
273
- "cc_A" => include(document_role_id: "cc_A"),
274
- "signer_A" => include(document_role_id: "signer_A"),
273
+ cc_A: include(document_role_id: "cc_A"),
274
+ signer_A: include(document_role_id: "signer_A"),
275
275
  ),
276
276
  merge_fields: include(
277
- "Effective Date" => include(name: "Effective Date"),
278
- "Content URL" => include(name: "Content URL")
277
+ "Effective Date".to_sym => include(name: "Effective Date"),
278
+ "Content URL".to_sym => include(name: "Content URL")
279
279
  ),
280
280
  original_template_guid: "a_22168482_df3f2b8fc9894d779d1f07c2d398ce70",
281
281
  original_template_filename: "fw8ben.pdf",
@@ -296,21 +296,21 @@ describe RightSignature::RailsStyle do
296
296
  original_template_guid: "a_Template_GUID",
297
297
  original_template_filename: "MyFilename.pdf",
298
298
  recipients: include(
299
- "signer_A" => include(
299
+ signer_A: include(
300
300
  name: "Jack Employee",
301
301
  ),
302
- "cc_A" => include(
302
+ cc_A: include(
303
303
  name: "Jill Employee",
304
304
  ),
305
305
  ),
306
306
  audit_trails: include(
307
- (@time+0).strftime("%Y-%m-%dT%H:%M:%S%:z") => include(
307
+ (@time+0).strftime("%Y-%m-%dT%H:%M:%S%:z").to_sym => include(
308
308
  keyword: "created",
309
309
  ),
310
- (@time+1).strftime("%Y-%m-%dT%H:%M:%S%:z") => include(
310
+ (@time+1).strftime("%Y-%m-%dT%H:%M:%S%:z").to_sym => include(
311
311
  keyword: "viewed",
312
312
  ),
313
- (@time+2).strftime("%Y-%m-%dT%H:%M:%S%:z") => include(
313
+ (@time+2).strftime("%Y-%m-%dT%H:%M:%S%:z").to_sym => include(
314
314
  keyword: "signed",
315
315
  ),
316
316
  (@time+3).strftime("%Y-%m-%dT%H:%M:%S%:z") => include(
@@ -318,10 +318,10 @@ describe RightSignature::RailsStyle do
318
318
  ),
319
319
  ),
320
320
  form_fields: include(
321
- "Form Field A" => include(
321
+ "Form Field A".to_sym => include(
322
322
  value: "Some Value A",
323
323
  ),
324
- "Form Field B" => include(
324
+ "Form Field B".to_sym => include(
325
325
  value: "Some Value B"
326
326
  ),
327
327
  ),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rightsignature-railstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.11
4
+ version: 1.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Barone