One of the most appealing features in Ember and Ember CLI is the ability to easily create functional or acceptance tests. But, the everyday interaction between UX and development, can hurt how these tests are maintained. Here, I try to describe an approach that helped us overcome this problem.
A decision was made to incorporate Rails API into Rails core 🎉 🎉 🎉. During the last week I’ve been working on this and, today we opened a pull request to discuss the results.
What is Rails API?
The original idea behind Rails API was to serve as a starting point for a version of Rails better suited for JS-heavy apps. The project consists of: Rails API per se, the Active Model Serializers project plus a bunch of ideas that haven’t been implemented yet. As of today, Rails API provides: trimmed down controllers and middleware stack together with a matching set of generators, all specifically tailored for API type applications.
For more detailed information about the Rails API project, please read my previous article on the subject.
Next steps: What we need to talk about?
We still need to discuss the “Rails way” for API applications, how API apps should be built and, what features we’d like included from our original list of ideas. In particular:
- Do we want to avoid asset generation in Rails by having a back-end and a front-end apps?
- Do we prefer to have a single application and keep asset generation in Rails instead?
- Do we like Active Model Serializers better than Jbuilder?
- If not, can we make Rails API play nicely with Jbuilder?
Join the conversation
Like every year, I’m attending RailsConf 2015 in Atlanta. This could be a great opportunity to meet and interact. So, please come find me throughout the conference or say hi if we run into each other. I’d love to talk about Rails API or any other topic. Comments, reviews, suggestions and improvements are always welcome.
First of all, I want to apologize to all for the long time it has taken me to push this humble new code.
I started to work on
ActiveModel::Serializers because I’m interested in the Rails API project in general and ActiveModel::Serializers in particular. Given that ActiveModel::Serializers has few contributors, I thought it could be a good opportunity to understand the code and help the community around the project.
I’m leaving here a curated compilation of interesting links where you will find information that is not very well known. There are pull requests, issues, commits, examples, posts, videos and more about Rails 4.
I’ll be talking at RubyConf Argentina, and the first thing I usually do when preparing talks is to think in a high level and then start going down form there. I find MindNode a great tool for that. So I started checking what was being added, removed and deprecated in Rails 4 (my memory isn’t good enough to have all that in the top of my head :P). The result is this MindNode I’m sharing with you …
Refinements arrived to Ruby trunk here. The purpose of Refinements is to make monkey patching safer, extending core classes but limiting its effects to a particular area of code.
rails-api is a plugin developed by Yehuda Katz, José Valim, Carlos Antonio da Silva and me (Santiago Pastorino) which modifies Rails applications trimming down usually unneeded Rails functionalities for API applications. Do you remember we added support for this on core and it was reverted?. This plugin enables that again.
In this opportunity I’ll explain (as the title suggests) how to go from a brand new mac os x to running Rails tests.
TL;DR: don’t run bundle exec before rails command, rails already checks the presence of Bundler through the Gemfile and sets up everything according to it without the overhead of bundle exec. rails command is the only exception to the rule. Additionally I’ve added a patch to Bundler that avoids calling Bundler.setup which adds unnecessary overhead.