Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Rack response line to String. Updated bundle.
Browse files Browse the repository at this point in the history
  • Loading branch information
nning committed Jul 27, 2016
1 parent aa6c206 commit 25226d6
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 68 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
gemspec

group :cbor do
gem 'cbor', '0.5.9.0', platforms: :ruby
gem 'cbor', platforms: :ruby
end

group :development do
Expand All @@ -13,10 +13,10 @@ end
group :test do
gem 'coveralls', require: false

gem 'grape', '~> 0.13.0'
gem 'grape'
gem 'hobbit'
gem 'nyny'
gem 'rails', '~> 4.2.0'
gem 'rspec-rails', '~> 3.4.0'
gem 'rspec-rails', '~> 3.5.0'
gem 'sinatra'
end
121 changes: 60 additions & 61 deletions Gemfile.lock
Expand Up @@ -10,36 +10,36 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.6)
actionpack (= 4.2.6)
actionview (= 4.2.6)
activejob (= 4.2.6)
actionmailer (4.2.7)
actionpack (= 4.2.7)
actionview (= 4.2.7)
activejob (= 4.2.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.6)
actionview (= 4.2.6)
activesupport (= 4.2.6)
actionpack (4.2.7)
actionview (= 4.2.7)
activesupport (= 4.2.7)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.6)
activesupport (= 4.2.6)
actionview (4.2.7)
activesupport (= 4.2.7)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.6)
activesupport (= 4.2.6)
activejob (4.2.7)
activesupport (= 4.2.7)
globalid (>= 0.3.0)
activemodel (4.2.6)
activesupport (= 4.2.6)
activemodel (4.2.7)
activesupport (= 4.2.7)
builder (~> 3.1)
activerecord (4.2.6)
activemodel (= 4.2.6)
activesupport (= 4.2.6)
activerecord (4.2.7)
activemodel (= 4.2.7)
activesupport (= 4.2.7)
arel (~> 6.0)
activesupport (4.2.6)
activesupport (4.2.7)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand All @@ -51,7 +51,7 @@ GEM
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
builder (3.2.2)
cbor (0.5.9.0)
cbor (0.5.9.1)
celluloid (0.17.3)
celluloid-essentials
celluloid-extras
Expand Down Expand Up @@ -90,23 +90,23 @@ GEM
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.2.5)
docile (1.1.5)
enumerable-lazy (0.0.1)
equalizer (0.0.11)
erubis (2.7.0)
globalid (0.3.6)
globalid (0.3.7)
activesupport (>= 4.1.0)
grape (0.13.0)
grape (0.16.2)
activesupport
builder
hashie (>= 2.1.0)
multi_json (>= 1.3.2)
multi_xml (>= 0.5.2)
mustermann19 (~> 0.4.3)
rack (>= 1.3.0)
rack-accept
rack-mount
virtus (>= 1.0.0)
hashie (3.4.4)
hitimes (1.2.4)
hitimes (1.2.4-java)
hobbit (0.6.1)
rack
i18n (0.7.0)
Expand All @@ -124,8 +124,9 @@ GEM
minitest (5.9.0)
multi_json (1.12.1)
multi_xml (0.5.5)
mustermann19 (0.4.4)
enumerable-lazy
nio4r (1.2.1)
nio4r (1.2.1-java)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
Expand All @@ -137,22 +138,20 @@ GEM
rack (1.6.4)
rack-accept (0.4.5)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.6)
actionmailer (= 4.2.6)
actionpack (= 4.2.6)
actionview (= 4.2.6)
activejob (= 4.2.6)
activemodel (= 4.2.6)
activerecord (= 4.2.6)
activesupport (= 4.2.6)
rails (4.2.7)
actionmailer (= 4.2.7)
actionpack (= 4.2.7)
actionview (= 4.2.7)
activejob (= 4.2.7)
activemodel (= 4.2.7)
activerecord (= 4.2.7)
activesupport (= 4.2.7)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.6)
railties (= 4.2.7)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
Expand All @@ -162,34 +161,34 @@ GEM
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.6)
actionpack (= 4.2.6)
activesupport (= 4.2.6)
railties (4.2.7)
actionpack (= 4.2.7)
activesupport (= 4.2.7)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (0.9.6)
resolv-ipv6favor (0.0.0)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.4)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.1)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.1)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-rails (3.4.2)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
rspec-support (~> 3.5.0)
rspec-rails (3.5.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
ruby-prof (0.15.9)
simplecov (0.12.0)
docile (~> 1.1.0)
Expand All @@ -200,7 +199,7 @@ GEM
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sprockets (3.6.3)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.1.1)
Expand Down Expand Up @@ -229,18 +228,18 @@ PLATFORMS
ruby

DEPENDENCIES
cbor (= 0.5.9.0)
cbor
coveralls
david!
grape (~> 0.13.0)
grape
hobbit
nyny
rails (~> 4.2.0)
rake (~> 0)
rspec (~> 3.2)
rspec-rails (~> 3.4.0)
rspec-rails (~> 3.5.0)
ruby-prof
sinatra

BUNDLED WITH
1.11.2
1.12.5
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -7,9 +7,8 @@
[![Code Climate](https://img.shields.io/codeclimate/github/nning/david.svg)](https://codeclimate.com/github/nning/david)

David is a CoAP server with Rack interface to bring the illustrious family of
Rack compatible web frameworks into the Internet of Things. **Currently, it is
in a development state and probably not ready for use in production.** It is
tested with MRI >= 1.9, JRuby, and Rubinius.
Rack compatible web frameworks into the Internet of Things. It is tested with
MRI >= 1.9, JRuby, and Rubinius.

## Quick Start

Expand Down
3 changes: 2 additions & 1 deletion lib/david/server/utility.rb
Expand Up @@ -5,8 +5,9 @@ module Utility

# This can only use each on body and currently does not support streaming.
def body_to_string(body)
p body
s = ''
body.each { |line| s << line << "\r\n" }
body.each { |line| s << line.to_s << "\r\n" }
body.close if body.respond_to?(:close)
s.chomp
end
Expand Down

0 comments on commit 25226d6

Please sign in to comment.