gakubuchi 0.2.0 → 0.2.2
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 +4 -4
- data/README.md +34 -32
- data/lib/gakubuchi/template.rb +1 -1
- data/lib/gakubuchi/template_engine.rb +2 -1
- data/lib/gakubuchi/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1edba3f60856d88e7f5529bdbce93eecc0a35313
|
4
|
+
data.tar.gz: 32a2cf35012a653ca428642c13b1a0bc3583a7a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b813c7f0e3745f402df939554df6bdd047ded8387ea81fc74dae8d12042f468dd5f1e94dae5519aa894adce4695c5488106bbb71ae8b33f1627f75c227262c8b
|
7
|
+
data.tar.gz: 933d064cf2693a53698e4809cc1824e5de2976d05ade332fa31ddc99efb67ebe395b58911034d3535bdcf767b3fcb7480472902362dc084e4543739fee9ed016
|
data/README.md
CHANGED
@@ -5,12 +5,7 @@
|
|
5
5
|
[](https://codeclimate.com/github/yasaichi/gakubuchi)
|
6
6
|
[](https://codeclimate.com/github/yasaichi/gakubuchi/coverage)
|
7
7
|
|
8
|
-
Gakubuchi
|
9
|
-
|
10
|
-
## What is Gakubuchi?
|
11
|
-
|
12
|
-
Gakubuchi provides a simple and useful framework to manage static pages (e.g. error pages).
|
13
|
-
As it uses Asset Pipeline, you can treat them as views of Rails.
|
8
|
+
Gakubuchi provides a simple way to manage static pages (e.g. error pages) with Asset Pipeline.
|
14
9
|
|
15
10
|
## Quickstart
|
16
11
|
Put this in your Gemfile:
|
@@ -19,19 +14,27 @@ Put this in your Gemfile:
|
|
19
14
|
gem 'gakubuchi'
|
20
15
|
```
|
21
16
|
|
22
|
-
In `app/assets/templates/
|
17
|
+
In `app/assets/templates/404.html.slim`:
|
23
18
|
|
24
19
|
```slim
|
25
20
|
doctype html
|
26
21
|
html
|
27
22
|
head
|
28
|
-
title
|
29
|
-
|
23
|
+
title The page you were looking for doesn't exist (404)
|
24
|
+
meta name='viewport' content='width=device-width,initial-scale=1'
|
30
25
|
= stylesheet_link_tag 'application', media: 'all'
|
31
|
-
= javascript_include_tag 'application'
|
32
26
|
body
|
33
|
-
|
34
|
-
|
27
|
+
.dialog
|
28
|
+
div
|
29
|
+
h1 The page you were looking for doesn't exist.
|
30
|
+
p You may have mistyped the address or the page may have moved.
|
31
|
+
p If you are the application owner check the logs for more information.
|
32
|
+
```
|
33
|
+
|
34
|
+
Open the following URL in your browser to check the templeate:
|
35
|
+
|
36
|
+
```
|
37
|
+
http://localhost:3000/assets/404.html
|
35
38
|
```
|
36
39
|
|
37
40
|
Compile the templeate with:
|
@@ -40,20 +43,18 @@ Compile the templeate with:
|
|
40
43
|
rake assets:precompile
|
41
44
|
```
|
42
45
|
|
43
|
-
Then, you can get `public/
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
</body>
|
56
|
-
</html>
|
46
|
+
Then, you can get `public/404.html`.
|
47
|
+
|
48
|
+
## Template engines
|
49
|
+
Gakubuchi supports some template engines: `ERB`, `Haml` and `Slim`.
|
50
|
+
If you want to use `Haml` or `Slim`, you need to put them in your Gemfile:
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
# Use Haml
|
54
|
+
gem 'haml-rails'
|
55
|
+
|
56
|
+
# Use Slim
|
57
|
+
gem 'slim-rails'
|
57
58
|
```
|
58
59
|
|
59
60
|
## Configuration
|
@@ -72,17 +73,18 @@ remove_precompiled_templates # true by default
|
|
72
73
|
template_root # 'app/assets/templates' by default
|
73
74
|
```
|
74
75
|
|
75
|
-
##
|
76
|
+
## Supported versions
|
76
77
|
* Ruby: `2.0.0` or later
|
77
|
-
* Rails: `4.0.0` or later
|
78
|
-
* Template engines: `ERB`, `Haml` and `Slim`
|
78
|
+
* Rails: `4.0.0` or later
|
79
79
|
|
80
80
|
## Contributing
|
81
81
|
You should follow the steps below.
|
82
82
|
|
83
|
-
1. Fork the repository
|
84
|
-
2. Create a feature branch
|
85
|
-
3.
|
83
|
+
1. [Fork the repository](https://help.github.com/articles/fork-a-repo/)
|
84
|
+
2. Create a feature branch: `git checkout -b add-new-feature`
|
85
|
+
3. Commit your changes: `git commit -am 'add new feature'`
|
86
|
+
4. Push the branch: `git push origin add-new-feature`
|
87
|
+
4. [Send us a pull request](https://help.github.com/articles/using-pull-requests/)
|
86
88
|
|
87
89
|
We use [Appraisal](https://github.com/thoughtbot/appraisal) to test with different versions of Rails.
|
88
90
|
|
data/lib/gakubuchi/template.rb
CHANGED
data/lib/gakubuchi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gakubuchi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yasaichi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description: Gakubuchi
|
125
|
+
description: Gakubuchi provides a simple way to manage static pages with Asset Pipeline.
|
126
126
|
email:
|
127
127
|
- yasaichi@users.noreply.github.com
|
128
128
|
executables: []
|