-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRakefile
More file actions
34 lines (28 loc) · 740 Bytes
/
Copy pathRakefile
File metadata and controls
34 lines (28 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
require "bundler/gem_tasks"
require 'annotations/rake_task'
Annotations::RakeTask.new
def no_pry
puts %Q{
You need to install pry to run this console:
>> gem install pry
or add pry to your gemfile (gem "pry") and run `bundle install`
}
end
# This code is little bit hacky but i wanted to have a full console fast
task :console do |t|
begin
require 'pry'
rescue LoadError => e
no_pry
end
# add this file to the load path
$: << File.join(File.dirname(__FILE__), 'lib')
# require sunat
require 'sunat'
# and include it here
include SUNAT
# starts pry in the current environment
# [note: it's pretty awesome to use binding.pry to debug
# non-rails projects :)]
binding.pry
end