gakubuchi 0.1.0 → 0.1.1
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 +96 -1
- data/lib/gakubuchi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8f99f730ea4cf0f4c61bbffe8cc2250c8fd4cd4
|
4
|
+
data.tar.gz: 2650b9127b36840d288dbed572750ffa409b07ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63fbdc55bba9fc95c3d18c3f1a3ee98ee56a35e9c4e94edbf862e1316be59392063b7702220e845d143670882bde7985dae838ee28ed2b18cb902ee2ba04e818
|
7
|
+
data.tar.gz: bdddf2049a9f888cb9e8648882cf1c513cf184ec6111927dc5c5834bbf13e854c1e618242b4412b984dd6beef55d6d4fa0ee0b361af2e197d1c45d86c985ac76
|
data/README.md
CHANGED
@@ -1,7 +1,102 @@
|
|
1
1
|
# Gakubuchi
|
2
2
|
|
3
|
+
[](http://badge.fury.io/rb/gakubuchi)
|
3
4
|
[](https://travis-ci.org/yasaichi/gakubuchi)
|
4
5
|
[](https://codeclimate.com/github/yasaichi/gakubuchi)
|
5
6
|
[](https://codeclimate.com/github/yasaichi/gakubuchi/coverage)
|
6
7
|
|
7
|
-
|
8
|
+
Gakubuchi is a gem which enables you to manage static pages with Asset Pipeline.
|
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.
|
14
|
+
|
15
|
+
## Quickstart
|
16
|
+
Put this in your Gemfile:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem 'gakubuchi'
|
20
|
+
```
|
21
|
+
|
22
|
+
In `app/assets/templates/static_page.html.erb`:
|
23
|
+
|
24
|
+
```erb
|
25
|
+
<!DOCTYPE html>
|
26
|
+
<html>
|
27
|
+
<head>
|
28
|
+
<title>Static Page</title>
|
29
|
+
<%= stylesheet_link_tag 'application', media: 'all' %>
|
30
|
+
<%= javascript_include_tag 'application' %>
|
31
|
+
</head>
|
32
|
+
<body>
|
33
|
+
Welcome to Gakubuchi!
|
34
|
+
</body>
|
35
|
+
</html>
|
36
|
+
```
|
37
|
+
|
38
|
+
Compile the templeate with:
|
39
|
+
|
40
|
+
```shell
|
41
|
+
rake assets:precompile
|
42
|
+
```
|
43
|
+
|
44
|
+
Then, you can get `public/static_page.html` as follows.
|
45
|
+
|
46
|
+
```html
|
47
|
+
<!DOCTYPE html>
|
48
|
+
<html>
|
49
|
+
<head>
|
50
|
+
<title>Static Page</title>
|
51
|
+
<link rel="stylesheet" media="all" href="/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" />
|
52
|
+
<script src="/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js"></script>
|
53
|
+
</head>
|
54
|
+
<body>
|
55
|
+
Welcome to Gakubuchi!
|
56
|
+
</body>
|
57
|
+
</html>
|
58
|
+
```
|
59
|
+
|
60
|
+
## Configuration
|
61
|
+
First, run the installation generator with:
|
62
|
+
|
63
|
+
```shell
|
64
|
+
rails generate gakubuchi:install
|
65
|
+
```
|
66
|
+
|
67
|
+
This will install the initializer into `config/initializers/gakubuchi.rb`.
|
68
|
+
In the file, you can configure the following values.
|
69
|
+
|
70
|
+
```
|
71
|
+
remove_precompiled_templates # true by default
|
72
|
+
template_root # 'app/assets/templates' by default
|
73
|
+
```
|
74
|
+
|
75
|
+
## Supports
|
76
|
+
* Ruby: `2.0.0` or later
|
77
|
+
* Rails: `4.0.0` or later (supports `3.x` as possible)
|
78
|
+
* Template engines: `ERB` (supports `Haml` and `Slim` soon)
|
79
|
+
|
80
|
+
## Contributing
|
81
|
+
You should follow the steps below.
|
82
|
+
|
83
|
+
1. Fork the repository
|
84
|
+
2. Create a feature branch
|
85
|
+
3. Submit the pull request
|
86
|
+
|
87
|
+
We use [Appraisal](https://github.com/thoughtbot/appraisal) to test with different versions of Rails.
|
88
|
+
|
89
|
+
```shell
|
90
|
+
bundle install
|
91
|
+
appraisal install
|
92
|
+
|
93
|
+
# Run rspec with a specific version of Rails
|
94
|
+
appraisal rails42x rspec
|
95
|
+
|
96
|
+
# Run rspec with all versions of Rails
|
97
|
+
appraisal rspec
|
98
|
+
```
|
99
|
+
|
100
|
+
## License
|
101
|
+
|
102
|
+
MIT License. Copyright 2015 Yuichi Goto.
|
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.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yasaichi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|