yaframework 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63212eea1f540904cec647bd269e65ed74c5f17569d211c5e2df1cacf5e906eb
4
- data.tar.gz: c0d422d3fbcf9f05fb3110062730cfbfa6e943aff65112c2c5262188c79189bf
3
+ metadata.gz: 6cfe57c449982f1b19f548975c965a520181ae0f83937efbfd60cb51c3d20446
4
+ data.tar.gz: 237e0074011df90023813924fcf40217f0f168cd0237868e56f6903ca367df9c
5
5
  SHA512:
6
- metadata.gz: 4c03d0a6d9a2e8a0b59403f4814a79f32169f06984f40a0f62f41d1ed03e3cea55ee7cb53e677d557de3763dbf1e3846152429026983d59b3871e3d813fad60f
7
- data.tar.gz: 9f07579ed44407f75a5431f5c65d33c3f7824c133e672a0ed2278f8033307c37c2b8456eff10a10c8864ad128f69f289a4450bc0143e2d4fb9b34a7c5916953d
6
+ metadata.gz: 6459c931aaed3114f701f6d096dff733a007e94230d6d71320c64847ecba74d99656189a960ab299c58257542968e8e131c6f1dd54f6d96f2f1f1c1a6ea42cdd
7
+ data.tar.gz: 561ab785fcf23d3101249f79751b129678a3e00b0e6dd087a98ac8fb4773709e45b80363bd723b563d7f98b1066b035ab09c0911793c430ce99fc045e0771e1b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.4.9] - 2021-07-25
2
+
3
+ - Some useful aliases added
4
+
1
5
  ## [0.4.8] - 2021-07-25
2
6
 
3
7
  - Before/after hooks added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yaframework (0.4.8)
4
+ yaframework (0.4.9)
5
5
  rack (~> 2.2, >= 2.2.3)
6
6
 
7
7
  GEM
data/examples/README.md CHANGED
@@ -36,6 +36,7 @@ Here are some examples of applications created with Yaframework:
36
36
 
37
37
  Adding and deleting cookies
38
38
 
39
+
39
40
  8. [**Hooks**](https://github.com/maxbarsukov/yaframework/blob/master/examples/before_after_hooks.rb)
40
41
 
41
42
  How to use `before` and `after` hooks
@@ -49,4 +50,3 @@ Then, run `bundle install` to install this gem.
49
50
  ## Run
50
51
 
51
52
  Run with `ruby hello-world.rb` or any other file and view at http://localhost:4567
52
-
@@ -5,6 +5,8 @@ require "rack"
5
5
  module Yaframework
6
6
  class Base
7
7
  attr_reader :routes, :request, :response, :env
8
+ alias req request
9
+ alias res response
8
10
 
9
11
  def initialize
10
12
  @routes = Hash.new([])
@@ -38,6 +40,10 @@ module Yaframework
38
40
  @after_hooks << block
39
41
  end
40
42
 
43
+ def params
44
+ request.params
45
+ end
46
+
41
47
  def handle(status, &block)
42
48
  @inbox[status] = block
43
49
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yaframework
4
- VERSION = "0.4.8"
4
+ VERSION = "0.4.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaframework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - maxbarsukov