smart-period 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -6
- data/lib/period/version.rb +1 -1
- data/period.gemspec +1 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 895c9a0aebae550b0872c4bb281ece79adf6693b019430b4da5ce30ffe0bcf9d
|
4
|
+
data.tar.gz: a1c4024ee3ee06bec4a5499c4d980364fca9ec7fba6f43f8cc8f22abe8978bfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c2016a30c249b509ce2ce2dbde28fbb13254c87a261273efdff42e41108a602130d730de96ffda23cab7fa9f114f6a0c9b7d9c0561702ed995230922620ca66
|
7
|
+
data.tar.gz: 3e255e9c615688671dc73fa2cdaad1146e3f8b496c701b4314c0a7340179b57fffdd2d8ca358c9bd3c086fb8562f3d2c4f78c5b09aee5e81f7238ceff13567f4
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Smart-Period
|
1
|
+
# Smart-Period [![Gem Version](https://badge.fury.io/rb/smart-period.svg)](https://badge.fury.io/rb/smart-period) [![Code Climate](https://codeclimate.com/github/billaul/period.svg)](https://codeclimate.com/github/billaul/period) [![Inline docs](http://inch-ci.org/github/billaul/period.svg)](http://inch-ci.org/github/billaul/period)
|
2
2
|
|
3
3
|
Smart-Period aims to simplify Time-range manipulation
|
4
4
|
|
@@ -31,12 +31,16 @@ Or install it yourself as:
|
|
31
31
|
``` ruby
|
32
32
|
# Get all user created today
|
33
33
|
User.where(created_at: Period.today)
|
34
|
+
|
34
35
|
# Get how many weeks there is from the beginning of time ?
|
35
36
|
Period.new('01/01/1970'..Time.now).weeks.count
|
37
|
+
|
36
38
|
# Is Trump still in charge ?
|
37
39
|
Time.now.in? Period.new('20/01/2017'...'20/01/2021')
|
40
|
+
|
38
41
|
# Get the week of an arbitrary date
|
39
42
|
Period.week('24/04/1990')
|
43
|
+
|
40
44
|
# Write a date for me (I18n supported)
|
41
45
|
Period.new('20/01/2017'...'20/01/2021').to_s
|
42
46
|
=> "From the 20 January 2017 to the 19 January 2021 included"
|
@@ -255,11 +259,6 @@ No issues will be addressed outside GitHub
|
|
255
259
|
|
256
260
|
* Myself (https://github.com/billaul)
|
257
261
|
|
258
|
-
[![Gem Version](https://fury-badge.herokuapp.com/rb/smart-period.png)](http://badge.fury.io/rb/smart-period)
|
259
|
-
[![Code Climate](https://codeclimate.com/github/billaul/period.png)](https://codeclimate.com/github/billaul/period)
|
260
|
-
[![Inline docs](http://inch-ci.org/github/billaul/period.png)](http://inch-ci.org/github/billaul/period)
|
261
|
-
|
262
|
-
|
263
262
|
## License
|
264
263
|
|
265
264
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/period/version.rb
CHANGED
data/period.gemspec
CHANGED
@@ -6,7 +6,6 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'smart-period'
|
7
7
|
spec.version = Period::VERSION
|
8
8
|
spec.authors = ['billau_l']
|
9
|
-
spec.email = ['billau_l@modulotech.fr']
|
10
9
|
|
11
10
|
spec.summary = 'Manage time ranges without brain damage.'
|
12
11
|
# spec.description = "Period.new('01/01/2020'..Time.now)"
|
@@ -35,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
35
34
|
end
|
36
35
|
spec.bindir = 'exe'
|
37
36
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
38
|
-
spec.require_paths = %w[lib
|
37
|
+
spec.require_paths = %w[lib locales]
|
39
38
|
|
40
39
|
spec.required_ruby_version = '> 2.5'
|
41
40
|
spec.add_runtime_dependency 'activesupport', '>= 5', '< 7'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart-period
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- billau_l
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -74,7 +74,6 @@ dependencies:
|
|
74
74
|
version: '10.0'
|
75
75
|
description:
|
76
76
|
email:
|
77
|
-
- billau_l@modulotech.fr
|
78
77
|
executables: []
|
79
78
|
extensions: []
|
80
79
|
extra_rdoc_files: []
|
@@ -124,7 +123,7 @@ post_install_message:
|
|
124
123
|
rdoc_options: []
|
125
124
|
require_paths:
|
126
125
|
- lib
|
127
|
-
-
|
126
|
+
- locales
|
128
127
|
required_ruby_version: !ruby/object:Gem::Requirement
|
129
128
|
requirements:
|
130
129
|
- - ">"
|