yard-gobject 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,6 +3,11 @@ YARD GObject Plugin
3
3
 
4
4
  This is a YARD plugin that assists in the documentation of Ruby bindings that make use of GObject, i.e. the Ruby-GNOME2 bindings.
5
5
 
6
+ Installation
7
+ ------------
8
+
9
+ Because YARD auto-loads all gems beggining with <code>yard-</code>, all you need to do is install the latest version of this gem from [Gemcutter](http://gemcutter.org/gems/yard-gobject).
10
+
6
11
  Features
7
12
  --------
8
13
 
@@ -23,6 +28,7 @@ This plugin is Copyright © 2010 Stojan Dimitrovski, licensed under the MIT Lice
23
28
  References
24
29
  ----------
25
30
 
31
+ * [Gemcutter](http://gemcutter.org)
26
32
  * [Ruby-GNOME2](http://http://ruby-gnome2.sourceforge.jp/)
27
33
  * [YARD](http://yardoc.org)
28
34
 
@@ -4,17 +4,12 @@ def init
4
4
  sections.last.place(:properties).after(:return)
5
5
  end
6
6
 
7
- def tag(name, opts = {})
8
- return unless object.has_tag?(name)
9
- @no_names = true if opts[:no_names]
10
- @no_types = true if opts[:no_types]
11
- @name = name
12
- out = erb(name.to_s)
13
- @no_names, @no_types = nil, nil
14
- out
15
- end
16
-
17
7
  def properties
18
- tag :properties
8
+ if object.type == :class or object.type == :module
9
+ if object.has_tag? :properties
10
+ @name = :properties.to_s
11
+ erb :properties.to_s
12
+ end
13
+ end
19
14
  end
20
15
 
data/yard-gobject.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{yard-gobject}
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Stojan Dimitrovski"]
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.files = ["LICENSE.txt", "README.md", "Rakefile", "templates/default/fulldoc/html/css/common.css", "templates/default/tags/html/properties.erb", "templates/default/tags/setup.rb", "yard-gobject.rb", "Manifest", "yard-gobject.gemspec"]
14
14
  s.homepage = %q{http://theact1v8.org}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Yard-gobject", "--main", "README.md"]
16
- s.require_paths = ["lib"]
16
+ s.require_paths = ["templates", "."]
17
17
  s.rubyforge_project = %q{yard-gobject}
18
18
  s.rubygems_version = %q{1.3.5}
19
19
  s.summary = %q{Aids in the documentation of Ruby Objects derived from GObject}
@@ -31,3 +31,4 @@ Gem::Specification.new do |s|
31
31
  s.add_dependency(%q<yard>, [">= 0.5.2"])
32
32
  end
33
33
  end
34
+
data/yard-gobject.rb CHANGED
@@ -31,15 +31,12 @@ require 'pathname'
31
31
  template_dir = Pathname.new(File.dirname(__FILE__) + '/templates').realpath.to_s
32
32
 
33
33
  YARD::Templates::Engine.register_template_path(template_dir)
34
- puts YARD::Templates::Engine.template_paths.inspect
35
34
 
36
35
  YARD::Tags::Library.define_tag("GObject Properties", :properties)
37
36
 
38
37
  module YARD::Templates::Helpers::HtmlHelper
39
38
  def format_gobject_properties(tag)
40
- puts 'Here'
41
39
  text = tag.text
42
- # text = tag
43
40
 
44
41
  text.gsub! /\n\r?\t?/, ''
45
42
  text.gsub! /\ +/, ' '
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard-gobject
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stojan Dimitrovski
@@ -54,7 +54,8 @@ rdoc_options:
54
54
  - --main
55
55
  - README.md
56
56
  require_paths:
57
- - lib
57
+ - templates
58
+ - .
58
59
  required_ruby_version: !ruby/object:Gem::Requirement
59
60
  requirements:
60
61
  - - ">="