iodine 0.2.15 → 0.2.16

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of iodine might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e564ce3ac693156f06a68d1f7195db9e998673f8
4
- data.tar.gz: 21b6eea2e9ff2f1c49faa663681f1da96f33e6cf
3
+ metadata.gz: 94ddb42ee5c0ca01c01a252da1a13889165f6bfc
4
+ data.tar.gz: 701269ce567cd8c0206a0503d9c75764788bddee
5
5
  SHA512:
6
- metadata.gz: 8289974c1e83fad49cf207bcbfbe8eb5887d26de585b0b3b03999a2ac30ae6ef99919fa1becf82f04dedaa530211e8f323715819a9d8d825b475bc09f23f85d4
7
- data.tar.gz: 6f59fc30ca85c358ff493ff1f4814aea2fbfeb84ecfbc45e392aefad3bceb5df8f10b24e78f54cc0ad371ba03152985e198d3654d97a234b993ea29a55cd14d9
6
+ metadata.gz: 7e6ff2fe5ac88b5343b33df08ed0c21833e48a1c49f83603dd899b78fa3ec73b3a681268bf71d321c4d15248fec25b46db6a2eba7d2fba992c8478132e4f0d8b
7
+ data.tar.gz: 8b8e9b38b31b14b68f247eedef46eae9adf9d3a3de9c2be9d997e327508e9b83077ab9d9bf015f62a08e053c92e7e3beba8d4a5bc7c16218732792b684eb7e89
@@ -8,6 +8,12 @@ Please notice that this change log contains changes for upcoming releases as wel
8
8
 
9
9
  ***
10
10
 
11
+ #### Change log v.0.2.16
12
+
13
+ **Update**: iodine can now run as a basic HTTP static file server without a Ruby application (no `config.ru`) when the `-www` option is used from the command line.
14
+
15
+ ***
16
+
11
17
  #### Change log v.0.2.15
12
18
 
13
19
  **Fix**: Fixed typo in logging and code comments, credit to @jmoriau in PR #13.
data/exe/iodine CHANGED
@@ -39,8 +39,27 @@ EOS
39
39
  exit(0)
40
40
  end
41
41
 
42
+ app, opt = nil, nil
42
43
  filename = (ARGV[-2].to_s[0] != '-' && ARGV[-1].to_s[0] != '-' && ARGV[-1]) || 'config.ru'
43
- app, opt = Rack::Builder.parse_file filename
44
+
45
+ begin
46
+ app, opt = Rack::Builder.parse_file filename
47
+ rescue
48
+ if ARGV.index('-www') && ARGV[ARGV.index('-www') + 1]
49
+ puts "WARNING: Ruby application not found - missing #{filename}?"
50
+ puts " Running only static file service."
51
+ app = Rack::Builder.new do
52
+ run lambda { |env| [404, {'Content-Type' => 'text/plain', 'Content-Length'.freeze => '21'.freeze}, ['Error 404 - Not Found']] }
53
+ end
54
+ opt = Rack::Server::Options.new.parse!([])
55
+ p app, opt
56
+ else
57
+ puts "ERROR: Ruby application not found - missing #{filename}? For help run:"
58
+ puts " iodine -?"
59
+ exit(0)
60
+ end
61
+ end
62
+
44
63
  if ARGV.index('-maxbd') && ARGV[ARGV.index('-maxbd') + 1]
45
64
  Iodine::Rack.max_body_size = ARGV[ARGV.index('-maxbd') + 1].to_i
46
65
  end
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '0.2.15'.freeze
2
+ VERSION = '0.2.16'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.15
4
+ version: 0.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-25 00:00:00.000000000 Z
11
+ date: 2017-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack