Commit 5d15ebdc by Alex Chaffee

move version out of VERSION.yml and into version.rb (to remove yaml dependency and some messy code)

parent 6d7bfc08
...@@ -5,7 +5,7 @@ gem "rake" ...@@ -5,7 +5,7 @@ gem "rake"
group :development do group :development do
gem 'mg' gem 'mg'
gem 'rspec' gem 'rspec'
gem 'wrong' gem 'wrong', '>=0.6.2'
gem 'rdoc' gem 'rdoc'
end end
......
GEM
remote: http://rubygems.org/
specs:
ParseTree (3.0.8)
RubyInline (>= 3.7.0)
sexp_processor (>= 3.0.0)
RubyInline (3.11.2)
ZenTest (~> 4.3)
ZenTest (4.7.0)
activesupport (3.2.2)
i18n (~> 0.6)
multi_json (~> 1.0)
diff-lcs (1.1.3)
file-tail (1.0.8)
tins (~> 0.3)
i18n (0.6.0)
json (1.6.5)
mg (0.0.8)
rake
multi_json (1.1.0)
predicated (0.2.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rspec (2.9.0)
rspec-core (~> 2.9.0)
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
ruby2ruby (1.3.1)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ruby_parser (2.0.6)
sexp_processor (~> 3.0)
sexp_processor (3.1.0)
sourcify (0.5.0)
file-tail (>= 1.0.5)
ruby2ruby (>= 1.2.5)
ruby_parser (>= 2.0.5)
sexp_processor (>= 3.0.5)
tins (0.3.12)
wrong (0.6.1)
ParseTree (~> 3.0)
diff-lcs (~> 1.1.2)
file-tail (~> 1.0)
predicated (>= 0.2.3)
ruby2ruby (~> 1.2)
ruby_parser (~> 2.0.4)
sexp_processor (~> 3.0)
sourcify (>= 0.3.0)
PLATFORMS
ruby
DEPENDENCIES
activesupport (>= 3.0.0)
mg
rake
rdoc
rspec
wrong
here = File.dirname __FILE__ here = File.dirname __FILE__
require 'rubygems' # Note : this causes annoying psych warnings under Ruby 1.9.2-p180; to fix, upgrade to 1.9.3
require 'bundler'
begin begin
require 'bundler'
Bundler.setup(:default, :development) Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e rescue Bundler::BundlerError => e
$stderr.puts e.message $stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems" $stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code exit e.status_code
end end
require 'rake/dsl_definition' require 'rake/dsl_definition'
require 'rake' require 'rake'
include Rake::DSL
require "#{here}/lib/annotate" require "#{here}/lib/annotate"
......
---
:major: 2
:minor: 5
:patch: 0
:build: 'beta1'
require './lib/annotate' here = File.dirname __FILE__
require "#{here}/lib/annotate"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = %q{annotate} s.name = %q{annotate}
......
here = File.dirname __FILE__
require 'yaml' require "#{here}/annotate/version"
module Annotate module Annotate
def self.version
version_file = File.dirname(__FILE__) + "/../VERSION.yml"
if File.exist?(version_file)
config = YAML.load(File.read(version_file))
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
else
version = "0.0.0"
end
end
def self.load_tasks def self.load_tasks
if File.exists?('Rakefile') if File.exists?('Rakefile')
require 'rake' require 'rake'
......
module Annotate
def self.version
"2.5.0.beta1"
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment