-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The purpose of this example is to demonstrate the potential of Resource Registry declarative approach with a simple enough Sinatra application. This exercise helps to make sure Resource Registry is abstract enough to be used from a generic project.
- Loading branch information
Showing
5 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
require_relative 'app' | ||
|
||
describe App do | ||
it 'works' do | ||
# ... | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.configure do |config| | ||
end |