rcms 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91f94749eb4033bf65023866f48eb70621e31416
|
4
|
+
data.tar.gz: ab3589780c005fb8a37740b77f34948de9d770b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5b8bc33debe502d4ee1e0d23fd9169506b5d17c43004736235cc2a862137798fa432781a84c04a857974cfb4db6ed4591663866ebe64c210bd1467d2e6e4a11
|
7
|
+
data.tar.gz: 568aeda176a452ba5f972854f2a882cba8cf6860f07bd7f727e8a4deb34cc4816ef2ceaa1a69828daee549b32893d8ac0c19ecd508cb70a531597f5b012f6872
|
data/README.md
CHANGED
@@ -1,28 +1,85 @@
|
|
1
1
|
# Cmshelper
|
2
2
|
|
3
|
-
|
3
|
+
## Features
|
4
|
+
|
5
|
+
Basic:
|
6
|
+
- Allows to manage text pages
|
7
|
+
- Allows to manage text blocks
|
4
8
|
- Allows set/edit meta tags for each request
|
5
|
-
-
|
9
|
+
- Auto adding number of page to the title
|
10
|
+
- Other useful helpers
|
11
|
+
|
12
|
+
Also you can enable:
|
13
|
+
- News
|
14
|
+
- Mentions
|
15
|
+
- Feedbacks
|
16
|
+
|
17
|
+
## Requirements
|
18
|
+
|
19
|
+
Currently Rcms designed to work with:
|
20
|
+
- activeadmin
|
21
|
+
- kaminari
|
22
|
+
- carrierwave
|
23
|
+
- activerecord
|
24
|
+
- friendly_id
|
6
25
|
|
7
26
|
## Installation
|
8
27
|
|
9
|
-
|
28
|
+
```ruby
|
29
|
+
gem 'rcms', '0.1.3'
|
30
|
+
```
|
31
|
+
|
32
|
+
or
|
10
33
|
|
11
34
|
```ruby
|
12
35
|
gem 'rcms', github: 'r1dd1ck777/rcms'
|
13
36
|
```
|
14
37
|
|
15
|
-
|
38
|
+
## Usage
|
16
39
|
|
17
|
-
|
40
|
+
Main idea is generate file skeleton and allow you to change it in development
|
18
41
|
|
19
|
-
|
42
|
+
### Basic features becomes available after:
|
43
|
+
$ rails g rcms
|
44
|
+
$ rake db:migrate
|
45
|
+
Will generate models, activeadmin resources, controllers, views and patch routes.rb
|
46
|
+
Also it will add some methods and helpers to ApplicationController
|
20
47
|
|
21
|
-
|
48
|
+
Helpers:
|
49
|
+
```ruby
|
50
|
+
apply_meta_tags title: 'Foo', 'og:image': 'http://some/url.jpg'
|
51
|
+
```
|
22
52
|
|
23
|
-
|
53
|
+
or pass an entity if it responds to :meta_tags
|
54
|
+
```ruby
|
55
|
+
rcms_page = Rcms::Page.find 'foo-bar-slug'
|
56
|
+
apply_meta_tags rcms_page
|
57
|
+
# rcms_page.meta_tags => hash
|
58
|
+
```
|
59
|
+
|
60
|
+
### News
|
61
|
+
News feature: allows you to manage news from admin panel and show them on frontend
|
62
|
+
|
63
|
+
$ rails g rcms_news
|
64
|
+
$ rake db:migrate
|
65
|
+
Will generate models, activeadmin resources, controllers, views and patch routes.rb
|
66
|
+
|
67
|
+
### Mentions
|
68
|
+
Mentions feature: guest users can add their mention, and you can manage it at admin panel
|
69
|
+
|
70
|
+
$ rails g rcms_mentions
|
71
|
+
$ rake db:migrate
|
72
|
+
Will generate models, activeadmin resources, controllers, views and patch routes.rb
|
73
|
+
|
74
|
+
### Feedbacks
|
75
|
+
Feedbacks feature: allows users to send feedbacks to admins by emails
|
76
|
+
|
77
|
+
$ rails g rcms_feedbacks
|
78
|
+
Will generate controllers, views and patch routes.rb
|
24
79
|
|
25
|
-
|
80
|
+
## Backlog
|
81
|
+
- other locales
|
82
|
+
- tests
|
26
83
|
|
27
84
|
## License
|
28
85
|
|
@@ -25,8 +25,10 @@ module Rcms
|
|
25
25
|
if meta_tags.is_a?(Hash)
|
26
26
|
set_meta_tags meta_tags
|
27
27
|
else
|
28
|
-
meta_tags.each
|
29
|
-
|
28
|
+
if meta_tags.respond_to?(:each)
|
29
|
+
meta_tags.each do |mt|
|
30
|
+
set_meta_tags mt.key => mt.value if mt.value.present?
|
31
|
+
end
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
data/lib/rcms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ruslan.palagin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|