temporalize 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2a45701d98622972625f0e15be722dac7c443bbfda275c38fe2eb6207bd7ae3b
4
+ data.tar.gz: 3316eee94d60ef9c3ff4db29ec1b318c66a0355dcfce5cec3c94de3af2efde66
5
+ SHA512:
6
+ metadata.gz: ba165539da06d5abddf7a200261e8609c4b860ef7954236c07a5374a45222a08254e6778ddbb0603bd2c56700f6f6902c209f93279740f07b32d94b3bdb996bb
7
+ data.tar.gz: a1ba1ed84dd502783a1f0925980e0318c6d7e1b330d7ef597998a7f7fca13bb55d65ebd9edd02990f39901f257b07d1709d241561dd9a27f2d2ae269a1ce1e57
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.0
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
6
+
7
+ Style/StringLiteralsInInterpolation:
8
+ EnforcedStyle: double_quotes
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2024-12-20
4
+
5
+ - Initial release
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 pacMakaveli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # Temporalize
2
+
3
+ Temporalize provides a simple way to handle time durations in your Ruby applications. Whether you're dealing with video lengths, gameplay times, or any other duration data, Temporalize makes it easy to store, format, and display durations without the headache.
4
+
5
+ # Why Temporalize?
6
+
7
+ I created Temporalize while working on games.directory where we deal with tons of data from different game APIs. We kept running into the same problem - handling duration strings like "PT3H10M10S" from APIs, storing them efficiently in the database, and then formatting them nicely for display.
8
+ Converting these strings, storing them as integers, and formatting them back was becoming a tedious copy-paste job across our models. Inspired by how money-rails elegantly handles currency with monetize :price, I wanted something similarly clean for durations - just temporalize :duration_played and you're done.
9
+
10
+ # Features
11
+
12
+ - Dead simple API - just one line to handle a duration attribute
13
+ - Stores durations efficiently as integers (seconds or milliseconds)
14
+ - Automatically handles conversion between different formats
15
+
16
+ - Multiple output formats:
17
+
18
+ - Default timestamp ("01:30:45")
19
+ - Natural language ("1 hour 30 minutes 45 seconds")
20
+ - Custom formats
21
+
22
+ - Plays nice with ActiveRecord
23
+ - Handles both seconds and milliseconds
24
+ - Zero dependencies (other than ActiveRecord)
25
+
26
+ ## Installation
27
+
28
+ ## Usage
29
+
30
+ ``` ruby
31
+ class Game < ApplicationRecord
32
+ # Basic usage - assumes column name is duration_played_in_seconds
33
+ temporalize :duration_played
34
+
35
+ # Custom column name
36
+ temporalize :total_time, column: :play_time_seconds
37
+
38
+ # Handle millisecond precision
39
+ temporalize :watch_time, column: :watch_time_in_ms
40
+
41
+ # Custom format
42
+ temporalize :completion_time, format: :natural # "2 hours 30 minutes"
43
+ end
44
+
45
+ game = Game.new(duration_played: 3665) # or "PT1H1M5S" from an API
46
+ game.duration_played.to_s # => "01:01:05"
47
+ ```
48
+ ```ruby
49
+ class Game < ApplicationRecord
50
+ temporalize :duration_played
51
+ temporalize :total_time, column: :play_time_seconds
52
+ temporalize :watch_time, column: :watch_time_in_ms, format: :natural
53
+ end
54
+
55
+ game = Game.new(duration_played: 3665) # or "PT1H1M5S" from an API
56
+
57
+ # Returns a Temporalize::Seconds object
58
+ game.duration_played # => #<Temporalize::Seconds:0x00007f9b8a8b0>
59
+
60
+ # Get formatted strings
61
+ game.duration_played.to_s # => "01:01:05"
62
+
63
+ # Different format options
64
+ temporalize :duration_played, format: :natural
65
+ game.duration_played.to_s # => "1 hour 1 minute 5 seconds"
66
+
67
+ temporalize :duration_played, format: :hh_mm_ss
68
+ game.duration_played.to_s # => "01:01:05"
69
+
70
+ temporalize :duration_played, format: :compact
71
+ game.duration_played.to_s # => "1h 1m 5s"
72
+
73
+ # Store in milliseconds
74
+ temporalize :watch_time, column: :watch_time_in_ms
75
+ game.watch_time = 1500 # 1.5 seconds
76
+ game.watch_time.to_s # => "00:00:01"
77
+ game.watch_time_in_ms # => 1500
78
+ ```
79
+ The value is stored as an integer in your database but accessed through a Temporalize::Seconds object. This gives you the flexibility to:
80
+
81
+ Store the raw value efficiently in your database
82
+ Format it however you need in your views
83
+ Do calculations with the raw seconds when needed
84
+ Handle both second and millisecond precision
85
+
86
+ This is especially useful when dealing with APIs that send duration data in various formats - you can normalize everything to integers in the database while maintaining a clean interface for displaying values to users.
87
+
88
+ ## Development
89
+
90
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
91
+
92
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
93
+
94
+ ## Contributing
95
+
96
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/temporalize. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/temporalize/blob/main/CODE_OF_CONDUCT.md).
97
+
98
+ ## License
99
+
100
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
101
+
102
+ ## Code of Conduct
103
+
104
+ Everyone interacting in the Temporalize project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/temporalize/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "minitest/test_task"
5
+
6
+ Minitest::TestTask.create
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[test rubocop]
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gem "activerecord", "~> 7.0.0", "< 7.1"
5
+ gem "activesupport", "~> 7.0.0", "< 7.1"
6
+ gemspec path: ".."
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gem "activerecord", ">= 7.0"
5
+ gem "activesupport", ">= 7.0"
6
+ gemspec path: ".."
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/concern"
4
+
5
+ module Temporalize
6
+ class Configuration
7
+ attr_accessor :default_format
8
+
9
+ def initialize
10
+ @default_format = Formats::DEFAULT
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Temporalize
4
+ module Formats
5
+ NATURAL = :natural # Special format for human-readable output
6
+
7
+ DEFAULT = "%H:%M:%S".freeze
8
+ HH_MM_SS = "%H:%M:%S".freeze
9
+ HOURS_MINUTES = "%H:%M".freeze
10
+ MINUTES_SECONDS = "%M:%S".freeze
11
+ VERBOSE = "%H hours %M minutes %S seconds".freeze
12
+ COMPACT = "%Hh %Mm %Ss".freeze
13
+
14
+ end
15
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Temporalize
4
+ class Seconds
5
+ attr_reader :seconds, :format_string, :milliseconds
6
+
7
+ def initialize(seconds, format_string = Formats::DEFAULT, milliseconds = nil)
8
+ @seconds = seconds.to_i.abs # Handle negative values by taking absolute value
9
+ @format_string = resolve_format(format_string)
10
+ @milliseconds = milliseconds
11
+ end
12
+
13
+ def to_s(override_format = nil)
14
+ format_to_use = override_format ? resolve_format(override_format) : @format_string
15
+
16
+ case format_to_use
17
+ when :natural
18
+ to_natural
19
+ when :minutes_seconds
20
+ format_minutes_seconds
21
+ else
22
+ format_duration(format_to_use)
23
+ end
24
+ end
25
+
26
+ private
27
+
28
+ def format_duration(format_str)
29
+ time = Time.at(@seconds).utc
30
+ time.strftime(format_str)
31
+ end
32
+
33
+ def format_minutes_seconds
34
+ total_minutes = (@seconds / 60.0).floor
35
+ remaining_seconds = @seconds % 60
36
+ format("%02d:%02d", total_minutes, remaining_seconds)
37
+ end
38
+
39
+ def to_natural
40
+ parts = []
41
+
42
+ hours_val = hours
43
+ minutes_val = minutes
44
+ seconds_val = seconds_remainder
45
+
46
+ parts << "#{hours_val} #{hours_val == 1 ? 'hour' : 'hours'}" if hours_val > 0
47
+ parts << "#{minutes_val} #{minutes_val == 1 ? 'minute' : 'minutes'}" if minutes_val > 0
48
+ parts << "#{seconds_val} #{seconds_val == 1 ? 'second' : 'seconds'}" if seconds_val > 0 || parts.empty?
49
+
50
+ if @milliseconds && @milliseconds > 0
51
+ ms = @milliseconds % 1000
52
+ parts << "#{ms} milliseconds" if ms > 0
53
+ end
54
+
55
+ parts.join(' ')
56
+ end
57
+
58
+ def resolve_format(format)
59
+ case format
60
+ when Symbol
61
+ if format == :natural
62
+ :natural
63
+ elsif format == :minutes_seconds
64
+ :minutes_seconds
65
+ else
66
+ Formats.const_get(format.to_s.upcase)
67
+ end
68
+ else
69
+ format
70
+ end
71
+ end
72
+
73
+ def hours
74
+ @seconds / 3600
75
+ end
76
+
77
+ def minutes
78
+ (@seconds % 3600) / 60
79
+ end
80
+
81
+ def seconds_remainder
82
+ @seconds % 60
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Temporalize
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,70 @@
1
+ # lib/temporalize.rb
2
+ # frozen_string_literal: true
3
+
4
+ require_relative "temporalize/version"
5
+ require_relative "temporalize/formats"
6
+ require_relative "temporalize/configuration"
7
+ require_relative "temporalize/seconds"
8
+
9
+ module Temporalize
10
+ class Error < StandardError; end
11
+
12
+ def self.temporalize(klass, attribute, **options)
13
+ column = options[:column] || "#{attribute}_in_seconds".to_sym
14
+ default_format = options[:format] || configuration.default_format
15
+
16
+ # Enhanced column name detection
17
+ uses_milliseconds = if options.key?(:milliseconds)
18
+ options[:milliseconds]
19
+ else
20
+ column_name = column.to_s
21
+ column_name.end_with?('_in_milliseconds', '_in_ms', '_milliseconds', '_ms')
22
+ end
23
+
24
+ klass.class_eval do
25
+ define_method(attribute) do |**opts|
26
+ value = read_attribute(column)
27
+ return nil if value.nil?
28
+
29
+ if uses_milliseconds
30
+ seconds = value / 1000
31
+ milliseconds = value % 1000
32
+ Temporalize::Seconds.new(seconds, opts[:format] || default_format, milliseconds)
33
+ else
34
+ Temporalize::Seconds.new(value, opts[:format] || default_format)
35
+ end
36
+ end
37
+
38
+ define_method("#{attribute}=") do |value|
39
+ numeric_value = case value
40
+ when Temporalize::Seconds then value.seconds
41
+ when Numeric
42
+ if uses_milliseconds
43
+ (value.to_f * 1000).to_i
44
+ else
45
+ value.to_i
46
+ end
47
+ when nil then return write_attribute(column, nil)
48
+ else
49
+ raise ArgumentError, "Invalid duration value: #{value.inspect}"
50
+ end
51
+
52
+ value_to_store = if uses_milliseconds && value.is_a?(Temporalize::Seconds)
53
+ numeric_value * 1000
54
+ else
55
+ numeric_value
56
+ end
57
+
58
+ write_attribute(column, value_to_store)
59
+ end
60
+ end
61
+ end
62
+
63
+ def self.configuration
64
+ @configuration ||= Configuration.new
65
+ end
66
+
67
+ def self.configure
68
+ yield(configuration) if block_given?
69
+ end
70
+ end
@@ -0,0 +1,4 @@
1
+ module Temporalize
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,187 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: temporalize
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - pacMakaveli
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-12-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest-snapshots
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.21'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.21'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 0.35.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 0.35.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-packaging
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 0.5.2
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 0.5.2
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-performance
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 1.21.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 1.21.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 0.6.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 0.6.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: sqlite3
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.4'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '1.4'
139
+ description: Provides a convenient way to work with attributes that store durations
140
+ in seconds, allowing for custom formatting and column names.
141
+ email:
142
+ - oss@studio51.solutions
143
+ executables: []
144
+ extensions: []
145
+ extra_rdoc_files: []
146
+ files:
147
+ - ".rubocop.yml"
148
+ - CHANGELOG.md
149
+ - CODE_OF_CONDUCT.md
150
+ - LICENSE.txt
151
+ - README.md
152
+ - Rakefile
153
+ - gemfiles/ruby_3.0.gemfile
154
+ - gemfiles/ruby_3_plus.gemfile
155
+ - lib/temporalize.rb
156
+ - lib/temporalize/configuration.rb
157
+ - lib/temporalize/formats.rb
158
+ - lib/temporalize/seconds.rb
159
+ - lib/temporalize/version.rb
160
+ - sig/temporalize.rbs
161
+ homepage: https://github.com/yourusername/temporalize
162
+ licenses:
163
+ - MIT
164
+ metadata:
165
+ homepage_uri: https://github.com/yourusername/temporalize
166
+ source_code_uri: https://github.com/games-directory/temporalize
167
+ changelog_uri: https://github.com/games-directory/temporalize/blob/master/CHANGELOG.md
168
+ post_install_message:
169
+ rdoc_options: []
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: 3.0.0
177
+ required_rubygems_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ requirements: []
183
+ rubygems_version: 3.5.16
184
+ signing_key:
185
+ specification_version: 4
186
+ summary: Handles attributes representing durations in seconds.
187
+ test_files: []