Skip to content

Commit b87d0f7

Browse files
committed
removed sequel to use mysql2 gem instead
1 parent 75aa779 commit b87d0f7

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ source 'https://rubygems.org'
22
gem 'sinatra'
33
gem 'sinatra-subdomain'
44
gem 'json'
5-
gem 'sequel'
65
gem 'mysql2'

Gemfile.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ GEM
77
rack (2.0.3)
88
rack-protection (2.0.0)
99
rack
10-
sequel (4.47.0)
1110
sinatra (2.0.0)
1211
mustermann (~> 1.0)
1312
rack (~> 2.0)
@@ -23,7 +22,6 @@ PLATFORMS
2322
DEPENDENCIES
2423
json
2524
mysql2
26-
sequel
2725
sinatra
2826
sinatra-subdomain
2927

app.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
require 'json'
66
require 'date'
77
require 'mysql2'
8-
require 'sequel'
98
require './data/company_info.rb'
109
require './data/falcon9.rb'
1110
require './data/home_info.rb'
@@ -14,7 +13,7 @@
1413
require './data/dragon.rb'
1514

1615
# DB Connection initiated
17-
DB = Sequel.connect('mysql2://ofyslai9g5zjznpq:tvgm1fkpfh8iq5gp@wvulqmhjj9tbtc1w.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/vew7rq9f0fviu36f')
16+
1817

1918
# Disables rack protection because of false positives
2019
# that were blocking connections to home page
@@ -30,11 +29,6 @@
3029
subdomain :api do
3130

3231
get '/' do
33-
content_type :json
34-
DB.fetch("SELECT * FROM launches") do |row|
35-
row = row[:name]
36-
JSON.pretty_generate(row)
37-
end
3832
end
3933

4034
get '/info' do

0 commit comments

Comments
 (0)