mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2024-12-26 09:59:18 +01:00
Added rake
This commit is contained in:
parent
66a08806f5
commit
2f33a0b432
4 changed files with 59 additions and 0 deletions
2
Gemfile
2
Gemfile
|
@ -6,3 +6,5 @@ gem 'rack-rewrite'
|
||||||
gem 'sinatra'
|
gem 'sinatra'
|
||||||
gem 'sinatra-param'
|
gem 'sinatra-param'
|
||||||
gem 'puma'
|
gem 'puma'
|
||||||
|
gem 'rake'
|
||||||
|
gem 'pry'
|
||||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -1,25 +1,35 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
coderay (1.1.0)
|
||||||
|
method_source (0.8.2)
|
||||||
|
pry (0.10.1)
|
||||||
|
coderay (~> 1.1.0)
|
||||||
|
method_source (~> 0.8.1)
|
||||||
|
slop (~> 3.4)
|
||||||
puma (2.10.2)
|
puma (2.10.2)
|
||||||
rack (>= 1.1, < 2.0)
|
rack (>= 1.1, < 2.0)
|
||||||
rack (1.6.0)
|
rack (1.6.0)
|
||||||
rack-protection (1.5.3)
|
rack-protection (1.5.3)
|
||||||
rack
|
rack
|
||||||
rack-rewrite (1.5.1)
|
rack-rewrite (1.5.1)
|
||||||
|
rake (10.4.2)
|
||||||
sinatra (1.4.5)
|
sinatra (1.4.5)
|
||||||
rack (~> 1.4)
|
rack (~> 1.4)
|
||||||
rack-protection (~> 1.4)
|
rack-protection (~> 1.4)
|
||||||
tilt (~> 1.3, >= 1.3.4)
|
tilt (~> 1.3, >= 1.3.4)
|
||||||
sinatra-param (1.2.2)
|
sinatra-param (1.2.2)
|
||||||
sinatra (~> 1.3)
|
sinatra (~> 1.3)
|
||||||
|
slop (3.6.0)
|
||||||
tilt (1.4.1)
|
tilt (1.4.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
pry
|
||||||
puma
|
puma
|
||||||
rack-rewrite
|
rack-rewrite
|
||||||
|
rake
|
||||||
sinatra
|
sinatra
|
||||||
sinatra-param
|
sinatra-param
|
||||||
|
|
27
Rakefile
Normal file
27
Rakefile
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
require "bundler"
|
||||||
|
require 'rake'
|
||||||
|
require 'rake/clean'
|
||||||
|
|
||||||
|
include Rake::DSL
|
||||||
|
|
||||||
|
# All the bacon specifications
|
||||||
|
PROJECT_SPECS = Dir.glob(File.expand_path('../spec/**/*.rb', __FILE__))
|
||||||
|
PROJECT_SPECS.reject! { |e| e =~ /helper\.rb/ }
|
||||||
|
PROJECT_SPECS.reject! { |e| e =~ /init\.rb/ }
|
||||||
|
|
||||||
|
CLEAN.include %w[
|
||||||
|
**/.*.sw?
|
||||||
|
*.gem
|
||||||
|
.config
|
||||||
|
**/*~
|
||||||
|
**/{vttroute-*.db,cache.yaml}
|
||||||
|
*.yaml
|
||||||
|
pkg
|
||||||
|
rdoc
|
||||||
|
public/doc
|
||||||
|
*coverage*
|
||||||
|
]
|
||||||
|
|
||||||
|
Dir.glob(File.expand_path('../tasks/*.rake', __FILE__)).each do |f|
|
||||||
|
import(f)
|
||||||
|
end
|
20
tasks/pry.rake
Normal file
20
tasks/pry.rake
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
ENV['RACK_ENV'] = 'development'
|
||||||
|
namespace :pry do
|
||||||
|
task :load_config do
|
||||||
|
require 'rubygems'
|
||||||
|
require 'bundler'
|
||||||
|
|
||||||
|
Bundler.require( :default, ENV['RACK_ENV'].to_sym ) # require tout les gems définis dans Gemfile
|
||||||
|
|
||||||
|
require_relative '../lib/ledger'
|
||||||
|
require_relative '../config/options'
|
||||||
|
end
|
||||||
|
|
||||||
|
desc 'Open pry with DB environment setup'
|
||||||
|
task pry: :load_config do
|
||||||
|
pry.binding
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
Loading…
Reference in a new issue