Browse files

Move version constant to its own file

  • Loading branch information...
1 parent c808b97 commit 2e3ec8e5df0d384281fff64ca88423315c961d19 @josh josh committed Jun 13, 2011
Showing with 8 additions and 3 deletions.
  1. +4 −1 execjs.gemspec
  2. +1 −2 lib/execjs/module.rb
  3. +3 −0 lib/execjs/version.rb
View
5 execjs.gemspec
@@ -1,6 +1,8 @@
+require File.expand_path("../lib/execjs/version.rb", __FILE__)
+
Gem::Specification.new do |s|
s.name = "execjs"
- s.version = "1.1.3"
+ s.version = ExecJS::VERSION
s.homepage = "https://github.com/sstephenson/execjs"
s.summary = "Run JavaScript code from Ruby"
@@ -12,6 +14,7 @@ Gem::Specification.new do |s|
"lib/execjs.rb",
"lib/execjs/external_runtime.rb",
"lib/execjs/module.rb",
+ "lib/execjs/version.rb",
"lib/execjs/mustang_runtime.rb",
"lib/execjs/ruby_racer_runtime.rb",
"lib/execjs/ruby_rhino_runtime.rb",
View
3 lib/execjs/module.rb
@@ -1,8 +1,7 @@
+require "execjs/version"
require "rbconfig"
module ExecJS
- VERSION = "1.1.3"
-
class Error < ::StandardError; end
class RuntimeError < Error; end
class ProgramError < Error; end
View
3 lib/execjs/version.rb
@@ -0,0 +1,3 @@
+module ExecJS
+ VERSION = "1.1.3"
+end

0 comments on commit 2e3ec8e

Please sign in to comment.