go_blog 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/Rakefile +1 -1
- data/app/controllers/blog/posts_controller.rb +0 -1
- data/app/models/blog/post.rb +1 -0
- data/app/views/blog/posts/list.json.jbuilder +13 -0
- data/app/views/blog/posts/show_list.html.erb +13 -0
- data/config/database.travis.yml +5 -26
- data/db/migrate/20171205121408_create_users.rb +6 -0
- data/lib/go_blog/engine.rb +4 -1
- data/lib/go_blog/version.rb +1 -1
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 557818e78d8a1f0a0c5bc4019d5a69635ec947b9
|
4
|
+
data.tar.gz: 9afb1a566a911b32cae35b05c4ad0c50fef8d8cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34b017327a92e922270c11563fababa9ab46341d23c742f3372f20c3a93ef3007b99a0af73ad34e11831d22e7a0de60115172bb887b076692d4f4182626bdf2e
|
7
|
+
data.tar.gz: '09e291fe2ab9c2b7691745a21a3361049df60381803ac2bbeed23092adf2631f8d1c1b6f6b3261a60780b07ac523948bb80b1e5311ddc73704df6336c07870d9'
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# GoBlog
|
2
|
-
|
2
|
+
Esse é o código fonte da engine GOBLOG.
|
3
3
|
|
4
4
|
## Usage
|
5
5
|
How to use my plugin.
|
@@ -21,6 +21,8 @@ Or install it yourself as:
|
|
21
21
|
$ gem install go_blog
|
22
22
|
```
|
23
23
|
|
24
|
+
## Testes [![Build Status](https://travis-ci.org/gorails/go_blog.svg?branch=master)](https://travis-ci.org/gorails/go_blog) [![Coverage Status](https://coveralls.io/repos/github/gorails/go_blog/badge.svg?branch=master)](https://coveralls.io/github/gorails/go_blog?branch=master)
|
25
|
+
|
24
26
|
## Contributing
|
25
27
|
Contribution directions go here.
|
26
28
|
|
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
17
|
-
APP_RAKEFILE = File.expand_path("../
|
17
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
18
18
|
load 'rails/tasks/engine.rake'
|
19
19
|
|
20
20
|
|
data/app/models/blog/post.rb
CHANGED
@@ -4,6 +4,7 @@ module Blog
|
|
4
4
|
belongs_to :user
|
5
5
|
has_many :taggings
|
6
6
|
has_many :tags, through: :taggings
|
7
|
+
has_many :comments,class_name: 'Comment::Comment', as: :commentable
|
7
8
|
|
8
9
|
def self.tagged_with(name)
|
9
10
|
Tag.find_by_name!(name).posts.where('? >= published_at and draft = ?', DateTime.now, false).includes(:user)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
json.array!(@blog_posts) do |post|
|
2
|
+
json.extract! post, :id, :title, :teaser, :body, :published_at
|
3
|
+
if post.custom_url
|
4
|
+
json.link post.custom_url
|
5
|
+
else
|
6
|
+
json.link Rails.application.routes.url_helpers.blog_post_url(id: post.id)
|
7
|
+
end
|
8
|
+
json.author do |jautor|
|
9
|
+
jautor.id post.user.id
|
10
|
+
jautor.name post.user.name
|
11
|
+
jautor.email post.user.email
|
12
|
+
end
|
13
|
+
end
|
@@ -22,6 +22,19 @@
|
|
22
22
|
</div>
|
23
23
|
|
24
24
|
</section>
|
25
|
+
|
26
|
+
<section class="content content-boxed">
|
27
|
+
|
28
|
+
<div class="row push-50-t push-50 nice-copy-story">
|
29
|
+
<div class="col-sm-8 col-sm-offset-2">
|
30
|
+
|
31
|
+
|
32
|
+
<%=render 'comment/comments/comments',comments:@blog_post.comments%>
|
33
|
+
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
</section>
|
25
38
|
</div>
|
26
39
|
|
27
40
|
<section class="content content-full content-boxed">
|
data/config/database.travis.yml
CHANGED
@@ -1,31 +1,10 @@
|
|
1
|
-
|
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
|
1
|
+
default: &default
|
12
2
|
adapter: postgresql
|
13
|
-
|
14
|
-
password:
|
15
|
-
database: invoicer_<%= ENV['RAILS_ENV'] %>
|
16
|
-
min_messages: ERROR
|
17
|
-
|
18
|
-
defaults: &defaults
|
3
|
+
host: localhost
|
19
4
|
pool: 5
|
20
5
|
timeout: 5000
|
21
|
-
|
22
|
-
<<: *<%= ENV['DB'] || "sqlite" %>
|
23
|
-
|
24
|
-
development:
|
25
|
-
<<: *defaults
|
6
|
+
encoding: unicode
|
26
7
|
|
27
8
|
test:
|
28
|
-
<<: *
|
29
|
-
|
30
|
-
production:
|
31
|
-
<<: *defaults
|
9
|
+
<<: *default
|
10
|
+
database: goblog_test
|
data/lib/go_blog/engine.rb
CHANGED
@@ -17,7 +17,10 @@ module GoBlog
|
|
17
17
|
config.time_zone = 'Brasilia'
|
18
18
|
config.i18n.load_path += Dir[config.root.join('config', 'locales','**', '*.{rb,yml}').to_s]
|
19
19
|
config.encoding = "utf-8"
|
20
|
-
|
20
|
+
config.generators do |g|
|
21
|
+
g.test_framework :rspec
|
22
|
+
g.factory_bot dir: Dir[config.root.join('spec', 'factories').to_s]
|
23
|
+
end
|
21
24
|
|
22
25
|
end
|
23
26
|
|
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.2.
|
4
|
+
version: 0.2.3
|
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-
|
11
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: draper
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.7.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.7.1
|
41
55
|
description: blog engine
|
42
56
|
email:
|
43
57
|
- jcottobboni@gmail.com
|
@@ -68,6 +82,7 @@ files:
|
|
68
82
|
- app/views/blog/posts/edit.html.erb
|
69
83
|
- app/views/blog/posts/index.html.erb
|
70
84
|
- app/views/blog/posts/list.html.erb
|
85
|
+
- app/views/blog/posts/list.json.jbuilder
|
71
86
|
- app/views/blog/posts/locales/model_locale.yml
|
72
87
|
- app/views/blog/posts/locales/view_locale.yml
|
73
88
|
- app/views/blog/posts/new.html.erb
|
@@ -80,6 +95,7 @@ files:
|
|
80
95
|
- db/migrate/20171008203759_create_blog_posts.rb
|
81
96
|
- db/migrate/20171012235935_create_blog_tags.rb
|
82
97
|
- db/migrate/20171013000036_create_blog_taggings.rb
|
98
|
+
- db/migrate/20171205121408_create_users.rb
|
83
99
|
- lib/go_blog.rb
|
84
100
|
- lib/go_blog/engine.rb
|
85
101
|
- lib/go_blog/version.rb
|