lib/brief.rb in brief-1.11.3 vs lib/brief.rb in brief-1.11.4
- old
+ new
@@ -7,27 +7,34 @@
require 'active_support/core_ext'
require 'nokogiri'
require 'yaml'
require 'erb'
require 'hike'
+require 'pry'
module Brief
# When packaging this up through the traveling ruby system
# Dir.pwd is not accurate because of the wrapper. We shim it
# by setting a special ENV variable in that file
def self.pwd
ENV.fetch('BRIEF_PWD') { Dir.pwd }
end
+ def self.home
+ Pathname(ENV['HOME']).join(".brief")
+ end
+
+ def self.initialize_home!
+ FileUtils.mkdir_p(home)
+ end
+
def self.cases
@cases ||= {}
end
def self.case=(value)
@briefcase = value
end
-
- require 'pry'
def self.case(fire=false)
if @briefcase.is_a?(Brief::Briefcase)
@briefcase
elsif fire && @briefcase.respond_to?(:call)