pageflow-sitemap 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile +7 -13
- data/README.md +2 -2
- data/app/assets/stylesheets/pageflow/sitemap/editor/{scroll_bar.css.scss → scroll_bar.scss} +0 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/{toolbar.css.scss → toolbar.scss} +0 -0
- data/app/assets/stylesheets/pageflow/sitemap/{editor.css.scss → editor.scss} +0 -0
- data/{exec/rails → bin/rails-cmd} +0 -0
- data/{exec → bin}/spring +0 -0
- data/{exec → bin}/teaspoon +0 -0
- data/config/locales/de.yml +9 -1
- data/config/locales/en.yml +11 -15
- data/lib/pageflow/sitemap/version.rb +1 -1
- data/pageflow-sitemap.gemspec +15 -15
- metadata +38 -199
- data/config/locales/new/help_button.de.yml +0 -7
- data/config/locales/new/help_button.en.yml +0 -7
- data/config/locales/new/tooltips.de.yml +0 -11
- data/config/locales/new/tooltips.en.yml +0 -11
- data/spec/d/r/.gitignore +0 -16
- data/spec/d/r/README.rdoc +0 -28
- data/spec/d/r/Rakefile +0 -6
- data/spec/d/r/app/admin/dashboard.rb +0 -33
- data/spec/d/r/app/assets/images/.keep +0 -0
- data/spec/d/r/app/assets/javascripts/active_admin.js.coffee +0 -2
- data/spec/d/r/app/assets/javascripts/application.js +0 -16
- data/spec/d/r/app/assets/javascripts/pageflow/application.js +0 -1
- data/spec/d/r/app/assets/javascripts/pageflow/editor.js +0 -4
- data/spec/d/r/app/assets/stylesheets/active_admin.css.scss +0 -18
- data/spec/d/r/app/assets/stylesheets/application.css +0 -13
- data/spec/d/r/app/assets/stylesheets/pageflow/application.css.scss +0 -1
- data/spec/d/r/app/assets/stylesheets/pageflow/editor.css.scss +0 -1
- data/spec/d/r/app/controllers/application_controller.rb +0 -5
- data/spec/d/r/app/controllers/concerns/.keep +0 -0
- data/spec/d/r/app/helpers/application_helper.rb +0 -2
- data/spec/d/r/app/mailers/.keep +0 -0
- data/spec/d/r/app/models/.keep +0 -0
- data/spec/d/r/app/models/ability.rb +0 -12
- data/spec/d/r/app/models/concerns/.keep +0 -0
- data/spec/d/r/app/models/user.rb +0 -9
- data/spec/d/r/app/views/layouts/application.html.erb +0 -14
- data/spec/d/r/bin/bundle +0 -3
- data/spec/d/r/bin/rails +0 -4
- data/spec/d/r/bin/rake +0 -4
- data/spec/d/r/config/application.rb +0 -31
- data/spec/d/r/config/boot.rb +0 -4
- data/spec/d/r/config/database.yml +0 -39
- data/spec/d/r/config/environment.rb +0 -5
- data/spec/d/r/config/environments/development.rb +0 -29
- data/spec/d/r/config/environments/production.rb +0 -80
- data/spec/d/r/config/environments/test.rb +0 -37
- data/spec/d/r/config/initializers/active_admin.rb +0 -225
- data/spec/d/r/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/d/r/config/initializers/devise.rb +0 -252
- data/spec/d/r/config/initializers/devise_async.rb +0 -6
- data/spec/d/r/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/d/r/config/initializers/friendly_id.rb +0 -88
- data/spec/d/r/config/initializers/inflections.rb +0 -16
- data/spec/d/r/config/initializers/mime_types.rb +0 -5
- data/spec/d/r/config/initializers/pageflow.rb +0 -76
- data/spec/d/r/config/initializers/resque.rb +0 -4
- data/spec/d/r/config/initializers/resque_enqueue_after_commit_patch.rb +0 -25
- data/spec/d/r/config/initializers/resque_logger.rb +0 -16
- data/spec/d/r/config/initializers/resque_mailer.rb +0 -4
- data/spec/d/r/config/initializers/secret_token.rb +0 -12
- data/spec/d/r/config/initializers/session_store.rb +0 -3
- data/spec/d/r/config/initializers/wrap_parameters.rb +0 -14
- data/spec/d/r/config/locales/devise.en.yml +0 -59
- data/spec/d/r/config/locales/en.yml +0 -23
- data/spec/d/r/config/routes.rb +0 -59
- data/spec/d/r/config.ru +0 -4
- data/spec/d/r/db/migrate/00000000000000_create_test_hosted_file.rb +0 -7
- data/spec/d/r/db/migrate/00000000000001_create_test_revision_component.rb +0 -10
- data/spec/d/r/db/migrate/20150209101518_create_active_admin_comments.rb +0 -19
- data/spec/d/r/db/migrate/20150209101524_devise_create_users.rb +0 -46
- data/spec/d/r/db/migrate/20150209101530_create_friendly_id_slugs.rb +0 -15
- data/spec/d/r/db/migrate/20150209101540_setup_schema.pageflow.rb +0 -208
- data/spec/d/r/db/migrate/20150209101541_add_attributes_to_users.pageflow.rb +0 -16
- data/spec/d/r/db/migrate/20150209101542_create_themings.pageflow.rb +0 -16
- data/spec/d/r/db/migrate/20150209101543_create_themings_for_existing_accounts.pageflow.rb +0 -27
- data/spec/d/r/db/migrate/20150209101544_change_theme_references_to_theming_references.pageflow.rb +0 -46
- data/spec/d/r/db/migrate/20150209101545_remove_attributes_from_themes.pageflow.rb +0 -11
- data/spec/d/r/db/migrate/20150209101546_create_accounts_themes_join_table.pageflow.rb +0 -9
- data/spec/d/r/db/migrate/20150209101547_move_cname_from_account_to_theming.pageflow.rb +0 -22
- data/spec/d/r/db/migrate/20150209101548_drop_themes.pageflow.rb +0 -15
- data/spec/d/r/db/migrate/20150209101549_add_confirmed_by_to_encoded_files.pageflow.rb +0 -7
- data/spec/d/r/db/migrate/20150209101550_add_home_url_attributes_to_themings_and_revisions.pageflow.rb +0 -10
- data/spec/d/r/db/migrate/20150209101551_create_widgets.pageflow.rb +0 -12
- data/spec/d/r/db/migrate/20150209101552_add_emphasize_chapter_beginning_to_revisions.pageflow.rb +0 -6
- data/spec/d/r/db/migrate/20150209101553_add_emphasize_new_pages_to_revisions.pageflow.rb +0 -6
- data/spec/d/r/db/migrate/20150209101554_add_sharing_image_to_revisions.pageflow.rb +0 -8
- data/spec/d/r/db/schema.rb +0 -316
- data/spec/d/r/db/seeds.rb +0 -30
- data/spec/d/r/lib/assets/.keep +0 -0
- data/spec/d/r/lib/tasks/.keep +0 -0
- data/spec/d/r/lib/tasks/resque.rake +0 -7
- data/spec/d/r/public/404.html +0 -58
- data/spec/d/r/public/422.html +0 -58
- data/spec/d/r/public/500.html +0 -57
- data/spec/d/r/public/favicon.ico +0 -0
- data/spec/d/r/public/javascripts/translations.js +0 -2
- data/spec/d/r/public/robots.txt +0 -5
- data/spec/d/r/vendor/assets/javascripts/.keep +0 -0
- data/spec/d/r/vendor/assets/stylesheets/.keep +0 -0
@@ -1,25 +0,0 @@
|
|
1
|
-
# Make sure no jobs are enqueued from a rolled back
|
2
|
-
# transaction. Pageflow mainly triggers jobs in conjunction with state
|
3
|
-
# machine transitions. So this patch ensures state db state and
|
4
|
-
# enqueued jobs stay in sync.
|
5
|
-
#
|
6
|
-
# Note the after_transaction yields immediately if there is no open
|
7
|
-
# transcation.
|
8
|
-
|
9
|
-
require 'ar_after_transaction'
|
10
|
-
require 'resque'
|
11
|
-
|
12
|
-
Resque.class_eval do
|
13
|
-
class << self
|
14
|
-
alias_method :enqueue_without_transaction, :enqueue
|
15
|
-
def enqueue(*args)
|
16
|
-
if Resque.inline?
|
17
|
-
enqueue_without_transaction(*args)
|
18
|
-
else
|
19
|
-
ActiveRecord::Base.after_transaction do
|
20
|
-
enqueue_without_transaction(*args)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# resque-logger is required by the state_machine_job gem to write
|
2
|
-
# debug output to logs files. Each queue has its own log file in the
|
3
|
-
# directory specified below.
|
4
|
-
|
5
|
-
require 'fileutils'
|
6
|
-
|
7
|
-
log_dir = Rails.root.join('log', 'jobs', Rails.env)
|
8
|
-
FileUtils.mkdir_p(log_dir)
|
9
|
-
|
10
|
-
Resque.logger_config = {
|
11
|
-
folder: log_dir,
|
12
|
-
class_name: Logger,
|
13
|
-
class_args: [ 'daily', 1.kilobyte ],
|
14
|
-
level: Logger::INFO,
|
15
|
-
formatter: Logger::Formatter.new
|
16
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure your secret_key_base is kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
Rails405::Application.config.secret_key_base = 'fb3393e13d5e4d33f79a1d1089f2548f8b8923b3b46a6a4ece286b1db6b875ca5778c00cfd30e801515bf3c60d76656738f58b759b407a7820d65d5b8f868934'
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
-
|
3
|
-
en:
|
4
|
-
devise:
|
5
|
-
confirmations:
|
6
|
-
confirmed: "Your account was successfully confirmed. You are now signed in."
|
7
|
-
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
|
8
|
-
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
|
9
|
-
failure:
|
10
|
-
already_authenticated: "You are already signed in."
|
11
|
-
inactive: "Your account was not activated yet."
|
12
|
-
invalid: "Invalid email or password."
|
13
|
-
invalid_token: "Invalid authentication token."
|
14
|
-
locked: "Your account is locked."
|
15
|
-
not_found_in_database: "Invalid email or password."
|
16
|
-
timeout: "Your session expired, please sign in again to continue."
|
17
|
-
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
-
unconfirmed: "You have to confirm your account before continuing."
|
19
|
-
mailer:
|
20
|
-
confirmation_instructions:
|
21
|
-
subject: "Confirmation instructions"
|
22
|
-
reset_password_instructions:
|
23
|
-
subject: "Reset password instructions"
|
24
|
-
unlock_instructions:
|
25
|
-
subject: "Unlock Instructions"
|
26
|
-
omniauth_callbacks:
|
27
|
-
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
28
|
-
success: "Successfully authenticated from %{kind} account."
|
29
|
-
passwords:
|
30
|
-
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
31
|
-
send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
|
32
|
-
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
33
|
-
updated: "Your password was changed successfully. You are now signed in."
|
34
|
-
updated_not_active: "Your password was changed successfully."
|
35
|
-
registrations:
|
36
|
-
destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
|
37
|
-
signed_up: "Welcome! You have signed up successfully."
|
38
|
-
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
39
|
-
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
40
|
-
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
|
41
|
-
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
|
42
|
-
updated: "You updated your account successfully."
|
43
|
-
sessions:
|
44
|
-
signed_in: "Signed in successfully."
|
45
|
-
signed_out: "Signed out successfully."
|
46
|
-
unlocks:
|
47
|
-
send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
|
48
|
-
send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
|
49
|
-
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
50
|
-
errors:
|
51
|
-
messages:
|
52
|
-
already_confirmed: "was already confirmed, please try signing in"
|
53
|
-
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
54
|
-
expired: "has expired, please request a new one"
|
55
|
-
not_found: "not found"
|
56
|
-
not_locked: "was not locked"
|
57
|
-
not_saved:
|
58
|
-
one: "1 error prohibited this %{resource} from being saved:"
|
59
|
-
other: "%{count} errors prohibited this %{resource} from being saved:"
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
hello: "Hello world"
|
data/spec/d/r/config/routes.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
Rails405::Application.routes.draw do
|
2
|
-
devise_for :users, ActiveAdmin::Devise.config
|
3
|
-
ActiveAdmin.routes(self)
|
4
|
-
Pageflow.routes(self)
|
5
|
-
# The priority is based upon order of creation: first created -> highest priority.
|
6
|
-
# See how all your routes lay out with "rake routes".
|
7
|
-
|
8
|
-
# You can have the root of your site routed with "root"
|
9
|
-
# root 'welcome#index'
|
10
|
-
|
11
|
-
# Example of regular route:
|
12
|
-
# get 'products/:id' => 'catalog#view'
|
13
|
-
|
14
|
-
# Example of named route that can be invoked with purchase_url(id: product.id)
|
15
|
-
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
16
|
-
|
17
|
-
# Example resource route (maps HTTP verbs to controller actions automatically):
|
18
|
-
# resources :products
|
19
|
-
|
20
|
-
# Example resource route with options:
|
21
|
-
# resources :products do
|
22
|
-
# member do
|
23
|
-
# get 'short'
|
24
|
-
# post 'toggle'
|
25
|
-
# end
|
26
|
-
#
|
27
|
-
# collection do
|
28
|
-
# get 'sold'
|
29
|
-
# end
|
30
|
-
# end
|
31
|
-
|
32
|
-
# Example resource route with sub-resources:
|
33
|
-
# resources :products do
|
34
|
-
# resources :comments, :sales
|
35
|
-
# resource :seller
|
36
|
-
# end
|
37
|
-
|
38
|
-
# Example resource route with more complex sub-resources:
|
39
|
-
# resources :products do
|
40
|
-
# resources :comments
|
41
|
-
# resources :sales do
|
42
|
-
# get 'recent', on: :collection
|
43
|
-
# end
|
44
|
-
# end
|
45
|
-
|
46
|
-
# Example resource route with concerns:
|
47
|
-
# concern :toggleable do
|
48
|
-
# post 'toggle'
|
49
|
-
# end
|
50
|
-
# resources :posts, concerns: :toggleable
|
51
|
-
# resources :photos, concerns: :toggleable
|
52
|
-
|
53
|
-
# Example resource route within a namespace:
|
54
|
-
# namespace :admin do
|
55
|
-
# # Directs /admin/products/* to Admin::ProductsController
|
56
|
-
# # (app/controllers/admin/products_controller.rb)
|
57
|
-
# resources :products
|
58
|
-
# end
|
59
|
-
end
|
data/spec/d/r/config.ru
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
class CreateActiveAdminComments < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :active_admin_comments do |t|
|
4
|
-
t.string :namespace
|
5
|
-
t.text :body
|
6
|
-
t.string :resource_id, :null => false
|
7
|
-
t.string :resource_type, :null => false
|
8
|
-
t.references :author, :polymorphic => true
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
add_index :active_admin_comments, [:namespace]
|
12
|
-
add_index :active_admin_comments, [:author_type, :author_id]
|
13
|
-
add_index :active_admin_comments, [:resource_type, :resource_id]
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.down
|
17
|
-
drop_table :active_admin_comments
|
18
|
-
end
|
19
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
class DeviseCreateUsers < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table(:users) do |t|
|
4
|
-
## Database authenticatable
|
5
|
-
t.string :email, :null => false, :default => ""
|
6
|
-
t.string :encrypted_password, :null => false, :default => ""
|
7
|
-
|
8
|
-
## Recoverable
|
9
|
-
t.string :reset_password_token
|
10
|
-
t.datetime :reset_password_sent_at
|
11
|
-
|
12
|
-
## Rememberable
|
13
|
-
t.datetime :remember_created_at
|
14
|
-
|
15
|
-
## Trackable
|
16
|
-
t.integer :sign_in_count, :default => 0
|
17
|
-
t.datetime :current_sign_in_at
|
18
|
-
t.datetime :last_sign_in_at
|
19
|
-
t.string :current_sign_in_ip
|
20
|
-
t.string :last_sign_in_ip
|
21
|
-
|
22
|
-
## Confirmable
|
23
|
-
# t.string :confirmation_token
|
24
|
-
# t.datetime :confirmed_at
|
25
|
-
# t.datetime :confirmation_sent_at
|
26
|
-
# t.string :unconfirmed_email # Only if using reconfirmable
|
27
|
-
|
28
|
-
## Lockable
|
29
|
-
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
30
|
-
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
31
|
-
# t.datetime :locked_at
|
32
|
-
|
33
|
-
## Token authenticatable
|
34
|
-
# t.string :authentication_token
|
35
|
-
|
36
|
-
|
37
|
-
t.timestamps
|
38
|
-
end
|
39
|
-
|
40
|
-
add_index :users, :email, :unique => true
|
41
|
-
add_index :users, :reset_password_token, :unique => true
|
42
|
-
# add_index :users, :confirmation_token, :unique => true
|
43
|
-
# add_index :users, :unlock_token, :unique => true
|
44
|
-
# add_index :users, :authentication_token, :unique => true
|
45
|
-
end
|
46
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class CreateFriendlyIdSlugs < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :friendly_id_slugs do |t|
|
4
|
-
t.string :slug, :null => false
|
5
|
-
t.integer :sluggable_id, :null => false
|
6
|
-
t.string :sluggable_type, :limit => 50
|
7
|
-
t.string :scope
|
8
|
-
t.datetime :created_at
|
9
|
-
end
|
10
|
-
add_index :friendly_id_slugs, :sluggable_id
|
11
|
-
add_index :friendly_id_slugs, [:slug, :sluggable_type]
|
12
|
-
add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], :unique => true
|
13
|
-
add_index :friendly_id_slugs, :sluggable_type
|
14
|
-
end
|
15
|
-
end
|
@@ -1,208 +0,0 @@
|
|
1
|
-
# This migration comes from pageflow (originally 20140418225525)
|
2
|
-
class SetupSchema < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table "friendly_id_slugs", force: true do |t|
|
5
|
-
t.string "slug", null: false
|
6
|
-
t.integer "sluggable_id", null: false
|
7
|
-
t.string "sluggable_type", limit: 50
|
8
|
-
t.string "scope"
|
9
|
-
t.datetime "created_at"
|
10
|
-
end
|
11
|
-
|
12
|
-
add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true, using: :btree
|
13
|
-
add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type", using: :btree
|
14
|
-
add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id", using: :btree
|
15
|
-
add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type", using: :btree
|
16
|
-
|
17
|
-
create_table "pageflow_accounts", force: true do |t|
|
18
|
-
t.string "name", default: "", null: false
|
19
|
-
t.integer "default_theme_id"
|
20
|
-
t.datetime "created_at"
|
21
|
-
t.datetime "updated_at"
|
22
|
-
t.string "default_file_rights", default: "", null: false
|
23
|
-
t.string "cname", default: "", null: false
|
24
|
-
t.string "landing_page_name", default: "", null: false
|
25
|
-
end
|
26
|
-
|
27
|
-
add_index "pageflow_accounts", ["cname"], name: "index_pageflow_accounts_on_cname", using: :btree
|
28
|
-
|
29
|
-
create_table "pageflow_audio_files", force: true do |t|
|
30
|
-
t.integer "entry_id"
|
31
|
-
t.integer "uploader_id"
|
32
|
-
t.string "attachment_on_filesystem_file_name"
|
33
|
-
t.string "attachment_on_filesystem_content_type"
|
34
|
-
t.integer "attachment_on_filesystem_file_size", limit: 8
|
35
|
-
t.datetime "attachment_on_filesystem_updated_at"
|
36
|
-
t.string "attachment_on_s3_file_name"
|
37
|
-
t.string "attachment_on_s3_content_type"
|
38
|
-
t.integer "attachment_on_s3_file_size", limit: 8
|
39
|
-
t.datetime "attachment_on_s3_updated_at"
|
40
|
-
t.integer "job_id"
|
41
|
-
t.string "state"
|
42
|
-
t.decimal "encoding_progress", precision: 5, scale: 2
|
43
|
-
t.datetime "created_at"
|
44
|
-
t.datetime "updated_at"
|
45
|
-
t.string "encoding_error_message"
|
46
|
-
t.integer "duration_in_ms"
|
47
|
-
t.string "format"
|
48
|
-
t.string "rights", default: "", null: false
|
49
|
-
end
|
50
|
-
|
51
|
-
create_table "pageflow_chapters", force: true do |t|
|
52
|
-
t.integer "entry_id"
|
53
|
-
t.datetime "created_at"
|
54
|
-
t.datetime "updated_at"
|
55
|
-
t.integer "position", default: 0, null: false
|
56
|
-
t.string "title", default: "", null: false
|
57
|
-
t.integer "revision_id"
|
58
|
-
end
|
59
|
-
|
60
|
-
add_index "pageflow_chapters", ["entry_id"], name: "index_pageflow_chapters_on_entry_id", using: :btree
|
61
|
-
add_index "pageflow_chapters", ["revision_id"], name: "index_pageflow_chapters_on_revision_id", using: :btree
|
62
|
-
|
63
|
-
create_table "pageflow_edit_locks", force: true do |t|
|
64
|
-
t.integer "user_id"
|
65
|
-
t.integer "entry_id"
|
66
|
-
t.datetime "created_at"
|
67
|
-
t.datetime "updated_at"
|
68
|
-
end
|
69
|
-
|
70
|
-
add_index "pageflow_edit_locks", ["entry_id"], name: "index_pageflow_edit_locks_on_entry_id", using: :btree
|
71
|
-
add_index "pageflow_edit_locks", ["user_id"], name: "index_pageflow_edit_locks_on_user_id", using: :btree
|
72
|
-
|
73
|
-
create_table "pageflow_entries", force: true do |t|
|
74
|
-
t.string "title", default: "", null: false
|
75
|
-
t.datetime "created_at"
|
76
|
-
t.datetime "updated_at"
|
77
|
-
t.string "slug", null: false
|
78
|
-
t.integer "account_id"
|
79
|
-
t.integer "theme_id"
|
80
|
-
t.integer "folder_id"
|
81
|
-
end
|
82
|
-
|
83
|
-
add_index "pageflow_entries", ["account_id"], name: "index_pageflow_entries_on_account_id", using: :btree
|
84
|
-
add_index "pageflow_entries", ["folder_id"], name: "index_pageflow_entries_on_folder_id", using: :btree
|
85
|
-
add_index "pageflow_entries", ["slug"], name: "index_pageflow_entries_on_slug", unique: true, using: :btree
|
86
|
-
add_index "pageflow_entries", ["theme_id"], name: "index_pageflow_entries_on_theme_id", using: :btree
|
87
|
-
|
88
|
-
create_table "pageflow_file_usages", force: true do |t|
|
89
|
-
t.integer "revision_id"
|
90
|
-
t.integer "file_id"
|
91
|
-
t.string "file_type"
|
92
|
-
t.datetime "created_at"
|
93
|
-
t.datetime "updated_at"
|
94
|
-
end
|
95
|
-
|
96
|
-
add_index "pageflow_file_usages", ["file_id", "file_type"], name: "index_pageflow_file_usages_on_file_id_and_file_type", using: :btree
|
97
|
-
add_index "pageflow_file_usages", ["revision_id"], name: "index_pageflow_file_usages_on_revision_id", using: :btree
|
98
|
-
|
99
|
-
create_table "pageflow_folders", force: true do |t|
|
100
|
-
t.string "name"
|
101
|
-
t.integer "account_id"
|
102
|
-
t.datetime "created_at"
|
103
|
-
t.datetime "updated_at"
|
104
|
-
end
|
105
|
-
|
106
|
-
add_index "pageflow_folders", ["account_id"], name: "index_pageflow_folders_on_account_id", using: :btree
|
107
|
-
|
108
|
-
create_table "pageflow_image_files", force: true do |t|
|
109
|
-
t.integer "entry_id"
|
110
|
-
t.integer "uploader_id"
|
111
|
-
t.string "unprocessed_attachment_file_name"
|
112
|
-
t.string "unprocessed_attachment_content_type"
|
113
|
-
t.integer "unprocessed_attachment_file_size", limit: 8
|
114
|
-
t.datetime "unprocessed_attachment_updated_at"
|
115
|
-
t.string "processed_attachment_file_name"
|
116
|
-
t.string "processed_attachment_content_type"
|
117
|
-
t.integer "processed_attachment_file_size", limit: 8
|
118
|
-
t.datetime "processed_attachment_updated_at"
|
119
|
-
t.string "state"
|
120
|
-
t.datetime "created_at"
|
121
|
-
t.datetime "updated_at"
|
122
|
-
t.integer "width"
|
123
|
-
t.integer "height"
|
124
|
-
t.string "rights", default: "", null: false
|
125
|
-
end
|
126
|
-
|
127
|
-
create_table "pageflow_memberships", force: true do |t|
|
128
|
-
t.integer "user_id"
|
129
|
-
t.integer "entry_id"
|
130
|
-
t.string "name"
|
131
|
-
t.datetime "created_at"
|
132
|
-
t.datetime "updated_at"
|
133
|
-
end
|
134
|
-
|
135
|
-
add_index "pageflow_memberships", ["entry_id"], name: "index_pageflow_memberships_on_entry_id", using: :btree
|
136
|
-
add_index "pageflow_memberships", ["user_id"], name: "index_pageflow_memberships_on_user_id", using: :btree
|
137
|
-
|
138
|
-
create_table "pageflow_pages", force: true do |t|
|
139
|
-
t.integer "chapter_id"
|
140
|
-
t.string "template", default: "", null: false
|
141
|
-
t.text "configuration"
|
142
|
-
t.datetime "created_at"
|
143
|
-
t.datetime "updated_at"
|
144
|
-
t.integer "position", default: 0, null: false
|
145
|
-
t.boolean "display_in_navigation", default: true
|
146
|
-
t.integer "perma_id"
|
147
|
-
end
|
148
|
-
|
149
|
-
add_index "pageflow_pages", ["chapter_id"], name: "index_pageflow_pages_on_chapter_id", using: :btree
|
150
|
-
add_index "pageflow_pages", ["perma_id"], name: "index_pageflow_pages_on_perma_id", using: :btree
|
151
|
-
|
152
|
-
create_table "pageflow_revisions", force: true do |t|
|
153
|
-
t.integer "entry_id"
|
154
|
-
t.integer "creator_id"
|
155
|
-
t.datetime "published_at"
|
156
|
-
t.datetime "published_until"
|
157
|
-
t.datetime "created_at"
|
158
|
-
t.datetime "updated_at"
|
159
|
-
t.text "credits"
|
160
|
-
t.string "title", default: "", null: false
|
161
|
-
t.text "summary"
|
162
|
-
t.boolean "manual_start", default: false
|
163
|
-
t.integer "restored_from_id"
|
164
|
-
t.datetime "frozen_at"
|
165
|
-
t.string "snapshot_type"
|
166
|
-
end
|
167
|
-
|
168
|
-
add_index "pageflow_revisions", ["restored_from_id"], name: "index_pageflow_revisions_on_restored_from_id", using: :btree
|
169
|
-
|
170
|
-
create_table "pageflow_themes", force: true do |t|
|
171
|
-
t.string "name", default: "", null: false
|
172
|
-
t.datetime "created_at"
|
173
|
-
t.datetime "updated_at"
|
174
|
-
t.string "imprint_link_url"
|
175
|
-
t.string "imprint_link_label"
|
176
|
-
t.string "copyright_link_url"
|
177
|
-
t.string "copyright_link_label"
|
178
|
-
end
|
179
|
-
|
180
|
-
create_table "pageflow_video_files", force: true do |t|
|
181
|
-
t.integer "entry_id"
|
182
|
-
t.integer "uploader_id"
|
183
|
-
t.string "attachment_on_filesystem_file_name"
|
184
|
-
t.string "attachment_on_filesystem_content_type"
|
185
|
-
t.integer "attachment_on_filesystem_file_size", limit: 8
|
186
|
-
t.datetime "attachment_on_filesystem_updated_at"
|
187
|
-
t.string "attachment_on_s3_file_name"
|
188
|
-
t.string "attachment_on_s3_content_type"
|
189
|
-
t.integer "attachment_on_s3_file_size", limit: 8
|
190
|
-
t.datetime "attachment_on_s3_updated_at"
|
191
|
-
t.integer "job_id"
|
192
|
-
t.string "state"
|
193
|
-
t.decimal "encoding_progress", precision: 5, scale: 2
|
194
|
-
t.datetime "created_at"
|
195
|
-
t.datetime "updated_at"
|
196
|
-
t.string "encoding_error_message"
|
197
|
-
t.string "thumbnail_file_name"
|
198
|
-
t.integer "width"
|
199
|
-
t.integer "height"
|
200
|
-
t.integer "duration_in_ms"
|
201
|
-
t.string "format"
|
202
|
-
t.string "poster_file_name"
|
203
|
-
t.string "poster_content_type"
|
204
|
-
t.string "thumbnail_content_type"
|
205
|
-
t.string "rights", default: "", null: false
|
206
|
-
end
|
207
|
-
end
|
208
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# This migration comes from pageflow (originally 20140418240000)
|
2
|
-
class AddAttributesToUsers < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
add_column :users, :failed_attempts, :integer, default: 0
|
5
|
-
add_column :users, :locked_at, :datetime
|
6
|
-
|
7
|
-
add_column :users, :first_name, :string
|
8
|
-
add_column :users, :last_name, :string
|
9
|
-
add_column :users, :suspended_at, :datetime
|
10
|
-
add_column :users, :account_id, :integer
|
11
|
-
add_column :users, :role, :string, default: "editor", null: false
|
12
|
-
|
13
|
-
add_index :users, [:account_id], name: "index_pageflow_users_on_account_id", using: :btree
|
14
|
-
add_index :users, [:email], name: "index_pageflow_users_on_email", unique: true, using: :btree
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# This migration comes from pageflow (originally 20140624135420)
|
2
|
-
class CreateThemings < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :pageflow_themings do |t|
|
5
|
-
t.string :imprint_link_url
|
6
|
-
t.string :imprint_link_label
|
7
|
-
t.string :copyright_link_url
|
8
|
-
t.string :copyright_link_label
|
9
|
-
|
10
|
-
t.belongs_to :account
|
11
|
-
t.belongs_to :theme
|
12
|
-
|
13
|
-
t.timestamps
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# This migration comes from pageflow (originally 20140624135421)
|
2
|
-
class CreateThemingsForExistingAccounts < ActiveRecord::Migration
|
3
|
-
def up
|
4
|
-
# For each account create a theming. Copy link attributes from
|
5
|
-
# theme to theming. Store account_id on theming so we can identify
|
6
|
-
# it as the accounts default_theming later on.
|
7
|
-
execute(<<-SQL)
|
8
|
-
INSERT INTO pageflow_themings
|
9
|
-
(account_id, theme_id, imprint_link_label, imprint_link_url, copyright_link_label, copyright_link_url, created_at, updated_at)
|
10
|
-
SELECT a.id, default_theme_id, imprint_link_label, imprint_link_url, copyright_link_label, copyright_link_url, a.created_at, a.updated_at
|
11
|
-
FROM pageflow_accounts AS a
|
12
|
-
LEFT JOIN pageflow_themes AS t ON t.id = a.default_theme_id;
|
13
|
-
SQL
|
14
|
-
end
|
15
|
-
|
16
|
-
def down
|
17
|
-
# Copy link attributes back to themes.
|
18
|
-
execute(<<-SQL)
|
19
|
-
UPDATE pageflow_themes AS t
|
20
|
-
LEFT JOIN pageflow_themings AS g ON g.theme_id = t.id
|
21
|
-
SET t.imprint_link_label = g.imprint_link_label,
|
22
|
-
t.imprint_link_url = g.imprint_link_url,
|
23
|
-
t.copyright_link_label = g.copyright_link_label,
|
24
|
-
t.copyright_link_url = g.copyright_link_url
|
25
|
-
SQL
|
26
|
-
end
|
27
|
-
end
|
data/spec/d/r/db/migrate/20150209101544_change_theme_references_to_theming_references.pageflow.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
# This migration comes from pageflow (originally 20140624135422)
|
2
|
-
class ChangeThemeReferencesToThemingReferences < ActiveRecord::Migration
|
3
|
-
def up
|
4
|
-
add_reference :pageflow_accounts, :default_theming, :index => true
|
5
|
-
add_reference :pageflow_entries, :theming, :index => true
|
6
|
-
|
7
|
-
# Use theming created for account as default_theming.
|
8
|
-
execute(<<-SQL)
|
9
|
-
UPDATE pageflow_accounts SET default_theming_id =
|
10
|
-
(SELECT id FROM pageflow_themings where pageflow_accounts.id = pageflow_themings.account_id LIMIT 1);
|
11
|
-
SQL
|
12
|
-
|
13
|
-
# Use default theming from entry's account as theming
|
14
|
-
execute(<<-SQL)
|
15
|
-
UPDATE pageflow_entries SET theming_id =
|
16
|
-
(SELECT default_theming_id FROM pageflow_accounts where pageflow_accounts.id = pageflow_entries.account_id);
|
17
|
-
SQL
|
18
|
-
|
19
|
-
remove_reference :pageflow_accounts, :default_theme
|
20
|
-
remove_reference :pageflow_entries, :theme
|
21
|
-
end
|
22
|
-
|
23
|
-
def down
|
24
|
-
add_reference :pageflow_accounts, :default_theme, :index => true
|
25
|
-
add_reference :pageflow_entries, :theme, :index => true
|
26
|
-
|
27
|
-
# Set default_theme_id to theme_id of account's default_theming.
|
28
|
-
execute(<<-SQL)
|
29
|
-
UPDATE pageflow_accounts SET default_theme_id =
|
30
|
-
(SELECT id FROM pageflow_themes where pageflow_themes.id =
|
31
|
-
(SELECT theme_id FROM pageflow_themings
|
32
|
-
WHERE pageflow_accounts.default_theming_id = pageflow_themings.id LIMIT 1));
|
33
|
-
SQL
|
34
|
-
|
35
|
-
# Set theme_id to theme_id of entries's theming.
|
36
|
-
execute(<<-SQL)
|
37
|
-
UPDATE pageflow_entries SET theme_id =
|
38
|
-
(SELECT id FROM pageflow_themes where pageflow_themes.id =
|
39
|
-
(SELECT theme_id FROM pageflow_themings
|
40
|
-
WHERE pageflow_entries.theming_id = pageflow_themings.id LIMIT 1));
|
41
|
-
SQL
|
42
|
-
|
43
|
-
remove_reference :pageflow_accounts, :default_theming
|
44
|
-
remove_reference :pageflow_entries, :theming
|
45
|
-
end
|
46
|
-
end
|