refinerycms-copywriting 2.0.1 → 2.0.2

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.
Files changed (70) hide show
  1. data/app/helpers/refinery/copywriting/copywriting_helper.rb +19 -0
  2. data/lib/refinery/copywriting/engine.rb +1 -2
  3. data/lib/refinery/copywriting.rb +0 -4
  4. data/spec/dummy/README.rdoc +261 -0
  5. data/spec/dummy/Rakefile +7 -0
  6. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  7. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  8. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  9. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  10. data/spec/dummy/app/views/sitemap/index.xml.builder +25 -0
  11. data/spec/dummy/config/application.rb +62 -0
  12. data/spec/dummy/config/boot.rb +6 -0
  13. data/spec/dummy/config/database.yml +18 -0
  14. data/spec/dummy/config/database.yml.mysql +20 -0
  15. data/spec/dummy/config/database.yml.postgresql +58 -0
  16. data/spec/dummy/config/database.yml.sqlite3 +18 -0
  17. data/spec/dummy/config/environment.rb +5 -0
  18. data/spec/dummy/config/environments/development.rb +37 -0
  19. data/spec/dummy/config/environments/production.rb +71 -0
  20. data/spec/dummy/config/environments/test.rb +37 -0
  21. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  22. data/spec/dummy/config/initializers/devise.rb +229 -0
  23. data/spec/dummy/config/initializers/inflections.rb +15 -0
  24. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  25. data/spec/dummy/config/initializers/refinery/core.rb +48 -0
  26. data/spec/dummy/config/initializers/refinery/images.rb +41 -0
  27. data/spec/dummy/config/initializers/refinery/pages.rb +44 -0
  28. data/spec/dummy/config/initializers/refinery/resources.rb +26 -0
  29. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  30. data/spec/dummy/config/initializers/session_store.rb +8 -0
  31. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  32. data/spec/dummy/config/locales/en.yml +5 -0
  33. data/spec/dummy/config/routes.rb +3 -0
  34. data/spec/dummy/config.ru +4 -0
  35. data/spec/dummy/db/migrate/20120416115049_create_copywritings.refinery_copywriting.rb +24 -0
  36. data/spec/dummy/db/migrate/20120416115050_create_copywriting_translation_table.refinery_copywriting.rb +42 -0
  37. data/spec/dummy/db/migrate/20120416115051_add_phrase_type.refinery_copywriting.rb +12 -0
  38. data/spec/dummy/db/migrate/20120416115052_add_refinery_prefix_to_tables.refinery_copywriting.rb +14 -0
  39. data/spec/dummy/db/migrate/20120416115053_add_phrase_last_access_at.refinery_copywriting.rb +12 -0
  40. data/spec/dummy/db/migrate/20120416115054_create_refinerycms_authentication_schema.refinery_authentication.rb +44 -0
  41. data/spec/dummy/db/migrate/20120416115055_create_refinerycms_images_schema.refinery_images.rb +16 -0
  42. data/spec/dummy/db/migrate/20120416115056_create_refinerycms_resources_schema.refinery_resources.rb +14 -0
  43. data/spec/dummy/db/migrate/20120416115057_create_refinerycms_pages_schema.refinery_pages.rb +59 -0
  44. data/spec/dummy/db/migrate/20120416115058_create_seo_meta.seo_meta_engine.rb +24 -0
  45. data/spec/dummy/db/schema.rb +177 -0
  46. data/spec/dummy/db/seeds.rb +10 -0
  47. data/spec/dummy/dummy_dev +0 -0
  48. data/spec/dummy/dummy_test +0 -0
  49. data/spec/dummy/log/development.log +389 -0
  50. data/spec/dummy/log/test.log +1894 -0
  51. data/spec/dummy/public/404.html +26 -0
  52. data/spec/dummy/public/422.html +26 -0
  53. data/spec/dummy/public/500.html +25 -0
  54. data/spec/dummy/public/favicon.ico +0 -0
  55. data/spec/dummy/script/rails +6 -0
  56. data/spec/dummy/tmp/index/development/refinery/page/102_111_117.ind +2 -0
  57. data/spec/dummy/tmp/index/development/refinery/page/104_111_109.ind +0 -0
  58. data/spec/dummy/tmp/index/development/refinery/page/110_111_116.ind +1 -0
  59. data/spec/dummy/tmp/index/development/refinery/page/112_97_103.ind +0 -0
  60. data/spec/dummy/tmp/index/development/refinery/page/97_98_111.ind +0 -0
  61. data/spec/dummy/tmp/index/development/refinery/page/size +1 -0
  62. data/spec/dummy/tmp/index/development/refinery/page/version +1 -0
  63. data/spec/dummy/tmp/index/test/refinery/page/112_97_103.ind +1 -0
  64. data/spec/dummy/tmp/index/test/refinery/page/116_101_115.ind +0 -0
  65. data/spec/dummy/tmp/index/test/refinery/page/size +1 -0
  66. data/spec/dummy/tmp/index/test/refinery/page/version +1 -0
  67. data/spec/helpers/copywriting_helper_spec.rb +8 -8
  68. metadata +65 -3
  69. data/app/helpers/copywriting_helper.rb +0 -16
  70. data/lib/tasks/rspec.rake +0 -4
