locomotive_page_redirect_plugin 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/Gemfile +28 -0
- data/Gemfile.lock +357 -0
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +93 -0
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.7.1/application.css +1110 -0
- data/coverage/assets/0.7.1/application.js +626 -0
- data/coverage/assets/0.7.1/fancybox/blank.gif +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_close.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_loading.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_nav_left.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_nav_right.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_left.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_main.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_over.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_right.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox-x.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox-y.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox.png +0 -0
- data/coverage/assets/0.7.1/favicon_green.png +0 -0
- data/coverage/assets/0.7.1/favicon_red.png +0 -0
- data/coverage/assets/0.7.1/favicon_yellow.png +0 -0
- data/coverage/assets/0.7.1/loading.gif +0 -0
- data/coverage/assets/0.7.1/magnify.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/assets/0.8.0/application.css +799 -0
- data/coverage/assets/0.8.0/application.js +1559 -0
- data/coverage/assets/0.8.0/colorbox/border.png +0 -0
- data/coverage/assets/0.8.0/colorbox/controls.png +0 -0
- data/coverage/assets/0.8.0/colorbox/loading.gif +0 -0
- data/coverage/assets/0.8.0/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.8.0/favicon_green.png +0 -0
- data/coverage/assets/0.8.0/favicon_red.png +0 -0
- data/coverage/assets/0.8.0/favicon_yellow.png +0 -0
- data/coverage/assets/0.8.0/loading.gif +0 -0
- data/coverage/assets/0.8.0/magnify.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +851 -0
- data/lib/locomotive/page_redirect/plugin.rb +54 -0
- data/lib/locomotive/page_redirect/plugin/config.haml +12 -0
- data/lib/locomotive/page_redirect/plugin/config.rb +24 -0
- data/lib/locomotive/page_redirect/plugin/version.rb +3 -0
- data/lib/locomotive_page_redirect_plugin.rb +1 -0
- data/locomotive_page_redirect_plugin.gemspec +25 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/home_controller.rb +4 -0
- data/spec/dummy/app/controllers/test_controller.rb +13 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/home/index.html.erb +9 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/sessions/new.html.erb +15 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +66 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +31 -0
- data/spec/dummy/config/environments/production.rb +64 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +10 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/mongoid.yml +80 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/log/test.log +43769 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/lib/locomotive/page_redirect/plugin_spec.rb +53 -0
- data/spec/spec_helper.rb +50 -0
- data/spec/support/factories.rb +183 -0
- metadata +173 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Locomotive
|
4
|
+
module PageRedirect
|
5
|
+
describe Plugin do
|
6
|
+
before :each do
|
7
|
+
@type = FactoryGirl.build(:content_type)
|
8
|
+
@type.entries_custom_fields.build(label: 'regexp', type: 'string')
|
9
|
+
@type.entries_custom_fields.build(label: 'url', type: 'string')
|
10
|
+
@type.save
|
11
|
+
@site = @type.site
|
12
|
+
Locomotive::Plugins.use_site(@site)
|
13
|
+
@plugin = Plugin.new()
|
14
|
+
Config.hash = {
|
15
|
+
redirect_model_slug: @type.slug
|
16
|
+
}
|
17
|
+
end
|
18
|
+
it 'should not redirect pages not in the model' do
|
19
|
+
@type.entries.create(regexp: '/bad-path', url: 'nowhere')
|
20
|
+
controller = FakeController.new
|
21
|
+
request = FakeRequest.new
|
22
|
+
request.fullpath = '/good-path'
|
23
|
+
controller.request = request
|
24
|
+
controller.current_site = @site
|
25
|
+
@plugin.expects(:controller).twice.returns(controller)
|
26
|
+
@plugin.expects(:redirect_to).never
|
27
|
+
@plugin.run_callbacks(:page_render)
|
28
|
+
end
|
29
|
+
it 'should redirect pages in the model' do
|
30
|
+
@type.entries.create(regexp: '/bad-path', url: 'somewhere')
|
31
|
+
controller = FakeController.new
|
32
|
+
request = FakeRequest.new
|
33
|
+
request.fullpath = '/bad-path'
|
34
|
+
controller.request = request
|
35
|
+
controller.current_site = @site
|
36
|
+
controller.expects(:redirect_to).once.with('somewhere')
|
37
|
+
@plugin.expects(:controller).at_least_once.returns(controller)
|
38
|
+
@plugin.run_callbacks(:page_render)
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
class FakeController
|
43
|
+
def initialize()
|
44
|
+
@session = {}
|
45
|
+
@flash = {}
|
46
|
+
end
|
47
|
+
attr_accessor :request, :current_site
|
48
|
+
end
|
49
|
+
class FakeRequest
|
50
|
+
attr_accessor :fullpath
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'simplecov'
|
3
|
+
SimpleCov.start 'rails'
|
4
|
+
|
5
|
+
# Configure Rails Environment
|
6
|
+
ENV["RAILS_ENV"] ||= 'test'
|
7
|
+
require 'active_support/dependencies'
|
8
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
9
|
+
require 'rspec/rails'
|
10
|
+
require 'capybara/rails'
|
11
|
+
require 'capybara/rspec'
|
12
|
+
require 'shoulda/matchers'
|
13
|
+
require 'database_cleaner'
|
14
|
+
require 'factory_girl'
|
15
|
+
require 'therubyracer'
|
16
|
+
|
17
|
+
|
18
|
+
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
|
19
|
+
|
20
|
+
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each { |f| require f }
|
21
|
+
|
22
|
+
RSpec.configure do |config|
|
23
|
+
config.color = true
|
24
|
+
config.formatter = 'documentation'
|
25
|
+
config.infer_base_class_for_anonymous_controllers = false
|
26
|
+
config.infer_spec_type_from_file_location!
|
27
|
+
config.mock_with :mocha
|
28
|
+
config.expect_with :rspec do |c|
|
29
|
+
c.syntax = [:should, :expect]
|
30
|
+
end
|
31
|
+
|
32
|
+
config.before(:suite) do
|
33
|
+
DatabaseCleaner.strategy = :truncation
|
34
|
+
DatabaseCleaner.orm = 'mongoid'
|
35
|
+
end
|
36
|
+
|
37
|
+
config.after(:suite) do
|
38
|
+
DatabaseCleaner.clean
|
39
|
+
end
|
40
|
+
|
41
|
+
config.before(:each) do
|
42
|
+
DatabaseCleaner.clean
|
43
|
+
end
|
44
|
+
|
45
|
+
config.after(:each) do
|
46
|
+
DatabaseCleaner.clean
|
47
|
+
end
|
48
|
+
|
49
|
+
config.include FactoryGirl::Syntax::Methods
|
50
|
+
end
|
@@ -0,0 +1,183 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
FactoryGirl.define do
|
4
|
+
|
5
|
+
## Site ##
|
6
|
+
factory :site, class: Locomotive::Site do
|
7
|
+
name 'Acme Website'
|
8
|
+
subdomain 'acme'
|
9
|
+
created_at Time.now
|
10
|
+
|
11
|
+
factory 'test site' do
|
12
|
+
name 'Locomotive test website'
|
13
|
+
subdomain 'test'
|
14
|
+
|
15
|
+
after(:build) do |site_test|
|
16
|
+
site_test.memberships.build account: Locomotive::Account.where(name: 'Admin').first || create('admin user'), role: 'admin'
|
17
|
+
end
|
18
|
+
|
19
|
+
factory 'another site' do
|
20
|
+
name 'Locomotive test website #2'
|
21
|
+
subdomain 'test2'
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
factory 'existing site' do
|
27
|
+
name 'Locomotive site with existing models'
|
28
|
+
subdomain 'models'
|
29
|
+
after(:build) do |site_with_models|
|
30
|
+
site_with_models.content_types.build(
|
31
|
+
slug: 'projects',
|
32
|
+
name: 'Existing name',
|
33
|
+
description: 'Existing description',
|
34
|
+
order_by: 'created_at')
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
factory 'valid site' do
|
40
|
+
# after(:build) { |valid_site| valid_site.stubs(:valid?).returns(true) }
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
# Accounts ##
|
46
|
+
factory :account, class: Locomotive::Account do
|
47
|
+
name 'Bart Simpson'
|
48
|
+
email 'bart@simpson.net'
|
49
|
+
password 'easyone'
|
50
|
+
password_confirmation 'easyone'
|
51
|
+
locale 'en'
|
52
|
+
|
53
|
+
factory 'admin user' do
|
54
|
+
name 'Admin'
|
55
|
+
email 'admin@locomotiveapp.org'
|
56
|
+
end
|
57
|
+
|
58
|
+
factory 'designer user' do
|
59
|
+
name 'Designer'
|
60
|
+
email 'designer@locomotiveapp.org'
|
61
|
+
end
|
62
|
+
|
63
|
+
factory 'author user' do
|
64
|
+
name 'Author'
|
65
|
+
email 'author@locomotiveapp.org'
|
66
|
+
end
|
67
|
+
|
68
|
+
factory 'frenchy user' do
|
69
|
+
name 'Jean Claude'
|
70
|
+
email 'jean@frenchy.fr'
|
71
|
+
locale 'fr'
|
72
|
+
end
|
73
|
+
|
74
|
+
factory 'brazillian user' do
|
75
|
+
name 'Jose Carlos'
|
76
|
+
email 'jose@carlos.com.br'
|
77
|
+
locale 'pt-BR'
|
78
|
+
end
|
79
|
+
|
80
|
+
factory 'italian user' do
|
81
|
+
name 'Paolo Rossi'
|
82
|
+
email 'paolo@paolo-rossi.it'
|
83
|
+
locale 'it'
|
84
|
+
end
|
85
|
+
|
86
|
+
factory 'polish user' do
|
87
|
+
name 'Paweł Wilk'
|
88
|
+
email 'pawel@randomseed.pl'
|
89
|
+
locale 'pl'
|
90
|
+
end
|
91
|
+
|
92
|
+
factory 'japanese user' do
|
93
|
+
name 'OSA Shunsuke'
|
94
|
+
email 'xxxcaqui@gmail.com'
|
95
|
+
locale 'ja'
|
96
|
+
end
|
97
|
+
|
98
|
+
factory 'bulgarian user' do
|
99
|
+
name 'Lyuben Petrov'
|
100
|
+
email 'lyuben.y.petrov@gmail.com'
|
101
|
+
locale 'bg'
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
## Memberships ##
|
106
|
+
factory :membership, class: Locomotive::Membership do
|
107
|
+
role 'admin'
|
108
|
+
account { Locomotive::Account.where(name: 'Bart Simpson').first || FactoryGirl.create('admin user') }
|
109
|
+
|
110
|
+
factory :admin do
|
111
|
+
role 'admin'
|
112
|
+
account { FactoryGirl.create('admin user', locale: 'en') }
|
113
|
+
end
|
114
|
+
|
115
|
+
factory :designer do
|
116
|
+
role 'designer'
|
117
|
+
account { FactoryGirl.create('frenchy user', locale: 'en') }
|
118
|
+
end
|
119
|
+
|
120
|
+
factory :author do
|
121
|
+
role 'author'
|
122
|
+
account { FactoryGirl.create('brazillian user', locale: 'en') }
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
## Pages ##
|
128
|
+
factory :page, class: Locomotive::Page do
|
129
|
+
title 'Home page'
|
130
|
+
slug 'index'
|
131
|
+
published true
|
132
|
+
site { Locomotive::Site.where(subdomain: 'acme').first || FactoryGirl.create(:site) }
|
133
|
+
|
134
|
+
factory :sub_page do
|
135
|
+
title 'Subpage'
|
136
|
+
slug 'subpage'
|
137
|
+
published true
|
138
|
+
site { Locomotive::Site.where(subdomain: 'acme').first || FactoryGirl.create(:site) }
|
139
|
+
parent { Locomotive::Page.where(slug: 'index').first || FactoryGirl.create(:page) }
|
140
|
+
end
|
141
|
+
|
142
|
+
end
|
143
|
+
|
144
|
+
## Snippets ##
|
145
|
+
factory :snippet, class: Locomotive::Snippet do
|
146
|
+
name 'My website title'
|
147
|
+
slug 'header'
|
148
|
+
template %{<title>Acme</title>}
|
149
|
+
site { Locomotive::Site.where(subdomain: 'acme').first || FactoryGirl.create(:site) }
|
150
|
+
end
|
151
|
+
|
152
|
+
|
153
|
+
## Assets ##
|
154
|
+
factory :asset, class: Locomotive::ContentAsset do
|
155
|
+
site { Locomotive::Site.where(subdomain: 'acme').first || FactoryGirl.create(:site) }
|
156
|
+
end
|
157
|
+
|
158
|
+
|
159
|
+
## Theme assets ##
|
160
|
+
factory :theme_asset, class: Locomotive::ThemeAsset do
|
161
|
+
site { Locomotive::Site.where(subdomain: 'acme').first || FactoryGirl.create(:site) }
|
162
|
+
end
|
163
|
+
|
164
|
+
## Content types ##
|
165
|
+
factory :content_type, class: Locomotive::ContentType do
|
166
|
+
name 'My project'
|
167
|
+
description 'The list of my projects'
|
168
|
+
site { Locomotive::Site.where(subdomain: 'acme').first || FactoryGirl.create(:site) }
|
169
|
+
end
|
170
|
+
|
171
|
+
factory :content_entry, class: Locomotive::ContentEntry do
|
172
|
+
end
|
173
|
+
|
174
|
+
factory :translation, class: Locomotive::Translation do
|
175
|
+
end
|
176
|
+
|
177
|
+
## Plugins ##
|
178
|
+
factory :plugin_data, :class => Locomotive::PluginData do
|
179
|
+
site { Locomotive::Site.where(:subdomain => "acme").first || FactoryGirl.create(:site) }
|
180
|
+
plugin_id 'my_plugin_id'
|
181
|
+
end
|
182
|
+
|
183
|
+
end
|
metadata
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: locomotive_page_redirect_plugin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Colibri Software Inc.
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-04-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: locomotive_plugins
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
description: Allows CMS designers to assign a locomotive model that defines page redirestions.
|
28
|
+
email: info@colibri-software.com
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- .gitignore
|
34
|
+
- Gemfile
|
35
|
+
- Gemfile.lock
|
36
|
+
- coverage/.last_run.json
|
37
|
+
- coverage/.resultset.json
|
38
|
+
- coverage/.resultset.json.lock
|
39
|
+
- coverage/assets/0.7.1/application.css
|
40
|
+
- coverage/assets/0.7.1/application.js
|
41
|
+
- coverage/assets/0.7.1/fancybox/blank.gif
|
42
|
+
- coverage/assets/0.7.1/fancybox/fancy_close.png
|
43
|
+
- coverage/assets/0.7.1/fancybox/fancy_loading.png
|
44
|
+
- coverage/assets/0.7.1/fancybox/fancy_nav_left.png
|
45
|
+
- coverage/assets/0.7.1/fancybox/fancy_nav_right.png
|
46
|
+
- coverage/assets/0.7.1/fancybox/fancy_shadow_e.png
|
47
|
+
- coverage/assets/0.7.1/fancybox/fancy_shadow_n.png
|
48
|
+
- coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png
|
49
|
+
- coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png
|
50
|
+
- coverage/assets/0.7.1/fancybox/fancy_shadow_s.png
|
51
|
+
- coverage/assets/0.7.1/fancybox/fancy_shadow_se.png
|
52
|
+
- coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png
|
53
|
+
- coverage/assets/0.7.1/fancybox/fancy_shadow_w.png
|
54
|
+
- coverage/assets/0.7.1/fancybox/fancy_title_left.png
|
55
|
+
- coverage/assets/0.7.1/fancybox/fancy_title_main.png
|
56
|
+
- coverage/assets/0.7.1/fancybox/fancy_title_over.png
|
57
|
+
- coverage/assets/0.7.1/fancybox/fancy_title_right.png
|
58
|
+
- coverage/assets/0.7.1/fancybox/fancybox-x.png
|
59
|
+
- coverage/assets/0.7.1/fancybox/fancybox-y.png
|
60
|
+
- coverage/assets/0.7.1/fancybox/fancybox.png
|
61
|
+
- coverage/assets/0.7.1/favicon_green.png
|
62
|
+
- coverage/assets/0.7.1/favicon_red.png
|
63
|
+
- coverage/assets/0.7.1/favicon_yellow.png
|
64
|
+
- coverage/assets/0.7.1/loading.gif
|
65
|
+
- coverage/assets/0.7.1/magnify.png
|
66
|
+
- coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
67
|
+
- coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
68
|
+
- coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
69
|
+
- coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
70
|
+
- coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
71
|
+
- coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
72
|
+
- coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
73
|
+
- coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
74
|
+
- coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png
|
75
|
+
- coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png
|
76
|
+
- coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png
|
77
|
+
- coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png
|
78
|
+
- coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png
|
79
|
+
- coverage/assets/0.8.0/application.css
|
80
|
+
- coverage/assets/0.8.0/application.js
|
81
|
+
- coverage/assets/0.8.0/colorbox/border.png
|
82
|
+
- coverage/assets/0.8.0/colorbox/controls.png
|
83
|
+
- coverage/assets/0.8.0/colorbox/loading.gif
|
84
|
+
- coverage/assets/0.8.0/colorbox/loading_background.png
|
85
|
+
- coverage/assets/0.8.0/favicon_green.png
|
86
|
+
- coverage/assets/0.8.0/favicon_red.png
|
87
|
+
- coverage/assets/0.8.0/favicon_yellow.png
|
88
|
+
- coverage/assets/0.8.0/loading.gif
|
89
|
+
- coverage/assets/0.8.0/magnify.png
|
90
|
+
- coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
91
|
+
- coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
92
|
+
- coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
93
|
+
- coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
94
|
+
- coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
95
|
+
- coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
96
|
+
- coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
97
|
+
- coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
98
|
+
- coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png
|
99
|
+
- coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png
|
100
|
+
- coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png
|
101
|
+
- coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png
|
102
|
+
- coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png
|
103
|
+
- coverage/index.html
|
104
|
+
- lib/locomotive/page_redirect/plugin.rb
|
105
|
+
- lib/locomotive/page_redirect/plugin/config.haml
|
106
|
+
- lib/locomotive/page_redirect/plugin/config.rb
|
107
|
+
- lib/locomotive/page_redirect/plugin/version.rb
|
108
|
+
- lib/locomotive_page_redirect_plugin.rb
|
109
|
+
- locomotive_page_redirect_plugin.gemspec
|
110
|
+
- spec/dummy/README.rdoc
|
111
|
+
- spec/dummy/Rakefile
|
112
|
+
- spec/dummy/app/assets/javascripts/application.js
|
113
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
114
|
+
- spec/dummy/app/controllers/application_controller.rb
|
115
|
+
- spec/dummy/app/controllers/home_controller.rb
|
116
|
+
- spec/dummy/app/controllers/test_controller.rb
|
117
|
+
- spec/dummy/app/helpers/application_helper.rb
|
118
|
+
- spec/dummy/app/mailers/.gitkeep
|
119
|
+
- spec/dummy/app/models/.gitkeep
|
120
|
+
- spec/dummy/app/views/home/index.html.erb
|
121
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
122
|
+
- spec/dummy/app/views/sessions/new.html.erb
|
123
|
+
- spec/dummy/config.ru
|
124
|
+
- spec/dummy/config/application.rb
|
125
|
+
- spec/dummy/config/boot.rb
|
126
|
+
- spec/dummy/config/environment.rb
|
127
|
+
- spec/dummy/config/environments/development.rb
|
128
|
+
- spec/dummy/config/environments/production.rb
|
129
|
+
- spec/dummy/config/environments/test.rb
|
130
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
131
|
+
- spec/dummy/config/initializers/inflections.rb
|
132
|
+
- spec/dummy/config/initializers/mime_types.rb
|
133
|
+
- spec/dummy/config/initializers/secret_token.rb
|
134
|
+
- spec/dummy/config/initializers/session_store.rb
|
135
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
136
|
+
- spec/dummy/config/locales/en.yml
|
137
|
+
- spec/dummy/config/mongoid.yml
|
138
|
+
- spec/dummy/config/routes.rb
|
139
|
+
- spec/dummy/lib/assets/.gitkeep
|
140
|
+
- spec/dummy/log/.gitkeep
|
141
|
+
- spec/dummy/log/test.log
|
142
|
+
- spec/dummy/public/404.html
|
143
|
+
- spec/dummy/public/422.html
|
144
|
+
- spec/dummy/public/500.html
|
145
|
+
- spec/dummy/public/favicon.ico
|
146
|
+
- spec/dummy/script/rails
|
147
|
+
- spec/lib/locomotive/page_redirect/plugin_spec.rb
|
148
|
+
- spec/spec_helper.rb
|
149
|
+
- spec/support/factories.rb
|
150
|
+
homepage: http://colibri-software.com
|
151
|
+
licenses: []
|
152
|
+
metadata: {}
|
153
|
+
post_install_message:
|
154
|
+
rdoc_options: []
|
155
|
+
require_paths:
|
156
|
+
- lib
|
157
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - ! '>='
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0'
|
162
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
requirements: []
|
168
|
+
rubyforge_project:
|
169
|
+
rubygems_version: 2.2.2
|
170
|
+
signing_key:
|
171
|
+
specification_version: 4
|
172
|
+
summary: Locomotive CMS plugin for page redirection
|
173
|
+
test_files: []
|