Skip to content

Commit 2c4a370

Browse files
committed
Fixing yard docs
1 parent e390ea2 commit 2c4a370

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+60
-59
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.yardoc
1414
coverage
1515
data
16-
doc
16+
docs
1717
Gemfile.lock
1818
.ruby-gemset
1919
.ruby-version

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ source 'https://rubygems.org'
22

33
gemspec
44
gem 'rake'
5+
gem 'yard'
56

67
platforms :rbx do
78
gem 'racc'

Rakefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,15 @@ task :release => :spec do
3535
system "gem push mongo-#{Mongo::VERSION}.gem"
3636
system "rm mongo-#{Mongo::VERSION}.gem"
3737
end
38+
39+
desc "Generate all documentation"
40+
task :docs => 'docs:yard'
41+
42+
namespace :docs do
43+
desc "Generate yard documention"
44+
task :yard do
45+
out = File.join('docs', Mongo::VERSION)
46+
FileUtils.rm_rf(out)
47+
system "yardoc -o #{out} --title mongo-#{Mongo::VERSION}"
48+
end
49+
end

lib/mongo/auth.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ module Auth
5656
# Get the authorization strategy for the provided auth mechanism.
5757
#
5858
# @example Get the strategy.
59-
# Auth.get(:mongodb_cr)
59+
# Auth.get(user)
6060
#
61-
# @param [ Symbol ] mechanism The authorization mechanism.
61+
# @param [ Auth::User ] user The user object.
6262
#
6363
# @return [ CR, X509, LDAP, Kerberos ] The auth strategy.
6464
#

lib/mongo/cluster/topology/replica_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def display_name
5454
#
5555
# @param [ Server::Description ] description The description of the
5656
# elected primary.
57-
# @param [ Array<Server> ] server The list of known servers to the
57+
# @param [ Array<Server> ] servers The list of known servers to the
5858
# cluster.
5959
#
6060
# @return [ ReplicaSet ] The topology.

lib/mongo/cluster/topology/sharded.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def display_name
4545
#
4646
# @param [ Server::Description ] description The description of the
4747
# elected primary.
48-
# @param [ Array<Server> ] server The list of known servers to the
48+
# @param [ Array<Server> ] servers The list of known servers to the
4949
# cluster.
5050
#
5151
# @return [ Sharded ] The topology.

lib/mongo/cluster/topology/standalone.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def display_name
4545
#
4646
# @param [ Server::Description ] description The description of the
4747
# elected primary.
48-
# @param [ Array<Server> ] server The list of known servers to the
48+
# @param [ Array<Server> ] servers The list of known servers to the
4949
# cluster.
5050
#
5151
# @return [ Standalone ] The topology.

lib/mongo/cluster/topology/unknown.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def display_name
4949
#
5050
# @param [ Server::Description ] description The description of the
5151
# elected primary.
52-
# @param [ Array<Server> ] server The list of known servers to the
52+
# @param [ Array<Server> ] servers The list of known servers to the
5353
# cluster.
5454
#
5555
# @return [ Sharded, ReplicaSet ] The new topology.

lib/mongo/collection/view/readable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def show_disk_loc(value = nil)
271271
# @example Set the number to skip.
272272
# view.skip(10)
273273
#
274-
# @param [ Integer ] skip Number of docs to skip.
274+
# @param [ Integer ] number Number of docs to skip.
275275
#
276276
# @return [ Integer, View ] Either the skip value or a
277277
# new +View+.

lib/mongo/collection/view/writable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def find_one_and_delete
4545
# @example Find a document and replace it, returning the new document.
4646
# view.find_one_and_replace({ name: 'test' }, :return_document => :after)
4747
#
48-
# @param [ BSON::Document ] document The updates.
48+
# @param [ BSON::Document ] replacement The updates.
4949
# @param [ Hash ] opts The options.
5050
#
5151
# @option opts [ Symbol ] :return_document Either :before or :after.

0 commit comments

Comments
 (0)