Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Commit c8e9afb

Browse files
committed
Fixed do_postgres README indentation and added syntax highlighting
1 parent cab2e27 commit c8e9afb

File tree

10 files changed

+73
-51
lines changed

10 files changed

+73
-51
lines changed

do_derby/README.markdown

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ This driver is currently provided only for JRuby.
1515

1616
An example of usage:
1717

18-
@connection = DataObjects::Connection.new("derby://employees")
19-
@reader = @connection.create_command('SELECT * FROM users').execute_reader
20-
@reader.next!
18+
```ruby
19+
@connection = DataObjects::Connection.new("derby://employees")
20+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
21+
@reader.next!
22+
```
2123

2224
The `Connection` constructor should be passed either a DataObjects-style URL or
2325
JDBC-style URL:

do_h2/README.markdown

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ This driver is currently provided only for JRuby.
1515

1616
An example of usage:
1717

18-
@connection = DataObjects::Connection.new("h2://employees")
19-
@reader = @connection.create_command('SELECT * FROM users').execute_reader
20-
@reader.next!
18+
```ruby
19+
@connection = DataObjects::Connection.new("h2://employees")
20+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
21+
@reader.next!
22+
```
2123

2224
The `Connection` constructor should be passed either a DataObjects-style URL or
2325
JDBC-style URL:

do_hsqldb/README.markdown

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ This driver is currently provided only for JRuby.
1515

1616
An example of usage:
1717

18-
@connection = DataObjects::Connection.new("hsqldb://employees")
19-
@reader = @connection.create_command('SELECT * FROM users').execute_reader
20-
@reader.next!
18+
```ruby
19+
@connection = DataObjects::Connection.new("hsqldb://employees")
20+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
21+
@reader.next!
22+
```
2123

2224
The `Connection` constructor should be passed either a DataObjects-style URL or
2325
JDBC-style URL:

do_mysql/README.markdown

+10-8
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ This driver implements the DataObjects API for the MySQL relational database.
1414

1515
An example of usage:
1616

17-
# default user (root, no password); default port (3306)
18-
DataObjects::Connection.new("mysql://host/database")
19-
# specified user, specified port
20-
DataObjects::Connection.new("mysql://user:pass@host:8888/database")
21-
22-
@connection = DataObjects::Connection.new("mysql://localhost/employees")
23-
@reader = @connection.create_command('SELECT * FROM users').execute_reader
24-
@reader.next!
17+
```ruby
18+
# default user (root, no password); default port (3306)
19+
DataObjects::Connection.new("mysql://host/database")
20+
# specified user, specified port
21+
DataObjects::Connection.new("mysql://user:pass@host:8888/database")
22+
23+
@connection = DataObjects::Connection.new("mysql://localhost/employees")
24+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
25+
@reader.next!
26+
```
2527

2628
## Requirements
2729

do_openedge/README.markdown

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ This driver is currently provided only for JRuby.
2626

2727
An example of usage:
2828

29-
@connection = DataObjects::Connection.new("openedge://localhost:4000/sports2000")
30-
@reader = @connection.create_command('SELECT * FROM State').execute_reader
31-
@reader.next!
29+
```ruby
30+
@connection = DataObjects::Connection.new("openedge://localhost:4000/sports2000")
31+
@reader = @connection.create_command('SELECT * FROM State').execute_reader
32+
@reader.next!
33+
```
3234

3335
The `Connection` constructor should be passed either a DataObjects-style URI or
3436
JDBC-style URI:

do_oracle/README.markdown

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ This driver implements the DataObjects API for the Oracle relational database.
1414

1515
An example of usage:
1616

17-
@connection = DataObjects::Connection.new("oracle://employees")
18-
@reader = @connection.create_command('SELECT * FROM users').execute_reader
19-
@reader.next!
17+
```ruby
18+
@connection = DataObjects::Connection.new("oracle://employees")
19+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
20+
@reader.next!
21+
```
2022

2123
## Requirements
2224

do_postgres/README.markdown

+20-16
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ This driver implements the DataObjects API for the PostgreSQL relational databas
1414

1515
An example of usage:
1616

17-
# default user (postgres, postgres), default port (5432)
18-
DataObjects::Connection.new("postgres://host/database")
19-
# specified user, specified port
20-
DataObjects::Connection.new("postgres://user:pass@host:8888/database")
17+
```ruby
18+
# default user (postgres, postgres), default port (5432)
19+
DataObjects::Connection.new("postgres://host/database")
20+
# specified user, specified port
21+
DataObjects::Connection.new("postgres://user:pass@host:8888/database")
2122

22-
@connection = DataObjects::Connection.new("postgres://localhost/employees")
23-
@reader = @connection.create_command('SELECT * FROM users').execute_reader
24-
@reader.next!
23+
@connection = DataObjects::Connection.new("postgres://localhost/employees")
24+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
25+
@reader.next!
26+
```
2527

2628
## Requirements
2729

@@ -38,7 +40,9 @@ Additionally you should have the following prerequisites:
3840

3941
To install the gem:
4042

41-
gem install do_postgres
43+
```ruby
44+
gem install do_postgres
45+
```
4246

4347
To compile and install from source:
4448

@@ -59,15 +63,15 @@ To compile and install from source:
5963
* Run `rake-compiler cross-ruby`.
6064
* Run `rake-compiler update-config`.
6165

62-
* For JRuby extensions:
63-
* Install the Java Development Kit (provided if you are
64-
on a recent version of Mac OS X) from <http://java.sun.com>.
65-
* Install a recent version of JRuby. Ensure `jruby` is in your `PATH` and/or
66-
you have configured the `JRUBY_HOME` environment variable to point to your
67-
JRuby installation.
68-
* Install `data_objects` and `do_jdbc` with `jruby -S rake install`.
66+
* For JRuby extensions:
67+
* Install the Java Development Kit (provided if you are
68+
on a recent version of Mac OS X) from <http://java.sun.com>.
69+
* Install a recent version of JRuby. Ensure `jruby` is in your `PATH` and/or
70+
you have configured the `JRUBY_HOME` environment variable to point to your
71+
JRuby installation.
72+
* Install `data_objects` and `do_jdbc` with `jruby -S rake install`.
6973

70-
* Then, install this driver with `(jruby -S) rake install`.
74+
* Then, install this driver with `(jruby -S) rake install`.
7175

7276
For more information, see the PostgreSQL driver wiki page:
7377
<http://wiki.github.com/datamapper/do/postgresql>.

do_sqlite3/README.markdown

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ This driver implements the DataObjects API for the SQLite3 relational database.
1414

1515
An example of usage:
1616

17-
@connection = DataObjects::Connection.new("sqlite3://employees")
18-
@reader = @connection.create_command('SELECT * FROM users').execute_reader
19-
@reader.next!
17+
```ruby
18+
@connection = DataObjects::Connection.new("sqlite3://employees")
19+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
20+
@reader.next!
21+
```
2022

2123
## Requirements
2224

do_sqlserver/README.markdown

+10-8
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ Problems with MRI implementation (unreleased):
2020

2121
Examples of usage:
2222

23-
# default port (using SQL Server Express Edition)
24-
DataObjects::Connection.new('sqlserver://user:pass@host/database;instance=SQLEXPRESS')
25-
# port specified (using SQL Server Express Edition)
26-
DataObjects::Connection.new('sqlserver://user:pass@host:1433/database;instance=SQLEXPRESS')
27-
28-
@connection = DataObjects::Connection.new("sqlserver://john:p3$$@localhost:1433/userinfo")
29-
@reader = @connection.create_command('SELECT * FROM users').execute_reader
30-
@reader.next!
23+
```ruby
24+
# default port (using SQL Server Express Edition)
25+
DataObjects::Connection.new('sqlserver://user:pass@host/database;instance=SQLEXPRESS')
26+
# port specified (using SQL Server Express Edition)
27+
DataObjects::Connection.new('sqlserver://user:pass@host:1433/database;instance=SQLEXPRESS')
28+
29+
@connection = DataObjects::Connection.new("sqlserver://john:p3$$@localhost:1433/userinfo")
30+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
31+
@reader.next!
32+
```
3133

3234
* See also the accompanying `CONNECTING.markdown`.
3335

jdbc_drivers/sqlserver/README.markdown

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ gem for you, by virtue of the RubyGems requirement system.
77

88
If you want to load this driver directly:
99

10-
require 'do_jdbc/sqlserver'
10+
```ruby
11+
require 'do_jdbc/sqlserver'
12+
```
1113

1214
to make the driver accessible to JDBC and DataObjects code running in JRuby.
1315

0 commit comments

Comments
 (0)