prm 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/prm +37 -37
  2. data/lib/prm/repo.rb +253 -233
  3. metadata +4 -4
data/bin/prm CHANGED
@@ -10,46 +10,46 @@ rescue LoadError
10
10
  require 'prm'
11
11
  end
12
12
 
13
- version_info = "0.1.1"
13
+ version_info = "0.1.2"
14
14
 
15
15
  class Main < Clamp::Command
16
- option ["-t", "--type"], "TYPE", "Type of repo to create", :required => true
17
- option ["-p", "--path"], "PATH", "Path to repo location", :required => true
18
- option ["-c", "--component"], "COMPONENT", "Component to create", :required => true
19
- option ["-r", "--release"], "RELEASE", "OS version to create", :required => true
20
- option ["-a", "--arch"], "ARCH", "Architecture of repo contents", :required => true
21
- option ["--accesskey"], "ACCESS KEY", "DHO/S3 Access Key", :default => false
22
- option ["--secretkey"], "SECRET KEY", "DHO/S3 Secret Key", :default => false
23
- option ["-d", "--directory"], "DIRECTORY", "Move packages from directory to target", :default => false
24
- option ["-s", "--snapshot"], "COMPONENT", "Creates a snapshot of a component", :default => false
25
- option ["-k", "--gpg"], :flag, "Sign release files with users GPG key", :default => false
26
- option ["-g", "--generate"], :flag , "Generate new repository"
16
+ option ["-t", "--type"], "TYPE", "Type of repo to create", :required => true
17
+ option ["-p", "--path"], "PATH", "Path to repo location", :required => true
18
+ option ["-c", "--component"], "COMPONENT", "Component to create", :required => true
19
+ option ["-r", "--release"], "RELEASE", "OS version to create", :required => true
20
+ option ["-a", "--arch"], "ARCH", "Architecture of repo contents", :required => true
21
+ option ["--accesskey"], "ACCESS KEY", "DHO/S3 Access Key", :default => false
22
+ option ["--secretkey"], "SECRET KEY", "DHO/S3 Secret Key", :default => false
23
+ option ["-d", "--directory"], "DIRECTORY", "Move packages from directory to target", :default => false
24
+ option ["-s", "--snapshot"], "COMPONENT", "Creates a snapshot of a component", :default => false
25
+ option ["-k", "--gpg"], :flag, "Sign release files with users GPG key", :default => false
26
+ option ["-g", "--generate"], :flag , "Generate new repository"
27
27
 
28
- def execute
29
- r = PRM::Repo.new
30
- r.component = component
31
- r.release = release
32
- r.arch = arch
33
- r.type = type
34
- r.path = path
35
- if gpg?
36
- r.gpg = gpg?
37
- end
38
- unless accesskey.nil?
39
- r.accesskey = accesskey
40
- end
41
- unless secretkey.nil?
42
- r.secretkey = secretkey
43
- end
44
- unless snapshot.nil?
45
- r.snapshot = snapshot
46
- end
47
- unless directory.nil?
48
- r.directory = directory
49
- end
50
-
51
- r.create
52
- end
28
+ def execute
29
+ r = PRM::Repo.new
30
+ r.component = component
31
+ r.release = release
32
+ r.arch = arch
33
+ r.type = type
34
+ r.path = path
35
+ if gpg?
36
+ r.gpg = gpg?
37
+ end
38
+ unless accesskey.nil?
39
+ r.accesskey = accesskey
40
+ end
41
+ unless secretkey.nil?
42
+ r.secretkey = secretkey
43
+ end
44
+ unless snapshot.nil?
45
+ r.snapshot = snapshot
46
+ end
47
+ unless directory.nil?
48
+ r.directory = directory
49
+ end
50
+
51
+ r.create
52
+ end
53
53
  end
54
54
 
55
55
  Main.run
data/lib/prm/repo.rb CHANGED
@@ -2,290 +2,310 @@ require 'rubygems'
2
2
  require 'fileutils'
3
3
  require 'zlib'
4
4
  require 'digest/md5'
5
- require 'peach'
6
5
  require 'erb'
7
6
  require 'find'
7
+ require 'thread'
8
+ require 'peach'
8
9
  require 'aws/s3'
9
10
 
10
11
  module Debian
11
- def build_apt_repo(path, component, arch, release, gpg, silent)
12
- release.each { |r|
13
- component.each { |c|
14
- arch.each { |a|
15
- fpath = path + "/dists/" + r + "/" + c + "/" + "binary-" + a + "/"
16
- pfpath = fpath + "Packages"
17
- rfpath = fpath + "Release"
18
-
19
- unless silent == true
20
- puts "Building Path: #{fpath}"
21
- end
22
-
23
- FileUtils.mkpath(fpath)
24
- FileUtils.touch(pfpath)
25
- FileUtils.touch(rfpath)
26
- generate_packages_gz(fpath,pfpath,path,rfpath,r,c,a, silent)
27
- }
28
- }
29
- generate_release(path,r,component,arch)
30
-
31
- if gpg == true
32
- generate_release_gpg(path,r)
33
- end
12
+ def build_apt_repo(path, component, arch, release, gpg, silent)
13
+ release.each { |r|
14
+ component.each { |c|
15
+ arch.each { |a|
16
+ fpath = path + "/dists/" + r + "/" + c + "/" + "binary-" + a + "/"
17
+ pfpath = fpath + "Packages"
18
+ rfpath = fpath + "Release"
19
+
20
+ unless silent == true
21
+ puts "Building Path: #{fpath}"
22
+ end
23
+
24
+ FileUtils.mkpath(fpath)
25
+ FileUtils.touch(pfpath)
26
+ FileUtils.touch(rfpath)
27
+ generate_packages_gz(fpath,pfpath,path,rfpath,r,c,a, silent)
34
28
  }
29
+ }
30
+ generate_release(path,r,component,arch)
31
+
32
+ if gpg == true
33
+ generate_release_gpg(path,r)
34
+ end
35
+ }
36
+ end
37
+
38
+ def move_packages(path,component,arch,release,directory)
39
+ unless File.exists?(directory)
40
+ puts "ERROR: #{directory} doesn't exist... not doing anything\n"
41
+ return false
35
42
  end
36
43
 
37
- def move_packages(path,component,arch,release,directory)
38
- unless File.exists?(directory)
39
- puts "ERROR: #{directory} doesn't exist... not doing anything\n"
40
- return false
41
- end
42
-
43
- release.each { |r|
44
- component.each { |c|
45
- arch.each { |a|
46
- Dir.glob(directory + "/*.deb") do |file|
47
- if file =~ /^.*#{a}.*\.deb$/i
48
- FileUtils.mv(file, "#{path}/dists/#{r}/#{c}/binary-#{a}/")
49
- end
50
- end
51
- }
52
- }
44
+ files_moved = Array.new
45
+ release.each { |r|
46
+ component.each { |c|
47
+ arch.each { |a|
48
+ puts a
49
+ Dir.glob(directory + "/*.deb") do |file|
50
+ if file =~ /^.*#{a}.*\.deb$/i || file =~ /^.*all.*\.deb$/i || file =~ /^.*any.*\.deb$/i
51
+ if file =~ /^.*#{r}.*\.deb$/i
52
+ # Lets do this here to help mitigate packages like "asdf-123+wheezy.deb"
53
+ FileUtils.cp(file, "#{path}/dists/#{r}/#{c}/binary-#{a}/")
54
+ FileUtils.rm(file)
55
+ else
56
+ FileUtils.cp(file, "#{path}/dists/#{r}/#{c}/binary-#{a}/")
57
+ files_moved << file
58
+ end
59
+ end
60
+ end
53
61
  }
54
- # Regex?
55
- #/^.*#{arch}.*\.deb$/i
56
- end
62
+ }
63
+ }
57
64
 
58
- def generate_packages_gz(fpath,pfpath,path,rfpath,r,c,a,silent)
59
- unless silent == true
60
- puts "Generating Packages: #{r} : #{c} : binary-#{a}"
65
+ files_moved.each do |f|
66
+ if File.exists?(f)
67
+ FileUtils.rm(f)
61
68
  end
69
+ end
70
+ # Regex?
71
+ #/^.*#{arch}.*\.deb$/i
72
+ end
62
73
 
63
- d = File.open(pfpath, "w+")
64
- npath = "dists/" + r + "/" + c + "/" + "binary-" + a + "/"
65
- packages_text = []
66
-
67
- Dir.glob("#{fpath}*.deb").peach do |deb|
68
- md5sum = ''
69
- tdeb = deb.split('/').last
70
- md5sum_path = path + "/dists/" + r + "/" + c + "/" + "binary-" + a + "/md5-results/" + tdeb
71
-
72
- FileUtils.mkdir_p "tmp/#{tdeb}/"
73
- FileUtils.mkdir_p path + "/dists/" + r + "/" + c + "/" + "binary-" + a + "/md5-results/"
74
- `ar p #{deb} control.tar.gz | tar zx -C tmp/#{tdeb}/`
75
-
76
- init_size = `wc -c < #{deb}`
77
-
78
- if File.exists? md5sum_path
79
- file = File.open(md5sum_path, 'r')
80
- md5sum = file.read
81
- file.close
82
- else
83
- md5sum = Digest::MD5.file(deb)
84
- File.open(md5sum_path, 'w') { |file| file.write(md5sum) }
85
- end
86
-
87
- package_info = [
88
- "Filename: #{npath}#{tdeb}",
89
- "MD5sum: #{md5sum}",
90
- "Size: #{init_size}"
91
- ]
74
+ def generate_packages_gz(fpath,pfpath,path,rfpath,r,c,a,silent)
75
+ unless silent == true
76
+ puts "Generating Packages: #{r} : #{c} : binary-#{a}"
77
+ end
92
78
 
93
- # Copy the control file data into the Packages list
94
- d.write(File.read("tmp/#{tdeb}/control"))
95
- d.write(package_info.join("\n"))
96
- d.write("\n") # blank line between package info in the Packages file
97
- end
79
+ npath = "dists/" + r + "/" + c + "/" + "binary-" + a + "/"
80
+ packages_text = []
81
+
82
+ d = File.open(pfpath, "w+")
83
+ write_mutex = Mutex.new
84
+
85
+ Dir.glob("#{fpath}*.deb").peach do |deb|
86
+ md5sum = ''
87
+ tdeb = deb.split('/').last
88
+ md5sum_path = path + "/dists/" + r + "/" + c + "/" + "binary-" + a + "/md5-results/" + tdeb
89
+
90
+ FileUtils.mkdir_p "tmp/#{tdeb}/"
91
+ FileUtils.mkdir_p path + "/dists/" + r + "/" + c + "/" + "binary-" + a + "/md5-results/"
92
+ `ar p #{deb} control.tar.gz | tar zx -C tmp/#{tdeb}/`
93
+
94
+ init_size = `wc -c < #{deb}`
95
+
96
+ if File.exists? md5sum_path
97
+ file = File.open(md5sum_path, 'r')
98
+ md5sum = file.read
99
+ file.close
100
+ else
101
+ md5sum = Digest::MD5.file(deb)
102
+ File.open(md5sum_path, 'w') { |file| file.write(md5sum) }
103
+ end
104
+
105
+ package_info = [
106
+ "Filename: #{npath}#{tdeb}",
107
+ "MD5sum: #{md5sum}",
108
+ "Size: #{init_size}"
109
+ ]
110
+
111
+ write_mutex.synchronize do
112
+ # Copy the control file data into the Packages list
113
+ d.write(File.read("tmp/#{tdeb}/control"))
114
+ d.write(package_info.join("\n"))
115
+ d.write("\n") # blank line between package info in the Packages file
116
+ end
117
+ end
98
118
 
99
- FileUtils.rmtree 'tmp/'
119
+ FileUtils.rmtree 'tmp/'
100
120
 
101
- d.close
121
+ d.close
102
122
 
103
- Zlib::GzipWriter.open(pfpath + ".gz") do |gz|
104
- f = File.new(pfpath, "r")
105
- f.each do |line|
106
- gz.write(line)
107
- end
108
- end
123
+ Zlib::GzipWriter.open(pfpath + ".gz") do |gz|
124
+ f = File.new(pfpath, "r")
125
+ f.each do |line|
126
+ gz.write(line)
127
+ end
109
128
  end
129
+ end
110
130
 
111
- def generate_release(path,release,component,arch)
112
- date = Time.now.utc
131
+ def generate_release(path,release,component,arch)
132
+ date = Time.now.utc
113
133
 
114
- release_info = Hash.new()
115
- unreasonable_array = Array.new
116
- unreasonable_array = ["Packages", "Packages.gz", "Release"]
134
+ release_info = Hash.new()
135
+ unreasonable_array = Array.new
136
+ unreasonable_array = ["Packages", "Packages.gz", "Release"]
117
137
 
118
- component.clear
138
+ component.clear
119
139
 
120
- Dir.glob(path + "/dists/" + release + "/*").select { |f|
121
- f.slice!(path + "/dists/" + release + "/")
122
- unless f == "Release" or f == "Release.gpg"
123
- component << f
124
- end
125
- }
140
+ Dir.glob(path + "/dists/" + release + "/*").select { |f|
141
+ f.slice!(path + "/dists/" + release + "/")
142
+ unless f == "Release" or f == "Release.gpg"
143
+ component << f
144
+ end
145
+ }
126
146
 
127
- component.each do |c|
128
- arch.each do |ar|
129
- unreasonable_array.each do |unr|
130
- tmp_path = "#{path}/dists/#{release}/#{c}/binary-#{ar}"
131
- tmp_hash = Hash.new
132
- filename = "#{c}/binary-#{ar}/#{unr}".chomp
147
+ component.each do |c|
148
+ arch.each do |ar|
149
+ unreasonable_array.each do |unr|
150
+ tmp_path = "#{path}/dists/#{release}/#{c}/binary-#{ar}"
151
+ tmp_hash = Hash.new
152
+ filename = "#{c}/binary-#{ar}/#{unr}".chomp
133
153
 
134
- byte_size = File.size("#{tmp_path}/#{unr}").to_s
135
- md5sum = Digest::MD5.file("#{tmp_path}/#{unr}").to_s
154
+ byte_size = File.size("#{tmp_path}/#{unr}").to_s
155
+ md5sum = Digest::MD5.file("#{tmp_path}/#{unr}").to_s
136
156
 
137
- tmp_hash['size'] = byte_size
138
- tmp_hash['md5sum'] = md5sum
139
- release_info[filename] = tmp_hash
140
- end
141
- end
157
+ tmp_hash['size'] = byte_size
158
+ tmp_hash['md5sum'] = md5sum
159
+ release_info[filename] = tmp_hash
142
160
  end
161
+ end
162
+ end
143
163
 
144
-
145
- template_dir = File.join(File.dirname(__FILE__), "..", "..", "templates")
146
- erb = ERB.new(File.open("#{template_dir}/deb_release.erb") { |file|
147
- file.read
148
- }).result(binding)
149
164
 
150
- release_file = File.new("#{path}/dists/#{release}/Release.tmp","wb")
151
- release_file.puts erb
152
- release_file.close
165
+ template_dir = File.join(File.dirname(__FILE__), "..", "..", "templates")
166
+ erb = ERB.new(File.open("#{template_dir}/deb_release.erb") { |file|
167
+ file.read
168
+ }).result(binding)
153
169
 
154
- FileUtils.move("#{path}/dists/#{release}/Release.tmp", "#{path}/dists/#{release}/Release")
155
- end
170
+ release_file = File.new("#{path}/dists/#{release}/Release.tmp","wb")
171
+ release_file.puts erb
172
+ release_file.close
156
173
 
157
- # We expect that GPG is installed and a key has already been made
158
- def generate_release_gpg(path,release)
159
- Dir.chdir("#{path}/dists/#{release}") do
160
- system "gpg --yes --output Release.gpg -b Release"
161
- end
174
+ FileUtils.move("#{path}/dists/#{release}/Release.tmp", "#{path}/dists/#{release}/Release")
175
+ end
176
+
177
+ # We expect that GPG is installed and a key has already been made
178
+ def generate_release_gpg(path,release)
179
+ Dir.chdir("#{path}/dists/#{release}") do
180
+ system "gpg --yes --output Release.gpg -b Release"
162
181
  end
182
+ end
163
183
  end
164
184
 
165
185
  module SNAP
166
- def snapshot_to(path,component,release,snapname,type)
167
- if type != "deb"
168
- puts "Only deb supported"
169
- return
170
- end
186
+ def snapshot_to(path,component,release,snapname,type)
187
+ if type != "deb"
188
+ puts "Only deb supported"
189
+ return
190
+ end
171
191
 
172
- release.each do |r|
173
- time = Time.new
174
- now = time.strftime("%Y-%m-%d-%H-%M")
175
- new_snap = "#{snapname}-#{now}"
192
+ release.each do |r|
193
+ time = Time.new
194
+ now = time.strftime("%Y-%m-%d-%H-%M")
195
+ new_snap = "#{snapname}-#{now}"
176
196
 
177
- if File.exists?("#{path}/dists/#{r}/#{snapname}")
178
- puts "Snapshot target is a filesystem, remove it or rename your snap target"
179
- return
180
- end
197
+ if File.exists?("#{path}/dists/#{r}/#{snapname}")
198
+ puts "Snapshot target is a filesystem, remove it or rename your snap target"
199
+ return
200
+ end
181
201
 
182
- unless File.exists?("#{path}/dists/#{r}/#{new_snap}/")
183
- Dir.mkdir("#{path}/dists/#{r}/#{new_snap}")
184
- end
202
+ unless File.exists?("#{path}/dists/#{r}/#{new_snap}/")
203
+ Dir.mkdir("#{path}/dists/#{r}/#{new_snap}")
204
+ end
185
205
 
186
- FileUtils.cp_r(Dir["#{path}/dists/#{r}/#{component}/*"], "#{path}/dists/#{r}/#{new_snap}")
187
- FileUtils.ln_s "#{new_snap}", "#{path}/dists/#{r}/#{snapname}", :force => true
188
- puts "Created #{snapname} snapshot of #{component}\n"
189
- end
206
+ FileUtils.cp_r(Dir["#{path}/dists/#{r}/#{component}/*"], "#{path}/dists/#{r}/#{new_snap}")
207
+ FileUtils.ln_s "#{new_snap}", "#{path}/dists/#{r}/#{snapname}", :force => true
208
+ puts "Created #{snapname} snapshot of #{component}\n"
190
209
  end
210
+ end
191
211
  end
192
212
 
193
213
  module DHO
194
- def sync_to_dho(path, accesskey, secretkey,pcomponent,prelease)
195
- component = pcomponent.join
196
- release = prelease.join
197
- AWS::S3::Base.establish_connection!(
198
- :server => 'objects.dreamhost.com',
199
- :use_ssl => true,
200
- :access_key_id => accesskey,
201
- :secret_access_key => secretkey
214
+ def sync_to_dho(path, accesskey, secretkey,pcomponent,prelease)
215
+ component = pcomponent.join
216
+ release = prelease.join
217
+ AWS::S3::Base.establish_connection!(
218
+ :server => 'objects.dreamhost.com',
219
+ :use_ssl => true,
220
+ :access_key_id => accesskey,
221
+ :secret_access_key => secretkey
222
+ )
223
+
224
+ AWS::S3::Service.buckets.each do |bucket|
225
+ unless bucket == path
226
+ AWS::S3::Bucket.create(path)
227
+ end
228
+ end
229
+
230
+ new_content = Array.new
231
+ Find.find(path + "/") do |object|
232
+ object.slice!(path + "/")
233
+ if (object =~ /deb$/) || (object =~ /Release$/) || (object =~ /Packages.gz$/) || (object =~ /Packages$/) || (object =~ /gpg$/)
234
+ f = path + "/" + object
235
+ new_content << object
236
+ AWS::S3::S3Object.store(
237
+ object,
238
+ open(f),
239
+ path
202
240
  )
203
-
204
- AWS::S3::Service.buckets.each do |bucket|
205
- unless bucket == path
206
- AWS::S3::Bucket.create(path)
207
- end
208
- end
209
241
 
210
- new_content = Array.new
211
- Find.find(path + "/") do |object|
212
- object.slice!(path + "/")
213
- if (object =~ /deb$/) || (object =~ /Release$/) || (object =~ /Packages.gz$/) || (object =~ /Packages$/) || (object =~ /gpg$/)
214
- f = path + "/" + object
215
- new_content << object
216
- AWS::S3::S3Object.store(
217
- object,
218
- open(f),
219
- path
220
- )
221
-
222
- policy = AWS::S3::S3Object.acl(object, path)
223
- policy.grants = [ AWS::S3::ACL::Grant.grant(:public_read) ]
224
- AWS::S3::S3Object.acl(object,path,policy)
225
- end
226
- end
242
+ policy = AWS::S3::S3Object.acl(object, path)
243
+ policy.grants = [ AWS::S3::ACL::Grant.grant(:public_read) ]
244
+ AWS::S3::S3Object.acl(object,path,policy)
245
+ end
246
+ end
227
247
 
228
- bucket_info = AWS::S3::Bucket.find(path)
229
- bucket_info.each do |obj|
230
- o = obj.key
231
- if (o =~ /deb$/) || (o =~ /Release$/) || (o =~ /Packages.gz$/) || (o =~ /Packages$/) || (o =~ /gpg$/)
232
- unless new_content.include?(o)
233
- AWS::S3::S3Object.delete(o,path)
234
- end
235
- end
248
+ bucket_info = AWS::S3::Bucket.find(path)
249
+ bucket_info.each do |obj|
250
+ o = obj.key
251
+ if (o =~ /deb$/) || (o =~ /Release$/) || (o =~ /Packages.gz$/) || (o =~ /Packages$/) || (o =~ /gpg$/)
252
+ unless new_content.include?(o)
253
+ AWS::S3::S3Object.delete(o,path)
236
254
  end
237
- puts "Your apt repository is located at http://objects.dreamhost.com/#{path}/"
238
- puts "Add the following to your apt sources.list"
239
- puts "deb http://objects.dreamhost.com/#{path}/ #{release} #{component}"
255
+ end
240
256
  end
257
+ puts "Your apt repository is located at http://objects.dreamhost.com/#{path}/"
258
+ puts "Add the following to your apt sources.list"
259
+ puts "deb http://objects.dreamhost.com/#{path}/ #{release} #{component}"
260
+ end
241
261
  end
242
262
 
243
263
  module PRM
244
- class PRM::Repo
245
- include Debian
246
- include DHO
247
- include SNAP
248
-
249
- attr_accessor :path
250
- attr_accessor :type
251
- attr_accessor :component
252
- attr_accessor :arch
253
- attr_accessor :release
254
- attr_accessor :gpg
255
- attr_accessor :secretkey
256
- attr_accessor :accesskey
257
- attr_accessor :snapshot
258
- attr_accessor :directory
259
-
260
- def create
261
- parch,pcomponent,prelease = _parse_vars(arch,component,release)
262
-
263
- if "#{@type}" == "deb"
264
- if snapshot
265
- snapshot_to(path,pcomponent,prelease,snapshot,type)
266
- else
267
- if directory
268
- silent = true
269
- build_apt_repo(path,pcomponent,parch,prelease,gpg,silent)
270
- if move_packages(path,pcomponent,parch,prelease,directory) == false
271
- return
272
- end
273
- end
274
- silent = false
275
- build_apt_repo(path,pcomponent,parch,prelease,gpg,silent)
276
- end
277
- elsif "#{@type}" == "sync"
278
- sync_to_dho(path, accesskey, secretkey,pcomponent,prelease)
279
- elsif "#{@type}" == "rpm"
280
- # add rpm stuff here
264
+ class PRM::Repo
265
+ include Debian
266
+ include DHO
267
+ include SNAP
268
+
269
+ attr_accessor :path
270
+ attr_accessor :type
271
+ attr_accessor :component
272
+ attr_accessor :arch
273
+ attr_accessor :release
274
+ attr_accessor :gpg
275
+ attr_accessor :secretkey
276
+ attr_accessor :accesskey
277
+ attr_accessor :snapshot
278
+ attr_accessor :directory
279
+
280
+ def create
281
+ parch,pcomponent,prelease = _parse_vars(arch,component,release)
282
+
283
+ if "#{@type}" == "deb"
284
+ if snapshot
285
+ snapshot_to(path,pcomponent,prelease,snapshot,type)
286
+ else
287
+ if directory
288
+ silent = true
289
+ build_apt_repo(path,pcomponent,parch,prelease,gpg,silent)
290
+ if move_packages(path,pcomponent,parch,prelease,directory) == false
291
+ return
281
292
  end
293
+ end
294
+ silent = false
295
+ build_apt_repo(path,pcomponent,parch,prelease,gpg,silent)
282
296
  end
297
+ elsif "#{@type}" == "sync"
298
+ sync_to_dho(path, accesskey, secretkey,pcomponent,prelease)
299
+ elsif "#{@type}" == "rpm"
300
+ # add rpm stuff here
301
+ end
302
+ end
283
303
 
284
- def _parse_vars(arch_ar,component_ar,release_ar)
285
- arch_ar = arch.split(",")
286
- component_ar = component.split(",")
287
- release_ar = release.split(",")
288
- return [arch_ar,component_ar,release_ar]
289
- end
304
+ def _parse_vars(arch_ar,component_ar,release_ar)
305
+ arch_ar = arch.split(",")
306
+ component_ar = component.split(",")
307
+ release_ar = release.split(",")
308
+ return [arch_ar,component_ar,release_ar]
290
309
  end
310
+ end
291
311
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brett Gailey
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-04-28 00:00:00 -07:00
18
+ date: 2013-05-11 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency