fiksu-af 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/fiksu-af.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.name = 'fiksu-af'
8
8
  s.version = Af::VERSION
9
9
  s.license = 'New BSD License'
10
- s.date = '2013-10-16'
10
+ s.date = '2013-11-09'
11
11
  s.summary = "An application framework for ruby on rails based scripts."
12
12
  s.description = "Af groups together gems and provides some glue and helper classes to easily creating applications in a ruby on rails environment."
13
13
  s.authors = ["Keith Gabryelski", "Leonardo Meira"]
@@ -67,7 +67,7 @@ module Af
67
67
  if extra_stuff[-1].is_a? Hash
68
68
  extra_hash = extra_stuff.pop
69
69
  end
70
- extra_stuff.push extra_hash.merge({ target_container: self })
70
+ extra_stuff.push extra_hash.merge({ target_container: self, containing_class: self })
71
71
  end
72
72
  end
73
73
 
@@ -20,6 +20,7 @@ module Af::OptionParser
20
20
  # * :priority - order to show groups in help --?
21
21
  # * :hidden - true if this group's options should only be seen with --?
22
22
  # * :disabled - (default: false)
23
+ # * :containing_class - name of class path for this option (for: af_opt_class_path)
23
24
  # * anything else in this hash can be passed to yield block as defaults for other opt/opt_group invocations
24
25
  # * yeilds to block if given with extra_stuff in a global space that opt/opt_group calls use as defaults
25
26
 
@@ -78,6 +79,7 @@ module Af::OptionParser
78
79
  # :no_accessor - (:do_not_create_accessor) don't class_eval 'attr_accessor :#{target_variable}'
79
80
  # :var - (:target_variable) name of instance variable to set
80
81
  # :target_container - name of object to set instance value
82
+ # :containing_class - name of class path for this option (for: af_opt_class_path)
81
83
  #
82
84
  # if block is passed it is used as :method
83
85
  #
@@ -207,7 +209,7 @@ module Af::OptionParser
207
209
 
208
210
  # Add long_name to OptionStore if it's not present. Otherwise, retrieve the value
209
211
  # associated with that key and merge the value into factory_hash
210
- OptionStore.factory(self).get_option(long_name).merge!(factory_hash)
212
+ OptionStore.factory(factory_hash[:containing_class] || self).get_option(long_name).merge!(factory_hash)
211
213
  end
212
214
 
213
215
  def opt_check(var_name, *extra_stuff, &b)
@@ -1,4 +1,4 @@
1
1
  module Af
2
2
  # the current version of this gem
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.3"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fiksu-af
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
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: 2013-10-16 00:00:00.000000000 Z
13
+ date: 2013-11-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pg_application_name
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  requirements: []
247
247
  rubyforge_project:
248
- rubygems_version: 1.8.25
248
+ rubygems_version: 1.8.24
249
249
  signing_key:
250
250
  specification_version: 3
251
251
  summary: An application framework for ruby on rails based scripts.