srv 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/srv.rb +1 -17
  3. data/lib/srv/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f76818bf891283220048a2006b7d1e30fb473e8
4
- data.tar.gz: 44afe12c7da71eb310024453a354126b7a585ac1
3
+ metadata.gz: 6f0c771b0f116f53d4f297f656ab350f78717ad3
4
+ data.tar.gz: 1a8eeb3e944d76703ce2de375f1a591d421bf172
5
5
  SHA512:
6
- metadata.gz: 0bf5ef4cf9e8b6a4640d3c74883d0be5e3ee5634e9ea22ff896329b6eef29ca4b98db2a3cd735f5563412d4567f0d8ae58d53664949a0385151381a85334dff7
7
- data.tar.gz: 820a0374aa4327548f4c86cda42f7540e62559aa394d2b2f49db57fbbfdf6b55827f0f7896d6b6ae5242781bdab003c51ebecc320da98736da7ee543acdbceaf
6
+ metadata.gz: cc1f9fcaab30e300b4db26506a0e32299c6f3861ccb45993b5b6fb7b687b0ef81978406d0d0201da7ffb4e090e0828763a2f0e39cbfad412356e58d90041ad49
7
+ data.tar.gz: d3d6df86c222f16090fe76ee29939b86fae51689f60f8a25100a0b74ab4ab8902bedc5908e8ca2a68a526ae12dd8568adf6ad7cd0e4ffd50710312e9a5538e4a
data/lib/srv.rb CHANGED
@@ -8,7 +8,7 @@ module Srv
8
8
  root = Dir.pwd
9
9
  puts ">>> serving contents of directory: #{root}"
10
10
 
11
- @rack_server = Rack::Server.new(:app => DirectoryWithIndex.new(root),
11
+ @rack_server = Rack::Server.new(:app => Rack::Directory.new(root),
12
12
  :Port => port,
13
13
  :AccessLog => [])
14
14
  end
@@ -17,20 +17,4 @@ module Srv
17
17
  @rack_server.start
18
18
  end
19
19
  end
20
-
21
- class DirectoryWithIndex < Rack::Directory
22
- def list_directory(path_info, path, script_name)
23
- index, = Dir.glob(File.join(path, "index.htm*"))
24
- if index
25
- index_path_info = path_info
26
- index_path_info += "/" unless path_info[-1] == "/"
27
- index_path_info += File.basename index
28
- altered_env = @env.dup
29
- altered_env["PATH_INFO"] = index_path_info
30
- @app.call(altered_env)
31
- else
32
- super(path_info, path, script_name)
33
- end
34
- end
35
- end
36
20
  end
data/lib/srv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Srv
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: srv
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hubert Lepicki