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 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 worrry, gitdocs makes this easy. In the event of a conflict, **all the different versions
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?
@@ -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.6'
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'
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Gitdocs
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -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
+ &#8618; Back to parent
4
+ - else
5
+ %a{ :href => "/", :class => "parent" }
6
+ &#8618; 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)
@@ -15,7 +15,7 @@
15
15
  %a{:href => '/'}
16
16
  %img{ :src => "/img/git_logo.png", :width => 30, :height => 30}
17
17
  Gitdocs
18
- =Gitdocs::VERSION
18
+ = Gitdocs::VERSION
19
19
  .container
20
20
  = preserve(yield)
21
21
 
@@ -1,14 +1,6 @@
1
1
  %h1= root
2
2
 
3
- - if parent
4
- %a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" }
5
- &#8618; Back to parent
6
- - else
7
- %a{ :href => "/", :class => "parent" }
8
- &#8618; 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|
@@ -1,17 +1,6 @@
1
1
  %h1= root
2
2
 
3
- - if parent
4
- %a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" }
5
- &#8618; Back to parent
6
- - else
7
- %a{ :href => "/", :class => "parent" }
8
- &#8618; 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
- <script src="/js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
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
 
@@ -1,17 +1,6 @@
1
1
  %h1= root
2
2
 
3
- - if parent
4
- %a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" }
5
- &#8618; Back to parent
6
- - else
7
- %a{ :href => "/", :class => "parent" }
8
- &#8618; 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
@@ -30,6 +30,7 @@
30
30
  %option{:value => remote, :selected => remote == "#{share.remote_name}/#{share.branch_name}" ? 'selected' : nil}
31
31
  =remote
32
32
  -else
33
+
33
34
  %dl
34
35
  %dt Remote
35
36
  %dd
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gitdocs
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.4
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.6
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