rpgem 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/rpgem.rb +3 -13
  2. data/lib/template.spec.erb +3 -1
  3. metadata +4 -4
@@ -3,16 +3,6 @@ require 'rubygems'
3
3
  require 'rubygems/format'
4
4
  require 'erb'
5
5
 
6
- module FileUtils
7
- def self.in_dir(dir)
8
- cwd = `pwd`.strip
9
- cd dir
10
- r = yield
11
- cd cwd
12
- r
13
- end
14
- end
15
-
16
6
  class Hash
17
7
  # like merge!, but doesn't update existing keys.
18
8
  # useful for defaulting options
@@ -129,14 +119,14 @@ class RPGem
129
119
  if @version.nil?
130
120
  system("rm -rf #{TMP}")
131
121
  system("mkdir #{TMP}")
132
- FileUtils.in_dir TMP do
122
+ FileUtils.cd TMP do
133
123
  system("gem fetch #{@name} #{sh_version_reqs}")
134
124
  gem_title = `ls`
135
125
  @version = gem_title.match(/-(\d+(\.\d+)+)\.gem$/)[1]
136
126
  end
137
127
  system("mv #{TMP}/* #{SOURCES_DIR}/")
138
128
  else
139
- FileUtils.in_dir SOURCES_DIR do
129
+ FileUtils.cd SOURCES_DIR do
140
130
  system("gem fetch #{@name} --version #{@version}")
141
131
  end
142
132
  end
@@ -159,7 +149,7 @@ class RPGem
159
149
  make_spec!
160
150
  puts
161
151
  puts "-*- Building RPM rpgem-#{self.to_s} -*-"
162
- FileUtils.in_dir RPMBUILD_DIR do
152
+ FileUtils.cd RPMBUILD_DIR do
163
153
  system("rpmbuild -ba -v #{spec_loc}")
164
154
  end
165
155
  puts "-*- Done Building RPM rpgem-#{self.to_s} -*-"
@@ -25,7 +25,9 @@
25
25
 
26
26
  Name: rpgem-%{rbname}
27
27
  Version: <%= spec.version.to_s %>
28
- Release: 1%{?dist}
28
+ Release: <%=
29
+ spec.respond_to?(:specification_version) ? spec.specification_version : 1
30
+ %>%{?dist}
29
31
  Summary: <%= spec.summary || spec.description %>
30
32
 
31
33
  Group: Development/Languages/Ruby
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpgem
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jay Adkisson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-24 00:00:00 -07:00
18
+ date: 2010-08-10 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency