gitdocs 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -7
- data/gitdocs.gemspec +1 -1
- data/lib/gitdocs/server.rb +1 -1
- data/lib/gitdocs/version.rb +1 -1
- data/lib/gitdocs/views/_ace_scripts.erb +8 -0
- data/lib/gitdocs/views/_header.haml +13 -0
- data/lib/gitdocs/views/app.haml +1 -1
- data/lib/gitdocs/views/dir.haml +1 -9
- data/lib/gitdocs/views/edit.haml +2 -21
- data/lib/gitdocs/views/file.haml +1 -12
- data/lib/gitdocs/views/settings.haml +1 -0
- metadata +4 -2
data/README.md
CHANGED
@@ -100,31 +100,40 @@ gitdocs stop
|
|
100
100
|
gitdocs restart
|
101
101
|
```
|
102
102
|
|
103
|
-
### Exploring Gitdocs
|
104
|
-
|
105
103
|
For an overview of gitdocs current status, run:
|
106
104
|
|
107
105
|
```
|
108
106
|
gitdocs status
|
109
107
|
```
|
110
|
-
|
111
|
-
To explore the repos in your browser, simply visit `http://localhost:8888` for access to all your docs within the browser.
|
112
|
-
|
113
108
|
### Conflict Resolution
|
114
109
|
|
115
110
|
Proper conflict resolution is an important part of any good doc and file collaboration tool.
|
116
111
|
In most cases, git does a good job of handling file merges for you. Still, what about cases where the conflict cannot be
|
117
112
|
resolved automatically?
|
118
113
|
|
119
|
-
Don't
|
114
|
+
Don't worry, gitdocs makes handling this simple. In the event of a conflict, **all the different versions
|
120
115
|
of a document are stored** in the repo tagged with the **git sha** for the commit for each variation. The members
|
121
116
|
of the repo can then compare all versions and resolve the conflict.
|
122
117
|
|
118
|
+
### Web Front-end
|
119
|
+
|
120
|
+
Gitdocs come with a handy web front-end that is available. This browser front-end supports the following features:
|
121
|
+
|
122
|
+
* Explore all repos and directories
|
123
|
+
* View source files in your repos with smart syntax highlighting (ruby, python, js, etc)
|
124
|
+
* View text files in your repos with smart formatting (markdown, textile)
|
125
|
+
* View any file in your repos that can be embedded in the browser
|
126
|
+
* Edit and update text files with rich text editor (ace editor)
|
127
|
+
* Upload or create new files in your repos
|
128
|
+
* Manage path settings and other configuration options
|
129
|
+
|
130
|
+
To check out the front-end, simply visit `http://localhost:8888` whenever gitdocs is running. Yes, we know
|
131
|
+
this currently looks (design-wise) like hot garbage. We will get to the aesthetics but patches and help welcome.
|
132
|
+
|
123
133
|
## Planned Features
|
124
134
|
|
125
135
|
Gitdocs is a young project but we have big plans for it including:
|
126
136
|
|
127
|
-
- A web front-end UI for file uploading and editing of files (with rich text editor and syntax highlighting)
|
128
137
|
- Local-area peer-to-peer syncing, avoid 'polling' in cases where we can using a messaging protocol.
|
129
138
|
- Click-to-share instant access granting file access to users using a local tunnel or other means.
|
130
139
|
- Support for linux and windows platforms (coming soon), and maybe android and iOS as well?
|
data/gitdocs.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
s.add_dependency 'rb-fsevent', '~> 0.4.3.1'
|
22
22
|
s.add_dependency 'thin'
|
23
|
-
s.add_dependency 'renee', '~> 0.3.
|
23
|
+
s.add_dependency 'renee', '~> 0.3.7'
|
24
24
|
s.add_dependency 'redcarpet'
|
25
25
|
s.add_dependency 'thor'
|
26
26
|
s.add_dependency 'coderay'
|
data/lib/gitdocs/server.rb
CHANGED
@@ -47,7 +47,7 @@ module Gitdocs
|
|
47
47
|
parent = nil if parent == '.'
|
48
48
|
locals = {:idx => idx, :parent => parent, :root => gd.root, :file_path => expanded_path}
|
49
49
|
mode, mime = request.params['mode'], `file -I #{ShellTools.escape(expanded_path)}`.strip
|
50
|
-
puts "mode, mime: #{mode.inspect}, #{mime.inspect}"
|
50
|
+
# puts "mode, mime: #{mode.inspect}, #{mime.inspect}"
|
51
51
|
if mode == 'save' # Saving
|
52
52
|
File.open(expanded_path, 'w') { |f| f.print request.params['data'] }
|
53
53
|
redirect! "/" + idx.to_s + file_path
|
data/lib/gitdocs/version.rb
CHANGED
@@ -0,0 +1,8 @@
|
|
1
|
+
<script src="/js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
|
2
|
+
<script src="/js/ace/theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script>
|
3
|
+
<script src="/js/ace/mode-css.js" type="text/javascript" charset="utf-8"></script>
|
4
|
+
<script src="/js/ace/mode-html.js" type="text/javascript" charset="utf-8"></script>
|
5
|
+
<script src="/js/ace/mode-markdown.js" type="text/javascript" charset="utf-8"></script>
|
6
|
+
<script src="/js/ace/mode-javascript.js" type="text/javascript" charset="utf-8"></script>
|
7
|
+
<script src="/js/ace/mode-ruby.js" type="text/javascript" charset="utf-8"></script>
|
8
|
+
<script src="/js/edit.js" type="text/javascript" charset="utf-8"></script>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
- if parent
|
2
|
+
%a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" }
|
3
|
+
↪ Back to parent
|
4
|
+
- else
|
5
|
+
%a{ :href => "/", :class => "parent" }
|
6
|
+
↪ Back to selection
|
7
|
+
|
8
|
+
%h2
|
9
|
+
%span.path= request.path_info.empty? ? '/' : request.path_info
|
10
|
+
- if file
|
11
|
+
%a{ :href => "?mode=raw" } (raw)
|
12
|
+
%a{ :href => "?mode=edit" } (edit)
|
13
|
+
%a{ :href => "?mode=delete", :onclick => "javascript:return confirm('Are you sure?')" } (delete)
|
data/lib/gitdocs/views/app.haml
CHANGED
data/lib/gitdocs/views/dir.haml
CHANGED
@@ -1,14 +1,6 @@
|
|
1
1
|
%h1= root
|
2
2
|
|
3
|
-
|
4
|
-
%a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" }
|
5
|
-
↪ Back to parent
|
6
|
-
- else
|
7
|
-
%a{ :href => "/", :class => "parent" }
|
8
|
-
↪ Back to selection
|
9
|
-
|
10
|
-
%h2
|
11
|
-
%span.path= request.path_info.empty? ? '/' : request.path_info
|
3
|
+
= partial("header", :locals => { :parent => parent, :file => false, :idx => idx })
|
12
4
|
|
13
5
|
%table
|
14
6
|
-contents.each_with_index do |f, i|
|
data/lib/gitdocs/views/edit.haml
CHANGED
@@ -1,17 +1,6 @@
|
|
1
1
|
%h1= root
|
2
2
|
|
3
|
-
|
4
|
-
%a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" }
|
5
|
-
↪ Back to parent
|
6
|
-
- else
|
7
|
-
%a{ :href => "/", :class => "parent" }
|
8
|
-
↪ Back to selection
|
9
|
-
|
10
|
-
%h2
|
11
|
-
%span.path= request.path_info.empty? ? '/' : request.path_info
|
12
|
-
%a{ :href => "?mode=raw" } (raw)
|
13
|
-
%a{ :href => "?mode=edit" } (edit)
|
14
|
-
%a{ :href => "?mode=delete", :onclick => "javascript:return confirm('Are you sure?')" } (delete)
|
3
|
+
= partial("header", :locals => { :parent => parent, :file => true, :idx => idx })
|
15
4
|
|
16
5
|
%form{ :class => "edit", :action => "/#{idx}#{request.path_info}?mode=save", :method => "post", :style => "display:none;" }
|
17
6
|
#editor
|
@@ -20,13 +9,5 @@
|
|
20
9
|
%a{ :href => "/#{idx}#{request.path_info}" } Cancel
|
21
10
|
%input{ :type => 'hidden', :class => 'filename', :value => request.path_info }
|
22
11
|
|
23
|
-
|
24
|
-
<script src="/js/ace/theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script>
|
25
|
-
<script src="/js/ace/mode-css.js" type="text/javascript" charset="utf-8"></script>
|
26
|
-
<script src="/js/ace/mode-html.js" type="text/javascript" charset="utf-8"></script>
|
27
|
-
<script src="/js/ace/mode-markdown.js" type="text/javascript" charset="utf-8"></script>
|
28
|
-
<script src="/js/ace/mode-javascript.js" type="text/javascript" charset="utf-8"></script>
|
29
|
-
<script src="/js/ace/mode-ruby.js" type="text/javascript" charset="utf-8"></script>
|
30
|
-
<script src="/js/edit.js" type="text/javascript" charset="utf-8"></script>
|
31
|
-
|
12
|
+
= partial("ace_scripts")
|
32
13
|
|
data/lib/gitdocs/views/file.haml
CHANGED
@@ -1,17 +1,6 @@
|
|
1
1
|
%h1= root
|
2
2
|
|
3
|
-
|
4
|
-
%a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" }
|
5
|
-
↪ Back to parent
|
6
|
-
- else
|
7
|
-
%a{ :href => "/", :class => "parent" }
|
8
|
-
↪ Back to selection
|
9
|
-
|
10
|
-
%h2
|
11
|
-
%span.path= request.path_info.empty? ? '/' : request.path_info
|
12
|
-
%a{ :href => "?mode=raw" } (raw)
|
13
|
-
%a{ :href => "?mode=edit" } (edit)
|
14
|
-
%a{ :href => "?mode=delete", :onclick => "javascript:return confirm('Are you sure?')" } (delete)
|
3
|
+
= partial("header", :locals => { :parent => parent, :file => true, :idx => idx })
|
15
4
|
|
16
5
|
.contents
|
17
6
|
= preserve contents
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gitdocs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Josh Hull
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.3.
|
47
|
+
version: 0.3.7
|
48
48
|
type: :runtime
|
49
49
|
version_requirements: *id003
|
50
50
|
- !ruby/object:Gem::Dependency
|
@@ -279,6 +279,8 @@ files:
|
|
279
279
|
- lib/gitdocs/runner.rb
|
280
280
|
- lib/gitdocs/server.rb
|
281
281
|
- lib/gitdocs/version.rb
|
282
|
+
- lib/gitdocs/views/_ace_scripts.erb
|
283
|
+
- lib/gitdocs/views/_header.haml
|
282
284
|
- lib/gitdocs/views/app.haml
|
283
285
|
- lib/gitdocs/views/dir.haml
|
284
286
|
- lib/gitdocs/views/edit.haml
|