injinia
  • Blog
  • services
  • contact
  • links

Getting started with ruby web automation - Part 2

9/6/2016

0 Comments

 
IDE vs. Editor vs. ...
I've played with a lot of different IDEs and editors for ruby and have settled on one for use when I'm on my desktop, and one for use while I'm on my phone or tablet (yes, there are sometimes when I have an idea or 'fix' that needs to be in and I'm not at my computer). After playing with IDEs like Aptana, eclipse, RubyMine, Geany, and some crazy mash ups called CubicTest and Bromine, I found that they all had some benefits (built in debugging, package management, snippets), but mostly had quirks and drawbacks (price, keyboard shortcuts, configurations) that didn't fit with how I wanted to work. Mainly I want something fast, clean, easy to configure to do exactly what I want, and portability to move with me from system to system (some clients won't allow me to bring my own system).
There are numerous editors out there that support ruby, and I have tried many of these as well. Notepad++ was my go to choice for a while, then TextPad. I really like all of the plug-ins and options for both of these, and used TextPad for most of my project work for a long time particularly due to the great regex support in search and replace within files and folders. For 3 years or so now I've switched to Sublime Text as it combined what I liked about Notepad++ and TextPad, and it has a 'multiple selection mode' that allows some really fast and efficient editing.

Note, I also use Atom and Brackets for a few things, but use them straight out of the box. Sublime does all I need it to do, I just like the visual cue sometimes to show the difference of the file or project I'm working with. For example I tend to use Brackets to view customer or sample XML/YAML/JSON so that I visually see the separation from the files I am working on in a project in Sublime.

Sublime Text
First of all, although Sublime has a great free to try usage license, if you like it, buy it! 

Packages
Make sure to install the package control system, it allows easy installation of packages that you may need. Here are the packages that I have installed (you can install all of these by searching for the package name in package control Ctrl+Shift+P then Package install):
  • Alignment
  • All Autocomplete
  • Case Conversion
  • Clipboard Manager
  • Cucumber
  • Cucumber Step Finder
  • EditorConfig
  • Gherkin (Cucumber) Formatter
  • GitGutter
  • HackerTyper
  • Indent XML
  • Insert Nums
  • Monokai JSON+
  • Review Myself
  • RSpec (snippets and syntax)
  • RuboCop
  • Ruby Slim
  • Select By Regex
  • SideBarEnhancements
  • SublimeGit
  • SublimeLinter
  • SublimeLinter-Ruby
  • SublimeLinter-rubocop
  • Theme - Soda
  • TodoReview
  • xml2json

Yes, quite a list, I may post a bit of info for how I use each, 

Settings
Here is the settings that I have in Settings > Settings - User:

    
Ruby-specific word selection behavior.
When you double-click a word, or use any other word-related text selection commands, Sublime tries to be smart about where words begin and end. By default, it assumes punctuation is not part of the word. Punctuation can be part of method names in ruby, so to tell Sublime to include those trailing ? and ! characters in word selections, add the following property to the ruby syntax-specific settings. Open a ruby file in the editor and navigate to Preferences > Settings > More > Syntax Specific > User.
{ "word_separators": "./\\()\"'-:,.;<>~@#$%^&*|+=[]{}`~" }
​
Key Binding

Here are the key mappings that I have in Preferences > Key Binding - User:
Code Editor

    
Quick links:
Editors
  • Sublime Text
  • Atom
  • Brackets
  • Textpad
  • Notepad++
IDEs
  • Geany
  • Aptana
  • RubyMine
​Sublime
  • package installer
  • package repository
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    Hi, my name is Clancey and I am a quality advocate, automator, and toolsmith.

    I help companies with quality. To do this I end up automating a lot of things, functional testing being one of them.

    Clancey McNeal CSTM
    Getting started with ruby automation series
    1. Required Installs
    2. Tools
    3. Project Structure
    4. Page Objects

    Archives

    June 2021
    March 2020
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    February 2014
    December 2013

    Categories

    All
    Cucumber
    Getting Started
    Page Objects
    Rspec
    Ruby
    Setup
    Slack
    Sublime
    Tools
    Web Test Automation

    RSS Feed

Copyright injinia, images copyright Adachi Photography