local_pac 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,11 +37,11 @@ module LocalPac
37
37
  fail Exceptions::ConfigFileNotReadable, "Sorry, but there was a problem reading the config file: #{e.message}."
38
38
  end
39
39
 
40
- option :log_sink, File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'log')
41
- option :local_storage, File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'data')
42
- option :executable, File.expand_path('../../../bin/local_pac', __FILE__)
43
- option :pid_file, File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'run', 'pid')
44
- option :gem_path, Gem.path
40
+ option :log_sink, File.expand_path(File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'log'))
41
+ option :local_storage, File.expand_path(File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'data'))
42
+ option :executable, File.expand_path(File.expand_path('../../../bin/local_pac', __FILE__))
43
+ option :pid_file, File.expand_path(File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'run', 'pid'))
44
+ option :gem_path, Gem.path.collect {|p| File.expand_path(p) }
45
45
 
46
46
  def to_s
47
47
  result = []
data/lib/local_pac/git.rb CHANGED
@@ -18,7 +18,7 @@ module LocalPac
18
18
  end
19
19
 
20
20
  def self.init(path, is_bare = false)
21
- cmd = ["git init #{path}"]
21
+ cmd = ["git init #{File.expand_path(path)}"]
22
22
  cmd << "--bare" if is_bare
23
23
 
24
24
  runner = Runner.new(cmd.join(" "))
@@ -9,10 +9,10 @@ module LocalPac
9
9
  public
10
10
 
11
11
  def initialize(storage_path, compressor_engine = JavaScriptCompressor, file_creator = PacFile)
12
- @storage_path = storage_path
12
+ @storage_path = File.expand_path(storage_path)
13
13
  javascript_compressor = compressor_engine.new
14
14
 
15
- create unless ::File.exists? storage_path
15
+ create unless ::File.exists? @storage_path
16
16
 
17
17
  mutex = Mutex.new
18
18
  mutex.synchronize do
@@ -1,7 +1,7 @@
1
1
  module LocalPac
2
2
  class Logger
3
3
  def initialize(path)
4
- @logger = ::Logger.new(path)
4
+ @logger = ::Logger.new(::File.expand_path(path))
5
5
  end
6
6
 
7
7
  def write(*args, &block)
@@ -5,7 +5,7 @@ module LocalPac
5
5
  attr_reader :path
6
6
 
7
7
  def initialize(path)
8
- @path = path
8
+ @path = File.expand_path(path)
9
9
  end
10
10
 
11
11
  def name
@@ -8,7 +8,7 @@ module LocalPac
8
8
  public
9
9
 
10
10
  def initialize(root_directory = File.expand_path('../../../files', __FILE__), creator = TemplateFile)
11
- @root_directory = root_directory
11
+ @root_directory = File.expand_path(root_directory)
12
12
  @creator = creator
13
13
  end
14
14
 
@@ -1,4 +1,4 @@
1
1
  #main LocalPac
2
2
  module LocalPac
3
- VERSION = '0.1.10'
3
+ VERSION = '0.1.11'
4
4
  end
@@ -1,6 +1,6 @@
1
1
  # Maintainer: Max Meyer <dev@fedux.org>
2
2
  pkgname=local_pac
3
- pkgver=0.1.8
3
+ pkgver=0.1.10
4
4
  pkgrel=1
5
5
  pkgdesc="local pacfile serving server"
6
6
  arch=(i686 x86_64)
@@ -11,7 +11,7 @@ install=${pkgname}.install
11
11
  makedepends=(rubygems filegen)
12
12
  source=(http://gems.rubyforge.org/gems/$pkgname-$pkgver.gem)
13
13
  noextract=($pkgname-$pkgver.gem)
14
- sha256sums=('76d773623232c4f87823d318252f1ceff9887f56136a4d54e9bc9b1d5c54e7b8')
14
+ sha256sums=('48af235bc6aa8b5a9d647e1a177d6d25eab10626ba946cfd75b81b8126805cab')
15
15
 
16
16
  package() {
17
17
  cd "$srcdir"
@@ -32,7 +32,9 @@ package() {
32
32
  install -d ${pkgdir}$_log_dir
33
33
  install -d ${pkgdir}$_config_dir
34
34
 
35
- GEM_HOME="${pkgdir}${_library_dir}" GEM_ROOT="${pkgdir}${_library_dir}" GEM_PATH="${pkgdir}${_library_dir}" /usr/bin/gem install --env-shebang --wrappers --no-ri --no-rdoc --install-dir ${pkgdir}${_library_dir} $pkgname --verbose
35
+ msg "Starting download of gems. Don't get alert that the download takes a lot of time. Since rubygems 2.2.0 a new algorithm to resolve dependencies is used. Upgrade to > 2.2.0 via sudo /usr/bin/gem update --system to improve performance."
36
+
37
+ GEM_HOME="${pkgdir}${_library_dir}" GEM_ROOT="${pkgdir}${_library_dir}" GEM_PATH="${pkgdir}${_library_dir}" /usr/bin/gem install --env-shebang --wrappers --no-ri --no-rdoc --install-dir ${pkgdir}${_library_dir} $pkgname
36
38
 
37
39
  install -D -m 644 ${pkgdir}${_share_dir}/archlinux/config.yaml ${pkgdir}${_examples_dir}/config.yaml.example
38
40
 
@@ -1,10 +1,13 @@
1
1
  post_install() {
2
+ echo ""
2
3
  echo "Please place a config file at one of the following places:"
4
+ echo ""
3
5
  echo " * $HOME/.config/local_pac/config.yaml"
4
6
  echo " * $HOME/.local_pac/config.yaml"
5
7
  echo " * /etc/local_pac/config.yaml"
6
-
8
+ echo ""
7
9
  echo "An example config file can be found at \"/usr/share/local_pac/examples/config.yaml.example\""
10
+ echo ""
8
11
  }
9
12
 
10
13
  post_upgrade() {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: local_pac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: