copyright 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.yardoc/checksums CHANGED
@@ -1,2 +1,2 @@
1
1
  LICENSE fbbe6793cea495dc7ab7a7c037bd2dc585d22327
2
- lib/copyright_helper.rb e4d17757ddaeb20eaa98866869cf35351d1714db
2
+ lib/copyright_helper.rb 6c6d3d9c332fdca252ed76d057e285cf07beaa49
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.3
data/copyright.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{copyright}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Takaaki Kato"]
@@ -153,7 +153,7 @@ When the argument is the year of now
153
153
  When the argument if before of this year
154
154
 
155
155
  </h4>
156
- <pre class="example code"> <span class='copyright_years identifier id'>copyright_years</span><span class='lparen token'>(</span><span class='integer val'>1997</span><span class='rparen token'>)</span> <span class='comment val'>#=&gt; &quot;1997 - 2009&quot;</span>
156
+ <pre class="example code"> <span class='copyright_years identifier id'>copyright_years</span><span class='lparen token'>(</span><span class='integer val'>1997</span><span class='rparen token'>)</span> <span class='comment val'>#=&gt; &quot;1997-2009&quot;</span>
157
157
  </pre>
158
158
 
159
159
  </div>
@@ -211,7 +211,7 @@ When the argument if before of this year
211
211
  <span class='if if kw'>if</span> <span class='Date constant id'>Date</span><span class='dot token'>.</span><span class='civil identifier id'>civil</span><span class='lparen token'>(</span><span class='since identifier id'>since</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='year identifier id'>year</span> <span class='eq op'>==</span> <span class='Date constant id'>Date</span><span class='dot token'>.</span><span class='today identifier id'>today</span><span class='dot token'>.</span><span class='year identifier id'>year</span>
212
212
  <span class='since identifier id'>since</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span>
213
213
  <span class='else else kw'>else</span>
214
- <span class='dstring node'>&quot;#{since} - #{Date.today.year}&quot;</span>
214
+ <span class='dstring node'>&quot;#{since}-#{Date.today.year}&quot;</span>
215
215
  <span class='end end kw'>end</span>
216
216
  <span class='end end kw'>end</span>
217
217
  </pre>
@@ -225,7 +225,7 @@ When the argument if before of this year
225
225
  </div>
226
226
 
227
227
  <div id="footer">
228
- Generated on Mon Dec 28 06:46:33 2009 by
228
+ Generated on Mon Dec 28 06:59:01 2009 by
229
229
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
230
230
  0.5.2 (ruby-1.8.7).
231
231
  </div>
data/doc/_index.html CHANGED
@@ -79,7 +79,7 @@
79
79
  </div></div>
80
80
 
81
81
  <div id="footer">
82
- Generated on Mon Dec 28 06:46:33 2009 by
82
+ Generated on Mon Dec 28 06:59:01 2009 by
83
83
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
84
84
  0.5.2 (ruby-1.8.7).
85
85
  </div>
data/doc/file.README.html CHANGED
@@ -43,7 +43,6 @@
43
43
 
44
44
  <pre class="code"><span class='require identifier id'>require</span> <span class='string val'>'rubygems'</span>
45
45
  <span class='require identifier id'>require</span> <span class='string val'>'copyright'</span>
46
- <span class='include identifier id'>include</span> <span class='CopyrightYears constant id'>CopyrightYears</span>
47
46
  </pre>
48
47
 
49
48
  <h2 id='author'>Author</h2>
@@ -57,7 +56,7 @@
57
56
  <p>Copyright (c) 2009 Takaaki Kato. See LICENSE for details.</p></div></div>
58
57
 
59
58
  <div id="footer">
60
- Generated on Mon Dec 28 06:46:33 2009 by
59
+ Generated on Mon Dec 28 06:59:01 2009 by
61
60
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
62
61
  0.5.2 (ruby-1.8.7).
63
62
  </div>
data/doc/index.html CHANGED
@@ -43,7 +43,6 @@
43
43
 
44
44
  <pre class="code"><span class='require identifier id'>require</span> <span class='string val'>'rubygems'</span>
45
45
  <span class='require identifier id'>require</span> <span class='string val'>'copyright'</span>
46
- <span class='include identifier id'>include</span> <span class='CopyrightYears constant id'>CopyrightYears</span>
47
46
  </pre>
48
47
 
49
48
  <h2 id='author'>Author</h2>
@@ -57,7 +56,7 @@
57
56
  <p>Copyright (c) 2009 Takaaki Kato. See LICENSE for details.</p></div></div>
58
57
 
59
58
  <div id="footer">
60
- Generated on Mon Dec 28 06:46:33 2009 by
59
+ Generated on Mon Dec 28 06:59:01 2009 by
61
60
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
62
61
  0.5.2 (ruby-1.8.7).
63
62
  </div>
@@ -70,7 +70,7 @@
70
70
  </div>
71
71
 
72
72
  <div id="footer">
73
- Generated on Mon Dec 28 06:46:33 2009 by
73
+ Generated on Mon Dec 28 06:59:01 2009 by
74
74
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
75
75
  0.5.2 (ruby-1.8.7).
76
76
  </div>
@@ -7,7 +7,7 @@ module CopyrightHelper
7
7
  # @example When the argument is the year of now
8
8
  # copyright_years(2009) #=> "2009"
9
9
  # @example When the argument if before of this year
10
- # copyright_years(1997) #=> "1997 - 2009"
10
+ # copyright_years(1997) #=> "1997-2009"
11
11
  # @param [#is_a?(Integer)]
12
12
  def copyright_years(since)
13
13
  raise ArgumentError, "Argument should be a number" unless since.is_a?(Integer)
@@ -15,7 +15,7 @@ module CopyrightHelper
15
15
  if Date.civil(since).year == Date.today.year
16
16
  since.to_s
17
17
  else
18
- "#{since} - #{Date.today.year}"
18
+ "#{since}-#{Date.today.year}"
19
19
  end
20
20
  end
21
21
  end
@@ -24,7 +24,7 @@ class CopyrightYearTest < Test::Unit::TestCase
24
24
 
25
25
  should "return 2009 - 2010 when the argument is not the year of 'since'" do
26
26
  years = copyright_years(2006)
27
- assert_equal("2006 - 2009", years)
27
+ assert_equal("2006-2009", years)
28
28
  end
29
29
 
30
30
  should "raise the argument is bigger than the this year" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copyright
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takaaki Kato