Skip to content
Browse files

Added support for developer docs.

  • Loading branch information...
1 parent d599d4e commit 24628e4734df98a68780e4a59cfd330e9b0916bf @fabiopelosin fabiopelosin committed Nov 26, 2012
Showing with 53 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +4 −3 Gemfile
  3. +6 −0 Gemfile.lock
  4. +42 −0 rakelib/doc.rake
View
1 .gitignore
@@ -13,3 +13,4 @@ doc
tmp
.DS_Store
xcuserdata
+rakelib/doc
View
7 Gemfile
@@ -9,7 +9,8 @@ group :development do
end
group :documentation do
- gem "redcarpet"
- gem "github-markup"
- gem "yard"
+ gem 'yard'
+ gem 'redcarpet'
+ gem 'github-markup'
+ gem 'pygments.rb'
end
View
6 Gemfile.lock
@@ -23,13 +23,18 @@ GEM
rb-fsevent (~> 0.9.1)
rb-inotify (~> 0.8.8)
multi_json (1.3.7)
+ posix-spawn (0.3.6)
+ pygments.rb (0.3.2)
+ posix-spawn (~> 0.3.6)
+ yajl-ruby (~> 1.1.0)
rake (0.9.2.2)
rb-fchange (0.0.5)
ffi
rb-fsevent (0.9.1)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
redcarpet (2.1.1)
+ yajl-ruby (1.1.0)
yard (0.8.2.1)
PLATFORMS
@@ -39,6 +44,7 @@ DEPENDENCIES
bacon
github-markup
kicker
+ pygments.rb
rake
redcarpet
xcodeproj!
View
42 rakelib/doc.rake
@@ -0,0 +1,42 @@
+require 'pathname'
+ROOT = Pathname.new(File.expand_path('../../', __FILE__))
+require 'active_support'
+namespace :doc do
+ task :load do
+ unless (ROOT + 'rakelib/doc').exist?
+ Dir.chdir(ROOT + 'rakelib') do
+ sh "git clone git@github.com:CocoaPods/cocoapods.github.com.git doc"
+ end
+ end
+ require ROOT + 'rakelib/doc/lib/doc'
+ end
+
+ desc 'Update vendor doc repo'
+ task :update do
+ Dir.chdir(ROOT + 'rakelib/doc') do
+ sh "git checkout *.html"
+ sh "git pull"
+ end
+ end
+
+ desc 'Generate docs and push to remote'
+ task :release => [:update, :generate] do
+ Dir.chdir(ROOT + 'rakelib/doc') do
+ sh "git add *.html"
+ sh "git commit -m 'Update specification.html'"
+ sh "git push"
+ end
+ end
+
+ task :generate => :load do
+ generator = Pod::Doc::Gem.new(ROOT + 'xcodeproj.gemspec')
+ generator.render
+ sh "open '#{generator.output_file}'"
+ end
+end
+
+desc "Genereates the documentation"
+task :doc => 'doc:generate'
+
+
+

0 comments on commit 24628e4

Please sign in to comment.
Something went wrong with that request. Please try again.