rake-tomdoc 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/README.markdown +54 -0
  3. data/Rakefile +7 -0
  4. data/lib/rake-tomdoc.rb +37 -0
  5. metadata +78 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7f2987aa27dec0a565c4f5a9ff20c40912d9ff12
4
+ data.tar.gz: 69c934a4b3135dfba9888a03d3e2293380eb8729
5
+ SHA512:
6
+ metadata.gz: c2ed85af839397d077a046d91f8f8e28220b082b177bc8489f3fcfe0d99a9044de6e10f0dabefd8e4590860e2f6b9373fe6a3d702d042f217f4f31e99d3d12dd
7
+ data.tar.gz: 6ef9f149a073d982e3134b550c8b1465094fa8d8e8e282a098c4a6b761ec8dcb0470d61f866bce6ab265c5bfd1cf16d88ae906d82aa01e69d863141225943237
data/README.markdown ADDED
@@ -0,0 +1,54 @@
1
+ # rake-tomdoc
2
+
3
+ Adds `rake tomdoc` to generate documentation for publishing to GitHub Pages.
4
+
5
+ ## Setup
6
+
7
+ Add this gem as a development dependency to your projects Gemfile or gemspec:
8
+
9
+ ```ruby
10
+ gem 'rake-tomdoc', group: :development
11
+
12
+ Gem::Specification.new do |s|
13
+ ...
14
+ s.add_development_dependency 'rake-tomdoc'
15
+ end
16
+ ```
17
+
18
+ Create a gh-pages branch in your project. Make sure you have committed any
19
+ changes and your repository contains no untracked files!
20
+
21
+ ```
22
+ $ git checkout --orphan gh-pages
23
+ $ git rm -rf .
24
+ $ git commit --allow-empty -m "Created gh-pages branch"
25
+ $ git checkout -
26
+ ```
27
+
28
+ Require the gem in your `Rakefile`:
29
+
30
+ ```ruby
31
+ require 'rake-tomdoc'
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ When you are ready to publish new documentation:
37
+
38
+ ```
39
+ $ rake tomdoc [--trace]
40
+ $ git commit -am "Updating documentation"
41
+ $ git push origin gh-pages
42
+ $ git checkout -
43
+ ```
44
+
45
+ ## Note on Patches/Pull Requests
46
+
47
+ * Fork the project.
48
+ * Make your feature addition or bug fix.
49
+ * Commit, do not bump version.
50
+ * Send me a pull request. Bonus points for topic branches.
51
+
52
+ ## Copyright
53
+
54
+ Copyright (c) 2013 Site5.com. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ require 'bundler/gem_tasks'
4
+ require 'rake-tomdoc'
5
+ rescue LoadError
6
+ abort "Please run `bundle install` first"
7
+ end
@@ -0,0 +1,37 @@
1
+ desc "Generates TomDoc using `yard`, and copies it to the `gh-pages` branch."
2
+ task :tomdoc do
3
+ def cmd(*args)
4
+ error = args.pop
5
+ command = args.map(&:strip).join(' && ')
6
+ output = `#{command}`
7
+ puts "+ #{command}", output if Rake.application.options.trace
8
+ abort error unless $?.success?
9
+ end
10
+
11
+ def executor
12
+ cmd "which git", "Couldn't find `git`!"
13
+ cmd "which yard", "Couldn't find `yard`!"
14
+
15
+ cmd "git diff-files --quiet --ignore-submodules --",
16
+ "git diff-index --cached --quiet HEAD --ignore-submodules --",
17
+ "You must be on a clean branch to run this command"
18
+
19
+ puts "Generating docs"
20
+
21
+ Dir.mktmpdir do |dir|
22
+ cmd "yard doc --private --plugin tomdoc --output-dir #{dir} - LICENSE",
23
+ "Couldn't generate docs!"
24
+
25
+ cmd "git checkout gh-pages", "Couldn't checkout gh-pages branch!"
26
+ cmd "cp -rv #{dir}/* .", "Couldn't copy docs!"
27
+ end
28
+
29
+ puts "Done! Make sure to review the changes and push to GitHub!"
30
+ end
31
+
32
+ if defined?(Bundler)
33
+ Bundler.with_clean_env(&method(:executor))
34
+ else
35
+ executor
36
+ end
37
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rake-tomdoc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Joshua Priddle
8
+ - Justin Mazzi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-09-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: yard-tomdoc
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: 0.7.1
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: 0.7.1
42
+ description:
43
+ email:
44
+ - jpriddle@me.com
45
+ - jmazzi@site5.com
46
+ executables: []
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - Rakefile
51
+ - README.markdown
52
+ - lib/rake-tomdoc.rb
53
+ homepage: https://github.com/site5/rake-tomdoc
54
+ licenses:
55
+ - MIT
56
+ metadata: {}
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubyforge_project:
73
+ rubygems_version: 2.0.3
74
+ signing_key:
75
+ specification_version: 4
76
+ summary: rake-tomdoc
77
+ test_files: []
78
+ has_rdoc: