diff --git a/en/chapter00-before.adoc b/en/chapter00-before.adoc index 3b17120..ac004a7 100644 --- a/en/chapter00-before.adoc +++ b/en/chapter00-before.adoc @@ -11,13 +11,13 @@ Since the original work was not maintained, I wanted to update this excellent wo https://twitter.com/kurenn[Abraham Kuri] is a Rails developer with 5 years of experience (probably more now). His experience includes working as a freelancer in software product development and more recently in collaboration within the open source community. A graduate in computer science from ITESM, he founded two companies in Mexico (http://icalialabs.com/[Icalia Labs] and http://codeandomexico.org/[Codeando Mexico]). -On my side, my name is http://rousseau-alexandre.fr[Alexandre Rousseau] and I am a Rails developer with more than 4 years of experience (at the time of writing). I am currently a partner in a company (https://isignif.fr[iSignif]) where I build and maintain a SAAS product using Rails. I also contribute to the Ruby community by producing and maintain some gems that you can consult onhttps://rubygems.org/profiles/madeindjs[my Rubygems.org profile]. Most of my projects are on Github so don’t http://github.com/madeindjs/[hesitate to follow me]. +On my side, my name is http://rousseau-alexandre.fr[Alexandre Rousseau] and I am a Rails developer with more than 4 years of experience (at the time of writing). I am currently a partner in a company (https://isignif.fr[iSignif]) where I build and maintain a SAAS product using Rails. I also contribute to the Ruby community by producing and maintain some gems that you can consult onhttps://rubygems.org/profiles/madeindjs[my Rubygems.org profile]. Most of my projects are on GitHub so don’t http://github.com/madeindjs/[hesitate to follow me]. -All the source code of this book is available in https://asciidoctor.org/[Asciidoctor] format on https://github.com/madeindjs/api_on_rails[Github]. So don’t hesitate to https://github.com/madeindjs/api_on_rails/fork[forke] the project if you want to improve it or fix a mistake that I didn’t notice. +All the source code of this book is available in https://asciidoctor.org/[Asciidoctor] format on https://github.com/madeindjs/api_on_rails[GitHub]. So don’t hesitate to https://github.com/madeindjs/api_on_rails/fork[forke] the project if you want to improve it or fix a mistake that I didn’t notice. == Copyright and license -This book is provided on http://opensource.org/licenses/MIT[MIT license]. All the book’s source code is available on https://fr.wikipedia.org/wiki/Markdown[Markdown] format on https://github.com/madeindjs/api_on_rails[Github] +This book is provided on http://opensource.org/licenses/MIT[MIT license]. All the book’s source code is available on https://fr.wikipedia.org/wiki/Markdown[Markdown] format on https://github.com/madeindjs/api_on_rails[GitHub] .MIT license **** diff --git a/en/chapter01-introduction.adoc b/en/chapter01-introduction.adoc index e695688..546d5d1 100644 --- a/en/chapter01-introduction.adoc +++ b/en/chapter01-introduction.adoc @@ -52,7 +52,7 @@ One of the most painful parts for almost every developer is setting everything u There are many cases in which development environments may differ from computer to computer. That is not the case with text editors or IDE’s. I think for Rails development an IDE is way to much, but some other might find that the best way to go, so if that it’s your case I recommend you go with http://www.aptana.com/products/radrails[RadRails] or http://www.jetbrains.com/ruby/index.html[RubyMine], both are well supported and comes with many integrations out of the box. -* *Text editor*: I personally use http://www.vim.org/[vim] as my default editor with https://github.com/carlhuda/janus[janus] which will add and handle many of the plugins you are probably going to use. In case you are not a _vim_ fan like me, there are a lot of other solutions such as http://www.sublimetext.com/[Sublime Text] which is a cross-platform easy to learn and customize (this is probably your best option), it is highly inspired by http://macromates.com/[TextMate] (only available for Mac OS). A third option is to use a more recent text editor from the guys at http://gitub.com[Github] called https://atom.io/[Atom], it’s a promising text editor made with Javascript, it is easy to extend and customize to meet your needs, give it a try. Any of the editors I present will do the job, so I’ll let you decide which one fits your eye. +* *Text editor*: I personally use http://www.vim.org/[vim] as my default editor with https://github.com/carlhuda/janus[janus] which will add and handle many of the plugins you are probably going to use. In case you are not a _vim_ fan like me, there are a lot of other solutions such as http://www.sublimetext.com/[Sublime Text] which is a cross-platform easy to learn and customize (this is probably your best option), it is highly inspired by http://macromates.com/[TextMate] (only available for Mac OS). A third option is to use a more recent text editor from the guys at http://gitub.com[GitHub] called https://atom.io/[Atom], it’s a promising text editor made with JavaScript, it is easy to extend and customize to meet your needs, give it a try. Any of the editors I present will do the job, so I’ll let you decide which one fits your eye. * *Terminal*: If you decided to go with http://icalialabs.github.io/kaishi/[kaishi] for setting the environment you will notice that it sets the default shell to `zsh`, which I highly recommend. For the terminal, I’m not a fan of the _Terminal_ app that comes out of the box if you are on Mac OS, so check out http://www.iterm2.com/#/section/home[iTerm2], which is a terminal replacement for Mac OS. If you are on Linux you probable have a nice terminal already, but the default should work just fine. === Browsers @@ -301,7 +301,7 @@ After the command finish its execution, it is time to start tracking the project == Versioning -Remember that Git helps you track and maintain history of your code. Keep in mind source code of the application is published on Github. You can follow the repository at https://github.com/madeindjs/api_on_rails[Github]. I’ll assume you have Git already configured and ready to use to start tracking the project. If that is not your case, follow these first-time setup steps: +Remember that Git helps you track and maintain history of your code. Keep in mind source code of the application is published on GitHub. You can follow the repository at https://github.com/madeindjs/api_on_rails[GitHub]. I’ll assume you have Git already configured and ready to use to start tracking the project. If that is not your case, follow these first-time setup steps: [source,bash] ---- @@ -360,7 +360,7 @@ $ git commit -m "Initial commit" TIP: I have encounter that commiting with a message starting with a present tense verb, describes what the commit does and not what it did, this way when you are exploring the history of the project it is more natural to read and understand(or at least for me). I’ll follow this practice until the end of the tutorial. -Lastly and as an optional step we setup the Github (I’m not going through that in here) project and push our code to the remote server: We first add the remote: +Lastly and as an optional step we setup the GitHub (I’m not going through that in here) project and push our code to the remote server: We first add the remote: [source,bash] ---- diff --git a/en/chapter02-api.adoc b/en/chapter02-api.adoc index 6322cf1..afee255 100644 --- a/en/chapter02-api.adoc +++ b/en/chapter02-api.adoc @@ -30,7 +30,7 @@ By this point you must be asking yourself, all right but I need to explore or vi An API is defined by http://en.wikipedia.org/wiki/Application_programming_interface[wikipedia] as _an application programming interface (API) specifies how some software components should interact with each other._ In other words the way systems interact with each other through a common interface, in our case a web service built with JSON. There are other kinds of communication protocols like SOAP, but we are not covering that in here. -JSON as the Internet media type is highly accepted because of readability, extensibility and easy to implement in fact many of the current frameworks consume JSON api’s by default, in Javascript there is https://angularjs.org/[Angular] or http://emberjs.com/[EmberJS], but there are great libraries for objective-c too like https://github.com/AFNetworking/AFNetworking[AFNetworking] or http://restkit.org/[RESTKit]. There are probably good solutions for Android, but because of my lack of experience on that development platform I might not be the right person to recommend you something. +JSON as the Internet media type is highly accepted because of readability, extensibility and easy to implement in fact many of the current frameworks consume JSON api’s by default, in JavaScript there is https://angularjs.org/[Angular] or http://emberjs.com/[EmberJS], but there are great libraries for objective-c too like https://github.com/AFNetworking/AFNetworking[AFNetworking] or http://restkit.org/[RESTKit]. There are probably good solutions for Android, but because of my lack of experience on that development platform I might not be the right person to recommend you something. All right, so we are building our API with JSON, but there are many ways to achieve this, the first thing that could come to your mind would be just to start dropping some routes defining the http://en.wikipedia.org/wiki/Web_Services_Description_Language#Objects_in_WSDL_1.1_.2F_WSDL_2.0[end points] but they may not have a http://www.w3.org/2005/Incubator/wcl/matching.html[URI pattern] clear enough to know which resource is being exposed. The protocol or structure I’m talking about is http://en.wikipedia.org/wiki/Representational_state_transfer[REST] which stands for Representational State Transfer and by wikipedia definition @@ -57,7 +57,7 @@ This might not be clear enough or may look like a lot of information to digest b === Routes, Constraints and Namespaces -Before start typing any code, we prepare the code with git, the workflow we’ll be using a branch per chapter, upload it to Github and then merge it with master, so let’s get started open the terminal, `cd` to the `market_place_api` directory and type in the following: +Before start typing any code, we prepare the code with git, the workflow we’ll be using a branch per chapter, upload it to GitHub and then merge it with master, so let’s get started open the terminal, `cd` to the `market_place_api` directory and type in the following: [source,bash] ---- diff --git a/en/chapter04-refactoring-tests.adoc b/en/chapter04-refactoring-tests.adoc index 7a311e4..6d5fe62 100644 --- a/en/chapter04-refactoring-tests.adoc +++ b/en/chapter04-refactoring-tests.adoc @@ -350,7 +350,7 @@ Well now I do feel satisfied with the code, let’s commit the changes: $ git commit -am "Refactors test headers for each request" ---- -Remember you can review the code up to this point at the https://github.com/madeindjs/api_on_rails[Github repository]. +Remember you can review the code up to this point at the https://github.com/madeindjs/api_on_rails[GitHub repository]. == Conclusion diff --git a/en/chapter07-improve-json.adoc b/en/chapter07-improve-json.adoc index c8e8381..e4c95db 100644 --- a/en/chapter07-improve-json.adoc +++ b/en/chapter07-improve-json.adoc @@ -40,7 +40,7 @@ This is further explained in the http://jsonapi.org/format/#document-structure-r I highly recommend you go and bookmark this reference. It is amazing and will cover some points I might not. -In this chapter we will customize the JSON output using the `active_model_serializers` gem, for more information you can review the https://github.com/rails-api/active_model_serializers[repository] on Github. I’ll cover some points in here from installation to implementation but I do recommend you check the gem docs on your free time. +In this chapter we will customize the JSON output using the `active_model_serializers` gem, for more information you can review the https://github.com/rails-api/active_model_serializers[repository] on GitHub. I’ll cover some points in here from installation to implementation but I do recommend you check the gem docs on your free time. You can clone the project up to this point with: diff --git a/fr/chapter00-before.adoc b/fr/chapter00-before.adoc index 8a2bb47..6de9c89 100644 --- a/fr/chapter00-before.adoc +++ b/fr/chapter00-before.adoc @@ -9,13 +9,13 @@ L’œuvre originale étant non maintenue, j’ai voulu mettre à jour cet excel https://twitter.com/kurenn[Abraham Kuri] est un développeur Rails avec 5 ans d’expérience (sûrement plus maintenant). Son expérience inclut le travail en tant que _freelance_ dans la construction de produits logiciels et plus récemment dans la collaboration au sein de la communauté open source. Diplômé en informatique d’ITESM, il a fondé deux sociétés au Mexique (http://icalialabs.com/[Icalia Labs] et http://codeandomexico.org/[Codeando Mexico]). -De mon côté, je m’appelle http://rousseau-alexandre.fr[Alexandre Rousseau] et je suis un développeur Rails avec plus de 4 ans d’expérience (à l’heure où j’écris ces lignes). Je suis actuellement associé dans une entreprise (https://isignif.fr[iSignif]) ou je construis et maintiens un produit de type SAAS en utilisant Rails. Je contribue aussi à la communauté Ruby en produisant et maintenant quelques gemmes que vous pouvez consulter sur https://rubygems.org/profiles/madeindjs[mon profil Rubygems.org]. La plupart de mes projets sont sur Github donc http://github.com/madeindjs/[n’hésitez pas à me suivre]. +De mon côté, je m’appelle http://rousseau-alexandre.fr[Alexandre Rousseau] et je suis un développeur Rails avec plus de 4 ans d’expérience (à l’heure où j’écris ces lignes). Je suis actuellement associé dans une entreprise (https://isignif.fr[iSignif]) ou je construis et maintiens un produit de type SAAS en utilisant Rails. Je contribue aussi à la communauté Ruby en produisant et maintenant quelques gemmes que vous pouvez consulter sur https://rubygems.org/profiles/madeindjs[mon profil Rubygems.org]. La plupart de mes projets sont sur GitHub donc http://github.com/madeindjs/[n’hésitez pas à me suivre]. -Tout le code source de ce livre est disponible au format https://asciidoctor.org[Asciidoctor] sur https://github.com/madeindjs/api_on_rails[Github]. Ainsi n’hésitez pas à https://github.com/madeindjs/api_on_rails/fork[forker] le projet si vous voulez l’améliorer ou corriger une faute qui m’aurait échappée. +Tout le code source de ce livre est disponible au format https://asciidoctor.org[Asciidoctor] sur https://github.com/madeindjs/api_on_rails[GitHub]. Ainsi n’hésitez pas à https://github.com/madeindjs/api_on_rails/fork[forker] le projet si vous voulez l’améliorer ou corriger une faute qui m’aurait échappée. == Droits d’auteur et licence -Cette traduction est disponible sous http://opensource.org/licenses/MIT[licence MIT]. Tout le code source de ce livre est disponible au format https://asciidoctor.org[Asciidoctor] sur https://github.com/madeindjs/api_on_rails[Github] +Cette traduction est disponible sous http://opensource.org/licenses/MIT[licence MIT]. Tout le code source de ce livre est disponible au format https://asciidoctor.org[Asciidoctor] sur https://github.com/madeindjs/api_on_rails[GitHub] .licence MIT **** diff --git a/fr/chapter01-introduction.adoc b/fr/chapter01-introduction.adoc index 8fd32c0..de3901a 100644 --- a/fr/chapter01-introduction.adoc +++ b/fr/chapter01-introduction.adoc @@ -1,7 +1,7 @@ [#chapter01-introduction] = Introduction -Bienvenue sur API on Rails 5, un tutoriel sous stéroïdes pour apprendre la meilleure façon de construire votre prochaine API avec Rails. Le but de ce livre est de vous fournir une méthodologie complète pour développer une API RESTful en suivant les meilleures pratiques existantes. Lorsque vous en aurez fini avec ce livre, vous serez en mesure de créer votre propre API et de l’intégrer à n’importe quel client comme un navigateur Web ou votre une application mobile. Le code généré est construit avec Ruby on Rails 5.2 qui est la version actuelle footnote:[pour plus d’informations à ce sujet, consultez http://rubyonrails.org/[rubyonrails.org]]. La version la plus récente de APIs on Rails 5 se trouve sur https://github.com/madeindjs/api_on_rails/[Github]. N'oubliez pas de mettre à jour votre version hors ligne si c’est le cas. +Bienvenue sur API on Rails 5, un tutoriel sous stéroïdes pour apprendre la meilleure façon de construire votre prochaine API avec Rails. Le but de ce livre est de vous fournir une méthodologie complète pour développer une API RESTful en suivant les meilleures pratiques existantes. Lorsque vous en aurez fini avec ce livre, vous serez en mesure de créer votre propre API et de l’intégrer à n’importe quel client comme un navigateur Web ou votre une application mobile. Le code généré est construit avec Ruby on Rails 5.2 qui est la version actuelle footnote:[pour plus d’informations à ce sujet, consultez http://rubyonrails.org/[rubyonrails.org]]. La version la plus récente de APIs on Rails 5 se trouve sur https://github.com/madeindjs/api_on_rails/[GitHub]. N'oubliez pas de mettre à jour votre version hors ligne si c’est le cas. L’intention de ce livre n’est pas seulement de vous apprendre à construire une API avec Rails mais plutôt de vous apprendre comment construire une API évolutive et maintenable avec Rails. C’est-à-dire améliorer vos connaissances actuelles avec Rails. Dans ce voyage, vous allez apprendrez à: @@ -48,7 +48,7 @@ Pour presque tous les développeurs, l’une des parties les plus douloureuses e Les environnements de développement diffèrent d’un ordinateur à l’autre. Ce n’est pas le cas avec les éditeurs de texte. Je pense que pour le développement avec Rails, un IDE est beaucoup trop lourd. Cependant certains pensent que c’est la meilleure façon de travailler. Si c’est votre cas, je vous recommande d’essayer http://www.aptana.com/products/radrails[RadRails] ou http://www.jetbrains.com/ruby/index.html[RubyMine]. Tous deux sont bien maintenus et possèdent de nombreuses intégrations par défaut. Maintenant, pour ceux qui, comme moi, préfèrent des outils simples, je peux vous dire qu’il existe beaucoup d’outils disponibles que vous pourrez personnaliser via des plugins et plus. -* *Éditeur de texte*: J’utilise personnellement http://www.vim.org/[Vim] comme éditeur. Au cas où vous n’êtes pas un fan de Vim, il y a beaucoup d’autres solutions comme http://www.sublimetext.com/[Sublime Text] qui est facile à prendre en main et surtout multi-plateforme . Il est fortement inspiré par http://macromates.com/[TextMate]. Une troisième option est d’utiliser un éditeur de texte plus récent comme https://atom.io/[Atom] de http://gitub.com/[Github]. C’est un éditeur de texte prometteur fait en JavaScript. Il est facile à personnaliser pour répondre à vos besoins. N’importe lequel des éditeurs que je viens de vous présenter fera le travail. Choisissez donc celui où vous êtes le plus à l’aise. +* *Éditeur de texte*: J’utilise personnellement http://www.vim.org/[Vim] comme éditeur. Au cas où vous n’êtes pas un fan de Vim, il y a beaucoup d’autres solutions comme http://www.sublimetext.com/[Sublime Text] qui est facile à prendre en main et surtout multi-plateforme . Il est fortement inspiré par http://macromates.com/[TextMate]. Une troisième option est d’utiliser un éditeur de texte plus récent comme https://atom.io/[Atom] de http://gitub.com/[GitHub]. C’est un éditeur de texte prometteur fait en JavaScript. Il est facile à personnaliser pour répondre à vos besoins. N’importe lequel des éditeurs que je viens de vous présenter fera le travail. Choisissez donc celui où vous êtes le plus à l’aise. * *Terminal*: Je ne suis pas un fan de l’application Terminal par défaut sous Mac OS. Je recommande http://www.iterm2.com/#/section/home[iTerm2], qui est un remplacement de terminal pour Mac OS. Si vous êtes sous Linux, vous avez probablement déjà un bon terminal. === Navigateur web @@ -289,7 +289,7 @@ Une fois que la commande a terminé son exécution, il est temps de commencer à == Contrôle de version -Rappelez-vous que Git vous aide à suivre et à maintenir l’historique de votre code. Gardez à l’esprit que le code source de l’application est publié sur Github. Vous pouvez suivre le projet sur https://github.com/madeindjs/api_on_rails[Github] +Rappelez-vous que Git vous aide à suivre et à maintenir l’historique de votre code. Gardez à l’esprit que le code source de l’application est publié sur GitHub. Vous pouvez suivre le projet sur https://github.com/madeindjs/api_on_rails[GitHub] À ce stade, je suppose que vous avez déjà configuré Git et que vous êtes prêt à l’utiliser pour suivre le projet. Si ce n’est pas votre cas, initialisez simplement les paramètres basiques suivants: @@ -349,7 +349,7 @@ $ git commit -m "Initial commit" TIP: J’ai appris que commencer un message par un verbe au présent décrit ce que fait le commit et non ce qu’il a fait. De cette façon il est plus facile de lire et de comprendre l’historique du projet (ou du moins pour moi). Je vais suivre cette pratique jusqu’à la fin du tutoriel. -Enfin, et c’est une étape optionnelle, nous déployons le projet sur *Github* (je ne vais pas l’expliquer ici) et poussons notre code vers le serveur distant. On commence donc par ajouter un serveur distant: +Enfin, et c’est une étape optionnelle, nous déployons le projet sur *GitHub* (je ne vais pas l’expliquer ici) et poussons notre code vers le serveur distant. On commence donc par ajouter un serveur distant: [source,bash] ---- diff --git a/fr/chapter02-api.adoc b/fr/chapter02-api.adoc index 699b645..acdce29 100644 --- a/fr/chapter02-api.adoc +++ b/fr/chapter02-api.adoc @@ -68,7 +68,7 @@ Cela peut sembler compliqué mais au fur et à mesure que nous avancerons dans l Avant de commencer à taper du code, nous allons préparer le répertoire Git. Le _workflow_ que nous allons suivre est le suivant: * Nous allons créer une branche par chapitre -* Une fois terminé, nous pousserons la branche sur Github +* Une fois terminé, nous pousserons la branche sur GitHub * Nous la fusionnerons avec master Commençons donc par ouvrir le terminal dans le répertoire `market_place_api` et tapez la commande suivante pour créer la branche: diff --git a/fr/chapter03-presenting-users.adoc b/fr/chapter03-presenting-users.adoc index e2be5af..dd91aca 100644 --- a/fr/chapter03-presenting-users.adoc +++ b/fr/chapter03-presenting-users.adoc @@ -27,7 +27,7 @@ Devise est livré avec jusqu’à dix modules pour la gestion de l’authentific * Validatable * Lockable -Si vous n’avez jamais travaillé avec le devise auparavant, je vous recommande de visiter https://github.com/plataformatec/devise[le répertoire Github] et de lire la documentation. Vous y trouverez beaucoup de bons exemples. +Si vous n’avez jamais travaillé avec le devise auparavant, je vous recommande de visiter https://github.com/plataformatec/devise[le répertoire GitHub] et de lire la documentation. Vous y trouverez beaucoup de bons exemples. **** Ce chapitre sera complet. Il sera peut-être long mais je vais essayer d’aborder autant de sujets que possible. N’hésitez pas à vous prendre un café et allons-y. A la fin de ce chapitre, vous aurez construit toute la logique des utilisateurs ainsi que la validation et la gestion des erreurs. diff --git a/fr/chapter04-refactoring-tests.adoc b/fr/chapter04-refactoring-tests.adoc index 0624738..3a6a669 100644 --- a/fr/chapter04-refactoring-tests.adoc +++ b/fr/chapter04-refactoring-tests.adoc @@ -353,7 +353,7 @@ Et bien maintenant je suis satisfait du code. _Commitons_ nos changements: $ git commit -am "Refactors test headers for each request" ---- -Rappelez-vous que vous pouvez revoir le code jusqu’à ce point dans le https://github.com/madeindjs/api_on_rails/[dépôt Github]. +Rappelez-vous que vous pouvez revoir le code jusqu’à ce point dans le https://github.com/madeindjs/api_on_rails/[dépôt GitHub]. == Conclusion diff --git a/fr/chapter07-improve-json.adoc b/fr/chapter07-improve-json.adoc index eb2e33f..caec8ff 100644 --- a/fr/chapter07-improve-json.adoc +++ b/fr/chapter07-improve-json.adoc @@ -36,7 +36,7 @@ Or nous voulons un sortie correspondante à celle-là. } ---- -Dans ce chapitre, nous allons personnaliser la sortie JSON en utilisant la gemme `active_model_serializers`. Pour plus d’informations vous pouvez consulter le https://github.com/rails-api/active_model_serializers[répertoire sur Github]. Je vais couvrir quelques points ici, de l’installation à l’implémentation, mais je vous recommande de jeter un œil à la documentation. +Dans ce chapitre, nous allons personnaliser la sortie JSON en utilisant la gemme `active_model_serializers`. Pour plus d’informations vous pouvez consulter le https://github.com/rails-api/active_model_serializers[répertoire sur GitHub]. Je vais couvrir quelques points ici, de l’installation à l’implémentation, mais je vous recommande de jeter un œil à la documentation. Vous pouvez cloner le projet jusqu’à ce point avec: