File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,5 @@ group :development, :test do
15
15
gem 'github-markup'
16
16
gem 'cookiejar'
17
17
gem 'rack-contrib'
18
+ gem 'redcarpet'
18
19
end
Original file line number Diff line number Diff line change @@ -28,16 +28,32 @@ begin
28
28
namespace :doc do
29
29
YARD ::Rake ::YardocTask . new ( :pages ) do |t |
30
30
t . files = DOC_FILES
31
- t . options = [ '-o' , '../grape.doc' ]
31
+ t . options = [ '-o' , '../grape.doc/docs ' ]
32
32
end
33
33
34
34
namespace :pages do
35
+
36
+ desc "Check out gh-pages."
37
+ task :checkout do
38
+ dir = File . dirname ( __FILE__ ) + '/../grape.doc'
39
+ unless Dir . exist? ( dir )
40
+ Dir . mkdir ( dir )
41
+ Dir . chdir ( dir ) do
42
+ system ( "git init" )
43
+ system ( "git remote add origin git@github.com:intridea/grape.git" )
44
+ system ( "git pull" )
45
+ system ( "git checkout gh-pages" )
46
+ end
47
+ end
48
+ end
49
+
35
50
desc 'Generate and publish YARD docs to GitHub pages.'
36
- task :publish => [ 'doc:pages' ] do
51
+ task :publish => [ 'doc:pages:checkout' , 'doc:pages '] do
37
52
Dir . chdir ( File . dirname ( __FILE__ ) + '/../grape.doc' ) do
53
+ system ( "git checkout gh-pages" )
38
54
system ( "git add ." )
39
55
system ( "git add -u" )
40
- system ( "git commit -m 'Generating docs for version #{ version } .'" )
56
+ system ( "git commit -m 'Generating docs for version #{ Grape :: VERSION } .'" )
41
57
system ( "git push origin gh-pages" )
42
58
end
43
59
end
You can’t perform that action at this time.
0 commit comments