smart-period 1.0.0 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd14ecdd3ede7c4ca9abb4fa8c06abf1a6cf07cc518492f964e607ae43a723ce
4
- data.tar.gz: 3245f5e367c91c2d20afa9ca6a90e86f00371a962436fd98a59d3ff97f6307ad
3
+ metadata.gz: 895c9a0aebae550b0872c4bb281ece79adf6693b019430b4da5ce30ffe0bcf9d
4
+ data.tar.gz: a1c4024ee3ee06bec4a5499c4d980364fca9ec7fba6f43f8cc8f22abe8978bfc
5
5
  SHA512:
6
- metadata.gz: 6ca42e1a8a26268ffeb33d04965c4494ffb4b334992e59289ff5c56dedc19ee110a8a2a9f0798cadb69337ea1df8d8670a6ca975058fb8c05ddf5103bd3ff0dd
7
- data.tar.gz: 5d728d18e9870ba11c348d3b137cf737f36c9ea57c31df0eb98ae9a3e986a431a0aa503d4784fa0214f2bc6d64e11614b91f523e826feec58625a37382b6bb20
6
+ metadata.gz: 2c2016a30c249b509ce2ce2dbde28fbb13254c87a261273efdff42e41108a602130d730de96ffda23cab7fa9f114f6a0c9b7d9c0561702ed995230922620ca66
7
+ data.tar.gz: 3e255e9c615688671dc73fa2cdaad1146e3f8b496c701b4314c0a7340179b57fffdd2d8ca358c9bd3c086fb8562f3d2c4f78c5b09aee5e81f7238ceff13567f4
@@ -1,26 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- period (0.1.4)
5
- activesupport (= 5.2.3)
6
- i18n (= 1.6.0)
4
+ smart-period (1.0.4)
5
+ activesupport (>= 5, < 7)
6
+ i18n (~> 1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.2.3)
11
+ activesupport (6.1.0)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- concurrent-ruby (1.1.6)
17
- i18n (1.6.0)
13
+ i18n (>= 1.6, < 2)
14
+ minitest (>= 5.1)
15
+ tzinfo (~> 2.0)
16
+ zeitwerk (~> 2.3)
17
+ concurrent-ruby (1.1.7)
18
+ i18n (1.8.5)
18
19
  concurrent-ruby (~> 1.0)
19
- minitest (5.14.1)
20
+ minitest (5.14.2)
20
21
  rake (10.5.0)
21
- thread_safe (0.3.6)
22
- tzinfo (1.2.7)
23
- thread_safe (~> 0.1)
22
+ tzinfo (2.0.4)
23
+ concurrent-ruby (~> 1.0)
24
+ zeitwerk (2.4.2)
24
25
 
25
26
  PLATFORMS
26
27
  ruby
@@ -28,7 +29,7 @@ PLATFORMS
28
29
  DEPENDENCIES
29
30
  bundler (~> 2.0)
30
31
  rake (~> 10.0)
31
- period!
32
+ smart-period!
32
33
 
33
34
  BUNDLED WITH
