App Review: Snippets
Snippets
Snippets is an awesome tool that I’ve been using recently to help me keep track of what I’m learning.
Snippets provides an easy to use interface for storing and reviewing bits and pieces of code that you find useful. The GUI is very simple and easy to learn.
Most recently, I’ve been using snippets to store the necessary code needed to start writing a Sinatra application. As you can see below, I have created a group called Sinatra. Within the group, I have several files, each containing the necessary snippets in order to start deploying a functional Sinatra web application, fully equipped with RSpec and Capybara test functionality.
I’m very excited to see what the future holds for Snippets, as it has become an invaluable tool for myself. A few things that I would love to see in future releases are: 1. Some sort of view to see popular snippets per language - And the ability to favorite/add those snippets to your account. 2. Exporting/importing groups of snippets - for sharing purposes. 3. Improved functionality on the Snippets Assistant.
Go ahead and download it to see if you like it. It’s currently available for both Mac and Windows.
Also, go ahead and follow them on twitter at @snippetsme
If you’re interested in my Sinatra snippets, here they are:
Config.ru
1 require './app'
2
3 run App
app.rb
1 require 'sinatra/base'
2
3 class App < Sinatra::Application
Spec_Helper
1 ENV['RACK_ENV'] = 'test'
Within your spec file
1 require 'spec_helper'
2 require 'capybara/rspec'
3 require_relative '../myapp'
4 Capybara.app = App
Gems in Gemfile
1 group :development do
2 gem 'rspec', '~> 2.14.1'
3 gem 'capybara', '~> 2.2.1'
4 gem 'launchy', '~> 2.4.2'
5 end
6 gem 'sinatra', '~> 1.4.4'
blog comments powered by Disqus