activeadmin-mongoid-blog 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -3
- data/activeadmin-mongoid-blog.gemspec +1 -1
- data/install.sh +58 -0
- metadata +6 -2
data/README.md
CHANGED
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
Blog app on the top of activeadmin and mongoid, using redactor and select2 plugins. Could be useful for almost every activeadmin based project.
|
4
4
|
|
5
|
+
### Quick new blog
|
6
|
+
|
7
|
+
Replace `new_blog` name with the real one and run:
|
8
|
+
|
9
|
+
export $project_name=new_blog ; curl https://raw.github.com/alexkravets/activeadmin-mongoid-blog/master/install.sh | sh
|
10
|
+
|
5
11
|
### Start a new rails project
|
6
12
|
|
7
|
-
$ rails new appname
|
13
|
+
$ rails new appname -T -O
|
8
14
|
|
9
15
|
### Setup and configure ActiveAdmin
|
10
16
|
|
@@ -12,9 +18,9 @@ Add these gems to Gemfile and run `bundle` command:
|
|
12
18
|
|
13
19
|
gem 'bson_ext'
|
14
20
|
gem 'mongoid'
|
21
|
+
gem 'devise'
|
15
22
|
gem 'activeadmin-mongoid'
|
16
23
|
gem 'activeadmin-mongoid-blog'
|
17
|
-
gem 'devise'
|
18
24
|
|
19
25
|
Run generators to and check settings in `/config/mongoid.yml`, `/config/initializers/active_admin.rb`:
|
20
26
|
|
@@ -43,7 +49,7 @@ Run `bundle` to install new gems.
|
|
43
49
|
|
44
50
|
As blog post editor `redactor.js` is used. It comes with a image uploading featured supported by **carrierwave**, install `Picture` model with command:
|
45
51
|
|
46
|
-
$ rails
|
52
|
+
$ rails g redactor:install
|
47
53
|
|
48
54
|
Add to your `active_admin.js.coffee`:
|
49
55
|
|
@@ -60,3 +66,5 @@ Install default views templates to `/app/views/blog`:
|
|
60
66
|
$ rails g active_admin:blog:views blog
|
61
67
|
|
62
68
|
### The End
|
69
|
+
|
70
|
+
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = 'activeadmin-mongoid-blog'
|
6
|
-
gem.version = '0.3.
|
6
|
+
gem.version = '0.3.2'
|
7
7
|
gem.summary = 'Blog app on the top of activeadmin and mongoid, using redactor and select2 plugins.'
|
8
8
|
gem.description = ''
|
9
9
|
gem.license = 'MIT'
|
data/install.sh
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
|
4
|
+
# === activeadmin-mongoid-blog ===
|
5
|
+
# https://github.com/alexkravets/activeadmin-mongoid-blog
|
6
|
+
#
|
7
|
+
# Description:
|
8
|
+
# Blog app on the top of activeadmin and mongoid, using redactor and
|
9
|
+
# select2 plugins. Could be useful for almost every activeadmin based project.
|
10
|
+
#
|
11
|
+
# Installation:
|
12
|
+
# export $project_name=new_blog ; curl https://raw.github.com/alexkravets/activeadmin-mongoid-blog/master/install.sh | sh
|
13
|
+
|
14
|
+
|
15
|
+
set -e
|
16
|
+
|
17
|
+
rails new $project_name -T -O
|
18
|
+
cd $project_name
|
19
|
+
|
20
|
+
|
21
|
+
# Gems
|
22
|
+
echo '
|
23
|
+
gem "bson_ext"
|
24
|
+
gem "mongoid"
|
25
|
+
gem "devise"
|
26
|
+
gem "activeadmin-mongoid"
|
27
|
+
gem "activeadmin-mongoid-blog"' >> Gemfile
|
28
|
+
|
29
|
+
|
30
|
+
bundle
|
31
|
+
|
32
|
+
|
33
|
+
rails g mongoid:config
|
34
|
+
rails g devise:install
|
35
|
+
rails g active_admin:install
|
36
|
+
rails g active_admin:blog:install blog
|
37
|
+
|
38
|
+
|
39
|
+
bundle
|
40
|
+
|
41
|
+
|
42
|
+
rails g redactor:install
|
43
|
+
|
44
|
+
|
45
|
+
# Tweak active_admin.js
|
46
|
+
echo '//= require activeadmin_mongoid_blog' >> app/assets/javascripts/active_admin.js
|
47
|
+
|
48
|
+
# Tweak active_admin.css.scss
|
49
|
+
cat app/assets/stylesheets/active_admin.css.scss > temp_file.tmp
|
50
|
+
echo '//= require activeadmin_mongoid_blog' > app/assets/stylesheets/active_admin.css.scss
|
51
|
+
cat temp_file.tmp >> app/assets/stylesheets/active_admin.css.scss
|
52
|
+
rm temp_file.tmp
|
53
|
+
|
54
|
+
|
55
|
+
echo "\n\n\n"
|
56
|
+
echo "$ rails c"
|
57
|
+
echo ">> AdminUser.create :email => 'admin@example.com', :password => 'password', :password_confirmation => 'password'"
|
58
|
+
echo "\n\n\n"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin-mongoid-blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
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-07-
|
12
|
+
date: 2012-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ''
|
15
15
|
email: santyor@gmail.com
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- app/views/blog/feed.rss.builder
|
28
28
|
- app/views/blog/index.html.erb
|
29
29
|
- app/views/blog/post.html.erb
|
30
|
+
- install.sh
|
30
31
|
- lib/activeadmin-mongoid-blog.rb
|
31
32
|
- lib/activeadmin-mongoid-blog/engine.rb
|
32
33
|
- lib/generators/active_admin/blog/install_generator.rb
|
@@ -52,6 +53,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
53
|
- - ! '>='
|
53
54
|
- !ruby/object:Gem::Version
|
54
55
|
version: '0'
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
hash: 3461903809420542268
|
55
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
60
|
none: false
|
57
61
|
requirements:
|