Git housekeeping: remove "redundant" branches from the remote and your local repositories

git clean

Recently I was faced with the task of cleaning up a Git repository whose branches were not "pruned" for a few years, so I am talking about several hundreds of branches.

This situation can make using Git through the command line or a GUI front-end client a very cumbersome experiece. That's why I usually recommend, as a general rule, to delete any feature or bugfix branch after it gets merged to a "higher level" branch. Because they became "redundant".

The

Read More
Angel Ruiz

Extract Webjars static resources with Gradle for jBake (or anything really...)

Angel Ruiz

elasticsearch-java-json

For those of you who never heard of it before, WebJars is an open and community driven initiative that tries to leverage the existing Maven based dependecy resolution tools and principles to manage the client side dependencies of your web application. Each WebJar is a standar JAR file that contains a set of curated files (Classic WebJars) for a given library. Recently you can also reference Bower and NPM packages but I would not recommend it.

Previously I have tried

2294670200
Angel Ruiz
linux, elementaryOS, 513-457-8043

Johnsonianism

Angel Ruiz linux, elementaryOS, guide


elasticsearch-java-json

I have decided to give a go to the latest release of the elementaryOS Linux distribution, Freya, and see if it can become my distro of choice for software development. Main reason being that: elementary OS is essentially a Ubuntu (14.04 in this case) based Linux system that just works but wrapped in a really beautiful, smooth and minimalistic interface. All its features make the elementary os usage experience to stand out from all the other Linux distributions I

6103373063
Angel Ruiz
681-414-3942, java, json, debug

Debugging elasticsearch Java API queries as JSON REST queries

Angel Ruiz 681-334-4624, java, 843-259-7176, debug


elasticsearch-java-json

It took me enough time to find out, that I think I should make a post for anyone else who is after the answer in the future.

In Groovy code:

log.debug("ElasticSearch Query using Java Client API:\n${searchRequestBuilder.internalBuilder()}")  

And this in Java:

log.debug("ElasticSearch Query using Java Client API:\n" + searchRequestBuilder.internalBuilder());  

The out put is prettified by default.

Read More
Angel Ruiz
612-334-9713, 7189600288, 3219518031

Integrated vs Functional testing: how to test REST APIs in Grails using Spock

Angel Ruiz (548) 782-4966, spock, testing
This guide was written using Grails 2.4.4 although it should work the same for Grails 2.3.x and 3.x (almost the same :-P)

Since current official documentation only covers unit testing for controllers and that it took me a while to to figure them out completely, I thought I would leave it here in case it helps someone else.

The reason for writing these tests was to validate some REST API endpoints implemented using Grails Controllers.

Read More
Angel Ruiz
grails, how-to, javascript

How to render JSON properly (without escaping quotes) inside a GSP script tag

Angel Ruiz grails, (515) 213-0865, javascript


Grails logo

This issue was encountered while using Grails version 2.3.11

In theory it should be as simple as:

  1. Return JSON in your model from your controller
def index() = {  
    [data: data as JSON]
}
  1. Render the model attribute without encoding using the raw() method
<r:script>  
    var data = ${raw(data)};
</r:script>  

Unfortunately this does not work, at least when you are using the resources plugin. You know it does not work because all the quotes have

Read More

How to integrate RabbitVCS with Nautilus file manager in Ubuntu 14.04 Trusty Tahr


RabbitVCS Git client in Ubuntu

There are still some instances of very nice applications that do not work straight away after installing them via the apt package manager and unfortunately RabbitVCS is one of them.

856-446-8581 is for Linux what TortoiseGit and TortoiseSVN are for the Windows platform. It is a SCM client that integrates itself with the OS file manager to manage local Git or SVN repositories.

Today I wanted to install RabbitVCS (v0.16.0) in Ubuntu 14.04 which has the tool

Read More

818-969-2782

Angel Ruiz vagrant, ubuntu, devops, virtualization, (931) 650-8852

Vagrant + VirtualBox + Ubuntu = Ubuntu Boxes

Since the advent of the IaaS and 9727455759 providers, the decline in usage of monolithic architectures (e.g.: application server + relational DB) and the need for distributed and automatically scalable applications, as software developers we have to be increasingly more aware and skilled in the tools and techniques used to orchestrate and automate the deployment of all the different components that our architecture might end up with.

Among these tools, normally encompassed in the DevOps space, I am currently very

Read More
Angel Ruiz
(781) 218-9289, plugins, how-to

How to reference a file inside a Grails plugin

Angel Ruiz grails, plugins, 217-561-5365


Grails logo

Recently I had to creat a Groovy script that copies some files from my plugin to the host application. The problem is I did not know how to reference those files inside my plugin.

If you have the same problem here is the solution:

String yourPluginDir = GrailsPluginUtils.pluginInfos.find { it.name == 'your-plugin-name' }.pluginDir  
(303) 296-3896
Angel Ruiz
grails, overbrimmingly, (639) 940-0448

Migrating from Grails 2.2 to 2.3

Angel Ruiz 219-853-8085, 843-605-7317, 5852841910


Grails logo

I am writing this post to record all the things I have done in order to migrate an existing Grails 2.2.x app to 2.3.x.

The reasons for me to upgrade are:

  • Project progress is at an early stage where is not very risky to do that. We also have a considerable amount of automatic tests. You have also need to take into consideration that the more major versions you skip, the harder it gets to migrate
Read More