time_of_day_attr 3.0.0.beta.3 → 3.0.0

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
  SHA1:
3
- metadata.gz: 3b06e40a4fe45b615b471bdff9c9a103a22efb67
4
- data.tar.gz: f5d0b0a8ffc35d463684a7922619f4b892f9f1f7
3
+ metadata.gz: 9b0cc52b0fb94fb30d40279c7ec292ea48e2ae7e
4
+ data.tar.gz: 6ea3ff89b9c408dd7f795574990bf1c140bec4a9
5
5
  SHA512:
6
- metadata.gz: a374f532ba464a638ee83adb695b5ca2352f761bedbdc97a5683286b7c53d78f246a7ad315a8a5b63b437da1f5e788bf6cb97492cc661c7df77c3422e942a498
7
- data.tar.gz: 15aa17eaa174af502b10e94640c2fc3199ab3b67bdc0632cbfeee09d91a3c7f0d30482957876d7f55b2d9748329c9a0fe704fbda11eef6d96d50bfb9034adbe3
6
+ metadata.gz: e6967049988bbd33cc92bb2c4a67b39cd85aba9a82679a96d0ae53145a931e10634c38d91b3381debd880561f4fdfad46b61dca83292bffae1f795700d43dc08
7
+ data.tar.gz: 9a687a0155b4b24ccd0424e3d4f80a90811843c260b1736b6a769ddb43fb2d56fe47cd5a288649974848718074987504fda6b8e897908f77fe9619d92dfbf1d8
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Time of day attributes for your Rails model
2
2
  [![Gem Version](https://badge.fury.io/rb/time_of_day_attr.png)](http://badge.fury.io/rb/time_of_day_attr) [![Code Climate](https://codeclimate.com/github/clemenst/time_of_day_attr.png)](https://codeclimate.com/github/clemenst/time_of_day_attr) [![License](https://img.shields.io/npm/l/express.svg?style=flat)](http://clemenst.mit-license.org)
3
3
 
4
- This ruby gem converts time of day to seconds since midnight and back. The seconds value is stored in the database and can be used for calculations and validations.
4
+ This ruby gem converts time of day to seconds (since midnight) and back. The value in seconds can be used for calculations and validations.
5
5
 
6
6
  ## Installation
7
7
 
@@ -7,8 +7,11 @@ module TimeOfDayAttr
7
7
  time_format = TimeFormat.translate_format(format)
8
8
 
9
9
  time_of_day = seconds_to_time_of_day(value, time_format)
10
-
11
- options[:omit_minutes_at_full_hour] ? TimeOfDay.omit_minutes_at_full_hour(time_of_day) : time_of_day
10
+ if options[:omit_minutes_at_full_hour]
11
+ TimeOfDay.omit_minutes_at_full_hour(time_of_day)
12
+ else
13
+ time_of_day
14
+ end
12
15
  end
13
16
 
14
17
  def self.seconds_to_time_of_day(value, time_format)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_of_day_attr
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta.3
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clemens Teichmann
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: This ruby gem converts time of day to seconds since midnight and back.
41
+ description: This ruby gem converts time of day to seconds (since midnight) and back.
42
42
  The value in seconds can be used for calculations and validations.
43
43
  email:
44
44
  - clemens_t@web.de
@@ -78,9 +78,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ">"
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 1.3.1
83
+ version: '0'
84
84
  requirements: []
85
85
  rubyforge_project:
86
86
  rubygems_version: 2.5.2.1