enumerations 2.5.2 → 2.5.3

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
  SHA256:
3
- metadata.gz: 34bf65bbe1b914b7d56e3b2ef93b0379deccc09709e37900ea4d6ed8ea97fa3d
4
- data.tar.gz: da852c0b54ab6c0013564f2b30b0d6df7ccdb1ddd6017c551d078994874f3691
3
+ metadata.gz: 7415435429c08e2093220592c091dffca83b50fd26f6d71836873594da483778
4
+ data.tar.gz: 63538f83e93d43926f2401297c213a03c814efb667d96259f8f86cfa241072e3
5
5
  SHA512:
6
- metadata.gz: ee7e94705e02796314e0f494d6c55231173b76697d34c691e38bc511f7448216306af75fa016558247903210b965a19316fa358210dd83c00ea42e589f05d211
7
- data.tar.gz: 485c5e53c7dd4b3b5a85c5725f321354e822907fddb64f76c14abeed130c084cd11ea77469376519e08897e594d75b3a5445b7fcc9c7f10c64160f1af344b8df
6
+ metadata.gz: dfcb47a129cd32afa78c25897aa681bef271266c878ba9fc077df12ed15543ebdab1f97e71c580adb9e19523bbf3287b3ec0a46a52b247f42030c4f9ade31b1d
7
+ data.tar.gz: 2dbce2808dcadd1cb3e0b16193b9f66e567846c8d9dca89478d30edc6c1b583e8b8b9e8443e08ec162e7e30dc78423cf7b90edf5de41de2b64722b664785a1d2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Change Log
2
2
 
3
+ ## [v2.5.3](https://github.com/infinum/enumerations/tree/v2.5.3) (2022-02-02)
4
+ [Full Changelog](https://github.com/infinum/enumerations/compare/v2.5.2...v2.5.3)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Prevent `method_missing` instantiates new instance of `Enumerations::Base`; returns `String` instead
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Prevent method_missing to instantiates new Enumerations::Base [\#58](https://github.com/infinum/enumerations/pull/58) ([PetarCurkovic](https://github.com/PetarCurkovic))
13
+
3
14
  ## [v2.5.2](https://github.com/infinum/enumerations/tree/v2.5.2) (2022-01-27)
4
15
  [Full Changelog](https://github.com/infinum/enumerations/compare/v2.5.1...v2.5.2)
5
16
 
data/README.md CHANGED
@@ -4,7 +4,7 @@ Enumerations
4
4
  [![Gem Version](https://badge.fury.io/rb/enumerations.svg)](https://badge.fury.io/rb/enumerations)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/c3b96c5afceaa9be2173/maintainability)](https://codeclimate.com/github/infinum/enumerations/maintainability)
6
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/c3b96c5afceaa9be2173/test_coverage)](https://codeclimate.com/github/infinum/enumerations/test_coverage)
7
- [![Build Status](https://semaphoreci.com/api/v1/infinum/enumerations/branches/master/shields_badge.svg)](https://semaphoreci.com/infinum/enumerations)
7
+ ![Build Status](https://github.com/infinum/enumerations/actions/workflows/test.yml/badge.svg)
8
8
 
9
9
  Rails plugin for Enumerations in ActiveRecord models.
10
10
 
@@ -133,5 +133,11 @@ module Enumerations
133
133
 
134
134
  create_instance_methods
135
135
  end
136
+
137
+ private
138
+
139
+ def chars(string)
140
+ string
141
+ end
136
142
  end
137
143
  end
@@ -1,3 +1,3 @@
1
1
  module Enumerations
2
- VERSION = '2.5.2'.freeze
2
+ VERSION = '2.5.3'.freeze
3
3
  end
data/test/value_test.rb CHANGED
@@ -100,4 +100,12 @@ class ValueTest < Minitest::Test
100
100
 
101
101
  assert_equal enum.foobar.respond_to?(:name), false
102
102
  end
103
+
104
+ def test_string_methods_on_value
105
+ enum = Class.new(Enumerations::Base) do
106
+ value :foobar
107
+ end
108
+
109
+ assert_equal enum.foobar.upcase, 'FOOBAR'
110
+ end
103
111
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enumerations
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomislav Car