pkg-wizard 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,6 +44,9 @@ module PKGWizard
44
44
  option :daemonize,
45
45
  :long => '--daemonize',
46
46
  :default => false
47
+
48
+ option :working_dir,
49
+ :long => '--working-dir DIR'
47
50
 
48
51
  class Webapp < Sinatra::Base
49
52
  def find_job_path(name)
@@ -199,17 +202,20 @@ module PKGWizard
199
202
  cli = BuildBot.new
200
203
  cli.banner = "\nUsage: rpmwiz build-bot (options)\n\n"
201
204
  cli.parse_options
205
+ pwd = cli.config[:working_dir] || Dir.pwd
206
+ pwd = File.expand_path pwd
202
207
  if cli.config[:daemonize]
203
- pwd = Dir.pwd
204
208
  umask = File.umask
205
209
  Daemons.daemonize :app_name => 'build-bot', :dir_mode => :normal, :dir => pwd
206
210
  Dir.chdir pwd
207
- File.umask umask
208
211
  log = File.new("build-bot.log", "a")
209
212
  $stdout.reopen(log)
210
213
  $stderr.reopen(log)
211
214
  $stdout.sync = true
212
215
  $stderr.sync = true
216
+ File.umask umask
217
+ else
218
+ Dir.chdir pwd
213
219
  end
214
220
 
215
221
  mock_profile = cli.config[:mock_profile]
@@ -33,9 +33,9 @@ module PKGWizard
33
33
 
34
34
  option :buildbot_port,
35
35
  :short => '-p PORT',
36
- :description => 'rpmwiz build-bot PORT (default 4567)',
36
+ :description => 'rpmwiz build-bot PORT (default 80)',
37
37
  :long => '--buildbot-port PORT',
38
- :default => 4567
38
+ :default => 80
39
39
 
40
40
  option :tmpdir,
41
41
  :short => '-t TEMP',
@@ -48,8 +48,6 @@ module PKGWizard
48
48
 
49
49
  url = URI.parse(to_url)
50
50
 
51
- headers = { 'accept' => 'application/json' }
52
-
53
51
  req = Net::HTTP::Post.new(url.path)
54
52
  req.content_length = body_stream.size
55
53
  req.content_type = 'multipart/form-data; boundary=' + boundary unless parts.empty?
data/lib/pkg-wizard.rb CHANGED
@@ -4,7 +4,7 @@ require 'mixlib/cli'
4
4
 
5
5
  module PKGWizard
6
6
 
7
- VERSION = '0.1.18'
7
+ VERSION = '0.1.19'
8
8
 
9
9
  class Distribution
10
10
  def self.detect
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkg-wizard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 18
10
- version: 0.1.18
9
+ - 19
10
+ version: 0.1.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio