Skip to content

Commit aff2d46

Browse files
committed
split version file
1 parent 64e0f1d commit aff2d46

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

lib/typescript-src.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
require 'json'
22
require 'pathname'
3+
require 'typescript-src/version'
34

45
module TypeScript
56
module Src
67
class << self
7-
VERSION = package_info['version'] + '.2'
8-
98
# @return [Pathname]
109
def typescript_path
1110
@typescript_path ||= ::Pathname.new(File.dirname(__FILE__)).join('typescript-src/support/typescript')

lib/typescript-src/version.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module TypeScript
2+
module Src
3+
VERSION = '1.0.1.2' # TypeScript compiler version + gem's revision
4+
end
5+
end

test/test_type_script_src.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'test/unit'
2+
require 'typescript-src'
23

34
class TestTypeScriptSrc < Test::Unit::TestCase
45
def test_gem_version

typescript-src.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- encoding: utf-8 -*-
22
lib = File.expand_path('../lib', __FILE__)
33
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4-
require 'typescript-src' # for VERSION
4+
require 'typescript-src/version'
55

66
Gem::Specification.new do |spec|
77
spec.name = "typescript-src"

0 commit comments

Comments
 (0)