Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed up some organization; updated readme; made sure project.rb is…

… required first
  • Loading branch information...
commit da14fbd8125ac460dd3a815782d9303c1e3c7078 1 parent a1faa48
@gnarmis authored
View
5 Gemfile
@@ -1,12 +1,15 @@
source :rubygems
gem 'rack'
+gem 'rack'
gem 'sinatra'
-gem 'grape'
+gem 'data_mapper', '1.2.0'
+#gem 'dm-sqlite-adaptor', '1.2.0'
group :development do
gem 'pry'
gem 'logger'
+ gem 'shotgun'
end
group :test do
View
20 README.md
@@ -1,18 +1,10 @@
# Rocketship
-## Updates
-
-- Webrat replaced by Capybara, with example test in `foo_spec.rb`
-- YARD documentation generation Rake task added (`rake doc`).
-- VERSION constant added to Project (bump version for releases/hotfixes/features)
-
## Overview
-Ruby has some great micro-frameworks to jumpstart development of web services. But when you want to spin up a number of basic services using things like [Sinatra](https://github.com/sinatra), [Grape](https://github.com/intridea/grape), and [RestClient](https://github.com/adamwiggins/rest-client), along with testing helpers such as [RSpec](https://github.com/rspec/rspec), [Capybara](https://github.com/jnicklas/capybara), and [SimpleCov](https://github.com/colszowka/simplecov) (not to mention dependency management using [Bundler](https://github.com/bundler/bundler) and a few simple Rake tasks), there's quite a lot of complexity and boiler-plate to deal with.
-
-Want to just dive into development without browsing around for a while and setting things up? Use Rocketship.
+Ruby has some great micro-frameworks to jumpstart development of web services. But when you want to spin up a number of basic services using things like [Sinatra](https://github.com/sinatra), [RestClient](https://github.com/adamwiggins/rest-client), and testing helpers such as [RSpec](https://github.com/rspec/rspec), [Capybara](https://github.com/jnicklas/capybara), and [SimpleCov](https://github.com/colszowka/simplecov) (not to mention dependency management using [Bundler](https://github.com/bundler/bundler) and a few simple Rake tasks), there's quite a lot of complexity and boiler-plate to deal with.
-Currently, Rocketship shows you how to integrate a [Sinatra](https://github.com/sinatra) app and a [Grape](https://github.com/intridea/grape) API app together using Rack, along with basic support for development and testing.
+Want to just dive into development without browsing around for a while and setting things up? Working on multiple Sinatra apps and want a sane way to organize everything? Use Rocketship.
## Usage
@@ -24,7 +16,11 @@ Currently, Rocketship shows you how to integrate a [Sinatra](https://github.com/
- modify your app routes in `config.ru`
-- `rackup` to run your app
+- add specs in spec/
+
+- `rackup` to run your app; `rake r` to run it with auto-reloading
+
+- bump version number in lib/project.rb
You can add your own Rack-based frameworks in their own folders under `lib/`, putting your classes (which sub-class your favorite framework) under the main module (by default, it's called `Project`). Then, update `config.ru` and you're good to go!
@@ -32,6 +28,8 @@ You can add your own Rack-based frameworks in their own folders under `lib/`, pu
- run `rake` or `rake help` to see available tasks
+- run `rake r` to start the server with auto-reloading
+
- run `rake console` for IRB console and `rake pry` for Pry console
- run `rake spec` for testing
View
6 Rakefile
@@ -2,6 +2,11 @@ require 'rspec/core/rake_task'
task :default => :help
+desc "Run with auto-reloading"
+task :r do
+ sh "shotgun config.ru"
+end
+
desc "Run specs"
task :spec do
RSpec::Core::RakeTask.new(:spec) do |t|
@@ -39,6 +44,7 @@ end
desc "Show help menu"
task :help do
puts "Available rake tasks: "
+ puts "rake r - Run with auto-reloading"
puts "rake console - Run a IRB console with the enviroment loaded"
puts "rake pry - Run a Pry console with the enviroment loaded"
puts "rake spec - Run specs"
View
2  config/boot.rb
@@ -5,4 +5,6 @@
Bundler.require(:default, ENV["RACK_ENV"].to_sym)
+require File.join(File.dirname(__FILE__) + '/../lib/project.rb')
+
Dir[File.dirname(__FILE__) + '/../lib/**/*.rb'].each { |f| require f }
View
2  lib/project.rb
@@ -1,3 +1,3 @@
module Project
VERSION = '0.0.0'
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.