human_attributes 0.7.1 → 1.0.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: 92618ffd9b16cf2d40c4359381d8a68734491e4d99a561b47d55920b272d9922
4
+ data.tar.gz: 1fd33dbcd0e569f343716869ce5a174ed5b36e9fc88306af039df6c7eb40b8f4
5
5
  SHA512:
6
- metadata.gz: 394cdc7be845cb97ea5dcd4d6f0c2e41a28eb8b660a42297aadb6a3a28145f7477d2e2225b28269845aff8e26858393d019a6aae24bbbb0136a841812788af45
7
- data.tar.gz: 2df11b1cc727eef343ce702d559f14e9f6f3c432993b5231051b2343911ca1b26a61f90959df684a924be4ea59db99e7c413ec72da8fb4e0c4197da1b57db367
6
+ metadata.gz: 9359ad032947d6d28d276d00795feb2a6c264c653f456cb390bb5f29ce8fd33e8b1ac5ca8c8ffbf51f7d22f5fa1f276c48162b77ad899169e8295b155953da16
7
+ data.tar.gz: e4da77f91c5f8e1adf8c2d2e260e2b0e459684b9807b845ca7e2db5db6ab13cb708c9e78714dc996dd94272f83249d608274c0757b2169125a8fd6ab4b71f8fd
data/.circleci/config.yml CHANGED
@@ -17,7 +17,7 @@ executors:
17
17
  default: "2.7"
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" ]
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.1.2
data/CHANGELOG.md CHANGED
@@ -2,12 +2,21 @@
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.0.0
6
+ ##### Removed
7
+
8
+ * Removed support for ruby 2.5 and 2.6
9
+
10
+ ##### Fixed
11
+
12
+ * Fix enum translations for ruby 3.1
13
+
14
+ ### 0.7.1
6
15
 
7
16
  ##### Fixed
8
17
 
9
18
  * Fix enum translations: move translations under pluralized attribute key.
10
- # 0.7.0
19
+ ### 0.7.0
11
20
  ##### Changed
12
21
 
13
22
  * 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.0.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,29 @@ 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)
138
+ net-imap (0.3.4)
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
134
147
  nio4r (2.5.8)
135
- nokogiri (1.11.7-x86_64-darwin)
148
+ nokogiri (1.14.0-x86_64-darwin)
136
149
  racc (~> 1.4)
137
- nokogiri (1.11.7-x86_64-linux)
150
+ nokogiri (1.14.0-x86_64-linux)
138
151
  racc (~> 1.4)
139
152
  notiffany (0.1.3)
140
153
  nenv (~> 0.1)
@@ -244,6 +257,7 @@ GEM
244
257
  term-ansicolor (1.7.1)
245
258
  tins (~> 1.0)
246
259
  thor (1.1.0)
260
+ timeout (0.3.1)
247
261
  tins (1.29.1)
248
262
  sync
249
263
  tzinfo (2.0.4)
@@ -255,6 +269,7 @@ GEM
255
269
  zeitwerk (2.4.2)
256
270
 
257
271
  PLATFORMS
272
+ x86_64-darwin-19
258
273
  x86_64-darwin-20
259
274
  x86_64-linux
260
275
 
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.0.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.0.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-02-06 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.3.26
317
317
  signing_key:
318
318
  specification_version: 4
319
319
  summary: Gem to generate human readable ActiveRecord attributes