Javi Martín
6fd9a286d7
Don't access the database in after_initialize
...
Rails 5.2 crashes in the `db:create` task because it tries to run the
`after_initialize` block before the database is created.
The easiest way to solve it is to move the code out of the initializer
and calculate the API type definitions on demand. Note results are still
cached using a class instance variable (not to be confused with a class
variable), and so once definitions are obtained, they will remain
constant until the application is restarted, even in the development
environment.
2020-07-08 18:34:58 +02:00
Javi Martín
ffc50246c2
Apply explict RSpec/DescribedClass rubocop rule
...
We settled on using this style in commit 4cbe81a1 , but didn't add the
rule enforcing this style and we didn't apply it to existing code.
2019-09-23 16:51:00 +02:00
Javi Martín
f9ed186909
Add rubocop spacing rules
...
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Julian Herrero
31ac8b7f55
Change single quotes to double quotes
2019-02-15 11:40:39 +01:00
Bertocq
265d4d0967
Enables RSpec/DescribedClass cop & fixes all issues
...
Autocorrection for existing issues, and stashing at .rubocop_todo.yml
the false positives
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
2018-01-07 00:38:19 +01:00
Bertocq
c9bc028524
Remove all unnecesary extra spacing and Layout/ExtraSpacing list from rubocop file
2017-06-28 14:12:51 +02:00
Alberto Miedes Garcés
c52602e04b
Simplify the way ApiTypesCreator is used
2017-01-27 13:13:19 +01:00
Alberto Miedes Garcés
620c83fb69
Simplify the way QueryTypeCreator is used
2017-01-27 12:54:33 +01:00
Alberto Miedes Garcés
d1f14ffb93
Simplify the way GraphQL 'resolve' is used
2017-01-12 19:51:58 +01:00
Alberto Miedes Garcés
60786f17c2
Improved code coverage for GraphQL resolvers specs
2017-01-09 10:14:31 +01:00
Alberto Miedes Garcés
e1b3d468e5
Fix failing spec
2017-01-08 14:27:20 +01:00
Alberto Miedes Garcés
398bc8c211
Split api types creation and query type creation between two different classes
2017-01-08 13:39:50 +01:00
Alberto Miedes Garcés
b9d2bc2801
Wrote specs for QueryType creation
2017-01-08 12:45:48 +01:00
Alberto Miedes Garcés
7027164867
Clean code
2017-01-08 11:37:56 +01:00
Alberto Miedes Garcés
ed6ba384dd
Wrote specs for GraphQL root resolvers
2017-01-08 11:37:15 +01:00