testingrecord 1.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: fd979c6e6979b672916851b0be5603d6a4dabbc43855b596c5272fbd93dfdadc
4
- data.tar.gz: 9ff521bdd86bff0ed97c43f055b5add594296376dca665005271a320e44518d3
3
+ metadata.gz: 228079a525e184348661a215f33fcae6daf628c54592793343f41525b15ea717
4
+ data.tar.gz: f95a3e63f583936668b4ccebe7eae1186605f47e53895fd2e72e1019955b05e1
5
5
  SHA512:
6
- metadata.gz: f922ea85183b6c28646ac42a9325d509d85c12bf3d447056defd626b01760b16b0d049749bc02ccc50be4fa7036e59be5973f16a7649400d1fd978398df04d0b
7
- data.tar.gz: 87ceaea89ae230ecf0d760cfda87bf5de91953ea6584fd364986dc770b90369725680b8a63404d147262bbaccc8a9fd252941a6803ebef1efe024fcef1248b12
6
+ metadata.gz: b8c1e5f2a892e41ee591422a9febeca1e52c8a6043f3010b564496f072bb0cb5183f67d16f5afcc58d16655f8a179f00271ccf168124d7c3d0bddec3471a0823
7
+ data.tar.gz: 2d1ffd7be42bed6f2a483d5adb46cf1cfec4c465f0b62ff805ca0a1a0280248e7984c1a3220609d13c686c307fcf020c466c2ce087164451c8eede24a471d006
@@ -25,6 +25,7 @@ module TestingRecord
25
25
  #
26
26
  # @return [TestingRecord::Model]
27
27
  def create(attributes)
28
+ attributes.transform_keys!(&:to_sym)
28
29
  if respond_to?(:all)
29
30
  create_with_caching(attributes)
30
31
  else
@@ -66,7 +67,7 @@ module TestingRecord
66
67
  def create_with_caching(attributes)
67
68
  ensure_primary_key_presence(attributes)
68
69
  ensure_deduplication(attributes)
69
- new(attributes.transform_keys(&:to_sym)).tap do |entity|
70
+ new(attributes).tap do |entity|
70
71
  configure_data(entity, attributes)
71
72
  add_helpers(attributes) if entity.class.instance_variable_get(:@include_helpers)
72
73
  cache_entity(entity)
@@ -75,7 +76,7 @@ module TestingRecord
75
76
 
76
77
  def create_without_caching(attributes)
77
78
  ensure_primary_key_presence(attributes)
78
- new(attributes.transform_keys(&:to_sym)).tap do |entity|
79
+ new(attributes).tap do |entity|
79
80
  configure_data(entity, attributes)
80
81
  add_helpers(attributes) if entity.class.instance_variable_get(:@include_helpers)
81
82
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TestingRecord
4
- VERSION = '1.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testingrecord
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Hill
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-28 00:00:00.000000000 Z
11
+ date: 2026-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: automation_helpers