chespirito 0.0.5 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20fa9bd6c4f6ac083d413dad7a922c742828b085c279dc87158298e993e70c4c
4
- data.tar.gz: e28284cf6523b591d37963dcc19a8991b8be5bbb36390c2d10b068d55a219768
3
+ metadata.gz: d5a3ed3eaf1adbcbf1a49d1b59fb76ef2224ac431c3f2c96aca074bf36a5be3e
4
+ data.tar.gz: a15c283adb63169df4edc3b0959353fab733c2471162b03a209df8cdbb893f6b
5
5
  SHA512:
6
- metadata.gz: fba07ce5f4fde7a1d1fd50e03b40c966a9b8d1101579c6f698ffd2ec604675c7b731cf10fc0055ca07704e595ef51ca8a5c6b86461c0c3f8919254b648cda481
7
- data.tar.gz: bb87273a7c007c59d1ae5de8997cb561e6fa251d119c3901b61b8c5bb221ded915cd81f505a45757c1dfda15cb8aa9c914217336dafd7b41d2e043dffb6e4ebd
6
+ metadata.gz: 56820004128cde2039df6faec46dc72189f9587d4ea33dd61844fa8865c69e96d9440e1988405d1ef3ec104d284ba4b515228694b084a0b54880aa2dd126ac14
7
+ data.tar.gz: '0794880853dbabe4f90a2578c145b26bdc0783cb7bd5be7cb8c2720299441b5b2228a07a06eae232c3b25cff7a869d5fdc61b0976dbf36747b696ac6b5485a2b'
data/Gemfile CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'rubocop', require: false
6
- gem 'rack'
7
- gem 'adelnor'
5
+ gem 'rack', '~> 2.2.3'
6
+ gem 'adelnor', '~> 0.0.6'
8
7
  gem 'byebug'
data/Gemfile.lock CHANGED
@@ -3,37 +3,18 @@ GEM
3
3
  specs:
4
4
  adelnor (0.0.6)
5
5
  rack
6
- ast (2.4.2)
7
6
  byebug (11.1.3)
8
- parallel (1.22.1)
9
- parser (3.1.2.0)
10
- ast (~> 2.4.1)
11
7
  rack (2.2.3)
12
- rainbow (3.1.1)
13
- regexp_parser (2.4.0)
14
- rexml (3.2.5)
15
- rubocop (1.29.1)
16
- parallel (~> 1.10)
17
- parser (>= 3.1.0.0)
18
- rainbow (>= 2.2.2, < 4.0)
19
- regexp_parser (>= 1.8, < 3.0)
20
- rexml (>= 3.2.5, < 4.0)
21
- rubocop-ast (>= 1.17.0, < 2.0)
22
- ruby-progressbar (~> 1.7)
23
- unicode-display_width (>= 1.4.0, < 3.0)
24
- rubocop-ast (1.18.0)
25
- parser (>= 3.1.1.0)
26
- ruby-progressbar (1.11.0)
27
- unicode-display_width (2.1.0)
28
8
 
29
9
  PLATFORMS
30
10
  aarch64-linux
11
+ arm64-darwin-21
12
+ x86_64-linux
31
13
 
32
14
  DEPENDENCIES
33
- adelnor
15
+ adelnor (~> 0.0.6)
34
16
  byebug
35
- rack
36
- rubocop
17
+ rack (~> 2.2.3)
37
18
 
38
19
  BUNDLED WITH
39
20
  2.3.3
data/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  ![rubygems](https://badgen.net/rubygems/dt/chespirito)
6
6
 
7
7
  ![Build](https://github.com/leandronsp/chespirito/actions/workflows/build.yml/badge.svg)
8
- [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
9
8
  [![Ruby Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://rubystyle.guide)
10
9
  ```
11
10
  ( ) _ _ ( )_
@@ -44,7 +43,6 @@ Usage: make <target>
44
43
  bundle.install Installs the Ruby gems
45
44
  bash Creates a container Bash
46
45
  run.tests Runs Unit tests
47
- rubocop Runs code linter
48
46
  ci Runs code linter and unit tests in CI
49
47
  sample.hello-app Runs a sample Hello World app
50
48
  sample.login-app Runs a sample app with Login feature
data/chespirito.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'chespirito'
5
- spec.version = '0.0.5'
5
+ spec.version = '0.0.7'
6
6
  spec.summary = 'Chespirito Ruby web framework'
7
7
  spec.description = 'A dead simple, yet Rack-compatible, web framework written in Ruby'
8
8
  spec.authors = ['Leandro Proença']
@@ -11,8 +11,8 @@ Gem::Specification.new do |spec|
11
11
  spec.homepage = 'https://github.com/leandronsp/chespirito'
12
12
  spec.license = 'MIT'
13
13
 
14
- spec.add_runtime_dependency 'rack'
15
- spec.add_runtime_dependency 'adelnor'
14
+ spec.add_runtime_dependency 'rack', '~> 2.2.3'
15
+ spec.add_runtime_dependency 'adelnor', '~> 0.0.6'
16
16
 
17
17
  spec.required_ruby_version = '~> 3.0'
18
18
  end
@@ -21,7 +21,7 @@ module Chespirito
21
21
  rack_request = Rack::Request.new(env)
22
22
 
23
23
  body_params = rack_request.post? ? parse_body_params(rack_request.body.read,
24
- rack_request.env) : {}
24
+ rack_request) : {}
25
25
 
26
26
  params = rack_request.params.merge(body_params)
27
27
 
@@ -34,8 +34,10 @@ module Chespirito
34
34
  )
35
35
  end
36
36
 
37
- def self.parse_body_params(body_data, request_env)
38
- content_type = request_env['Content-Type'] || request_env['content-type']
37
+ def self.parse_body_params(body_data, rack_request)
38
+ content_type = rack_request.env['Content-Type'] ||
39
+ rack_request.env['content-type'] ||
40
+ rack_request.content_type
39
41
 
40
42
  case content_type
41
43
  in 'application/json'; JSON.parse(body_data)
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chespirito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Proença
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-05 00:00:00.000000000 Z
11
+ date: 2024-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 2.2.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 2.2.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: adelnor
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.0.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.0.6
41
41
  description: A dead simple, yet Rack-compatible, web framework written in Ruby
42
42
  email: leandronsp@gmail.com
43
43
  executables: []
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.4.10
79
+ rubygems_version: 3.5.3
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Chespirito Ruby web framework