Browse Source

bumped version

master
Yessiest 6 months ago
parent
commit
dce0937e2e
  1. 1
      .gitignore
  2. 2
      landline.gemspec
  3. 2
      lib/landline.rb
  4. 4
      lib/landline/dsl/methods_path.rb
  5. 7
      lib/landline/util/cookie.rb
  6. 4
      lib/landline/util/parseutils.rb

1
.gitignore

@ -1,3 +1,4 @@
/*.gem
/doc
/.yardoc
/examples/uploader/files/*

2
landline.gemspec

@ -2,7 +2,7 @@
Gem::Specification.new do |spec|
spec.name = "landline"
spec.version = "0.10.0"
spec.version = "0.11.0"
spec.summary = "Elegant HTTP DSL"
spec.description = <<~DESC
Landline is a no-hard-dependencies HTTP routing DSL that was made entirely for fun.

2
lib/landline.rb

@ -10,7 +10,7 @@ require_relative 'landline/template'
# Landline is a hideously simple ruby web framework
module Landline
# Landline version
VERSION = '0.10 "Node graph out of date. Rebuilding..." (beta)'
VERSION = '0.11 "Decades of science" (beta)'
# Landline branding and version
VLINE = "Landline/#{Landline::VERSION} (Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})\n".freeze

4
lib/landline/dsl/methods_path.rb

@ -42,13 +42,13 @@ module Landline
# Set root path (appends matched part of the path).
# @param path [String]
def root(path)
@origin.root = path
@origin.root = File.expand_path(path)
end
# Set root path (without appending matched part).
# @param path [String]
def remap(path)
@origin.remap = path
@origin.remap = File.expand_path(path)
end
# Add a preprocessor to the path.

7
lib/landline/util/cookie.rb

@ -4,9 +4,16 @@ require_relative 'parseutils'
require_relative 'errors'
require 'date'
require 'openssl'
require 'base64'
HeaderRegexp = Landline::Util::HeaderRegexp
ParserCommon = Landline::Util::ParserCommon
if RUBY_ENGINE == 'jruby' # fix for JRuby
OpenSSL::HMAC.define_singleton_method(:base64digest) do |*args|
Base64.encode64(OpenSSL::HMAC.digest(*args)).strip
end
end
module Landline
# Utility class for handling cookies
class Cookie

4
lib/landline/util/parseutils.rb

@ -48,7 +48,9 @@ module Landline
# @param regexp [Regexp,nil] override param matching regexp
# @return [Array(String, Hash)]
def self.parse_value(input, sep: ";", unquote: false, regexp: nil)
parts = input.split(sep).map { |x| URI.decode_uri_component(x).strip }
parts = input.split(sep).map do |x|
URI.decode_www_form_component(x).strip
end
base = parts.shift
opts = parts.map do |raw|
key, value = raw.match(if regexp

Loading…
Cancel
Save