File tree Expand file tree Collapse file tree 8 files changed +15
-8
lines changed
Expand file tree Collapse file tree 8 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 2727if RUBY_VERSION >= '3.4'
2828 gem 'mutex_m' # TODO: remove this once as-notifications has such a dependency
2929end
30+
31+ if RUBY_VERSION >= '4.0'
32+ gem 'pstore'
33+ gem 'logger'
34+ gem 'ostruct'
35+ end
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def handle_event(event)
3434
3535 app . configure do |config |
3636 config . adapter = :WEBrick
37- config . adapter_options = { AccessLog : [ ] , Logger : Logger . new ( '/dev/null' ) }
37+ config . adapter_options = { AccessLog : [ ] , Logger : Logger . new ( File :: NULL ) }
3838 end
3939end
4040
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def run
2929 class Server < ::WEBrick ::HTTPServer
3030 def initialize ( options )
3131 @application = options [ :application ]
32- super ( options )
32+ super
3333 end
3434
3535 # Handles a request
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ module Webmachine
55 # This class by itself represents a "strong" entity tag.
66 class ETag
77 include QuotedString
8+
89 # The pattern for a weak entity tag
910 WEAK_ETAG = /^W\/ #{ QUOTED_STRING } $/ . freeze
1011
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def self.from_cgi(env)
3232 # @param [Object]
3333 # @return [Webmachine::Headers]
3434 def self . []( *args )
35- super ( super ( * args ) . map { |k , v | [ k . to_s . downcase , v ] } )
35+ super ( super . map { |k , v | [ k . to_s . downcase , v ] } )
3636 end
3737
3838 # Fetch a header
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ module Webmachine
66 # Encapsulates a MIME media type, with logic for matching types.
77 class MediaType
88 extend Translation
9+
910 # Matches valid media types
1011 MEDIA_TYPE_REGEX = /^\s *([^;\s ]+)\s *((?:;\s *\S +\s *)*)\s *$/ . freeze
1112
@@ -112,11 +113,8 @@ def minor
112113 # ignoring params and taking into account wildcards
113114 def type_matches? ( other )
114115 other = self . class . parse ( other )
115- if [ Dispatcher ::Route ::MATCH_ALL_STR , MATCHES_ALL , type ] . include? ( other . type )
116- true
117- else
118- other . major == major && other . minor == Dispatcher ::Route ::MATCH_ALL_STR
119- end
116+ [ Dispatcher ::Route ::MATCH_ALL_STR , MATCHES_ALL , type ] . include? ( other . type ) ||
117+ ( other . major == major && other . minor == Dispatcher ::Route ::MATCH_ALL_STR )
120118 end
121119 end # class MediaType
122120end # module Webmachine
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ module Streaming
77 # @api private
88 class IOEncoder < Encoder
99 include Enumerable
10+
1011 CHUNK_SIZE = 8192
1112 # Iterates over the IO, encoding and yielding individual chunks
1213 # of the response entity.
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ def to_html
2323 let ( :resource ) do
2424 resource_with do
2525 include Webmachine ::Resource ::Authentication
26+
2627 attr_accessor :realm
2728 def is_authorized? ( auth )
2829 basic_auth ( auth , @realm || 'Webmachine' ) { |u , p | u == 'webmachine' && p == 'http' }
You can’t perform that action at this time.
0 commit comments