timely 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4467e2ff404ef68bb2dcb40195a70018b558a5c74026b793a013da161175dd21
4
- data.tar.gz: 4fe035551c4f8674f53d73f2381c044dbcbe80b1ae871bbcc93ddcc63f432441
3
+ metadata.gz: ef6629b2db8417d5ba9d5506bf8b68ae9211bfc75c372c88c8221d5486497de5
4
+ data.tar.gz: a8989c57a326a2efbd1e8e204d028eb38e8472a3459949295b672803e752930e
5
5
  SHA512:
6
- metadata.gz: 20463685e09eb233b0d50ddbf481b203b00fab4d5e1824a61e9a4d119bcbc8ff0f59e8d0a62cf7d32caba758f66ed438792e6c59aa2d76d19210169186f7d424
7
- data.tar.gz: 58a1531ed015969171807ee0f20faaabe12a40dbaee521dd4b9f86d8cf7df7f4b289da16f304860856588cb6b96e99a9c2e40bda5c63d6c93e1ad5376bf3de69
6
+ metadata.gz: 90b550e3990d4026403ea150fd273975ba38f221a6dc065dcd89b9e0545088c1df2f19ff22470a96f50f6829e950f3f710a1985ce42184c78ddba3290ed0297f
7
+ data.tar.gz: dc5d1a349c7d9325aa2a373471c4cd7fedfba85d8be08d26fa3c2202babd6a00c7ccd36c426111491a2bfa104c58d0386a135a67062e9d7cd93424c5dbc15498
data/CHANGELOG.md CHANGED
@@ -1,73 +1,81 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.0
4
+
5
+ - [PLAT-1175] Update to Ruby 3.2
6
+
7
+ ## 0.12.0
8
+
9
+ - [PLAT-954] Handle additional `to_s` deprecation on Rails 7
10
+
3
11
  ## 0.11.0
4
12
 
5
- * [PLAT-346] Handle `to_s` deprecation on Rails 7
13
+ - [PLAT-346] Handle `to_s` deprecation on Rails 7
6
14
 
7
15
  ## 0.10.0
8
16
 
9
- * [PLAT-183] Publish coveralls with github actions add ruby 3.1 to test matrix
17
+ - [PLAT-183] Publish coveralls with github actions add ruby 3.1 to test matrix
10
18
 
11
19
  ## 0.9.0
12
20
 
13
- * [TT-8614] Update to build with github actions / ruby 3.0 / rails 6.1
21
+ - [TT-8614] Update to build with github actions / ruby 3.0 / rails 6.1
14
22
 
15
23
  ## 0.8.0
16
24
 
17
- * [TT-6441] Turns out we don't actually need time difference in QT
18
- * [TT-6661] Fix issue when detecting intersecting date groups
25
+ - [TT-6441] Turns out we don't actually need time difference in QT
26
+ - [TT-6661] Fix issue when detecting intersecting date groups
19
27
 
20
28
  ## 0.7.0
21
29
 
22
- * [TT-6441] Due to TimeDifference being unmaintained bring it into the timely library
30
+ - [TT-6441] Due to TimeDifference being unmaintained bring it into the timely library
23
31
 
24
32
  ## 0.6.0
25
33
 
26
- * [TT-6402] Require date group weekdays bit field to be not null/nil
27
- IMPORTANT: Rails projects must add a migration to make this field not null!
28
- * [TT-6401] Remove Rails 3 support, unused methods
34
+ - [TT-6402] Require date group weekdays bit field to be not null/nil
35
+ IMPORTANT: Rails projects must add a migration to make this field not null!
36
+ - [TT-6401] Remove Rails 3 support, unused methods
29
37
 
30
38
  ## 0.5.0
31
39
 
32
- * [TT-6193] Date group scopes for more efficient searches/restrictions
40
+ - [TT-6193] Date group scopes for more efficient searches/restrictions
33
41
 
34
42
  ## 0.4.2
35
43
 
36
- * [TT-5794] Fix belongs_to associations are not explicitly marked optional
44
+ - [TT-5794] Fix belongs_to associations are not explicitly marked optional
37
45
 
38
46
  ## 0.4.1
39
47
 
40
- * [TT-5674] Make multi year date format friendlier
48
+ - [TT-5674] Make multi year date format friendlier
41
49
 
42
50
  ## 0.4.0
43
51
 
44
- * [TT-5648] Fix date_range to string when a single month covers a year period
52
+ - [TT-5648] Fix date_range to string when a single month covers a year period
45
53
 
46
54
  ## 0.3.4
47
55
 
48
- * [TT-4812] Remove bootstrap class from calender tag
56
+ - [TT-4812] Remove bootstrap class from calender tag
49
57
 
50
58
  ## 0.3.3
51
59
 
52
- * Skipped due to mis-tagged version
60
+ - Skipped due to mis-tagged version
53
61
 
54
62
  ## 0.3.2
55
63
 
56
- * [TT-4716] Better exception message when a range is invalid
64
+ - [TT-4716] Better exception message when a range is invalid
57
65
 
58
66
  ## 0.3.1
59
67
 
60
- * Using Fixnum is deprecated
68
+ - Using Fixnum is deprecated
61
69
 
62
70
  ## 0.3.0
63
71
 
64
- * Add time zone awareness for Time#on (e.g. Rails)
65
- * Required Timely.load to load overrides
72
+ - Add time zone awareness for Time#on (e.g. Rails)
73
+ - Required Timely.load to load overrides
66
74
 
67
75
  ## 0.2.0
68
76
 
69
- * Rails 5 support
77
+ - Rails 5 support
70
78
 
71
79
  ## 0.1.0
72
80
 
73
- * Initial release
81
+ - Initial release
@@ -27,6 +27,10 @@ module Timely
27
27
  options[:size] ||= 10
28
28
  options[:maxlength] ||= 10
29
29
 
30
+ if options[:object].respond_to?(:to_fs)
31
+ options[:object] = options[:object].to_fs(:default)
32
+ end
33
+
30
34
  tag(:input, options.merge(name: name, type: 'text', value: value)).html_safe
31
35
  end
32
36
  end
@@ -41,6 +45,7 @@ module Timely
41
45
  module FormBuilder
42
46
  def calendar(method, options = {})
43
47
  options[:object] = @object.send(method) unless options.key?(:object)
48
+
44
49
  @template.calendar(@object_name, method, options)
45
50
  end
46
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Timely
4
- VERSION = '0.11.0'
4
+ VERSION = '0.13.0'
5
5
  end
data/timely.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.files = Dir["CHANGELOG.md", "README.md", "timely.gemspec", "lib/**/*"]
19
19
  spec.executables = []
20
20
  spec.require_paths = ['lib']
21
- spec.required_ruby_version = '>= 2.7'
21
+ spec.required_ruby_version = '>= 3.0'
22
22
 
23
23
  spec.add_development_dependency 'activerecord', '>=6', '<8'
24
24
  spec.add_development_dependency 'activesupport', '>=6', '<8'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timely
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -253,14 +253,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
253
  requirements:
254
254
  - - ">="
255
255
  - !ruby/object:Gem::Version
256
- version: '2.7'
256
+ version: '3.0'
257
257
  required_rubygems_version: !ruby/object:Gem::Requirement
258
258
  requirements:
259
259
  - - ">="
260
260
  - !ruby/object:Gem::Version
261
261
  version: '0'
262
262
  requirements: []
263
- rubygems_version: 3.3.3
263
+ rubygems_version: 3.4.1
264
264
  signing_key:
265
265
  specification_version: 4
266
266
  summary: Set of time, date, weekday related methods.