roger 0.12.3 → 0.12.4

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDNkNDAwZjFmOTYxZWVmYjE5MDYwYmFmZWQ5OTU2YmU4Zjc1NzczZg==
4
+ YjNlMzQ3MzBkN2E0NmY4NjhkYTEwMDllMTVjMDFlYWU3OThmZGM1YQ==
5
5
  data.tar.gz: !binary |-
6
- MjExZDc0NjVhMGYwNzYzNTM2ZTFhMjFlZGZmMTY5MjE3MWUxZDQ3ZQ==
6
+ ZmUzNTYzMzE3YjIxMzUxY2YwMjBiMDE2NWQyMjYyYjM3YjlmMjQ4Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2UxNjZmMDJjOGVlMmQxOGQ3ODhiYzVhNjMzOGI2ZjYyOGM0YThhMDE1YjUz
10
- OWEwYWMwYjBhNDk4MGU0MTEzMGRlMDYxNDVlNjJjY2UwYjkxNmRkMmQ2ZjA5
11
- NDZjNmRhNmNhNWZhNDhkMjBhYjg1NzkwNjBhZjg5YTI1ZTkyYjQ=
9
+ YThjMmRmZGZjOGM2MmUwNjhiMGIwMTRlOWVlNjc4Y2QxYjhmM2YyNjg0NmFj
10
+ MGEwNTQwM2Q1NTE5Yzg0ZjY4YmE1OWZmYmZjMDI1OTc2ZWNiOGE5N2Y0NTY5
11
+ NDRlY2QzMWFmYTQ2MjMxOTE5NmI2Mzk0YzE3MDVkYTAwMjA1YWQ=
12
12
  data.tar.gz: !binary |-
13
- YjMzZDJjZDM0YWRhZDcwNGIyNmM5ZDUzOTc0OWE3ZmM1ZWUzMWRjMTYxNDA5
14
- OTYxYTgwMzJlNmQ2MjY4MDcxOWZmNDgxZDYyMTk2NzM0ZmE4MTc0NDJlODhl
15
- MTAxZGQ5NGZmOWU1NDNjMmVmNTEzN2M5NjBjZjUzMWYzZTUwZjY=
13
+ OTA0MTNkYmZlNGZiYzI0ZmFlOTlkYjliMjVjZGFhZTkwOWQzYmJmODU1MDI2
14
+ YTc4NzljY2JmNDE0ZmZiNDlhZDI5NzBiODUyNzQ4OGRjNmE0ZjdlNWQzNTg5
15
+ YjM5OWY4NzUwZTgyODBjNWEyOTE3MjI1YWE0OTkyNDkyODQ0ZDA=
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.12.4
4
+ * Change upload prompt to conform to the [y/N] convention
5
+ * Fix git SCM to properly shell escape arguments so it works with special chars in paths
6
+
3
7
  ## Version 0.12.3
4
8
  * Allow release cleaner to work with arrays of globs/paths
5
9
 
@@ -31,7 +31,7 @@ module Roger::Release::Finalizers
31
31
  # Validate options
32
32
  validate_options!(release, options)
33
33
 
34
- if !options[:ask] || (prompt("Do you wish to upload to #{options[:host]}? Type y[es]: ")) =~ /\Ay(es)?\Z/
34
+ if !options[:ask] || (prompt("Do you wish to upload to #{options[:host]}? [y/N]: ")) =~ /\Ay(es)?\Z/
35
35
  begin
36
36
  `#{@options[:rsync]} --version`
37
37
  rescue Errno::ENOENT
@@ -34,11 +34,11 @@ module Roger::Release::Scm
34
34
  def get_previous_tag_name
35
35
  # Get list of SHA1 that have a ref
36
36
  begin
37
- sha1s = `git --git-dir=#{git_dir} log --pretty='%H' --simplify-by-decoration`.split("\n")
37
+ sha1s = `git --git-dir=#{safe_git_dir} log --pretty='%H' --simplify-by-decoration`.split("\n")
38
38
  tags = []
39
39
  while tags.size < 2 && sha1s.any?
40
40
  sha1 = sha1s.shift
41
- tag = `git --git-dir=#{git_dir} describe --tags --exact-match #{sha1} 2>/dev/null`.strip
41
+ tag = `git --git-dir=#{safe_git_dir} describe --tags --exact-match #{sha1} 2>/dev/null`.strip
42
42
  tags << tag if !tag.empty?
43
43
  end
44
44
  tags.last
@@ -51,17 +51,22 @@ module Roger::Release::Scm
51
51
  @git_dir ||= find_git_dir(@config[:path])
52
52
  end
53
53
 
54
+ # Safely escaped git dir
55
+ def safe_git_dir
56
+ Shellwords.escape(self.git_dir.to_s)
57
+ end
58
+
54
59
  # Some hackery to determine if we're on a tagged version or not
55
60
  def get_scm_data(ref = @config[:ref])
56
61
  @_version = ""
57
62
  @_date = Time.now
58
63
  begin
59
64
  if File.exist?(git_dir)
60
- @_version = `git --git-dir=#{git_dir} describe --tags #{ref} 2>&1`
65
+ @_version = `git --git-dir=#{safe_git_dir} describe --tags #{ref} 2>&1`
61
66
 
62
67
  if $?.to_i > 0
63
68
  # HEAD is not a tagged verison, get the short SHA1 instead
64
- @_version = `git --git-dir=#{git_dir} show #{ref} --format=format:"%h" -s 2>&1`
69
+ @_version = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%h" -s 2>&1`
65
70
  else
66
71
  # HEAD is a tagged version, if version is prefixed with "v" it will be stripped off
67
72
  @_version.gsub!(/^v/,"")
@@ -69,7 +74,7 @@ module Roger::Release::Scm
69
74
  @_version.strip!
70
75
 
71
76
  # Get the date in epoch time
72
- date = `git --git-dir=#{git_dir} show #{ref} --format=format:"%ct" -s 2>&1`
77
+ date = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%ct" -s 2>&1`
73
78
  if date =~ /\d+/
74
79
  @_date = Time.at(date.to_i)
75
80
  else
data/roger.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "roger"
5
- s.version = "0.12.3"
5
+ s.version = "0.12.4"
6
6
 
7
7
  s.authors = ["Flurin Egger", "Edwin van der Graaf", "Joran Kapteijns"]
8
8
  s.email = ["info@digitpaint.nl", "flurin@digitpaint.nl"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.3
4
+ version: 0.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-08-27 00:00:00.000000000 Z
13
+ date: 2014-09-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor