updates and spec fixes

This commit is contained in:
2018-06-07 17:31:21 -03:00
parent adc02128e4
commit c2a1c61f82
6 changed files with 144 additions and 142 deletions
+138 -136
View File
@@ -1,11 +1,10 @@
GIT
remote: git://github.com/companytools/dunlop-core.git
revision: a7b86d3c17309d9de29bc2b4aa9a7dff842d619f
revision: 2ab9ad0b61aa5cd14528fc00a41de20532cb4f26
branch: master
specs:
dunlop-core (1.4.0)
cancancan
carrierwave
coffee-rails (~> 4.1)
devise
devise-token_authenticatable
@@ -39,68 +38,68 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.4)
actionpack (= 5.1.4)
actioncable (5.2.0)
actionpack (= 5.2.0)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
websocket-driver (>= 0.6.1)
actionmailer (5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.4)
actionview (= 5.1.4)
activesupport (= 5.1.4)
actionpack (5.2.0)
actionview (= 5.2.0)
activesupport (= 5.2.0)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.4)
activesupport (= 5.1.4)
actionview (5.2.0)
activesupport (= 5.2.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_attr (0.10.2)
activemodel (>= 3.0.2, < 5.2)
activesupport (>= 3.0.2, < 5.2)
active_model_serializers (0.10.6)
active_attr (0.11.0)
activemodel (>= 3.0.2, < 6.0)
activesupport (>= 3.0.2, < 6.0)
active_model_serializers (0.10.7)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.2)
activejob (5.1.4)
activesupport (= 5.1.4)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (5.2.0)
activesupport (= 5.2.0)
globalid (>= 0.3.6)
activemodel (5.1.4)
activesupport (= 5.1.4)
activerecord (5.1.4)
activemodel (= 5.1.4)
activesupport (= 5.1.4)
arel (~> 8.0)
activesupport (5.1.4)
activemodel (5.2.0)
activesupport (= 5.2.0)
activerecord (5.2.0)
activemodel (= 5.2.0)
activesupport (= 5.2.0)
arel (>= 9.0)
activestorage (5.2.0)
actionpack (= 5.2.0)
activerecord (= 5.2.0)
marcel (~> 0.3.1)
activesupport (5.2.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (8.0.0)
bcrypt (3.1.11)
arel (9.0.0)
bcrypt (3.1.12)
builder (3.2.3)
cancancan (2.0.0)
capybara (2.15.2)
cancancan (2.2.0)
capybara (3.2.1)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
carrierwave (1.2.1)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
xpath (~> 3.1)
case_transform (0.2)
activesupport
coderay (1.1.2)
@@ -112,117 +111,119 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
crass (1.0.2)
database_cleaner (1.6.1)
devise (4.3.0)
crass (1.0.4)
database_cleaner (1.7.0)
devise (4.4.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.2)
railties (>= 4.1.0, < 6.0)
responders
warden (~> 1.2.3)
devise-token_authenticatable (1.0.0)
devise (>= 4.0.0, < 4.4.0)
devise-token_authenticatable (1.0.1)
devise (>= 4.0.0, < 4.5.0)
diff-lcs (1.3)
erubi (1.6.1)
erubi (1.7.1)
exception_notification (4.2.2)
actionmailer (>= 4.0, < 6)
activesupport (>= 4.0, < 6)
execjs (2.7.0)
facets (3.1.0)
factory_girl (4.8.1)
factory_girl (4.9.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0)
factory_girl_rails (4.9.0)
factory_girl (~> 4.9.0)
railties (>= 3.0.0)
ffi (1.9.18)
font-awesome-rails (4.7.0.2)
railties (>= 3.2, < 5.2)
globalid (0.4.0)
ffi (1.9.25)
font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 6.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (0.8.6)
js-routes (1.4.2)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
js-routes (1.4.4)
railties (>= 3.2)
sprockets-rails
jsonapi-renderer (0.1.3)
kaminari (1.0.1)
jsonapi-renderer (0.2.0)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.0.1)
kaminari-activerecord (= 1.0.1)
kaminari-core (= 1.0.1)
kaminari-actionview (1.0.1)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.0.1)
kaminari-activerecord (1.0.1)
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
activerecord
kaminari-core (= 1.0.1)
kaminari-core (1.0.1)
loofah (2.1.1)
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.6.6)
mime-types (>= 1.16, < 4)
mail (2.7.0)
mini_mime (>= 0.1.1)
marcel (0.3.2)
mimemagic (~> 0.3.2)
memoist (0.16.0)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_mime (0.1.4)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.10.3)
momentjs-rails (2.17.1)
minitest (5.11.3)
momentjs-rails (2.20.1)
railties (>= 3.1)
nio4r (2.1.0)
nokogiri (1.8.1)
nio4r (2.3.1)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
orm_adapter (0.5.0)
pickadate-rails (3.5.5.0)
railties (>= 3.1.0)
polyamorous (1.3.1)
polyamorous (1.3.3)
activerecord (>= 3.0)
pry (0.11.1)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-doc (0.11.1)
pry (~> 0.9)
yard (~> 0.9)
pry-doc (0.13.4)
pry (~> 0.11)
yard (~> 0.9.11)
pry-rails (0.3.6)
pry (>= 0.10.4)
public_suffix (3.0.0)
rack (2.0.3)
rack-cors (1.0.1)
rack-test (0.7.0)
public_suffix (3.0.2)
rack (2.0.5)
rack-cors (1.0.2)
rack-test (1.0.0)
rack (>= 1.0, < 3)
rails (5.1.4)
actioncable (= 5.1.4)
actionmailer (= 5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
activemodel (= 5.1.4)
activerecord (= 5.1.4)
activesupport (= 5.1.4)
rails (5.2.0)
actioncable (= 5.2.0)
actionmailer (= 5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
activemodel (= 5.2.0)
activerecord (= 5.2.0)
activestorage (= 5.2.0)
activesupport (= 5.2.0)
bundler (>= 1.3.0)
railties (= 5.1.4)
railties (= 5.2.0)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.1.4)
actionpack (= 5.1.4)
activesupport (= 5.1.4)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.0)
actionpack (= 5.2.0)
activesupport (= 5.2.0)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.1.0)
ransack (1.8.3)
rake (12.3.1)
ransack (1.8.8)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
i18n
polyamorous (~> 1.3)
rb-fsevent (0.10.2)
polyamorous (~> 1.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
record_collection (0.10.4)
@@ -230,28 +231,29 @@ GEM
activemodel (>= 4.1)
railties (>= 3.1)
redcarpet (3.4.0)
request_store (1.3.2)
request_store (1.4.1)
rack (>= 1.4)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-rails (3.6.1)
rspec-support (~> 3.7.0)
rspec-rails (3.7.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
sass (3.5.3)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
sass (3.5.6)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
@@ -262,13 +264,13 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
simple_form (3.5.0)
actionpack (> 4, < 5.2)
activemodel (> 4, < 5.2)
slim (3.0.8)
simple_form (4.0.1)
actionpack (>= 5.0)
activemodel (>= 5.0)
slim (3.0.9)
temple (>= 0.7.6, < 0.9)
tilt (>= 1.3.3, < 2.1)
slim-rails (3.1.2)
slim-rails (3.1.3)
actionpack (>= 3.1)
railties (>= 3.1)
slim (~> 3.0)
@@ -285,26 +287,26 @@ GEM
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
state_machines (0.5.0)
state_machines-activemodel (0.5.0)
activemodel (>= 4.1, < 5.2)
state_machines-activemodel (0.5.1)
activemodel (>= 4.1, < 6.0)
state_machines (>= 0.5.0)
state_machines-activerecord (0.5.0)
activerecord (>= 4.1, < 5.2)
state_machines-activerecord (0.5.1)
activerecord (>= 4.1, < 6.0)
state_machines-activemodel (>= 0.5.0)
temple (0.8.0)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
tzinfo (1.2.3)
tzinfo (1.2.5)
thread_safe (~> 0.1)
warden (1.2.7)
rack (>= 1.0)
websocket-driver (0.6.5)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.1.0)
nokogiri (~> 1.3)
yard (0.9.9)
websocket-extensions (0.1.3)
xpath (3.1.0)
nokogiri (~> 1.8)
yard (0.9.14)
PLATFORMS
ruby
@@ -329,4 +331,4 @@ DEPENDENCIES
sqlite3
BUNDLED WITH
1.16.0
1.16.2
@@ -98,7 +98,7 @@ RSpec.describe Api::PostsController, type: :controller do
type: "comment",
attributes: {body: "post-1-comment-1"},
relationships: {
post: {data: {id: post1.id.to_s, type: "posts"}}
post: {data: {id: post1.id.to_s, type: "post"}}
}
}
],
@@ -31,7 +31,7 @@ RSpec.describe Api::PostsController, type: :controller do
type: "comment",
attributes: {body: "post-1-comment-1"},
relationships: {
post: {data: {id: post1.id.to_s, type: "posts"}}
post: {data: {id: post1.id.to_s, type: "post"}}
}
}
]
@@ -1,4 +1,4 @@
class Api::CommentSerializer < ActiveModel::Serializer
attribute :body
belongs_to :post
belongs_to :post, serializer: Api::PostSerializer
end
@@ -1,5 +1,5 @@
class Api::PostSerializer < ActiveModel::Serializer
attribute :title
attribute :body
has_many :comments
has_many :comments, serializer: Api::CommentSerializer
end
@@ -17,8 +17,8 @@ ActiveSupport.to_time_preserves_timezone = true
# Require `belongs_to` associations by default. Previous versions had false.
Rails.application.config.active_record.belongs_to_required_by_default = true
# Do not halt callback chains when a callback returns false. Previous versions had true.
ActiveSupport.halt_callback_chains_on_return_false = false
## Do not halt callback chains when a callback returns false. Previous versions had true.
#ActiveSupport.halt_callback_chains_on_return_false = false
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
Rails.application.config.ssl_options = { hsts: { subdomains: true } }