diff --git a/examples/sinatra-pet-shelter/Gemfile b/examples/sinatra-pet-shelter/Gemfile new file mode 100644 index 0000000..4fc2c5f --- /dev/null +++ b/examples/sinatra-pet-shelter/Gemfile @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +gem 'json' +gem 'sinatra' +gem 'sinatra-contrib' + +group :development, :test do + gem 'pry' + gem 'rspec' +end diff --git a/examples/sinatra-pet-shelter/Gemfile.lock b/examples/sinatra-pet-shelter/Gemfile.lock new file mode 100644 index 0000000..4e25b77 --- /dev/null +++ b/examples/sinatra-pet-shelter/Gemfile.lock @@ -0,0 +1,57 @@ +GEM + remote: https://rubygems.org/ + specs: + base64 (0.2.0) + coderay (1.1.3) + diff-lcs (1.5.1) + json (2.7.2) + method_source (1.1.0) + multi_json (1.15.0) + mustermann (3.0.3) + ruby2_keywords (~> 0.0.1) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + rack (2.2.9) + rack-protection (3.2.0) + base64 (>= 0.1.0) + rack (~> 2.2, >= 2.2.4) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.1) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + ruby2_keywords (0.0.5) + sinatra (3.2.0) + mustermann (~> 3.0) + rack (~> 2.2, >= 2.2.4) + rack-protection (= 3.2.0) + tilt (~> 2.0) + sinatra-contrib (3.2.0) + multi_json (>= 0.0.2) + mustermann (~> 3.0) + rack-protection (= 3.2.0) + sinatra (= 3.2.0) + tilt (~> 2.0) + tilt (2.4.0) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + json + pry + rspec + sinatra + sinatra-contrib + +BUNDLED WITH + 2.4.7 diff --git a/examples/sinatra-pet-shelter/app.rb b/examples/sinatra-pet-shelter/app.rb new file mode 100644 index 0000000..6c4b289 --- /dev/null +++ b/examples/sinatra-pet-shelter/app.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'sinatra' +require 'sinatra/reloader' if development? + +# Main entrypoint of the application +class App < Sinatra::Base + get '/' do + 'Hello world!' + end +end diff --git a/examples/sinatra-pet-shelter/app_spec.rb b/examples/sinatra-pet-shelter/app_spec.rb new file mode 100644 index 0000000..1577a39 --- /dev/null +++ b/examples/sinatra-pet-shelter/app_spec.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_relative 'app' + +describe App do + it 'works' do + # ... + end +end diff --git a/examples/sinatra-pet-shelter/spec_helper.rb b/examples/sinatra-pet-shelter/spec_helper.rb new file mode 100644 index 0000000..349e92b --- /dev/null +++ b/examples/sinatra-pet-shelter/spec_helper.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +RSpec.configure do |config| +end