Skip to content

Commit

Permalink
Use rdoc-ref: instead of link: for links in RDoc
Browse files Browse the repository at this point in the history
Using link: is not portable, while rdoc-ref: is portable, according
to rdoc issue #188.
  • Loading branch information
jeremyevans committed Oct 21, 2013
1 parent cde4cb8 commit b8d2d77
Show file tree
Hide file tree
Showing 33 changed files with 63 additions and 63 deletions.
10 changes: 5 additions & 5 deletions README.rdoc
Expand Up @@ -70,7 +70,7 @@ Sequel includes an IRB console for quick access to databases (usually referred t

You get an IRB session with the database object stored in DB.

In addition to providing an IRB shell (the default behavior), bin/sequel also has support for migrating databases, dumping schema migrations, and copying databases. See the {bin/sequel guide}[link:files/doc/bin_sequel_rdoc.html] for more details.
In addition to providing an IRB shell (the default behavior), bin/sequel also has support for migrating databases, dumping schema migrations, and copying databases. See the {bin/sequel guide}[rdoc-ref:doc/bin_sequel.rdoc] for more details.

== An Introduction

Expand Down Expand Up @@ -250,12 +250,12 @@ After filtering, you can retrieve the matching records by using any of the retri

my_posts.each{|row| p row}

See the {Dataset Filtering}[link:files/doc/dataset_filtering_rdoc.html] file for more details.
See the {Dataset Filtering}[rdoc-ref:doc/dataset_filtering.rdoc] file for more details.

=== Security

Designing apps with security in mind is a best practice.
Please read the {Security Guide}[link:files/doc/security_rdoc.html] for details on security
Please read the {Security Guide}[rdoc-ref:doc/security.rdoc] for details on security
issues that you should be aware of when using Sequel.

=== Summarizing Records
Expand Down Expand Up @@ -313,7 +313,7 @@ You can also specify descending order:

=== Core Extensions

Note the use of <tt>Sequel.desc(:stamp)</tt> in the above example. Much of Sequel's DSL uses this style, calling methods on the Sequel module that return SQL expression objects. Sequel also ships with a {core_extensions extension}[link:files/doc/core_extensions_rdoc.html]) that integrates Sequel's DSL better into the ruby language, allowing you to write:
Note the use of <tt>Sequel.desc(:stamp)</tt> in the above example. Much of Sequel's DSL uses this style, calling methods on the Sequel module that return SQL expression objects. Sequel also ships with a {core_extensions extension}[rdoc-ref:doc/core_extensions.rdoc]) that integrates Sequel's DSL better into the ruby language, allowing you to write:

:stamp.desc

Expand Down Expand Up @@ -574,7 +574,7 @@ That will just change the value for the object, it will not update the row in th

=== Mass assignment

You can also set the values for multiple columns in a single method call, using one of the mass-assignment methods. See the {mass assignment guide}[link:files/doc/mass_assignment_rdoc.html] for details. For example +set+ updates the model's column values without saving:
You can also set the values for multiple columns in a single method call, using one of the mass-assignment methods. See the {mass assignment guide}[rdoc-ref:doc/mass_assignment.rdoc] for details. For example +set+ updates the model's column values without saving:

post.set(:title=>'hey there', :updated_by=>'foo')

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -99,7 +99,7 @@ if rdoc_task_class
rdoc_task_class.new(:website_rdoc_plugins) do |rdoc|
rdoc.rdoc_dir = "www/public/rdoc-plugins"
rdoc.options += RDOC_DEFAULT_OPTS + %w'--main Sequel --no-ignore-invalid'
rdoc.rdoc_files.add %w"lib/sequel/{extensions,plugins}/**/*.rb"
rdoc.rdoc_files.add %w"lib/sequel/{extensions,plugins}/**/*.rb doc/core_*"
end

desc "Update sequel.rubyforge.org"
Expand Down
2 changes: 1 addition & 1 deletion doc/active_record.rdoc
Expand Up @@ -332,7 +332,7 @@ With either way of eager loading, you must call +all+ to retrieve all records at

Like ActiveRecord, Sequel supports cascading of eager loading for both methods of eager loading.

Unlike ActiveRecord, Sequel allows you to eager load custom associations using the <tt>:eager_loader</tt> and <tt>:eager_grapher</tt> association options. See the {Advanced Associations guide}[link:files/doc/advanced_associations_rdoc.html] for more details.
Unlike ActiveRecord, Sequel allows you to eager load custom associations using the <tt>:eager_loader</tt> and <tt>:eager_grapher</tt> association options. See the {Advanced Associations guide}[rdoc-ref:doc/advanced_associations.rdoc] for more details.

Table aliasing when eager loading via +eager_graph+ is different in Sequel than ActiveRecord. Sequel will always attempt to use the association name, not the table name, for any associations. If the association name has already been used, Sequel will append _N to it, where N starts at 0 and increases by 1. For example, for a self referential association:

Expand Down
6 changes: 3 additions & 3 deletions doc/association_basics.rdoc
Expand Up @@ -749,7 +749,7 @@ added methods:
ds.model_object # @artist
ds.association_reflection # same as Artist.association_reflection(:albums)

For a more info on Sequel's reflection capabilities see the {Reflection page}[link:files/doc/reflection_rdoc.html].
For a more info on Sequel's reflection capabilities see the {Reflection page}[rdoc-ref:doc/reflection.rdoc].

== Overriding Method Behavior

Expand Down Expand Up @@ -1055,7 +1055,7 @@ the artist can perform any one of four tasks for the lyric:

A module or array of modules to extend the dataset with. These are used to
set up association extensions. For more information , please see the
{Advanced Associations page}[link:files/doc/advanced_associations_rdoc.html].
{Advanced Associations page}[rdoc-ref:doc/advanced_associations.rdoc].

==== :primary_key

Expand Down Expand Up @@ -1249,7 +1249,7 @@ to eagerly load:

A custom loader to use when eagerly load associated objects via eager.
For many details and examples of custom eager loaders, please see the
{Advanced Associations guide}[link:files/doc/advanced_associations_rdoc.html].
{Advanced Associations guide}[rdoc-ref:doc/advanced_associations.rdoc].

==== :eager_loader_key

Expand Down
4 changes: 2 additions & 2 deletions doc/bin_sequel.rdoc
Expand Up @@ -24,7 +24,7 @@ In general, you probably want to provide a connection string argument to bin/seq
sequel postgres://user:pass@host/database_name
sequel mysql2://user:pass@host/database_name

See the {Connecting to a database guide}[link:files/doc/opening_databases_rdoc.html] for more details about and examples of connection strings.
See the {Connecting to a database guide}[rdoc-ref:doc/opening_databases.rdoc] for more details about and examples of connection strings.

=== YAML Connection File

Expand Down Expand Up @@ -77,7 +77,7 @@ You can use the -M attribute to set the version to migrate to:

sequel -m /path/to/migrations/dir -M 3 postgres://host/database

See the {migration guide}[link:files/doc/migration_rdoc.html] for more details about migrations.
See the {migration guide}[rdoc-ref:doc/migration.rdoc] for more details about migrations.

=== Dump Schemas

Expand Down
2 changes: 1 addition & 1 deletion doc/cheat_sheet.rdoc
Expand Up @@ -63,7 +63,7 @@ Without a filename argument, the sqlite adapter will setup a new sqlite database
dataset.inject(0){|sum, r| sum + r[:value]}
dataset.sum(:value) # better

== Filtering (see also {Dataset Filtering}[link:files/doc/dataset_filtering_rdoc.html])
== Filtering (see also {Dataset Filtering}[rdoc-ref:doc/dataset_filtering.rdoc])

=== Equality

Expand Down
2 changes: 1 addition & 1 deletion doc/dataset_filtering.rdoc
Expand Up @@ -29,7 +29,7 @@ If you are specifying a filter/selection/order, you can use a virtual row block:

items.select{avg(price)}

You can also use the {core_extensions extension}[link:files/doc/core_extensions_rdoc.html] and the +sql_function+ method:
You can also use the {core_extensions extension}[rdoc-ref:doc/core_extensions.rdoc] and the +sql_function+ method:

:avg.sql_function(:price)

Expand Down
4 changes: 2 additions & 2 deletions doc/migration.rdoc
Expand Up @@ -26,7 +26,7 @@ you generally need to run Sequel's migrator with <tt>bin/sequel -m</tt>:
Migrations in Sequel use a very simple DSL via the <tt>Sequel.migration</tt>
method, and inside the DSL, use the <tt>Sequel::Database</tt> schema
modification methods such as +create_table+ and +alter_table+.
See the {schema modification guide}[link:files/doc/schema_modification_rdoc.html]
See the {schema modification guide}[rdoc-ref:doc/schema_modification.rdoc]
for details on the schema modification methods you can use.

== A Basic Migration
Expand Down Expand Up @@ -144,7 +144,7 @@ Migrations themselves do not contain any schema modification methods, but they m
any of the <tt>Sequel::Database</tt> modification methods, of which there are many. The main
ones are +create_table+ and +alter_table+, but Sequel also comes with numerous other schema
modification methods, most of which are shortcuts for +alter_table+ (all of these methods are
described in more detail in the {schema modification guide}[link:files/doc/schema_modification_rdoc.html]):
described in more detail in the {schema modification guide}[rdoc-ref:doc/schema_modification.rdoc]):

* add_column
* add_index
Expand Down
4 changes: 2 additions & 2 deletions doc/object_model.rdoc
Expand Up @@ -204,7 +204,7 @@ If Sequel needs to represent an SQL concept that does not map directly to an exi
ruby class, it will generally use a Sequel::SQL::Expression subclass to represent that
concept.

Some of the examples below show examples that require the {core_extensions extension}[link:files/doc/core_extensions_rdoc.html].
Some of the examples below show examples that require the {core_extensions extension}[rdoc-ref:doc/core_extensions.rdoc].

=== Sequel::LiteralString

Expand Down Expand Up @@ -530,7 +530,7 @@ block expression support:
In the above code, the block is instance-evaled inside a VirtualRow instance.

These objects are usually not instantiated manually. See the
{Virtual Row Guide}[link:files/doc/virtual_rows_rdoc.html] for details.
{Virtual Row Guide}[rdoc-ref:doc/virtual_rows.rdoc] for details.

=== Sequel::SQL::Window

Expand Down
6 changes: 3 additions & 3 deletions doc/querying.rdoc
Expand Up @@ -11,7 +11,7 @@ aims to be a gentle introduction to Sequel's querying support.
While you can easily use raw SQL with Sequel, a large part of the
advantage you get from using Sequel is Sequel's ability to abstract
SQL from you and give you a much nicer interface. Sequel also ships with
a {core_extensions extension}[link:files/doc/core_extensions_rdoc.html],
a {core_extensions extension}[rdoc-ref:doc/core_extensions.rdoc],
which better integrates Sequel's DSL into the ruby language.

