rails-brochure 0.1.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +4 -5
- data/config/routes.rb +2 -2
- data/lib/generators/USAGE +1 -4
- data/lib/generators/brochure_generator.rb +6 -0
- data/lib/rails-brochure/engine.rb +1 -1
- data/lib/rails-brochure/route_reloader.rb +1 -0
- data/lib/rails-brochure/version.rb +1 -1
- data/rails-brochure.gemspec +1 -1
- metadata +19 -26
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1403121def49913f128ee8d5ca2c18d737a056c642865be87045013ea0b136d2
|
4
|
+
data.tar.gz: 1e2d7679dfbb73626dbb83d7617c807246c59c34ac2c6385424d3714084b2c26
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0d163ae8dfe5eef70abf544ddf8b0d2aee569f30898a729141f642d2ef82acf22481f98203f18a61e5c323cf1585b5ecf7ba5d22b9766c52e83f048ac8bc244b
|
7
|
+
data.tar.gz: 050dd73d9684d553e38683526c830cafbfd88653b37ba52a853a12b54ec2e28c8c16b67d74f47c7065af680aaf4c4e945cb81e1e8d1773a02aeaba1ed9463790
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Most of the designers I have worked with really appreciate the power and conveni
|
|
10
10
|
Installation
|
11
11
|
------------
|
12
12
|
|
13
|
-
Rails
|
13
|
+
Rails 5+ required.
|
14
14
|
|
15
15
|
Include in your Gemfile:
|
16
16
|
|
@@ -20,9 +20,8 @@ Don't forget to install:
|
|
20
20
|
|
21
21
|
$ bundle install
|
22
22
|
|
23
|
-
|
23
|
+
$ rails generate brochure home
|
24
24
|
|
25
|
-
$ sudo gem install rails-brochure
|
26
25
|
|
27
26
|
Usage
|
28
27
|
-----
|
@@ -56,7 +55,7 @@ Name Routes?
|
|
56
55
|
|
57
56
|
Named routes are good because if you change a page name (about.html.erb to about_us.html.erb) without updating the links you'll get failing tests:
|
58
57
|
|
59
|
-
|
58
|
+
ActionView::TemplateError: undefined local variable or method `about_path'
|
60
59
|
|
61
60
|
|
62
61
|
Override
|
@@ -97,4 +96,4 @@ Enjoy!
|
|
97
96
|
License
|
98
97
|
-------
|
99
98
|
|
100
|
-
Rails Brochure is Copyright © 2010-
|
99
|
+
Rails Brochure is Copyright © 2010-2024 Dan Hixon. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
|
data/config/routes.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
2
|
Rails::Brochure::HomeContent.templates.each do |pg|
|
3
|
-
|
3
|
+
get "/#{pg}" => "home##{pg}", :as => pg.gsub(/(\/|-)/,'_').to_sym
|
4
4
|
end
|
5
|
-
|
5
|
+
get '*a', :to => 'home#four_zero_four' unless defined?(NONBROCHURE404) && Rails.application.config.consider_all_requests_local
|
6
6
|
end
|
7
7
|
|
data/lib/generators/USAGE
CHANGED
@@ -1,3 +1,9 @@
|
|
1
1
|
class BrochureGenerator < Rails::Generators::NamedBase
|
2
2
|
source_root File.expand_path('../templates', __FILE__)
|
3
|
+
|
4
|
+
def home
|
5
|
+
copy_file "index.html.erb", "#{Rails.root}/app/views/home/index.html.erb"
|
6
|
+
copy_file "four_zero_four.html.erb", "#{Rails.root}/app/views/home/four_zero_four.html.erb"
|
7
|
+
copy_file "about.html.erb", "#{Rails.root}/app/views/home/about.html.erb"
|
8
|
+
end
|
3
9
|
end
|
data/rails-brochure.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
Brochure pages are the semi-static pages like "home", "about us", "FAQ", "pricing", "contact us", etc.
|
15
15
|
Most of the designers I have worked with really appreciate the power and convenience this plugin provides. They are able to simply create erb files in folders like they are used to with static html or php and it just works. No futzing with routes, controllers etc.}
|
16
16
|
|
17
|
-
s.add_dependency('rails', '>=
|
17
|
+
s.add_dependency('rails', '>= 5.0.0')
|
18
18
|
|
19
19
|
s.rubyforge_project = "rails-brochure"
|
20
20
|
|
metadata
CHANGED
@@ -1,45 +1,40 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-brochure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: '0.2'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Dan Hixon
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2024-06-22 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 5.0.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
description:
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
are able to simply create erb files in folders like they are used to with static
|
35
|
-
html or php and it just works. No futzing with routes, controllers etc."
|
26
|
+
version: 5.0.0
|
27
|
+
description: |-
|
28
|
+
Rails engine for brochure pages. Similar to High Voltage but with named routes.
|
29
|
+
Brochure pages are the semi-static pages like "home", "about us", "FAQ", "pricing", "contact us", etc.
|
30
|
+
Most of the designers I have worked with really appreciate the power and convenience this plugin provides. They are able to simply create erb files in folders like they are used to with static html or php and it just works. No futzing with routes, controllers etc.
|
36
31
|
email:
|
37
32
|
- danhixon@gmail.com
|
38
33
|
executables: []
|
39
34
|
extensions: []
|
40
35
|
extra_rdoc_files: []
|
41
36
|
files:
|
42
|
-
- .gitignore
|
37
|
+
- ".gitignore"
|
43
38
|
- Gemfile
|
44
39
|
- MIT-LICENSE
|
45
40
|
- README.md
|
@@ -59,26 +54,24 @@ files:
|
|
59
54
|
- rails-brochure.gemspec
|
60
55
|
homepage: http://github.com/danhixon/rails-brochure
|
61
56
|
licenses: []
|
62
|
-
|
57
|
+
metadata: {}
|
58
|
+
post_install_message:
|
63
59
|
rdoc_options: []
|
64
60
|
require_paths:
|
65
61
|
- lib
|
66
62
|
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
63
|
requirements:
|
69
|
-
- -
|
64
|
+
- - ">="
|
70
65
|
- !ruby/object:Gem::Version
|
71
66
|
version: '0'
|
72
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
68
|
requirements:
|
75
|
-
- -
|
69
|
+
- - ">="
|
76
70
|
- !ruby/object:Gem::Version
|
77
71
|
version: '0'
|
78
72
|
requirements: []
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
specification_version: 3
|
73
|
+
rubygems_version: 3.1.6
|
74
|
+
signing_key:
|
75
|
+
specification_version: 4
|
83
76
|
summary: Rails engine for brochure pages. Similar to High Voltage but with named routes.
|
84
77
|
test_files: []
|