34
- 2.0.1
35
+ 2.1.2
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # 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
- 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/period`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Smart-Period aims to simplify Time-range manipulation
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,17 +20,244 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ **Smart-Period** was designed to simplify time-range manipulation, specialy with rails (~> 5) and user input
24
+
25
+ **Warning** :
26
+ - A time-range take place between two date and it's different from an abstract duration of time
27
+ - **Smart-Period** is limited at full day of time and will always round the starting and ending to the beginning and the ending of the day
28
+
29
+
30
+ ## Quick view (TL;DR)
31
+ ``` ruby
32
+ # Get all user created today
33
+ User.where(created_at: Period.today)
34
+
35
+ # Get how many weeks there is from the beginning of time ?
36
+ Period.new('01/01/1970'..Time.now).weeks.count
37
+
38
+ # Is Trump still in charge ?
39
+ Time.now.in? Period.new('20/01/2017'...'20/01/2021')
40
+
41
+ # Get the week of an arbitrary date
42
+ Period.week('24/04/1990')
43
+
44
+ # Write a date for me (I18n supported)
45
+ Period.new('20/01/2017'...'20/01/2021').to_s
46
+ => "From the 20 January 2017 to the 19 January 2021 included"
47
+ ```
48
+
49
+ ## Detailed view
50
+
51
+ There's two way to create and manipulate a period of time `FreePeriod` and `StandardPeriod`
52
+
53
+ ### FreePeriod of time
54
+
55
+ You can declare **FreePeriod** as simply as :
56
+
57
+ ```ruby
58
+ # With Date objects
59
+ Period.new(3.month.ago..Date.today)
60
+ # or with Strings
61
+ Period.new('01/01/2000'...'01/02/2000')
62
+ # or with a mix
63
+ Period.new('01/01/2000'..1.week.ago)
64
+ # or in a rails Controller with params
65
+ Period.new(params[:start_date]..params[:end_date])
66
+ ```
67
+
68
+ **FreePeriod** can be manipulated with `+` and `-`
69
+ Doing so will move the start **and** the end of the period
70
+ ```ruby
71
+ Period.new('01/01/2000'..'05/01/2000') + 3.day
72
+ # is equal to
73
+ Period.new('04/01/2000'..'08/01/2000')
74
+ ```
75
+
76
+ ### Standard Period of time
77
+
78
+ Using **StandardPeriod** you are limited to strictly bordered periods of time
79
+ These periods are `day`, `week`, `month`, `quarter` and `year`
80
+
81
+ ```ruby
82
+ # To get the week, 42th day ago
83
+ Period.week(42.day.ago)
84
+ # To get the first month of 2020
85
+ Period.month('01/01/2020')
86
+ # or if you like it verbious
87
+ Period::Month.new('01/01/2020')
88
+ # or if you need the current week
89
+ Period.week(Time.now)
90
+ ```
91
+
92
+ **Note** : If you ask for a `month`, `quarter` of `year`, the day part of your param doesn't matter `01/01/2020` give the same result as `14/01/2020` or `29/01/2020`
93
+
94
+ **StandardPeriod** can be manipulated with `+` and `-` and will always return a **StandardPeriod** of the same type
95
+ ```ruby
96
+ # Subtraction are made from the start of the period
97
+ Period.month('10/02/2000') - 1.day
98
+ # Return the previous month
99
+ # Addition are made from the end
100
+ Period.month('10/02/2000') + 1.day
101
+ # Return the next month
102
+ Period.week('10/02/2000') + 67.day
103
+ # Return a week
104
+ ```
105
+ **StandardPeriod** also respond to `.next` and `.prev`
106
+ ```ruby
107
+ Period.month('01/01/2000').next.next.next
108
+ # Return the month of April 2020
109
+ ```
110
+
111
+ You can quickly access close period of time with `.(last|this|next)_(day|week|month|quarter|year)` and `.yesterday` `.today` `.tomorrow`
112
+
113
+ ```ruby
114
+ Period.this_week
115
+ # Same as Period.week(Time.now) but shorter
116
+ Period.next_month
117
+ # Return the next month
118
+ Period.last_year
119
+ # Return the last year
120
+ Period.today
121
+ # No comment
122
+ ```
123
+
124
+ ## HasMany
125
+
126
+ **FreePeriod** and some **StandardPeriod** respond to `.days`, `.weeks`, `.months`, `.quarters` and `.years`
127
+ These methods return an array of **StandardPeriod** who are overlapping the current period
128
+
129
+ | HasMany -> [\<StandardPeriod>] | .days | .weeks | .months | .quarters | .years |
130
+ |-------------------------------|:----:|:-----:|:------:|:--------:|:-----:|
131
+ | FreePeriod | X | X | X | X | X |
132
+ | StandardPeriod::Day | | | | | |
133
+ | StandardPeriod::Week | X | | | | |
134
+ | StandardPeriod::Month | X | X | | | |
135
+ | StandardPeriod::Quarter | X | X | X | | |
136
+ | StandardPeriod::Year | X | X | X | X | |
137
+
138
+ #### Example
139
+ ```ruby
140
+ # Get how many weeks there is from the beginning of time ?
141
+ Period.new('01/01/1970'..Time.now).weeks.count
142
+ # How many day in the current quarter
143
+ Period.this_quarter.days.count
144
+ # Get all the quarters overlapping a Period of time
145
+ Period.new(...).quarters
146
+ ```
147
+
148
+ ## BelongsTo
149
+
150
+ **StandardPeriod** respond to `.day`, `.week`, `.month`, `.quarter` and `.year`
151
+ These methods return a **StandardPeriod** who include the current period
152
+ **FreePeriod** does not respond to these methods
153
+
154
+ | BelongTo -> StandardPeriod | .day | .week | .month | .quarter | .year |
155
+ |----------------------------|:---:|:----:|:-----:|:-------:|:----:|
156
+ | FreePeriod | | | | | |
157
+ | StandardPeriod::Day | | X | X | X | X |
158
+ | StandardPeriod::Week | | | X | X | X |
159
+ | StandardPeriod::Month | | | | X | X |
160
+ | StandardPeriod::Quarter | | | | | X |
161
+ | StandardPeriod::Year | | | | | |
162
+
163
+ #### Example with BelongTo and HasMany
164
+
165
+ ```ruby
166
+ # Get the first day, of the last week, of the second month, of the current year
167
+ Period.this_year.months.second.weeks.last.days.first
168
+ ```
169
+
170
+ ## ActiveRecord
171
+
172
+ As **Period** inherite from **Range**, you can natively use them in **ActiveRecord** query
173
+
174
+ ```ruby
175
+ # Get all book published this year
176
+ Book.where(published_at: Period.this_year)
177
+ ```
178
+
179
+ ## Rails Controller
180
+
181
+ In a Controller, use the error handling to validate the date for you
182
+
183
+ ```ruby
184
+ class BookController < ApplicationController
185
+ def between # match via GET and POST
186
+ # Default value for the range in GET context
187
+ params[:from] ||= 1.month.ago
188
+ params[:to] ||= Time.now
189
+
190
+ begin
191
+ # Retrieve books from the DB
192
+ @books = Book.where(published: Period.new(params[:from]..params[:to]))
193
+ rescue ArgumentError => e
194
+ # Period will handle mis-formatted date and incoherent period
195
+ # I18n is support for errors messages
196
+ flash[:alert] = e.message
197
+ end
198
+ end
199
+ end
200
+ ```
201
+
202
+ ## I18n and to_s
203
+
204
+ I18n is supported for `en` and `fr`
205
+
206
+ ```ruby
207
+ Period.new('01/01/2000'...'01/02/2001').to_s
208
+ => "From the 01 January 2000 to the 31 January 2001 included"
209
+ I18n.locale = :fr
210
+ Period.new('01/01/2000'...'01/02/2001').to_s
211
+ => "Du 01 janvier 2000 au 31 janvier 2001 inclus"
212
+ ```
213
+ Errors are also supported
214
+ ```ruby
215
+ Period.new 'Foo'..'Bar'
216
+ #=> ArgumentError (The start date is invalid)
217
+ Period.new '01/02/3030'..'Bar'
218
+ #=> ArgumentError (The end date is invalid)
219
+ Period.new '01/02/3030'..'01/01/2020'
220
+ #=> ArgumentError (The start date is greater than the end date)
221
+ ```
222
+
223
+ See `locales/en.yml` to implement your language support
224
+
225
+ If you need to change the format for a single call
226
+
227
+ ```ruby
228
+ period.to_s(format: 'Your Format')
229
+ # or
230
+ period.strftime('Your Format')
231
+ ```
232
+ For a FreePeriod or if you need to print the start and the end of your period differently, use `.i18n`
233
+ ```ruby
234
+ period.i18n do |from, to|
235
+ "You have from #{from.strftime(...)} until #{to.strftime(...)} to deliver the money !"
236
+ end
237
+ ```
238
+
239
+ ## The tricky case of Weeks
240
+
241
+ Weeks are implemented following the [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date)
242
+ So `Period.this_month.weeks.first` doesn't necessarily include the first days of the month
243
+
244
+ ## TimeZone
245
+
246
+ Time zone are supported, you have nothing to do
247
+ If you change the global `Time.zone` of your app, you have nothing to do
248
+ If your Period [begin in a time zone and end in another](https://en.wikipedia.org/wiki/Daylight_saving_time), you have nothing to do
26
249
 
27
- ## Development
250
+ ## Bug reports
28
251
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
252
+ If you discover any bugs, feel free to create an [issue on GitHub](https://github.com/billaul/period/issues)
253
+ Please add as much information as possible to help us in fixing the potential bug
254
+ We also encourage you to help even more by forking and sending us a pull request
30
255
 
31
- 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
256
+ No issues will be addressed outside GitHub
32
257
 
33
- ## Contributing
258
+ ## Maintainer
34
259
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/period.
260
+ * Myself (https://github.com/billaul)
36
261
 
37
262
  ## License
38
263
 
@@ -1,6 +1,7 @@
1
1
  require_relative 'period/version.rb'
2
2
  require 'active_support/all'
3
3
  require 'i18n'
4
+ require_relative 'numeric.rb'
4
5
 
5
6
  require_relative 'period/free_period.rb'
6
7
  require_relative 'period/day.rb'
@@ -34,8 +35,8 @@ module Period
34
35
  Object.const_get("Period::#{period.capitalize}").new(date)
35
36
  end
36
37
 
37
- define_method period.to_s do
38
- Object.const_get("Period::#{period.capitalize}")
38
+ define_method period.to_s do |range|
39
+ Object.const_get("Period::#{period.capitalize}").new(range)
39
40
  end
40
41
  end
41
42
 
@@ -50,10 +51,10 @@ module Period
50
51
 
51
52
  case last_next
52
53
  when 'last'
53
- from = env_time.now
54
- from -= 1.send(klass) unless method_name.match?(/from_now$/)
55
- from = from.send("beginning_of_#{klass}")
56
- to = count.to_i.send(klass).ago.send("end_of_#{klass}")
54
+ from = count.to_i.send(klass).ago.send("beginning_of_#{klass}")
55
+ to = env_time.now
56
+ to -= 1.send(klass) unless method_name.match?(/from_now$/)
57
+ to = to.send("end_of_#{klass}")
57
58
  when 'next'
58
59
  from = env_time.now
59
60
  from += 1.send(klass) unless method_name.match?(/from_now$/)
@@ -18,15 +18,16 @@ class Period::FreePeriod < Range
18
18
  include Period::HasMany::Years
19
19
 
20
20
  def initialize(range)
21
+ raise ::ArgumentError, I18n.t(:param_must_be_a_range, scope: %i[period free_period]) unless range.class.ancestors.include?(Range)
21
22
  from = range.first
22
23
  to = range.last
23
24
 
24
25
  from = time_parse(range.first, I18n.t(:start_date_is_invalid, scope: %i[period free_period])).beginning_of_day
25
26
  to = time_parse(range.last, I18n.t(:end_date_is_invalid, scope: %i[period free_period])).end_of_day
26
-
27
+ to = to.prev_day if range.exclude_end?
27
28
  raise ::ArgumentError, I18n.t(:start_is_greater_than_end, scope: %i[period free_period]) if from > to
28
29
 
29
- super(from, to, range.exclude_end?)
30
+ super(from, to)
30
31
  end
31
32
 
32
33
  alias from first
@@ -44,10 +45,6 @@ class Period::FreePeriod < Range
44
45
  raise NotImplementedError
45
46
  end
46
47
 
47
- def self.from_date(_date)
48
- raise NotImplementedError
49
- end
50
-
51
48
  def include?(other)
52
49
  if other.class.in?([DateTime, Time, ActiveSupport::TimeWithZone])
53
50
  from.to_i <= other.to_i && other.to_i <= to.to_i
@@ -74,8 +71,22 @@ class Period::FreePeriod < Range
74
71
  days.count.days
75
72
  end
76
73
 
77
- def -(other)
78
- self.class.new((from - other)..(to - other))
74
+ def -(duration)
75
+ self.class.new((from - duration)..(to - duration))
76
+ end
77
+
78
+ def +(duration)
79
+ self.class.new((from + duration)..(to + duration))
80
+ end
81
+
82
+ def ==(other)
83
+ raise ArgumentError unless other.class.ancestors.include?(Period::FreePeriod)
84
+
85
+ from == other.from && to == other.to
86
+ end
87
+
88
+ def strftime(format)
89
+ to_s(format: format)
79
90
  end
80
91
 
81
92
  def to_s(format: '%d %B %Y')
@@ -4,7 +4,6 @@ module Period
4
4
  # @note when include this module provide itterable access to the weeks of
5
5
  # the FreePeriod
6
6
  module Weeks
7
- # TODO, rewrite this to respect ISO %V %G
8
7
  def weeks
9
8
  @weeks ||= []
10
9
  return @weeks if @weeks.present?
@@ -41,12 +41,6 @@ module Period
41
41
  self.class.new(to + duration)
42
42
  end
43
43
 
44
- def ==(other)
45
- raise ArgumentError unless other.class.ancestors.include?(Period::FreePeriod)
46
-
47
- from == other.from && to == other.to
48
- end
49
-
50
44
  def iso_date
51
45
  from
52
46
  end
@@ -1,3 +1,5 @@
1
1
  module Period
2
- VERSION = '1.0.0'.freeze
2
+
3
+ VERSION = '1.0.6'.freeze
4
+
3
5
  end
@@ -6,6 +6,7 @@ en:
6
6
  end_date_is_invalid: The end date is invalid
7
7
  start_is_greater_than_end: The start date is greater than the end date
8
8
  incomparable_error: Cannot compare Arguments
9
+ param_must_be_a_range: The parameter must inherit from the Range class
9
10
  standard_period:
10
11
  date_is_invalid: The date is invalid
11
12
  day:
@@ -7,6 +7,7 @@ fr:
7
7
  start_is_greater_than_end: Date de début supérieur à la date de fin
8
8
  incomparable_error: Les arguments ne sont pas comparables
9
9
  must_implement_to_datetime: L'argument doit repondre a "to_datetime"
10
+ param_must_be_a_range: Le paramètre doit hériter de la class Range
10
11
  standard_period:
11
12
  day:
12
13
  default_format: '%{wday} %{day} %{month} %{year}'
@@ -18,3 +19,26 @@ fr:
18
19
  default_format: '%{quarter_nb} semestre %{year}'
19
20
  year:
20
21
  default_format: '%{year}'
22
+ date:
23
+ month_names:
24
+ -
25
+ - janvier
26
+ - février
27
+ - mars
28
+ - avril
29
+ - mai
30
+ - juin
31
+ - juillet
32
+ - août
33
+ - septembre
34
+ - octobre
35
+ - novembre
36
+ - décembre
37
+ day_names:
38
+ - dimanche
39
+ - lundi
40
+ - mardi
41
+ - mercredi
42
+ - jeudi
43
+ - vendredi
44
+ - samedi
@@ -6,25 +6,26 @@ 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
- spec.summary = 'Write a short summary, because RubyGems requires one.'
12
- spec.description = 'Write a longer description or delete this line.'
13
- # spec.homepage = "Put your gem's website or public repo URL here."
10
+ spec.summary = 'Manage time ranges without brain damage.'
11
+ # spec.description = "Period.new('01/01/2020'..Time.now)"
12
+ spec.homepage = "https://github.com/billaul/period"
14
13
  spec.license = 'MIT'
15
14
 
16
15
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
16
  # to allow pushing to a single host or delete this section to allow pushing to any host.
18
- # if spec.respond_to?(:metadata)
19
- # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
20
- #
21
- # spec.metadata["homepage_uri"] = spec.homepage
22
- # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
23
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
24
- # else
25
- # raise "RubyGems 2.0 or newer is required to protect against " \
26
- # "public gem pushes."
27
- # end
17
+ if spec.respond_to?(:metadata)
18
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
19
+
20
+ spec.metadata["bug_tracker_uri"] = spec.homepage + '/issues'
21
+ spec.metadata["homepage_uri"] = spec.homepage
22
+ spec.metadata["documentation_uri"] = spec.homepage
23
+ spec.metadata["source_code_uri"] = spec.homepage
24
+ # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
25
+ else
26
+ raise "RubyGems 2.0 or newer is required to protect against " \
27
+ "public gem pushes."
28
+ end
28
29
 
29
30
  # Specify which files should be added to the gem when it is released.
30
31
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -33,10 +34,11 @@ Gem::Specification.new do |spec|
33
34
  end
34
35
  spec.bindir = 'exe'
35
36
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
- spec.require_paths = %w[lib locals]
37
+ spec.require_paths = %w[lib locales]
37
38
 
38
- spec.add_runtime_dependency 'activesupport', '5.2.3'
39
- spec.add_runtime_dependency 'i18n', '1.6.0'
39
+ spec.required_ruby_version = '> 2.5'
40
+ spec.add_runtime_dependency 'activesupport', '>= 5', '< 7'
41
+ spec.add_runtime_dependency 'i18n', '~> 1'
40
42
  spec.add_development_dependency 'bundler', '~> 2.0'
41
43
  spec.add_development_dependency 'rake', '~> 10.0'
42
44
  end
metadata CHANGED
@@ -1,43 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart-period
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.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-07 00:00:00.000000000 Z
11
+ date: 2020-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.3
19
+ version: '5'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '7'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - '='
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '5'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 5.2.3
32
+ version: '7'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: i18n
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - '='
37
+ - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: 1.6.0
39
+ version: '1'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - '='
44
+ - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: 1.6.0
46
+ version: '1'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: bundler
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -66,9 +72,8 @@ dependencies:
66
72
  - - "~>"
67
73
  - !ruby/object:Gem::Version
68
74
  version: '10.0'
69
- description: Write a longer description or delete this line.
75
+ description:
70
76
  email:
71
- - billau_l@modulotech.fr
72
77
  executables: []
73
78
  extensions: []
74
79
  extra_rdoc_files: []
@@ -106,20 +111,24 @@ files:
106
111
  - locales/en.yml
107
112
  - locales/fr.yml
108
113
  - period.gemspec
109
- homepage:
114
+ homepage: https://github.com/billaul/period
110
115
  licenses:
111
116
  - MIT
112
- metadata: {}
117
+ metadata:
118
+ bug_tracker_uri: https://github.com/billaul/period/issues
119
+ homepage_uri: https://github.com/billaul/period
120
+ documentation_uri: https://github.com/billaul/period
121
+ source_code_uri: https://github.com/billaul/period
113
122
  post_install_message:
114
123
  rdoc_options: []
115
124
  require_paths:
116
125
  - lib
117
- - locals
126
+ - locales
118
127
  required_ruby_version: !ruby/object:Gem::Requirement
119
128
  requirements:
120
- - - ">="
129
+ - - ">"
121
130
  - !ruby/object:Gem::Version
122
- version: '0'
131
+ version: '2.5'
123
132
  required_rubygems_version: !ruby/object:Gem::Requirement
124
133
  requirements:
125
134
  - - ">="
@@ -129,5 +138,5 @@ requirements: []
129
138
  rubygems_version: 3.1.2
130
139
  signing_key:
131
140
  specification_version: 4
132
- summary: Write a short summary, because RubyGems requires one.
141
+ summary: Manage time ranges without brain damage.
133
142
  test_files: []