yardocco 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,14 @@
1
+ yardocco
2
+ ========
3
+
4
+ YARD Templates for docco-style docs. See https://github.com/markiz/murdoc & http://jashkenas.github.com/docco/
5
+
6
+ gem install yardocco
7
+
8
+ Add require 'yardocco' to your yard generate code. Something like this:
9
+
10
+ require 'yard'
11
+ require 'yardocco'
12
+ YARD::Rake::YardocTask.new
13
+
14
+ murdoc dependency is pygments (http://pygments.org/) for highlight code.
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ Jeweler::Tasks.new do |gem|
21
21
  gem.authors = ["Andrew Rudenko"]
22
22
  # Include your dependencies below. Runtime dependencies are required when using your gem,
23
23
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
- # gem.add_runtime_dependency 'jabber4r', '> 0.1'
24
+ gem.add_runtime_dependency 'murdoc', '~> 0.1.6'
25
25
  # gem.add_development_dependency 'rspec', '> 1.2.3'
26
26
  end
27
27
  Jeweler::RubygemsDotOrgTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.1.0
@@ -4,7 +4,6 @@
4
4
  <div class="murdoc_wrapper">
5
5
  <div class="murdoc">
6
6
  <% @annotations.each do |a| %>
7
- <% need_line, need_method = @definitions.shift %>
8
7
  <% a.paragraphs.each do |p| %>
9
8
  <% unless p.annotation.empty? %>
10
9
  <section><%= htmlify Docstring.new(p.annotation) %></section>
@@ -13,9 +12,12 @@
13
12
  <figure>
14
13
  <ol>
15
14
  <% 1.upto(p.source.split("\n").size) do |i| %>
16
- <li<% if i + p.starting_line == need_line %>
17
- id="<%= anchor_for(need_method) %>"
18
- <% need_line, need_method = @definitions.shift; end %>> <%= i + p.starting_line %> </li>
15
+ <li>
16
+ <% objects_for_line(i + p.starting_line).each do |o| %>
17
+ <a id="<%= anchor_for(o) %>"></a>
18
+ <% end %>
19
+ <%= i + p.starting_line %>
20
+ </li>
19
21
  <% end %>
20
22
  </ol>
21
23
  <code><%= p.formatted_source %></code>
@@ -18,4 +18,12 @@ def murdoc
18
18
  end
19
19
 
20
20
  erb(:murdoc)
21
+ end
22
+
23
+ def objects_for_line(line)
24
+ res = []
25
+ while @definitions.first && @definitions.first[0] == line
26
+ res << @definitions.shift[1]
27
+ end
28
+ res
21
29
  end
@@ -0,0 +1,57 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{yardocco}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Andrew Rudenko"]
12
+ s.date = %q{2011-01-25}
13
+ s.description = %q{Docco-style YARD template}
14
+ s.email = %q{ceo@prepor.ru}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README.md",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "lib/yardocco.rb",
28
+ "templates/default/module/html/murdoc.erb",
29
+ "templates/default/module/html/style.css",
30
+ "templates/default/module/setup.rb",
31
+ "yardocco.gemspec"
32
+ ]
33
+ s.homepage = %q{http://github.com/prepor/yardocco}
34
+ s.licenses = ["MIT"]
35
+ s.require_paths = ["lib"]
36
+ s.rubygems_version = %q{1.4.2}
37
+ s.summary = %q{Docco-style YARD template}
38
+
39
+ if s.respond_to? :specification_version then
40
+ s.specification_version = 3
41
+
42
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
44
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
45
+ s.add_runtime_dependency(%q<murdoc>, ["~> 0.1.6"])
46
+ else
47
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
48
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
49
+ s.add_dependency(%q<murdoc>, ["~> 0.1.6"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
53
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
54
+ s.add_dependency(%q<murdoc>, ["~> 0.1.6"])
55
+ end
56
+ end
57
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yardocco
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
- version: 0.0.1
9
+ - 0
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Rudenko
@@ -50,6 +50,22 @@ dependencies:
50
50
  - 2
51
51
  version: 1.5.2
52
52
  requirement: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ prerelease: false
55
+ name: murdoc
56
+ type: :runtime
57
+ version_requirements: &id003 !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ hash: 23
63
+ segments:
64
+ - 0
65
+ - 1
66
+ - 6
67
+ version: 0.1.6
68
+ requirement: *id003
53
69
  description: Docco-style YARD template
54
70
  email: ceo@prepor.ru
55
71
  executables: []
@@ -58,19 +74,20 @@ extensions: []
58
74
 
59
75
  extra_rdoc_files:
60
76
  - LICENSE.txt
61
- - README.rdoc
77
+ - README.md
62
78
  files:
63
79
  - .document
64
80
  - Gemfile
65
81
  - Gemfile.lock
66
82
  - LICENSE.txt
67
- - README.rdoc
83
+ - README.md
68
84
  - Rakefile
69
85
  - VERSION
70
86
  - lib/yardocco.rb
71
87
  - templates/default/module/html/murdoc.erb
72
88
  - templates/default/module/html/style.css
73
89
  - templates/default/module/setup.rb
90
+ - yardocco.gemspec
74
91
  has_rdoc: true
75
92
  homepage: http://github.com/prepor/yardocco
76
93
  licenses:
@@ -1,19 +0,0 @@
1
- = yardocco
2
-
3
- Description goes here.
4
-
5
- == Contributing to yardocco
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
- * Fork the project
10
- * Start a feature/bugfix branch
11
- * Commit and push until you are happy with your contribution
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2011 Andrew Rudenko. See LICENSE.txt for
18
- further details.
19
-