shotgun 0.8 → 0.9

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.
@@ -11,7 +11,7 @@ module Shotgun
11
11
 
12
12
  def initialize(rackup_file, &block)
13
13
  @rackup_file = rackup_file
14
- @config = block || lambda { }
14
+ @config = block || Proc.new { }
15
15
  end
16
16
 
17
17
  def call(env)
@@ -111,18 +111,22 @@ module Shotgun
111
111
  config = File.read(rackup_file)
112
112
  eval "Rack::Builder.new {( #{config}\n )}.to_app", nil, rackup_file
113
113
  else
114
- require rackup_file
114
+ require File.expand_path(rackup_file)
115
115
  if defined? Sinatra::Application
116
116
  Sinatra::Application.set :reload, false
117
117
  Sinatra::Application.set :logging, false
118
118
  Sinatra::Application.set :raise_errors, true
119
119
  Sinatra::Application
120
120
  else
121
- Object.const_get(File.basename(rackup_file, '.rb').capitalize)
121
+ Object.const_get(camel_case(File.basename(rackup_file, '.rb')))
122
122
  end
123
123
  end
124
124
  end
125
125
 
126
+ def camel_case(string)
127
+ string.split("_").map { |part| part.capitalize }.join
128
+ end
129
+
126
130
  def spec_body(body)
127
131
  if body.respond_to? :to_str
128
132
  [body]
@@ -1,7 +1,7 @@
1
- .\" generated with Ronn/v0.6.42
2
- .\" http://github.com/rtomayko/ronn/tree/0.6.6-36-gb67d494
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "SHOTGUN" "1" "June 2010" "Shotgun 0.8" ""
4
+ .TH "SHOTGUN" "1" "February 2011" "Shotgun 0.9" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBshotgun\fR \- reloading rack development server
@@ -145,6 +145,19 @@ Fork and report issues at github\.com:
145
145
  .
146
146
  .SH "VERSION HISTORY"
147
147
  .
148
+ .SS "Version 0\.9 (2011 February 24)"
149
+ .
150
+ .IP "\(bu" 4
151
+ \fIhttp://github\.com/rtomayko/shotgun/compare/0\.8\.\.\.0\.9\fR
152
+ .
153
+ .IP "\(bu" 4
154
+ Various Ruby 1\.9\.2 fixes\.
155
+ .
156
+ .IP "\(bu" 4
157
+ Handle application class names consisting of multiple words\.
158
+ .
159
+ .IP "" 0
160
+ .
148
161
  .SS "Version 0\.8 (2010 June 24)"
149
162
  .
150
163
  .IP "\(bu" 4
@@ -148,6 +148,14 @@ Fork and report issues at github.com:
148
148
 
149
149
  ## VERSION HISTORY
150
150
 
151
+ ### Version 0.9 (2011 February 24)
152
+
153
+ * <http://github.com/rtomayko/shotgun/compare/0.8...0.9>
154
+
155
+ * Various Ruby 1.9.2 fixes.
156
+
157
+ * Handle application class names consisting of multiple words.
158
+
151
159
  ### Version 0.8 (2010 June 24)
152
160
 
153
161
  * <http://github.com/rtomayko/shotgun/compare/0.7...0.8>
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shotgun'
3
- s.version = '0.8'
4
- s.date = '2010-06-23'
3
+ s.version = '0.9'
4
+ s.date = '2011-02-24'
5
5
 
6
6
  s.description = "reloading rack development server"
7
7
  s.summary = s.description
@@ -36,6 +36,6 @@ Gem::Specification.new do |s|
36
36
  s.extra_rdoc_files = %w[README]
37
37
  s.add_dependency 'rack', '>= 1.0'
38
38
 
39
- s.homepage = "http://rtomayko.github.com/shotgun/"
39
+ s.homepage = "http://github.com/rtomayko/shotgun"
40
40
  s.require_paths = %w[lib]
41
41
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shotgun
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 8
9
- version: "0.8"
8
+ - 9
9
+ version: "0.9"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ryan Tomayko
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-23 00:00:00 -07:00
17
+ date: 2011-02-24 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -61,7 +61,7 @@ files:
61
61
  - test/test_shotgun_loader.rb
62
62
  - test/test_shotgun_static.rb
63
63
  has_rdoc: true
64
- homepage: http://rtomayko.github.com/shotgun/
64
+ homepage: http://github.com/rtomayko/shotgun
65
65
  licenses: []
66
66
 
67
67
  post_install_message: