right_publish 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ### 0.6.0
2
+ * Include .dsc and .tar.gz in index for ubuntu
3
+ * Change up el/6 format to be consistent with ubuntu format
4
+
1
5
  ### 0.5.2
2
6
  * No longer create automatically create i386 arches for noarch packages
3
7
 
@@ -43,7 +43,7 @@ debian distros. It expects the "expect" package to be installed on all distros.
43
43
  gem_repo:
44
44
  subdir: # -: gems/
45
45
  yum_repo:
46
- dists: # *: el: ['6']
46
+ dists: # *: [ el/6 ]
47
47
  epel: # -: 1
48
48
  subdir: # -: yum/
49
49
  gpg_key_id: # *: 9A917D05
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.6.0
@@ -55,7 +55,7 @@ module RightPublish
55
55
 
56
56
  def annotate(options={})
57
57
  options[:subdir] ||= File.join(repo_config[:subdir], 'pool', 'main')
58
- options[:filter] = ['*.deb']
58
+ options[:filter] = ['*.deb', '*.dsc', '*.tar.gz']
59
59
  super(options)
60
60
  end
61
61
 
@@ -115,9 +115,7 @@ module RightPublish
115
115
 
116
116
  if target
117
117
  #TODO Check that the specified dist is configured in the profile (sanity)
118
- dist, dist_ver = target.split("/")
119
- fail("dist format needs to be in form 'dist/dist_version'!") unless dist && dist_ver
120
- dists = {dist => [dist_ver]}
118
+ dists = [target]
121
119
  else
122
120
  unless [BIN_ALL_ARCH,SRC_ALL_ARCH].include? pkg_arch
123
121
  fail("need to specify a distribution with binary packages!")
@@ -125,18 +123,18 @@ module RightPublish
125
123
  dists = repo_config[:dists]
126
124
  end
127
125
 
128
- dists.each_pair do |dist,dist_vers|
129
- dist_vers.each do |ver|
130
- # Source RPMS stored in SRPMS architecture, noarchs go to all architectures
131
- case pkg_arch
132
- when SRC_ALL_ARCH
133
- [SRC_ALL_PATH]
134
- when BIN_ALL_ARCH
135
- ARCHITECTURES
136
- else
137
- [pkg_arch]
138
- end.each { |arch| yield repo_dir(repo_config[:epel].to_s, dist.to_s, ver.to_s, arch) }
139
- end
126
+ dists.each do |dist|
127
+ dist_name, dist_ver = dist.split("/")
128
+ fail("dist #{dist} format needs to be in form 'dist/dist_version'!") unless dist_name && dist_ver =~ /^\d+$/
129
+ # Source RPMS stored in SRPMS architecture, noarchs go to all architectures
130
+ case pkg_arch
131
+ when SRC_ALL_ARCH
132
+ [SRC_ALL_PATH]
133
+ when BIN_ALL_ARCH
134
+ ARCHITECTURES
135
+ else
136
+ [pkg_arch]
137
+ end.each { |arch| yield repo_dir(repo_config[:epel].to_s, dist_name.to_s, dist_ver.to_s, arch) }
140
138
  end
141
139
  end
142
140
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "right_publish"
8
- s.version = "0.5.2"
8
+ s.version = "0.6.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Szmyd", "Tony Spataro"]
@@ -52,13 +52,13 @@ describe RightPublish::YumRepo do
52
52
  [pkg_arch]
53
53
  end
54
54
 
55
- expected_dists.each_pair do |dist,releases|
56
- releases.each do |release|
57
- dest_archs.each do |arch|
58
- dist_path = File.join(@repo_subdir, @epel_version.to_s, dist.to_s, release, arch)
59
- @install_expectations[dist_path] ||= []
60
- @install_expectations[dist_path] << pkg
61
- end
55
+ expected_dists.each do |dist|
56
+ dist_name, release = dist.split("/")
57
+
58
+ dest_archs.each do |arch|
59
+ dist_path = File.join(@repo_subdir, @epel_version.to_s, dist_name.to_s, release.to_s, arch)
60
+ @install_expectations[dist_path] ||= []
61
+ @install_expectations[dist_path] << pkg
62
62
  end
63
63
  end
64
64
  end
@@ -75,7 +75,7 @@ describe RightPublish::YumRepo do
75
75
  end
76
76
 
77
77
  before(:each) do
78
- @epel_dists = {:el=>['5','6'],:fc=>['12','13']}
78
+ @epel_dists = ["el/5", "el/6", "fc/12", "fc/13"]
79
79
  @epel_version = 1
80
80
  @install_expectations = {}
81
81
  @profile = flexmock(RightPublish::Profile) do |obj|
@@ -148,7 +148,7 @@ describe RightPublish::YumRepo do
148
148
 
149
149
  context "Architecture Dependant Packages" do
150
150
  before(:each) do
151
- @target_distribution_map = {:fc=>['12']}
151
+ @target_distribution_map = [ 'fc/12' ]
152
152
  @target_distribution_str = 'fc/12'
153
153
  end
154
154
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_publish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-08-06 00:00:00.000000000 Z
13
+ date: 2014-08-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder
@@ -279,7 +279,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
279
279
  version: '0'
280
280
  segments:
281
281
  - 0
282
- hash: 4173873965182779825
282
+ hash: 4208402658745595794
283
283
  required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  none: false
285
285
  requirements: