later_dude 0.3.1 → 0.3.2
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.
- data/VERSION +1 -1
- data/lib/later_dude/calendar.rb +6 -6
- metadata +22 -7
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/later_dude/calendar.rb
CHANGED
@@ -21,7 +21,7 @@ module LaterDude
|
|
21
21
|
|
22
22
|
def to_html
|
23
23
|
content_tag(:table, :class => "#{@options[:calendar_class]}") do
|
24
|
-
content_tag(:tbody, show_days)+ content_tag(:thead, "#{show_month_names}#{show_day_names}".html_safe)
|
24
|
+
content_tag(:tbody, show_days) + content_tag(:thead, "#{show_month_names}#{show_day_names}".html_safe)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -33,13 +33,13 @@ module LaterDude
|
|
33
33
|
def show_previous_month
|
34
34
|
return if @days.first.wday == first_day_of_week # don't display anything if the first day is the first day of a week
|
35
35
|
|
36
|
-
|
36
|
+
"".tap do |output|
|
37
37
|
beginning_of_week(@days.first).upto(@days.first - 1) { |d| output << show_day(d) }
|
38
38
|
end.html_safe
|
39
39
|
end
|
40
40
|
|
41
41
|
def show_current_month
|
42
|
-
|
42
|
+
"".tap do |output|
|
43
43
|
@days.first.upto(@days.last) { |d| output << show_day(d) }
|
44
44
|
end.html_safe
|
45
45
|
end
|
@@ -47,7 +47,7 @@ module LaterDude
|
|
47
47
|
def show_following_month
|
48
48
|
return if @days.last.wday == last_day_of_week # don't display anything if the last day is the last day of a week
|
49
49
|
|
50
|
-
|
50
|
+
"".tap do |output|
|
51
51
|
(@days.last + 1).upto(beginning_of_week(@days.last + 1.week) - 1) { |d| output << show_day(d) }
|
52
52
|
end.html_safe
|
53
53
|
end
|
@@ -123,8 +123,8 @@ module LaterDude
|
|
123
123
|
text = I18n.localize(month, :format => format.first.to_s).html_safe
|
124
124
|
format.last.respond_to?(:call) ? link_to(text, format.last.call(month)) : text
|
125
125
|
else
|
126
|
-
format.respond_to?(:call) ? format.call(month) : I18n.localize(month, :format => format.to_s)
|
127
|
-
end
|
126
|
+
format.respond_to?(:call) ? format.call(month) : I18n.localize(month, :format => format.to_s)
|
127
|
+
end.html_safe
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: later_dude
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Clemens Kofler
|
@@ -9,7 +15,7 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-03-22 00:00:00 +01:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
21
|
|
@@ -35,31 +41,40 @@ files:
|
|
35
41
|
- tasks/distribution.rb
|
36
42
|
- tasks/documentation.rb
|
37
43
|
- tasks/testing.rb
|
44
|
+
- test/calendar_helper_test.rb
|
45
|
+
- test/calendar_test.rb
|
46
|
+
- test/test_helper.rb
|
38
47
|
has_rdoc: true
|
39
48
|
homepage: http://github.com/clemens/later_dude
|
40
49
|
licenses: []
|
41
50
|
|
42
51
|
post_install_message:
|
43
|
-
rdoc_options:
|
44
|
-
|
52
|
+
rdoc_options: []
|
53
|
+
|
45
54
|
require_paths:
|
46
55
|
- lib
|
47
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
48
58
|
requirements:
|
49
59
|
- - ">="
|
50
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
51
64
|
version: "0"
|
52
|
-
version:
|
53
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
54
67
|
requirements:
|
55
68
|
- - ">="
|
56
69
|
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
57
73
|
version: "0"
|
58
|
-
version:
|
59
74
|
requirements: []
|
60
75
|
|
61
76
|
rubyforge_project:
|
62
|
-
rubygems_version: 1.3.
|
77
|
+
rubygems_version: 1.3.7
|
63
78
|
signing_key:
|
64
79
|
specification_version: 3
|
65
80
|
summary: Small calendar helper plugin for Rails with i18n support
|