datetime_diff 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +2 -0
- data/Gemfile +1 -1
- data/README.md +5 -5
- data/bin/console +1 -1
- data/{gem_datetime.gemspec → datetime_diff.gemspec} +2 -2
- data/lib/datetime_diff/version.rb +3 -0
- data/lib/{gem_datetime.rb → datetime_diff.rb} +5 -11
- metadata +4 -4
- data/lib/gem_datetime/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50556d19d60fb8444242dbaa04a8e18c513e4314
|
4
|
+
data.tar.gz: b1febefe2c3729e8eff2527456a6a253305a5541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcf84f3ce2c2b2206e0d4d9dbcd9bb8b82767a22a1d460583fe6466098868c398bfcf8690d60a0f4a3e448e65a69e72f31a7a7cd78571973822cd8e6cac53ae1
|
7
|
+
data.tar.gz: 0e3c13f5c0144152caede2990044dcb79bee8beacff259eae48cbbb6bb04e0c4e1b0262515dfa7efa0e6bc9bb3e85f24151beaeae4af6680caf2266abd33afba
|
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# DateTimeDiff
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/datetime_diff`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
5
|
TODO: Delete this and the text above, and describe your gem
|
6
6
|
|
@@ -9,7 +9,7 @@ TODO: Delete this and the text above, and describe your gem
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem '
|
12
|
+
gem 'datetime_diff'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -18,7 +18,7 @@ And then execute:
|
|
18
18
|
|
19
19
|
Or install it yourself as:
|
20
20
|
|
21
|
-
$ gem install
|
21
|
+
$ gem install datetime_diff
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/datetime_diff. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
36
|
|
37
37
|
|
38
38
|
## License
|
data/bin/console
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'datetime_diff/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "datetime_diff"
|
8
|
-
spec.version =
|
8
|
+
spec.version = DateTimeDiff::VERSION
|
9
9
|
spec.authors = ["thiago feitosa"]
|
10
10
|
spec.email = ["mail@thiago.pro"]
|
11
11
|
|
@@ -1,12 +1,6 @@
|
|
1
|
-
require "
|
1
|
+
require "datetime_diff/version"
|
2
2
|
|
3
|
-
module
|
4
|
-
|
5
|
-
def self.delimiter h
|
6
|
-
for key,value in h
|
7
|
-
@@delimiter[key] = value
|
8
|
-
end
|
9
|
-
end
|
3
|
+
module DateTimeDiff
|
10
4
|
|
11
5
|
def self.diff_to_s mls, format=nil
|
12
6
|
|
@@ -68,13 +62,13 @@ module GemDatetime
|
|
68
62
|
else
|
69
63
|
mls = dt.to_time.to_f - self.to_time.to_f
|
70
64
|
end
|
71
|
-
|
65
|
+
DateTimeDiff.diff_to_s mls, format
|
72
66
|
end
|
73
67
|
end
|
74
68
|
|
75
69
|
class DateTime
|
76
|
-
include
|
70
|
+
include DateTimeDiff
|
77
71
|
end
|
78
72
|
class Time
|
79
|
-
include
|
73
|
+
include DateTimeDiff
|
80
74
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datetime_diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thiago feitosa
|
@@ -69,9 +69,9 @@ files:
|
|
69
69
|
- Rakefile
|
70
70
|
- bin/console
|
71
71
|
- bin/setup
|
72
|
-
-
|
73
|
-
- lib/
|
74
|
-
- lib/
|
72
|
+
- datetime_diff.gemspec
|
73
|
+
- lib/datetime_diff.rb
|
74
|
+
- lib/datetime_diff/version.rb
|
75
75
|
homepage: https://github.com/thiaguerd/datetime_diff
|
76
76
|
licenses:
|
77
77
|
- MIT
|
data/lib/gem_datetime/version.rb
DELETED