ducktape 0.3.0 → 0.3.1

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.
data/README.md CHANGED
@@ -10,4 +10,4 @@ gem install ducktape
10
10
 
11
11
  Additional documentation can be found in the [Wiki](https://github.com/SilverPhoenix99/ducktape/wiki).
12
12
 
13
- <font color=red>**WARNING**: Version 0.3.0 is incompatible with version 0.2.1 and below.</font>
13
+ <a href='http://www.pledgie.com/campaigns/18955'><img alt='Click here to lend your support to: ducktape and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/18955.png?skin_name=chrome' border='0' /></a>
@@ -47,7 +47,7 @@ module Ducktape
47
47
  end
48
48
 
49
49
  def clear_bindings()
50
- bindable_attrs.each { |_,attr| attr.remove_source }
50
+ bindable_attrs.each { |_, attr| attr.remove_source }
51
51
  nil
52
52
  end
53
53
 
@@ -11,15 +11,15 @@ module Ducktape
11
11
  each { |k| puts "WARNING: invalid option #{k.inspect} for #{name.inspect} attribute. Will be ignored." }
12
12
 
13
13
  if name.is_a? BindableAttributeMetadata
14
- @name = name.name
15
- @default = options[:default] || name.instance_variable_get(:@default)
16
- @validation = options[:validate] || name.instance_variable_get(:@validation)
17
- @coercion = options[:coerce] || name.instance_variable_get(:@coercion)
14
+ @name = name.name
15
+ @default = options.has_key?(:default) ? options[:default] : name.instance_variable_get(:@default)
16
+ @validation = options.has_key?(:validate) ? options[:validate] : name.instance_variable_get(:@validation)
17
+ @coercion = options.has_key?(:coerce) ? options[:coerce] : name.instance_variable_get(:@coercion)
18
18
  else
19
- @name = name
20
- @default = options[:default]
19
+ @name = name
20
+ @default = options[:default]
21
21
  @validation = options[:validate]
22
- @coercion = options[:coerce]
22
+ @coercion = options[:coerce]
23
23
  end
24
24
 
25
25
  @validation = [*@validation] unless @validation.nil?
data/lib/ducktape.rb CHANGED
@@ -1,6 +1,10 @@
1
- require 'version'
2
-
3
1
  module Ducktape
2
+ # Although against rubygems recommendation, while version is < 1.0.0, an increase in the minor version number
3
+ # may represent an incompatible implementation with the previous minor version, which should have been
4
+ # represented by a major version number increase.
5
+
6
+ VERSION = '0.3.1'
7
+
4
8
  camelize = ->(f){ f.gsub(/(^|_)([^_]+)/) { |_| $2.capitalize } }
5
9
 
6
10
  %w'ducktape'.each do |dir|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ducktape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-03 00:00:00.000000000 Z
13
+ date: 2012-12-24 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Truly outrageous bindable attributes
16
16
  email:
@@ -30,7 +30,6 @@ files:
30
30
  - lib/ducktape/hookable.rb
31
31
  - lib/ducktape.rb
32
32
  - lib/ext/def_hookable.rb
33
- - lib/version.rb
34
33
  - README.md
35
34
  homepage: https://github.com/SilverPhoenix99/ducktape
36
35
  licenses: []
data/lib/version.rb DELETED
@@ -1,7 +0,0 @@
1
- module Ducktape
2
- # Although against rubygems recomendation, while version is < 1.0.0, an increase in the minor version number
3
- # may represent an incompatible implementation with the previous minor version, which should have been
4
- # represented by a major version number increase.
5
-
6
- VERSION = '0.3.0'
7
- end