smart-period 1.0.9 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/lib/period/version.rb +1 -1
- data/period.gemspec +16 -1
- metadata +11 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c500abb487503fbb580ad3b346853e287b113d5bbc16dc899fabe85e6dba81a
|
4
|
+
data.tar.gz: d5a17838abad1725ae67669b923f1da6d7b5e40cd2140bb4ad0a27f1295895f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c497e495c3011c9ed626b23324c78e24b2b838f9745d918bd2c059272e367cc75add9fd4063c59ff55dfe5cba101b3afd3306fff722b874daa262e0d3e2b67c
|
7
|
+
data.tar.gz: 83214aeeb0dc8f65341567e7ecf4a02534387c1c4118d8d49bdf5d8aa92f7d8f2bdfb632f4b4dfb6ab9148dd058b8b7077ace8f7822b77f1ecd2ac805d119a2a
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
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
|
+
⚠️ This gem will no longer receive any updates
|
4
|
+
⚠️ If you want to access to new awesome features, like endless-period support :hushed:
|
5
|
+
⚠️ Take a look to his successor [ActivePeriod](https://github.com/billaul/active_period) 🥳
|
6
|
+
|
3
7
|
Smart-Period aims to simplify Time-range manipulation.
|
4
8
|
|
5
9
|
## Installation
|
@@ -20,7 +24,7 @@ Or install it yourself as:
|
|
20
24
|
|
21
25
|
## Usage
|
22
26
|
|
23
|
-
**Smart-Period** was designed to simplify time-range manipulation, specialy with rails
|
27
|
+
**Smart-Period** was designed to simplify time-range manipulation, specialy with rails and user input
|
24
28
|
|
25
29
|
**Warning** :
|
26
30
|
- A time-range take place between two date and it's different from an abstract duration of time
|
@@ -185,7 +189,7 @@ In a Controller, use the error handling to validate the date for you
|
|
185
189
|
```ruby
|
186
190
|
class BookController < ApplicationController
|
187
191
|
def between # match via GET and POST
|
188
|
-
# Default value for
|
192
|
+
# Default value for first display
|
189
193
|
params[:from] ||= 1.month.ago
|
190
194
|
params[:to] ||= Time.now
|
191
195
|
|
@@ -194,7 +198,7 @@ class BookController < ApplicationController
|
|
194
198
|
@books = Book.where(published: Period.new(params[:from]..params[:to]))
|
195
199
|
rescue ArgumentError => e
|
196
200
|
# Period will handle mis-formatted date and incoherent period
|
197
|
-
# I18n is
|
201
|
+
# I18n is supported for errors messages
|
198
202
|
flash[:alert] = e.message
|
199
203
|
end
|
200
204
|
end
|
data/lib/period/version.rb
CHANGED
data/period.gemspec
CHANGED
@@ -7,11 +7,26 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = Period::VERSION
|
8
8
|
spec.authors = ['billau_l']
|
9
9
|
|
10
|
-
spec.summary =
|
10
|
+
spec.summary = <<~eos
|
11
|
+
Manage time ranges without brain damage
|
12
|
+
|
13
|
+
DISCONTINUED DEVELOPMENT WARNING
|
14
|
+
The SmartPeriod gem will no longer receive any updates
|
15
|
+
If you want to access to new awesome features, like endless-period
|
16
|
+
Take a look to his successor ActivePeriod
|
17
|
+
eos
|
11
18
|
# spec.description = "Period.new('01/01/2020'..Time.now)"
|
12
19
|
spec.homepage = "https://github.com/billaul/period"
|
13
20
|
spec.license = 'MIT'
|
14
21
|
|
22
|
+
spec.post_install_message = <<~eos
|
23
|
+
+-| DISCONTINUED DEVELOPMENT WARNING |--------------------------------+
|
24
|
+
| The SmartPeriod gem will no longer receive any updates |
|
25
|
+
| If you want to access to new awesome features, like endless-period |
|
26
|
+
| Take a look to his successor ActivePeriod |
|
27
|
+
+---------------------------------------------------------------------+
|
28
|
+
eos
|
29
|
+
|
15
30
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
16
31
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
17
32
|
if spec.respond_to?(:metadata)
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- billau_l
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -119,7 +119,12 @@ metadata:
|
|
119
119
|
homepage_uri: https://github.com/billaul/period
|
120
120
|
documentation_uri: https://github.com/billaul/period
|
121
121
|
source_code_uri: https://github.com/billaul/period
|
122
|
-
post_install_message:
|
122
|
+
post_install_message: |
|
123
|
+
+-| DISCONTINUED DEVELOPMENT WARNING |--------------------------------+
|
124
|
+
| The SmartPeriod gem will no longer receive any updates |
|
125
|
+
| If you want to access to new awesome features, like endless-period |
|
126
|
+
| Take a look to his successor ActivePeriod |
|
127
|
+
+---------------------------------------------------------------------+
|
123
128
|
rdoc_options: []
|
124
129
|
require_paths:
|
125
130
|
- lib
|
@@ -138,5 +143,7 @@ requirements: []
|
|
138
143
|
rubygems_version: 3.1.2
|
139
144
|
signing_key:
|
140
145
|
specification_version: 4
|
141
|
-
summary: Manage time ranges without brain damage
|
146
|
+
summary: Manage time ranges without brain damage DISCONTINUED DEVELOPMENT WARNING
|
147
|
+
The SmartPeriod gem will no longer receive any updates If you want to access to
|
148
|
+
new awesome features, like endless-period Take a look to his successor ActivePeriod
|
142
149
|
test_files: []
|