go_blog 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3a55d622a8b87cdbc4536bd1fbdcbee7704467b
4
- data.tar.gz: 1d4495930c588ff2b8e59f02379c22cbc71b7d0a
3
+ metadata.gz: e514f5b198ca73f8d60469bd078245cf13be328f
4
+ data.tar.gz: ea7142b9dac6db99fb6c11ca0ec5aaabbb0abdfb
5
5
  SHA512:
6
- metadata.gz: d4c0653c5a17f365aa96d8e8bed240dd793071b97a3a1075466d3b84e7587ec6b0fe580179182b3b9e2fa01bfd66f9666cf005727782c848a0ae5e235d7c88a6
7
- data.tar.gz: bbc94763298bfb8d2284e6e2342c4df2aeb603d0ad4a614b1a9596a620cdfc458c0dd55ef9159cf0aaee9ba9d7673bc75f128a3b31319e5897977464a018698c
6
+ metadata.gz: 84b518251cd6f2d8563a493f4f08dfbf11c8e7bf90110911e53f0b41f60108f49c8845931671425fd3533c5cc58aede871e9dd4197d59997a9adca26961856a9
7
+ data.tar.gz: e72615be760e44b4d5fa5a9fd77bc80bf4a319d548468dc0dd6ea0a0a71cdc9045607163bc66074f3bea2ac4b4fe1ce0878931cb3e1eef30cf94d070c62d2189
@@ -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
- <div class="col-md-4">
6
- <a href="frontend_blog_story.php">
7
- <img class="img-responsive" src="assets/img/photos/photo21.jpg" alt="">
8
- </a>
9
- </div>
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"><!--10 min--></em>
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>
@@ -20,7 +20,6 @@
20
20
  </h3>
21
21
  <span >
22
22
  <%= link_to I18n.t('blog_post.new.header'), new_blog_post_path, class: 'btn btn-sm btn-square btn-success' %>
23
-
24
23
  </span>
25
24
  </div>
26
25
  <div class="block-content">
@@ -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, 'minutos')%></span>
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
@@ -0,0 +1,7 @@
1
+ en:
2
+ blog_posts:
3
+ index:
4
+ title: 'Posts'
5
+ blog_post:
6
+ new:
7
+ header: 'New post'
@@ -0,0 +1,7 @@
1
+ pt-BR:
2
+ blog_posts:
3
+ index:
4
+ title: 'Posts'
5
+ blog_post:
6
+ new:
7
+ header: 'Novo post'
@@ -1,3 +1,3 @@
1
1
  module GoBlog
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.10'
3
3
  end
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.9
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-13 00:00:00.000000000 Z
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