nwiki 0.1.0a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 1.9.3-p362
1
+ 1.9.3-p327
data/CHANGELOG.org CHANGED
@@ -1,9 +1,5 @@
1
1
  * CHANGELOG
2
2
  ** 0.1.0
3
- - [feature] link to list of articles
4
- ** 0.0.11
5
- - [feature] change top-page from static to dynamic
6
- ** 0.0.10
7
3
  - [feature] filter list of directory structure. return '.org' file only.
8
4
  ** 0.0.9
9
5
  - [fix] Fix url in the feed
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in nwiki.gemspec
4
4
  gemspec
5
-
6
- gem 'coveralls', require: false
data/README.md CHANGED
@@ -1,10 +1,5 @@
1
1
  # Nwiki
2
2
 
3
- [![Build Status](https://travis-ci.org/niku/nwiki.png?branch=master)](https://travis-ci.org/niku/nwiki)
4
- [![Dependency Status](https://gemnasium.com/niku/nwiki.png)](https://gemnasium.com/niku/nwiki)
5
- [![Code Climate](https://codeclimate.com/github/niku/nwiki.png)](https://codeclimate.com/github/niku/nwiki)
6
- [![Coverage Status](https://coveralls.io/repos/niku/nwiki/badge.png?branch=master)](https://coveralls.io/r/niku/nwiki)
7
-
8
3
  TODO: Write a gem description
9
4
 
10
5
  ## Installation
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'erb'
3
2
  require 'rss'
4
3
 
@@ -7,9 +6,6 @@ module Nwiki
7
6
  class App
8
7
  def initialize git_repo_path
9
8
  @builder = Rack::Builder.new {
10
- map '/' do
11
- run Top.new git_repo_path
12
- end
13
9
  map '/articles.xml' do
14
10
  run Feed.new git_repo_path, articles_path: '/articles'
15
11
  end
@@ -24,48 +20,6 @@ module Nwiki
24
20
  end
25
21
  end
26
22
 
27
- class Top
28
- def initialize git_repo_path, opts = {}
29
- @wiki = Nwiki::Core::Wiki.new git_repo_path
30
- end
31
-
32
- def call env
33
- [
34
- 200,
35
- { "Content-Type" => "text/html; charset=#{Nwiki::Core::Wiki.repo_filename_encoding}" },
36
- [html]
37
- ]
38
- end
39
-
40
- def html
41
- erb = ERB.new <<EOS
42
- <!DOCTYPE HTML>
43
- <html>
44
- <head>
45
- <meta http-equiv="refresh" content="5;URL=http://niku.name/articles/">
46
- <title><%= @wiki.title %></title>
47
- <link rel="alternate" type="application/atom+xml" title="ATOM Feed" href="/articles.xml">
48
- <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
49
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
50
- <script src="/bootstrap/js/bootstrap.min.js"></script>
51
- </head>
52
- <body>
53
- <div class="container">
54
- <div class="row">
55
- <div class="span12">
56
- <h1><%= @wiki.title %></h1>
57
- <h2><%= @wiki.subtitle %></h2>
58
- <p>ここまだ何にも作ってないんす.<a href="./articles/">articles</a>以下が動いているのでそっちを見てね.5秒経つと自動で移動します.</p>
59
- </div>
60
- </div>
61
- </div>
62
- </body>
63
- </html>
64
- EOS
65
- erb.result(binding).force_encoding(Nwiki::Core::Wiki.repo_filename_encoding)
66
- end
67
- end
68
-
69
23
  class Feed
70
24
  attr_reader :articles_path
71
25
 
@@ -148,7 +102,7 @@ EOS
148
102
  <div class="container">
149
103
  <div class="row">
150
104
  <div class="span12">
151
- <h1><a href="/articles"><%= @wiki.title %></a></h1>
105
+ <h1><%= @wiki.title %></h1>
152
106
  <h2><%= @wiki.subtitle %></h2>
153
107
  <%= page.to_html %>
154
108
  </div>
data/lib/nwiki/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nwiki
2
- VERSION = '0.1.0a'
2
+ VERSION = '0.1.0'
3
3
  end
File without changes
@@ -14,14 +14,6 @@ module Nwiki
14
14
  get path
15
15
  end
16
16
 
17
- context 'GET /' do
18
- let(:path) { '/' }
19
-
20
- it { subject.should be_ok }
21
- it { subject.should match %r!\bヽ(´・肉・`)ノログ\b! }
22
- it { subject.should match %r!\bHow do we fighting without fighting?\b! }
23
- end
24
-
25
17
  context 'GET /articles' do
26
18
  let(:path) { '/articles/' }
27
19
 
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'nwiki'
2
2
  require 'rack/test'
3
- require 'coveralls'
4
3
 
5
4
  RSpec.configure do |config|
6
5
  config.treat_symbols_as_metadata_keys_with_true_values = true
@@ -8,5 +7,3 @@ RSpec.configure do |config|
8
7
  config.filter_run :focus
9
8
  config.include Rack::Test::Methods
10
9
  end
11
-
12
- Coveralls.wear!
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nwiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0a
5
- prerelease: 5
4
+ version: 0.1.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - niku
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-09 00:00:00.000000000 Z
12
+ date: 2013-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gollum-lib
@@ -162,7 +162,6 @@ executables: []
162
162
  extensions: []
163
163
  extra_rdoc_files: []
164
164
  files:
165
- - .coveralls.yml
166
165
  - .gitignore
167
166
  - .rspec
168
167
  - .ruby-version
@@ -248,6 +247,7 @@ files:
248
247
  - spec/examples/sample.git/refs/heads/config
249
248
  - spec/examples/sample.git/refs/heads/master
250
249
  - spec/nwiki/core/git_access_spec.rb
250
+ - spec/nwiki/core/page_spec.rb
251
251
  - spec/nwiki/core/wiki_spec.rb
252
252
  - spec/requests/articles_spec.rb
253
253
  - spec/spec_helper.rb
@@ -265,13 +265,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  segments:
267
267
  - 0
268
- hash: -16791929514689930
268
+ hash: 3045566447973314358
269
269
  required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  none: false
271
271
  requirements:
272
- - - ! '>'
272
+ - - ! '>='
273
273
  - !ruby/object:Gem::Version
274
- version: 1.3.1
274
+ version: '0'
275
+ segments:
276
+ - 0
277
+ hash: 3045566447973314358
275
278
  requirements: []
276
279
  rubyforge_project:
277
280
  rubygems_version: 1.8.23
@@ -337,6 +340,7 @@ test_files:
337
340
  - spec/examples/sample.git/refs/heads/config
338
341
  - spec/examples/sample.git/refs/heads/master
339
342
  - spec/nwiki/core/git_access_spec.rb
343
+ - spec/nwiki/core/page_spec.rb
340
344
  - spec/nwiki/core/wiki_spec.rb
341
345
  - spec/requests/articles_spec.rb
342
346
  - spec/spec_helper.rb
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- service_name: travis-ci