build 1.0.8 → 1.0.9

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: 7efd1ab33189ceb9c7b010cd89967e0ea5822512
4
- data.tar.gz: 6a98e0e63ee94d5e1907efac051a97025454d1a9
3
+ metadata.gz: 6b1c3d76cc70aaa872ddb1f607b74bbc38108a67
4
+ data.tar.gz: 9ee591bae8bf3bba22b0743edd8d5eda09e63ea6
5
5
  SHA512:
6
- metadata.gz: d596d2f004e9b9d2354d2d0e73ad35e398f94295092e0b736efc064cc38cc95916a419b136a8c6967f144da37370f810ae2d45d4d69165a1983ef23a2583466f
7
- data.tar.gz: d5e13666851e9f58c768e3a1a165229f3ce9604d62dc88f391e0be3898ddf30b2ed0cb50620f2f88ce2313adadda7f030eff5562cbcc78192f884e5cafc006b7
6
+ metadata.gz: 2539b6941da1bf04921c2067a8053045827357b302f9418be0cf59f9f3ccb4dbd4155d1dedca7e9a86ce73efd3901e0f29a6aab33e8a0d4f7fbc22909b877d65
7
+ data.tar.gz: 2ed00e5af4b3d8633a483458e4bcacef9aaa72796af592d107e940d06ec3cbb117f9e873312d23e9ac6e25dc91a634ae4626ea659e3e5764a13dc27e7e71cc33
@@ -48,13 +48,18 @@ module Build
48
48
  @dynamic != nil
49
49
  end
50
50
 
51
+ # Do we have a default value for this parameter?
52
+ def default?
53
+ @options.key?(:default)
54
+ end
55
+
51
56
  def implicit?
52
57
  dynamic? and @options[:implicit]
53
58
  end
54
59
 
55
60
  # Optional parameters are those that are either defined as optional or implicit.
56
61
  def optional?
57
- @options[:optional] || implicit?
62
+ @options[:optional] || implicit? || default?
58
63
  end
59
64
 
60
65
  def applicable? arguments
@@ -80,7 +85,7 @@ module Build
80
85
  scope.instance_exec(arguments[@name], arguments, &@dynamic)
81
86
  else
82
87
  arguments[@name]
83
- end
88
+ end || @options[:default]
84
89
  end
85
90
 
86
91
  def inspect
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Build
22
- VERSION = "1.0.8"
22
+ VERSION = "1.0.9"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-24 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: build-graph