brightcontent-pages 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -0
- data/Gemfile.lock +24 -4
- data/app/controllers/brightcontent/pages_controller.rb +2 -3
- data/app/models/brightcontent/page.rb +6 -3
- data/brightcontent-pages.gemspec +1 -0
- data/lib/brightcontent/pages.rb +1 -0
- data/spec/dummy/db/migrate/20121228111704_create_attachments.brightcontent_attachments_engine.rb +20 -0
- data/spec/dummy/db/schema.rb +15 -1
- data/spec/dummy/public/system/brightcontent/attachments/assets/000/000/001/original/cosellers-browser.jpg +0 -0
- metadata +26 -6
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,23 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
brightcontent-pages (2.0.
|
4
|
+
brightcontent-pages (2.0.7)
|
5
5
|
awesome_nested_set
|
6
|
-
brightcontent-
|
6
|
+
brightcontent-attachments (= 2.0.7)
|
7
|
+
brightcontent-core (= 2.0.7)
|
8
|
+
|
9
|
+
PATH
|
10
|
+
remote: ../attachments
|
11
|
+
specs:
|
12
|
+
brightcontent-attachments (2.0.7)
|
13
|
+
brightcontent-core (= 2.0.7)
|
14
|
+
jquery-fileupload-rails
|
15
|
+
paperclip
|
7
16
|
|
8
17
|
PATH
|
9
18
|
remote: ../core
|
10
19
|
specs:
|
11
|
-
brightcontent-core (2.0.
|
20
|
+
brightcontent-core (2.0.7)
|
12
21
|
bcrypt-ruby
|
13
22
|
bootstrap-wysihtml5-rails
|
14
23
|
has_scope
|
@@ -53,7 +62,7 @@ GEM
|
|
53
62
|
awesome_nested_set (2.1.5)
|
54
63
|
activerecord (>= 3.0.0)
|
55
64
|
bcrypt-ruby (3.0.1)
|
56
|
-
bootstrap-wysihtml5-rails (0.3.1.
|
65
|
+
bootstrap-wysihtml5-rails (0.3.1.14)
|
57
66
|
railties (>= 3.0)
|
58
67
|
builder (3.0.4)
|
59
68
|
capybara (2.0.1)
|
@@ -65,6 +74,7 @@ GEM
|
|
65
74
|
xpath (~> 1.0.0)
|
66
75
|
childprocess (0.3.6)
|
67
76
|
ffi (~> 1.0, >= 1.0.6)
|
77
|
+
cocaine (0.4.2)
|
68
78
|
diff-lcs (1.1.3)
|
69
79
|
erubis (2.7.0)
|
70
80
|
factory_girl (4.1.0)
|
@@ -80,6 +90,9 @@ GEM
|
|
80
90
|
has_scope (~> 0.5.0)
|
81
91
|
responders (~> 0.6)
|
82
92
|
journey (1.0.4)
|
93
|
+
jquery-fileupload-rails (0.4.0)
|
94
|
+
actionpack (>= 3.1)
|
95
|
+
railties (>= 3.1)
|
83
96
|
jquery-rails (2.1.4)
|
84
97
|
railties (>= 3.0, < 5.0)
|
85
98
|
thor (>= 0.14, < 2.0)
|
@@ -96,6 +109,12 @@ GEM
|
|
96
109
|
mime-types (1.19)
|
97
110
|
multi_json (1.5.0)
|
98
111
|
nokogiri (1.5.6)
|
112
|
+
paperclip (3.4.0)
|
113
|
+
activemodel (>= 3.0.0)
|
114
|
+
activerecord (>= 3.0.0)
|
115
|
+
activesupport (>= 3.0.0)
|
116
|
+
cocaine (~> 0.4.0)
|
117
|
+
mime-types
|
99
118
|
polyglot (0.3.3)
|
100
119
|
rack (1.4.1)
|
101
120
|
rack-cache (1.2)
|
@@ -165,6 +184,7 @@ PLATFORMS
|
|
165
184
|
ruby
|
166
185
|
|
167
186
|
DEPENDENCIES
|
187
|
+
brightcontent-attachments!
|
168
188
|
brightcontent-core!
|
169
189
|
brightcontent-pages!
|
170
190
|
capybara
|
@@ -2,14 +2,13 @@ require_dependency "brightcontent/application_controller"
|
|
2
2
|
|
3
3
|
module Brightcontent
|
4
4
|
class PagesController < BaseController
|
5
|
-
private
|
6
5
|
|
7
6
|
def list_fields
|
8
|
-
|
7
|
+
%w{name}
|
9
8
|
end
|
10
9
|
|
11
10
|
def form_fields
|
12
|
-
|
11
|
+
%w{name parent_id body attachments}
|
13
12
|
end
|
14
13
|
|
15
14
|
end
|
@@ -1,13 +1,16 @@
|
|
1
1
|
module Brightcontent
|
2
2
|
class Page < ActiveRecord::Base
|
3
|
-
acts_as_nested_set
|
4
3
|
attr_accessible :body, :name, :parent_id
|
5
4
|
|
6
|
-
|
5
|
+
acts_as_nested_set
|
6
|
+
include Brightcontent::Attachable
|
7
7
|
|
8
|
+
validates_presence_of :name
|
8
9
|
after_save :update_slug
|
9
10
|
|
10
|
-
default_scope
|
11
|
+
def self.default_scope
|
12
|
+
order :lft
|
13
|
+
end
|
11
14
|
|
12
15
|
def homepage?
|
13
16
|
lft == 1
|
data/brightcontent-pages.gemspec
CHANGED
data/lib/brightcontent/pages.rb
CHANGED
data/spec/dummy/db/migrate/20121228111704_create_attachments.brightcontent_attachments_engine.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# This migration comes from brightcontent_attachments_engine (originally 20121222172513)
|
2
|
+
class CreateAttachments < ActiveRecord::Migration
|
3
|
+
def self.up
|
4
|
+
create_table :brightcontent_attachments do |t|
|
5
|
+
t.integer :attachable_id
|
6
|
+
t.string :attachable_type
|
7
|
+
t.string :asset_file_name
|
8
|
+
t.string :asset_content_type
|
9
|
+
t.integer :asset_file_size
|
10
|
+
t.datetime :asset_updated_at
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
add_index :brightcontent_attachments, :attachable_id
|
14
|
+
add_index :brightcontent_attachments, :attachable_type
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
drop_table :brightcontent_attachments
|
19
|
+
end
|
20
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20121228111704) do
|
15
15
|
|
16
16
|
create_table "brightcontent_admin_users", :force => true do |t|
|
17
17
|
t.string "email"
|
@@ -20,6 +20,20 @@ ActiveRecord::Schema.define(:version => 20121207132810) do
|
|
20
20
|
t.datetime "updated_at", :null => false
|
21
21
|
end
|
22
22
|
|
23
|
+
create_table "brightcontent_attachments", :force => true do |t|
|
24
|
+
t.integer "attachable_id"
|
25
|
+
t.string "attachable_type"
|
26
|
+
t.string "asset_file_name"
|
27
|
+
t.string "asset_content_type"
|
28
|
+
t.integer "asset_file_size"
|
29
|
+
t.datetime "asset_updated_at"
|
30
|
+
t.datetime "created_at", :null => false
|
31
|
+
t.datetime "updated_at", :null => false
|
32
|
+
end
|
33
|
+
|
34
|
+
add_index "brightcontent_attachments", ["attachable_id"], :name => "index_brightcontent_attachments_on_attachable_id"
|
35
|
+
add_index "brightcontent_attachments", ["attachable_type"], :name => "index_brightcontent_attachments_on_attachable_type"
|
36
|
+
|
23
37
|
create_table "brightcontent_pages", :force => true do |t|
|
24
38
|
t.string "name"
|
25
39
|
t.text "body"
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightcontent-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: brightcontent-core
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.0.
|
21
|
+
version: 2.0.7
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,23 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 2.0.
|
29
|
+
version: 2.0.7
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: brightcontent-attachments
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - '='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.0.7
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - '='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.0.7
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
47
|
name: awesome_nested_set
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,12 +197,14 @@ files:
|
|
181
197
|
- spec/dummy/config/locales/en.yml
|
182
198
|
- spec/dummy/config/routes.rb
|
183
199
|
- spec/dummy/db/migrate/20121206121725_create_brightcontent_admin_users.rb
|
200
|
+
- spec/dummy/db/migrate/20121228111704_create_attachments.brightcontent_attachments_engine.rb
|
184
201
|
- spec/dummy/db/schema.rb
|
185
202
|
- spec/dummy/lib/assets/.gitkeep
|
186
203
|
- spec/dummy/public/404.html
|
187
204
|
- spec/dummy/public/422.html
|
188
205
|
- spec/dummy/public/500.html
|
189
206
|
- spec/dummy/public/favicon.ico
|
207
|
+
- spec/dummy/public/system/brightcontent/attachments/assets/000/000/001/original/cosellers-browser.jpg
|
190
208
|
- spec/dummy/script/rails
|
191
209
|
- spec/factories.rb
|
192
210
|
- spec/features/menu_spec.rb
|
@@ -208,7 +226,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
208
226
|
version: '0'
|
209
227
|
segments:
|
210
228
|
- 0
|
211
|
-
hash:
|
229
|
+
hash: -4435009024661515266
|
212
230
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
213
231
|
none: false
|
214
232
|
requirements:
|
@@ -217,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
235
|
version: '0'
|
218
236
|
segments:
|
219
237
|
- 0
|
220
|
-
hash:
|
238
|
+
hash: -4435009024661515266
|
221
239
|
requirements: []
|
222
240
|
rubyforge_project:
|
223
241
|
rubygems_version: 1.8.24
|
@@ -258,12 +276,14 @@ test_files:
|
|
258
276
|
- spec/dummy/config/locales/en.yml
|
259
277
|
- spec/dummy/config/routes.rb
|
260
278
|
- spec/dummy/db/migrate/20121206121725_create_brightcontent_admin_users.rb
|
279
|
+
- spec/dummy/db/migrate/20121228111704_create_attachments.brightcontent_attachments_engine.rb
|
261
280
|
- spec/dummy/db/schema.rb
|
262
281
|
- spec/dummy/lib/assets/.gitkeep
|
263
282
|
- spec/dummy/public/404.html
|
264
283
|
- spec/dummy/public/422.html
|
265
284
|
- spec/dummy/public/500.html
|
266
285
|
- spec/dummy/public/favicon.ico
|
286
|
+
- spec/dummy/public/system/brightcontent/attachments/assets/000/000/001/original/cosellers-browser.jpg
|
267
287
|
- spec/dummy/script/rails
|
268
288
|
- spec/factories.rb
|
269
289
|
- spec/features/menu_spec.rb
|