From cd8ab96d2fe708a55a6c97b993d44e1298db896a Mon Sep 17 00:00:00 2001 From: Andy Caldwell Date: Thu, 14 Jun 2012 01:09:17 +0100 Subject: [PATCH] Allow yard to be launched by 'bundle exec' by separating version from yard.rb --- lib/yard.rb | 4 ++-- lib/yard/parser/ruby/ast_node.rb | 2 +- lib/yard/version.rb | 3 +++ yard.gemspec | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 lib/yard/version.rb diff --git a/lib/yard.rb b/lib/yard.rb index b28219d2d..3e420cdf8 100644 --- a/lib/yard.rb +++ b/lib/yard.rb @@ -1,6 +1,6 @@ -module YARD - VERSION = "0.8.2.1" +require File.expand_path('../yard/version.rb', __FILE__) +module YARD # The root path for YARD source libraries ROOT = File.expand_path(File.dirname(__FILE__)) diff --git a/lib/yard/parser/ruby/ast_node.rb b/lib/yard/parser/ruby/ast_node.rb index c45d42853..77d4d2e80 100644 --- a/lib/yard/parser/ruby/ast_node.rb +++ b/lib/yard/parser/ruby/ast_node.rb @@ -486,4 +486,4 @@ def first_line; "" end end end end -end \ No newline at end of file +end diff --git a/lib/yard/version.rb b/lib/yard/version.rb new file mode 100644 index 000000000..d3e8c4744 --- /dev/null +++ b/lib/yard/version.rb @@ -0,0 +1,3 @@ +module YARD + VERSION = "0.8.2.1" +end diff --git a/yard.gemspec b/yard.gemspec index 4544ce74f..159f0633f 100644 --- a/yard.gemspec +++ b/yard.gemspec @@ -1,4 +1,5 @@ -require File.expand_path(File.dirname(__FILE__) + '/lib/yard') +require File.expand_path('../lib/yard/version', __FILE__) + Gem::Specification.new do |s| s.name = "yard" s.summary = "Documentation tool for consistent and usable documentation in Ruby." @@ -19,4 +20,4 @@ Gem::Specification.new do |s| s.executables = ['yard', 'yardoc', 'yri'] s.has_rdoc = 'yard' s.rubyforge_project = 'yard' -end \ No newline at end of file +end