Commit Graph

6 Commits

Author SHA1 Message Date
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javi Martín
eb7a052207 Simplify tests using delayed_job
Among other advantages, now we can run these tests with
`rspec --tag delayed_jobs`.
2019-09-23 13:47:45 +02:00
taitus
91ba5ff879 Fix flakys specs 2019-06-27 09:21:18 +02:00
taitus
d2506358ef Fix found Hound violations 2019-06-27 09:21:18 +02:00
taitus
4272b60339 Create Remote Translations Caller
This module is used in a callback model and in charge of
  - extracting resources associated from RemoteTranslation and preparing
    its fields to be sent to the MicrosoftTranslateClient thought DelayedJobs
  - receive the response from MicrosoftTranslateClient and update resource
    with his translates

Co-authored-by: javierm <elretirao@gmail.com>
2019-06-27 09:21:18 +02:00
taitus
04810f5080 Create RemoteTranslation model
- Each RemoteTranslation is associated with a resource (through polymorphic)
  and has the locale to we want translate.
- After create a RemoteTranslation we create a enqueue_remote_translation
  method that will be send remote translation instance to remote translation
  client
2019-06-27 09:20:25 +02:00