auser-dslify 0.0.5 → 0.0.6
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/dslify.gemspec +4 -4
- data/lib/dslify/dslify.rb +9 -2
- data/lib/dslify/version.rb +1 -1
- metadata +3 -3
data/dslify.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{dslify}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ari Lerner"]
|
9
|
-
s.date = %q{2009-04-
|
9
|
+
s.date = %q{2009-04-28}
|
10
10
|
s.description = %q{Easily add DSL-like calls to any class}
|
11
11
|
s.email = ["arilerner@mac.com"]
|
12
12
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "website/index.txt"]
|
@@ -21,13 +21,13 @@ Ari Lerner}
|
|
21
21
|
s.rdoc_options = ["--main", "README.txt"]
|
22
22
|
s.require_paths = ["lib"]
|
23
23
|
s.rubyforge_project = %q{dslify}
|
24
|
-
s.rubygems_version = %q{1.3.
|
24
|
+
s.rubygems_version = %q{1.3.2}
|
25
25
|
s.summary = %q{Easily add DSL-like calls to any class}
|
26
26
|
s.test_files = ["test/test_dslify.rb"]
|
27
27
|
|
28
28
|
if s.respond_to? :specification_version then
|
29
29
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
30
|
-
s.specification_version =
|
30
|
+
s.specification_version = 3
|
31
31
|
|
32
32
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
33
33
|
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
|
data/lib/dslify/dslify.rb
CHANGED
@@ -12,8 +12,15 @@ module Dslify
|
|
12
12
|
@dsl_options ||= default_dsl_options.merge(hsh)
|
13
13
|
end
|
14
14
|
alias :options :dsl_options
|
15
|
-
def set_vars_from_options(h
|
16
|
-
h.each
|
15
|
+
def set_vars_from_options(h, contxt=self)
|
16
|
+
h.each do |k,v|
|
17
|
+
if contxt.respond_to?(k.to_sym)
|
18
|
+
contxt.send k.to_sym, v
|
19
|
+
else
|
20
|
+
clean_meth = k.to_s.gsub(/\=/,"").to_sym
|
21
|
+
dsl_options[clean_meth] = v
|
22
|
+
end
|
23
|
+
end
|
17
24
|
end
|
18
25
|
def add_method(meth)
|
19
26
|
# instance_eval <<-EOM
|
data/lib/dslify/version.rb
CHANGED
@@ -2,7 +2,7 @@ module Dslify
|
|
2
2
|
module VERSION #:nodoc:
|
3
3
|
MAJOR = 0 unless const_defined?("MAJOR")
|
4
4
|
MINOR = 0 unless const_defined?("MINOR")
|
5
|
-
TINY =
|
5
|
+
TINY = 6 unless const_defined?("TINY")
|
6
6
|
|
7
7
|
STRING = [MAJOR, MINOR, TINY].join('.') unless const_defined?("STRING")
|
8
8
|
self
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auser-dslify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ari Lerner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-28 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -91,7 +91,7 @@ requirements: []
|
|
91
91
|
rubyforge_project: dslify
|
92
92
|
rubygems_version: 1.2.0
|
93
93
|
signing_key:
|
94
|
-
specification_version:
|
94
|
+
specification_version: 3
|
95
95
|
summary: Easily add DSL-like calls to any class
|
96
96
|
test_files:
|
97
97
|
- test/test_dslify.rb
|