notee 1.0.2 → 1.0.3
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/lib/notee/helpers/notee_helper.rb +3 -3
- data/lib/notee/helpers/view_helper.rb +5 -5
- data/lib/notee/version.rb +1 -1
- data/lib/tasks/notee_tasks.rake +3 -11
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f373e883b514f2ecebfb5c31d43c3d2509400a7
|
4
|
+
data.tar.gz: c7087a3fa7f28f5890f859bb8f3166b4aa509c93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1348a89d137bab6d0688b135bcd140bfe65fbc7fc5b2ec07f39f69f4b0bbd96c7f4fd708eb929d737125fc7853d1763c4ee090fdab7a87e2a53f2e2f7ff88613
|
7
|
+
data.tar.gz: 52fd95e2f369d92270c3ab6c59d66ec1fffd025d6772f7eac63d127ed78ab281e595f73baf993ac3e71ac01390f850b371fcaee0b01013ad5637442be4487d51
|
@@ -80,9 +80,9 @@ module Notee
|
|
80
80
|
end
|
81
81
|
|
82
82
|
|
83
|
-
def notee_comments(
|
84
|
-
return if
|
85
|
-
@notee_comments = Notee::Comment.where(post_id:
|
83
|
+
def notee_comments(post_id)
|
84
|
+
return if post_id.nil?
|
85
|
+
@notee_comments = Notee::Comment.where(post_id: post_id, is_hidden: false, is_deleted: false)
|
86
86
|
@notee_comments
|
87
87
|
end
|
88
88
|
|
@@ -3,9 +3,9 @@ require 'redcarpet'
|
|
3
3
|
module Notee
|
4
4
|
module Helpers
|
5
5
|
module ViewHelper
|
6
|
-
def notee_content(
|
6
|
+
def notee_content(post)
|
7
7
|
|
8
|
-
return if
|
8
|
+
return if post.nil?
|
9
9
|
|
10
10
|
unless @markdown
|
11
11
|
renderer = Redcarpet::Render::HTML.new(filter_html: true, hard_wrap: true)
|
@@ -17,11 +17,11 @@ module Notee
|
|
17
17
|
# return render :partial => "notee/partials/secret_published.html.erb", :locals => { :item => notee, :markdown => @markdown.render(notee.content).html_safe, :display => false }
|
18
18
|
# end
|
19
19
|
|
20
|
-
@markdown.render(
|
20
|
+
@markdown.render(post.content).html_safe
|
21
21
|
end
|
22
22
|
|
23
|
-
def notee_comment_box(
|
24
|
-
return render :partial => "notee/partials/comment_box.html.erb", :locals => { :post_id =>
|
23
|
+
def notee_comment_box(post_id)
|
24
|
+
return render :partial => "notee/partials/comment_box.html.erb", :locals => { :post_id => post_id, :recaptcha => Notee.recaptcha_key }
|
25
25
|
end
|
26
26
|
|
27
27
|
def notee_meta(meta = Notee.blog_meta)
|
data/lib/notee/version.rb
CHANGED
data/lib/tasks/notee_tasks.rake
CHANGED
@@ -10,7 +10,7 @@ namespace :notee do
|
|
10
10
|
add_highlight_setting_to_js
|
11
11
|
add_notee_css_path
|
12
12
|
add_viewport_meta_info_and_delete_title
|
13
|
-
copy_directory("/app/views/", "../views/notee")
|
13
|
+
copy_directory("/app/views/notee/", "../views/notee")
|
14
14
|
copy_directory("/app/assets/stylesheets/notee/", "../stylesheets/notee")
|
15
15
|
copy_directory("/app/assets/javascripts/notee/", "../javascripts/notee")
|
16
16
|
create_file("/config/schedule.rb", "../config/schedule.rb", nil)
|
@@ -39,7 +39,6 @@ ________________________________
|
|
39
39
|
|
40
40
|
|
41
41
|
def add_engine_to_route
|
42
|
-
puts ""
|
43
42
|
return puts 'setup Notee Engine in config/route.rb\n' unless route = File.open("#{Rails.root}/config/routes.rb","r")
|
44
43
|
return if File.open("#{Rails.root}/config/routes.rb","r").read.include?("Notee::Engine")
|
45
44
|
|
@@ -76,11 +75,9 @@ EOC
|
|
76
75
|
f.close()
|
77
76
|
|
78
77
|
puts 'Notee added "mount Notee::Engine => "/notee" to config/route.rb'
|
79
|
-
puts ""
|
80
78
|
end
|
81
79
|
|
82
80
|
def add_highlight_setting_to_js
|
83
|
-
puts ""
|
84
81
|
return puts 'setup for highlight.pack.js in /app/assets/javascripts/application.js\n' unless route = File.open("#{Rails.root}/app/assets/javascripts/application.js","r")
|
85
82
|
return if File.open("#{Rails.root}/app/assets/javascripts/application.js","r").read.include?("hljs.initHighlightingOnLoad()")
|
86
83
|
|
@@ -107,12 +104,10 @@ $(document).on('ready', function() {
|
|
107
104
|
f.close()
|
108
105
|
|
109
106
|
puts 'Notee added "hljs.initHighlightingOnLoad();" to /app/assets/javascripts/application.js'
|
110
|
-
puts ""
|
111
107
|
end
|
112
108
|
|
113
109
|
|
114
110
|
def add_notee_css_path
|
115
|
-
puts ""
|
116
111
|
return puts 'setup for application.css in /app/assets/stylesheets/application.css\n' unless route = File.open("#{Rails.root}/app/assets/stylesheets/application.css","r")
|
117
112
|
return if File.open("#{Rails.root}/app/assets/stylesheets/application.css","r").read.include?("*= require_directory ./notee")
|
118
113
|
|
@@ -122,8 +117,8 @@ $(document).on('ready', function() {
|
|
122
117
|
// default notee setting
|
123
118
|
// ///////////////////////////
|
124
119
|
|
125
|
-
*= require_directory .
|
126
|
-
*= require_directory ./notee
|
120
|
+
*= require_directory .
|
121
|
+
*= require_directory ./notee
|
127
122
|
|
128
123
|
EOC
|
129
124
|
|
@@ -138,11 +133,9 @@ $(document).on('ready', function() {
|
|
138
133
|
f.close()
|
139
134
|
|
140
135
|
puts 'Notee added "*= require_directory ./notee" to /app/assets/stylesheets/application.css'
|
141
|
-
puts ""
|
142
136
|
end
|
143
137
|
|
144
138
|
def add_viewport_meta_info_and_delete_title
|
145
|
-
puts ""
|
146
139
|
return puts 'setup for application.html.erb in /app/views/layouts/application.html.erb\n' unless route = File.open("#{Rails.root}/app/views/layouts/application.html.erb","r")
|
147
140
|
return if File.open("#{Rails.root}/app/views/layouts/application.html.erb","r").read.include?('<meta name="viewport" content="width=device-width,initial-scale=1.0" />')
|
148
141
|
|
@@ -165,7 +158,6 @@ $(document).on('ready', function() {
|
|
165
158
|
|
166
159
|
puts 'Notee added "viewport meta info" to /app/views/layouts/application.html.erb'
|
167
160
|
puts 'Notee deleted "Title tag" in /app/views/layouts/application.html.erb'
|
168
|
-
puts ""
|
169
161
|
end
|
170
162
|
|
171
163
|
|
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.3
|
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-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -150,7 +150,7 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
-
description: "【react&rails】notee is creating CMS(blog)
|
153
|
+
description: "【react&rails】notee is creating CMS(blog) gem by only one command."
|
154
154
|
email:
|
155
155
|
- takuji.funao@gmail.com
|
156
156
|
executables: []
|
@@ -395,7 +395,7 @@ rubyforge_project:
|
|
395
395
|
rubygems_version: 2.5.2
|
396
396
|
signing_key:
|
397
397
|
specification_version: 4
|
398
|
-
summary: "【react&rails】notee is creating CMS(blog)
|
398
|
+
summary: "【react&rails】notee is creating CMS(blog) gem by only one command."
|
399
399
|
test_files:
|
400
400
|
- test/controllers/notee/categories_controller_test.rb
|
401
401
|
- test/controllers/notee/comments_controller_test.rb
|