enjoy_cms_faq 0.3.2 → 0.3.5
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.
- checksums.yaml +4 -4
- data/app/views/enjoy/faq/questions/_new_question_form.html.slim +1 -1
- data/enjoy_cms_faq.gemspec +1 -1
- data/lib/enjoy/faq/configuration.rb +0 -8
- data/lib/enjoy/faq/engine.rb +1 -1
- data/lib/enjoy/faq/routes.rb +34 -0
- data/lib/enjoy/faq/version.rb +1 -1
- data/lib/enjoy_cms_faq.rb +3 -2
- metadata +5 -5
- data/config/routes.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5c4f104fce776355a25b9073e42aa96a4643d8d
|
4
|
+
data.tar.gz: 2e4422d8ec654c5b0c9e6f41dbc9b8b70db52b9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ee95207fb2d6a8f3b174214b4920976d0ae31df2034bfb123c302caa64f40e2cfccedd758a586cdbf68ed15f5ca0126badfad7001971be9433a78af1fe7abd7
|
7
|
+
data.tar.gz: 4c97c0f2c58c34e8fffc037809b476114478e51a696b70c3ac5fe5a87c1422e4db84c99a2a32f63bd92ebbf14c35f02fd54f11a10c1ebe484987bd81d080a9f2
|
data/enjoy_cms_faq.gemspec
CHANGED
@@ -19,8 +19,6 @@ module Enjoy
|
|
19
19
|
attr_accessor :save_with_captcha
|
20
20
|
attr_accessor :captcha_error_message
|
21
21
|
|
22
|
-
attr_accessor :routes_config
|
23
|
-
|
24
22
|
def initialize
|
25
23
|
@author_name_required = true
|
26
24
|
|
@@ -28,12 +26,6 @@ module Enjoy
|
|
28
26
|
|
29
27
|
@save_with_captcha = true
|
30
28
|
@captcha_error_message = "Код с картинки введен неверно"
|
31
|
-
|
32
|
-
@routes_config = {
|
33
|
-
use_questions_path: true,
|
34
|
-
use_question_categories_path: true,
|
35
|
-
use_faq_path: true
|
36
|
-
}
|
37
29
|
end
|
38
30
|
end
|
39
31
|
end
|
data/lib/enjoy/faq/engine.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
module ActionDispatch::Routing
|
2
|
+
class Mapper
|
3
|
+
|
4
|
+
def enjoy_cms_faq_routes(config = {})
|
5
|
+
routes_config = {
|
6
|
+
use_questions_path: true,
|
7
|
+
use_question_categories_path: true,
|
8
|
+
use_faq_path: true
|
9
|
+
}
|
10
|
+
routes_config.merge!(config)
|
11
|
+
|
12
|
+
scope module: 'enjoy' do
|
13
|
+
scope module: 'faq' do
|
14
|
+
if routes_config[:use_questions_path]
|
15
|
+
resources :questions, only: [:show, :new, :create], as: :enjoy_faq_questions do
|
16
|
+
get '(/page/:page)', action: :index, on: :collection, as: ""
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
if routes_config[:use_question_categories_path]
|
21
|
+
resources :question_categories, only: [:index, :show], as: :enjoy_faq_question_categories do
|
22
|
+
get 'questions(/page/:page)', action: :questions, on: :member, as: :questions
|
23
|
+
end
|
24
|
+
end
|
25
|
+
if routes_config[:use_faq_path]
|
26
|
+
get 'faq' => 'question_categories#index', as: :enjoy_faq
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
data/lib/enjoy/faq/version.rb
CHANGED
data/lib/enjoy_cms_faq.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enjoy_cms_faq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kiseliev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.3.
|
47
|
+
version: 0.3.5
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.3.
|
54
|
+
version: 0.3.5
|
55
55
|
description: FAQ system with EnjoyCMS support.
|
56
56
|
email:
|
57
57
|
- dev@enjoycreate.ru
|
@@ -86,7 +86,6 @@ files:
|
|
86
86
|
- bin/console
|
87
87
|
- bin/setup
|
88
88
|
- config/initializers/rails_admin.rb
|
89
|
-
- config/routes.rb
|
90
89
|
- enjoy_cms_faq.gemspec
|
91
90
|
- lib/enjoy/faq/admin.rb
|
92
91
|
- lib/enjoy/faq/admin/question.rb
|
@@ -99,6 +98,7 @@ files:
|
|
99
98
|
- lib/enjoy/faq/models/mongoid/question_category.rb
|
100
99
|
- lib/enjoy/faq/models/question.rb
|
101
100
|
- lib/enjoy/faq/models/question_category.rb
|
101
|
+
- lib/enjoy/faq/routes.rb
|
102
102
|
- lib/enjoy/faq/version.rb
|
103
103
|
- lib/enjoy_cms_faq.rb
|
104
104
|
- release.sh
|
data/config/routes.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Enjoy::Faq::Engine.routes.draw do
|
2
|
-
routes_config = Enjoy::Faq.configuration.routes_config
|
3
|
-
|
4
|
-
if !routes_config or routes_config[:use_questions_path]
|
5
|
-
resources :questions, only: [:show, :new, :create] do
|
6
|
-
get '(/page/:page)', action: :index, on: :collection, as: ""
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
if !routes_config or routes_config[:use_question_categories_path]
|
11
|
-
resources :question_categories, only: [:index, :show] do
|
12
|
-
get 'items(/page/:page)', action: :questions, on: :member, as: :items
|
13
|
-
end
|
14
|
-
end
|
15
|
-
if !routes_config or routes_config[:use_faq_path]
|
16
|
-
get 'faq' => 'question_categories#index', as: :faq
|
17
|
-
end
|
18
|
-
end
|