Sha256: 946251a78208c22454d9f3aa13d5869d3af617bd06205d9ba74edd50bcf72925

Contents?: true

Size: 520 Bytes

Versions: 32

Compression:

Stored size: 520 Bytes

Contents

module Penchant
  class DotPenchant
    class << self
      def run(env = nil, deployment = false)
        dot_penchant = new
        dot_penchant.run(env)
        dot_penchant
      end
    end

    def run(env = nil, deployment = false)
      instance_eval(File.read('.penchant'))
    end

    def rake(*tasks)
      command = [ "rake", *tasks ]
      command.unshift("bundle exec") if gemfile?
      Kernel.system command.join(' ')
    end

    private
    def gemfile?
      File.file?('Gemfile')
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
penchant-0.2.29 lib/penchant/dot_penchant.rb
penchant-0.2.28 lib/penchant/dot_penchant.rb
penchant-0.2.27 lib/penchant/dot_penchant.rb
penchant-0.2.26 lib/penchant/dot_penchant.rb
penchant-0.2.24 lib/penchant/dot_penchant.rb
penchant-0.2.23 lib/penchant/dot_penchant.rb
penchant-0.2.22 lib/penchant/dot_penchant.rb
penchant-0.2.21 lib/penchant/dot_penchant.rb
penchant-0.2.20 lib/penchant/dot_penchant.rb
penchant-0.2.19 lib/penchant/dot_penchant.rb
penchant-0.2.18 lib/penchant/dot_penchant.rb
penchant-0.2.17 lib/penchant/dot_penchant.rb
penchant-0.2.16 lib/penchant/dot_penchant.rb
penchant-0.2.15 lib/penchant/dot_penchant.rb
penchant-0.2.14 lib/penchant/dot_penchant.rb
penchant-0.2.13 lib/penchant/dot_penchant.rb
penchant-0.2.12 lib/penchant/dot_penchant.rb
penchant-0.2.11 lib/penchant/dot_penchant.rb
penchant-0.2.10 lib/penchant/dot_penchant.rb
penchant-0.2.9 lib/penchant/dot_penchant.rb