goliath 1.0.0.beta.1 → 1.0.0

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

Potentially problematic release.


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

data/HISTORY.md CHANGED
@@ -1,14 +1,25 @@
1
1
  # HISTORY
2
2
 
3
- ## v1.0.0 (May 2x, 2012)
4
-
5
- - removed router DSL for 1.0 release
6
- - removed restriction on environments
7
- - refactored validation handler logic
8
- - refactored params coercion logic
9
- - users can customize log formats
3
+ ## v1.0.0 (August 11, 2012)
4
+
5
+ - Improved WebSocket handling
6
+ - New Coerce middleware to simplify query & post body processing
7
+ - Improved exception logging: full logging in dev, limited in prod mode
8
+ - Exception messages are now returned on 500's (instead of fixed message)
9
+ - Can specify custom logger for spec output
10
+ - Signal handling fixes for Windows
11
+ - HeartBeat middleware accepts :no_log => true
12
+ - Can specify own log_block to customize logging output
13
+ - Added support for PATCH and OPTIONS http methods
14
+ - Load plugins in test server by default
15
+ - Allow arbitrary runtime environments
16
+ - New Goliath.env? method to detect current environment
10
17
  - cleanup of spec helpers
11
- - many small bugfixes
18
+ - many small bugfixes...
19
+
20
+ - All query params are now strings, symbol access is removed
21
+ - Validation middleware no longer defaults to "id" for key - specify own
22
+ - **Router is removed in 1.0** - discussion on [Google group](https://groups.google.com/d/topic/goliath-io/SZxl78BNhUM/discussion)
12
23
 
13
24
  ## v0.9.3 (Oct 16, 2011)
14
25
 
@@ -1,4 +1,4 @@
1
1
  module Goliath
2
2
  # The current version of Goliath
3
- VERSION = '1.0.0.beta.1'
3
+ VERSION = '1.0.0'
4
4
  end
@@ -31,11 +31,15 @@ module Goliath
31
31
 
32
32
  old_stream_send = env[STREAM_SEND]
33
33
  old_stream_close = env[STREAM_CLOSE]
34
- env[STREAM_SEND] = proc { |data| env.handler.send_text_frame(data) }
34
+ env[STREAM_SEND] = proc do |data|
35
+ env.handler.send_text_frame(data.to_s.force_encoding("BINARY"))
36
+ end
35
37
  env[STREAM_CLOSE] = proc { |code, body| env.handler.close_websocket(code, body) }
36
38
  env[STREAM_START] = proc { }
37
39
 
38
40
  conn = Class.new do
41
+ attr_writer :max_frame_size
42
+
39
43
  def initialize(env, parent, stream_send, connection_close)
40
44
  @env = env
41
45
  @parent = parent
@@ -62,6 +66,10 @@ module Goliath
62
66
  def send_data(data)
63
67
  @stream_send.call(data)
64
68
  end
69
+
70
+ def max_frame_size
71
+ @max_frame_size || EM::WebSocket.max_frame_size
72
+ end
65
73
  end.new(env, self, old_stream_send, old_stream_close)
66
74
 
67
75
  upgrade_data = env[UPGRADE_DATA]
data/test.rb ADDED
@@ -0,0 +1,6 @@
1
+ class ValidationErrorInJson < Goliath::API
2
+ use Goliath::Rack::Render, 'json'
3
+ def response(env)
4
+ raise Goliath::Validation::Error.new(420, 'You Must Chill')
5
+ end
6
+ end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goliath
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta.1
5
- prerelease: 6
4
+ version: 1.0.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - dan sinclair
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-03 00:00:00.000000000 Z
13
+ date: 2012-08-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: eventmachine
@@ -645,6 +645,7 @@ files:
645
645
  - spec/unit/validation/standard_http_errors_spec.rb
646
646
  - test/echo_test.rb
647
647
  - test/test_helper.rb
648
+ - test.rb
648
649
  - .gemtest
649
650
  - .gitignore
650
651
  - .rspec
@@ -664,9 +665,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
664
665
  required_rubygems_version: !ruby/object:Gem::Requirement
665
666
  none: false
666
667
  requirements:
667
- - - ! '>'
668
+ - - ! '>='
668
669
  - !ruby/object:Gem::Version
669
- version: 1.3.1
670
+ version: '0'
670
671
  requirements: []
671
672
  rubyforge_project:
672
673
  rubygems_version: 1.8.24