Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #5

Merged
merged 2 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
/pkg/
/spec/reports/
/tmp/
.yardopts
*.gem
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
7 changes: 4 additions & 3 deletions lennarb.gemspec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# frozen_string_literal: true

require_relative 'lib/lennarb/version'
version = File.read(File.expand_path('VERSION', __dir__)).strip

Gem::Specification.new do |spec|
spec.name = 'lennarb'
spec.version = Lennarb::VERSION
spec.version = version
spec.license = 'MIT'
spec.authors = ['Aristóteles Coutinho']
spec.email = ['aristotelesbr@gmail.com']
Expand All @@ -24,10 +24,11 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_dependency 'colorize', '~> 1.1'
spec.add_dependency 'puma', '~> 6.4'
spec.add_dependency 'rack', '~> 3.0', '>= 3.0.8'
spec.add_dependency 'rake', '~> 13.0', '>= 13.0.6'
spec.add_dependency 'colorize', '~> 1.1'

# Uncomment to register a new dependency of your gem
spec.add_development_dependency 'minitest', '~> 5.20'
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
Expand Down
6 changes: 3 additions & 3 deletions lib/lenna/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
require 'puma'

# Internal dependencies
require_relative 'middleware/default/error_handler'
require_relative 'middleware/default/logging'
require_relative 'router'
require 'lenna/middleware/default/error_handler'
require 'lenna/middleware/default/logging'
require 'lenna/router'

module Lenna
# The base class is used to start the server.
Expand Down
15 changes: 8 additions & 7 deletions lib/lenna/router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
# External dependencies
require 'rack'

require_relative 'middleware/app'
require_relative 'router/builder'
require_relative 'router/cache'
require_relative 'router/namespace_stack'
require_relative 'router/request'
require_relative 'router/response'
require_relative 'router/route_matcher'
# Internal dependencies
require 'lenna/middleware/app'
require 'lenna/router/builder'
require 'lenna/router/cache'
require 'lenna/router/namespace_stack'
require 'lenna/router/request'
require 'lenna/router/response'
require 'lenna/router/route_matcher'

module Lenna
# The Node struct is used to represent a node in the tree of routes.
Expand Down
2 changes: 1 addition & 1 deletion lib/lenna/router/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Request < ::Rack::Request
#
# @return [Hash] the request params
#
# @public
# @api public
def params = super.merge(parse_body_params)

# This method rewinds the body
Expand Down
Loading
Loading