Skip to content

Commit

Permalink
Use YARD to build docs for better linking in docs (#154)
Browse files Browse the repository at this point in the history
YARD is the current standard for documentation in Ruby. It provides a similar interface as most other language libraries, including the ability to define the types of params and return values.

Bringing it in will make life a little bit easier as we add more detailed method level documentation through the course of the 4.X release.
  • Loading branch information
zspencer authored Nov 30, 2017
1 parent 086b4ae commit b33b833
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 7 deletions.
21 changes: 21 additions & 0 deletions bin/yard
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'yard' is installed as part of a gem, and
# this file is here to facilitate running it.
#

bundle_binstub = File.expand_path("../bundle", __FILE__)
load(bundle_binstub) if File.file?(bundle_binstub)

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require "rubygems"
require "bundler/setup"

load Gem.bin_path("yard", "yard")
21 changes: 21 additions & 0 deletions bin/yardoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'yardoc' is installed as part of a gem, and
# this file is here to facilitate running it.
#

bundle_binstub = File.expand_path("../bundle", __FILE__)
load(bundle_binstub) if File.file?(bundle_binstub)

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require "rubygems"
require "bundler/setup"

load Gem.bin_path("yard", "yardoc")
21 changes: 21 additions & 0 deletions bin/yri
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'yri' is installed as part of a gem, and
# this file is here to facilitate running it.
#

bundle_binstub = File.expand_path("../bundle", __FILE__)
load(bundle_binstub) if File.file?(bundle_binstub)

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require "rubygems"
require "bundler/setup"

load Gem.bin_path("yard", "yri")
3 changes: 2 additions & 1 deletion gemfiles/Gemfile.rails4.lock
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ GEM
crack (>= 0.3.2)
hashdiff
yajl-ruby (1.3.0)
yard (0.9.12)

PLATFORMS
ruby
Expand All @@ -226,12 +227,12 @@ DEPENDENCIES
pry-nav (>= 0.2.4)
pry-stack_explorer (>= 0.4.9.2)
rails (~> 4.2)
rdoc (>= 3.12)
rspec (>= 3.5.0)
shoulda (>= 3.4.0)
sinatra (>= 1.4.7)
webmock (>= 2.1.0)
yajl-ruby (~> 1.2, >= 1.2.1)
yard (>= 0.9.12)

BUNDLED WITH
1.16.0
3 changes: 2 additions & 1 deletion gemfiles/Gemfile.rails5.lock
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ GEM
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
yajl-ruby (1.3.0)
yard (0.9.12)

PLATFORMS
ruby
Expand All @@ -234,12 +235,12 @@ DEPENDENCIES
pry-nav (>= 0.2.4)
pry-stack_explorer (>= 0.4.9.2)
rails (~> 5)
rdoc (>= 3.12)
rspec (>= 3.5.0)
shoulda (>= 3.4.0)
sinatra (>= 1.4.7)
webmock (>= 2.1.0)
yajl-ruby (~> 1.2, >= 1.2.1)
yard (>= 0.9.12)

BUNDLED WITH
1.16.0
3 changes: 2 additions & 1 deletion gemfiles/Gemfile.rest-client.1.lock
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ GEM
crack (>= 0.3.2)
hashdiff
yajl-ruby (1.3.0)
yard (0.9.12)

PLATFORMS
ruby
Expand All @@ -153,13 +154,13 @@ DEPENDENCIES
pry (>= 0.10.4)
pry-nav (>= 0.2.4)
pry-stack_explorer (>= 0.4.9.2)
rdoc (>= 3.12)
rest-client (~> 1.6)
rspec (>= 3.5.0)
shoulda (>= 3.4.0)
sinatra (>= 1.4.7)
webmock (>= 2.1.0)
yajl-ruby (~> 1.2, >= 1.2.1)
yard (>= 0.9.12)

BUNDLED WITH
1.16.0
3 changes: 2 additions & 1 deletion gemfiles/Gemfile.rest-client.2.lock
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ GEM
crack (>= 0.3.2)
hashdiff
yajl-ruby (1.3.0)
yard (0.9.12)

PLATFORMS
ruby
Expand All @@ -153,13 +154,13 @@ DEPENDENCIES
pry (>= 0.10.4)
pry-nav (>= 0.2.4)
pry-stack_explorer (>= 0.4.9.2)
rdoc (>= 3.12)
rest-client (~> 2.0)
rspec (>= 3.5.0)
shoulda (>= 3.4.0)
sinatra (>= 1.4.7)
webmock (>= 2.1.0)
yajl-ruby (~> 1.2, >= 1.2.1)
yard (>= 0.9.12)

BUNDLED WITH
1.16.0
7 changes: 4 additions & 3 deletions nylas.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
gem.version = Nylas::VERSION
gem.email = "[email protected]"
gem.authors = ["Nylas, Inc."]
gem.files = Dir.glob("lib/**/*.rb")
gem.files = Dir.glob("lib/**/*.rb") + ['CHANGELOG.md', 'LICENSE.txt', 'README.md', __FILE__]
gem.platform = "ruby"

gem.metadata = {
Expand All @@ -19,14 +19,15 @@ Gem::Specification.new do |gem|
"documentation_uri" => "http://www.rubydoc.info/gems/nylas",
"homepage_uri" => "https://www.nylas.com",
"source_code_uri" => "https://github.com/nylas/nylas-ruby",
"wiki_uri" => "https://github.com/nylas/nylas-ruby/wiki"
"wiki_uri" => "https://github.com/nylas/nylas-ruby/wiki",
"yard.run" => "yri"
}

gem.add_runtime_dependency "rest-client", ">= 1.6"

gem.add_development_dependency "rspec", ">= 3.5.0"
gem.add_development_dependency "shoulda", ">= 3.4.0"
gem.add_development_dependency "rdoc", ">= 3.12"
gem.add_development_dependency "yard", ">= 0.9.12"
gem.add_development_dependency "bundler", ">= 1.3.5"
gem.add_development_dependency "jeweler", ">= 2.1.2"
gem.add_development_dependency "pry", ">= 0.10.4"
Expand Down

0 comments on commit b33b833

Please sign in to comment.