Skip to content
This repository has been archived by the owner on Jun 29, 2019. It is now read-only.

Commit

Permalink
split the gems so only the ones we need are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydpick committed Jan 22, 2016
1 parent d191c3d commit 2dc49de
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 11 deletions.
30 changes: 19 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
source 'https://rubygems.org'

# core
gem 'rubyzip', '~> 1.1', '>= 1.1.7'
gem 'minitest', '~> 5.8', '>= 5.8.3'
gem 'sequel', '~> 4.30'
gem 'sqlite3', '~> 1.3', '>= 1.3.11'
gem 'docker-api', '~> 1.25'

# transports
gem 'aws-sdk', '~> 2.2', '>= 2.2.12'
group :tester do
# core
gem 'rubyzip', '~> 1.1', '>= 1.1.7'
gem 'minitest', '~> 5.8', '>= 5.8.3'

# databases
gem 'sequel', '~> 4.30'
gem 'pg', '~> 0.18.4'
gem 'sqlite3', '~> 1.3', '>= 1.3.11'
gem 'mysql2', '~> 0.4.2'
gem 'mongoid', '~> 5.0', '>= 5.0.2'
# engines
gem 'pg', '~> 0.18.4'
gem 'mysql2', '~> 0.4.2'
gem 'mongoid', '~> 5.0', '>= 5.0.2'

# transports
gem 'aws-sdk', '~> 2.2', '>= 2.2.12'
end

group :ui do
gem 'sinatra', '~> 1.4', '>= 1.4.6'
gem 'thin', '~> 1.6', '>= 1.6.4'
end

group :development do
gem 'git-up'
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,18 @@ GEM
origin (2.1.1)
pg (0.18.4)
posix-spawn (0.3.11)
rack (1.6.4)
rack-protection (1.5.3)
rack
rubyzip (1.1.7)
sequel (4.30.0)
sinatra (1.4.6)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sqlite3 (1.3.11)
thread_safe (0.3.5)
tilt (2.0.2)
tzinfo (1.2.2)
thread_safe (~> 0.1)

Expand All @@ -67,6 +75,7 @@ DEPENDENCIES
pg (~> 0.18.4)
rubyzip (~> 1.1, >= 1.1.7)
sequel (~> 4.30)
sinatra (~> 1.4, >= 1.4.6)
sqlite3 (~> 1.3, >= 1.3.11)

BUNDLED WITH
Expand Down
13 changes: 13 additions & 0 deletions tester.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Uphold
require 'rubygems'
require 'rubygems/package'
require 'bundler/setup'
Bundler.require(:default, :tester)
load 'environment.rb'

Config.load_engines
Config.load_transports

run = Runner.new(config: Uphold::Config.new(ARGV[0]))
run.start
end
21 changes: 21 additions & 0 deletions ui.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module Uphold
require 'rubygems'
require 'rubygems/package'
require 'bundler/setup'
Bundler.require(:default, :ui)
load 'environment.rb'

class Ui < Sinatra::Base
include Logging

before do
Config.load_engines
Config.load_transports
end

get '/' do
Config.engines.inspect
# 'Hello from docker!'
end
end
end

0 comments on commit 2dc49de

Please sign in to comment.