rails_pages 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +101 -0
- data/README.md +30 -0
- data/Rakefile +8 -0
- data/app/controllers/rails_pages/pages_controller.rb +7 -0
- data/config/routes.rb +7 -0
- data/lib/generators/rails_pages/controller/USAGE +4 -0
- data/lib/generators/rails_pages/controller/controller_generator.rb +13 -0
- data/lib/generators/rails_pages/controller/templates/controller.rb +2 -0
- data/lib/generators/rails_pages/resource_route/USAGE +4 -0
- data/lib/generators/rails_pages/resource_route/resource_route_generator.rb +11 -0
- data/lib/generators/rails_pages/scaffold/USAGE +4 -0
- data/lib/generators/rails_pages/scaffold/scaffold_generator.rb +13 -0
- data/lib/rails_pages/engine.rb +5 -0
- data/lib/rails_pages/version.rb +3 -0
- data/lib/rails_pages.rb +1 -0
- data/rails_pages.gemspec +24 -0
- data/spec/controllers/pages_controller_spec.rb +37 -0
- data/spec/dummy/Rakefile +2 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +9 -0
- data/spec/dummy/app/views/rails_pages/pages/nested/page.html.erb +0 -0
- data/spec/dummy/app/views/rails_pages/pages/page.html.erb +0 -0
- data/spec/dummy/bin/bundle +4 -0
- data/spec/dummy/bin/rails +5 -0
- data/spec/dummy/bin/rake +5 -0
- data/spec/dummy/config/application.rb +12 -0
- data/spec/dummy/config/boot.rb +3 -0
- data/spec/dummy/config/environment.rb +2 -0
- data/spec/dummy/config/environments/development.rb +3 -0
- data/spec/dummy/config/environments/test.rb +3 -0
- data/spec/dummy/config/initializers/secret_token.rb +1 -0
- data/spec/dummy/config/routes.rb +2 -0
- data/spec/dummy/config.ru +2 -0
- data/spec/dummy/public/404.html +0 -0
- data/spec/dummy/public/500.html +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/index.html +0 -0
- data/spec/integration/controller_generator_spec.rb +30 -0
- data/spec/integration/resource_route_generator_spec.rb +34 -0
- data/spec/integration/scaffold_generator_spec.rb +42 -0
- data/spec/routing/routes_spec.rb +76 -0
- data/spec/spec_helper.rb +12 -0
- metadata +170 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 63b1452839cdb15777d8d767e8dff58ede69bb3b
|
4
|
+
data.tar.gz: 9b8268c0c7a3942236422bd5f5951471318b7efd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c047961b47f989f7ef39f3bf7c4d72f1e0cfb830efa28963cd8770da2256bac745591b0d1a5980d555ddf6fcae4a88826c2edb2af2709084a8f0ef36a46b31c5
|
7
|
+
data.tar.gz: 146c960f8bcf3543ed2c5df17fcd176f0dd2f6edf3a507bc79a258af7eb3a6c67a8bccb4a75751f531c101355c37e4bef21b86e4b083db7706c8e66376c998fe
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rails_pages (0.0.1)
|
5
|
+
rails (~> 4.0.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionmailer (4.0.0)
|
11
|
+
actionpack (= 4.0.0)
|
12
|
+
mail (~> 2.5.3)
|
13
|
+
actionpack (4.0.0)
|
14
|
+
activesupport (= 4.0.0)
|
15
|
+
builder (~> 3.1.0)
|
16
|
+
erubis (~> 2.7.0)
|
17
|
+
rack (~> 1.5.2)
|
18
|
+
rack-test (~> 0.6.2)
|
19
|
+
activemodel (4.0.0)
|
20
|
+
activesupport (= 4.0.0)
|
21
|
+
builder (~> 3.1.0)
|
22
|
+
activerecord (4.0.0)
|
23
|
+
activemodel (= 4.0.0)
|
24
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
25
|
+
activesupport (= 4.0.0)
|
26
|
+
arel (~> 4.0.0)
|
27
|
+
activerecord-deprecated_finders (1.0.3)
|
28
|
+
activesupport (4.0.0)
|
29
|
+
i18n (~> 0.6, >= 0.6.4)
|
30
|
+
minitest (~> 4.2)
|
31
|
+
multi_json (~> 1.3)
|
32
|
+
thread_safe (~> 0.1)
|
33
|
+
tzinfo (~> 0.3.37)
|
34
|
+
arel (4.0.0)
|
35
|
+
atomic (1.1.14)
|
36
|
+
builder (3.1.4)
|
37
|
+
diff-lcs (1.2.4)
|
38
|
+
erubis (2.7.0)
|
39
|
+
hike (1.2.3)
|
40
|
+
i18n (0.6.5)
|
41
|
+
mail (2.5.4)
|
42
|
+
mime-types (~> 1.16)
|
43
|
+
treetop (~> 1.4.8)
|
44
|
+
mime-types (1.25)
|
45
|
+
minitest (4.7.5)
|
46
|
+
multi_json (1.8.1)
|
47
|
+
polyglot (0.3.3)
|
48
|
+
rack (1.5.2)
|
49
|
+
rack-test (0.6.2)
|
50
|
+
rack (>= 1.0)
|
51
|
+
rails (4.0.0)
|
52
|
+
actionmailer (= 4.0.0)
|
53
|
+
actionpack (= 4.0.0)
|
54
|
+
activerecord (= 4.0.0)
|
55
|
+
activesupport (= 4.0.0)
|
56
|
+
bundler (>= 1.3.0, < 2.0)
|
57
|
+
railties (= 4.0.0)
|
58
|
+
sprockets-rails (~> 2.0.0)
|
59
|
+
railties (4.0.0)
|
60
|
+
actionpack (= 4.0.0)
|
61
|
+
activesupport (= 4.0.0)
|
62
|
+
rake (>= 0.8.7)
|
63
|
+
thor (>= 0.18.1, < 2.0)
|
64
|
+
rake (10.1.0)
|
65
|
+
rspec-core (2.14.5)
|
66
|
+
rspec-expectations (2.14.3)
|
67
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
68
|
+
rspec-mocks (2.14.3)
|
69
|
+
rspec-rails (2.14.0)
|
70
|
+
actionpack (>= 3.0)
|
71
|
+
activesupport (>= 3.0)
|
72
|
+
railties (>= 3.0)
|
73
|
+
rspec-core (~> 2.14.0)
|
74
|
+
rspec-expectations (~> 2.14.0)
|
75
|
+
rspec-mocks (~> 2.14.0)
|
76
|
+
sprockets (2.10.0)
|
77
|
+
hike (~> 1.2)
|
78
|
+
multi_json (~> 1.0)
|
79
|
+
rack (~> 1.0)
|
80
|
+
tilt (~> 1.1, != 1.3.0)
|
81
|
+
sprockets-rails (2.0.0)
|
82
|
+
actionpack (>= 3.0)
|
83
|
+
activesupport (>= 3.0)
|
84
|
+
sprockets (~> 2.8)
|
85
|
+
thor (0.18.1)
|
86
|
+
thread_safe (0.1.3)
|
87
|
+
atomic
|
88
|
+
tilt (1.4.1)
|
89
|
+
treetop (1.4.15)
|
90
|
+
polyglot
|
91
|
+
polyglot (>= 0.3.1)
|
92
|
+
tzinfo (0.3.37)
|
93
|
+
|
94
|
+
PLATFORMS
|
95
|
+
ruby
|
96
|
+
|
97
|
+
DEPENDENCIES
|
98
|
+
bundler (~> 1.3.5)
|
99
|
+
rails_pages!
|
100
|
+
rake (~> 10.1.0)
|
101
|
+
rspec-rails (~> 2.14.0)
|
data/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# rails_pages
|
2
|
+
|
3
|
+
Static pages on Rails.
|
4
|
+
|
5
|
+
## License
|
6
|
+
|
7
|
+
This is free and unencumbered software released into the public domain.
|
8
|
+
|
9
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
10
|
+
distribute this software, either in source code form or as a compiled
|
11
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
12
|
+
means.
|
13
|
+
|
14
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
15
|
+
of this software dedicate any and all copyright interest in the
|
16
|
+
software to the public domain. We make this dedication for the benefit
|
17
|
+
of the public at large and to the detriment of our heirs and
|
18
|
+
successors. We intend this dedication to be an overt act of
|
19
|
+
relinquishment in perpetuity of all present and future rights to this
|
20
|
+
software under copyright law.
|
21
|
+
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
23
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
24
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
25
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
26
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
27
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
28
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
29
|
+
|
30
|
+
For more information, please refer to <http://unlicense.org/>
|
data/Rakefile
ADDED
data/config/routes.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
module RailsPages
|
2
|
+
module Generators
|
3
|
+
class ControllerGenerator < Rails::Generators::NamedBase
|
4
|
+
source_root File.expand_path('../templates', __FILE__)
|
5
|
+
|
6
|
+
def create_controller
|
7
|
+
template 'controller.rb', File.join('app/controllers', "#{ARGV[0].pluralize}_controller.rb")
|
8
|
+
end
|
9
|
+
|
10
|
+
hook_for :test_framework, :as => :controller
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module RailsPages
|
2
|
+
module Generators
|
3
|
+
class ResourceRouteGenerator < Rails::Generators::NamedBase
|
4
|
+
source_root File.expand_path(__FILE__)
|
5
|
+
|
6
|
+
def insert_resource_route
|
7
|
+
route "resources :#{ARGV[0].pluralize}, :only => :show, :format => false, :constraints => { :id => /.+?/ }"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module RailsPages
|
2
|
+
module Generators
|
3
|
+
class ScaffoldGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path(__FILE__)
|
5
|
+
|
6
|
+
class_option :controller, :type => :boolean, :default => true
|
7
|
+
class_option :resource_route, :type => :boolean, :default => true
|
8
|
+
|
9
|
+
hook_for :controller
|
10
|
+
hook_for :resource_route
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/rails_pages.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'rails_pages/engine' if defined?(Rails)
|
data/rails_pages.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
$:.push File.expand_path('../lib', __FILE__)
|
2
|
+
|
3
|
+
require 'rails_pages/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'rails_pages'
|
7
|
+
s.version = RailsPages::VERSION
|
8
|
+
s.authors = ['Niclas Gelin']
|
9
|
+
s.email = ['github@niclasgelin.se']
|
10
|
+
s.description = 'Static pages on Rails.'
|
11
|
+
s.summary = ''
|
12
|
+
s.homepage = 'https://github.com/niclasgelin/rails_pages'
|
13
|
+
s.license = 'http://unlicense.org/'
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
17
|
+
s.require_paths = ['lib']
|
18
|
+
|
19
|
+
s.add_dependency 'rails', '~> 4.0.0'
|
20
|
+
|
21
|
+
s.add_development_dependency 'bundler', '~> 1.3.5'
|
22
|
+
s.add_development_dependency 'rake', '~> 10.1.0'
|
23
|
+
s.add_development_dependency 'rspec-rails', '~> 2.14.0'
|
24
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe RailsPages::PagesController do
|
4
|
+
describe 'GET /pages/page' do
|
5
|
+
before { get :show, :id => 'page' }
|
6
|
+
|
7
|
+
it 'responds successfully with an HTTP 200 status code' do
|
8
|
+
expect(response).to be_success
|
9
|
+
expect(response.status).to eq(200)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'renders requested template' do
|
13
|
+
expect(response).to render_template('page')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'inherits layout from ApplicationController' do
|
17
|
+
expect(response).to render_template('layouts/application')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe 'GET /pages/nested/page' do
|
22
|
+
before { get :show, :id => 'nested/page' }
|
23
|
+
|
24
|
+
it 'responds successfully with an HTTP 200 status code' do
|
25
|
+
expect(response).to be_success
|
26
|
+
expect(response.status).to eq(200)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'renders requested template' do
|
30
|
+
expect(response).to render_template('page')
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'inherits layout from ApplicationController' do
|
34
|
+
expect(response).to render_template('layouts/application')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/spec/dummy/Rakefile
ADDED
File without changes
|
File without changes
|
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
require 'action_controller/railtie'
|
3
|
+
|
4
|
+
Bundler.require(*Rails.groups)
|
5
|
+
require 'rails_pages'
|
6
|
+
|
7
|
+
module Dummy
|
8
|
+
class Application < Rails::Application
|
9
|
+
config.cache_classes = false
|
10
|
+
config.eager_load = false
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Dummy::Application.config.secret_key_base = '50e88efdfced226662193739e2d124fb7f61b2181c160f2476e52f61b287d9daf867b10e36c5067d32a023fc805da7f8a9d0f0462f3da8195da100be6b6a50e2'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'generators/rails_pages/controller/controller_generator'
|
3
|
+
|
4
|
+
describe RailsPages::Generators::ControllerGenerator do
|
5
|
+
destination = File.expand_path('../../dummy', __FILE__)
|
6
|
+
|
7
|
+
context 'generate' do
|
8
|
+
before(:all) do
|
9
|
+
Dir.chdir(destination) { %x(rails generate rails_pages:controller test) }
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'tests_controller.rb' do
|
13
|
+
it 'should exist' do
|
14
|
+
expect(File.exist? "#{destination}/app/controllers/tests_controller.rb").to be_true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'destroy' do
|
20
|
+
before(:all) do
|
21
|
+
Dir.chdir(destination) { %x(rails destroy rails_pages:controller test) }
|
22
|
+
end
|
23
|
+
|
24
|
+
describe 'tests_controller.rb' do
|
25
|
+
it 'should not exist' do
|
26
|
+
expect(File.exist? "#{destination}/app/controllers/tests_controller.rb").to be_false
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'generators/rails_pages/resource_route/resource_route_generator'
|
3
|
+
|
4
|
+
describe RailsPages::Generators::ResourceRouteGenerator do
|
5
|
+
destination = File.expand_path('../../dummy', __FILE__)
|
6
|
+
|
7
|
+
context 'generate' do
|
8
|
+
before(:all) do
|
9
|
+
Dir.chdir(destination) { %x(rails generate rails_pages:resource_route test) }
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'resources :tests' do
|
13
|
+
it 'should be defined' do
|
14
|
+
expect(File.read "#{destination}/config/routes.rb").to include(
|
15
|
+
"resources :tests, :only => :show, :format => false, :constraints => { :id => /.+?/ }"
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'destroy' do
|
22
|
+
before(:all) do
|
23
|
+
Dir.chdir(destination) { %x(rails destroy rails_pages:resource_route test) }
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'resources :tests' do
|
27
|
+
it 'should not be defined' do
|
28
|
+
expect(File.read "#{destination}/config/routes.rb").to_not include(
|
29
|
+
"resources :tests, :only => :show, :format => false, :constraints => { :id => /.+?/ }"
|
30
|
+
)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'generators/rails_pages/scaffold/scaffold_generator'
|
3
|
+
|
4
|
+
describe RailsPages::Generators::ScaffoldGenerator do
|
5
|
+
destination = File.expand_path('../../dummy', __FILE__)
|
6
|
+
|
7
|
+
context 'generate' do
|
8
|
+
before(:all) do
|
9
|
+
Dir.chdir(destination) { %x(rails generate rails_pages:scaffold test) }
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'tests_controller.rb' do
|
13
|
+
it 'should exist' do
|
14
|
+
expect(File.exist? "#{destination}/app/controllers/tests_controller.rb").to be_true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe 'resources :tests' do
|
19
|
+
it 'should be defined' do
|
20
|
+
expect(File.read "#{destination}/config/routes.rb").to include('resources :tests')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'destroy' do
|
26
|
+
before(:all) do
|
27
|
+
Dir.chdir(destination) { %x(rails destroy rails_pages:scaffold test) }
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'tests_controller.rb' do
|
31
|
+
it 'should not exist' do
|
32
|
+
expect(File.exist? "#{destination}/app/controllers/tests_controller.rb").to be_false
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'resources :tests' do
|
37
|
+
it 'should not be defined' do
|
38
|
+
expect(File.read "#{destination}/config/routes.rb").to_not include('resources :tests')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'routing' do
|
4
|
+
context 'default' do
|
5
|
+
describe 'pages' do
|
6
|
+
it "routes '/pages/:id' to 'rails_pages/pages#show'" do
|
7
|
+
expect(:get => '/pages/page').to route_to(
|
8
|
+
:controller => 'rails_pages/pages',
|
9
|
+
:action => 'show',
|
10
|
+
:id => 'page'
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'generates page_path helper' do
|
15
|
+
expect(page_path 'page').to eq('/pages/page')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'nested pages' do
|
20
|
+
it "routes '/pages/nested/:id' to 'rails_pages/pages#show'" do
|
21
|
+
expect(:get => '/pages/nested/page').to route_to(
|
22
|
+
:controller => 'rails_pages/pages',
|
23
|
+
:action => 'show',
|
24
|
+
:id => 'nested/page'
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'generates page_path helper' do
|
29
|
+
expect(page_path 'nested/page').to eq('/pages/nested/page')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'root' do
|
35
|
+
before do
|
36
|
+
Rails.application.routes.draw do
|
37
|
+
get '/:id' => 'rails_pages/pages#show',
|
38
|
+
:as => :page,
|
39
|
+
:format => false,
|
40
|
+
:constraints => { :id => /.+?/ }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'pages' do
|
45
|
+
it "routes '/:id' to 'rails_pages/pages#show'" do
|
46
|
+
expect(:get => '/page').to route_to(
|
47
|
+
:controller => 'rails_pages/pages',
|
48
|
+
:action => 'show',
|
49
|
+
:id => 'page'
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'generates page_path helper' do
|
54
|
+
expect(page_path 'page').to eq('/page')
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe 'nested pages' do
|
59
|
+
it "routes '/nested/:id' to 'rails_pages/pages#show'" do
|
60
|
+
expect(:get => '/nested/page').to route_to(
|
61
|
+
:controller => 'rails_pages/pages',
|
62
|
+
:action => 'show',
|
63
|
+
:id => 'nested/page'
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'generates page_path helper' do
|
68
|
+
expect(page_path 'nested/page').to eq('/nested/page')
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
after do
|
73
|
+
Rails.application.reload_routes!
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
ENV['RAILS_ENV'] = 'test'
|
2
|
+
|
3
|
+
require File.expand_path('../dummy/config/environment', __FILE__)
|
4
|
+
require 'rails/generators'
|
5
|
+
require 'rspec/rails'
|
6
|
+
require 'rspec/autorun'
|
7
|
+
|
8
|
+
Rails.backtrace_cleaner.remove_silencers!
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.include Rails.application.routes.url_helpers
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails_pages
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Niclas Gelin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.3.5
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.3.5
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 10.1.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 10.1.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.14.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.14.0
|
69
|
+
description: Static pages on Rails.
|
70
|
+
email:
|
71
|
+
- github@niclasgelin.se
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- Gemfile
|
78
|
+
- Gemfile.lock
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
81
|
+
- app/controllers/rails_pages/pages_controller.rb
|
82
|
+
- config/routes.rb
|
83
|
+
- lib/generators/rails_pages/controller/USAGE
|
84
|
+
- lib/generators/rails_pages/controller/controller_generator.rb
|
85
|
+
- lib/generators/rails_pages/controller/templates/controller.rb
|
86
|
+
- lib/generators/rails_pages/resource_route/USAGE
|
87
|
+
- lib/generators/rails_pages/resource_route/resource_route_generator.rb
|
88
|
+
- lib/generators/rails_pages/scaffold/USAGE
|
89
|
+
- lib/generators/rails_pages/scaffold/scaffold_generator.rb
|
90
|
+
- lib/rails_pages.rb
|
91
|
+
- lib/rails_pages/engine.rb
|
92
|
+
- lib/rails_pages/version.rb
|
93
|
+
- rails_pages.gemspec
|
94
|
+
- spec/controllers/pages_controller_spec.rb
|
95
|
+
- spec/dummy/Rakefile
|
96
|
+
- spec/dummy/app/controllers/application_controller.rb
|
97
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
98
|
+
- spec/dummy/app/views/rails_pages/pages/nested/page.html.erb
|
99
|
+
- spec/dummy/app/views/rails_pages/pages/page.html.erb
|
100
|
+
- spec/dummy/bin/bundle
|
101
|
+
- spec/dummy/bin/rails
|
102
|
+
- spec/dummy/bin/rake
|
103
|
+
- spec/dummy/config.ru
|
104
|
+
- spec/dummy/config/application.rb
|
105
|
+
- spec/dummy/config/boot.rb
|
106
|
+
- spec/dummy/config/environment.rb
|
107
|
+
- spec/dummy/config/environments/development.rb
|
108
|
+
- spec/dummy/config/environments/test.rb
|
109
|
+
- spec/dummy/config/initializers/secret_token.rb
|
110
|
+
- spec/dummy/config/routes.rb
|
111
|
+
- spec/dummy/public/404.html
|
112
|
+
- spec/dummy/public/500.html
|
113
|
+
- spec/dummy/public/favicon.ico
|
114
|
+
- spec/dummy/public/index.html
|
115
|
+
- spec/integration/controller_generator_spec.rb
|
116
|
+
- spec/integration/resource_route_generator_spec.rb
|
117
|
+
- spec/integration/scaffold_generator_spec.rb
|
118
|
+
- spec/routing/routes_spec.rb
|
119
|
+
- spec/spec_helper.rb
|
120
|
+
homepage: https://github.com/niclasgelin/rails_pages
|
121
|
+
licenses:
|
122
|
+
- http://unlicense.org/
|
123
|
+
metadata: {}
|
124
|
+
post_install_message:
|
125
|
+
rdoc_options: []
|
126
|
+
require_paths:
|
127
|
+
- lib
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - '>='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
requirements: []
|
139
|
+
rubyforge_project:
|
140
|
+
rubygems_version: 2.1.5
|
141
|
+
signing_key:
|
142
|
+
specification_version: 4
|
143
|
+
summary: ''
|
144
|
+
test_files:
|
145
|
+
- spec/controllers/pages_controller_spec.rb
|
146
|
+
- spec/dummy/Rakefile
|
147
|
+
- spec/dummy/app/controllers/application_controller.rb
|
148
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
149
|
+
- spec/dummy/app/views/rails_pages/pages/nested/page.html.erb
|
150
|
+
- spec/dummy/app/views/rails_pages/pages/page.html.erb
|
151
|
+
- spec/dummy/bin/bundle
|
152
|
+
- spec/dummy/bin/rails
|
153
|
+
- spec/dummy/bin/rake
|
154
|
+
- spec/dummy/config.ru
|
155
|
+
- spec/dummy/config/application.rb
|
156
|
+
- spec/dummy/config/boot.rb
|
157
|
+
- spec/dummy/config/environment.rb
|
158
|
+
- spec/dummy/config/environments/development.rb
|
159
|
+
- spec/dummy/config/environments/test.rb
|
160
|
+
- spec/dummy/config/initializers/secret_token.rb
|
161
|
+
- spec/dummy/config/routes.rb
|
162
|
+
- spec/dummy/public/404.html
|
163
|
+
- spec/dummy/public/500.html
|
164
|
+
- spec/dummy/public/favicon.ico
|
165
|
+
- spec/dummy/public/index.html
|
166
|
+
- spec/integration/controller_generator_spec.rb
|
167
|
+
- spec/integration/resource_route_generator_spec.rb
|
168
|
+
- spec/integration/scaffold_generator_spec.rb
|
169
|
+
- spec/routing/routes_spec.rb
|
170
|
+
- spec/spec_helper.rb
|