gitlab-fogbugz 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/HISTORY.md +3 -0
  2. data/Rakefile +1 -1
  3. data/bin/gitlab-fogbugz-server +22 -1
  4. metadata +2 -2
data/HISTORY.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.0.4 / 2012-07-16
2
+ * Use separate CLI options due Sinatra refactoring
3
+
1
4
  # 0.0.3 / 2012-07-15
2
5
  * Make gitlab-fogbugz-server actually work when installed as gem
3
6
  * Fix tests in Ruby 1.9.2 (did work in 1.8 and 1.9.3)
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require "rake/testtask"
4
4
  require "rake/gempackagetask"
5
5
 
6
6
  GEM = "gitlab-fogbugz"
7
- VERSION = "0.0.3"
7
+ VERSION = "0.0.4"
8
8
  AUTHOR = ["John Reilly", "François Beausoleil", "Markus Fischer"]
9
9
  EMAIL = ["jr@trms.com", "francois@teksol.info", "markus@fischer.name"]
10
10
  HOMEPAGE = "http://github.com/mfn/gitlab-fogbugz"
@@ -7,6 +7,7 @@ require 'yaml'
7
7
  require 'cgi'
8
8
  require 'fileutils'
9
9
  require 'fogbugz'
10
+ require 'slop'
10
11
 
11
12
  $: << File.dirname(__FILE__) + "/../lib"
12
13
  require 'fogbugz_service'
@@ -61,7 +62,7 @@ end
61
62
  # about all of your developers. Each dev must
62
63
  # authenticate once with this app, then the token
63
64
  # is kept on the filesystem.
64
- class GitlabFogbugzServer < Sinatra::Base
65
+ class GitlabFogbugzServer < Sinatra::Application
65
66
 
66
67
  ##
67
68
  # GitLab should send its post-receive hook here.
@@ -259,4 +260,24 @@ class GitlabFogbugz
259
260
  end
260
261
  end
261
262
 
263
+ bind ='0.0.0.0'
264
+ port = 4568
265
+ env = "production"
266
+ begin
267
+ opts = Slop.new({:help => true}) do
268
+ banner "#{$0} [options]"
269
+ on(:bind=, "IP address to bind to (defaults to #{bind})") { |v| bind = v }
270
+ on(:e=, "Environment: production, development or test") { |v| env = v }
271
+ on(:p=, :port=, "Port to bind to (defaults to #{port})") { |v| port = v }
272
+ end
273
+ opts.parse
274
+ exit if opts[:help]
275
+ rescue Slop::MissingArgumentError => e
276
+ STDERR.puts "ERROR: #{e.message}", opts
277
+ exit 1
278
+ end
279
+
280
+ GitlabFogbugzServer.bind = bind
281
+ GitlabFogbugzServer.port = port
282
+ GitlabFogbugzServer.environment = env
262
283
  GitlabFogbugzServer.run!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-fogbugz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-15 00:00:00.000000000 Z
14
+ date: 2012-07-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sinatra