reef 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/Gemfile +12 -0
- data/README.md +24 -0
- data/lib/reef.rb +23 -0
- data/lib/reef/version.rb +3 -0
- data/reef.gemspec +18 -0
- metadata +55 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Mjk2NTNkMTg2ZmU3OGQzNzE0MzkxM2IyMGY3MGUyMDMyZmU3ZmI2MQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZmJmZmMzMjBjMWI1NTNiMzE5MDhkNWVmMDM4ODdmMWQzZGRjNzMyNQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YmRhODc0ZTg0ZTc0NDBmZGQ1ZjdiNTU2ZGU2YWYzZDc5ZjhmMjBkZmZhZjlh
|
10
|
+
YWFlNzE5MTcyMmM2NGFlOGZmMjE5Mjc5Yzg3YTI3ZjMzMzA0M2IyY2Q0MTNk
|
11
|
+
NGMwYmI3MGZjZmY2ZDdkYWQ0NTU0NDk2YWQ3MjBiZWMyOGU4MjA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZTFkYzIwNjk3ZjFiN2YzNDA4OGYzZWYzMDUwOGU4MjdlN2RjOTJkNjY4NGFj
|
14
|
+
YWRlNWUwYjUzY2I1ZjRlYWQ3YTExOGJlZDM0YTlhMjdmMDAyNGU1NjhmZGE5
|
15
|
+
YTM0MzA3YTMwNDQwZGQ2Y2FhNWZhNGM1MTIwZDk0OTZmN2QyOGU=
|
data/Gemfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'celluloid', github: 'celluloid/celluloid', branch: 'master'
|
4
|
+
gem 'celluloid-io', github: 'celluloid/celluloid-io', branch: 'master'
|
5
|
+
gem 'websocket-protocol', github: 'faye/websocket-protocol-ruby', branch: 'master'
|
6
|
+
gem 'reel', github: "penultiatix/reel", branch: "master"
|
7
|
+
|
8
|
+
gem 'jruby-openssl' if defined? JRUBY_VERSION
|
9
|
+
gem 'coveralls', require: false
|
10
|
+
|
11
|
+
gemspec
|
12
|
+
|
data/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
reef
|
2
|
+
====
|
3
|
+
|
4
|
+
Celluloid's [Reel](http://github.com/celluloid/reel), expanded into a framework foundation module.
|
5
|
+
This experimental module ought to both extend Reel, and your own framework or application; it is intended to form a base
|
6
|
+
for diverse addons to Reel, both over and under the request: working with Requests and/or the Responses within Reel.
|
7
|
+
|
8
|
+
Comparable functionality would be Rack's middleware for its behavior toward Reel as an extendible handler,
|
9
|
+
and Sinatra / Octarine / Padrino for the HTTP DSL aspect, without those libraries,
|
10
|
+
and using the ultra-fast Reel server.
|
11
|
+
|
12
|
+
**Intended functionalities to start with:**
|
13
|
+
|
14
|
+
* Code Reloading in development environments
|
15
|
+
* Session handling
|
16
|
+
* HTTP DSL, with:
|
17
|
+
* Multiple Routes per end-point
|
18
|
+
* Segmenting base routes into multiple handler classes
|
19
|
+
( i.e. /path/* goes to special handler where /path/endpoint is handled as "/endpoint" )
|
20
|
+
* GZIP compression of public/ and dynamically created responses from server
|
21
|
+
* public/ handling
|
22
|
+
* support something like --daemonize, despite possible limitations ( if platform supports )
|
23
|
+
* rolling restarts and code reloading in production environments
|
24
|
+
* wrap WebSockets within endpoints without requiring different port or Reel instance
|
data/lib/reef.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'reel'
|
2
|
+
|
3
|
+
module Reef
|
4
|
+
|
5
|
+
def initialize(host, port)
|
6
|
+
@server = Reel::Server.supervise(host, port) do |connection|
|
7
|
+
while request = connection.request
|
8
|
+
status, headers, body = call Rack::MockRequest.env_for(request.url, :method => request.method, :input => request.body)
|
9
|
+
response_klass = body.is_a?(Stream) ? StreamResponse : Response
|
10
|
+
connection.respond(response_klass.new(status_symbol(status), headers, body))
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def status_symbol(status)
|
16
|
+
status.is_a?(Fixnum) ? Http::Response::STATUS_CODES[status].downcase.gsub(/\s|-/, '_').to_sym : status.to_sym
|
17
|
+
end
|
18
|
+
|
19
|
+
def terminate
|
20
|
+
@server.terminate if @server
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
data/lib/reef/version.rb
ADDED
data/reef.gemspec
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/reef/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["//de"]
|
6
|
+
gem.email = ["de@01e.mobi"]
|
7
|
+
gem.description = "Celluloid::IO & Reel powered HTTP(S)/WS framework foundation module."
|
8
|
+
gem.summary = "Reel +diversified functionalities; ecosystem of HTTP(S)/WS features."
|
9
|
+
gem.homepage = "https://github.com/penultimatix/reef"
|
10
|
+
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
#de gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = "reef"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Reef::VERSION
|
17
|
+
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: reef
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- //de
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-04-28 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Celluloid::IO & Reel powered HTTP(S)/WS framework foundation module.
|
14
|
+
email:
|
15
|
+
- de@01e.mobi
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- !binary |-
|
21
|
+
R2VtZmlsZQ==
|
22
|
+
- !binary |-
|
23
|
+
UkVBRE1FLm1k
|
24
|
+
- !binary |-
|
25
|
+
bGliL3JlZWYucmI=
|
26
|
+
- !binary |-
|
27
|
+
bGliL3JlZWYvdmVyc2lvbi5yYg==
|
28
|
+
- !binary |-
|
29
|
+
cmVlZi5nZW1zcGVj
|
30
|
+
homepage: https://github.com/penultimatix/reef
|
31
|
+
licenses: []
|
32
|
+
metadata: {}
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: !binary |-
|
42
|
+
MA==
|
43
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: !binary |-
|
48
|
+
MA==
|
49
|
+
requirements: []
|
50
|
+
rubyforge_project:
|
51
|
+
rubygems_version: 2.0.3
|
52
|
+
signing_key:
|
53
|
+
specification_version: 4
|
54
|
+
summary: Reel +diversified functionalities; ecosystem of HTTP(S)/WS features.
|
55
|
+
test_files: []
|