Skip to content

Commit 0884810

Browse files
committed
Better gemspec. Moving to README.rdoc. Trying to add some documentation but need help. More to come.
1 parent 2a70d90 commit 0884810

File tree

4 files changed

+62
-32
lines changed

4 files changed

+62
-32
lines changed

2000-2005-adapter.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
1212
"CHANGELOG",
1313
"MIT-LICENSE",
1414
"Rakefile",
15-
"README.textile",
15+
"README.rdoc",
1616
"RUNNING_UNIT_TESTS",
1717
"autotest",
1818
"autotest/discover.rb",
@@ -41,6 +41,6 @@ Gem::Specification.new do |s|
4141
"test/connections/native_sqlserver_odbc/connection.rb",
4242
"test/migrations/transaction_table/1_table_will_never_be_created.rb",
4343
"test/schema/sqlserver_specific_schema.rb" ]
44-
s.rdoc_options = ["--line-numbers", "--inline-source", "--main", "README.textile"]
45-
s.extra_rdoc_files = ["README.textile"]
44+
s.rdoc_options = ["--line-numbers", "--inline-source", "--main", "README.rdoc"]
45+
s.extra_rdoc_files = ["README.rdoc"]
4646
end

README.rdoc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
== Rails SQL Server 2000 & 2005 Adapter
3+
4+
For Rails/ActiveRecord 2.2 and up. More details to come.
5+
6+
7+
== Installation
8+
9+
This method is unconfirmed. You can install the adapter as a gem using the following command. Once I confirm this I can give you an example of a config.gem command too. For now I know that rails and/or ActiveRecord expects to find the SQL Server adapter in the vendor/plugins/adapters/sqlserver folder of your rails project.
10+
11+
$ sudo gem install rails-sqlserver-2000-2005-adapter
12+
13+
Ruby DBI is required and to my knowledge the ADO DBD driver is no longer supported, meaning that ODBC is the only way to go. During development ancient versions of DBI back to 0.0.23 were tested along with the current latest 0.4.0 version. Because later versions of DBI will be changing many things, IT IS HIGHLY RECOMMENDED that you install 0.4.0 which the examples below show. This is not a compressive how to since ODBC mode requires also that you install Ruby ODBC and possibly FreeTDS.
14+
15+
$ sudo gem install dbi --version 0.4.0
16+
$ sudo gem install dbd-odbc --version 0.2.4
17+
18+
Optionally configure your gem dependencies in your rails environment.rb file.
19+
20+
config.gem 'dbi', :version => '0.4.0'
21+
config.gem 'dbd-odbc', :version => '0.2.4', :lib => 'dbd/ODBC'
22+
23+
24+
== Contributing
25+
26+
Please read the RUNNING_UNIT_TESTS file for the details of how to run the unit tests. Bugs can be reported to our lighthouse page at http://rails-sqlserver.lighthouseapp.com/projects/20277-sql-server-05-adapter/overview
27+
28+
There is also a #rails-sqlserver channel on irc.freenode.net if you want to discuss any topics about the adapter.
29+
30+
31+
== Credits
32+
33+
Many many people have contributed to this over
34+
35+
36+
== License
37+
38+
Copyright © 2008. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
39+

README.textile

Whitespace-only changes.

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -108,48 +108,39 @@ def simplified_datetime
108108

109109
end #SQLServerColumn
110110

111-
# In ADO mode, this adapter will ONLY work on Windows systems,
112-
# since it relies on Win32OLE, which, to my knowledge, is only
113-
# available on Windows.
111+
# In ADO mode, this adapter will ONLY work on Windows systems, since it relies on
112+
# Win32OLE, which, to my knowledge, is only available on Windows.
114113
#
115114
# This mode also relies on the ADO support in the DBI module. If you are using the
116-
# one-click installer of Ruby, then you already have DBI installed, but
117-
# the ADO module is *NOT* installed. You will need to get the latest
118-
# source distribution of Ruby-DBI from http://ruby-dbi.sourceforge.net/
119-
# unzip it, and copy the file
120-
# <tt>src/lib/dbd_ado/ADO.rb</tt>
121-
# to
122-
# <tt>X:/Ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb</tt>
123-
# (you will more than likely need to create the ADO directory).
124-
# Once you've installed that file, you are ready to go.
125-
#
115+
# one-click installer of Ruby, then you already have DBI installed, but the ADO module
116+
# is *NOT* installed. You will need to get the latest source distribution of Ruby-DBI
117+
# from http://ruby-dbi.sourceforge.net/ unzip it, and copy the file from
118+
# <tt>src/lib/dbd_ado/ADO.rb</tt> to <tt>X:/Ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb</tt>
119+
#
120+
# You will more than likely need to create the ADO directory. Once you've installed
121+
# that file, you are ready to go.
122+
#
126123
# In ODBC mode, the adapter requires the ODBC support in the DBI module which requires
127-
# the Ruby ODBC module. Ruby ODBC 0.996 was used in development and testing,
124+
# the Ruby ODBC module. Ruby ODBC 0.996 was used in development and testing,
128125
# and it is available at http://www.ch-werner.de/rubyodbc/
129126
#
130127
# Options:
131128
#
132-
# * <tt>:mode</tt> -- ADO or ODBC. Defaults to ADO.
133-
# * <tt>:username</tt> -- Defaults to sa.
134-
# * <tt>:password</tt> -- Defaults to empty string.
135-
# * <tt>:windows_auth</tt> -- Defaults to "User ID=#{username};Password=#{password}"
129+
# * <tt>:mode</tt> -- ADO or ODBC. Defaults to ADO.
130+
# * <tt>:username</tt> -- Defaults to sa.
131+
# * <tt>:password</tt> -- Defaults to empty string.
132+
# * <tt>:windows_auth</tt> -- Defaults to "User ID=#{username};Password=#{password}"
136133
#
137134
# ADO specific options:
138135
#
139-
# * <tt>:host</tt> -- Defaults to localhost.
140-
# * <tt>:database</tt> -- The name of the database. No default, must be provided.
141-
# * <tt>:windows_auth</tt> -- Use windows authentication instead of username/password.
136+
# * <tt>:host</tt> -- Defaults to localhost.
137+
# * <tt>:database</tt> -- The name of the database. No default, must be provided.
138+
# * <tt>:windows_auth</tt> -- Use windows authentication instead of username/password.
142139
#
143140
# ODBC specific options:
144141
#
145-
# * <tt>:dsn</tt> -- Defaults to nothing.
146-
#
147-
# ADO code tested on Windows 2000 and higher systems,
148-
# running ruby 1.8.2 (2004-07-29) [i386-mswin32], and SQL Server 2000 SP3.
149-
#
150-
# ODBC code tested on a Fedora Core 4 system, running FreeTDS 0.63,
151-
# unixODBC 2.2.11, Ruby ODBC 0.996, Ruby DBI 0.0.23 and Ruby 1.8.2.
152-
# [Linux strongmad 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux]
142+
# * <tt>:dsn</tt> -- Defaults to nothing.
143+
#
153144
class SQLServerAdapter < AbstractAdapter
154145

155146
ADAPTER_NAME = 'SQLServer'.freeze

0 commit comments

Comments
 (0)