bundix 2.0.7 → 2.0.8

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1848dfdcdcaf1cbe8b7b406638af61687f01af12
4
- data.tar.gz: e11ddbb476fa13fead465e4c5a08662284a37781
3
+ metadata.gz: 3faf8fe9a4c8fe4444f90a8bd22c4dbb1ccbcea1
4
+ data.tar.gz: fbd8ef63ffb26a412d6272cfb4fc6d24db5e5265
5
5
  SHA512:
6
- metadata.gz: 1aeef0a53192cd8b8d57f1eba5c3d5ca7c4b1ed394ab973f31bef8644abf79e9b7a3ebf8ffd617cc81b8d6b789f0efc897de8388d64a214ab27f99848f7f8f79
7
- data.tar.gz: 4a62563af177c86127b8ced6263ce69d5bd7bcd6fbbc34196571d35de96e6b15d28fe782f8ac62dd11c396d481ad1ea304bcb40ceef3691a75d381845fa61f89
6
+ metadata.gz: 11f2fc22cf75095a582d283a92a667dd28bcf16163bd7904c0aaeab725669398f234cd05ccab3b895622d214db490b9850def133fc34310a56c2a57fbb01fb17
7
+ data.tar.gz: ef70c7ecc031803ffc77ce21dfa9e96ad0ef5a8023d43091efa4778ac73fcb35af0bfab7784248db67b15f639cf68865402c9132eb76dcd7fe481042f71034b4
data/lib/bundix/source.rb CHANGED
@@ -73,8 +73,9 @@ class Bundix
73
73
  def convert_git
74
74
  revision = spec.source.options.fetch('revision')
75
75
  uri = spec.source.options.fetch('uri')
76
- hash = nix_prefetch_git(uri, revision).split.last
77
- hash = sh(NIX_HASH, '--type', 'sha256', '--to-base32', hash)[SHA256_32]
76
+ output = nix_prefetch_git(uri, revision)
77
+ # FIXME: this is a hack, we should separate $stdout/$stderr in the sh call
78
+ hash = JSON.parse(output[/({[^}]+})\s*\z/m])['sha256']
78
79
  fail "couldn't fetch hash for #{spec.name}-#{spec.version}" unless hash
79
80
  puts "#{hash} => #{uri}" if $VERBOSE
80
81
 
@@ -1,3 +1,3 @@
1
1
  class Bundix
2
- VERSION = '2.0.7'
2
+ VERSION = '2.0.8'
3
3
  end
data/lib/bundix.rb CHANGED
@@ -86,7 +86,7 @@ class Bundix
86
86
  case obj
87
87
  when Hash
88
88
  out << "{\n"
89
- obj.sort.each do |(k, v)|
89
+ obj.sort_by{|k, v| k.to_s.downcase }.each do |(k, v)|
90
90
  out << ' ' * level
91
91
  if k.to_s =~ /^[a-zA-Z_-]+[a-zA-Z0-9_-]*$/
92
92
  out << k.to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundix
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael 'manveru' Fellinger