Rakefile in jekyll_test_plugin-0.1.1 vs Rakefile in jekyll_test_plugin-0.1.2

- old
+ new

@@ -1,29 +1,58 @@ require "bundler/gem_tasks" + +namespace :project do + require "forwardable" + + module Project + class Spec + extend Forwardable + + def_delegators :@gemspec, :name, :version + + def initialize(name) + gemspec_file = "#{name}.gemspec" + @gemspec = Bundler.load_gemspec(gemspec_file) + end + end + end + + spec = Project::Spec.new("jekyll_test_plugin") + + desc "Print basename of built gem." + task :gem_name do + puts "#{spec.name}-#{spec.version}" + end + + desc "Print lib version prefixed with 'v'." + task :tag_version do + puts "v#{spec.version}" + end +end