Skip to content

Commit eaced28

Browse files
committed
Fixed some spacing and single quote issues
1 parent 679b46c commit eaced28

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

‎activerecord-sqlserver-adapter.gemspec

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
$:.push File.expand_path("../lib", __FILE__)
1+
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
22

33
Gem::Specification.new do |s|
44
s.platform = Gem::Platform::RUBY
5-
s.name = "activerecord-sqlserver-adapter"
6-
s.version = File.read(File.expand_path("../VERSION",__FILE__)).strip
7-
s.summary = "ActiveRecord SQL Server Adapter. For SQL Server 2005 And Higher."
8-
s.description = "ActiveRecord SQL Server Adapter. For SQL Server 2005 And Higher."
9-
10-
s.authors = ['Ken Collins', 'Murray Steele', 'Shawn Balestracci', 'Joe Rafaniello', 'Tom Ward']
11-
s.email = "[email protected]"
12-
s.homepage = "http://.com/rails-sqlserver/activerecord-sqlserver-adapter"
13-
14-
s.files = Dir['CHANGELOG', 'MIT-LICENSE', 'README.rdoc', 'VERSION', 'lib/**/*' ]
5+
s.name = 'activerecord-sqlserver-adapter'
6+
s.version = File.read(File.expand_path('../VERSION', __FILE__)).strip
7+
s.summary = 'ActiveRecord SQL Server Adapter. For SQL Server 2005 And Higher.'
8+
s.description = 'ActiveRecord SQL Server Adapter. For SQL Server 2005 And Higher.'
9+
10+
s.authors = ['Ken Collins', 'Anna Carey', 'Will Bond', 'Murray Steele', 'Shawn Balestracci', 'Joe Rafaniello', 'Tom Ward']
11+
s.email = '[email protected]'
12+
s.homepage = 'http://.com/rails-sqlserver/activerecord-sqlserver-adapter'
13+
14+
s.files = Dir['CHANGELOG', 'MIT-LICENSE', 'README.rdoc', 'VERSION', 'lib/**/*']
1515
s.require_path = 'lib'
1616
s.rubyforge_project = 'activerecord-sqlserver-adapter'
17-
17+
1818
s.add_dependency('activerecord', '~> 4.1.0')
1919
s.add_dependency('arel')
2020
end

‎lib/active_record/connection_adapters/sqlserver/database_statements.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def exec_query(sql, name = 'SQL', binds = [], sqlserver_options = {})
1818
if id_insert_table_name = sqlserver_options[:insert] ? query_requires_identity_insert?(sql) : nil
1919
with_identity_insert_enabled(id_insert_table_name) { do_exec_query(sql, name, binds) }
2020
elsif update_sql?(sql)
21-
sql = strip_ident_from_update(sql)
22-
do_exec_query(sql, name, binds)
21+
sql = strip_ident_from_update(sql)
22+
do_exec_query(sql, name, binds)
2323
else
2424
do_exec_query(sql, name, binds)
2525
end

‎lib/active_record/connection_adapters/sqlserver/schema_creation.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def visit_TableDefinition(o)
3232
elsif o.as.is_a?(String)
3333
select = o.as
3434
else
35-
raise "Only able to generate a table from a SELECT statement passed as a String or ActiveRecord::Relation"
35+
raise 'Only able to generate a table from a SELECT statement passed as a String or ActiveRecord::Relation'
3636
end
3737

3838
create_sql = 'SELECT * INTO '

‎lib/active_record/connection_adapters/sqlserver_adapter.rb

+14-14
Original file line numberDiff line numberDiff line change
@@ -298,26 +298,26 @@ def dblib_connect(config)
298298
encoding: encoding(config),
299299
azure: config[:azure]
300300
).tap do |client|
301-
if config[:azure]
302-
client.execute('SET ANSI_NULLS ON').do
303-
client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do
304-
client.execute('SET ANSI_NULL_DFLT_ON ON').do
305-
client.execute('SET IMPLICIT_TRANSACTIONS OFF').do
306-
client.execute('SET ANSI_PADDING ON').do
307-
client.execute('SET QUOTED_IDENTIFIER ON')
308-
client.execute('SET ANSI_WARNINGS ON').do
309-
else
310-
client.execute('SET ANSI_DEFAULTS ON').do
311-
client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do
312-
client.execute('SET IMPLICIT_TRANSACTIONS OFF').do
313-
end
301+
if config[:azure]
302+
client.execute('SET ANSI_NULLS ON').do
303+
client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do
304+
client.execute('SET ANSI_NULL_DFLT_ON ON').do
305+
client.execute('SET IMPLICIT_TRANSACTIONS OFF').do
306+
client.execute('SET ANSI_PADDING ON').do
307+
client.execute('SET QUOTED_IDENTIFIER ON')
308+
client.execute('SET ANSI_WARNINGS ON').do
309+
else
310+
client.execute('SET ANSI_DEFAULTS ON').do
311+
client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do
312+
client.execute('SET IMPLICIT_TRANSACTIONS OFF').do
313+
end
314314
client.execute('SET TEXTSIZE 2147483647').do
315315
client.execute('SET CONCAT_NULL_YIELDS_NULL ON').do
316316
end
317317
end
318318

319319
def appname(config)
320-
config[:appname] || configure_application_name || Rails.application.class.name.split('::').first rescue nil
320+
config[:appname] || configure_application_name || Rails.application.class.name.split('::').first rescue nil
321321
end
322322

323323
def login_timeout(config)

‎lib/active_record/connection_adapters/sqlserver_column.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,5 @@ def simplified_datetime
112112
end
113113
end
114114
end # class SQLServerColumn
115-
end # module ConnectionAdapters
115+
end # module ConnectionAdapters
116116
end # module ActiveRecord

0 commit comments

Comments
 (0)