vienna 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c7f4271e15a1b4077b68429a001cc73fba108126
4
- data.tar.gz: 022c9950cbea50197c164edcb715ff3a47b930bc
2
+ SHA256:
3
+ metadata.gz: 786d8c74673db2e8c0904bae8cee1ad339aa2aa7db57b932bbcee6260d82aec9
4
+ data.tar.gz: ff9dccf71158d7a32686dcabd96d8754f6037651b97b54139ae67c7c979094f5
5
5
  SHA512:
6
- metadata.gz: d7969d4e0ca2c708fdb928b3e9b5f64562619e1591d4ac3b5539d2b6c2314b80fe210d60c191241f686fa1f16ad4a70e20ded51190a2aebe707ab986337509ee
7
- data.tar.gz: 6497716a18152e8da414ea8a31f914e34e7ede4bff649559b7cc7c8cd971d75c9d37b68b1c058a07280074dddf01fcdbf1b103344f54d4df896c1ec731da8ec4
6
+ metadata.gz: d1ceb74153e3a4419b4fa88edaf496bc96b0ccf4a30c406bd4c4bfc1b3e0fdfb697d5e14dfe2e454ce0f815569be7e23d8d7e8293a7631b71cc9df8415cac3c3
7
+ data.tar.gz: e45dcd391fedc8aed3d7954029d7e6c3729fe93d26315a14613d3450483c0d9aecd070972896abaf5c8342208f026eeb78b0d4fbde86bab34e097550a0a2abd7
@@ -0,0 +1 @@
1
+ 2.5.0
@@ -80,11 +80,32 @@ module Vienna
80
80
  @path = path
81
81
  end
82
82
 
83
+
84
+ def content
85
+ File.exist?(@path) ? File.read(@path) : 'Not Found'
86
+ end
87
+
88
+ def content_length
89
+ content.length.to_s
90
+ end
91
+
92
+ def status
93
+ 404
94
+ end
95
+
96
+ def headers
97
+ {
98
+ 'Content-Type' => 'text/html',
99
+ 'Content-Length' => content_length
100
+ }
101
+ end
102
+
103
+ def body
104
+ [content]
105
+ end
106
+
83
107
  def call(env)
84
- content = File.exist?(@path) ? File.read(@path) : 'Not Found'
85
- length = content.length.to_s
86
-
87
- [404, {'Content-Type' => 'text/html', 'Content-Length' => length}, [content]]
108
+ [status, headers, body]
88
109
  end
89
110
  end
90
111
 
@@ -1,3 +1,3 @@
1
1
  module Vienna
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Vienna::VERSION
9
9
  spec.authors = ['Mikael Konutgan']
10
10
  spec.email = ['me@kmikael.com']
11
- spec.description = 'Tiny, zero-configuration static file server built on top of rack'
11
+ spec.description = 'Tiny, zero-configuration static file server'
12
12
  spec.summary = 'Tiny, zero-configuration static file server built on top of rack'
13
13
  spec.homepage = 'https://github.com/kmikael/vienna'
14
14
  spec.license = 'MIT'
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(/^(test|spec|features)\//)
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_runtime_dependency 'rack', '~> 1.5'
21
+ spec.add_runtime_dependency 'rack', '~> 2.0'
22
22
 
23
23
  spec.add_development_dependency 'bundler', '~> 1.0'
24
- spec.add_development_dependency 'rake', '~> 10.0'
24
+ spec.add_development_dependency 'rake', '~> 12.0'
25
25
  spec.add_development_dependency 'minitest', '~> 5.0'
26
- spec.add_development_dependency 'yard', '~> 0.8'
26
+ spec.add_development_dependency 'yard', '~> 0.9'
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vienna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Konutgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-25 00:00:00.000000000 Z
11
+ date: 2018-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.5'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '12.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '12.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,15 +72,15 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.8'
75
+ version: '0.9'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.8'
83
- description: Tiny, zero-configuration static file server built on top of rack
82
+ version: '0.9'
83
+ description: Tiny, zero-configuration static file server
84
84
  email:
85
85
  - me@kmikael.com
86
86
  executables: []
@@ -88,6 +88,7 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
+ - ".ruby-version"
91
92
  - Gemfile
92
93
  - LICENSE.txt
93
94
  - README.md
@@ -121,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
122
  version: '0'
122
123
  requirements: []
123
124
  rubyforge_project:
124
- rubygems_version: 2.4.5
125
+ rubygems_version: 2.7.4
125
126
  signing_key:
126
127
  specification_version: 4
127
128
  summary: Tiny, zero-configuration static file server built on top of rack
@@ -132,4 +133,3 @@ test_files:
132
133
  - spec/public/images/image.svg
133
134
  - spec/public/index.html
134
135
  - spec/spec.rb
135
- has_rdoc: