nwiki 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/CHANGELOG.org +3 -0
  2. data/config.ru +2 -23
  3. data/lib/nwiki/core/file.rb +12 -0
  4. data/lib/nwiki/core/git_access.rb +8 -0
  5. data/lib/nwiki/core/page.rb +28 -0
  6. data/lib/nwiki/core/wiki.rb +53 -0
  7. data/lib/nwiki/core.rb +4 -0
  8. data/lib/nwiki/frontend/app.rb +41 -0
  9. data/lib/nwiki/frontend.rb +1 -0
  10. data/lib/nwiki/version.rb +1 -1
  11. data/lib/nwiki.rb +2 -100
  12. data/nwiki.gemspec +1 -0
  13. data/spec/examples/sample.git/HEAD +1 -0
  14. data/spec/examples/sample.git/config +7 -0
  15. data/spec/examples/sample.git/description +1 -0
  16. data/spec/examples/sample.git/hooks/applypatch-msg.sample +15 -0
  17. data/spec/examples/sample.git/hooks/commit-msg.sample +24 -0
  18. data/spec/examples/sample.git/hooks/post-update.sample +8 -0
  19. data/spec/examples/sample.git/hooks/pre-applypatch.sample +14 -0
  20. data/spec/examples/sample.git/hooks/pre-commit.sample +50 -0
  21. data/spec/examples/sample.git/hooks/pre-rebase.sample +169 -0
  22. data/spec/examples/sample.git/hooks/prepare-commit-msg.sample +36 -0
  23. data/spec/examples/sample.git/hooks/update.sample +128 -0
  24. data/spec/examples/sample.git/info/exclude +6 -0
  25. data/spec/examples/sample.git/objects/0b/8d94516c12f9f9336f93195cc78fc0f7ca316e +0 -0
  26. data/spec/examples/sample.git/objects/25/7fd54a4036bc29b7319a53af9df1e77e3c9e3c +0 -0
  27. data/spec/examples/sample.git/objects/2c/fce679f210d9ac21548c2c174d9af6ed66ae25 +0 -0
  28. data/spec/examples/sample.git/objects/2f/18f5f46171d63bda113740164f9f97d9c9cee0 +0 -0
  29. data/spec/examples/sample.git/objects/2f/3d52a79856de3d6b38b3bfaf18a7e84e5a3dbe +0 -0
  30. data/spec/examples/sample.git/objects/3b/30614194437de460036103ce33e7b1b12c25b6 +3 -0
  31. data/spec/examples/sample.git/objects/57/8028730053311779504e389ded0c685a2f6134 +0 -0
  32. data/spec/examples/sample.git/objects/60/0ce3fa8fcc541c188492030d7f47cf9671f7ce +0 -0
  33. data/spec/examples/sample.git/objects/63/c0856958172223da3309e653f837a3485be4ae +3 -0
  34. data/spec/examples/sample.git/objects/64/902b30b243f9e7cc7c9433014739f34642343c +0 -0
  35. data/spec/examples/sample.git/objects/66/f848f979d79e1d07fa12e9e23723498ee678f8 +0 -0
  36. data/spec/examples/sample.git/objects/7c/9c4f980b20d8b37a476a0d13862405fcbbb9db +0 -0
  37. data/spec/examples/sample.git/objects/84/72b6b70b769892c5d39e4d0807679660678e3d +0 -0
  38. data/spec/examples/sample.git/objects/8b/75d97ef05f8dc0ff86326f83b766466884076e +0 -0
  39. data/spec/examples/sample.git/objects/90/b6e9f5bf06f174327f1ff8645292862954c363 +0 -0
  40. data/spec/examples/sample.git/objects/9f/d939d7d5a9b9738d50c81213d48e1b4173e2a6 +0 -0
  41. data/spec/examples/sample.git/objects/a3/56ee376c1569a36681f19442fd55bbe1c1d4c0 +0 -0
  42. data/spec/examples/sample.git/objects/a8/94ffa49546349f0dc70894b80d6aeac4f47937 +0 -0
  43. data/spec/examples/sample.git/objects/b8/6e2b77757908eb37db93a7b2524ff54255e55c +3 -0
  44. data/spec/examples/sample.git/objects/bb/82177f6e647b275a0912d1861555083f1fc1b5 +2 -0
  45. data/spec/examples/sample.git/objects/cc/a250bd0689cb01d5e935c0b9f14ef3b9635ea7 +0 -0
  46. data/spec/examples/sample.git/objects/d8/e8ac8bf96ad29200dcadb1e101a03dd2c9c725 +0 -0
  47. data/spec/examples/sample.git/objects/ee/c463232a970260cedf6085ccd5453fbaa22201 +0 -0
  48. data/spec/examples/sample.git/objects/f9/5a864ef14341f731efd55d6b031e8f328aebb5 +0 -0
  49. data/spec/examples/sample.git/objects/ff/08398bc95c9497ab03e8e59b57a01e686c299a +0 -0
  50. data/spec/examples/sample.git/packed-refs +2 -0
  51. data/spec/examples/sample.git/refs/heads/master +1 -0
  52. data/spec/nwiki/core/git_access_spec.rb +17 -0
  53. data/spec/nwiki/core/page_spec.rb +0 -0
  54. data/spec/nwiki/core/wiki_spec.rb +23 -0
  55. data/spec/requests/articles_spec.rb +72 -0
  56. metadata +118 -4
  57. data/spec/nwiki_spec.rb +0 -5
data/CHANGELOG.org ADDED
@@ -0,0 +1,3 @@
1
+ * CHANGELOG
2
+ ** 0.0.2
3
+ - [feature] be able to handle raw file (raw file means besides org file)
data/config.ru CHANGED
@@ -1,33 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  $LOAD_PATH << './lib'
3
3
  require './lib/nwiki'
4
- require 'rack/google-analytics'
5
-
6
- ENV['RACK_ENV'] ||= "development"
7
- CONF = {
8
- data_file_directory: ENV['GIT_REPOSITORY'],
9
- feeds_url_prefix: '/feeds',
10
- articles_url_prefix: '/articles',
11
- site_title: "ヽ(´・肉・`)ノログ",
12
- site_description: "How do we fighting without fighting?",
13
- site_link: "http://niku.name",
14
- site_author: "niku",
15
- file_encoding: "UTF-8",
16
- }
17
4
 
