build-environment 1.1.2 → 1.1.3

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: f019e45793e325e7ca7fb83434371a8e06ec8705
4
- data.tar.gz: 4f4d0443144dd0c6702a85aedae1ed9b70648b04
3
+ metadata.gz: d63dc4795e7ecd921983627f39645f7b1c4cbd1e
4
+ data.tar.gz: 822896b39bf081d65c6b9f0f2c02617e923aadb4
5
5
  SHA512:
6
- metadata.gz: 76ee398464cb685b78abd71759273ba5d0c7fbd9a71c1929002cc2c4d91b7fa23430c78430a5a5a3958a8b3019804f86c54acd891daec1da1668b20ea8bbabe1
7
- data.tar.gz: eef77b8cfcf11992d371717506e0b37b6eda26861405cbae65ba45cd8cf32fff67e82197fa1d7423c8bb059fd08969925a44cdcefdf9076ee0d701ffbd0df120
6
+ metadata.gz: 062f483a5c33512b0293a9f1275a0f00018b5b01926c71677119a8a314ebfb45f970458787fd19e2de0bd47917bd7ab94fb550fac367bd41fd557b8b5e619020
7
+ data.tar.gz: ce5774ab9d41601bc361613d973a462995f5abcc78cef75936515f8f3c46bdafb0510e78287538d46be7fe6177d5a26a7c5daae61634ccd2a9cb33cd6c5d1c62
@@ -37,7 +37,7 @@ module Build
37
37
  super
38
38
  end
39
39
 
40
- def self.hash(**values)
40
+ def self.hash(values = {})
41
41
  self.new(nil, values)
42
42
  end
43
43
 
@@ -29,7 +29,7 @@ module Build
29
29
  end
30
30
 
31
31
  def to_s
32
- "#<#{@klass.name} #{@block.source_location.join(':')}>"
32
+ "#<#{@klass} #{@block ? @block.source_location.join(':') : 'unknown'}>"
33
33
  end
34
34
  end
35
35
 
@@ -56,7 +56,7 @@ module Build
56
56
  protected
57
57
 
58
58
  def sorted_keys
59
- @values.keys.sort
59
+ @values.keys.sort_by(&:to_s)
60
60
  end
61
61
 
62
62
  def checksum_recursively(digester)
@@ -1,5 +1,5 @@
1
1
  module Build
2
2
  class Environment
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.3"
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
1
+ # Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -33,5 +33,11 @@ module Build::ChecksumSpec
33
33
 
34
34
  expect(e.checksum).to be == "0e29e95023819e0ecd2850edece5851a"
35
35
  end
36
+
37
+ it "should handle both string and symbol keys" do
38
+ e = Build::Environment.hash(:a => 20, "b" => 10)
39
+
40
+ expect(e.checksum).to be == "613a92db2cc6a94709ce3174f01c29fe"
41
+ end
36
42
  end
37
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-environment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams