hanmoto 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +13 -0
- data/lib/hanmoto.rb +11 -0
- data/lib/hanmoto/configuration.rb +18 -0
- data/lib/hanmoto/railtie.rb +0 -7
- data/lib/hanmoto/version.rb +1 -1
- data/lib/tasks/hanmoto_tasks.rake +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ad3cfa703078e53f844bf81ade2ed249b4b130e6ae13b06ea19bef8f94b91e3a
|
4
|
+
data.tar.gz: cc14fb1e3b0af7a340d584d17e828ad082085e0fe02750de30552af67852b7ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bd456105ba4522d6db5551bc9f73397acafefc1570c510d191e3a4c168b58a4b6f51581b6d86bba1b44b2333b798b1ce9ac99a700cee127cb4315efb4122457
|
7
|
+
data.tar.gz: 79bd2d15fa80a03922676b183bd05c1afef616a109d98acce635610e5676f6c3aa57302d6b1db8823c598ef66febf179f18b3e5fdf3488d2264a4af712d53946
|
data/README.md
CHANGED
@@ -79,6 +79,19 @@ Or install it yourself as:
|
|
79
79
|
$ gem install hanmoto
|
80
80
|
```
|
81
81
|
|
82
|
+
## Configuration
|
83
|
+
|
84
|
+
In `config/initializers/hanmoto.rb`, you can configure the following values.
|
85
|
+
|
86
|
+
```ruby
|
87
|
+
Hanmoto.configure do |config|
|
88
|
+
# config.view_dir = 'public_page'
|
89
|
+
# config.layouts = {
|
90
|
+
# html: 'public',
|
91
|
+
# }
|
92
|
+
end
|
93
|
+
```
|
94
|
+
|
82
95
|
## Contributing
|
83
96
|
|
84
97
|
Contribution directions go here.
|
data/lib/hanmoto.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Hanmoto
|
2
|
+
class Configuration
|
3
|
+
OPTIONS = %i[view_dir layouts]
|
4
|
+
|
5
|
+
attr_accessor *OPTIONS
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@view_dir = 'public_pages'
|
9
|
+
@layouts = {
|
10
|
+
html: 'public',
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
def to_h
|
15
|
+
OPTIONS.map { |name| [name, public_send(name)] }.to_h
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/hanmoto/railtie.rb
CHANGED
@@ -5,13 +5,6 @@ require 'hanmoto/rake_task_extension'
|
|
5
5
|
|
6
6
|
module Hanmoto
|
7
7
|
class Railtie < Rails::Railtie
|
8
|
-
# options
|
9
|
-
config.hanmoto = ActiveSupport::OrderedOptions.new
|
10
|
-
config.hanmoto.view_dir = 'public_pages'
|
11
|
-
config.hanmoto.layouts = {
|
12
|
-
html: 'public',
|
13
|
-
}
|
14
|
-
|
15
8
|
rake_tasks do
|
16
9
|
load File.expand_path('../../tasks/hanmoto_tasks.rake', __FILE__)
|
17
10
|
end
|
data/lib/hanmoto/version.rb
CHANGED
@@ -3,6 +3,6 @@ namespace :hanmoto do
|
|
3
3
|
task publish: :environment do
|
4
4
|
# NOTE: clear cache
|
5
5
|
ActionView::Base.assets_manifest = Sprockets::Railtie.build_manifest(Rails.application)
|
6
|
-
Hanmoto::Task.run(
|
6
|
+
Hanmoto::Task.run(Hanmoto.configuration.to_h)
|
7
7
|
end
|
8
8
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanmoto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki77
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- README.md
|
78
78
|
- Rakefile
|
79
79
|
- lib/hanmoto.rb
|
80
|
+
- lib/hanmoto/configuration.rb
|
80
81
|
- lib/hanmoto/railtie.rb
|
81
82
|
- lib/hanmoto/rake_task_extension.rb
|
82
83
|
- lib/hanmoto/task.rb
|
@@ -101,8 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
103
104
|
requirements: []
|
104
|
-
|
105
|
-
rubygems_version: 2.6.14
|
105
|
+
rubygems_version: 3.0.3
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Public pages management with Asset Pipeline
|