docushin 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 (34) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -1
  3. data/app/controllers/docushin/application_controller.rb +19 -0
  4. data/app/controllers/docushin/collections_controller.rb +42 -0
  5. data/app/controllers/docushin/home_controller.rb +12 -0
  6. data/app/controllers/docushin/routes_controller.rb +17 -30
  7. data/app/helpers/docushin/application_helper.rb +3 -0
  8. data/app/views/docushin/collections/create.html.erb +1 -0
  9. data/app/views/docushin/collections/index.html.erb +23 -0
  10. data/app/views/docushin/collections/new.html.erb +52 -0
  11. data/app/views/docushin/home/index.html.erb +25 -0
  12. data/app/views/docushin/routes/_form.html.erb +87 -21
  13. data/app/views/docushin/routes/index.html.erb +8 -8
  14. data/app/views/docushin/routes/show.html.erb +6 -5
  15. data/app/views/layouts/docushin.html.erb +113 -82
  16. data/config/routes.rb +3 -1
  17. data/docushin.gemspec +3 -1
  18. data/lib/docushin.rb +9 -0
  19. data/lib/docushin/route.rb +52 -11
  20. data/lib/docushin/route_set.rb +18 -8
  21. data/lib/docushin/version.rb +1 -1
  22. data/spec/docushin/route_set_spec.rb +2 -2
  23. data/spec/docushin/route_spec.rb +22 -9
  24. data/spec/dummy/config/routes.rb +1 -1
  25. data/spec/dummy/doc/docushin/collections.yml +7 -0
  26. data/spec/dummy/doc/docushin/fff1454d69c4340014bef52217525fed.md +5 -0
  27. data/spec/requests/collections_spec.rb +11 -0
  28. data/spec/requests/home_spec.rb +8 -0
  29. data/spec/requests/requests_helper.rb +1 -0
  30. data/spec/requests/routes_spec.rb +7 -0
  31. data/spec/spec_helper.rb +3 -1
  32. metadata +61 -34
  33. data/spec/dummy/log/development.log +0 -0
  34. data/spec/dummy/log/test.log +0 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ff44f887590f3c84d28dc2956398a3a647b861ce
4
+ data.tar.gz: 1f3bb7880b63f6989f74d89bbfc46c07ce8edbcb
5
+ SHA512:
6
+ metadata.gz: cdc378fb7c22a1e920e793f51ac1e861a5414aef39446b688378b97f7cb1567fe8c9620633315d1c4ceb8cf3c3a887bf22b60271951acc9c77e9bf6201816a10
7
+ data.tar.gz: abe028ef7c8e8412e0733c04de4600476611205bf0311448f0390a84a2841262706f84eaa984d3007191ee34dc65577336faf41865676876488192a8bd7891ea
data/.gitignore CHANGED
@@ -1,5 +1,8 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.log
4
+ .\#*
5
+ \#*\#
3
6
  .bundle
4
7
  .config
5
8
  .yardoc
@@ -8,10 +11,11 @@ Gemfile.lock
8
11
  InstalledFiles
9
12
  _yardoc
10
13
  coverage
11
- doc/
12
14
  lib/bundler/man
13
15
  pkg
14
16
  rdoc
17
+ spec/dummy/log/test.log
18
+ spec/dummy/log/development.log
15
19
  spec/reports
16
20
  test/tmp
17
21
  test/version_tmp
@@ -0,0 +1,19 @@
1
+ module Docushin
2
+ class ApplicationController < ActionController::Base
3
+ layout "docushin"
4
+
5
+ private
6
+ def authorize!
7
+ render :text => "Unauthorized" unless Rails.env.development?
8
+ return false
9
+ end
10
+
11
+ def load_route_set
12
+ @route_set = Docushin::RouteSet.new
13
+ end
14
+
15
+ def set_default_base_path
16
+ File.join(Rails.root, 'doc', 'docushin')
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,42 @@
1
+ module Docushin
2
+ class CollectionsController < Docushin::ApplicationController
3
+ before_filter :authorize!, :only => [:edit, :update, :destroy]
4
+ before_filter :set_default_base_path, :load_route_set
5
+
6
+ def index
7
+ @content = YAML.load_documents(File.open(File.join(Rails.root, "doc", "docushin", "collections.yml"))) rescue nil
8
+ @collections = @content.nil? ? [] : @content
9
+ end
10
+
11
+ def show
12
+ end
13
+
14
+ def new
15
+ end
16
+
17
+ def edit
18
+ end
19
+
20
+ def destroy
21
+ @content = YAML.load_documents(File.open(File.join(Rails.root, "doc", "docushin", "collections.yml"))) rescue nil
22
+ @content.reject! {|obj| obj[:id] == params[:id]}
23
+ File.open(File.join(set_default_base_path,"collections.yml"), "w") do |file|
24
+ @content.each do|item|
25
+ file.write item.to_yaml
26
+ end
27
+ file.close
28
+ end
29
+ redirect_to collections_path
30
+ end
31
+
32
+ def create
33
+ params[:title] = params[:title].blank? ? "Default Title" : params[:title]
34
+ @data = {:id => Digest::MD5.hexdigest(DateTime.now.to_s), :title => params[:title], :route_set_ids => params[:route_set_ids] }
35
+ FileUtils.mkdir_p(set_default_base_path) unless File.exists?(set_default_base_path)
36
+ File.open(File.join(set_default_base_path,"collections.yml"), "a+") do |file|
37
+ file.write @data.to_yaml
38
+ file.close
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,12 @@
1
+ module Docushin
2
+ class HomeController < Docushin::ApplicationController
3
+ before_filter :load_route_set
4
+
5
+ def index
6
+ @routes = Dir["#{File.join(Rails.root, "doc/docushin")}/*.md"].collect do |file|
7
+ @route_set.find(File.basename(file, ".md"))
8
+ end
9
+ @routes = @routes.compact.sort_by(&:updated_at).reverse.take(10)
10
+ end
11
+ end
12
+ end
@@ -1,36 +1,23 @@
1
- class Docushin::RoutesController < ActionController::Base
2
- layout 'docushin'
3
- before_filter :load_route_set
1
+ module Docushin
2
+ class RoutesController < Docushin::ApplicationController
3
+ before_filter :load_route_set
4
+ before_filter :authorize!, :only => [:edit, :update]
4
5
 
