human_attributes 0.7.1 → 1.1.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
2
  SHA256:
3
- metadata.gz: 100442352d961937e384df6bfb4aa8c137be3359048ce9c0359f4a208beb4db8
4
- data.tar.gz: 946c6db1955e759761eb9be4c3af1142a6541b600ffec8a80af318e62c381d5d
3
+ metadata.gz: 698bc5b6eb3278a9ee71e9a2d48446d09f5eaafeabd1812c9d9de62a7a28fa09
4
+ data.tar.gz: be9b954b735b26603712ce7ac133c9d2c81d5c76c39cbb6f5f79c4e95e68cded
5
5
  SHA512:
6
- metadata.gz: 394cdc7be845cb97ea5dcd4d6f0c2e41a28eb8b660a42297aadb6a3a28145f7477d2e2225b28269845aff8e26858393d019a6aae24bbbb0136a841812788af45
7
- data.tar.gz: 2df11b1cc727eef343ce702d559f14e9f6f3c432993b5231051b2343911ca1b26a61f90959df684a924be4ea59db99e7c413ec72da8fb4e0c4197da1b57db367
6
+ metadata.gz: ea56f86bea32398c569f7eeec3a35ccd3ef35550d0e7612b9557c586488130099e9e0c5430efdf31598991d59f38b106a45532b361a1991e48f42df2633fc280
7
+ data.tar.gz: 75abffc2f158264e95dfbdc3a4884fcf05e08b24fa776cc33c5930b03547deb89aa95d2a9f035f1fec7689b7e01008c43804fc660699fde6fa55e0fb2550767b
data/.circleci/config.yml CHANGED
@@ -14,10 +14,10 @@ executors:
14
14
  parameters:
15
15
  ruby-version:
16
16
  description: "Ruby version"
17
- default: "2.7"
17
+ default: "3.2"
18
18
  type: string
19
19
  docker:
20
- - image: circleci/ruby:<<parameters.ruby-version>>-node
20
+ - image: cimg/ruby:<<parameters.ruby-version>>-node
21
21
  environment: *env-vars
22
22
 
23
23
  commands:
@@ -94,11 +94,11 @@ workflows:
94
94
  - test:
95
95
  matrix:
96
96
  parameters:
97
- ruby-version: ["2.5", "2.6", "2.7"]
97
+ ruby-version: ["2.7", "3.1", "3.2"]
98
98
  - deploy:
99
99
  context: org-global
100
100
  filters:
101
101
  tags:
102
102
  only: /.*/
103
103
  branches:
104
- ignore: /.*/
104
+ ignore: /.*/
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7
1
+ 3.2
data/CHANGELOG.md CHANGED
@@ -2,12 +2,26 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
- # 0.7.0
5
+ ### 1.1.0
6
+ ##### Changed
7
+
8
+ * Add support for ruby 3.2
9
+
10
+ ### 1.0.0
11
+ ##### Removed
12
+
13
+ * Removed support for ruby 2.5 and 2.6
14
+
15
+ ##### Fixed
16
+
17
+ * Fix enum translations for ruby 3.1
18
+
19
+ ### 0.7.1
6
20
 
7
21
  ##### Fixed
8
22
 
9
23
  * Fix enum translations: move translations under pluralized attribute key.
10
- # 0.7.0
24
+ ### 0.7.0
11
25
  ##### Changed
12
26
 
13
27
  * Replace travis with circleci.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- human_attributes (0.7.1)
4
+ human_attributes (1.1.0)
5
5
  factory_bot
6
6
  rails (>= 4.2.0)
7
7
 
@@ -82,6 +82,7 @@ GEM
82
82
  thor (>= 0.19.4, < 2.0)
83
83
  tins (~> 1.6)
84
84
  crass (1.0.6)
85
+ date (3.3.3)
85
86
  diff-lcs (1.4.4)
86
87
  docile (1.4.0)
87
88
  draper (4.0.2)
@@ -98,7 +99,7 @@ GEM
98
99
  activesupport (>= 5.0.0)
99
100
  ffi (1.15.1)
100
101
  formatador (0.2.5)
101
- globalid (1.0.0)
102
+ globalid (1.1.0)
102
103
  activesupport (>= 5.0)
103
104
  guard (2.17.0)
104
105
  formatador (>= 0.2.4)
@@ -124,17 +125,31 @@ GEM
124
125
  crass (~> 1.0.2)
125
126
  nokogiri (>= 1.5.9)
126
127
  lumberjack (1.2.8)
127
- mail (2.7.1)
128
+ mail (2.8.1)
128
129
  mini_mime (>= 0.1.1)
130
+ net-imap
131
+ net-pop
132
+ net-smtp
129
133
  marcel (1.0.2)