@@ -0,0 +1,14 @@
1
+ # This migration comes from refinery_copywriting (originally 4)
2
+ class AddRefineryPrefixToTables < ActiveRecord::Migration
3
+
4
+ def self.up
5
+ rename_table :copywriting_phrases, :refinery_copywriting_phrases
6
+ rename_table :copywriting_phrase_translations, :refinery_copywriting_phrase_translations
7
+ end
8
+
9
+ def self.down
10
+ rename_table :refinery_copywriting_phrases, :copywriting_phrases
11
+ rename_table :refinery_copywriting_phrase_translations, :copywriting_phrase_translations
12
+ end
13
+
14
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from refinery_copywriting (originally 5)
2
+ class AddPhraseLastAccessAt < ActiveRecord::Migration
3
+
4
+ def self.up
5
+ add_column Refinery::Copywriting::Phrase.table_name, :last_access_at, :date
6
+ end
7
+
8
+ def self.down
9
+ remove_column Refinery::Copywriting::Phrase.table_name, :last_access_at
10
+ end
11
+
12
+ end
@@ -0,0 +1,44 @@
1
+ # This migration comes from refinery_authentication (originally 20100913234705)
2
+ class CreateRefinerycmsAuthenticationSchema < ActiveRecord::Migration
3
+ def change
4
+ # Postgres apparently requires the roles_users table to exist before creating the roles table.
5
+ create_table :refinery_roles_users, :id => false do |t|
6
+ t.integer :user_id
7
+ t.integer :role_id
8
+ end
9
+
10
+ add_index :refinery_roles_users, [:role_id, :user_id]
11
+ add_index :refinery_roles_users, [:user_id, :role_id]
12
+
13
+ create_table :refinery_roles do |t|
14
+ t.string :title
15
+ end
16
+
17
+ create_table :refinery_user_plugins do |t|
18
+ t.integer :user_id
19
+ t.string :name
20
+ t.integer :position
21
+ end
22
+
23
+ add_index :refinery_user_plugins, :name
24
+ add_index :refinery_user_plugins, [:user_id, :name], :unique => true
25
+
26
+ create_table :refinery_users do |t|
27
+ t.string :username, :null => false
28
+ t.string :email, :null => false
29
+ t.string :encrypted_password, :null => false
30
+ t.datetime :current_sign_in_at
31
+ t.datetime :last_sign_in_at
32
+ t.string :current_sign_in_ip
33
+ t.string :last_sign_in_ip
34
+ t.integer :sign_in_count
35
+ t.datetime :remember_created_at
36
+ t.string :reset_password_token
37
+ t.datetime :reset_password_sent_at
38
+
39
+ t.timestamps
40
+ end
41
+
42
+ add_index :refinery_users, :id
43
+ end
44
+ end
@@ -0,0 +1,16 @@
1
+ # This migration comes from refinery_images (originally 20100913234707)
2
+ class CreateRefinerycmsImagesSchema < ActiveRecord::Migration
3
+ def change
4
+ create_table :refinery_images do |t|
5
+ t.string :image_mime_type
6
+ t.string :image_name
7
+ t.integer :image_size
8
+ t.integer :image_width
9
+ t.integer :image_height
10
+ t.string :image_uid
11
+ t.string :image_ext
12
+
13
+ t.timestamps
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,14 @@
1
+ # This migration comes from refinery_resources (originally 20100913234709)
2
+ class CreateRefinerycmsResourcesSchema < ActiveRecord::Migration
3
+ def change
4
+ create_table :refinery_resources do |t|
5
+ t.string :file_mime_type
6
+ t.string :file_name
7
+ t.integer :file_size
8
+ t.string :file_uid
9
+ t.string :file_ext
10
+
11
+ t.timestamps
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,59 @@
1
+ # This migration comes from refinery_pages (originally 20100913234708)
2
+ class CreateRefinerycmsPagesSchema < ActiveRecord::Migration
3
+ def up
4
+ create_table :refinery_page_parts do |t|
5
+ t.integer :refinery_page_id
6
+ t.string :title
7
+ t.text :body
8
+ t.integer :position
9
+
10
+ t.timestamps
11
+ end
12
+
13
+ add_index :refinery_page_parts, :id
14
+ add_index :refinery_page_parts, :refinery_page_id
15
+
16
+ create_table :refinery_pages do |t|
17
+ t.integer :parent_id
18
+ t.string :path
19
+ t.string :slug
20
+ t.boolean :show_in_menu, :default => true
21
+ t.string :link_url
22
+ t.string :menu_match
23
+ t.boolean :deletable, :default => true
24
+ t.boolean :draft, :default => false
25
+ t.boolean :skip_to_first_child, :default => false
26
+ t.integer :lft
27
+ t.integer :rgt
28
+ t.integer :depth
29
+ t.string :view_template
30
+ t.string :layout_template
31
+
32
+ t.timestamps
33
+ end
34
+
35
+ add_index :refinery_pages, :depth
36
+ add_index :refinery_pages, :id
37
+ add_index :refinery_pages, :lft
38
+ add_index :refinery_pages, :parent_id
39
+ add_index :refinery_pages, :rgt
40
+
41
+ Refinery::PagePart.create_translation_table!({
42
+ :body => :text
43
+ })
44
+
45
+ Refinery::Page.create_translation_table!({
46
+ :title => :string,
47
+ :custom_slug => :string,
48
+ :menu_title => :string,
49
+ :slug => :string
50
+ })
51
+ end
52
+
53
+ def down
54
+ drop_table :refinery_page_parts
55
+ drop_table :refinery_pages
56
+ Refinery::PagePart.drop_translation_table!
57
+ Refinery::Page.drop_translation_table!
58
+ end
59
+ end
@@ -0,0 +1,24 @@
1
+ # This migration comes from seo_meta_engine (originally 20110329222114)
2
+ class CreateSeoMeta < ActiveRecord::Migration
3
+
4
+ def self.up
5
+ create_table :seo_meta do |t|
6
+ t.integer :seo_meta_id
7
+ t.string :seo_meta_type
8
+
9
+ t.string :browser_title
10
+ t.string :meta_keywords
11
+ t.text :meta_description
12
+
13
+ t.timestamps
14
+ end
15
+
16
+ add_index :seo_meta, :id
17
+ add_index :seo_meta, [:seo_meta_id, :seo_meta_type]
18
+ end
19
+
20
+ def self.down
21
+ drop_table :seo_meta
22
+ end
23
+
24
+ end
@@ -0,0 +1,177 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20120416115058) do
15
+
16
+ create_table "refinery_copywriting_phrase_translations", :force => true do |t|
17
+ t.integer "refinery_copywriting_phrase_id"
18
+ t.string "locale"
19
+ t.text "value"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ end
23
+
24
+ add_index "refinery_copywriting_phrase_translations", ["locale"], :name => "index_copywriting_phrase_translations_on_locale"
25
+ add_index "refinery_copywriting_phrase_translations", ["refinery_copywriting_phrase_id"], :name => "index_c8fbec01a288d0aef8ba987126084c4d06953304"
26
+
27
+ create_table "refinery_copywriting_phrases", :force => true do |t|
28
+ t.string "name"
29
+ t.text "default"
30
+ t.text "value"
31
+ t.string "scope"
32
+ t.integer "page_id"
33
+ t.datetime "created_at", :null => false
34
+ t.datetime "updated_at", :null => false
35
+ t.string "phrase_type"
36
+ t.date "last_access_at"
37
+ end
38
+
39
+ add_index "refinery_copywriting_phrases", ["name", "scope"], :name => "index_copywriting_phrases_on_name_and_scope"
40
+
41
+ create_table "refinery_images", :force => true do |t|
42
+ t.string "image_mime_type"
43
+ t.string "image_name"
44
+ t.integer "image_size"
45
+ t.integer "image_width"
46
+ t.integer "image_height"
47
+ t.string "image_uid"
48
+ t.string "image_ext"
49
+ t.datetime "created_at", :null => false
50
+ t.datetime "updated_at", :null => false
51
+ end
52
+
53
+ create_table "refinery_page_part_translations", :force => true do |t|
54
+ t.integer "refinery_page_part_id"
55
+ t.string "locale"
56
+ t.text "body"
57
+ t.datetime "created_at", :null => false
58
+ t.datetime "updated_at", :null => false
59
+ end
60
+
61
+ add_index "refinery_page_part_translations", ["locale"], :name => "index_refinery_page_part_translations_on_locale"
62
+ add_index "refinery_page_part_translations", ["refinery_page_part_id"], :name => "index_f9716c4215584edbca2557e32706a5ae084a15ef"
63
+
64
+ create_table "refinery_page_parts", :force => true do |t|
65
+ t.integer "refinery_page_id"
66
+ t.string "title"
67
+ t.text "body"
68
+ t.integer "position"
69
+ t.datetime "created_at", :null => false
70
+ t.datetime "updated_at", :null => false
71
+ end
72
+
73
+ add_index "refinery_page_parts", ["id"], :name => "index_refinery_page_parts_on_id"
74
+ add_index "refinery_page_parts", ["refinery_page_id"], :name => "index_refinery_page_parts_on_refinery_page_id"
75
+
76
+ create_table "refinery_page_translations", :force => true do |t|
77
+ t.integer "refinery_page_id"
78
+ t.string "locale"
79
+ t.string "title"
80
+ t.string "custom_slug"
81
+ t.string "menu_title"
82
+ t.string "slug"
83
+ t.datetime "created_at", :null => false
84
+ t.datetime "updated_at", :null => false
85
+ end
86
+
87
+ add_index "refinery_page_translations", ["locale"], :name => "index_refinery_page_translations_on_locale"
88
+ add_index "refinery_page_translations", ["refinery_page_id"], :name => "index_d079468f88bff1c6ea81573a0d019ba8bf5c2902"
89
+
90
+ create_table "refinery_pages", :force => true do |t|
91
+ t.integer "parent_id"
92
+ t.string "path"
93
+ t.string "slug"
94
+ t.boolean "show_in_menu", :default => true
95
+ t.string "link_url"
96
+ t.string "menu_match"
97
+ t.boolean "deletable", :default => true
98
+ t.boolean "draft", :default => false
99
+ t.boolean "skip_to_first_child", :default => false
100
+ t.integer "lft"
101
+ t.integer "rgt"
102
+ t.integer "depth"
103
+ t.string "view_template"
104
+ t.string "layout_template"
105
+ t.datetime "created_at", :null => false
106
+ t.datetime "updated_at", :null => false
107
+ end
108
+
109
+ add_index "refinery_pages", ["depth"], :name => "index_refinery_pages_on_depth"
110
+ add_index "refinery_pages", ["id"], :name => "index_refinery_pages_on_id"
111
+ add_index "refinery_pages", ["lft"], :name => "index_refinery_pages_on_lft"
112
+ add_index "refinery_pages", ["parent_id"], :name => "index_refinery_pages_on_parent_id"
113
+ add_index "refinery_pages", ["rgt"], :name => "index_refinery_pages_on_rgt"
114
+
115
+ create_table "refinery_resources", :force => true do |t|
116
+ t.string "file_mime_type"
117
+ t.string "file_name"
118
+ t.integer "file_size"
119
+ t.string "file_uid"
120
+ t.string "file_ext"
121
+ t.datetime "created_at", :null => false
122
+ t.datetime "updated_at", :null => false
123
+ end
124
+
125
+ create_table "refinery_roles", :force => true do |t|
126
+ t.string "title"
127
+ end
128
+
129
+ create_table "refinery_roles_users", :id => false, :force => true do |t|
130
+ t.integer "user_id"
131
+ t.integer "role_id"
132
+ end
133
+
134
+ add_index "refinery_roles_users", ["role_id", "user_id"], :name => "index_refinery_roles_users_on_role_id_and_user_id"
135
+ add_index "refinery_roles_users", ["user_id", "role_id"], :name => "index_refinery_roles_users_on_user_id_and_role_id"
136
+
137
+ create_table "refinery_user_plugins", :force => true do |t|
138
+ t.integer "user_id"
139
+ t.string "name"
140
+ t.integer "position"
141
+ end
142
+
143
+ add_index "refinery_user_plugins", ["name"], :name => "index_refinery_user_plugins_on_name"
144
+ add_index "refinery_user_plugins", ["user_id", "name"], :name => "index_refinery_user_plugins_on_user_id_and_name", :unique => true
145
+
146
+ create_table "refinery_users", :force => true do |t|
147
+ t.string "username", :null => false
148
+ t.string "email", :null => false
149
+ t.string "encrypted_password", :null => false
150
+ t.datetime "current_sign_in_at"
151
+ t.datetime "last_sign_in_at"
152
+ t.string "current_sign_in_ip"
153
+ t.string "last_sign_in_ip"
154
+ t.integer "sign_in_count"
155
+ t.datetime "remember_created_at"
156
+ t.string "reset_password_token"
157
+ t.datetime "reset_password_sent_at"
158
+ t.datetime "created_at", :null => false
159
+ t.datetime "updated_at", :null => false
160
+ end
161
+
162
+ add_index "refinery_users", ["id"], :name => "index_refinery_users_on_id"
163
+
164
+ create_table "seo_meta", :force => true do |t|
165
+ t.integer "seo_meta_id"
166
+ t.string "seo_meta_type"
167
+ t.string "browser_title"
168
+ t.string "meta_keywords"
169
+ t.text "meta_description"
170
+ t.datetime "created_at", :null => false
171
+ t.datetime "updated_at", :null => false
172
+ end
173
+
174
+ add_index "seo_meta", ["id"], :name => "index_seo_meta_on_id"
175
+ add_index "seo_meta", ["seo_meta_id", "seo_meta_type"], :name => "index_seo_meta_on_seo_meta_id_and_seo_meta_type"
176
+
177
+ end
@@ -0,0 +1,10 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
+ # Mayor.create(:name => 'Emanuel', :city => cities.first)
8
+
9
+ # Added by Refinery CMS Pages extension
10
+ Refinery::Pages::Engine.load_seed
Binary file
Binary file