pkgr 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,10 +4,10 @@ require 'digest/sha1'
4
4
  module Pkgr
5
5
  class Buildpack
6
6
  class << self
7
- attr_writer :buildpack_cache_dir
7
+ attr_writer :buildpacks_cache_dir
8
8
 
9
- def buildpack_cache_dir
10
- @buildpack_cache_dir ||= File.expand_path("~/.pkgr/buildpacks").tap do |dir|
9
+ def buildpacks_cache_dir
10
+ @buildpacks_cache_dir ||= File.expand_path("~/.pkgr/buildpacks").tap do |dir|
11
11
  FileUtils.mkdir_p(dir)
12
12
  end
13
13
  end
@@ -23,7 +23,7 @@ module Pkgr
23
23
  end
24
24
 
25
25
  def buildpack_cache_dir
26
- File.join(self.class.buildpack_cache_dir, type.to_s, uuid)
26
+ File.join(self.class.buildpacks_cache_dir, type.to_s, uuid)
27
27
  end
28
28
 
29
29
  def detect(path)
data/lib/pkgr/cli.rb CHANGED
@@ -3,9 +3,21 @@ require 'pkgr'
3
3
 
4
4
  module Pkgr
5
5
  class CLI < Thor
6
- class_option :verbose, :type => :boolean, :default => false, :desc => "Run verbosely"
7
- class_option :debug, :type => :boolean, :default => false, :desc => "Run very verbosely"
8
- class_option :name, :type => :string, :desc => "Application name (if directory given, it will default to the directory name)"
6
+ class_option :verbose,
7
+ :type => :boolean,
8
+ :default => false,
9
+ :desc => "Run verbosely"
10
+ class_option :debug,
11
+ :type => :boolean,
12
+ :default => false,
13
+ :desc => "Run very verbosely"
14
+ class_option :name,
15
+ :type => :string,
16
+ :desc => "Application name (if directory given, it will default to the directory name)"
17
+ class_option :buildpacks_cache_dir,
18
+ :type => :string,
19
+ :desc => "Directory where to store the buildpacks",
20
+ :default => Pkgr::Buildpack.buildpacks_cache_dir
9
21
 
10
22
  desc "package TARBALL", "Package the given tarball or directory"
11
23
 
@@ -32,6 +44,8 @@ module Pkgr
32
44
  Pkgr.level = Logger::INFO if options[:verbose]
33
45
  Pkgr.level = Logger::DEBUG if options[:debug]
34
46
 
47
+ Pkgr::Buildpack.buildpacks_cache_dir = options[:buildpacks_cache_dir] if options[:buildpacks_cache_dir]
48
+
35
49
  packager = Dispatcher.new(tarball, options)
36
50
  packager.call
37
51
  rescue Pkgr::Errors::Base => e
data/lib/pkgr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pkgr
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkgr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-22 00:00:00.000000000 Z
12
+ date: 2013-11-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake