notee 1.0.8 → 1.1.0
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/db/migrate/20160605141437_create_notee_posts.rb +0 -54
- data/db/migrate/20160605141510_create_notee_categories.rb +0 -4
- data/db/migrate/20160605141547_create_notee_images.rb +0 -5
- data/db/migrate/20160809145754_create_notee_users.rb +67 -1
- data/lib/notee/version.rb +1 -1
- data/lib/tasks/config/notee.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27aaf989aa53840308ed42a9cace3dad4659a837
|
4
|
+
data.tar.gz: fcec14a062f317046364321477c2dfa3e31f6efd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 722d054630fd0e87ad1c9139765b6540d7b5083977f68b27bfdf4d14e5bfd398bafcaf882024e81af776b2ff0149050bb16364938c648f4969384b9832f0bf12
|
7
|
+
data.tar.gz: fa87e7bc50612cbe073ecca8cf5d428b8ca5e518051704771ade6cccfccb15a3d9fbe398f9410a18ee25d6a2173fc1914f65bd6ed7faee4554b91e342ebafa3e
|
@@ -1,55 +1,5 @@
|
|
1
1
|
# This migration comes from notee (originally 20160605141437)
|
2
2
|
|
3
|
-
INITIAL_TXT = <<-EOC
|
4
|
-
|
5
|
-
# Notee
|
6
|
-
|
7
|
-
Notee is creating CMS(blog) app by only one command.
|
8
|
-
|
9
|
-
BackEnd: Ruby(RailsEngine)
|
10
|
-
FrontEnd: React.js + Riot.js(only comment part)
|
11
|
-
|
12
|
-
## Setting
|
13
|
-
|
14
|
-
update for your setting in config/initializers/notee.rb
|
15
|
-
|
16
|
-
Recommendation using .env
|
17
|
-
|
18
|
-
```rb
|
19
|
-
require 'notee'
|
20
|
-
|
21
|
-
# Recommendation using .env for manage id & password
|
22
|
-
|
23
|
-
Notee.configure do |config|
|
24
|
-
|
25
|
-
# root-user
|
26
|
-
config.notee_id = "your_name"
|
27
|
-
config.notee_password = "your_password"
|
28
|
-
|
29
|
-
# recaptcha
|
30
|
-
config.recaptcha_key = "hogehoge"
|
31
|
-
config.recaptcha_secret_key = "hogehoge"
|
32
|
-
|
33
|
-
# blog
|
34
|
-
config.blog_meta = {
|
35
|
-
title: "Notee",
|
36
|
-
url: "http://hogehoge.com",
|
37
|
-
keyword: "hoge, hoge, hoge",
|
38
|
-
description: "【react&rails】notee is creating CMS(blog) app by only one command.",
|
39
|
-
og_image: "http://hogehoge.com/hoge.png"
|
40
|
-
}
|
41
|
-
|
42
|
-
# google-analytics
|
43
|
-
config.google_analytics = "hogehogehogehoge"
|
44
|
-
end
|
45
|
-
|
46
|
-
```
|
47
|
-
|
48
|
-
## Helper Method
|
49
|
-
[Helper Method](https://github.com/funaota/notee/wiki/Helper-Method)
|
50
|
-
|
51
|
-
EOC
|
52
|
-
|
53
3
|
class CreateNoteePosts < ActiveRecord::Migration
|
54
4
|
def change
|
55
5
|
create_table :notee_posts do |t|
|
@@ -76,10 +26,6 @@ class CreateNoteePosts < ActiveRecord::Migration
|
|
76
26
|
t.timestamps null: false
|
77
27
|
end
|
78
28
|
|
79
|
-
# create default post
|
80
|
-
Notee::Post.skip_callback(:create, :before, :create_authority)
|
81
|
-
Notee::Post.create(title: "Hello World", content: INITIAL_TXT, status: 1, user_id: 0, category_id: 1, seo_description: "hello world! Notee is creating CMS(blog) app by only one command. BackEnd: Ruby(RailsEngine), FrontEnd: React.js + Riot.js(only comment part)", thumbnail_id: 1)
|
82
|
-
Notee::Post.set_callback(:create, :before, :create_authority)
|
83
29
|
|
84
30
|
add_index :notee_posts, :slug, :unique => true
|
85
31
|
end
|
@@ -15,9 +15,5 @@ class CreateNoteeCategories < ActiveRecord::Migration
|
|
15
15
|
|
16
16
|
add_index :notee_categories, :slug, :unique => true
|
17
17
|
|
18
|
-
# create default category
|
19
|
-
Notee::Category.skip_callback(:create, :before, :create_authority)
|
20
|
-
Notee::Category.create :name => 'No_Category'
|
21
|
-
Notee::Category.set_callback(:create, :before, :create_authority)
|
22
18
|
end
|
23
19
|
end
|
@@ -12,11 +12,6 @@ class CreateNoteeImages < ActiveRecord::Migration
|
|
12
12
|
|
13
13
|
t.timestamps null: false
|
14
14
|
end
|
15
|
-
|
16
|
-
# create default image
|
17
|
-
Notee::Image.skip_callback(:create, :before, :create_authority)
|
18
|
-
Notee::Image.create :content => 'default.png'
|
19
|
-
Notee::Image.set_callback(:create, :before, :create_authority)
|
20
15
|
end
|
21
16
|
|
22
17
|
end
|
@@ -1,3 +1,53 @@
|
|
1
|
+
INITIAL_TXT = <<-EOC
|
2
|
+
|
3
|
+
# Notee
|
4
|
+
|
5
|
+
Notee is creating CMS(blog) app by only one command.
|
6
|
+
|
7
|
+
BackEnd: Ruby(RailsEngine)
|
8
|
+
FrontEnd: React.js + Riot.js(only comment part)
|
9
|
+
|
10
|
+
## Setting
|
11
|
+
|
12
|
+
update for your setting in config/initializers/notee.rb
|
13
|
+
|
14
|
+
Recommendation using .env
|
15
|
+
|
16
|
+
```rb
|
17
|
+
require 'notee'
|
18
|
+
|
19
|
+
# Recommendation using .env for manage id & password
|
20
|
+
|
21
|
+
Notee.configure do |config|
|
22
|
+
|
23
|
+
# root-user
|
24
|
+
config.notee_id = "your_name"
|
25
|
+
config.notee_password = "your_password"
|
26
|
+
|
27
|
+
# recaptcha
|
28
|
+
config.recaptcha_key = "hogehoge"
|
29
|
+
config.recaptcha_secret_key = "hogehoge"
|
30
|
+
|
31
|
+
# blog
|
32
|
+
config.blog_meta = {
|
33
|
+
title: "Notee",
|
34
|
+
url: "http://hogehoge.com",
|
35
|
+
keyword: "hoge, hoge, hoge",
|
36
|
+
description: "【react&rails】notee is creating CMS(blog) app by only one command.",
|
37
|
+
og_image: "http://hogehoge.com/hoge.png"
|
38
|
+
}
|
39
|
+
|
40
|
+
# google-analytics
|
41
|
+
config.google_analytics = "hogehogehogehoge"
|
42
|
+
end
|
43
|
+
|
44
|
+
```
|
45
|
+
|
46
|
+
## Helper Method
|
47
|
+
[Helper Method](https://github.com/funaota/notee/wiki/Helper-Method)
|
48
|
+
|
49
|
+
EOC
|
50
|
+
|
1
51
|
class CreateNoteeUsers < ActiveRecord::Migration
|
2
52
|
def change
|
3
53
|
create_table :notee_users do |t|
|
@@ -12,11 +62,27 @@ class CreateNoteeUsers < ActiveRecord::Migration
|
|
12
62
|
t.timestamps null: false
|
13
63
|
end
|
14
64
|
|
65
|
+
add_index :notee_users, [:name, :email], :unique => true
|
66
|
+
|
15
67
|
# create root User
|
16
68
|
Notee::User.skip_callback(:create, :before, :create_authority)
|
17
69
|
Notee::User.create(id: 0, name: Notee.notee_id, email: "root", password: SecureRandom.hex, role: 9999)
|
18
70
|
Notee::User.set_callback(:create, :before, :create_authority)
|
19
71
|
|
20
|
-
|
72
|
+
# create default image
|
73
|
+
Notee::Image.skip_callback(:create, :before, :create_authority)
|
74
|
+
Notee::Image.create :content => 'default.png'
|
75
|
+
Notee::Image.set_callback(:create, :before, :create_authority)
|
76
|
+
|
77
|
+
# create default category
|
78
|
+
Notee::Category.skip_callback(:create, :before, :create_authority)
|
79
|
+
Notee::Category.create :name => 'No_Category'
|
80
|
+
Notee::Category.set_callback(:create, :before, :create_authority)
|
81
|
+
|
82
|
+
# create default post
|
83
|
+
Notee::Post.skip_callback(:create, :before, :create_authority)
|
84
|
+
Notee::Post.create(title: "Hello World", content: INITIAL_TXT, status: 1, user_id: 0, category_id: 1, seo_description: "hello world! Notee is creating CMS(blog) app by only one command. BackEnd: Ruby(RailsEngine), FrontEnd: React.js + Riot.js(only comment part)", thumbnail_id: 1)
|
85
|
+
Notee::Post.set_callback(:create, :before, :create_authority)
|
86
|
+
|
21
87
|
end
|
22
88
|
end
|
data/lib/notee/version.rb
CHANGED
data/lib/tasks/config/notee.rb
CHANGED
@@ -5,12 +5,12 @@ require 'notee'
|
|
5
5
|
Notee.configure do |config|
|
6
6
|
|
7
7
|
# root-user
|
8
|
-
config.notee_id = "hogehoge"
|
9
|
-
config.notee_password = "hogehoge"
|
8
|
+
config.notee_id = "hogehoge" # ENV['NOTEE_ID']
|
9
|
+
config.notee_password = "hogehoge" # ENV['NOTEE_PASSWORD']
|
10
10
|
|
11
11
|
# recaptcha
|
12
|
-
config.recaptcha_key = "hogehoge"
|
13
|
-
config.recaptcha_secret_key = "hogehoge"
|
12
|
+
config.recaptcha_key = "hogehoge" # ENV['RECAPTCHA_KEY']
|
13
|
+
config.recaptcha_secret_key = "hogehoge" # ENV['RECAPTCHA_SECRET_KEY']
|
14
14
|
|
15
15
|
# blog
|
16
16
|
config.blog_meta = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- funaota
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|