5
- def index
6
- end
7
-
8
- def show
9
- @route = @routes_collection.find_by_filename_hash(params[:id])
10
- end
11
-
12
- def edit
13
- @route = @routes_collection.find_by_filename_hash(params[:id])
14
- end
6
+ def index
7
+ end
15
8
 
16
- def update
17
- @route = @routes_collection.find_by_filename_hash(params[:id])
18
- #create the directory if it doesnt exists
19
- FileUtils.mkdir_p(@path) unless File.exists?(@path)
9
+ def show
10
+ @route = @route_set.find(params[:id])
11
+ end
20
12
 
21
- File.open(File.join(@path, @route.file_name) + ".md", "w+") do |file|
22
- file.write "---\n"
23
- file.write "description: " + params[:route][:description] + "\n"
24
- file.write "---\n"
25
- file.write params[:route][:content]
26
- file.close
13
+ def edit
14
+ @route = @route_set.find(params[:id])
27
15
  end
28
- redirect_to routes_path
29
- end
30
16
 
31
- private
32
- def load_route_set
33
- @routes_collection = Docushin::RouteSet.new
34
- @path = File.join(Rails.root, 'doc', 'docushin')
17
+ def update
18
+ @route = @route_set.find(params[:id])
19
+ @route.update_attributes(params[:route])
20
+ redirect_to routes_path
21
+ end
35
22
  end
36
- end
23
+ end
@@ -6,5 +6,8 @@ module Docushin
6
6
  def file_exists?(verb, path)
7
7
  File.exists?(File.join(Rails.root, 'doc', 'docushin', generate_name(verb, path)) + '.md')
8
8
  end
9
+ def is_in_dev?
10
+ Rails.env.development?
11
+ end
9
12
  end
10
13
  end
@@ -0,0 +1 @@
1
+ Awesome
@@ -0,0 +1,23 @@
1
+ <% if @collections.empty? %>
2
+ <h2> You haven't created collections yet. </h2>
3
+ <% else %>
4
+ <% @collections.each do |collection| %>
5
+ <table>
6
+ <tr><th><%= collection[:title]%> <span><%= link_to("x", collection_path(collection[:id]), :method => :delete) %></span></th></tr>
7
+ <% collection[:route_set_ids].each do |item| %>
8
+ <tr>
9
+ <p>
10
+ <% route = @route_set.find(item) %>
11
+ <% if route.saved? %>
12
+ <td><%= link_to "#{route.description}", route_path(item), :title => "#{route.verb} #{route.path}" %></td>
13
+ <% else %>
14
+ <td><%= link_to "Add description to #{route.path}", route_path(item) %></td>
15
+ <% end %>
16
+ </p>
17
+ </tr>
18
+ <% end %>
19
+ </table>
20
+ <% end %>
21
+ <% end %>
22
+
23
+ <%= link_to "Create a new Collection", new_collection_path%>
@@ -0,0 +1,52 @@
1
+ <script type="text/javascript">
2
+ $(document).ready(function() {
3
+ $("ul.droptrue").sortable({
4
+ connectWith: "ul"
5
+ });
6
+ $("#sortable, #sortable_container").disableSelection();
7
+ return $("#create_collection").submit(function(e) {
8
+ e.preventDefault();
9
+ var routeSetIds = new Array();
10
+ $.each($("#sortable_container li"), function(key, item) {
11
+ return routeSetIds.push($(item).attr("id"));
12
+ });
13
+ return $.post($(this).attr("action"), {
14
+ route_set_ids: routeSetIds,
15
+ title: $("#title").val()
16
+ }, function(data) {
17
+ return window.location.replace(window.location.href.replace("/new", ""));
18
+ });
19
+ });
20
+ });
21
+ </script>
22
+ <h2>Create a new collection</h2>
23
+ <%= form_tag collections_path, :id => "create_collection" do %>
24
+ <table>
25
+ <tr>
26
+ <td>
27
+ Title:
28
+ </td>
29
+ <td>
30
+ <%= text_field_tag :title %>
31
+ </td>
32
+ </tr>
33
+ <tr>
34
+ <td colspan="2">
35
+ <ul id="sortable" class="droptrue">
36
+ <% @route_set.routes.each do |route| %>
37
+ <li class="ui-state-highlight" id="<%= route.id %>">
38
+ <span class="label"><%= route.verb %></span> <%= link_to route.path, route_path(:id => generate_name(route.verb, route.path)) %>
39
+ </li>
40
+ <% end %>
41
+ </ul>
42
+ <ul id="sortable_container" class="droptrue container">
43
+ </ul>
44
+ </td>
45
+ <td>
46
+ </td>
47
+ </tr>
48
+ </table>
49
+ <div class="actions">
50
+ <%= submit_tag %>
51
+ </div>
52
+ <% end %>
@@ -0,0 +1,25 @@
1
+ <% unless @routes.empty? %>
2
+ <div>
3
+ <h3>Recent updates</h3>
4
+ <table>
5
+ <thead>
6
+ <tr>
7
+ <th>Resource</th>
8
+ <th>Updated at</th>
9
+ </tr>
10
+ </thead>
11
+ <tbody>
12
+ <% @routes.each do |item|%>
13
+ <tr>
14
+ <td>
15
+ <%= link_to item.verb + " " + item.path, route_path(:id => generate_name(item.verb, item.path)) %>
16
+ </td>
17
+ <td>
18
+ <%= time_ago_in_words(Time.at(item.updated_at))%> ago
19
+ </td>
20
+ </tr>
21
+ <% end %>
22
+ </tbody>
23
+ </table>
24
+ </div>
25
+ <% end %>
@@ -1,24 +1,90 @@
1
1
  <h3 id="title"><%= @route.verb + " " + @route.path %></h3>
