version_info 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,7 +7,8 @@ $LOAD_PATH.unshift File.expand_path('./lib', File.dirname(__FILE__))
7
7
  require 'version_info'
8
8
  require 'version_info/version'
9
9
 
10
- VersionInfo::Tasks.install
10
+
11
+ VersionInfo::Tasks.install(:class => VersionInfo)
11
12
  # now we have VersionInfo::VERSION defined, can load this
12
13
  Bundler::GemHelper.install_tasks
13
14
 
@@ -1,31 +1,33 @@
1
1
  module VersionInfo
2
2
  class Tasks
3
- def self.install(opts = nil)
3
+ def self.install(opts = {})
4
4
  #dir = caller.find{|c| /Rakefile:/}[/^(.*?)\/Rakefile:/, 1]
5
5
  dir = File.dirname(Rake.application.rakefile_location)
6
- self.new(dir).install
6
+ self.new(dir, opts).install
7
7
  end
8
8
 
9
9
  attr_reader :root_path
10
+ attr_reader :target
10
11
 
11
- def initialize(root_path)
12
+ def initialize(root_path, opts)
12
13
  @root_path = root_path
14
+ @target = opts[:class]
13
15
  end
14
16
 
15
17
  def install
16
18
  namespace :vinfo do
17
19
  desc "Show current version tag and create version_info.yml if missing"
18
20
  task :show do
19
- puts VERSION.tag
20
- VERSION.save unless File.exist?(VERSION.class.file_name)
21
+ puts target::VERSION.tag
22
+ target::VERSION.save unless File.exist?(target::VERSION.class.file_name)
21
23
  end
22
24
 
23
25
  VersionInfo.segments.each do |sgm|
24
26
  desc "Bumps version segment #{sgm.to_s.upcase}"
25
27
  task sgm.to_sym do
26
- VERSION.bump(sgm)
28
+ target::VERSION.bump(sgm)
27
29
  puts "version changed to #{VERSION.tag}"
28
- VERSION.save
30
+ target::VERSION.save
29
31
  end
30
32
  end
31
33
  end
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  major: 0
3
3
  minor: 5
4
- patch: 1
4
+ patch: 2
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 1
9
- version: 0.5.1
8
+ - 2
9
+ version: 0.5.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jorge L. Cangas