bossan 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.txt CHANGED
@@ -1,22 +1,31 @@
1
- Copyright (c) 2012 Hiroki Noda
1
+ Copyright (c) Hiroki Noda and individual contributors.
2
+ All rights reserved.
2
3
 
3
- MIT License
4
+ Redistribution and use in source and binary forms of the software as well
5
+ as documentation, with or without modification, are permitted provided
6
+ that the following conditions are met:
4
7
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
8
+ * Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
12
10
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
11
+ * Redistributions in binary form must reproduce the above
12
+ copyright notice, this list of conditions and the following
13
+ disclaimer in the documentation and/or other materials provided
14
+ with the distribution.
15
15
 
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
+ * The names of the contributors may not be used to endorse or
17
+ promote products derived from this software without specific
18
+ prior written permission.
19
+
20
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
22
+ NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
24
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30
+ SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
31
+ DAMAGE.
data/README.md CHANGED
@@ -4,7 +4,7 @@ Bossan is a high performance asynchronous rack web server.
4
4
 
5
5
  ## Requirements
6
6
 
7
- Bossan requires Ruby 1.9.x.
7
+ Bossan requires Ruby 1.9.2 or later.
8
8
 
9
9
  Bossan supports Linux only.
10
10
 
@@ -61,7 +61,7 @@
61
61
 
62
62
  #define SERVER "bossan/0.1"
63
63
 
64
- VALUE server; // Bossan::Server
64
+ VALUE server; // Bossan
65
65
 
66
66
  static VALUE version_key;
67
67
  static VALUE version_val;
@@ -114,8 +114,8 @@ static VALUE rack_app = NULL; //rack app
114
114
 
115
115
  static char *log_path = NULL; //access log path
116
116
  static int log_fd = -1; //access log
117
- static char *error_log_path = NULL; //error log path
118
- static int err_log_fd = -1; //error log
117
+ /* static char *error_log_path = NULL; //error log path */
118
+ /* static int err_log_fd = -1; //error log */
119
119
 
120
120
  static int is_keep_alive = 0; //keep alive support
121
121
  int max_content_length = 1024 * 1024 * 16; //max_content_length
@@ -1,3 +1,3 @@
1
1
  module Bossan
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -5,14 +5,23 @@ module Rack
5
5
  module Handler
6
6
  module Bossan
7
7
  DEFAULT_OPTIONS = {
8
- "Host" => '0.0.0.0',
9
- "Port" => 8080,
8
+ :Host => '127.0.0.1',
9
+ :Port => 8080,
10
10
  # :Verbose => false
11
11
  }
12
12
 
13
13
  def self.run(app, options = {})
14
14
  options = DEFAULT_OPTIONS.merge(options)
15
- ::Bossan.run(options["Host"], options["Port"], app)
15
+ puts "* Listening on tcp://#{options[:Host]}:#{options[:Port]}"
16
+
17
+ ::Bossan.run(options[:Host], options[:Port], app)
18
+ end
19
+
20
+ def self.valid_options
21
+ {
22
+ "Host=HOST" => "Hostname to listen on (default: localhost)",
23
+ "Port=PORT" => "Port to listen on (default: 8080)",
24
+ }
16
25
  end
17
26
  end
18
27
  register :bossan, Bossan
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bossan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-30 00:00:00.000000000 Z
12
+ date: 2012-12-05 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: high performance asynchronous rack web server
15
15
  email: