appetizer 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/appetizer.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = `git ls-files -- test/*`.split("\n")
13
13
  gem.name = "appetizer"
14
14
  gem.require_paths = ["lib"]
15
- gem.version = "0.0.0"
15
+ gem.version = "0.1.0"
16
16
 
17
17
  gem.required_ruby_version = ">= 1.9.2"
18
18
  end
@@ -23,10 +23,14 @@ module Appetizer
23
23
  Populator.new target, source, &block if source
24
24
  end
25
25
 
26
- def set key, value = nil, &block
26
+ def set key, value = nil
27
27
  value ||= source[key] || source[key.intern]
28
28
 
29
29
  return if value.nil? || (value.respond_to?(:empty?) && value.empty?)
30
+ set! key, value
31
+ end
32
+
33
+ def set! key, value, &block
30
34
  block ? block[value] : target.send("#{key}=", value)
31
35
  end
32
36
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appetizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-10 00:00:00.000000000Z
12
+ date: 2012-01-10 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: A lightweight init process for Rack apps.
15
15
  email:
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  requirements: []
59
59
  rubyforge_project:
60
- rubygems_version: 1.8.11
60
+ rubygems_version: 1.8.10
61
61
  signing_key:
62
62
  specification_version: 3
63
63
  summary: Provides Railsish environments and initializers.