tinyci 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9823572e16f290dcf10320aaec6b0e693da76d35e128c19b08a4e597264ce22c
4
- data.tar.gz: dbbf0c3713dc9ffafa3eac54cfc0b393e9d987140d986d293a29aa372b057461
3
+ metadata.gz: 681e4adfd06fa23631e109ffd7a2194fe9786f18d9b87a8f849bdefd42bc9fce
4
+ data.tar.gz: ff3c5937f01bcb140b1f5ac893e03c9c49368abf6175c9fdea9da6882ae10732
5
5
  SHA512:
6
- metadata.gz: ab5ee295529e697e2dc87f3bd87d923191befa57e822a9dca45e203078ecdc18d5d1b206845e2d7c654d4fdbb1de91d1f06afa909e91404b4b7443d83e6e3f27
7
- data.tar.gz: 0dc7da9ee3f75f5029ae82399da6045815a350dd642d41857b7fe841d73dc83103380fec665e7042a640cdc9ec6874ac25848022da1024e0f55909bf10f6a387
6
+ metadata.gz: 5d63a10bc859f14e0384fcd176ecef59389ee6943705562acee4abeb59196192d22fec8bfa5146fea9f3d3007da632de1f7eaa05023691967cf64b5ffb33044c
7
+ data.tar.gz: 86e146bbe8300458390ad469dd4913e75e8dd72e3bfb2a52060cf3e269f4faddb5133243b7449e76fbaf2d6e49cbecdd6609c7111dbadf7e50a4c88490164fe0
@@ -1,3 +1,6 @@
1
+ 0.4.2 - May 28, 2019
2
+ Make hook installer use relative path, so installed hooks will not need to be rewritten when tinyci is updated
3
+ Add --absolute-path option to install for the old behavior, needed in testing etc
1
4
  0.4.1 - May 28, 2019
2
5
  Fix .yaropts to include all markdown files
3
6
  0.4 - May 27, 2019
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tinyci (0.4.1)
4
+ tinyci (0.4.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -31,6 +31,7 @@ module TinyCI
31
31
  'install' => OptionParser.new do |o|
32
32
  o.banner = "Usage: install [options]"
33
33
  o.on("-q", "--[no-]quiet", "quietly run") {|v| opts[:quiet] = v}
34
+ o.on("-a", "--[no-]absolute-path", "install hook with absolute path to specific tinyci version (not recommended)") {|v| opts[:absolute_path] = v}
34
35
  end,
35
36
  'compact' => OptionParser.new do |o|
36
37
  o.banner = "Usage: compact [options]"
@@ -101,7 +102,7 @@ TXT
101
102
  def self.do_install(opts)
102
103
  logger = MultiLogger.new(quiet: opts[:quiet])
103
104
 
104
- TinyCI::Installer.new(logger: logger, working_dir: opts[:dir]).install!
105
+ TinyCI::Installer.new(logger: logger, working_dir: opts[:dir], absolute_path: opts[:absolute_path]).install!
105
106
  end
106
107
 
107
108
  def self.do_compact(opts)
@@ -11,9 +11,10 @@ module TinyCI
11
11
  #
12
12
  # @param [String] working_dir The directory from which to run. Does not have to be the root of the repo
13
13
  # @param [Logger] logger Logger object
14
- def initialize(working_dir: nil, logger: nil)
14
+ def initialize(working_dir: nil, logger: nil, absolute_path: false)
15
15
  @logger = logger
16
16
  @working_dir = working_dir || repo_root
17
+ @absolute_path = absolute_path
17
18
  end
18
19
 
19
20
  # Write the hook to the relevant path and make it executable
@@ -44,12 +45,16 @@ module TinyCI
44
45
  File.expand_path('hooks/post-update', git_directory_path)
45
46
  end
46
47
 
48
+ def bin_path
49
+ @absolute_path ? Gem.bin_path('tinyci', 'tinyci') : 'tinyci'
50
+ end
51
+
47
52
  def hook_content
48
53
  <<-EOF
49
54
  #!/bin/sh
50
55
  unset GIT_DIR
51
56
 
52
- #{Gem.bin_path('tinyci', 'tinyci')} run --all
57
+ #{bin_path} run --all
53
58
  EOF
54
59
  end
55
60
  end
@@ -1,3 +1,3 @@
1
1
  module TinyCI
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinyci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Davies
@@ -248,7 +248,7 @@ metadata:
248
248
  allowed_push_host: https://rubygems.org
249
249
  post_install_message: " _____ _ _____ _____\n/__ (_)_ __ _ _ /
250
250
  ___/ /_ _/\n | || | '_ \\| | | |/ / / /\n | || | | | | |_| / /___/\\/ /_
251
- \ \n |_||_|_| |_|\\__, \\____/\\____/ 0.4.1\n |___/\n\n"
251
+ \ \n |_||_|_| |_|\\__, \\____/\\____/ 0.4.2\n |___/\n\n"
252
252
  rdoc_options: []
253
253
  require_paths:
254
254
  - lib