compony 0.0.2 → 0.0.3

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: 9c333fb952f7e7d0014f3a8b076f8f902bb253ca2696b0fe8bec7a59b6f9b2eb
4
- data.tar.gz: 816afcdeeba74972d758eef0b93824b605925b4e9e8f07bb140dac2621c94df2
3
+ metadata.gz: a0925cbc177ea6e36fd56db15cb41227efcb66b7ea5896a2dd76cc13fc7974a5
4
+ data.tar.gz: 517baac0f2d25bb94857c5796d6ae41a94c291628edda7e453736488c2616036
5
5
  SHA512:
6
- metadata.gz: bcf8622372086feb57f31c5e9024576a7c7e27ece17f42d4a225aba8051a9f500730cc2eb872305e02b2189651817ffddd9bf8fd6c618cd3d56b482917d80239
7
- data.tar.gz: ebd6da5daf161538e755dc0a1c7bd59d8d14db81cd7253c419e719665e40f4a276909a4c2546977b6371dd5f61841eeafebdba8ece3f3162671fbb0fe734b18b
6
+ metadata.gz: 2a6ef1cb3327c852d2f544c376f22f34d8bac2eb56ff7c29e13fb887d0b4fcd91aa3de4dcfa3f16393ec386abbbefae593379c87e848518f00978d566250064a
7
+ data.tar.gz: d3a985885dc53f7a4556c338038342f17b65991cea8ac0f993ff2ab0b638984d59b9a09b78ec7e9bec08eea4795debe1892a212875262629ff371295d771021c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.0.3
2
+
3
+ - Tolerate nil anchormodels
4
+ - Fix a nil pointer bug in namespace management
5
+
1
6
  # 0.0.2
2
7
 
3
8
  - Add new model field `Attachment`
data/compony.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # This file is auto-generated via: 'rake gemspec'.
3
3
 
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: compony 0.0.2 ruby lib
5
+ # stub: compony 0.0.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "compony".freeze
9
- s.version = "0.0.2".freeze
9
+ s.version = "0.0.3".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
@@ -7,7 +7,7 @@ module Compony
7
7
  end
8
8
 
9
9
  def value_for(data, controller: nil, **_)
10
- return transform_and_join(data.send(@name), controller:, &:label)
10
+ return transform_and_join(data.send(@name), controller:) { |el| el&.label }
11
11
  end
12
12
 
13
13
  def simpleform_input(form, _component, **input_opts)
@@ -2,7 +2,7 @@ module Compony
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 3
6
6
 
7
7
  EDGE = false
8
8
 
data/lib/compony.rb CHANGED
@@ -220,7 +220,7 @@ module Compony
220
220
  # Goes through model_field_namespaces and returns the first hit for the given constant
221
221
  # @param constant [Constant] The constant that is searched, e.g. RichText -> would return e.g. Compony::ModelFields::RichText
222
222
  def self.model_field_class_for(constant)
223
- @model_field_namespaces.each do |model_field_namespace|
223
+ model_field_namespaces.each do |model_field_namespace|
224
224
  model_field_namespace = model_field_namespace.constantize if model_field_namespace.is_a?(::String)
225
225
  if model_field_namespace.const_defined?(constant, false)
226
226
  return model_field_namespace.const_get(constant, false)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compony
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Kalbermatter