smart_params 2.0.7 → 2.0.8

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: eb250627f0fe0822ac3c22a3504c173796984e5b8a5a99bc2e26722802c76f9e
4
- data.tar.gz: 97b668a1325a1bf6e1dfec2bcddf3acc9945bc71eb7797209b797f1eeddb755b
3
+ metadata.gz: 6b54579906b5351c77e42e6d13b61202a320224efb455db82d2a1b1df87c1a9c
4
+ data.tar.gz: f3fa877d10818556ee873f7b90d0f8fbaf14f15783211f1dbcfde919ec7e8f31
5
5
  SHA512:
6
- metadata.gz: 9b180e560b1795dd913bb1c7660d07045a838eedb57450b5ebd4f403d17fb08b0aac4ca4143defa0b2e9ad5a6d5acfb0c0b257a34857435a88dab8a837177d06
7
- data.tar.gz: 31095d8e3df48bcdd69f76cab140481a9378456cd95c29586e0c815a8fc1ea75285894f4f8a0f9d10576ea3eb2f8570fd18adbcfe2263fb44005eba27ac80b33
6
+ metadata.gz: b75dfea217c60818deee6e0ca0a4d8fb6aea539291903d9aebe888d87cf2cd3f8f7e2676b4df3bb8c1640c10e1f3767f9b2ca5839aed248040bbb6a5d504f91a
7
+ data.tar.gz: 121728e46d52c0ed63243779298aed1d510f09cfc2f8feb15cda092f5be858b1542fbc3d4bef41270de13db7ca718069cbb9123316689d2daacfb49085503d6f
@@ -38,7 +38,7 @@ module SmartParams
38
38
  end
39
39
 
40
40
  def weight
41
- keychain
41
+ keychain.map(&:to_s)
42
42
  end
43
43
 
44
44
  private def field(key, type:, &subfield)
@@ -1,3 +1,3 @@
1
1
  module SmartParams
2
- VERSION = "2.0.7"
2
+ VERSION = "2.0.8"
3
3
  end
@@ -115,6 +115,40 @@ RSpec.describe SmartParams do
115
115
  end
116
116
  end
117
117
 
118
+ context "with string key params" do
119
+ let(:params) do
120
+ {
121
+ data: {
122
+ type: "accounts",
123
+ attributes: {
124
+ email: "kurtis@example.com",
125
+ "full-name" => "Kurtis Rainbolt-Greene"
126
+ }
127
+ }
128
+ }
129
+ end
130
+
131
+ it "returns as json" do
132
+ expect(
133
+ subject
134
+ ).to match(
135
+ {
136
+ "data" => hash_including(
137
+ {
138
+ "type" => "accounts",
139
+ "attributes" => hash_including(
140
+ {
141
+ "email" => "kurtis@example.com",
142
+ "full-name" => "Kurtis Rainbolt-Greene"
143
+ }
144
+ )
145
+ }
146
+ ),
147
+ }
148
+ )
149
+ end
150
+ end
151
+
118
152
  context "with a reasonably good params" do
119
153
  let(:params) do
120
154
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_params
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurtis Rainbolt-Greene
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-10 00:00:00.000000000 Z
11
+ date: 2018-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler