respond_for_helper 1.1.0 → 1.1.1

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: 605ea6e5b57890e065931756614d979f3f131a6581525622feb96d51c56dc91b
4
- data.tar.gz: d7bd4702e2a3a0986b19b18361e39c24a8be69472e4c6f594ba51dae3971a3a0
3
+ metadata.gz: 5c9d236367624f955240459dad1d1757ed3757e9fe59823ec0ba6a829cf41d8c
4
+ data.tar.gz: 3c06d61ccd843cc4e41f82decbc4088b51c5e96bf0801fe0409b08b9d16fe0b0
5
5
  SHA512:
6
- metadata.gz: ea3adad9460730c33cc318cdebe611c7ce76199241e5c83d6d6c885fdc665070aeabafefc7f1cfb5c4d2d8490c096a73d62a69a05423219e56cf35b10403b899
7
- data.tar.gz: a57499b403d33f4e844f73ce0faf495954922d4d21848ee3bf3dac69e7b62ffb5ef92d652149827b4269f346043e75a96f5e6293adbd23d6cf0b9f88622ae94d
6
+ metadata.gz: 5c0c9fcd0b643e30b9ea9ae801a8f3d11cee1b36b7df7fd737d3d148ab57dc41e11b6b9de8d0e1887e32c2698b96ded6ed01e7456752748c9950ed61c92818b7
7
+ data.tar.gz: 2fec9caf0d96d44190d720493bc8c27141fe1a247cbca1a8fe2185a9d98c751f37a1aaa2e748a3a6b3b3687f75027e0ffb5b043be7e3d4f75bb758c89a3e7c4e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.1.1
4
+
5
+ * Use `Time.zone.now` if possible.
6
+
3
7
  ## 1.1.0
4
8
 
5
9
  * Add `formats` option to `respond_for`.
@@ -5,7 +5,17 @@ module RespondForHelper
5
5
  class Timestamp < Base
6
6
  def initialize(type, options = {})
7
7
  super
8
- @options = options.reverse_merge(timestamp: I18n.l(Time.now))
8
+ @options = options.reverse_merge(timestamp: I18n.l(now))
9
+ end
10
+
11
+ private
12
+
13
+ def now
14
+ if Time.respond_to?(:zone)
15
+ Time.zone.now
16
+ else
17
+ Time.now
18
+ end
9
19
  end
10
20
  end
11
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RespondForHelper
4
- VERSION = '1.1.0'
4
+ VERSION = '1.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: respond_for_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-05 00:00:00.000000000 Z
11
+ date: 2022-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails