better_record 0.17.3 → 0.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5516ca5c78cbac66c48423ce253bb55cc6440b999ea672711e4f8fd404e5c2cf
4
- data.tar.gz: e7ee572104cfd0228c2c32ae1e6d3d65661aedfa7692d02d087f18ebb236c733
3
+ metadata.gz: f4b76163a9ada3cdad8b91898d38f938ba23973212e0282067febd4c23123d3d
4
+ data.tar.gz: bc858e27f638903225ad6a123be332ddbbbe56f02142abfcd42e2ad84ca0eb3b
5
5
  SHA512:
6
- metadata.gz: ffd4a9a236a980c579039a6d4c470176af465378ed6dcd9f45c7a70c98b9c298be1828c1e11c220789c0635d5efa87a183c8f9f49138c64fd2c5df28e4ace0ef
7
- data.tar.gz: 2d037b4e98543662ed6800cef948f3f8ed74ad3463498a743dd520f632232c3539a0d96b1ca75313a5274b75d8099bf3d9f97e3a351a8f78300b3e9106853f8b
6
+ metadata.gz: 57f009e6493ed09db13d5577ea3065365364ace9613efeec56526798ca3aab5794b6e57998ae759d1647090848c8966f38b3631d0298ae8c4a88b1aa35dacab9
7
+ data.tar.gz: de1b727ae7428a0457014cc849c2627dbcf50485cbdddca01d4ac712885c9037cb8dcecf2951c13ec37f9faf7479e5a125f49e6bec0251cb7cc3aa6fbe796c4e
@@ -0,0 +1,11 @@
1
+ class ActiveSupport::TimeWithZone
2
+ include GlobalID::Identification
3
+
4
+ def id
5
+ iso8601
6
+ end
7
+
8
+ def self.find(time)
9
+ time.is_a?(Integer) ? Time.zone.at(time) : Time.zone.parse(time)
10
+ end
11
+ end
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Date
4
+ include GlobalID::Identification
5
+
4
6
  def month_name
5
7
  Date::MONTHNAMES[month]
6
8
  end
@@ -8,4 +10,9 @@ class Date
8
10
  def self.today
9
11
  current
10
12
  end
13
+
14
+ alias_method :id, :to_s
15
+ def self.find(str)
16
+ parse(str)
17
+ end
11
18
  end
@@ -0,0 +1,11 @@
1
+ class Time
2
+ include GlobalID::Identification
3
+
4
+ def id
5
+ iso8601
6
+ end
7
+
8
+ def self.find(time)
9
+ time.is_a?(Integer) ? Time.zone.at(time) : Time.zone.parse(time)
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterRecord
4
- VERSION = '0.17.3'
4
+ VERSION = '0.17.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.3
4
+ version: 0.17.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sampson Crowley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-11 00:00:00.000000000 Z
11
+ date: 2019-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -250,10 +250,12 @@ files:
250
250
  - app/views/layouts/better_record/application.html.erb
251
251
  - config/initializers/active_record/gender_type.rb
252
252
  - config/initializers/active_record/money_integer_type.rb
253
+ - config/initializers/active_support/time_with_zone.rb
253
254
  - config/initializers/concerns.rb
254
255
  - config/initializers/core_ext/date.rb
255
256
  - config/initializers/core_ext/integer.rb
256
257
  - config/initializers/core_ext/string.rb
258
+ - config/initializers/core_ext/time.rb
257
259
  - config/initializers/dkim.rb
258
260
  - config/initializers/filter_parameter_logging.rb
259
261
  - config/initializers/inflections.rb