timely 0.10.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/timely/rails/calendar_tag.rb +8 -1
- data/lib/timely/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8539b3725c833746cf31c1d13ffcd8d1a1f76d1e3fae9d06008898864cc6fa3
|
4
|
+
data.tar.gz: 5d748cb1025dd1f359433f4e543881bb5b28c6e988fdec85ab63a4fa04736548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d035c9679c8ab9e0435d8a942404f9ed141f710328b5e95a555b43d96f5b114f8552a93758c56afbf46aba20b221ef44bb6fdde687432dd11893cff1fc52044
|
7
|
+
data.tar.gz: d573289fbef814691ac96847c178e0750eed4f3193754efa9ec259df849e49ec885358c7bb7b3a87e4b54211c5d49633e285f94d08df4520deb3a31bcd69acb7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.12.0
|
4
|
+
|
5
|
+
* [PLAT-954] Handle additional `to_s` deprecation on Rails 7
|
6
|
+
|
7
|
+
## 0.11.0
|
8
|
+
|
9
|
+
* [PLAT-346] Handle `to_s` deprecation on Rails 7
|
10
|
+
|
3
11
|
## 0.10.0
|
4
12
|
|
5
13
|
* [PLAT-183] Publish coveralls with github actions add ruby 3.1 to test matrix
|
@@ -11,7 +11,9 @@ module Timely
|
|
11
11
|
def calendar_tag(name, value = Timely.current_date, *args)
|
12
12
|
options = args.extract_options!
|
13
13
|
|
14
|
-
|
14
|
+
if value.respond_to?(:day)
|
15
|
+
value = value.respond_to?(:to_fs) ? value.to_fs(:calendar) : value.to_s(:calendar)
|
16
|
+
end
|
15
17
|
|
16
18
|
name = name.to_s if name.is_a?(Symbol)
|
17
19
|
|
@@ -25,6 +27,10 @@ module Timely
|
|
25
27
|
options[:size] ||= 10
|
26
28
|
options[:maxlength] ||= 10
|
27
29
|
|
30
|
+
if options[:object].respond_to?(:to_fs)
|
31
|
+
options[:object] = options[:object].to_fs(:default)
|
32
|
+
end
|
33
|
+
|
28
34
|
tag(:input, options.merge(name: name, type: 'text', value: value)).html_safe
|
29
35
|
end
|
30
36
|
end
|
@@ -39,6 +45,7 @@ module Timely
|
|
39
45
|
module FormBuilder
|
40
46
|
def calendar(method, options = {})
|
41
47
|
options[:object] = @object.send(method) unless options.key?(:object)
|
48
|
+
|
42
49
|
@template.calendar(@object_name, method, options)
|
43
50
|
end
|
44
51
|
end
|
data/lib/timely/version.rb
CHANGED
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.
|
4
|
+
version: 0.12.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-
|
11
|
+
date: 2022-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|