2
2
  <%= form_for(@route) do |f| %>
3
- <table>
4
- <tr>
5
- <td>
6
- <%= f.label :description %>
7
- </td>
8
- <td>
9
- <%= f.text_field :description %>
10
- </td>
11
- </tr>
12
- <tr>
13
- <td>
14
- <%= f.label :content %>
15
- </td>
16
- <td>
17
- <%= f.text_area(:content, :cols => 50, :rows => 20) %>
18
- </td>
19
- </tr>
20
- </table>
21
- <div class="actions">
22
- <%= f.submit %>
23
- </div>
3
+ <table>
4
+ <tr>
5
+ <td>
6
+ <%= f.label :description %>
7
+ </td>
8
+ <td>
9
+ <%= f.text_field :description %>
10
+ </td>
11
+ </tr>
12
+ <tr>
13
+ <td>
14
+ <%= f.label :content %>
15
+ </td>
16
+ <td>
17
+ <%= f.text_area(:content, :cols => 50, :rows => 20) %>
18
+ </td>
19
+ </tr>
20
+ <tr>
21
+ <td>
22
+ </td>
23
+ <td>
24
+
25
+ Docushin parses documents with GitHub Flavored Markdown. Scroll down to read the documentation.
26
+ </td>
27
+ </tr>
28
+ </table>
29
+ <div class="actions">
30
+ <%= f.submit %>
31
+ </div>
24
32
  <% end %>
