heel 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # Changelog
2
+
3
+ ## Version 3.1.1 - 2013-09-29
4
+ * Fix request logging [#10]
5
+
2
6
  ## Version 3.1.0 - 2013-07-07
3
7
  * Update dependencies
4
8
  * Switch to template contributed by brianflanagan [#8]
@@ -31,6 +31,7 @@ lib/heel.rb
31
31
  lib/heel/configuration.rb
32
32
  lib/heel/directory_indexer.rb
33
33
  lib/heel/error_response.rb
34
+ lib/heel/logger.rb
34
35
  lib/heel/mime_map.rb
35
36
  lib/heel/rackapp.rb
36
37
  lib/heel/request.rb
@@ -4,12 +4,13 @@
4
4
  #++
5
5
 
6
6
  module Heel
7
- VERSION = '3.1.0'
7
+ VERSION = '3.1.1'
8
8
  end
9
9
 
10
10
  require 'heel/configuration'
11
11
  require 'heel/directory_indexer'
12
12
  require 'heel/error_response'
13
+ require 'heel/logger'
13
14
  require 'heel/mime_map'
14
15
  require 'heel/rackapp'
15
16
  require 'heel/request'
@@ -0,0 +1,14 @@
1
+ module Heel
2
+ class Logger
3
+ attr_reader :filename
4
+ def initialize( filename )
5
+ @filename = File.expand_path( filename )
6
+ end
7
+
8
+ def write( msg )
9
+ File.open( filename, "ab" ) do |f|
10
+ f.write( msg )
11
+ end
12
+ end
13
+ end
14
+ end
@@ -219,7 +219,11 @@ module Heel
219
219
  def heel_app
220
220
  app = Heel::RackApp.new({ :document_root => options.document_root,
221
221
  :highlighting => options.highlighting})
222
+
223
+ logger = Heel::Logger.new( log_file )
224
+
222
225
  stack = Rack::Builder.new {
226
+ use Rack::CommonLogger, logger
223
227
  map "/" do
224
228
  run app
225
229
  end
@@ -256,7 +260,7 @@ module Heel
256
260
  :pid => pid_file,
257
261
  :Port => options.port,
258
262
  :Host => options.address,
259
- :environment => 'deployment',
263
+ :environment => 'none',
260
264
  :server => 'puma',
261
265
  :daemonize => options.daemonize
262
266
  }
@@ -1,5 +1,6 @@
1
1
  # vim: syntax=ruby
2
2
  require 'rake/clean'
3
+ require 'digest'
3
4
  #------------------------------------------------------------------------------
4
5
  # If you want to Develop on this project just run 'rake develop' and you'll
5
6
  # have all you need to get going. If you want to use bundler for development,
@@ -79,7 +80,7 @@ begin
79
80
  t.rdoc_files.include( FileList['*.{rdoc,md,txt}'], FileList['ext/**/*.c'],
80
81
  FileList['lib/**/*.rb'] )
81
82
  end
82
- rescue LoadError => le
83
+ rescue StandardError, LoadError
83
84
  This.task_warning( 'rdoc' )
84
85
  end
85
86
 
@@ -115,7 +116,7 @@ else
115
116
  end
116
117
 
117
118
  #------------------------------------------------------------------------------
118
- # Manifest - We want an explicit list of those files that are to be packaged in
119
+ # Manifest - We want an explicit list of thos files that are to be packaged in
119
120
  # the gem. Most of this is from Hoe.
120
121
  #------------------------------------------------------------------------------
121
122
  namespace 'manifest' do
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heel
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Jeremy Hinegardner
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-07-07 00:00:00.000000000 Z
12
+ date: 2013-09-30 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: puma
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: mime-types
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: launchy
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: coderay
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: rake
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ~>
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ~>
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: minitest
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ~>
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ~>
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: rdoc
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ~>
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ~>
109
124
  - !ruby/object:Gem::Version
@@ -160,6 +175,7 @@ files:
160
175
  - lib/heel/configuration.rb
161
176
  - lib/heel/directory_indexer.rb
162
177
  - lib/heel/error_response.rb
178
+ - lib/heel/logger.rb
163
179
  - lib/heel/mime_map.rb
164
180
  - lib/heel/rackapp.rb
165
181
  - lib/heel/request.rb
@@ -176,7 +192,6 @@ files:
176
192
  homepage: http://github.com/copiousfreetime/heel
177
193
  licenses:
178
194
  - BSD
179
- metadata: {}
180
195
  post_install_message:
181
196
  rdoc_options:
182
197
  - --main
@@ -186,20 +201,22 @@ rdoc_options:
186
201
  require_paths:
187
202
  - lib
188
203
  required_ruby_version: !ruby/object:Gem::Requirement
204
+ none: false
189
205
  requirements:
190
206
  - - ! '>='
191
207
  - !ruby/object:Gem::Version
192
208
  version: '0'
193
209
  required_rubygems_version: !ruby/object:Gem::Requirement
210
+ none: false
194
211
  requirements:
195
212
  - - ! '>='
196
213
  - !ruby/object:Gem::Version
197
214
  version: '0'
198
215
  requirements: []
199
216
  rubyforge_project:
200
- rubygems_version: 2.0.3
217
+ rubygems_version: 1.8.23
201
218
  signing_key:
202
- specification_version: 4
219
+ specification_version: 3
203
220
  summary: Heel is a small static web server for use when you need a quick web server
204
221
  for a directory. Once the server is running, heel will use [launchy](http://rubygems.org/gems/launchy/)
205
222
  to open your browser at the URL of your document root.
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDA5YmUzNmVkNjQ5YWZjMzMyMmQ1ZTNiZjMxN2YxMzRhNzZiMzM4MA==
5
- data.tar.gz: !binary |-
6
- ZTkzM2M2MTMxN2MxZGI0ZDFiNGRiZWMyOTQ1YjRiYWE4ZGI1MGM4MQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- OGU2MGU3ZjczYzhkZjExODYzOWMwMTQ5MGIxYTM1Y2Y2NTdiOWUxZGM4ODlj
10
- YzE0ZjcwN2FlNGQ4OGIzYWJkN2I3M2U2NGNkZTc2MzZjMDZjNzFmZmQ0YWFl
11
- ZGU5ODg4NGZkZjQ5YjRjMWQ2ZWQ3NTIxMTI5NmU2MGZiMDBiNzU=
12
- data.tar.gz: !binary |-
13
- ZGYyMjk4NDhjOTRkYzUzODc0Nzg0MjgxNjFiYzk3ZTJhNTFhMzMxMmExMDdk
14
- Y2NlNDdlZDkyZDk5NGE4NjRiYzNmYjdiZDI2ZGYyOGRmOWNlZWZlZGUwNWY3
15
- Nzg5OWI0MTNiZTk5MmE3ZjljNTdmZTFmMmJjODFlZWExMDdiMjI=