jsdoc_plugin 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Aaron Hamid
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,17 @@
1
+ = jsdoc_plugin
2
+
3
+ Description goes here.
4
+
5
+ == Note on Patches/Pull Requests
6
+
7
+ * Fork the project.
8
+ * Make your feature addition or bug fix.
9
+ * Add tests for it. This is important so I don't break it in a
10
+ future version unintentionally.
11
+ * Commit, do not mess with rakefile, version, or history.
12
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
13
+ * Send me a pull request. Bonus points for topic branches.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2010 Aaron Hamid. See LICENSE for details.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,55 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{jsdoc_plugin}
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 = ["Aaron Hamid"]
12
+ s.date = %q{2010-11-19}
13
+ s.description = %q{adds a doc:jsdco task to a rails project}
14
+ s.email = %q{aaron@incandescentsoftware.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "LICENSE",
21
+ "README.rdoc",
22
+ "VERSION",
23
+ "jsdoc_plugin.gemspec",
24
+ "lib/jsdoc_plugin.rb",
25
+ "lib/jsdoc_plugin/railtie.rb",
26
+ "lib/jsdoc_plugin/version.rb",
27
+ "lib/tasks/jsdoc.rake"
28
+ ]
29
+ s.homepage = %q{http://github.com/incandescent/jsdoc_plugin}
30
+ s.rdoc_options = ["--charset=UTF-8"]
31
+ s.require_paths = ["lib"]
32
+ s.rubygems_version = %q{1.3.7}
33
+ s.summary = %q{adds a doc:jsdoc task to a rails project}
34
+ s.test_files = [
35
+ "test/test_jsdoc_plugin.rb",
36
+ "test/helper.rb"
37
+ ]
38
+
39
+ if s.respond_to? :specification_version then
40
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
41
+ s.specification_version = 3
42
+
43
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
+ s.add_runtime_dependency(%q<jsdoc>, [">= 0"])
45
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
46
+ else
47
+ s.add_dependency(%q<jsdoc>, [">= 0"])
48
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
49
+ end
50
+ else
51
+ s.add_dependency(%q<jsdoc>, [">= 0"])
52
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
53
+ end
54
+ end
55
+
@@ -0,0 +1,3 @@
1
+ module JsDocPlugin
2
+ require 'jsdoc_plugin/railtie' if defined?(Rails)
3
+ end
@@ -0,0 +1,11 @@
1
+ require 'jsdoc'
2
+ require 'rails'
3
+
4
+ module JsDocPlugin
5
+ class Railtie < Rails::Railtie
6
+ rake_tasks do
7
+ puts "Loading jsdoc rake tasks"
8
+ load "tasks/jsdoc.rake"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module JsDocPlugin
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,24 @@
1
+ require 'jsdoc'
2
+ require 'fileutils'
3
+
4
+ EXCLUDE_REGEXES = %w(.*\.min\.js)
5
+
6
+ def generate_jsdoc(*args)
7
+ # TODO: determine root of Rails project
8
+ dir = File.expand_path('doc' + File::SEPARATOR + 'jsdoc')
9
+ FileUtils.mkdir_p(dir)
10
+ recursive = '-r'
11
+ jsdoc_args = [ recursive ]
12
+ jsdoc_args += EXCLUDE_REGEXES.map{|x| "-E=#{x}"}
13
+ jsdoc_args += args
14
+ JsDoc.new.run(dir, *jsdoc_args)
15
+ end
16
+
17
+ namespace :doc do
18
+
19
+ desc "Generate jsdoc docs"
20
+ task :jsdoc do
21
+ generate_jsdoc('public')
22
+ end
23
+
24
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ require 'jsdoc_plugin'
8
+
9
+ class Test::Unit::TestCase
10
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestJsdocPlugin < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jsdoc_plugin
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Aaron Hamid
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-11-19 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: jsdoc
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: thoughtbot-shoulda
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id002
49
+ description: adds a doc:jsdco task to a rails project
50
+ email: aaron@incandescentsoftware.com
51
+ executables: []
52
+
53
+ extensions: []
54
+
55
+ extra_rdoc_files:
56
+ - LICENSE
57
+ - README.rdoc
58
+ files:
59
+ - LICENSE
60
+ - README.rdoc
61
+ - VERSION
62
+ - jsdoc_plugin.gemspec
63
+ - lib/jsdoc_plugin.rb
64
+ - lib/jsdoc_plugin/railtie.rb
65
+ - lib/jsdoc_plugin/version.rb
66
+ - lib/tasks/jsdoc.rake
67
+ - test/test_jsdoc_plugin.rb
68
+ - test/helper.rb
69
+ has_rdoc: true
70
+ homepage: http://github.com/incandescent/jsdoc_plugin
71
+ licenses: []
72
+
73
+ post_install_message:
74
+ rdoc_options:
75
+ - --charset=UTF-8
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 0
86
+ version: "0"
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ hash: 3
93
+ segments:
94
+ - 0
95
+ version: "0"
96
+ requirements: []
97
+
98
+ rubyforge_project:
99
+ rubygems_version: 1.3.7
100
+ signing_key:
101
+ specification_version: 3
102
+ summary: adds a doc:jsdoc task to a rails project
103
+ test_files:
104
+ - test/test_jsdoc_plugin.rb
105
+ - test/helper.rb