gemy 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/gemy +9 -7
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/bin/gemy CHANGED
@@ -5,8 +5,10 @@ require 'optparse'
5
5
 
6
6
  options = {}
7
7
 
8
- file_version = File.read(File.expand_path('../../VERSION', __FILE__)).strip
9
- copy = "gemy #{file_version} (c) 2012 Domizio Demichelis"
8
+ gemy_version = File.read(File.expand_path('../../VERSION', __FILE__)).strip
9
+ gem_version = File.read('VERSION').strip if File.exist?('VERSION')
10
+
11
+ copy = "gemy #{gemy_version} (c) 2012 Domizio Demichelis"
10
12
 
11
13
  optparse = OptionParser.new do |opts|
12
14
 
@@ -38,7 +40,7 @@ optparse = OptionParser.new do |opts|
38
40
  end
39
41
 
40
42
  opts.on( '-v', '--version', 'Shows the version and exits' ) do
41
- puts file_version
43
+ puts gemy_version
42
44
  exit
43
45
  end
44
46
 
@@ -75,7 +77,7 @@ when 'install'
75
77
  system %(gem uninstall #{options[:name]} --all --ignore-dependencies --executables) if options[:clean]
76
78
  begin
77
79
  commit_id = `git log -1 --format="%h" HEAD`.strip
78
- version = "#{file_version}.#{commit_id}"
80
+ version = "#{gem_version}.#{commit_id}"
79
81
  File.open('VERSION', 'w') {|f| f.puts version }
80
82
  versioned_name = "#{options[:name]}-#{version}.gem"
81
83
  puts versioned_name
@@ -95,16 +97,16 @@ when 'install'
95
97
  warning
96
98
  ensure
97
99
  FileUtils.remove_entry_secure versioned_name, true
98
- File.open('VERSION', 'w') {|f| f.puts file_version }
100
+ File.open('VERSION', 'w') {|f| f.puts gem_version }
99
101
  end
100
102
 
101
103
  when 'push'
102
104
  begin
103
105
  ensure_clean(:push, options[:force])
104
- versioned_name = "#{options[:name]}-#{file_version}.gem"
106
+ versioned_name = "#{options[:name]}-#{gemy_version}.gem"
105
107
  system %(gem build #{options[:name]}.gemspec)
106
108
  system %(gem push #{versioned_name})
107
- system %(git tag '#{file_version}')
109
+ system %(git tag '#{gemy_version}')
108
110
  ensure
109
111
  FileUtils.remove_entry_secure versioned_name, true
110
112
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-17 00:00:00.000000000 Z
12
+ date: 2012-08-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'Useful if you are a gem author: it eases testing your gem locally,
15
15
  and pushing it to RubyGems'
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  version: 1.3.6
47
47
  requirements: []
48
48
  rubyforge_project:
49
- rubygems_version: 1.8.24
49
+ rubygems_version: 1.8.10
50
50
  signing_key:
51
51
  specification_version: 3
52
52
  summary: Simple CLI Tool for managing gem local installation and RubyGem push