tempus 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +22 -6
- data/CODE_OF_CONDUCT.md +57 -47
- data/LICENSE.txt +1 -1
- data/README.md +6 -12
- data/Rakefile +7 -3
- data/lib/tempus/parser.rb +6 -5
- data/lib/tempus/version.rb +1 -1
- data/lib/tempus.rb +16 -16
- metadata +5 -83
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -11
- data/.hound.yml +0 -3
- data/.travis.yml +0 -7
- data/Gemfile +0 -8
- data/Gemfile.lock +0 -71
- data/bin/console +0 -15
- data/bin/setup +0 -8
- data/tempus.gemspec +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0407fddff5c39851a88b354fb1331d90eb4852d56abfbd090f3474c8f5f2a411
|
4
|
+
data.tar.gz: a0ae7f69d30b4d16708e3fcc6fd6ee1804cc12c0d06fa932e6e2bff82ed56be0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4db278fdc44a03fcac353c171aae9c35babb67cf470905bbea45252252634bcd5204ac1f5806a9011e256344f54001f1dffbc99d517a0a45a43250a1d13aa557
|
7
|
+
data.tar.gz: 4388ddaf13be7edcda9d332fa0367013da2c022a465e819feb69516461dfd416a1a235da81fee1caaf4920e6c867972293cf25c01b8dcef855108d1818156c81
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
require:
|
2
|
+
- rubocop-rake
|
3
|
+
- rubocop-rspec
|
4
|
+
- rubocop-performance
|
5
|
+
AllCops:
|
6
|
+
NewCops: enable
|
7
|
+
TargetRubyVersion: 2.7
|
8
|
+
|
9
|
+
Style/StringLiterals:
|
10
|
+
Enabled: true
|
11
|
+
EnforcedStyle: double_quotes
|
12
|
+
|
13
|
+
Style/StringLiteralsInInterpolation:
|
14
|
+
Enabled: true
|
15
|
+
EnforcedStyle: double_quotes
|
5
16
|
|
6
17
|
Layout/LineLength:
|
7
|
-
|
8
|
-
|
18
|
+
Max: 120
|
19
|
+
|
20
|
+
RSpec/MultipleExpectations:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
RSpec/ExampleLength:
|
24
|
+
Max: 25
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -2,73 +2,83 @@
|
|
2
2
|
|
3
3
|
## Our Pledge
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
11
8
|
|
12
9
|
## Our Standards
|
13
10
|
|
14
|
-
Examples of behavior that contributes to
|
15
|
-
include:
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
16
12
|
|
17
|
-
*
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
22
18
|
|
23
|
-
Examples of unacceptable behavior
|
19
|
+
Examples of unacceptable behavior include:
|
24
20
|
|
25
|
-
* The use of sexualized language or imagery and
|
26
|
-
advances
|
27
|
-
* Trolling, insulting
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
28
24
|
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or
|
30
|
-
address, without explicit permission
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
31
27
|
* Other conduct which could reasonably be considered inappropriate in a
|
32
28
|
professional setting
|
33
29
|
|
34
|
-
##
|
30
|
+
## Enforcement Responsibilities
|
35
31
|
|
36
|
-
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
39
33
|
|
40
|
-
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
45
35
|
|
46
36
|
## Scope
|
47
37
|
|
48
|
-
This Code of Conduct applies
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
54
39
|
|
55
40
|
## Enforcement
|
56
41
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at daniloj.dasilva@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
63
59
|
|
64
|
-
|
65
|
-
|
66
|
-
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
67
73
|
|
68
74
|
## Attribution
|
69
75
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version
|
71
|
-
available at
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
72
82
|
|
73
|
-
|
74
|
-
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2023 Danilo Jeremias da Silva
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -8,22 +8,17 @@ Gem to efficiently manipulate the time, adding, subtracting and converting hours
|
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
11
|
-
|
11
|
+
Install the gem and add to the application's Gemfile by executing:
|
12
12
|
|
13
|
-
|
14
|
-
gem 'tempus'
|
15
|
-
```
|
16
|
-
|
17
|
-
And then execute:
|
13
|
+
$ bundle add tempus
|
18
14
|
|
19
|
-
|
20
|
-
|
21
|
-
Or install it yourself as:
|
15
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
22
16
|
|
23
17
|
$ gem install tempus
|
24
18
|
|
25
19
|
## Usage
|
26
|
-
|
20
|
+
|
21
|
+
With this gem you can manage durations of time.
|
27
22
|
|
28
23
|
### Initialize with duration
|
29
24
|
```ruby
|
@@ -57,13 +52,12 @@ Or install it yourself as:
|
|
57
52
|
|
58
53
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
59
54
|
|
60
|
-
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
|
55
|
+
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).
|
61
56
|
|
62
57
|
## Contributing
|
63
58
|
|
64
59
|
Bug reports and pull requests are welcome on GitHub at https://github.com/dannnylo/tempus. 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/dannnylo/tempus/blob/master/CODE_OF_CONDUCT.md).
|
65
60
|
|
66
|
-
|
67
61
|
## License
|
68
62
|
|
69
63
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rspec/core/rake_task"
|
5
5
|
|
6
6
|
RSpec::Core::RakeTask.new(:spec)
|
7
7
|
|
8
|
-
|
8
|
+
require "rubocop/rake_task"
|
9
|
+
|
10
|
+
RuboCop::RakeTask.new
|
11
|
+
|
12
|
+
task default: %i[spec rubocop]
|
data/lib/tempus/parser.rb
CHANGED
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
# Parser others types to value
|
4
4
|
class Parser
|
5
|
-
def initialize(only_hours
|
5
|
+
def initialize(only_hours: true)
|
6
6
|
@only_hours = only_hours
|
7
7
|
end
|
8
8
|
|
9
9
|
def parse(value)
|
10
10
|
@value = value
|
11
11
|
|
12
|
-
|
12
|
+
case @value
|
13
|
+
when String
|
13
14
|
from_string.to_f
|
14
|
-
|
15
|
+
when Time
|
15
16
|
from_time.to_f
|
16
17
|
else
|
17
18
|
@value.to_f
|
@@ -27,13 +28,13 @@ class Parser
|
|
27
28
|
end
|
28
29
|
|
29
30
|
def from_string
|
30
|
-
str = @value.to_s.split(
|
31
|
+
str = @value.to_s.split(":")
|
31
32
|
value = 0
|
32
33
|
|
33
34
|
%i[hours minutes seconds].each_with_index do |m, i|
|
34
35
|
value += str.at(i).to_i.abs.send(m.to_s)
|
35
36
|
end
|
36
37
|
|
37
|
-
str.to_s.include?(
|
38
|
+
str.to_s.include?("-") ? value * -1 : value
|
38
39
|
end
|
39
40
|
end
|
data/lib/tempus/version.rb
CHANGED
data/lib/tempus.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "active_support"
|
4
|
+
require "active_support/core_ext"
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
require_relative "tempus/version"
|
7
|
+
require_relative "tempus/parser"
|
8
|
+
require_relative "tempus/tempus_helper"
|
9
9
|
|
10
10
|
# Class to manipulate efficiently time
|
11
11
|
#=== Example:
|
@@ -14,17 +14,17 @@ require 'tempus/tempus_helper'
|
|
14
14
|
class Tempus
|
15
15
|
class Error < StandardError; end
|
16
16
|
|
17
|
-
HOURS_REGEX = /(
|
18
|
-
MINUTES_REGEX = /(
|
19
|
-
SECONDS_REGEX = /(
|
17
|
+
HOURS_REGEX = /(%h|%hh|%H|%HH)/.freeze
|
18
|
+
MINUTES_REGEX = /(%m|%mm|%M|%MM)/.freeze
|
19
|
+
SECONDS_REGEX = /(%s|%ss|%S|%SS)/.freeze
|
20
20
|
OPERATIONS = %i[+ - * /].freeze
|
21
21
|
|
22
22
|
attr_reader :data
|
23
23
|
|
24
24
|
delegate :to_i, :to_f, :negative?, :positive?, to: :data
|
25
25
|
|
26
|
-
def initialize(value = 0, only_hours
|
27
|
-
@parser = Parser.new(only_hours)
|
26
|
+
def initialize(value = 0, only_hours: true)
|
27
|
+
@parser = Parser.new(only_hours: only_hours)
|
28
28
|
|
29
29
|
set(value)
|
30
30
|
end
|
@@ -47,10 +47,10 @@ class Tempus
|
|
47
47
|
## => "-30:05"
|
48
48
|
## >> duration.to_s("%H*%M*%S")
|
49
49
|
## => "-30*05*03"
|
50
|
-
def to_s(string =
|
50
|
+
def to_s(string = "%H:%M:%S")
|
51
51
|
text = string.dup
|
52
52
|
|
53
|
-
text[
|
53
|
+
text["%"] = "-%" if text != "" && negative?
|
54
54
|
|
55
55
|
text = text.gsub(HOURS_REGEX, format_number_abs(hours))
|
56
56
|
text = text.gsub(MINUTES_REGEX, format_number_abs(minutes))
|
@@ -60,7 +60,7 @@ class Tempus
|
|
60
60
|
alias to_string to_s
|
61
61
|
|
62
62
|
def format_number_abs(number)
|
63
|
-
format(
|
63
|
+
format("%02<number>d", number: number.to_i.abs)
|
64
64
|
end
|
65
65
|
|
66
66
|
def seconds
|
@@ -95,12 +95,12 @@ class Tempus
|
|
95
95
|
|
96
96
|
def human
|
97
97
|
[
|
98
|
-
(
|
98
|
+
("menos" if negative?),
|
99
99
|
"#{hours.abs} horas",
|
100
100
|
"#{minutes.abs} minutos",
|
101
|
-
|
101
|
+
"e",
|
102
102
|
"#{seconds.abs} segundos"
|
103
|
-
].compact.join(
|
103
|
+
].compact.join(" ")
|
104
104
|
end
|
105
105
|
|
106
106
|
def inspect
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tempus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danilo Jeremias da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -24,76 +24,6 @@ dependencies:
|
|
24
24
|
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '5'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '2.1'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '2.1'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: coveralls
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0.8'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0.8'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rake
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '13.0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '13.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.9'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.9'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: simplecov
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0.9'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0.9'
|
97
27
|
description: |2
|
98
28
|
Gem to efficiently manipulate the time.
|
99
29
|
Adding, subtracting and converting more than 24 hours easy.'
|
@@ -103,31 +33,23 @@ executables: []
|
|
103
33
|
extensions: []
|
104
34
|
extra_rdoc_files: []
|
105
35
|
files:
|
106
|
-
- ".coveralls.yml"
|
107
|
-
- ".gitignore"
|
108
|
-
- ".hound.yml"
|
109
36
|
- ".rspec"
|
110
37
|
- ".rubocop.yml"
|
111
|
-
- ".travis.yml"
|
112
38
|
- CODE_OF_CONDUCT.md
|
113
|
-
- Gemfile
|
114
|
-
- Gemfile.lock
|
115
39
|
- LICENSE.txt
|
116
40
|
- README.md
|
117
41
|
- Rakefile
|
118
|
-
- bin/console
|
119
|
-
- bin/setup
|
120
42
|
- lib/tempus.rb
|
121
43
|
- lib/tempus/parser.rb
|
122
44
|
- lib/tempus/tempus_helper.rb
|
123
45
|
- lib/tempus/version.rb
|
124
|
-
- tempus.gemspec
|
125
46
|
homepage: https://github.com/dannnylo/tempus
|
126
47
|
licenses:
|
127
48
|
- MIT
|
128
49
|
metadata:
|
129
50
|
homepage_uri: https://github.com/dannnylo/tempus
|
130
51
|
source_code_uri: https://github.com/dannnylo/tempus
|
52
|
+
rubygems_mfa_required: 'true'
|
131
53
|
post_install_message:
|
132
54
|
rdoc_options: []
|
133
55
|
require_paths:
|
@@ -136,14 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
58
|
requirements:
|
137
59
|
- - ">="
|
138
60
|
- !ruby/object:Gem::Version
|
139
|
-
version: 2.
|
61
|
+
version: 2.7.0
|
140
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
63
|
requirements:
|
142
64
|
- - ">="
|
143
65
|
- !ruby/object:Gem::Version
|
144
66
|
version: '0'
|
145
67
|
requirements: []
|
146
|
-
rubygems_version: 3.
|
68
|
+
rubygems_version: 3.4.10
|
147
69
|
signing_key:
|
148
70
|
specification_version: 4
|
149
71
|
summary: Gem to efficiently manipulate the time.
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
repo_token: ELpdfYjCf7cMiE663I70rR0V4mcZwmeia
|
data/.gitignore
DELETED
data/.hound.yml
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
tempus (1.0.2)
|
5
|
-
activesupport (> 5)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activesupport (6.0.2.1)
|
11
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
-
i18n (>= 0.7, < 2)
|
13
|
-
minitest (~> 5.1)
|
14
|
-
tzinfo (~> 1.1)
|
15
|
-
zeitwerk (~> 2.2)
|
16
|
-
concurrent-ruby (1.1.6)
|
17
|
-
coveralls (0.8.23)
|
18
|
-
json (>= 1.8, < 3)
|
19
|
-
simplecov (~> 0.16.1)
|
20
|
-
term-ansicolor (~> 1.3)
|
21
|
-
thor (>= 0.19.4, < 2.0)
|
22
|
-
tins (~> 1.6)
|
23
|
-
diff-lcs (1.3)
|
24
|
-
docile (1.3.2)
|
25
|
-
i18n (1.8.2)
|
26
|
-
concurrent-ruby (~> 1.0)
|
27
|
-
json (2.3.0)
|
28
|
-
minitest (5.14.0)
|
29
|
-
rake (13.0.1)
|
30
|
-
rspec (3.9.0)
|
31
|
-
rspec-core (~> 3.9.0)
|
32
|
-
rspec-expectations (~> 3.9.0)
|
33
|
-
rspec-mocks (~> 3.9.0)
|
34
|
-
rspec-core (3.9.1)
|
35
|
-
rspec-support (~> 3.9.1)
|
36
|
-
rspec-expectations (3.9.1)
|
37
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
-
rspec-support (~> 3.9.0)
|
39
|
-
rspec-mocks (3.9.1)
|
40
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.9.0)
|
42
|
-
rspec-support (3.9.2)
|
43
|
-
simplecov (0.16.1)
|
44
|
-
docile (~> 1.1)
|
45
|
-
json (>= 1.8, < 3)
|
46
|
-
simplecov-html (~> 0.10.0)
|
47
|
-
simplecov-html (0.10.2)
|
48
|
-
sync (0.5.0)
|
49
|
-
term-ansicolor (1.7.1)
|
50
|
-
tins (~> 1.0)
|
51
|
-
thor (1.0.1)
|
52
|
-
thread_safe (0.3.6)
|
53
|
-
tins (1.24.1)
|
54
|
-
sync
|
55
|
-
tzinfo (1.2.6)
|
56
|
-
thread_safe (~> 0.1)
|
57
|
-
zeitwerk (2.3.0)
|
58
|
-
|
59
|
-
PLATFORMS
|
60
|
-
ruby
|
61
|
-
|
62
|
-
DEPENDENCIES
|
63
|
-
bundler (~> 2.1)
|
64
|
-
coveralls (~> 0.8)
|
65
|
-
rake (~> 13.0)
|
66
|
-
rspec (~> 3.9)
|
67
|
-
simplecov (~> 0.9)
|
68
|
-
tempus!
|
69
|
-
|
70
|
-
BUNDLED WITH
|
71
|
-
2.1.4
|
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'tempus'
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require 'irb'
|
15
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/tempus.gemspec
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'lib/tempus/version'
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = 'tempus'
|
7
|
-
spec.version = Tempus::VERSION
|
8
|
-
spec.authors = ['Danilo Jeremias da Silva']
|
9
|
-
spec.email = ['daniloj.dasilva@gmail.com']
|
10
|
-
|
11
|
-
spec.summary = 'Gem to efficiently manipulate the time.'
|
12
|
-
spec.description = <<-DESCRIPTION
|
13
|
-
Gem to efficiently manipulate the time.
|
14
|
-
Adding, subtracting and converting more than 24 hours easy.'
|
15
|
-
DESCRIPTION
|
16
|
-
|
17
|
-
spec.homepage = 'https://github.com/dannnylo/tempus'
|
18
|
-
spec.license = 'MIT'
|
19
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
20
|
-
|
21
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
22
|
-
spec.metadata['source_code_uri'] = spec.homepage
|
23
|
-
|
24
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
-
end
|
27
|
-
spec.bindir = 'exe'
|
28
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
-
spec.require_paths = ['lib']
|
30
|
-
spec.add_runtime_dependency 'activesupport', '> 5'
|
31
|
-
spec.add_development_dependency 'bundler', '~> 2.1'
|
32
|
-
spec.add_development_dependency 'coveralls', '~> 0.8'
|
33
|
-
spec.add_development_dependency 'rake', '~> 13.0'
|
34
|
-
spec.add_development_dependency 'rspec', '~> 3.9'
|
35
|
-
spec.add_development_dependency 'simplecov', '~> 0.9'
|
36
|
-
end
|