18
5
  if ENV['RACK_ENV'] == "development"
19
6
  use Rack::Reloader
20
7
  use Rack::Lint
21
8
  end
22
9
 
23
- if tracker = ENV['GOOGLE_ANALYTICS_TRACKER']
24
- use Rack::GoogleAnalytics, :tracker => tracker
25
- end
26
-
27
- map CONF[:feeds_url_prefix] do
28
- run Nwiki::Feeds.new(CONF)
29
- end
30
-
31
- map CONF[:articles_url_prefix] do
32
- run Nwiki::Articles.new(CONF)
10
+ map '/articles' do
11
+ run Nwiki::Frontend::App.new 'spec/examples/sample.git'
33
12
  end
@@ -0,0 +1,12 @@
1
+ module Nwiki
2
+ module Core
3
+ class File
4
+ attr_reader :data, :content_type
5
+
6
+ def initialize name, data
7
+ @data = data
8
+ @content_type = Rack::Mime.mime_type(::File.extname(name))
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ require 'gollum'
2
+
3
+ module Nwiki
4
+ module Core
5
+ # copy from gollum
6
+ GitAccess = ::Gollum::GitAccess
7
+ end
8
+ end
@@ -0,0 +1,28 @@
1
+ module Nwiki
2
+ module Core
3
+ class Page
4
+ attr_reader :title, :doc
5
+
6
+ def initialize title, doc, parser_class
7
+ raise 'title is empty or nil' unless title
8
+ raise 'doc is empty or nil' unless doc
9
+ raise 'parser_class is empty or nil' unless parser_class
10
+ @title, @doc, @parser_class = title, doc, parser_class
11
+ end
12
+
13
+ def encoding
14
+ @doc.encoding
15
+ end
16
+
17
+ def to_html
18
+ @parser_class.new(@doc, 1).to_html
19
+ end
20
+
21
+ def == other
22
+ return false unless other
23
+ self.kind_of?(other.class) &&
24
+ self.doc == other.doc
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,53 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Nwiki
3
+ module Core
4
+ class Wiki
5
+ def self.repo_filename_encoding
6
+ Encoding::UTF_8
7
+ end
8
+
9
+ def self.parser
10
+ Orgmode::Parser
11
+ end
12
+
13
+ def self.canonicalize_path path
14
+ unescaped_path = URI.unescape(path).force_encoding(repo_filename_encoding)
15
+ unescaped_path.sub(/^\//, '')
16
+ end
17
+
18
+ def initialize path
19
+ @path = path
20
+ @access = GitAccess.new(path)
21
+ end
22
+
23
+ def find path
24
+ canonicalized_path = self.class.canonicalize_path path
25
+ blob_entry = @access
26
+ .tree('master')
27
+ .find { |e| canonicalized_path == e.path.sub(/\.org$/){ '' } }
28
+ return nil unless blob_entry
29
+ byte_string = blob_entry.blob(@access.repo).data
30
+ if blob_entry.name =~ /\.org$/
31
+ byte_string.force_encoding(self.class.repo_filename_encoding)
32
+ Page.new(::File.basename(blob_entry.name, '.org'), byte_string, self.class.parser)
33
+ else
34
+ File.new(blob_entry.name, byte_string)
35
+ end
36
+ end
37
+
38
+ def name
39
+ blob_entry = @access
40
+ .tree('master')
41
+ .find { |e| e.path == '__nwiki/name' }
42
+ return '' unless blob_entry
43
+ byte_string = blob_entry.blob(@access.repo).data
44
+ byte_string.force_encoding(self.class.repo_filename_encoding)
45
+ byte_string.chomp
46
+ end
47
+
48
+ def exist?
49
+ @access.exist?
50
+ end
51
+ end
52
+ end
53
+ end
data/lib/nwiki/core.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'nwiki/core/git_access'
2
+ require 'nwiki/core/file'
3
+ require 'nwiki/core/page'
4
+ require 'nwiki/core/wiki'
@@ -0,0 +1,41 @@
1
+ require 'erb'
2
+
3
+ module Nwiki
4
+ module Frontend
5
+ class App
6
+ def initialize git_repo_path
7
+ @wiki = Nwiki::Core::Wiki.new git_repo_path
8
+ raise unless @wiki.exist?
9
+ end
10
+
11
+ def call env
12
+ path_info = env["PATH_INFO"]
13
+ page = @wiki.find path_info
14
+ case page
15
+ when Core::Page
16
+ [200, {"Content-Type" => "text/html; charset=#{page.encoding}"}, [html(page)]]
17
+ when Core::File
18
+ [200, {"Content-Type" => page.content_type}, [page.data]]
19
+ else
20
+ [404, {"Content-Type" => "text/plane"}, ["not found."]]
21
+ end
22
+ end
23
+
24
+ def html page
25
+ erb = ERB.new <<EOS
26
+ <!DOCTYPE HTML>
27
+ <html>
28
+ <head>
29
+ <title><%= page.title %> - <%= @wiki.name %></title>
30
+ </head>
31
+ <body>
32
+ <h1><%= @wiki.name %></h1>
33
+ <%= page.to_html %>
34
+ </body>
35
+ </html>
36
+ EOS
37
+ erb.result(binding).force_encoding(page.encoding)
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1 @@
1
+ require 'nwiki/frontend/app'
data/lib/nwiki/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nwiki
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/nwiki.rb CHANGED
@@ -1,102 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  require 'nwiki/version'
3
-
4
- require 'rss'
5
- require "grit"
6
- require "org-ruby"
7
- require "rack/mime"
8
-
9
- module Nwiki
10
- class Articles
11
- def initialize opt
12
- @data_file_directory = opt[:data_file_directory]
13
- @articles_url_prefix = opt[:articles_url_prefix]
14
- @file_encoding = opt[:file_encoding]
15
- @site_title = opt[:site_title].force_encoding(@file_encoding)
16
- end
17
-
18
- def call env
19
- file_path = convert_file_path(env["PATH_INFO"])
20
- return [403, {"Content-Type" => "text/plane"}, ["forbidden."]] if file_path.include? ".."
21
- tree = Grit::Repo.new(@data_file_directory).commits.first.tree
22
- case result = tree/file_path || tree/(file_path + '.org')
23
- when Grit::Tree
24
- if env["PATH_INFO"] =~ /\/$/
25
- list = "<ul><li><a href=\"../\">../</a></li>" + result.contents.map{ |c|
26
- case c
27
- when Grit::Tree
28
- %Q!<li><a href="#{c.name}/">#{c.name}/</a></li>!
29
- when Grit::Blob
30
- %Q!<li><a href="#{c.name}">#{c.name}</a></li>!
31
- else
32
- # TODO
33
- end
34
- }.sort.join("\n") + "</ul>"
35
- [200, {"Content-Type" => "text/html; charset=#{@file_encoding}"}, [wrap_html(@site_title, file_path.force_encoding(@file_encoding)){ list.force_encoding(@file_encoding) }]]
36
- else
37
- request_path = env["SCRIPT_NAME"] + env["PATH_INFO"]
38
- [301, {"Content-Type" => "text/plane; charset=#{@file_encoding}", "Location" => request_path + "/"}, ["redirect."]]
39
- end
40
- when Grit::Blob
41
- extname = File.extname(file_path)
42
- if extname == '.org' || extname == ''
43
- [200, {"Content-Type" => "text/html; charset=#{@file_encoding}"}, [wrap_html(@site_title, result.name.force_encoding(@file_encoding)){ Orgmode::Parser.new(result.data.force_encoding(@file_encoding), 1).to_html }]]
44
- else
45
- [200, {"Content-Type" => Rack::Mime.mime_type(File.extname(file_path), 'text/plain')}, [result.data]]
46
- end
47
- else
48
- [404, {"Content-Type" => "text/plane; charset=#{@file_encoding}"}, ["not found."]]
49
- end
50
- end
51
-
52
- def convert_file_path(str)
53
- path = str.
54
- gsub(%r!^#{@articles_url_prefix}!, '').
55
- gsub(%r!^/!, '')
56
- path.empty? ? '/' : URI.unescape(path).force_encoding(@file_encoding)
57
- end
58
-
59
- def wrap_html site_title, article_title
60
- html = ""
61
- html << "<!DOCTYPE html><html><head><title>#{article_title} - #{site_title}</title></head><body><h1>#{site_title}</h1>"
62
- html << yield if block_given?
63
- html << "</body></html>"
64
- end
65
- end
66
-
67
- class Feeds
68
- def initialize opt
69
- @data_file_directory = opt[:data_file_directory]
70
- @feeds_url_prefix = opt[:feeds_url_prefix]
71
- @articles_url_prefix = opt[:articles_url_prefix]
72
- @site_title = opt[:site_title]
73
- @site_description = opt[:site_description]
74
- @site_link = opt[:site_link]
75
- @site_author = opt[:site_author]
76
- end
77
-
78
- def call env
79
- feed = RSS::Maker.make("atom") do |maker|
80
- maker.channel.about = @site_link + @feeds_url_prefix
81
- maker.channel.title = @site_title
82
- maker.channel.description = @site_description
83
- maker.channel.link = @site_link
84
- maker.channel.author = @site_author
85
- maker.channel.date = Time.now
86
- maker.items.do_sort = true
87
- Grit::Repo.new(@data_file_directory).commits.map{ |history|
88
- history.diffs.map{ |diff|
89
- next nil if diff.deleted_file # FIXME how do we view deleted file?
90
- maker.items.new_item{ |item|
91
- path = diff.b_path.force_encoding('utf-8')
92
- item.link = "#{@site_link}#{@articles_url_prefix}/#{path}"
93
- item.title = File.basename(path)
94
- item.date = history.date
95
- }
96
- }.compact
97
- }.flatten
98
- end
99
- [200, {"Content-Type" => "text/xml"}, [feed.to_s]]
100
- end
101
- end
102
- end
3
+ require 'nwiki/core'
4
+ require 'nwiki/frontend'
data/nwiki.gemspec CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ['lib']
16
16
  gem.version = Nwiki::VERSION
17
17
 
18
+ gem.add_dependency('gollum')
18
19
  gem.add_dependency('rack')
19
20
  gem.add_dependency('sinatra')
20
21
  gem.add_dependency('org-ruby')
@@ -0,0 +1 @@
1
+ ref: refs/heads/master
@@ -0,0 +1,7 @@
1
+ [core]
2
+ repositoryformatversion = 0
3
+ filemode = true
4
+ bare = true
5
+ ignorecase = true
6
+ [remote "origin"]
7
+ url = /Users/niku/debian/tmp/sample/.git
@@ -0,0 +1 @@
1
+ Unnamed repository; edit this file 'description' to name the repository.
@@ -0,0 +1,15 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to check the commit log message taken by
4
+ # applypatch from an e-mail message.
5
+ #
6
+ # The hook should exit with non-zero status after issuing an
7
+ # appropriate message if it wants to stop the commit. The hook is
8
+ # allowed to edit the commit message file.
9
+ #
10
+ # To enable this hook, rename this file to "applypatch-msg".
11
+
12
+ . git-sh-setup
13
+ test -x "$GIT_DIR/hooks/commit-msg" &&
14
+ exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
15
+ :
@@ -0,0 +1,24 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to check the commit log message.
4
+ # Called by "git commit" with one argument, the name of the file
5
+ # that has the commit message. The hook should exit with non-zero
6
+ # status after issuing an appropriate message if it wants to stop the
7
+ # commit. The hook is allowed to edit the commit message file.
8
+ #
9
+ # To enable this hook, rename this file to "commit-msg".
10
+
11
+ # Uncomment the below to add a Signed-off-by line to the message.
12
+ # Doing this in a hook is a bad idea in general, but the prepare-commit-msg
13
+ # hook is more suited to it.
14
+ #
15
+ # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
16
+ # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
17
+
18
+ # This example catches duplicate Signed-off-by lines.
19
+
20
+ test "" = "$(grep '^Signed-off-by: ' "$1" |
21
+ sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
22
+ echo >&2 Duplicate Signed-off-by lines.
23
+ exit 1
24
+ }
@@ -0,0 +1,8 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to prepare a packed repository for use over
4
+ # dumb transports.
5
+ #
6
+ # To enable this hook, rename this file to "post-update".
7
+
8
+ exec git update-server-info
@@ -0,0 +1,14 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to verify what is about to be committed
4
+ # by applypatch from an e-mail message.
5
+ #
6
+ # The hook should exit with non-zero status after issuing an
7
+ # appropriate message if it wants to stop the commit.
8
+ #
9
+ # To enable this hook, rename this file to "pre-applypatch".
10
+
11
+ . git-sh-setup
12
+ test -x "$GIT_DIR/hooks/pre-commit" &&
13
+ exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
14
+ :
@@ -0,0 +1,50 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to verify what is about to be committed.
4
+ # Called by "git commit" with no arguments. The hook should
5
+ # exit with non-zero status after issuing an appropriate message if
6
+ # it wants to stop the commit.
7
+ #
8
+ # To enable this hook, rename this file to "pre-commit".
9
+
10
+ if git rev-parse --verify HEAD >/dev/null 2>&1
11
+ then
12
+ against=HEAD
13
+ else
14
+ # Initial commit: diff against an empty tree object
15
+ against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
16
+ fi
17
+
18
+ # If you want to allow non-ascii filenames set this variable to true.
19
+ allownonascii=$(git config hooks.allownonascii)
20
+
21
+ # Redirect output to stderr.
22
+ exec 1>&2
23
+
24
+ # Cross platform projects tend to avoid non-ascii filenames; prevent
25
+ # them from being added to the repository. We exploit the fact that the
26
+ # printable range starts at the space character and ends with tilde.
27
+ if [ "$allownonascii" != "true" ] &&
28
+ # Note that the use of brackets around a tr range is ok here, (it's
29
+ # even required, for portability to Solaris 10's /usr/bin/tr), since
30
+ # the square bracket bytes happen to fall in the designated range.
31
+ test $(git diff --cached --name-only --diff-filter=A -z $against |
32
+ LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
33
+ then
34
+ echo "Error: Attempt to add a non-ascii file name."
35
+ echo
36
+ echo "This can cause problems if you want to work"
37
+ echo "with people on other platforms."
38
+ echo
39
+ echo "To be portable it is advisable to rename the file ..."
40
+ echo
41
+ echo "If you know what you are doing you can disable this"
42
+ echo "check using:"
43
+ echo
44
+ echo " git config hooks.allownonascii true"
45
+ echo
46
+ exit 1
47
+ fi
48
+
49
+ # If there are whitespace errors, print the offending file names and fail.
50
+ exec git diff-index --check --cached $against --
@@ -0,0 +1,169 @@
1
+ #!/bin/sh
2
+ #
3
+ # Copyright (c) 2006, 2008 Junio C Hamano
4
+ #
5
+ # The "pre-rebase" hook is run just before "git rebase" starts doing
6
+ # its job, and can prevent the command from running by exiting with
7
+ # non-zero status.
8
+ #
9
+ # The hook is called with the following parameters:
10
+ #
11
+ # $1 -- the upstream the series was forked from.
12
+ # $2 -- the branch being rebased (or empty when rebasing the current branch).
13
+ #
14
+ # This sample shows how to prevent topic branches that are already
15
+ # merged to 'next' branch from getting rebased, because allowing it
16
+ # would result in rebasing already published history.
17
+
18
+ publish=next
19
+ basebranch="$1"
20
+ if test "$#" = 2
21
+ then
22
+ topic="refs/heads/$2"
23
+ else
24
+ topic=`git symbolic-ref HEAD` ||
25
+ exit 0 ;# we do not interrupt rebasing detached HEAD
26
+ fi
27
+
28
+ case "$topic" in
29
+ refs/heads/??/*)
30
+ ;;
31
+ *)
32
+ exit 0 ;# we do not interrupt others.
33
+ ;;
34
+ esac
35
+
36
+ # Now we are dealing with a topic branch being rebased
37
+ # on top of master. Is it OK to rebase it?
38
+
39
+ # Does the topic really exist?
40
+ git show-ref -q "$topic" || {
41
+ echo >&2 "No such branch $topic"
42
+ exit 1
43
+ }
44
+
45
+ # Is topic fully merged to master?
46
+ not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
47
+ if test -z "$not_in_master"
48
+ then
49
+ echo >&2 "$topic is fully merged to master; better remove it."
50
+ exit 1 ;# we could allow it, but there is no point.
51
+ fi
52
+
53
+ # Is topic ever merged to next? If so you should not be rebasing it.
54
+ only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
55
+ only_next_2=`git rev-list ^master ${publish} | sort`
56
+ if test "$only_next_1" = "$only_next_2"
57
+ then
58
+ not_in_topic=`git rev-list "^$topic" master`
59
+ if test -z "$not_in_topic"
60
+ then
61
+ echo >&2 "$topic is already up-to-date with master"
62
+ exit 1 ;# we could allow it, but there is no point.
63
+ else
64
+ exit 0
65
+ fi
66
+ else
67
+ not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
68
+ /usr/bin/perl -e '
69
+ my $topic = $ARGV[0];
70
+ my $msg = "* $topic has commits already merged to public branch:\n";
71
+ my (%not_in_next) = map {
72
+ /^([0-9a-f]+) /;
73
+ ($1 => 1);
74
+ } split(/\n/, $ARGV[1]);
75
+ for my $elem (map {
76
+ /^([0-9a-f]+) (.*)$/;
77
+ [$1 => $2];
78
+ } split(/\n/, $ARGV[2])) {
79
+ if (!exists $not_in_next{$elem->[0]}) {
80
+ if ($msg) {
81
+ print STDERR $msg;
82
+ undef $msg;
83
+ }
84
+ print STDERR " $elem->[1]\n";
85
+ }
86
+ }
87
+ ' "$topic" "$not_in_next" "$not_in_master"
88
+ exit 1
89
+ fi
90
+
91
+ exit 0
92
+
93
+ ################################################################
94
+
95
+ This sample hook safeguards topic branches that have been
96
+ published from being rewound.
97
+
98
+ The workflow assumed here is:
99
+
100
+ * Once a topic branch forks from "master", "master" is never
101
+ merged into it again (either directly or indirectly).
102
+
103
+ * Once a topic branch is fully cooked and merged into "master",
104
+ it is deleted. If you need to build on top of it to correct
105
+ earlier mistakes, a new topic branch is created by forking at
106
+ the tip of the "master". This is not strictly necessary, but
107
+ it makes it easier to keep your history simple.
108
+
109
+ * Whenever you need to test or publish your changes to topic
110
+ branches, merge them into "next" branch.
111
+
112
+ The script, being an example, hardcodes the publish branch name
113
+ to be "next", but it is trivial to make it configurable via
114
+ $GIT_DIR/config mechanism.
115
+
116
+ With this workflow, you would want to know:
117
+
118
+ (1) ... if a topic branch has ever been merged to "next". Young
119
+ topic branches can have stupid mistakes you would rather
120
+ clean up before publishing, and things that have not been
121
+ merged into other branches can be easily rebased without
122
+ affecting other people. But once it is published, you would
123
+ not want to rewind it.
124
+
125
+ (2) ... if a topic branch has been fully merged to "master".
126
+ Then you can delete it. More importantly, you should not
127
+ build on top of it -- other people may already want to
128
+ change things related to the topic as patches against your
129
+ "master", so if you need further changes, it is better to
130
+ fork the topic (perhaps with the same name) afresh from the
131
+ tip of "master".
132
+
133
+ Let's look at this example:
134
+
135
+ o---o---o---o---o---o---o---o---o---o "next"
136
+ / / / /
137
+ / a---a---b A / /
138
+ / / / /
139
+ / / c---c---c---c B /
140
+ / / / \ /
141
+ / / / b---b C \ /
142
+ / / / / \ /
143
+ ---o---o---o---o---o---o---o---o---o---o---o "master"
144
+
145
+
146
+ A, B and C are topic branches.
147
+
148
+ * A has one fix since it was merged up to "next".
149
+
150
+ * B has finished. It has been fully merged up to "master" and "next",
151
+ and is ready to be deleted.
152
+
153
+ * C has not merged to "next" at all.
154
+
155
+ We would want to allow C to be rebased, refuse A, and encourage
156
+ B to be deleted.
157
+
158
+ To compute (1):
159
+
160
+ git rev-list ^master ^topic next
161
+ git rev-list ^master next
162
+
163
+ if these match, topic has not merged in next at all.
164
+
165
+ To compute (2):
166
+
167
+ git rev-list master..topic
168
+
169
+ if this is empty, it is fully merged to "master".
@@ -0,0 +1,36 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to prepare the commit log message.
4
+ # Called by "git commit" with the name of the file that has the
5
+ # commit message, followed by the description of the commit
6
+ # message's source. The hook's purpose is to edit the commit
7
+ # message file. If the hook fails with a non-zero status,
8
+ # the commit is aborted.
9
+ #
10
+ # To enable this hook, rename this file to "prepare-commit-msg".
11
+
12
+ # This hook includes three examples. The first comments out the
13
+ # "Conflicts:" part of a merge commit.
14
+ #
15
+ # The second includes the output of "git diff --name-status -r"
16
+ # into the message, just before the "git status" output. It is
17
+ # commented because it doesn't cope with --amend or with squashed
18
+ # commits.
19
+ #
20
+ # The third example adds a Signed-off-by line to the message, that can
21
+ # still be edited. This is rarely a good idea.
22
+
23
+ case "$2,$3" in
24
+ merge,)
25
+ /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
26
+
27
+ # ,|template,)
28
+ # /usr/bin/perl -i.bak -pe '
29
+ # print "\n" . `git diff --cached --name-status -r`
30
+ # if /^#/ && $first++ == 0' "$1" ;;
31
+
32
+ *) ;;
33
+ esac
34
+
35
+ # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
36
+ # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
@@ -0,0 +1,128 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to blocks unannotated tags from entering.
4
+ # Called by "git receive-pack" with arguments: refname sha1-old sha1-new
5
+ #
6
+ # To enable this hook, rename this file to "update".
7
+ #
8
+ # Config
9
+ # ------
10
+ # hooks.allowunannotated
11
+ # This boolean sets whether unannotated tags will be allowed into the
12
+ # repository. By default they won't be.
13
+ # hooks.allowdeletetag
14
+ # This boolean sets whether deleting tags will be allowed in the
15
+ # repository. By default they won't be.
16
+ # hooks.allowmodifytag
17
+ # This boolean sets whether a tag may be modified after creation. By default
18
+ # it won't be.
19
+ # hooks.allowdeletebranch
20
+ # This boolean sets whether deleting branches will be allowed in the
21
+ # repository. By default they won't be.
22
+ # hooks.denycreatebranch
23
+ # This boolean sets whether remotely creating branches will be denied
24
+ # in the repository. By default this is allowed.
25
+ #
26
+
27
+ # --- Command line
28
+ refname="$1"
29
+ oldrev="$2"
30
+ newrev="$3"
31
+
32
+ # --- Safety check
33
+ if [ -z "$GIT_DIR" ]; then
34
+ echo "Don't run this script from the command line." >&2
35
+ echo " (if you want, you could supply GIT_DIR then run" >&2
36
+ echo " $0 <ref> <oldrev> <newrev>)" >&2
37
+ exit 1
38
+ fi
39
+
40
+ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
41
+ echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
42
+ exit 1
43
+ fi
44
+
45
+ # --- Config
46
+ allowunannotated=$(git config --bool hooks.allowunannotated)
47
+ allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
48
+ denycreatebranch=$(git config --bool hooks.denycreatebranch)
49
+ allowdeletetag=$(git config --bool hooks.allowdeletetag)
50
+ allowmodifytag=$(git config --bool hooks.allowmodifytag)
51
+
52
+ # check for no description
53
+ projectdesc=$(sed -e '1q' "$GIT_DIR/description")
54
+ case "$projectdesc" in
55
+ "Unnamed repository"* | "")
56
+ echo "*** Project description file hasn't been set" >&2
57
+ exit 1
58
+ ;;
59
+ esac
60
+
61
+ # --- Check types
62
+ # if $newrev is 0000...0000, it's a commit to delete a ref.
63
+ zero="0000000000000000000000000000000000000000"
64
+ if [ "$newrev" = "$zero" ]; then
65
+ newrev_type=delete
66
+ else
67
+ newrev_type=$(git cat-file -t $newrev)
68
+ fi
69
+
70
+ case "$refname","$newrev_type" in
71
+ refs/tags/*,commit)
72
+ # un-annotated tag
73
+ short_refname=${refname##refs/tags/}
74
+ if [ "$allowunannotated" != "true" ]; then
75
+ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
76
+ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
77
+ exit 1
78
+ fi
79
+ ;;
80
+ refs/tags/*,delete)
81
+ # delete tag
82
+ if [ "$allowdeletetag" != "true" ]; then
83
+ echo "*** Deleting a tag is not allowed in this repository" >&2
84
+ exit 1
85
+ fi
86
+ ;;
87
+ refs/tags/*,tag)
88
+ # annotated tag
89
+ if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
90
+ then
91
+ echo "*** Tag '$refname' already exists." >&2
92
+ echo "*** Modifying a tag is not allowed in this repository." >&2
93
+ exit 1
94
+ fi
95
+ ;;
96
+ refs/heads/*,commit)
97
+ # branch
98
+ if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
99
+ echo "*** Creating a branch is not allowed in this repository" >&2
100
+ exit 1
101
+ fi
102
+ ;;
103
+ refs/heads/*,delete)
104
+ # delete branch
105
+ if [ "$allowdeletebranch" != "true" ]; then
106
+ echo "*** Deleting a branch is not allowed in this repository" >&2
107
+ exit 1
108
+ fi
109
+ ;;
110
+ refs/remotes/*,commit)
111
+ # tracking branch
112
+ ;;
113
+ refs/remotes/*,delete)
114
+ # delete tracking branch
115
+ if [ "$allowdeletebranch" != "true" ]; then
116
+ echo "*** Deleting a tracking branch is not allowed in this repository" >&2
117
+ exit 1
118
+ fi
119
+ ;;
120
+ *)
121
+ # Anything else (is there anything else?)
122
+ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
123
+ exit 1
124
+ ;;
125
+ esac
126
+
127
+ # --- Finished
128
+ exit 0
@@ -0,0 +1,6 @@
1
+ # git ls-files --others --exclude-from=.git/info/exclude
2
+ # Lines that start with '#' are comments.
3
+ # For a project mostly in C, the following would be a good set of
4
+ # exclude patterns (uncomment them if you want to use them):
5
+ # *.[oa]
6
+ # *~
@@ -0,0 +1,3 @@
1
+ x��M
2
+ 1 @a�=E��$M۴ �U��� 3#�sO���=xu_�e�E�̡
3
+ �%���X�=��*59f$'�:��,;�擇nJ��Dz��X��F1��#wꕊ7���}�����>On[^�Ĝ�DO��M�mM�;0�5h�h�0_T=
@@ -0,0 +1,3 @@
1
+ x��I
2
+ 1@Q�9E���2�x� �4�� o/� ܼ݇_�����4�, F� �–C�H�qv!�}1�I�ӐueB��fk)T���F*B$!�M1.{����������~pYS�h"�!:2pFFT�5��@�Z����g
3
+ �6�%4@
@@ -0,0 +1,3 @@
1
+ x��M
2
+ �0@a�9���d�7 �U�������Ƿ�n�݃'�<O�So��C�źʕ��� �r�I
3
+ ٨�U�." �9d��s4"d��j�T��0�/j��k�eznp=�\�2�
@@ -0,0 +1,2 @@
1
+ x��A
2
+ �0@Q�9����M���W��L1HI���z7o���j->ƋuU���8-k�HB��$�W��p �y��a��a+��ϓ�FU��!�sJ�Ẅ�ӿ�����i���h2�
@@ -0,0 +1,2 @@
1
+ # pack-refs with: peeled
2
+ 63c0856958172223da3309e653f837a3485be4ae refs/heads/master
@@ -0,0 +1 @@
1
+ 9fd939d7d5a9b9738d50c81213d48e1b4173e2a6
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ module Nwiki
4
+ module Core
5
+ describe GitAccess do
6
+ let(:path) { 'spec/examples/sample.git' }
7
+
8
+ subject { described_class.new(path) }
9
+
10
+ describe '#tree' do
11
+ let(:ref) { '63c0856958172223da3309e653f837a3485be4ae' }
12
+
13
+ it { subject.tree(ref).should have_at_least(1).blob_entries }
14
+ end
15
+ end
16
+ end
17
+ end
File without changes
@@ -0,0 +1,23 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ module Nwiki
5
+ module Core
6
+ describe Wiki do
7
+ let(:path) { 'spec/examples/sample.git' }
8
+ subject { described_class.new(path) }
9
+
10
+ describe '#find' do
11
+ it { subject.find('/foo').should eq Page.new("Foo", "* Foo\n** Bar\n[[icon.png]]\n", Wiki.parser) }
12
+ it { subject.find('/icon.png').should be_kind_of File }
13
+ it { subject.find('/not_exist_page').should be_nil }
14
+ it { subject.find('/1/2/a').should_not be_nil }
15
+ it { subject.find('/日本語ディレクトリ/わたしだ').should_not be_nil }
16
+ end
17
+
18
+ describe '#name' do
19
+ it { subject.name.should eq 'ヽ(´・肉・`)ノログ' }
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,72 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ module Nwiki
5
+ module Frontend
6
+ describe do
7
+ def app
8
+ App.new 'spec/examples/sample.git'
9
+ end
10
+
11
+ subject { last_response }
12
+
13
+ before do
14
+ get path
15
+ end
16
+
17
+ describe 'GET /' do
18
+ let(:path) { '/' }
19
+
20
+ pending do 'not implement yet'
21
+ it { subject.should be_ok }
22
+ it { subject.should match %r!\bfoo\b! }
23
+ it { subject.should match %r!\b1\b! }
24
+ it { subject.should match %r!\b日本語ディレクトリ\b! }
25
+ end
26
+ end
27
+
28
+ describe 'GET /foo' do
29
+ let(:path) { '/foo' }
30
+
31
+ pending do 'not implement yet'
32
+ it { subject.should be_ok }
33
+ it { subject.should match %r!<h2[^>]*>Foo</h2>! }
34
+ it { subject.should match %r!<h3[^>]*>Bar</h3>! }
35
+ end
36
+ end
37
+
38
+ describe 'GET /icon.png' do
39
+ let(:path) { '/icon.png' }
40
+ it { subject.should be_ok }
41
+ it { subject['Content-Type'].should eq 'image/png' }
42
+ end
43
+
44
+ describe 'GET /1/2/' do
45
+ let(:path) { '/1/2/' }
46
+
47
+ pending do 'not implement yet'
48
+ it { subject.should be_ok }
49
+ it { subject.should match %r!\ba\b! }
50
+ it { subject.should match %r!\bb\b! }
51
+ end
52
+ end
53
+
54
+ describe 'GET /日本語ディレクトリ/' do
55
+ let(:path) { URI.encode '/日本語ディレクトリ/' }
56
+
57
+ pending do 'not implement yet'
58
+ it { subject.should be_ok }
59
+ it { subject.should match %r!<h2[^>]*>わたしだ</h2>! }
60
+ end
61
+ end
62
+
63
+ describe 'GET /日本語ディレクトリ/わたしだ' do
64
+ let(:path) { URI.encode '/日本語ディレクトリ/わたしだ' }
65
+
66
+ it { subject.should be_ok }
67
+ it { subject.body.should match %r!<h2[^>]*>お前だったのか</h2>! }
68
+ it { subject.body.should match %r!<h3[^>]*>気づかなかったな</h3>! }
69
+ end
70
+ end
71
+ end
72
+ end
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.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-09 00:00:00.000000000 Z
12
+ date: 2012-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: gollum
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: rack
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -182,6 +198,7 @@ files:
182
198
  - .rspec
183
199
  - .rvmrc
184
200
  - .travis.yml
201
+ - CHANGELOG.org
185
202
  - Gemfile
186
203
  - Guardfile
187
204
  - LICENSE
@@ -189,9 +206,58 @@ files:
189
206
  - Rakefile
190
207
  - config.ru
191
208
  - lib/nwiki.rb
209
+ - lib/nwiki/core.rb
210
+ - lib/nwiki/core/file.rb
211
+ - lib/nwiki/core/git_access.rb
212
+ - lib/nwiki/core/page.rb
213
+ - lib/nwiki/core/wiki.rb
214
+ - lib/nwiki/frontend.rb
215
+ - lib/nwiki/frontend/app.rb
192
216
  - lib/nwiki/version.rb
193
217
  - nwiki.gemspec
194
- - spec/nwiki_spec.rb
218
+ - spec/examples/sample.git/HEAD
219
+ - spec/examples/sample.git/config
220
+ - spec/examples/sample.git/description
221
+ - spec/examples/sample.git/hooks/applypatch-msg.sample
222
+ - spec/examples/sample.git/hooks/commit-msg.sample
223
+ - spec/examples/sample.git/hooks/post-update.sample
224
+ - spec/examples/sample.git/hooks/pre-applypatch.sample
225
+ - spec/examples/sample.git/hooks/pre-commit.sample
226
+ - spec/examples/sample.git/hooks/pre-rebase.sample
227
+ - spec/examples/sample.git/hooks/prepare-commit-msg.sample
228
+ - spec/examples/sample.git/hooks/update.sample
229
+ - spec/examples/sample.git/info/exclude
230
+ - spec/examples/sample.git/objects/0b/8d94516c12f9f9336f93195cc78fc0f7ca316e
231
+ - spec/examples/sample.git/objects/25/7fd54a4036bc29b7319a53af9df1e77e3c9e3c
232
+ - spec/examples/sample.git/objects/2c/fce679f210d9ac21548c2c174d9af6ed66ae25
233
+ - spec/examples/sample.git/objects/2f/18f5f46171d63bda113740164f9f97d9c9cee0
234
+ - spec/examples/sample.git/objects/2f/3d52a79856de3d6b38b3bfaf18a7e84e5a3dbe
235
+ - spec/examples/sample.git/objects/3b/30614194437de460036103ce33e7b1b12c25b6
236
+ - spec/examples/sample.git/objects/57/8028730053311779504e389ded0c685a2f6134
237
+ - spec/examples/sample.git/objects/60/0ce3fa8fcc541c188492030d7f47cf9671f7ce
238
+ - spec/examples/sample.git/objects/63/c0856958172223da3309e653f837a3485be4ae
239
+ - spec/examples/sample.git/objects/64/902b30b243f9e7cc7c9433014739f34642343c
240
+ - spec/examples/sample.git/objects/66/f848f979d79e1d07fa12e9e23723498ee678f8
241
+ - spec/examples/sample.git/objects/7c/9c4f980b20d8b37a476a0d13862405fcbbb9db
242
+ - spec/examples/sample.git/objects/84/72b6b70b769892c5d39e4d0807679660678e3d
243
+ - spec/examples/sample.git/objects/8b/75d97ef05f8dc0ff86326f83b766466884076e
244
+ - spec/examples/sample.git/objects/90/b6e9f5bf06f174327f1ff8645292862954c363
245
+ - spec/examples/sample.git/objects/9f/d939d7d5a9b9738d50c81213d48e1b4173e2a6
246
+ - spec/examples/sample.git/objects/a3/56ee376c1569a36681f19442fd55bbe1c1d4c0
247
+ - spec/examples/sample.git/objects/a8/94ffa49546349f0dc70894b80d6aeac4f47937
248
+ - spec/examples/sample.git/objects/b8/6e2b77757908eb37db93a7b2524ff54255e55c
249
+ - spec/examples/sample.git/objects/bb/82177f6e647b275a0912d1861555083f1fc1b5
250
+ - spec/examples/sample.git/objects/cc/a250bd0689cb01d5e935c0b9f14ef3b9635ea7
251
+ - spec/examples/sample.git/objects/d8/e8ac8bf96ad29200dcadb1e101a03dd2c9c725
252
+ - spec/examples/sample.git/objects/ee/c463232a970260cedf6085ccd5453fbaa22201
253
+ - spec/examples/sample.git/objects/f9/5a864ef14341f731efd55d6b031e8f328aebb5
254
+ - spec/examples/sample.git/objects/ff/08398bc95c9497ab03e8e59b57a01e686c299a
255
+ - spec/examples/sample.git/packed-refs
256
+ - spec/examples/sample.git/refs/heads/master
257
+ - spec/nwiki/core/git_access_spec.rb
258
+ - spec/nwiki/core/page_spec.rb
259
+ - spec/nwiki/core/wiki_spec.rb
260
+ - spec/requests/articles_spec.rb
195
261
  - spec/spec_helper.rb
196
262
  homepage: ''
197
263
  licenses: []
@@ -205,12 +271,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
271
  - - ! '>='
206
272
  - !ruby/object:Gem::Version
207
273
  version: '0'
274
+ segments:
275
+ - 0
276
+ hash: -191900216460912049
208
277
  required_rubygems_version: !ruby/object:Gem::Requirement
209
278
  none: false
210
279
  requirements:
211
280
  - - ! '>='
212
281
  - !ruby/object:Gem::Version
213
282
  version: '0'
283
+ segments:
284
+ - 0
285
+ hash: -191900216460912049
214
286
  requirements: []
215
287
  rubyforge_project:
216
288
  rubygems_version: 1.8.23
@@ -218,5 +290,47 @@ signing_key:
218
290
  specification_version: 3
219
291
  summary: Write a gem summary
220
292
  test_files:
221
- - spec/nwiki_spec.rb
293
+ - spec/examples/sample.git/HEAD
294
+ - spec/examples/sample.git/config
295
+ - spec/examples/sample.git/description
296
+ - spec/examples/sample.git/hooks/applypatch-msg.sample
297
+ - spec/examples/sample.git/hooks/commit-msg.sample
298
+ - spec/examples/sample.git/hooks/post-update.sample
299
+ - spec/examples/sample.git/hooks/pre-applypatch.sample
300
+ - spec/examples/sample.git/hooks/pre-commit.sample
301
+ - spec/examples/sample.git/hooks/pre-rebase.sample
302
+ - spec/examples/sample.git/hooks/prepare-commit-msg.sample
303
+ - spec/examples/sample.git/hooks/update.sample
304
+ - spec/examples/sample.git/info/exclude
305
+ - spec/examples/sample.git/objects/0b/8d94516c12f9f9336f93195cc78fc0f7ca316e
306
+ - spec/examples/sample.git/objects/25/7fd54a4036bc29b7319a53af9df1e77e3c9e3c
307
+ - spec/examples/sample.git/objects/2c/fce679f210d9ac21548c2c174d9af6ed66ae25
308
+ - spec/examples/sample.git/objects/2f/18f5f46171d63bda113740164f9f97d9c9cee0
309
+ - spec/examples/sample.git/objects/2f/3d52a79856de3d6b38b3bfaf18a7e84e5a3dbe
310
+ - spec/examples/sample.git/objects/3b/30614194437de460036103ce33e7b1b12c25b6
311
+ - spec/examples/sample.git/objects/57/8028730053311779504e389ded0c685a2f6134
312
+ - spec/examples/sample.git/objects/60/0ce3fa8fcc541c188492030d7f47cf9671f7ce
313
+ - spec/examples/sample.git/objects/63/c0856958172223da3309e653f837a3485be4ae
314
+ - spec/examples/sample.git/objects/64/902b30b243f9e7cc7c9433014739f34642343c
315
+ - spec/examples/sample.git/objects/66/f848f979d79e1d07fa12e9e23723498ee678f8
316
+ - spec/examples/sample.git/objects/7c/9c4f980b20d8b37a476a0d13862405fcbbb9db
317
+ - spec/examples/sample.git/objects/84/72b6b70b769892c5d39e4d0807679660678e3d
318
+ - spec/examples/sample.git/objects/8b/75d97ef05f8dc0ff86326f83b766466884076e
319
+ - spec/examples/sample.git/objects/90/b6e9f5bf06f174327f1ff8645292862954c363
320
+ - spec/examples/sample.git/objects/9f/d939d7d5a9b9738d50c81213d48e1b4173e2a6
321
+ - spec/examples/sample.git/objects/a3/56ee376c1569a36681f19442fd55bbe1c1d4c0
322
+ - spec/examples/sample.git/objects/a8/94ffa49546349f0dc70894b80d6aeac4f47937
323
+ - spec/examples/sample.git/objects/b8/6e2b77757908eb37db93a7b2524ff54255e55c
324
+ - spec/examples/sample.git/objects/bb/82177f6e647b275a0912d1861555083f1fc1b5
325
+ - spec/examples/sample.git/objects/cc/a250bd0689cb01d5e935c0b9f14ef3b9635ea7
326
+ - spec/examples/sample.git/objects/d8/e8ac8bf96ad29200dcadb1e101a03dd2c9c725
327
+ - spec/examples/sample.git/objects/ee/c463232a970260cedf6085ccd5453fbaa22201
328
+ - spec/examples/sample.git/objects/f9/5a864ef14341f731efd55d6b031e8f328aebb5
329
+ - spec/examples/sample.git/objects/ff/08398bc95c9497ab03e8e59b57a01e686c299a
330
+ - spec/examples/sample.git/packed-refs
331
+ - spec/examples/sample.git/refs/heads/master
332
+ - spec/nwiki/core/git_access_spec.rb
333
+ - spec/nwiki/core/page_spec.rb
334
+ - spec/nwiki/core/wiki_spec.rb
335
+ - spec/requests/articles_spec.rb
222
336
  - spec/spec_helper.rb
data/spec/nwiki_spec.rb DELETED
@@ -1,5 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Nwiki do
4
- it{ fail 'not implement yet.' }
5
- end