Skip to content

Commit 24f4e73

Browse files
author
Dray Lacy
committed
Moved SQL::VERSION into its own file, so that the Rakefile won't have to load the entire SQL library just to get the version string.
1 parent 7f18bab commit 24f4e73

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'rubygems'
44
require 'hoe'
5-
require './lib/sql.rb'
5+
require './lib/sql/version.rb'
66

77
Hoe.new('sql', SQL::VERSION::STRING) do |p|
88
p.developer 'Dray Lacy', '[email protected]'

lib/sql.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1+
require File.dirname(__FILE__) + '/sql/version'
12
require File.dirname(__FILE__) + '/sql/statement'
23
require File.dirname(__FILE__) + '/sql/sql_visitor'
34
require File.dirname(__FILE__) + '/sql/parser.racc.rb'
4-
5-
module SQL
6-
module VERSION # :nodoc:
7-
MAJOR = 0
8-
MINOR = 0
9-
TINY = 1
10-
11-
STRING = [MAJOR, MINOR, TINY].join('.')
12-
end
13-
end

lib/sql/version.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module SQL
2+
module VERSION # :nodoc:
3+
MAJOR = 0
4+
MINOR = 0
5+
TINY = 1
6+
7+
STRING = [MAJOR, MINOR, TINY].join('.')
8+
end
9+
end

0 commit comments

Comments
 (0)