brightcontent-pages 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/brightcontent/pages.js +1 -1
- data/app/models/brightcontent/page.rb +1 -0
- data/app/models/brightcontent/page_core.rb +7 -0
- data/brightcontent-pages.gemspec +2 -1
- data/lib/brightcontent/pages/methods.rb +4 -0
- metadata +24 -12
- data/spec/dummy/db/schema.rb +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 112947762fa3d05aa45691987766348bd2256438
|
4
|
+
data.tar.gz: 0c19ad6cf07c0dd1314e486edded47cf12b4981c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ba829349ef0b518b96e53e1d84cc74fa6ba9892819794677873743f8417e8abb42333791206de2d0db60b382c73e76a05349370a781060665491ef94f224ffc
|
7
|
+
data.tar.gz: d6730a095af90e99dae1763f3f4b50871dedd55141a5a76dae02dee4c6a10b15dca19ef1ce0d5766091b43b8964668eb30a557d9aa26b7b3a3bf16b1d25fe98a
|
@@ -13,6 +13,9 @@ module Brightcontent
|
|
13
13
|
after_save :update_slug, :expire_path_cache
|
14
14
|
after_move :update_slug, :expire_path_cache
|
15
15
|
|
16
|
+
scope :visible, -> { where(arel_table[:hidden].eq false) }
|
17
|
+
scope :hidden, -> { where(arel_table[:hidden].eq true) }
|
18
|
+
|
16
19
|
default_scope { order(:lft) }
|
17
20
|
end
|
18
21
|
|
@@ -38,6 +41,10 @@ module Brightcontent
|
|
38
41
|
"/" + slug
|
39
42
|
end
|
40
43
|
|
44
|
+
def to_s
|
45
|
+
name
|
46
|
+
end
|
47
|
+
|
41
48
|
private
|
42
49
|
|
43
50
|
def update_slug
|
data/brightcontent-pages.gemspec
CHANGED
@@ -18,10 +18,11 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency "brightcontent-core", version
|
19
19
|
s.add_dependency "brightcontent-attachments", version
|
20
20
|
s.add_dependency "awesome_nested_set", ">= 3.0.0.rc.3"
|
21
|
-
s.add_dependency "jquery-ui-rails", "
|
21
|
+
s.add_dependency "jquery-ui-rails", "~> 5.0.0"
|
22
22
|
s.add_dependency "the_sortable_tree", "~> 2.3.0"
|
23
23
|
|
24
24
|
s.add_development_dependency "sqlite3"
|
25
|
+
s.add_development_dependency "rspec", "~> 2.14.1"
|
25
26
|
s.add_development_dependency "rspec-rails"
|
26
27
|
s.add_development_dependency "capybara"
|
27
28
|
s.add_development_dependency "launchy"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightcontent-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Developers at Brightin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brightcontent-core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.1.
|
19
|
+
version: 2.1.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.1.
|
26
|
+
version: 2.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: brightcontent-attachments
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.1.
|
33
|
+
version: 2.1.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.1.
|
40
|
+
version: 2.1.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: awesome_nested_set
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: jquery-ui-rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 5.0.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 5.0.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: the_sortable_tree
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.14.1
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.14.1
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rspec-rails
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,7 +237,6 @@ files:
|
|
223
237
|
- spec/dummy/db/migrate/20121206121725_create_brightcontent_admin_users.rb
|
224
238
|
- spec/dummy/db/migrate/20121228111704_create_attachments.brightcontent_attachments_engine.rb
|
225
239
|
- spec/dummy/db/migrate/20140227110824_add_position_to_attachments.brightcontent_attachments_engine.rb
|
226
|
-
- spec/dummy/db/schema.rb
|
227
240
|
- spec/dummy/lib/assets/.gitkeep
|
228
241
|
- spec/dummy/public/404.html
|
229
242
|
- spec/dummy/public/422.html
|
@@ -297,7 +310,6 @@ test_files:
|
|
297
310
|
- spec/dummy/db/migrate/20121206121725_create_brightcontent_admin_users.rb
|
298
311
|
- spec/dummy/db/migrate/20121228111704_create_attachments.brightcontent_attachments_engine.rb
|
299
312
|
- spec/dummy/db/migrate/20140227110824_add_position_to_attachments.brightcontent_attachments_engine.rb
|
300
|
-
- spec/dummy/db/schema.rb
|
301
313
|
- spec/dummy/lib/assets/.gitkeep
|
302
314
|
- spec/dummy/public/404.html
|
303
315
|
- spec/dummy/public/422.html
|
data/spec/dummy/db/schema.rb
DELETED
@@ -1,53 +0,0 @@
|
|
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 that you check this file into your version control system.
|
13
|
-
|
14
|
-
ActiveRecord::Schema.define(version: 20140227110824) do
|
15
|
-
|
16
|
-
create_table "brightcontent_admin_users", force: true do |t|
|
17
|
-
t.string "email"
|
18
|
-
t.string "password_digest"
|
19
|
-
t.datetime "created_at", null: false
|
20
|
-
t.datetime "updated_at", null: false
|
21
|
-
end
|
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
|
-
t.integer "position"
|
33
|
-
end
|
34
|
-
|
35
|
-
add_index "brightcontent_attachments", ["attachable_id"], name: "index_brightcontent_attachments_on_attachable_id"
|
36
|
-
add_index "brightcontent_attachments", ["attachable_type"], name: "index_brightcontent_attachments_on_attachable_type"
|
37
|
-
|
38
|
-
create_table "brightcontent_pages", force: true do |t|
|
39
|
-
t.string "name"
|
40
|
-
t.text "body"
|
41
|
-
t.string "slug"
|
42
|
-
t.integer "depth"
|
43
|
-
t.integer "lft"
|
44
|
-
t.integer "rgt"
|
45
|
-
t.integer "parent_id"
|
46
|
-
t.datetime "created_at", null: false
|
47
|
-
t.datetime "updated_at", null: false
|
48
|
-
t.boolean "hidden", default: false, null: false
|
49
|
-
end
|
50
|
-
|
51
|
-
add_index "brightcontent_pages", ["slug"], name: "index_brightcontent_pages_on_slug"
|
52
|
-
|
53
|
-
end
|