notee 1.0.7 → 1.0.8
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/notee/application.js +45 -76973
- data/app/controllers/notee/comments_controller.rb +1 -1
- data/app/controllers/notee/tokens_controller.rb +15 -0
- data/app/models/notee/post.rb +1 -1
- data/app/models/notee/user.rb +0 -6
- data/app/views/notee/partials/_comment_box.html.erb +109 -120
- data/app/views/notee/partials/_meta.html.erb +3 -1
- data/app/views/notee/tokens/new.html.erb +16 -4
- data/config/routes.rb +2 -16
- data/db/migrate/20160605141437_create_notee_posts.rb +56 -1
- data/db/migrate/20160809145754_create_notee_users.rb +5 -0
- data/lib/notee/helpers/notee_helper.rb +8 -4
- data/lib/notee/version.rb +1 -1
- data/lib/tasks/config/notee.rb +1 -1
- data/lib/tasks/controllers/errors_controller.rb +23 -0
- data/lib/tasks/controllers/notee_controller.rb +1 -0
- data/lib/tasks/notee_tasks.rake +86 -48
- data/lib/tasks/stylesheets/notee/social/social.css +1 -0
- data/lib/tasks/views/layouts/notee_application.html.erb +6 -0
- data/lib/tasks/views/notee/about.html.erb +36 -41
- data/lib/tasks/views/notee/archives.html.erb +9 -14
- data/lib/tasks/views/notee/categories.html.erb +9 -14
- data/lib/tasks/views/notee/errors/internal_server_error.html.erb +5 -0
- data/lib/tasks/views/notee/errors/not_found.html.erb +5 -0
- data/lib/tasks/views/notee/partials/_footer.html.erb +5 -3
- data/lib/tasks/views/notee/partials/_header.html.erb +11 -1
- data/lib/tasks/views/notee/posts.html.erb +41 -44
- data/lib/tasks/views/notee/show.html.erb +29 -34
- data/lib/tasks/views/notee/writers.html.erb +5 -10
- data/test/controllers/notee/categories_controller_test.rb +2 -2
- data/test/controllers/notee/comments_controller_test.rb +2 -2
- data/test/controllers/notee/images_controller_test.rb +2 -2
- data/test/controllers/notee/posts_controller_test.rb +2 -2
- metadata +6 -2
@@ -1,4 +1,14 @@
|
|
1
|
-
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
5
|
+
<%= csrf_meta_tags %>
|
6
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
7
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
8
|
+
<%= notee_meta(@notee_meta) %>
|
9
|
+
</head>
|
10
|
+
|
11
|
+
<body>
|
2
12
|
<div class="notee_header">
|
3
13
|
<div class="notee_wrapper">
|
4
14
|
<div class="notee_header_meta">
|
@@ -1,53 +1,50 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
<% @posts.each do |post| %>
|
6
|
-
<div class="notee_list">
|
7
|
-
|
8
|
-
<!-- title -->
|
9
|
-
<a href="/<%= post.slug %>">
|
10
|
-
<h3><%= post.title %></h3>
|
11
|
-
</a>
|
1
|
+
<div class="notee_main">
|
2
|
+
<h2><%= @notee_title %></h2>
|
3
|
+
<% @posts.each do |post| %>
|
4
|
+
<div class="notee_list">
|
12
5
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
</span>
|
6
|
+
<!-- title -->
|
7
|
+
<a href="/<%= post.slug %>">
|
8
|
+
<h3><%= post.title %></h3>
|
9
|
+
</a>
|
18
10
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
</
|
11
|
+
<div class="notee_list_meta">
|
12
|
+
<!-- publish-->
|
13
|
+
<span class="notee_list_meta_content">
|
14
|
+
<%= post.published_at.strftime("%Y/%m/%d") %>,
|
15
|
+
</span>
|
24
16
|
|
25
|
-
|
26
|
-
|
17
|
+
<!-- writer -->
|
18
|
+
<span class="notee_list_meta_content">
|
19
|
+
writer: <a href="/writers/<%= post.user.name %>"><%= post.user.name %></a>
|
20
|
+
</span>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="notee_list_content">
|
24
|
+
<!--thumbnail-->
|
25
|
+
<a href="/<%= post.slug %>">
|
26
|
+
<img src="/notee/<%= post.thumbnail.content %>">
|
27
|
+
</a>
|
28
|
+
|
29
|
+
<!-- content -->
|
30
|
+
<div class="notee_list_content_p">
|
27
31
|
<a href="/<%= post.slug %>">
|
28
|
-
<
|
32
|
+
<p><%= post.seo_description %></p>
|
29
33
|
</a>
|
30
|
-
|
31
|
-
<!-- content -->
|
32
|
-
<div class="notee_list_content_p">
|
33
|
-
<a href="/<%= post.slug %>">
|
34
|
-
<p><%= post.seo_description %></p>
|
35
|
-
</a>
|
36
|
-
</div>
|
37
34
|
</div>
|
35
|
+
</div>
|
38
36
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
</div>
|
37
|
+
<div class="notee_list_meta">
|
38
|
+
<!-- category -->
|
39
|
+
<span class="notee_list_meta_content">
|
40
|
+
category:
|
41
|
+
<span class="notee_list_meta_content notee_list_category">
|
42
|
+
<a href="/categories/<%= post.category.slug %>"><%= post.category.name %></a>
|
43
|
+
</span>
|
44
|
+
</span>
|
48
45
|
</div>
|
49
|
-
|
50
|
-
|
51
|
-
<%= render :partial => "notee/partials/sidebar.html.erb" %>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
52
48
|
</div>
|
53
|
-
|
49
|
+
|
50
|
+
|
@@ -2,48 +2,43 @@
|
|
2
2
|
<!-- you should change your favorite syntax -->
|
3
3
|
<%= stylesheet_link_tag "notee/highlight/default", :media => "all" %>
|
4
4
|
|
5
|
-
|
6
|
-
<div class="
|
7
|
-
|
8
|
-
<div class="notee_main_content">
|
9
|
-
<h1><%= @post.title %></h1>
|
10
|
-
|
11
|
-
<div class="notee_list_meta">
|
12
|
-
<!-- publish-->
|
13
|
-
<span class="notee_list_meta_content">
|
14
|
-
<%= @post.published_at.strftime("%Y/%m/%d") %>,
|
15
|
-
</span>
|
5
|
+
<div class="notee_main">
|
6
|
+
<div class="notee_main_content">
|
7
|
+
<h1><%= @post.title %></h1>
|
16
8
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
9
|
+
<div class="notee_list_meta">
|
10
|
+
<!-- publish-->
|
11
|
+
<span class="notee_list_meta_content">
|
12
|
+
<%= @post.published_at.strftime("%Y/%m/%d") %>,
|
13
|
+
</span>
|
14
|
+
|
15
|
+
<!-- writer -->
|
16
|
+
<span class="notee_list_meta_content">
|
17
|
+
writer: <a href="/writers/<%= @post.user.name %>"><%= @post.user.name %></a>
|
18
|
+
</span>
|
21
19
|
|
22
|
-
|
20
|
+
</div>
|
23
21
|
|
24
|
-
|
22
|
+
<%= render :partial => "notee/partials/social.html.erb" %>
|
25
23
|
|
26
|
-
|
24
|
+
<%= notee_content(@post) %>
|
27
25
|
|
28
|
-
|
26
|
+
<%= render :partial => "notee/partials/social.html.erb" %>
|
29
27
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
</span>
|
28
|
+
<div class="notee_list_meta">
|
29
|
+
<!-- category -->
|
30
|
+
<span class="notee_list_meta_content righting">
|
31
|
+
category:
|
32
|
+
<span class="notee_list_meta_content notee_list_category">
|
33
|
+
<a href="/categories/<%= @post.category.slug %>"><%= @post.category.name %></a>
|
37
34
|
</span>
|
38
|
-
</
|
35
|
+
</span>
|
39
36
|
</div>
|
37
|
+
</div>
|
40
38
|
|
41
|
-
|
42
|
-
|
39
|
+
<h4>Comments</h4>
|
40
|
+
<%= notee_comment_box(@post.id) %>
|
43
41
|
|
44
|
-
|
45
|
-
|
46
|
-
</div>
|
47
|
-
<%= render :partial => "notee/partials/sidebar.html.erb" %>
|
42
|
+
<h4>Written by</h4>
|
43
|
+
<%= render :partial => "notee/partials/profile.html.erb", :locals => {writer: @post.user} %>
|
48
44
|
</div>
|
49
|
-
<%= render :partial => "notee/partials/footer.html.erb" %>
|
@@ -1,11 +1,6 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<%= render :partial => "notee/partials/profile.html.erb", :locals => {writer: writer} %>
|
7
|
-
<% end %>
|
8
|
-
</div>
|
9
|
-
<%= render :partial => "notee/partials/sidebar.html.erb" %>
|
1
|
+
<div class="notee_main">
|
2
|
+
<h2>Writer List</h2>
|
3
|
+
<% @writers.each do |writer| %>
|
4
|
+
<%= render :partial => "notee/partials/profile.html.erb", :locals => {writer: writer} %>
|
5
|
+
<% end %>
|
10
6
|
</div>
|
11
|
-
<%= render :partial => "notee/partials/footer.html.erb" %>
|
@@ -20,7 +20,7 @@ module Notee
|
|
20
20
|
|
21
21
|
test "should create category" do
|
22
22
|
assert_difference('Category.count') do
|
23
|
-
post :create, category: {
|
23
|
+
post :create, category: {name: @category.name, parent_id: @category.parent_id, slug: @category.slug, status: @category.status }
|
24
24
|
end
|
25
25
|
|
26
26
|
assert_redirected_to category_path(assigns(:category))
|
@@ -37,7 +37,7 @@ module Notee
|
|
37
37
|
end
|
38
38
|
|
39
39
|
test "should update category" do
|
40
|
-
patch :update, id: @category, category: {
|
40
|
+
patch :update, id: @category, category: {name: @category.name, parent_id: @category.parent_id, slug: @category.slug, status: @category.status }
|
41
41
|
assert_redirected_to category_path(assigns(:category))
|
42
42
|
end
|
43
43
|
|
@@ -20,7 +20,7 @@ module Notee
|
|
20
20
|
|
21
21
|
test "should create comment" do
|
22
22
|
assert_difference('Comment.count') do
|
23
|
-
post comments_url, params: {
|
23
|
+
post comments_url, params: {comment: {content: @comment.content, email: @comment.email, name: @comment.name, post_id: @comment.post_id } }
|
24
24
|
end
|
25
25
|
|
26
26
|
assert_redirected_to comment_url(Comment.last)
|
@@ -37,7 +37,7 @@ module Notee
|
|
37
37
|
end
|
38
38
|
|
39
39
|
test "should update comment" do
|
40
|
-
patch comment_url(@comment), params: {
|
40
|
+
patch comment_url(@comment), params: {comment: {content: @comment.content, email: @comment.email, name: @comment.name, post_id: @comment.post_id } }
|
41
41
|
assert_redirected_to comment_url(@comment)
|
42
42
|
end
|
43
43
|
|
@@ -20,7 +20,7 @@ module Notee
|
|
20
20
|
|
21
21
|
test "should create image" do
|
22
22
|
assert_difference('Image.count') do
|
23
|
-
post :create, image: {
|
23
|
+
post :create, image: {content: @image.content }
|
24
24
|
end
|
25
25
|
|
26
26
|
assert_redirected_to image_path(assigns(:image))
|
@@ -37,7 +37,7 @@ module Notee
|
|
37
37
|
end
|
38
38
|
|
39
39
|
test "should update image" do
|
40
|
-
patch :update, id: @image, image: {
|
40
|
+
patch :update, id: @image, image: {content: @image.content }
|
41
41
|
assert_redirected_to image_path(assigns(:image))
|
42
42
|
end
|
43
43
|
|
@@ -20,7 +20,7 @@ module Notee
|
|
20
20
|
|
21
21
|
test "should create post" do
|
22
22
|
assert_difference('Post.count') do
|
23
|
-
post :create, post: {
|
23
|
+
post :create, post: {category_id: @post.category_id, content: @post.content, published_at: @post.published_at, seo_description: @post.seo_description, seo_keyword: @post.seo_keyword, slug: @post.slug, status: @post.status, thumbnail_id: @post.thumbnail_id, title: @post.title }
|
24
24
|
end
|
25
25
|
|
26
26
|
assert_redirected_to post_path(assigns(:post))
|
@@ -37,7 +37,7 @@ module Notee
|
|
37
37
|
end
|
38
38
|
|
39
39
|
test "should update post" do
|
40
|
-
patch :update, id: @post, post: {
|
40
|
+
patch :update, id: @post, post: {category_id: @post.category_id, content: @post.content, published_at: @post.published_at, seo_description: @post.seo_description, seo_keyword: @post.seo_keyword, slug: @post.slug, status: @post.status, thumbnail_id: @post.thumbnail_id, title: @post.title }
|
41
41
|
assert_redirected_to post_path(assigns(:post))
|
42
42
|
end
|
43
43
|
|
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.0.8
|
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-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -210,6 +210,7 @@ files:
|
|
210
210
|
- lib/notee/version.rb
|
211
211
|
- lib/tasks/config/notee.rb
|
212
212
|
- lib/tasks/config/schedule.rb
|
213
|
+
- lib/tasks/controllers/errors_controller.rb
|
213
214
|
- lib/tasks/controllers/notee_controller.rb
|
214
215
|
- lib/tasks/images/notee/default.png
|
215
216
|
- lib/tasks/images/notee/profile/default.png
|
@@ -298,9 +299,12 @@ files:
|
|
298
299
|
- lib/tasks/stylesheets/notee/normalize.css
|
299
300
|
- lib/tasks/stylesheets/notee/notee_default.css
|
300
301
|
- lib/tasks/stylesheets/notee/social/social.css
|
302
|
+
- lib/tasks/views/layouts/notee_application.html.erb
|
301
303
|
- lib/tasks/views/notee/about.html.erb
|
302
304
|
- lib/tasks/views/notee/archives.html.erb
|
303
305
|
- lib/tasks/views/notee/categories.html.erb
|
306
|
+
- lib/tasks/views/notee/errors/internal_server_error.html.erb
|
307
|
+
- lib/tasks/views/notee/errors/not_found.html.erb
|
304
308
|
- lib/tasks/views/notee/partials/_footer.html.erb
|
305
309
|
- lib/tasks/views/notee/partials/_header.html.erb
|
306
310
|
- lib/tasks/views/notee/partials/_profile.html.erb
|