hibana 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/LICENSE +21 -0
- data/README.md +40 -2
- data/hibana.gemspec +1 -1
- data/lib/hibana/application.rb +1 -1
- data/lib/hibana/controller.rb +1 -2
- data/lib/hibana/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18f4806735f62429086841516fd002cffb606fef948f66a0d17e8d1d974265d8
|
4
|
+
data.tar.gz: fa1308e3b6b02c9480167ade185b5d63aa323499290ca6252ad2538fd7ab0be4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2389a465f0beeb5886c839950a189f94b48e9a8de15ba2d20794059ed970b91a369f5781291f566047aae15d8a90bb6aa5c842cd8cca470ea0c87b65cc0819da
|
7
|
+
data.tar.gz: c2dca47b73a449b47e452833d2e12ee8da253566e6704a1234479c1e6d2c6444cceeb7f638993b149d8a781cdad2958391292c54d10f9d1e708049ba16d342b0
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [0.1.1] - 2020-09-20
|
10
|
+
|
11
|
+
- Fix undefined constant error in new rack version.
|
12
|
+
|
13
|
+
## [0.1.0] - 2019-12-24
|
14
|
+
|
15
|
+
### Added
|
16
|
+
|
17
|
+
- Add the 1st implementation.
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2019 Ryo Nakamura
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Hibana
|
2
2
|
|
3
|
-
A small rack-based web framework.
|
3
|
+
A small rack-based web application framework.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,7 +20,45 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
23
|
+
Inherit `Hibana::Application` and run this class as a Rack application.
|
24
|
+
|
25
|
+
The following is an example app using this gem at v0.1.0. See the source code for more information.
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'hibana'
|
29
|
+
require 'rack/static'
|
30
|
+
|
31
|
+
$LOAD_PATH.unshift('lib')
|
32
|
+
require 'my_app/controllers/list_articles'
|
33
|
+
require 'my_app/controllers/show_article'
|
34
|
+
require 'my_app/controllers/show_articles_feed'
|
35
|
+
require 'my_app/controllers/show_sitemap'
|
36
|
+
require 'my_app/controllers/show_top_page'
|
37
|
+
|
38
|
+
module MyApp
|
39
|
+
class Application < ::Hibana::Application
|
40
|
+
route do
|
41
|
+
get '/', to: ::MyApp::Controllers::ShowTopPage
|
42
|
+
get '/articles', to: ::MyApp::Controllers::ListArticles
|
43
|
+
get '/articles/:article_id', to: ::MyApp::Controllers::ShowArticle
|
44
|
+
get '/feed.xml', to: ::MyApp::Controllers::ShowArticlesFeed
|
45
|
+
get '/sitemap.txt', to: ::MyApp::Controllers::ShowSitemap
|
46
|
+
end
|
47
|
+
|
48
|
+
middleware.use(
|
49
|
+
::Rack::Static,
|
50
|
+
root: 'static',
|
51
|
+
urls: %w[
|
52
|
+
/css
|
53
|
+
/favicon.ico
|
54
|
+
/images
|
55
|
+
]
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
run MyApp::Application
|
61
|
+
```
|
24
62
|
|
25
63
|
## Development
|
26
64
|
|
data/hibana.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.authors = ["r7kamura"]
|
7
7
|
spec.email = ["r7kamura@gmail.com"]
|
8
8
|
|
9
|
-
spec.summary = "A small rack-based web framework."
|
9
|
+
spec.summary = "A small rack-based web application framework."
|
10
10
|
spec.homepage = "https://github.com/r7kamura/hibana"
|
11
11
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
12
12
|
|
data/lib/hibana/application.rb
CHANGED
data/lib/hibana/controller.rb
CHANGED
data/lib/hibana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hibana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- r7kamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hanami-router
|
@@ -60,8 +60,10 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- CHANGELOG.md
|
63
64
|
- Gemfile
|
64
65
|
- Gemfile.lock
|
66
|
+
- LICENSE
|
65
67
|
- README.md
|
66
68
|
- Rakefile
|
67
69
|
- bin/console
|
@@ -98,5 +100,5 @@ requirements: []
|
|
98
100
|
rubygems_version: 3.0.3
|
99
101
|
signing_key:
|
100
102
|
specification_version: 4
|
101
|
-
summary: A small rack-based web framework.
|
103
|
+
summary: A small rack-based web application framework.
|
102
104
|
test_files: []
|