hiccup 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hiccup.gemspec +1 -1
- data/lib/hiccup/humanizable.rb +3 -3
- data/lib/hiccup/version.rb +1 -1
- data/test/humanizable_test.rb +4 -0
- metadata +30 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6b5535b4c9f8e9ade95f3f969b3fec9b42500b7
|
4
|
+
data.tar.gz: bbd1c41875bc71e2ae748d429aa26af5f275d5bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eccd19bae5df503436db9a45c61c8c7b3fcaed69a0a7ed0adc654791b1bad956e5d4a47281b9646f2723567c3f1d911de12770684b3b473a2774368984f09f5a
|
7
|
+
data.tar.gz: 2e0ae004bf47848458de41a7a17fcd23d92cefd3716bb6906ce018fbd899f52359c1f388d56303cae6e766ade11fbaada97f6eeca59ec17bc1e710c85430e916
|
data/hiccup.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_dependency "builder"
|
18
18
|
|
19
19
|
s.add_development_dependency "ri_cal"
|
20
|
-
s.add_development_dependency "rails", ">= 3.2.8"
|
20
|
+
s.add_development_dependency "rails", ">= 3.2.8", "< 4.1.0"
|
21
21
|
s.add_development_dependency "turn"
|
22
22
|
s.add_development_dependency "simplecov"
|
23
23
|
s.add_development_dependency "shoulda-context"
|
data/lib/hiccup/humanizable.rb
CHANGED
@@ -8,9 +8,9 @@ module Hiccup
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
def humanize
|
11
|
+
def humanize(format: "%Y-%m-%d")
|
12
12
|
case kind
|
13
|
-
when :never; start_date.
|
13
|
+
when :never; start_date.strftime(format)
|
14
14
|
when :weekly; weekly_humanize
|
15
15
|
when :monthly; monthly_humanize
|
16
16
|
when :annually; yearly_humanize
|
@@ -65,4 +65,4 @@ module Hiccup
|
|
65
65
|
|
66
66
|
|
67
67
|
end
|
68
|
-
end
|
68
|
+
end
|
data/lib/hiccup/version.rb
CHANGED
data/test/humanizable_test.rb
CHANGED
@@ -78,6 +78,10 @@ class HumanizableTest < ActiveSupport::TestCase
|
|
78
78
|
})
|
79
79
|
assert_equal "Every year on July 4", independence_day.humanize
|
80
80
|
end
|
81
|
+
|
82
|
+
test "should let you supply a format for strftime" do
|
83
|
+
assert_equal "July 4, 1776", Schedule.new(start_date: Date.new(1776, 7, 4)).humanize(format: "%B %-d, %Y")
|
84
|
+
end
|
81
85
|
|
82
86
|
|
83
87
|
|
metadata
CHANGED
@@ -1,125 +1,131 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiccup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-18 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
19
|
version: 3.2.8
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.2.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: builder
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: ri_cal
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 3.2.8
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 4.1.0
|
62
65
|
type: :development
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
|
-
- -
|
69
|
+
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: 3.2.8
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 4.1.0
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: turn
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
|
-
- -
|
79
|
+
- - ">="
|
74
80
|
- !ruby/object:Gem::Version
|
75
81
|
version: '0'
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
|
-
- -
|
86
|
+
- - ">="
|
81
87
|
- !ruby/object:Gem::Version
|
82
88
|
version: '0'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: simplecov
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
|
-
- -
|
93
|
+
- - ">="
|
88
94
|
- !ruby/object:Gem::Version
|
89
95
|
version: '0'
|
90
96
|
type: :development
|
91
97
|
prerelease: false
|
92
98
|
version_requirements: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
|
-
- -
|
100
|
+
- - ">="
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '0'
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: shoulda-context
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
|
-
- -
|
107
|
+
- - ">="
|
102
108
|
- !ruby/object:Gem::Version
|
103
109
|
version: '0'
|
104
110
|
type: :development
|
105
111
|
prerelease: false
|
106
112
|
version_requirements: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
|
-
- -
|
114
|
+
- - ">="
|
109
115
|
- !ruby/object:Gem::Version
|
110
116
|
version: '0'
|
111
117
|
- !ruby/object:Gem::Dependency
|
112
118
|
name: pry
|
113
119
|
requirement: !ruby/object:Gem::Requirement
|
114
120
|
requirements:
|
115
|
-
- -
|
121
|
+
- - ">="
|
116
122
|
- !ruby/object:Gem::Version
|
117
123
|
version: '0'
|
118
124
|
type: :development
|
119
125
|
prerelease: false
|
120
126
|
version_requirements: !ruby/object:Gem::Requirement
|
121
127
|
requirements:
|
122
|
-
- -
|
128
|
+
- - ">="
|
123
129
|
- !ruby/object:Gem::Version
|
124
130
|
version: '0'
|
125
131
|
description: Hiccup mixes a-la-cart recurrence features into your data structure.
|
@@ -130,9 +136,9 @@ executables: []
|
|
130
136
|
extensions: []
|
131
137
|
extra_rdoc_files: []
|
132
138
|
files:
|
133
|
-
- .gitignore
|
134
|
-
- .simplecov
|
135
|
-
- .travis.yml
|
139
|
+
- ".gitignore"
|
140
|
+
- ".simplecov"
|
141
|
+
- ".travis.yml"
|
136
142
|
- Gemfile
|
137
143
|
- README.mdown
|
138
144
|
- Rakefile
|
@@ -183,17 +189,17 @@ require_paths:
|
|
183
189
|
- lib
|
184
190
|
required_ruby_version: !ruby/object:Gem::Requirement
|
185
191
|
requirements:
|
186
|
-
- -
|
192
|
+
- - ">="
|
187
193
|
- !ruby/object:Gem::Version
|
188
194
|
version: '0'
|
189
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
196
|
requirements:
|
191
|
-
- -
|
197
|
+
- - ">="
|
192
198
|
- !ruby/object:Gem::Version
|
193
199
|
version: '0'
|
194
200
|
requirements: []
|
195
201
|
rubyforge_project: hiccup
|
196
|
-
rubygems_version: 2.2.
|
202
|
+
rubygems_version: 2.2.2
|
197
203
|
signing_key:
|
198
204
|
specification_version: 4
|
199
205
|
summary: A library for working with things that recur
|