-
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.
- Loading branch information
0 parents
commit db27511
Showing
11 changed files
with
183 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,2 @@ | ||
config/database.yml | ||
.idea/ |
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,16 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'sinatra' | ||
|
||
gem 'activerecord' | ||
gem 'pg' | ||
gem 'rake' | ||
gem 'shrine', '~> 3.0' | ||
gem 'sinatra-activerecord' | ||
gem 'sinatra-contrib' | ||
|
||
group :development do | ||
gem 'pry' | ||
gem 'shotgun' | ||
gem 'tux' | ||
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,98 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
activemodel (6.0.2.2) | ||
activesupport (= 6.0.2.2) | ||
activerecord (6.0.2.2) | ||
activemodel (= 6.0.2.2) | ||
activesupport (= 6.0.2.2) | ||
activesupport (6.0.2.2) | ||
concurrent-ruby (~> 1.0, >= 1.0.2) | ||
i18n (>= 0.7, < 2) | ||
minitest (~> 5.1) | ||
tzinfo (~> 1.1) | ||
zeitwerk (~> 2.2) | ||
addressable (2.7.0) | ||
public_suffix (>= 2.0.2, < 5.0) | ||
backports (3.17.0) | ||
bond (0.5.1) | ||
coderay (1.1.2) | ||
concurrent-ruby (1.1.6) | ||
content_disposition (1.0.0) | ||
down (5.1.1) | ||
addressable (~> 2.5) | ||
i18n (1.8.2) | ||
concurrent-ruby (~> 1.0) | ||
method_source (1.0.0) | ||
minitest (5.14.0) | ||
multi_json (1.14.1) | ||
mustermann (1.1.1) | ||
ruby2_keywords (~> 0.0.1) | ||
pg (1.2.3) | ||
pry (0.13.0) | ||
coderay (~> 1.1) | ||
method_source (~> 1.0) | ||
public_suffix (4.0.3) | ||
rack (2.2.2) | ||
rack-protection (2.0.8.1) | ||
rack | ||
rack-test (0.6.3) | ||
rack (>= 1.0) | ||
rake (13.0.1) | ||
ripl (0.7.1) | ||
bond (~> 0.5.1) | ||
ripl-multi_line (0.3.1) | ||
ripl (>= 0.3.6) | ||
ripl-rack (0.2.1) | ||
rack (>= 1.0) | ||
rack-test (~> 0.6.2) | ||
ripl (>= 0.7.0) | ||
ruby2_keywords (0.0.2) | ||
shotgun (0.9.2) | ||
rack (>= 1.0) | ||
shrine (3.2.1) | ||
content_disposition (~> 1.0) | ||
down (~> 5.1) | ||
sinatra (2.0.8.1) | ||
mustermann (~> 1.0) | ||
rack (~> 2.0) | ||
rack-protection (= 2.0.8.1) | ||
tilt (~> 2.0) | ||
sinatra-activerecord (2.0.14) | ||
activerecord (>= 3.2) | ||
sinatra (>= 1.0) | ||
sinatra-contrib (2.0.8.1) | ||
backports (>= 2.8.2) | ||
multi_json | ||
mustermann (~> 1.0) | ||
rack-protection (= 2.0.8.1) | ||
sinatra (= 2.0.8.1) | ||
tilt (~> 2.0) | ||
thread_safe (0.3.6) | ||
tilt (2.0.10) | ||
tux (0.3.0) | ||
ripl (>= 0.3.5) | ||
ripl-multi_line (>= 0.2.4) | ||
ripl-rack (>= 0.2.0) | ||
sinatra (>= 1.2.1) | ||
tzinfo (1.2.6) | ||
thread_safe (~> 0.1) | ||
zeitwerk (2.3.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
activerecord | ||
pg | ||
pry | ||
rake | ||
shotgun | ||
shrine (~> 3.0) | ||
sinatra | ||
sinatra-activerecord | ||
sinatra-contrib | ||
tux | ||
|
||
BUNDLED WITH | ||
2.1.4 |
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,2 @@ | ||
require './config/environment' | ||
require 'sinatra/activerecord/rake' |
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,9 @@ | ||
# frozen_string_literal: true | ||
|
||
module Application | ||
class Api < Sinatra::Base | ||
get '/' do | ||
json images: [] | ||
end | ||
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,13 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'sinatra/base' | ||
require 'sinatra/json' | ||
|
||
module Application | ||
class Api < Sinatra::Base | ||
end | ||
end | ||
|
||
Dir[File.dirname(__FILE__) + '/api/**'].sort.each do |route| | ||
require route | ||
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,3 @@ | ||
require './config/environment.rb' | ||
require './application' | ||
run Application::Api |
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,2 @@ | ||
ENV['APP_ENV'] ||= 'development' | ||
Bundler.require(:default, ENV['APP_ENV']) |
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,9 @@ | ||
class CreatePhotos < ActiveRecord::Migration[6.0] | ||
def change | ||
create_table :photos do |t| | ||
t.string :name | ||
t.text :photo_data | ||
t.timestamps null: false | ||
end | ||
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,25 @@ | ||
# This file is auto-generated from the current state of the database. Instead | ||
# of editing this file, please use the migrations feature of Active Record to | ||
# incrementally modify your database, and then regenerate this schema definition. | ||
# | ||
# This file is the source Rails uses to define your schema when running `rails | ||
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to | ||
# be faster and is potentially less error prone than running all of your | ||
# migrations from scratch. Old migrations may fail to apply correctly if those | ||
# migrations use external dependencies or application code. | ||
# | ||
# It's strongly recommended that you check this file into your version control system. | ||
|
||
ActiveRecord::Schema.define(version: 2020_03_27_105306) do | ||
|
||
# These are extensions that must be enabled in order to support this database | ||
enable_extension "plpgsql" | ||
|
||
create_table "photos", force: :cascade do |t| | ||
t.string "name" | ||
t.text "photo_data" | ||
t.datetime "created_at", precision: 6, null: false | ||
t.datetime "updated_at", precision: 6, null: false | ||
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 | ||
|
||
class Photo < ActiveRecord::Base | ||
end |