chop 0.23.8 → 0.24.0

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
- SHA1:
3
- metadata.gz: 983026fa3d934d4b7adafeac19546fec6c8550b1
4
- data.tar.gz: c70bf8196d0aa7d0066ce24c09638903eec71621
2
+ SHA256:
3
+ metadata.gz: af7f4ec5f90dbc90ca3dd23f091388583a1f5685a8d2701f56a2779134e07702
4
+ data.tar.gz: 019b73dd3bd79756bc5b83acb65b73994cd61875fa1c940bbc6cc9e1ef497ea3
5
5
  SHA512:
6
- metadata.gz: a9d3ab204fbd53c21339d3bb9cd2c6b84dcebb945b710f1d9f8d1058cdf6c8c04edde96e7f1b5ac6ab48f46ad852432db336e8bd022d6ea55e617665e286f1ba
7
- data.tar.gz: b87490c821e61315974a5d96d1c083ed55e574f54f2fcf45c33b559ea4d3685b5a5b1ea863e02d8bd0f120b1820369ee2544a2f723171a76591b43956a5e8f92
6
+ metadata.gz: 308830226d83493873bf32aa8b071b1c006306d875ea146df4b8c7fc1c7b09f105b020cab17fa847b6461ba7dd74a5decd2a1e0fa3788b173311f869e49471c1
7
+ data.tar.gz: f7b9d15d9550dc2a3bfc1b0001413a3a735d15296edcf6b89b4b0da95fcb9cacb24dbb6ac2d2ac5a92e43acfa3105570f32a4bb9c59623c8170ca47435518a2d
@@ -144,6 +144,7 @@ module Chop
144
144
  end
145
145
 
146
146
  def has_many key, klass=nil, delimiter: ", ", name_field: :name
147
+ klass ||= key.to_s.classify.constantize
147
148
  field key do |names|
148
149
  names.split(delimiter).map do |name|
149
150
  klass.find_by!(name_field => name)
@@ -152,6 +153,7 @@ module Chop
152
153
  end
153
154
 
154
155
  def has_one key, klass=nil, name_field: :name
156
+ klass ||= key.to_s.classify.constantize
155
157
  field key do |name|
156
158
  klass.find_by!(name_field => name) if name.present?
157
159
  end
@@ -1,3 +1,3 @@
1
1
  module Chop
2
- VERSION = "0.23.8"
2
+ VERSION = "0.24.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.8
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-04 00:00:00.000000000 Z
11
+ date: 2019-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -141,8 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubyforge_project:
145
- rubygems_version: 2.6.14
144
+ rubygems_version: 3.0.4
146
145
  signing_key:
147
146
  specification_version: 4
148
147
  summary: Slice and dice your cucumber tables with ease!