33
+ <div class="content">
34
+ <h2>Markdown Cheat Sheet</h2>
35
+
36
+ <div class="cheatsheet-content">
37
+
38
+ <div class="mod">
39
+ <div class="col">
40
+ <h3>Format Text</h3>
41
+ <p>Headers</p>
42
+ <pre># This is an &lt;h1&gt; tag
43
+ ## This is an &lt;h2&gt; tag
44
+ ###### This is an &lt;h6&gt; tag</pre>
45
+ <p>Text styles</p>
46
+ <pre>*This text will be italic*
47
+ _This will also be italic_
48
+ **This text will be bold**
49
+ __This will also be bold__
50
+
51
+ *You **can** combine them*
52
+ </pre>
53
+ </div>
54
+ <div class="col">
55
+ <h3>Lists</h3>
56
+ <p>Unordered</p>
57
+ <pre>* Item 1
58
+ * Item 2
59
+ * Item 2a
60
+ * Item 2b</pre>
61
+ <p>Ordered</p>
62
+ <pre>1. Item 1
63
+ 2. Item 2
64
+ 3. Item 3
65
+ * Item 3a
66
+ * Item 3b</pre>
67
+ </div>
68
+ <div class="col">
69
+ <h3>Miscellaneous</h3>
70
+ <p>Images</p>
71
+ <pre>![GitHub Logo](/images/logo.png)
72
+ Format: ![Alt Text](url)
73
+ </pre>
74
+ <p>Links</p>
75
+ <pre>http://github.com - automatic!
76
+ [GitHub](http://github.com)</pre>
77
+ <p>Blockquotes</p>
78
+ <pre>As Kanye West said:
79
+
80
+ &gt; We're living the future so
81
+ &gt; the present is our past.
82
+ </pre>
83
+ </div>
84
+ </div>
85
+ <div class="rule"></div>
86
+
87
+ </div>
88
+
89
+ </div><p>
90
+ <a href="http://github.github.com/github-flavored-markdown/" class="gfm-help" target="_blank">GitHub Flavored Markdown</a></p>
@@ -1,24 +1,24 @@
1
- <% @routes_collection.routes.group_by{ |r| r.controller }.each do |controller, routes| %>
2
- <h2><%= controller.titleize %></h2>
1
+ <h3>Application Routes</h3>
2
+ <% @route_set.routes.group_by{ |r| r.controller }.each do |controller, routes| %>
3
3
  <table>
4
4
  <thead>
5
5
  <tr>
6
- <th>Resource</th>
6
+ <th><%= controller.titleize.gsub("/", "::") %></th>
7
7
  <th>Description</th>
8
8
  </tr>
9
9
  </thead>
10
- <tbody>
11
- <% routes.each do |route|%>
10
+ <tbody>
11
+ <% routes.each do |route|%>
12
12
  <tr>
13
13
  <td class="resource">
14
- <%= link_to route.verb + " " + route.path, route_path(:id => generate_name(route.verb, route.path)) %>
14
+ <%= link_to "#{route.verb} #{route.path}", route_path(:id => generate_name(route.verb, route.path)) %>
15
15
  </td>
16
16
  <td>
17
17
  <% if file_exists?(route.verb, route.path) %>
18
18
  <%= route.description %>
19
- <%= link_to 'Update', edit_route_path(generate_name(route.verb, route.path))%>
19
+ <%= link_to 'Update', edit_route_path(generate_name(route.verb, route.path)) if is_in_dev?%>
20
20
  <% else %>
21
- <%= link_to 'Create a description', edit_route_path(generate_name(route.verb, route.path))%>
21
+ <%= link_to 'Create a description', edit_route_path(generate_name(route.verb, route.path)) if is_in_dev?%>
22
22
  <% end %>
23
23
  </td>
24
24
  </tr>
@@ -1,7 +1,8 @@
1
1
  <h1 id="title"><%= @route.verb + " " + @route.path %></h1>
2
- <h3>Route url</h3>
3
- <%= File.join(request.protocol, request.host, @route.path) %>
4
- <h3>Description</h3>
2
+ <p><pre class="route-url"><%= File.join(request.protocol, request.host_with_port, @route.path) %></pre></p>
5
3
  <%= @route.description %>
6
- <h3>Content</h3>
7
- <%= @route.content %>
4
+ <div class="markdown"><%= @route.content %></div>
5
+ <%= button_to "Update", edit_route_path(generate_name(@route.verb, @route.path)), :method => :get %>
6
+ <% if @route.updated_at %>
7
+ <h4>This document has been updated at: <%= Time.at(@route.updated_at).strftime('%H:%M:%S, %A %d, %B') %></h4>
8
+ <% end %>
@@ -3,98 +3,129 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <title>Routes</title>
6
+
7
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js"></script>
8
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.js"></script>
9
+ <script src="https://raw.github.com/rails/jquery-ujs/master/src/rails.js"></script>
10
+
11
+ <script src="https://raw.github.com/coreyti/showdown/v0.3.1/src/showdown.js"></script>
12
+ <script src="https://raw.github.com/coreyti/showdown/v0.3.1/src/extensions/github.js"></script>
13
+ <script src="https://raw.github.com/coreyti/showdown/v0.3.1/src/extensions/table.js"></script>
14
+
15
+ <script src="https://raw.github.com/ccampbell/rainbow/1.1.8/js/rainbow.js"></script>
16
+ <script src="https://raw.github.com/ccampbell/rainbow/1.1.8/js/language/generic.js"></script>
17
+ <script src="https://raw.github.com/ccampbell/rainbow/1.1.8/js/language/javascript.js"></script>
18
+
19
+ <script>
20
+ $(document).ready(function() {
21
+ var converter = new Showdown.converter({extensions: ["github"] });
22
+ $(".markdown").each(function() {
23
+ console.log(this)
24
+ $(this).html(converter.makeHtml($(this).text()));
25
+ });
26
+ });
27
+ </script>
28
+
6
29
  <style>
7
- body { background-color: #fff; color: #333; margin: 0px; }
30
+ body{background-color:#fff;color:#333;margin:0;}
31
+ body,p,ol,ul,td{font-family:helvetica, verdana, arial, sans-serif;font-size:13px;line-height:18px;}
32
+ ul.droptrue{list-style-type:none;float:left;}
33
+ ul.droptrue.container{min-height:250px;min-width:350px;background:#FFF;border:1px solid gray;}
34
+
35
+ #container{width:960px;padding-top:50px;margin:0 auto;}
36
+ #header-outer{position:fixed;width:100%;top:0;height:40px;z-index:999;-moz-box-shadow:0 1px 3px rgba(0,0,0,0.25),0 -1px 0 rgba(0,0,0,0.1) inset;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25),0 -1px 0 rgba(0,0,0,0.1) inset;box-shadow:0 1px 3px rgba(0,0,0,0.25),0 -1px 0 rgba(0,0,0,0.1) inset;background:#00A0D1 repeat-x 0 0;}
37
+ #header{width:960px;margin:0 auto;}
38
+ #logo{float:left;padding-left:32px;display:block;height:40px;color:#FFF;font-size:150%;font-weight:200;line-height:38px;}
39
+ .label{display:inline-block;font-size:11.844px;font-weight:700;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:2px 4px;}
40
+ .route-url{background:#EAF2F5;display:inline-block;margin-right:8px;font-size:12px;line-height:24px;border-radius:3px;padding:0 5px;}
41
+
42
+ h1{font-size:28px;font-weight:300;line-height:1.1;margin-bottom:.75em;}
43
+ table{width:100%;margin:0 0 3em;}
44
+ tr:hover td,tr:hover td.active{background:#F8F8F8;}
45
+ td{vertical-align:top;background:#FFF;padding:8px 0;}
46
+ th{text-align:left;border-bottom:1px solid #EEE;}
47
+ td.resource{width:60%;}
48
+ pre{background-color:#eee;font-size:11px;white-space:pre-wrap;padding:10px;}
49
+ a{text-decoration:none;color:#0080A6;}
50
+ a:visited{color:#0080A6;}
51
+ a:hover{text-decoration:underline;color:#0080A6;}
52
+ a.logo{color:#FFF;text-decoration:none;}
53
+ li a:hover{background:#0089B3;color:#FFF;text-decoration:none;}
54
+
55
+ #title-nav{margin-bottom:0;margin-top:0;}
56
+ #title-nav li{position:relative;float:left;display:block;line-height:40px;margin-left:20px;padding:0;}
57
+ #title-nav a{display:block;-webkit-font-smoothing:subpixel-antialiased;text-shadow:0 -1px 0 rgba(0,0,0,0.3);outline:none;color:#BFE4EF;padding:0 10px;}
8
58
 
9
- body, p, ol, ul, td {
10
- font-family: helvetica, verdana, arial, sans-serif;
11
- font-size: 13px;
12
- line-height: 18px;
13
- }
14
- #container {
15
- width: 960px;
16
- margin: 0 auto;
17
- padding-top: 50px;
18
- }
19
- #header-outer {
20
- position: fixed;
21
- width: 100%;
22
- top: 0;
23
- height: 40px;
24
- z-index: 999;
25
- -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.25),0 -1px 0 rgba(0,0,0,0.1) inset;
26
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25),0 -1px 0 rgba(0, 0, 0, 0.1) inset;
27
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25),0 -1px 0 rgba(0, 0, 0, 0.1) inset;
28
- background: #00A0D1 repeat-x 0 0;
29
- }
30
- #header {
31
- width: 960px;
32
- margin: 0 auto;
33
- }
34
- #logo {
35
- float: left;
36
- padding-left: 32px;
37
- display: block;
38
- height: 40px;
39
- color: white;
40
- font-size: 150%;
41
- font-weight: 200;
42
- line-height: 38px;
43
- }
44
- h1 {
45
- font-size: 3em;
46
- font-weight: 300;
47
- line-height: 1.1;
48
- margin-bottom: 0.75em;
49
- }
50
- table {
51
- margin: 0 0 3em 0;
52
- width: 100%;
53
- }
54
- tr:hover td, tr:hover td.active {
55
- background: #F8F8F8;
56
- }
57
- td {
58
- padding: 8px 0 8px 0;
59
- vertical-align: top;
60
- background: white;
61
- }
62
- th {
63
- text-align: left;
64
- border-bottom: 1px solid #EEE;
65
- }
66
- td.resource {
67
- width: 320px;
68
- }
69
- pre {
70
- background-color: #eee;
71
- padding: 10px;
72
- font-size: 11px;
73
- white-space: pre-wrap;
74
- }
59
+ .right{float:right;}
60
+ .markdown{padding-top:10px;padding-bottom:10px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13px;line-height:1.6;}
61
+ .markdown>:first-child{margin-top:0!important;}
62
+ .markdown>:last-child{margin-bottom:0!important;}
63
+ .markdown a{color:#4183C4;text-decoration:none;}
64
+ .markdown a:hover{text-decoration:underline;}
65
+ .markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-weight:700;-webkit-font-smoothing:antialiased;margin:20px 0 10px;padding:0;}
66
+ .markdown h1 tt,.markdown h1 code,.markdown h2 tt,.markdown h2 code,.markdown h3 tt,.markdown h3 code,.markdown h4 tt,.markdown h4 code,.markdown h5 tt,.markdown h5 code,.markdown h6 tt,.markdown h6 code{font-size:inherit;}
67
+ .markdown h1{font-size:28px;color:#000;}
68
+ .markdown h2{font-size:24px;border-bottom:1px solid #ccc;color:#000;}
69
+ .markdown h3{font-size:18px;}
70
+ .markdown h4{font-size:16px;}
71
+ .markdown h5{font-size:14px;}
72
+ .markdown h6{color:#777;font-size:14px;}
73
+ .markdown p,.markdown blockquote,.markdown ul,.markdown ol,.markdown dl,.markdown li,.markdown table,.markdown pre{margin:15px 0;}
74
+ .markdown hr{border:0 none;color:#ccc;height:4px;padding:0;}
75
+ .markdown>h2:first-child,.markdown>h1:first-child,.markdown>h1:first-child+h2,.markdown>h3:first-child,.markdown>h4:first-child,.markdown>h5:first-child,.markdown>h6:first-child{margin-top:0;padding-top:0;}
76
+ .markdown li p.first{display:inline-block;}
77
+ .markdown ul,.markdown ol{padding-left:30px;}
78
+ .markdown dl dt{font-size:14px;font-weight:700;font-style:italic;margin:15px 0 5px;padding:0;}
79
+ .markdown dl dd{margin:0 0 15px;padding:0 15px;}
80
+ .markdown blockquote{border-left:4px solid #DDD;color:#777;padding:0 15px;}
81
+ .markdown table{border-collapse:collapse;border-spacing:0;font-size:100%;font:inherit;padding:0;}
82
+ .markdown table tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0;}
83
+ .markdown table tr:nth-child(2n){background-color:#f8f8f8;}
84
+ .markdown table tr th{font-weight:700;}
85
+ .markdown table tr th,.markdown table tr td{border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px;}
86
+ .markdown img{max-width:100%;}
87
+ .markdown span.frame{display:block;overflow:hidden;}
88
+ .markdown span.frame>span{border:1px solid #ddd;display:block;float:left;overflow:hidden;width:auto;margin:13px 0 0;padding:7px;}
89
+ .markdown span.frame span img{display:block;float:left;}
90
+ .markdown span.frame span span{clear:both;color:#333;display:block;padding:5px 0 0;}
91
+ .markdown span.align-center>span{display:block;overflow:hidden;text-align:center;margin:13px auto 0;}
92
+ .markdown span.align-center span img{text-align:center;margin:0 auto;}
93
+ .markdown span.align-right>span{display:block;overflow:hidden;text-align:right;margin:13px 0 0;}
94
+ .markdown span.align-right span img{text-align:right;margin:0;}
95
+ .markdown span.float-left{display:block;margin-right:13px;overflow:hidden;float:left;}
96
+ .markdown span.float-left span{margin:13px 0 0;}
97
+ .markdown span.float-right{display:block;margin-left:13px;overflow:hidden;float:right;}
98
+ .markdown span.float-right>span{display:block;overflow:hidden;text-align:right;margin:13px auto 0;}
99
+ .markdown code,.markdown tt{white-space:nowrap;border:1px solid #eaeaea;background-color:#f8f8f8;border-radius:3px;margin:0 2px;padding:0 5px;}
100
+ .markdown pre>code{white-space:pre;border:none;background:transparent;margin:0;padding:0;}
101
+ .markdown .highlight pre,.markdown pre{background-color:#f8f8f8;border:1px solid #ccc;font-size:13px;line-height:19px;overflow:auto;border-radius:3px;padding:6px 10px;}
102
+ .markdown pre code,.markdown pre tt{background-color:transparent;border:none;}
103
+ .markdown h1+p,.markdown h2+p,.markdown h3+p,.markdown h4+p,.markdown h5+p,.markdown h6+p,.markdown ul li>:first-child,.markdown ol li>:first-child,.markdown dl dt>:first-child,.markdown dl dd>:first-child,.markdown blockquote>:first-child,.markdown table tr th>:first-child,.markdown table tr td>:first-child{margin-top:0;}
104
+ .markdown ul li>:last-child,.markdown ol li>:last-child,.markdown dl dt>:last-child,.markdown dl dd>:last-child,.markdown blockquote>:last-child,.markdown table tr th>:last-child,.markdown table tr td>:last-child{margin-bottom:0;}
105
+ .markdown dl,.markdown dl dt:first-child{padding:0;}
106
+ .markdown span.align-center,.markdown span.align-right{display:block;overflow:hidden;clear:both;}
75
107
 
76
- a {
77
- text-decoration: none;
78
- color: #0080A6; }
79
- a:visited { color: #0080A6; }
80
- a:hover {
81
- text-decoration: underline;
82
- color: #0080A6;
83
- }
84
- a.logo{
85
- color: white;
86
- text-decoration: none;
87
- }
108
+ .rainbow{word-wrap:break-word;background:transparent;}
109
+ .rainbow .comment{color:#999;}
110
+ .rainbow .constant{color:#f26521;}
111
+ .rainbow .string,.rainbow .comment.docstring{color:#854a6f;}
112
+ .rainbow .entity{color:#4da943;}
113
+ .rainbow .support,.rainbow .function.call{color:#b6a500;}
114
+ .rainbow .variable{color:#1e4c66;}
88
115
  </style>
89
116
  </head>
90
117
  <body>
91
118
  <div id="header-outer">
92
119
  <div id="header">
93
- <div id="logo"><%= link_to "Docushin", routes_path, :class => "logo" %></div>
94
- </div>
120
+ <div id="logo"><%= link_to "Docushin", root_path, :class => "logo" %></div>
121
+ <ul id="title-nav">
122
+ <li class="leaf"><%= link_to "Routes", routes_path %></li>
123
+ <li class="leaf last"><%= link_to "Collections", collections_path %></li>
124
+ </ul>
125
+ </div>
95
126
  </div>
96
127
  <div id="container">
97
128
  <%= yield %>
98
129
  </div>
99
130
  </body>
100
- </html>
131
+ </html>
data/config/routes.rb CHANGED
@@ -1,3 +1,5 @@
1
1
  Docushin::Engine.routes.draw do
2
+ root :to => "home#index"
2
3
  resources :routes, :except => :destroy
3
- end
4
+ resources :collections
5
+ end
data/docushin.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["tagrudev@gmail.com", "aganov@gmail.com"]
7
7
  gem.description = %q{Builds documentation based on your Ruby on Rails application routes.}
8
8
  gem.summary = %q{Useful for generating docs on your routes.}
9
- gem.homepage = "http://github.com/appsbakery/docushin"
9
+ gem.homepage = "http://appsbakery.github.com/docushin/"
10
10
 
11
11
 
12
12
  gem.files = `git ls-files`.split($\)
@@ -20,4 +20,6 @@ Gem::Specification.new do |gem|
20
20
  gem.add_development_dependency "pry"
21
21
  gem.add_development_dependency "rake"
22
22
  gem.add_development_dependency "rspec", "~> 2.0"
23
+ gem.add_development_dependency "capybara"
24
+ gem.add_development_dependency "capybara-webkit"
23
25
  end
data/lib/docushin.rb CHANGED
@@ -4,4 +4,13 @@ require "docushin/version"
4
4
  require "docushin/route_set"
5
5
 
6
6
  module Docushin
7
+ mattr_accessor :path_regexp
8
+ @@path_regexp = nil
9
+
10
+ mattr_accessor :data_fields
11
+ @@data_fields = [:description]
12
+
13
+ def self.setup
14
+ yield self
15
+ end
7
16
  end
@@ -1,4 +1,5 @@
1
1
  require 'digest/md5'
2
+ require 'active_support/core_ext/hash/indifferent_access'
2
3
 
3
4
  module Docushin
4
5
  class Route
@@ -15,8 +16,9 @@ module Docushin
15
16
  attr_accessor :data
16
17
  attr_accessor :file_name
17
18
  attr_accessor :content
18
- attr_accessor :description
19
-
19
+
20
+ alias :id :file_name
21
+
20
22
  def initialize(route)
21
23
  @controller = route.defaults[:controller]
22
24
  @base = File.join(Rails.root, 'doc', 'docushin')
@@ -25,28 +27,67 @@ module Docushin
25
27
  @path = route.path.spec.to_s.sub('(.:format)', '')
26
28
  @requirements = route.requirements
27
29
  @file_name = Digest::MD5.hexdigest(@verb.to_s + @path)
28
- rtfm(@base, @file_name) if File.exists?(File.join(@base, @file_name) + '.md')
30
+ self.load
29
31
  end
30
32
 
31
- def persisted?
32
- true
33
+ def description
34
+ @data["description"]
33
35
  end
34
36
 
35
- alias :id :file_name
37
+ def updated_at
38
+ @data["updated_at"] || File.mtime(File.join(@base,"#{@file_name}.md")).to_i rescue nil
39
+ end
36
40
 
37
- def rtfm(base, name)
38
- @content = File.read(File.join(base, name) + '.md')
41
+ # Updates the attributes of the model from the passed-in hash
42
+ # and saves the route
43
+ def update_attributes(attributes)
44
+ attributes.to_hash
45
+ self.attributes = attributes
46
+ self.save
47
+ end
48
+
49
+ def attributes=(attributes)
50
+ attributes = attributes.with_indifferent_access.to_hash
51
+ @content = attributes.delete("content")
52
+ @data = attributes
53
+ end
54
+
55
+ # Saves the route
56
+ #
57
+ # If the route is new, a document gets created in the doc folder, otherwise
58
+ # the existing document gets updated.
59
+ def save
60
+ @data["updated_at"] = DateTime.now.to_i
61
+ FileUtils.mkdir_p(@base) unless File.exists?(@base)
62
+ File.open(File.join(@base,"#{@file_name}.md"), "w+") do |file|
63
+ file.write @data.to_yaml
64
+ file.write "---\n"
65
+ file.write @content
66
+ file.close
67
+ end
68
+ end
69
+
70
+ # Return true if file/route is saved
71
+ def saved?
72
+ File.exists?(File.join(@base, "#{@file_name}.md")) ? true : false
73
+ end
74
+
75
+ def persisted?
76
+ true
77
+ end
39
78
 
79
+ # Read route's documentation
80
+ def load
40
81
  begin
82
+ @content = File.read(File.join(@base, "#{@file_name}.md"))
41
83
  if @content =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m
42
84
  @content = $'
43
85
  @data = YAML.load($1)
44
- @description = @data['description']
45
86
  end
46
87
  rescue => e
47
- # puts "Exception reading #{name}: #{e.message}"
88
+ # Do nothing
48
89
  end
49
90
  @data ||= {}
50
91
  end
51
92
  end
52
- end
93
+ end
@@ -1,20 +1,29 @@
1
1
  module Docushin
2
2
  class RouteSet
3
3
  attr_accessor :routes
4
-
4
+
5
5
  def initialize
6
6
  @routes = []
7
7
  Rails.application.routes.routes.each do |route|
8
- next if route.app.is_a?(ActionDispatch::Routing::Mapper::Constraints)
8
+ # next if route.app.is_a?(ActionDispatch::Routing::Mapper::Constraints)
9
9
  next if route.app.is_a?(Sprockets::Environment)
10
10
  next if route.app == Docushin::Engine
11
11
 
12
12
  if (rack_app = discover_rack_app(route.app)) && rack_app.respond_to?(:routes)
13
13
  rack_app.routes.routes.each do |rack_route|
14
- @routes << Route.new(rack_route)
15
- end
14
+ add_route Route.new(rack_route)
15
+ end if rack_app.routes.respond_to?(:routes)
16
16
  end
17
- @routes << Route.new(route)
17
+
18
+ add_route Route.new(route)
19
+ end
20
+ end
21
+
22
+ def add_route(route)
23
+ if Docushin.path_regexp.nil?
24
+ @routes << route
25
+ else
26
+ @routes << route if route.path.match(Docushin.path_regexp)
18
27
  end
19
28
  end
20
29
 
@@ -27,10 +36,11 @@ module Docushin
27
36
  end
28
37
  end
29
38
 
30
- def find_by_filename_hash(hash)
39
+ def find(hash)
31
40
  @routes.each do |route|
32
- return route if route.file_name == "#{hash}"
41
+ return route if route.id == hash
33
42
  end
43
+ nil
34
44
  end
35
45
  end
36
- end
46
+ end
@@ -1,3 +1,3 @@
1
1
  module Docushin
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -3,8 +3,8 @@ require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
3
3
  describe Docushin::RouteSet do
4
4
  describe 'Build route set from routes' do
5
5
  let(:routes_collection) { Docushin::RouteSet.new }
6
- it 'should have attr_accessor routes that is an array' do
6
+ it 'should have attr_accessor routes that is an array' do
7
7
  routes_collection.routes.class.should == Array
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -5,35 +5,48 @@ describe Docushin::Route do
5
5
  let(:route) { route_set.routes.first }
6
6
 
7
7
  describe 'create a new Route' do
8
- it 'should have name, verb, path, requirements, data, content as attr' do
8
+ it 'should have name, verb, path, requirements, data, content as attr' do
9
9
  route.should respond_to(:name)
10
10
  route.should respond_to(:verb)
11
11
  route.should respond_to(:path)
12
12
  route.should respond_to(:requirements)
13
+ route.should respond_to(:updated_at)
13
14
  route.should respond_to(:base)
14
15
  route.should respond_to(:data)
15
16
  route.should respond_to(:file_name)
16
17
  route.should respond_to(:content)
17
18
  route.should respond_to(:description)
19
+ route.should respond_to(:updated_at)
18
20
  end
19
21
  end
20
22
 
21
- describe 'inspect the new Route' do
22
- it 'should have attr defined' do
23
+ describe 'inspect the new Route' do
24
+ it 'should have attr defined' do
23
25
  route.base.should == File.join(Rails.root, 'doc', 'docushin')
24
- route.file_name.should == Digest::MD5.hexdigest(route.verb.to_s + route.path)
26
+ route.file_name.should == Digest::MD5.hexdigest(route.verb.to_s + route.path)
25
27
  route.name.should == "foo_index"
26
28
  route.path.should == "/foo"
27
29
  route.requirements.should == {:action=>"index", :controller=>"foo"}
28
30
  route.verb.should == "GET"
29
- end
31
+ end
30
32
  end
31
33
 
32
34
  describe 'read markdown file' do
33
- it 'should generate data and content' do
34
- route.data.should == {"description"=>"I am so awesome"}
35
+ it 'should generate data and content' do
35
36
  route.description.should == "I am so awesome"
36
- route.content.should == "{\"id\":\"4f3a296ac8de6732fe000003\",\"first_name\":\"Todor\",\"last_name\":\"Grudev\",\"username\":null,\"bio\":null,\"gender\":\"male\",\"email\":\"tagrudev@gmail.com\"}"
37
+ route.content.should == "{\"id\":\"4f3a296ac8de6732fe000003\",\"first_name\":\"Todor\",\"last_name\":\"Grudev\",\"gender\":\"male\",\"email\":\"tagrudev@gmail.com\"}\n"
38
+ end
39
+ end
40
+ describe 'update markdown file' do
41
+ it 'should update specified attributes' do
42
+ route.save
43
+ route.updated_at.should == File.mtime(File.join(route.base, "#{route.file_name}.md")).to_i
44
+ end
45
+ end
46
+
47
+ describe 'check if route is saved' do
48
+ it 'should return true if the file/route exists' do
49
+ route.saved?.should == true
37
50
  end
38
51
  end
39
- end
52
+ end
@@ -1,5 +1,5 @@
1
1
  Rails.application.routes.draw do
2
+ mount Docushin::Engine, :at =>"docushin"
2
3
  resources :foo
3
4
  resources :bar
4
5
  end
5
-
@@ -0,0 +1,7 @@
1
+ ---
2
+ :id: !binary |-
3
+ YTljYTNiN2VmMmE1MjBlZDllYWYzZjMzMmI4NDUyMWQ=
4
+ :title: A
5
+ :route_set_ids:
6
+ - fff1454d69c4340014bef52217525fed
7
+
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: I am so awesome
3
+ updated_at: 1355303015
4
+ ---
5
+ {"id":"4f3a296ac8de6732fe000003","first_name":"Todor","last_name":"Grudev","gender":"male","email":"tagrudev@gmail.com"}
@@ -0,0 +1,11 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/requests_helper')
2
+
3
+ feature 'Visit Collections of Docushin', 'I am so awesome I want to be able to make some collections' do
4
+ let(:route_set) { Docushin::RouteSet.new }
5
+ let(:route) { route_set.routes.first }
6
+
7
+ scenario 'I click on the collections page' do
8
+ visit "/docushin/collections"
9
+ page.should have_content("Create a new Collection")
10
+ end
11
+ end
@@ -0,0 +1,8 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/requests_helper')
2
+
3
+ feature 'Visit Home of Docushin', 'I am so awesome I want to be able to go to my docushin home path' do
4
+ scenario 'I click on the home page' do
5
+ visit "/docushin"
6
+ page.should have_content("Recent updates")
7
+ end
8
+ end
@@ -0,0 +1 @@
1
+ require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/requests_helper')
2
+
3
+ feature 'Visit Routes of Docushin', 'Visiting #mount_path/routes should display/group all my routes' do
4
+ scenario 'I visit the routes path' do
5
+ visit "/docushin/routes"
6
+ end
7
+ end
data/spec/spec_helper.rb CHANGED
@@ -4,7 +4,9 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
  ENV["RAILS_ENV"] ||= 'test'
5
5
  require File.expand_path("../../spec/dummy/config/environment", __FILE__)
6
6
 
7
- require 'rubygems'
7
+
8
+ require 'capybara/rails'
9
+ require 'capybara/rspec'
8
10
  require 'bundler/setup'
9
11
  require 'docushin'
10
12
  require 'pry'
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docushin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Todor Grudev
@@ -10,60 +9,53 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-11-16 00:00:00.000000000 Z
12
+ date: 2013-10-28 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rails
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - '>='
29
26
  - !ruby/object:Gem::Version
30
27
  version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: pry
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
34
  version: '0'
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
41
  version: '0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: rake
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - '>='
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - '>='
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: rspec
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - ~>
69
61
  - !ruby/object:Gem::Version
@@ -71,11 +63,38 @@ dependencies:
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - ~>
77
68
  - !ruby/object:Gem::Version
78
69
  version: '2.0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: capybara
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: capybara-webkit
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
79
98
  description: Builds documentation based on your Ruby on Rails application routes.
80
99
  email:
81
100
  - tagrudev@gmail.com
@@ -90,8 +109,15 @@ files:
90
109
  - LICENSE
91
110
  - README.md
92
111
  - Rakefile
112
+ - app/controllers/docushin/application_controller.rb
113
+ - app/controllers/docushin/collections_controller.rb
114
+ - app/controllers/docushin/home_controller.rb
93
115
  - app/controllers/docushin/routes_controller.rb
94
116
  - app/helpers/docushin/application_helper.rb
117
+ - app/views/docushin/collections/create.html.erb
118
+ - app/views/docushin/collections/index.html.erb
119
+ - app/views/docushin/collections/new.html.erb
120
+ - app/views/docushin/home/index.html.erb
95
121
  - app/views/docushin/routes/_form.html.erb
96
122
  - app/views/docushin/routes/edit.html.erb
97
123
  - app/views/docushin/routes/index.html.erb
@@ -122,12 +148,17 @@ files:
122
148
  - spec/dummy/config/initializers/session_store.rb
123
149
  - spec/dummy/config/initializers/wrap_parameters.rb
124
150
  - spec/dummy/config/routes.rb
125
- - spec/dummy/log/development.log
126
- - spec/dummy/log/test.log
151
+ - spec/dummy/doc/docushin/collections.yml
152
+ - spec/dummy/doc/docushin/fff1454d69c4340014bef52217525fed.md
127
153
  - spec/dummy/script/rails
154
+ - spec/requests/collections_spec.rb
155
+ - spec/requests/home_spec.rb
156
+ - spec/requests/requests_helper.rb
157
+ - spec/requests/routes_spec.rb
128
158
  - spec/spec_helper.rb
129
- homepage: http://github.com/appsbakery/docushin
159
+ homepage: http://appsbakery.github.com/docushin/
130
160
  licenses: []
161
+ metadata: {}
131
162
  post_install_message:
132
163
  rdoc_options: []
133
164
  require_paths:
@@ -135,28 +166,20 @@ require_paths:
135
166
  - app
136
167
  - config
137
168
  required_ruby_version: !ruby/object:Gem::Requirement
138
- none: false
139
169
  requirements:
140
- - - ! '>='
170
+ - - '>='
141
171
  - !ruby/object:Gem::Version
142
172
  version: '0'
143
- segments:
144
- - 0
145
- hash: 363757421
146
173
  required_rubygems_version: !ruby/object:Gem::Requirement
147
- none: false
148
174
  requirements:
149
- - - ! '>='
175
+ - - '>='
150
176
  - !ruby/object:Gem::Version
151
177
  version: '0'
152
- segments:
153
- - 0
154
- hash: 363757421
155
178
  requirements: []
156
179
  rubyforge_project:
157
- rubygems_version: 1.8.24
180
+ rubygems_version: 2.0.3
158
181
  signing_key:
159
- specification_version: 3
182
+ specification_version: 4
160
183
  summary: Useful for generating docs on your routes.
161
184
  test_files:
162
185
  - spec/docushin/route_set_spec.rb
@@ -177,7 +200,11 @@ test_files:
177
200
  - spec/dummy/config/initializers/session_store.rb
178
201
  - spec/dummy/config/initializers/wrap_parameters.rb
179
202
  - spec/dummy/config/routes.rb
180
- - spec/dummy/log/development.log
181
- - spec/dummy/log/test.log
203
+ - spec/dummy/doc/docushin/collections.yml
204
+ - spec/dummy/doc/docushin/fff1454d69c4340014bef52217525fed.md
182
205
  - spec/dummy/script/rails
206
+ - spec/requests/collections_spec.rb
207
+ - spec/requests/home_spec.rb
208
+ - spec/requests/requests_helper.rb
209
+ - spec/requests/routes_spec.rb
183
210
  - spec/spec_helper.rb
File without changes
File without changes