nwiki 0.1.1 → 0.1.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/CHANGELOG.org CHANGED
@@ -1,4 +1,5 @@
1
1
  * CHANGELOG
2
+ ** 0.1.2
2
3
  ** 0.1.1
3
4
  - [fix] Complement '/' to url when title clicked.
4
5
  ** 0.1.0
@@ -22,7 +22,7 @@ module Nwiki
22
22
  maker.channel.link = Rack::Request.new(env).url
23
23
 
24
24
  maker.channel.author = @wiki.author
25
- maker.channel.date = Time.parse('2014-02-06')
25
+ maker.channel.date = latest_update
26
26
  maker.channel.id = Rack::Request.new(env).url
27
27
 
28
28
  maker.items.do_sort = true
@@ -48,6 +48,16 @@ module Nwiki
48
48
  ]
49
49
  ]
50
50
  end
51
+
52
+ private
53
+ def latest_update
54
+ log = @wiki.access.repo.log
55
+ latest_update = Time.parse('1900-01-01')
56
+ log.each do |commit|
57
+ latest_update = commit.date if commit.date > latest_update
58
+ end
59
+ latest_update
60
+ end
51
61
  end
52
62
  end
53
63
  end
data/lib/nwiki/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nwiki
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -45,7 +45,7 @@ module Nwiki
45
45
  it { subject.title.content.should eq 'ヽ(´・肉・`)ノログ' }
46
46
  it { subject.subtitle.content.should eq 'How do we fighting without fighting?' }
47
47
  it { subject.author.name.content.should eq 'niku' }
48
- it { subject.date.should eq Time.parse('2014-02-06') }
48
+ it { subject.date.should eq Time.parse('2013-02-07 23:25:44 +0900') }
49
49
  it { subject.id.content.should eq 'http://example.org/articles.xml' }
50
50
  it { subject.items.first.link.href.should eq 'http://example.org/articles/icon.png' }
51
51
  it { subject.items.first.title.content.should eq "icon.png" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nwiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-09 00:00:00.000000000 Z
12
+ date: 2013-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gollum-lib
@@ -268,7 +268,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
268
268
  version: '0'
269
269
  segments:
270
270
  - 0
271
- hash: -789790350238631427
271
+ hash: -732404845606819790
272
272
  required_rubygems_version: !ruby/object:Gem::Requirement
273
273
  none: false
274
274
  requirements:
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
277
  version: '0'
278
278
  segments:
279
279
  - 0
280
- hash: -789790350238631427
280
+ hash: -732404845606819790
281
281
  requirements: []
282
282
  rubyforge_project:
283
283
  rubygems_version: 1.8.23