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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 170f8e41843268c1f41c25165f7ebcd7474e64c69fa335d76c1bae04838d7ec8
4
- data.tar.gz: '093ffb5c0fd5090a058b271fe2d10d7c7f6646b4b54fee168bcaa788d9d0d493'
3
+ metadata.gz: 18f4806735f62429086841516fd002cffb606fef948f66a0d17e8d1d974265d8
4
+ data.tar.gz: fa1308e3b6b02c9480167ade185b5d63aa323499290ca6252ad2538fd7ab0be4
5
5
  SHA512:
6
- metadata.gz: 43d58ad70813c4046210918c9f8933dc2130ea493c2f6e355946d1a2fcdcece3ab09a02d1bf783b1b14d5b89f461f6ede8a94488fde0d94fae0b8d5646d8332f
7
- data.tar.gz: aae725556ee94049b4bb9c93a564a667deafcbe9bb78a3dcdbf966f2e63357f150bb4a481471a7248d9ee8c12db01e2d713988306a40812e242ae56fe09e8f41
6
+ metadata.gz: 2389a465f0beeb5886c839950a189f94b48e9a8de15ba2d20794059ed970b91a369f5781291f566047aae15d8a90bb6aa5c842cd8cca470ea0c87b65cc0819da
7
+ data.tar.gz: c2dca47b73a449b47e452833d2e12ee8da253566e6704a1234479c1e6d2c6444cceeb7f638993b149d8a781cdad2958391292c54d10f9d1e708049ba16d342b0
@@ -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
- TODO: Write usage instructions here
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
 
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  require 'hanami/router'
2
- require 'rack/builder'
2
+ require 'rack'
3
3
 
4
4
  module Hibana
5
5
  class Application
@@ -1,5 +1,4 @@
1
- require 'rack/request'
2
- require 'rack/response'
1
+ require 'rack'
3
2
 
4
3
  module Hibana
5
4
  class Controller
@@ -1,3 +1,3 @@
1
1
  module Hibana
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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: 2019-12-24 00:00:00.000000000 Z
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: []