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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87a081e0734946c5e30c81253f5f3a97a950a75a
4
- data.tar.gz: 1ff89c2cae6aad44990971d24e448a6ce6682094
3
+ metadata.gz: 7f373e883b514f2ecebfb5c31d43c3d2509400a7
4
+ data.tar.gz: c7087a3fa7f28f5890f859bb8f3166b4aa509c93
5
5
  SHA512:
6
- metadata.gz: 7950a9d6da13c058424a3c521d8aa427be7a4677a97bce8085fef1328b49f0af98bb094f1408468c8617d5862194773a2b8dd15a2537ffa5126361d3ebc2f34e
7
- data.tar.gz: c36d95287e9c878bcdb807ac5c70d23e4d908ef4842fa130d32c50e792e818d5727ad9fe6395aa2bfd72095849b0eb423919d218496584566a7ddaabde7d13f7
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(id)
84
- return if id.nil?
85
- @notee_comments = Notee::Comment.where(post_id: id, is_hidden: false, is_deleted: false)
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(notee)
6
+ def notee_content(post)
7
7
 
8
- return if notee.nil?
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(notee.content).html_safe
20
+ @markdown.render(post.content).html_safe
21
21
  end
22
22
 
23
- def notee_comment_box(id)
24
- return render :partial => "notee/partials/comment_box.html.erb", :locals => { :post_id => id, :recaptcha => Notee.recaptcha_key }
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)
@@ -1,3 +1,3 @@
1
1
  module Notee
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -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.2
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-05 00:00:00.000000000 Z
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) app by only one command."
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) app by only one command."
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