pages 0.0.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.
- data/MIT-LICENSE +20 -0
- data/README.md +81 -0
- data/Rakefile +26 -0
- data/app/controllers/pages_controller.rb +1 -0
- data/lib/pages/engine.rb +5 -0
- data/lib/pages/routes.rb +13 -0
- data/lib/pages/version.rb +3 -0
- data/lib/pages.rb +5 -0
- data/lib/tasks/pages_tasks.rake +4 -0
- metadata +124 -0
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright 2012 YOURNAME
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Pages #
|
|
2
|
+
|
|
3
|
+
[](http://travis-ci.org/dockyard/pages)
|
|
4
|
+
|
|
5
|
+
Simple dynamic yet static pages for a Rails app
|
|
6
|
+
|
|
7
|
+
## Installation ##
|
|
8
|
+
|
|
9
|
+
In your Gemfile add the following:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'pages'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then you can either create a `app/views/pages` directory
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
mkdir app/views/pages
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or run the generator
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
rails g pages:setup
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage ##
|
|
28
|
+
|
|
29
|
+
Simply define new pages in your routes
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
Rails.application.routes.draw do
|
|
33
|
+
# Define a single page
|
|
34
|
+
page :about
|
|
35
|
+
|
|
36
|
+
# Define multiple pages
|
|
37
|
+
pages :contact, :team
|
|
38
|
+
end
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This will expand to:
|
|
42
|
+
|
|
43
|
+
```ruby
|
|
44
|
+
get '/about' => 'pages#about', :as => :about
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then just create a new view
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
touch app/views/pages/about.html.erb
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
And create whatever content you want!
|
|
54
|
+
|
|
55
|
+
## Authors ##
|
|
56
|
+
|
|
57
|
+
[Brian Cardarella](http://twitter.com/bcardarella)
|
|
58
|
+
|
|
59
|
+
## Versioning ##
|
|
60
|
+
|
|
61
|
+
This gem follows [Semantic Versioning](http://semver.org)
|
|
62
|
+
|
|
63
|
+
## Want to help? ##
|
|
64
|
+
|
|
65
|
+
Stable branches are created based upon each minor version. Please make
|
|
66
|
+
pull requests to specific branches rather than master.
|
|
67
|
+
|
|
68
|
+
Please make sure you include tests!
|
|
69
|
+
|
|
70
|
+
Unles Rails drops support for Ruby 1.8.7 we will continue to use the
|
|
71
|
+
hash-rocket syntax. Please respect this.
|
|
72
|
+
|
|
73
|
+
Don't use tabs to indent, two spaces are the standard.
|
|
74
|
+
|
|
75
|
+
## Legal ##
|
|
76
|
+
|
|
77
|
+
[DockYard](http://dockyard.com), LLC © 2012
|
|
78
|
+
|
|
79
|
+
[@dockyard](http://twitter.com/dockyard)
|
|
80
|
+
|
|
81
|
+
[Licensed under the MIT license](http://www.opensource.org/licenses/mit-license.php)
|
data/Rakefile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
begin
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
rescue LoadError
|
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
6
|
+
end
|
|
7
|
+
begin
|
|
8
|
+
require 'rdoc/task'
|
|
9
|
+
rescue LoadError
|
|
10
|
+
require 'rdoc/rdoc'
|
|
11
|
+
require 'rake/rdoctask'
|
|
12
|
+
RDoc::Task = Rake::RDocTask
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
17
|
+
rdoc.title = 'Pages'
|
|
18
|
+
rdoc.options << '--line-numbers'
|
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
|
24
|
+
load 'rails/tasks/engine.rake'
|
|
25
|
+
|
|
26
|
+
Bundler::GemHelper.install_tasks
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class PagesController < ApplicationController; end
|
data/lib/pages/engine.rb
ADDED
data/lib/pages/routes.rb
ADDED
data/lib/pages.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: pages
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Brian Cardarella
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2012-08-10 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: rails
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ~>
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 3.2.7
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ~>
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 3.2.7
|
|
30
|
+
- !ruby/object:Gem::Dependency
|
|
31
|
+
name: rspec-rails
|
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
|
33
|
+
none: false
|
|
34
|
+
requirements:
|
|
35
|
+
- - ! '>='
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
type: :development
|
|
39
|
+
prerelease: false
|
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
42
|
+
requirements:
|
|
43
|
+
- - ! '>='
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
46
|
+
- !ruby/object:Gem::Dependency
|
|
47
|
+
name: capybara
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
49
|
+
none: false
|
|
50
|
+
requirements:
|
|
51
|
+
- - ! '>='
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
54
|
+
type: :development
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
none: false
|
|
58
|
+
requirements:
|
|
59
|
+
- - ! '>='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
- !ruby/object:Gem::Dependency
|
|
63
|
+
name: debugger
|
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
|
65
|
+
none: false
|
|
66
|
+
requirements:
|
|
67
|
+
- - ! '>='
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: '0'
|
|
70
|
+
type: :development
|
|
71
|
+
prerelease: false
|
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
73
|
+
none: false
|
|
74
|
+
requirements:
|
|
75
|
+
- - ! '>='
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: '0'
|
|
78
|
+
description: Pages.
|
|
79
|
+
email:
|
|
80
|
+
- bcardarella@gmail.com
|
|
81
|
+
executables: []
|
|
82
|
+
extensions: []
|
|
83
|
+
extra_rdoc_files: []
|
|
84
|
+
files:
|
|
85
|
+
- app/controllers/pages_controller.rb
|
|
86
|
+
- lib/pages/engine.rb
|
|
87
|
+
- lib/pages/routes.rb
|
|
88
|
+
- lib/pages/version.rb
|
|
89
|
+
- lib/pages.rb
|
|
90
|
+
- lib/tasks/pages_tasks.rake
|
|
91
|
+
- MIT-LICENSE
|
|
92
|
+
- Rakefile
|
|
93
|
+
- README.md
|
|
94
|
+
homepage: https://github.com/dockyard/pages
|
|
95
|
+
licenses: []
|
|
96
|
+
post_install_message:
|
|
97
|
+
rdoc_options: []
|
|
98
|
+
require_paths:
|
|
99
|
+
- lib
|
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
|
+
none: false
|
|
102
|
+
requirements:
|
|
103
|
+
- - ! '>='
|
|
104
|
+
- !ruby/object:Gem::Version
|
|
105
|
+
version: '0'
|
|
106
|
+
segments:
|
|
107
|
+
- 0
|
|
108
|
+
hash: -907330285466305920
|
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
|
+
none: false
|
|
111
|
+
requirements:
|
|
112
|
+
- - ! '>='
|
|
113
|
+
- !ruby/object:Gem::Version
|
|
114
|
+
version: '0'
|
|
115
|
+
segments:
|
|
116
|
+
- 0
|
|
117
|
+
hash: -907330285466305920
|
|
118
|
+
requirements: []
|
|
119
|
+
rubyforge_project:
|
|
120
|
+
rubygems_version: 1.8.23
|
|
121
|
+
signing_key:
|
|
122
|
+
specification_version: 3
|
|
123
|
+
summary: Pages
|
|
124
|
+
test_files: []
|