Permalink
Browse files

Updated yard setup.

  • Loading branch information...
jdantonio committed Jul 8, 2014
1 parent 1005257 commit b3fc5d99daccc20ebc5041619fa6cb7b78ff5a8e
View
@@ -0,0 +1,14 @@
--protected
--no-private
--embed-mixins
--output-dir ./yardoc
--markup markdown
--title=Functional Ruby
--template default
--template-path ./yard-template
./lib/**/*.rb
./ext/concurrent_ruby_ext/**/*.c
-
README.md
LICENSE
View
15 Gemfile
@@ -3,15 +3,20 @@ source 'https://rubygems.org'
gemspec
group :development do
gem 'rake', '~> 10.1.1'
gem 'countloc', '~> 0.4.0', platforms: :mri
gem 'yard', '~> 0.8.7.3'
gem 'inch', '~> 0.3.2', platforms: :mri
gem 'rake', '~> 10.3.2'
end
group :testing do
#gem 'rspec', '~> 3.0.0'
gem 'rspec', '~> 2.14.1'
gem 'simplecov', '~> 0.8.2'
gem 'coveralls', '~> 0.7.0', require: false
gem 'timecop', '~> 0.7.1'
gem 'fakefs', '~> 0.5.2'
end
group :documentation do
gem 'countloc', '~> 0.4.0', platforms: :mri, require: false
gem 'yard', '~> 0.8.7.4', require: false
gem 'inch', '~> 0.4.6', platforms: :mri, require: false
gem 'redcarpet', '~> 3.1.2', platforms: :mri # understands github markdown
end
View
@@ -1,7 +1,7 @@
$:.push File.join(File.dirname(__FILE__), 'lib')
$:.push File.join(File.dirname(__FILE__), 'tasks/support')
require 'rubygems'
GEMSPEC = Gem::Specification.load('functional-ruby.gemspec')
require 'bundler/gem_tasks'
require 'rspec'
require 'rspec/core/rake_task'
@@ -10,12 +10,14 @@ require 'functional'
Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new(:spec)
$:.unshift 'tasks'
Dir.glob('tasks/**/*.rake').each do|rakefile|
load rakefile
end
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = '--color --backtrace --format documentation'
end
RSpec::Core::RakeTask.new(:travis_spec) do |t|
t.rspec_opts = '--tag ~@not_on_travis'
end
View
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.author = "Jerry D'Antonio"
s.email = 'jerry.dantonio@gmail.com'
s.homepage = 'https://github.com/jdantonio/functional-ruby/'
s.summary = 'Erlang and Clojure inspired functional programming tools for Ruby.'
s.summary = 'Erlang, Clojure, and Go inspired functional programming tools to Ruby.'
s.license = 'MIT'
s.date = Time.now.strftime('%Y-%m-%d')
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = Dir['README*', 'LICENSE*', 'CHANGELOG*']
s.require_paths = ['lib']
s.required_ruby_version = '>= 1.9.2'
s.required_ruby_version = '>= 1.9.3'
s.add_development_dependency 'bundler'
end
View
@@ -1,18 +1,5 @@
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.start do
project_name 'functional-ruby'
add_filter '/md/'
add_filter '/pkg/'
add_filter '/spec/'
add_filter '/tasks/'
end
Coveralls.wear!
require 'functional'
View
@@ -0,0 +1,44 @@
require 'yard'
YARD::Rake::YardocTask.new
root = File.expand_path File.join(File.dirname(__FILE__), '..')
namespace :yard do
cmd = lambda do |command|
puts ">> executing: #{command}"
system command or raise "#{command} failed"
end
desc 'Pushes generated documentation to github pages: http://jdantonio.github.io/functional-ruby/'
task :push => [:setup, :yard] do
message = Dir.chdir(root) do
`git log -n 1 --oneline`.strip
end
puts "Generating commit: #{message}"
Dir.chdir "#{root}/yardoc" do
cmd.call "git ac -m '#{message}'"
cmd.call 'git push origin gh-pages'
end
end
desc 'Setups second clone in ./yardoc dir for pushing doc to github'
task :setup do
unless File.exist? "#{root}/yardoc/.git"
cmd.call "rm -rf #{root}/yardoc" if File.exist?("#{root}/yardoc")
Dir.chdir "#{root}" do
cmd.call 'git clone --single-branch --branch gh-pages git@github.com:jdantonio/functional-ruby.git ./yardoc'
end
end
Dir.chdir "#{root}/yardoc" do
cmd.call 'git fetch origin'
cmd.call 'git reset --hard origin/gh-pages'
end
end
end
@@ -0,0 +1,125 @@
/* Override this file with custom rules */
body {
line-height: 18px;
}
.docstring code, .docstring .object_link a, #filecontents code {
padding: 0px 3px 1px 3px;
border: 1px solid #eef;
background: #f5f5ff;
}
#filecontents pre code, .docstring pre code {
border: none;
background: none;
padding: 0;
}
#filecontents pre.code, .docstring pre.code, .tags pre.example, .docstring code, .docstring .object_link a,
#filecontents code {
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
}
/* syntax highlighting */
.source_code {
display: none;
padding: 3px 8px;
border-left: 8px solid #ddd;
margin-top: 5px;
}
#filecontents pre.code, .docstring pre.code, .source_code pre {
font-family: monospace;
}
#filecontents pre.code, .docstring pre.code {
display: block;
}
.source_code .lines {
padding-right: 12px;
color: #555;
text-align: right;
}
#filecontents pre.code, .docstring pre.code,
.tags pre.example {
padding: 5px 12px;
margin-top: 4px;
border: 1px solid #eef;
background: #f5f5ff;
}
pre.code {
color: #000;
}
pre.code .info.file {
color: #555;
}
pre.code .val {
color: #036A07;
}
pre.code .tstring_content,
pre.code .heredoc_beg, pre.code .heredoc_end,
pre.code .qwords_beg, pre.code .qwords_end,
pre.code .tstring, pre.code .dstring {
color: #036A07;
}
pre.code .fid,
pre.code .rubyid_new,
pre.code .rubyid_to_s,
pre.code .rubyid_to_sym,
pre.code .rubyid_to_f,
pre.code .rubyid_to_i,
pre.code .rubyid_each {
color: inherit;
}
pre.code .comment {
color: #777;
font-style: italic;
}
pre.code .const, pre.code .constant {
color: inherit;
font-weight: bold;
font-style: italic;
}
pre.code .label,
pre.code .symbol {
color: #C5060B;
}
pre.code .kw,
pre.code .rubyid_require,
pre.code .rubyid_extend,
pre.code .rubyid_include,
pre.code .int {
color: #0000FF;
}
pre.code .ivar {
color: #660E7A;
}
pre.code .gvar,
pre.code .rubyid_backref,
pre.code .rubyid_nth_ref {
color: #6D79DE;
}
pre.code .regexp, .dregexp {
color: #036A07;
}
pre.code a {
border-bottom: 1px dotted #bbf;
}
@@ -0,0 +1,15 @@
<div id="footer">
Generated on <%= Time.now.strftime("%c") %> by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
<%= YARD::VERSION %> (ruby-<%= RUBY_VERSION %>).
</div>
<script>
// (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
// (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
// m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
// })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
//
// ga('create', 'UA-4005004-8', 'pitr.ch');
// ga('send', 'pageview');
</script>

0 comments on commit b3fc5d9

Please sign in to comment.