== Retrieving Objects
Expand All @@ -25,7 +25,7 @@ method you can use.
=== Sequel::Dataset

If you are new to Sequel and aren't familiar with Sequel, you should probably
read the {"Dataset Basics" guide}[link:files/doc/dataset_basics_rdoc.html],
read the {"Dataset Basics" guide}[rdoc-ref:doc/dataset_basics.rdoc],
then come back here.

=== Retrieving a Single Object
Expand Down Expand Up @@ -380,7 +380,7 @@ If a block is passed to a filter, it is treated as a virtual row block:
Artist.where{id > 5}
# SELECT * FROM artists WHERE id > 5

You can learn more about virtual row blocks in the {"Virtual Rows" guide}[link:files/doc/virtual_rows_rdoc.html].
You can learn more about virtual row blocks in the {"Virtual Rows" guide}[rdoc-ref:doc/virtual_rows.rdoc].

You can provide both regular arguments and a block, in which case the results
will be ANDed together:
Expand Down
4 changes: 2 additions & 2 deletions doc/security.rdoc
Expand Up @@ -79,7 +79,7 @@ in which case Sequel automatically literalizes the input:
Sequel generally treats ruby strings as SQL strings (escaping them correctly), and
not as raw SQL. However, you can convert a ruby string to a literal string, and
Sequel will then treat it as raw SQL. This is typically done through String#lit
if the {core_extensions}[link:files/doc/core_extensions_rdoc.html] are in use,
if the {core_extensions}[rdoc-ref:doc/core_extensions.rdoc] are in use,
or Sequel.lit[rdoc-ref:Sequel::SQL::Builders#lit] if they are not in use.

'a'.lit
Expand Down Expand Up @@ -308,7 +308,7 @@ practice, though being explicit on a per-call basis is still recommended:
Album.set_allowed_columns(:name, :copies_sold)
Album.create(params[:album]) # Only name and copies_sold set

For more details on the mass assignment methods, see the {Mass Assignment Guide}[link:files/doc/mass_assignment_rdoc.html].
For more details on the mass assignment methods, see the {Mass Assignment Guide}[rdoc-ref:doc/mass_assignment.rdoc].

== General Parameter Handling

Expand Down
6 changes: 3 additions & 3 deletions doc/sql.rdoc
Expand Up @@ -78,7 +78,7 @@ Almost everywhere in Sequel, you can drop down to literal SQL by providing a lit
DB[:albums].select('name') # SELECT 'name' FROM albums
DB[:albums].select(Sequel.lit('name')) # SELECT name FROM albums

For a simpler way of creating literal strings, you can also use the {core_extensions extension}[link:files/doc/core_extensions_rdoc.html], which adds the <tt>String#lit</tt> method, and other methods that integrate Sequel's DSL with the ruby language:
For a simpler way of creating literal strings, you can also use the {core_extensions extension}[rdoc-ref:doc/core_extensions.rdoc], which adds the <tt>String#lit</tt> method, and other methods that integrate Sequel's DSL with the ruby language:

DB[:albums].select('name'.lit)

Expand Down Expand Up @@ -137,7 +137,7 @@ The other way to qualify an identifier is to use the <tt>Sequel.qualify</tt> wit

Sequel.qualify(:table, :column) # "table"."column"

Another way to generate identifiers is to use Sequel's {virtual row support}[link:files/doc/virtual_rows_rdoc.html]:
Another way to generate identifiers is to use Sequel's {virtual row support}[rdoc-ref:doc/virtual_rows.rdoc]:

DB[:albums].select{name} # SELECT "name" FROM "albums"
DB[:albums].select{albums__name} # SELECT "albums"."name" FROM "albums"
Expand Down Expand Up @@ -573,4 +573,4 @@ Note how +update+ and +delete+ used the +where+ argument, but that +insert+ did

=== Methods Used for Each SQL Clause

To see which methods exist that affect each SQL clause, see the {"Dataset Basics" guide}[link:files/doc/dataset_basics_rdoc.html].
To see which methods exist that affect each SQL clause, see the {"Dataset Basics" guide}[rdoc-ref:doc/dataset_basics.rdoc].
2 changes: 1 addition & 1 deletion doc/validations.rdoc
Expand Up @@ -299,7 +299,7 @@ Additionally, you can also include an optional options hash as the last argument
:message :: The message to use
:only_if_modified :: Only check the uniqueness if the object is new or one of the columns has been modified.

+validates_unique+ is the only method in +validation_helpers+ that checks with the database. Attempting to validate uniqueness outside of the database suffers from a race condition, so any time you want to add a uniqueness validation, you should make sure to add a uniqueness constraint or unique index on the underlying database table. See the {"Migrations and Schema Modification" guide}[link:files/doc/migration_rdoc.html] for details on how to do that.
+validates_unique+ is the only method in +validation_helpers+ that checks with the database. Attempting to validate uniqueness outside of the database suffers from a race condition, so any time you want to add a uniqueness validation, you should make sure to add a uniqueness constraint or unique index on the underlying database table. See the {"Migrations and Schema Modification" guide}[rdoc-ref:doc/migration.rdoc] for details on how to do that.

== +validation_helpers+ Options

Expand Down
8 changes: 4 additions & 4 deletions lib/sequel/core.rb
Expand Up @@ -17,8 +17,8 @@
#
# Sequel.sqlite('blog.db'){|db| puts db[:users].count}
#
# For a more expanded introduction, see the {README}[link:files/README_rdoc.html].
# For a quicker introduction, see the {cheat sheet}[link:files/doc/cheat_sheet_rdoc.html].
# For a more expanded introduction, see the {README}[rdoc-ref:README.rdoc].
# For a quicker introduction, see the {cheat sheet}[rdoc-ref:doc/cheat_sheet.rdoc].
module Sequel
@convert_two_digit_years = true
@datetime_class = Time
Expand Down Expand Up @@ -89,8 +89,8 @@ def self.condition_specifier?(obj)
#
# Sequel.connect('sqlite://blog.db'){|db| puts db[:users].count}
#
# For details, see the {"Connecting to a Database" guide}[link:files/doc/opening_databases_rdoc.html].
# To set up a master/slave or sharded database connection, see the {"Master/Slave Databases and Sharding" guide}[link:files/doc/sharding_rdoc.html].
# For details, see the {"Connecting to a Database" guide}[rdoc-ref:doc/opening_databases.rdoc].
# To set up a master/slave or sharded database connection, see the {"Master/Slave Databases and Sharding" guide}[rdoc-ref:doc/sharding.rdoc].
def self.connect(*args, &block)
Database.connect(*args, &block)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sequel/database/schema_generator.rb
Expand Up @@ -13,7 +13,7 @@ module Schema
# the column method, which makes for a nicer DSL.
#
# For more information on Sequel's support for schema modification, see
# the {"Schema Modification" guide}[link:files/doc/schema_modification_rdoc.html].
# the {"Schema Modification" guide}[rdoc-ref:doc/schema_modification.rdoc].
class CreateTableGenerator
# Classes specifying generic types that Sequel will convert to database-specific types.
GENERIC_TYPES=[String, Integer, Fixnum, Bignum, Float, Numeric, BigDecimal,
Expand Down
4 changes: 2 additions & 2 deletions lib/sequel/database/schema_methods.rb
Expand Up @@ -71,7 +71,7 @@ def add_index(table, columns, options=OPTS)
# definitions using <tt>create_table</tt>, and +add_index+ accepts all the options
# available for index definition.
#
# See <tt>Schema::AlterTableGenerator</tt> and the {"Migrations and Schema Modification" guide}[link:files/doc/migration_rdoc.html].
# See <tt>Schema::AlterTableGenerator</tt> and the {"Migrations and Schema Modification" guide}[rdoc-ref:doc/migration.rdoc].
def alter_table(name, generator=nil, &block)
generator ||= alter_table_generator(&block)
remove_cached_schema(name)
Expand Down Expand Up @@ -159,7 +159,7 @@ def create_join_table(hash, options=OPTS)
# :inherits :: Inherit from a different tables. An array can be
# specified to inherit from multiple tables.
#
# See <tt>Schema::Generator</tt> and the {"Schema Modification" guide}[link:files/doc/schema_modification_rdoc.html].
# See <tt>Schema::Generator</tt> and the {"Schema Modification" guide}[rdoc-ref:doc/schema_modification.rdoc].
def create_table(name, options=OPTS, &block)
remove_cached_schema(name)
options = {:generator=>options} if options.is_a?(Schema::CreateTableGenerator)
Expand Down
2 changes: 1 addition & 1 deletion lib/sequel/dataset.rb
Expand Up @@ -21,7 +21,7 @@ module Sequel
# Datasets are Enumerable objects, so they can be manipulated using any
# of the Enumerable methods, such as map, inject, etc.
#
# For more information, see the {"Dataset Basics" guide}[link:files/doc/dataset_basics_rdoc.html].
# For more information, see the {"Dataset Basics" guide}[rdoc-ref:doc/dataset_basics.rdoc].
class Dataset
OPTS = Sequel::OPTS

Expand Down
2 changes: 1 addition & 1 deletion lib/sequel/dataset/prepared_statements.rb
Expand Up @@ -3,7 +3,7 @@ class Dataset
# ---------------------
# :section: 8 - Methods related to prepared statements or bound variables
# On some adapters, these use native prepared statements and bound variables, on others
# support is emulated. For details, see the {"Prepared Statements/Bound Variables" guide}[link:files/doc/prepared_statements_rdoc.html].
# support is emulated. For details, see the {"Prepared Statements/Bound Variables" guide}[rdoc-ref:doc/prepared_statements.rdoc].
# ---------------------

PREPARED_ARG_PLACEHOLDER = LiteralString.new('?').freeze
Expand Down
4 changes: 2 additions & 2 deletions lib/sequel/dataset/query.rb
Expand Up @@ -849,7 +849,7 @@ def unordered
# where also accepts a block, which should return one of the above argument
# types, and is treated the same way. This block yields a virtual row object,
# which is easy to use to create identifiers and functions. For more details
# on the virtual row support, see the {"Virtual Rows" guide}[link:files/doc/virtual_rows_rdoc.html]
# on the virtual row support, see the {"Virtual Rows" guide}[rdoc-ref:doc/virtual_rows.rdoc]
#
# If both a block and regular argument are provided, they get ANDed together.
#
Expand Down Expand Up @@ -878,7 +878,7 @@ def unordered
# software = dataset.where(:category => 'software').where{price < 100}
# # SELECT * FROM items WHERE ((category = 'software') AND (price < 100))
#
# See the the {"Dataset Filtering" guide}[link:files/doc/dataset_filtering_rdoc.html] for more examples and details.
# See the the {"Dataset Filtering" guide}[rdoc-ref:doc/dataset_filtering.rdoc] for more examples and details.
def where(*cond, &block)
_filter(:where, *cond, &block)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/sequel/extensions/pg_array.rb
Expand Up @@ -17,8 +17,8 @@
#
# Sequel.pg_array(array)
#
# If you have loaded the {core_extensions extension}[link:files/doc/core_extensions_rdoc.html],
# or you have loaded the {core_refinements extension}[link:files/doc/core_refinements_rdoc.html]
# If you have loaded the {core_extensions extension}[rdoc-ref:doc/core_extensions.rdoc],
# or you have loaded the core_refinements extension
# and have activated refinements for the file, you can also use Array#pg_array:
#
# array.pg_array
Expand Down

0 comments on commit b8d2d77

Please sign in to comment.