enumerate_it 3.2.3 → 3.2.4

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: b6622befbb458a41cdff981657448f218c412f1960189d1c103a10517ae46554
4
- data.tar.gz: 94d6ea1c147fe0fdc4e138f8370fe397ff4152232c6bcb9f93fef4f903f9bce5
3
+ metadata.gz: eb83f052edf5a989af33b9734d8307c774b08504255a433ba86105b93dc71298
4
+ data.tar.gz: 62282a46a5759e6e61b053ca80adeb674c1df7ffb9d392652b818e4009e94ca9
5
5
  SHA512:
6
- metadata.gz: 142e44a95ba9b40c88d061c890243d3e1f742bb06d542308df63a48fbf5c664df641d432ede82d0b428b4bfd940188c410dea5fd1aafb2db607a4557a6c8acb4
7
- data.tar.gz: 7eef4802537e07ec31e001c3c8b72cd17484916897a51b352f920b4b9870c806fc42bec0af353b007d12727b03fb70306c39d82fb1970dcc4a2f77f0b2e85a9f
6
+ metadata.gz: e6c9483acab55bd80890ff5cea29c82e4a58c4ace98af47edce11244327b4d51c27d6966988d4f4a820864654576fb9c7c829a447dc1a99f45d411ce384b91ad
7
+ data.tar.gz: 04f383f747ff8349c4ec58e495fd08a0b654e90bb5c5337833ee257e8122204dd6786bd2cefbaf74e7b934c06219f238f2be1ead4da7f359fa72c0e3c45a4904
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- enumerate_it (3.2.3)
4
+ enumerate_it (3.2.4)
5
5
  activesupport (>= 5.0.7.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (7.0.3.1)
10
+ activesupport (7.0.4)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 1.6, < 2)
13
13
  minitest (>= 5.1)
@@ -2,8 +2,8 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'activerecord', '~> 6.0.5.1'
6
- gem 'activesupport', '~> 6.0.5.1'
5
+ gem 'activerecord', '~> 6.0.6'
6
+ gem 'activesupport', '~> 6.0.6'
7
7
  gem 'sqlite3', '~> 1.4.2'
8
8
 
9
9
  gemspec path: '../'
@@ -2,8 +2,8 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'activerecord', '~> 6.1.6.1'
6
- gem 'activesupport', '~> 6.1.6.1'
5
+ gem 'activerecord', '~> 6.1.7'
6
+ gem 'activesupport', '~> 6.1.7'
7
7
  gem 'sqlite3', '~> 1.4.2'
8
8
 
9
9
  gemspec path: '../'
@@ -2,8 +2,8 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'activerecord', '~> 7.0.3.1'
6
- gem 'activesupport', '~> 7.0.3.1'
5
+ gem 'activerecord', '~> 7.0.4'
6
+ gem 'activesupport', '~> 7.0.4'
7
7
  gem 'sqlite3', '~> 1.4.2'
8
8
 
9
9
  gemspec path: '../'
@@ -1,3 +1,3 @@
1
1
  module EnumerateIt
2
- VERSION = '3.2.3'.freeze
2
+ VERSION = '3.2.4'.freeze
3
3
  end
@@ -29,12 +29,10 @@ module EnumerateIt
29
29
  singular_name
30
30
  end
31
31
 
32
- def locale_fields
33
- attributes.map(&:name)
34
- end
35
-
36
32
  def fields
37
- if attributes.first.type == :string
33
+ if attributes.empty?
34
+ args
35
+ elsif attributes.first.type == :string
38
36
  attributes.map(&:name)
39
37
  else
40
38
  attributes.map { |attribute| [attribute.name, attribute.type] }
@@ -1,6 +1,6 @@
1
1
  <%= default_lang %>:
2
2
  enumerations:
3
3
  <%= singular_name %>:
4
- <%- locale_fields.each do |name, _| -%>
4
+ <%- fields.each do |name, _| -%>
5
5
  <%= name %>: '<%= name.humanize %>'
6
6
  <%- end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enumerate_it
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cássio Marques
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-09-03 00:00:00.000000000 Z
12
+ date: 2022-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport