go_blog 0.1.9 → 0.1.10
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/app/models/blog/post.rb +5 -0
- data/app/views/blog/posts/_collection_list.html.erb +7 -7
- data/app/views/blog/posts/index.html.erb +0 -1
- data/app/views/blog/posts/show_list.html.erb +1 -1
- data/config/database.travis.yml +31 -0
- data/config/locales/en/en.yml +7 -0
- data/config/locales/go_blog/pt-BR.yml +7 -0
- data/lib/go_blog/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e514f5b198ca73f8d60469bd078245cf13be328f
|
|
4
|
+
data.tar.gz: ea7142b9dac6db99fb6c11ca0ec5aaabbb0abdfb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 84b518251cd6f2d8563a493f4f08dfbf11c8e7bf90110911e53f0b41f60108f49c8845931671425fd3533c5cc58aede871e9dd4197d59997a9adca26961856a9
|
|
7
|
+
data.tar.gz: e72615be760e44b4d5fa5a9fd77bc80bf4a319d548468dc0dd6ea0a0a71cdc9045607163bc66074f3bea2ac4b4fe1ce0878931cb3e1eef30cf94d070c62d2189
|
data/app/models/blog/post.rb
CHANGED
|
@@ -9,6 +9,11 @@ module Blog
|
|
|
9
9
|
Tag.find_by_name!(name).posts.where('? >= published_at and draft = ?', DateTime.now, false).includes(:user)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
def text
|
|
13
|
+
return teaser if teaser.present? and !teaser.blank?
|
|
14
|
+
body if body.present? and !body.blank?
|
|
15
|
+
end
|
|
16
|
+
|
|
12
17
|
def reading_time
|
|
13
18
|
words_per_minute = 150
|
|
14
19
|
text = Nokogiri::HTML(self.body).at('body').inner_text
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
<div class="block" id="<%= dom_id(resource) %>">
|
|
3
3
|
<div class="block-content">
|
|
4
4
|
<div class="row items-push">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
<!--<div class="col-md-4">-->
|
|
6
|
+
<!--<a href="frontend_blog_story.php">-->
|
|
7
|
+
<!--<img class="img-responsive" src="https://wallpaperbrowse.com/media/images/html-color-codes-color-tutorials-hero-00e10b1f.jpg" alt="">-->
|
|
8
|
+
<!--</a>-->
|
|
9
|
+
<!--</div>-->
|
|
10
10
|
<div class="col-md-12">
|
|
11
11
|
<div class="font-s12 push-10">
|
|
12
|
-
<em class="pull-right"
|
|
13
|
-
<%= resource.decorate.link_to_author %> - <%= converte_date(resource.published_at) %>
|
|
12
|
+
<em class="pull-right"><%=pluralize(resource.reading_time, 'minuto')%></em>
|
|
13
|
+
<%= resource.decorate.link_to_author %> - publicado em <%= converte_date(resource.published_at) %>
|
|
14
14
|
</div>
|
|
15
15
|
<h4 class="text-uppercase push-10">
|
|
16
16
|
<%= resource.decorate.link_to_title %></h4>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div class="text-center">
|
|
14
14
|
<%= @blog_post.decorate.link_to_author %> - <%= converte_date(@blog_post.published_at) %> <em>visualizado <%=@blog_post.access_count%> x- <div class="wordcount">
|
|
15
15
|
<i class="fa fa-clock-o"></i>
|
|
16
|
-
<span><%=pluralize(@blog_post.reading_time, '
|
|
16
|
+
<span><%=pluralize(@blog_post.reading_time, 'minuto')%></span>
|
|
17
17
|
</div></em>
|
|
18
18
|
</div>
|
|
19
19
|
<div class="row push-50-t push-50 nice-copy-story">
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#sqlite: &sqlite
|
|
2
|
+
#adapter: sqlite3
|
|
3
|
+
#database: db/<%= ENV['RAILS_ENV'] %>.sqlite3
|
|
4
|
+
|
|
5
|
+
#mysql: &mysql
|
|
6
|
+
#adapter: mysql2
|
|
7
|
+
#username: root
|
|
8
|
+
#password:
|
|
9
|
+
#database: invoicer_<%= ENV['RAILS_ENV'] %>
|
|
10
|
+
|
|
11
|
+
postgresql: &postgresql
|
|
12
|
+
adapter: postgresql
|
|
13
|
+
username: postgres
|
|
14
|
+
password:
|
|
15
|
+
database: invoicer_<%= ENV['RAILS_ENV'] %>
|
|
16
|
+
min_messages: ERROR
|
|
17
|
+
|
|
18
|
+
defaults: &defaults
|
|
19
|
+
pool: 5
|
|
20
|
+
timeout: 5000
|
|
21
|
+
host: localhost
|
|
22
|
+
<<: *<%= ENV['DB'] || "sqlite" %>
|
|
23
|
+
|
|
24
|
+
development:
|
|
25
|
+
<<: *defaults
|
|
26
|
+
|
|
27
|
+
test:
|
|
28
|
+
<<: *defaults
|
|
29
|
+
|
|
30
|
+
production:
|
|
31
|
+
<<: *defaults
|
data/lib/go_blog/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: go_blog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- João Carlos Ottobboni
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-10-
|
|
11
|
+
date: 2017-10-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: draper
|
|
@@ -87,6 +87,9 @@ files:
|
|
|
87
87
|
- app/views/blog/posts/new.html.erb
|
|
88
88
|
- app/views/blog/posts/show.html.erb
|
|
89
89
|
- app/views/blog/posts/show_list.html.erb
|
|
90
|
+
- config/database.travis.yml
|
|
91
|
+
- config/locales/en/en.yml
|
|
92
|
+
- config/locales/go_blog/pt-BR.yml
|
|
90
93
|
- config/routes.rb
|
|
91
94
|
- db/migrate/20171008203759_create_blog_posts.rb
|
|
92
95
|
- db/migrate/20171012235935_create_blog_tags.rb
|