130
134
  method_source (1.0.0)
131
135
  mini_mime (1.0.3)
132
136
  minitest (5.14.4)
133
137
  nenv (0.3.0)
134
- nio4r (2.5.8)
135
- nokogiri (1.11.7-x86_64-darwin)
138
+ net-imap (0.3.6)
139
+ date
140
+ net-protocol
141
+ net-pop (0.1.2)
142
+ net-protocol
143
+ net-protocol (0.2.1)
144
+ timeout
145
+ net-smtp (0.3.3)
146
+ net-protocol
147
+ nio4r (2.5.9)
148
+ nokogiri (1.14.0-arm64-darwin)
136
149
  racc (~> 1.4)
137
- nokogiri (1.11.7-x86_64-linux)
150
+ nokogiri (1.14.0-x86_64-darwin)
151
+ racc (~> 1.4)
152
+ nokogiri (1.14.0-x86_64-linux)
138
153
  racc (~> 1.4)
139
154
  notiffany (0.1.3)
140
155
  nenv (~> 0.1)
@@ -244,6 +259,7 @@ GEM
244
259
  term-ansicolor (1.7.1)
245
260
  tins (~> 1.0)
246
261
  thor (1.1.0)
262
+ timeout (0.4.0)
247
263
  tins (1.29.1)
248
264
  sync
249
265
  tzinfo (2.0.4)
@@ -255,6 +271,8 @@ GEM
255
271
  zeitwerk (2.4.2)
256
272
 
257
273
  PLATFORMS
274
+ arm64-darwin-22
275
+ x86_64-darwin-19
258
276
  x86_64-darwin-20
259
277
  x86_64-linux
260
278
 
data/README.md CHANGED
@@ -589,6 +589,12 @@ To run the specs you need to execute, **in the root path of the gem**, the follo
589
589
  bundle exec guard
590
590
  ```
591
591
 
592
+ To run all the specs of the gem, **in the root path of the gem**, the following command:
593
+
594
+ ```bash
595
+ bundle exec rspec
596
+ ```
597
+
592
598
  You need to put **all your tests** in the `/human_attributes/spec/dummy/spec/` directory.
593
599
 
594
600
  ## Publishing
@@ -2,7 +2,7 @@ module HumanAttributes
2
2
  module Formatters
3
3
  class Date < Base
4
4
  def apply(_instance, value)
5
- I18n.l(value.to_date, options)
5
+ I18n.l(value.to_date, **options)
6
6
  rescue
7
7
  nil
8
8
  end
@@ -2,7 +2,7 @@ module HumanAttributes
2
2
  module Formatters
3
3
  class Datetime < Base
4
4
  def apply(_instance, value)
5
- I18n.l(value.to_datetime, options)
5
+ I18n.l(value.to_datetime, **options)
6
6
  rescue
7
7
  nil
8
8
  end
@@ -14,7 +14,7 @@ module HumanAttributes
14
14
  end
15
15
 
16
16
  def translate(key, default)
17
- I18n.t(key, { default: default })
17
+ I18n.t(key, default: default)
18
18
  end
19
19
 
20
20
  def enum_defined?(_instance)
@@ -1,3 +1,3 @@
1
1
  module HumanAttributes
2
- VERSION = "0.7.1"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: human_attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platanus
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-11-14 00:00:00.000000000 Z
12
+ date: 2023-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: factory_bot
@@ -313,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
313
313
  - !ruby/object:Gem::Version
314
314
  version: '0'
315
315
  requirements: []
316
- rubygems_version: 3.1.6
316
+ rubygems_version: 3.4.10
317
317
  signing_key:
318
318
  specification_version: 4
319
319
  summary: Gem to generate human readable ActiveRecord attributes
@@ -337,7 +337,6 @@ test_files:
337
337
  - spec/dummy/bin/rails
338
338
  - spec/dummy/bin/rake
339
339
  - spec/dummy/bin/setup
340
- - spec/dummy/config.ru
341
340
  - spec/dummy/config/application.rb
342
341
  - spec/dummy/config/boot.rb
343
342
  - spec/dummy/config/cable.yml
@@ -360,6 +359,7 @@ test_files:
360
359
  - spec/dummy/config/puma.rb
361
360
  - spec/dummy/config/routes.rb
362
361
  - spec/dummy/config/storage.yml
362
+ - spec/dummy/config.ru
363
363
  - spec/dummy/db/migrate/20161113032308_create_purchases.rb
364
364
  - spec/dummy/db/migrate/20211006145358_add_payment_method_to_purchase.rb
365
365
  - spec/dummy/db/migrate/20211103114451_add_shipping_to_purchase.rb