reality-generators 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd884c4080b180702c66c240bc3782989c7e0533
4
- data.tar.gz: 80120fc316eb2ab3136c5be04e4f7f359afac81d
3
+ metadata.gz: af0b6c1e51e95d1a9cf3c1e2862eb73abe78c3c8
4
+ data.tar.gz: fc0000f5a449741e6e7e6dfc24780979eaab351a
5
5
  SHA512:
6
- metadata.gz: 749439d7af5d2316f8b22960c893a5b277ca074031e8c915e4dbfe7f5d18c2d99600dcaeee9344d5a5ba2a2d7d3c7d9d6c70b6ace3c59d0aefbc1765befded8c
7
- data.tar.gz: 675da30cf2daa432a2e66cde10fb35a407ee7753eb9e2e0f92a32c96c7b863723ad312257df618cc6567c020829b35d7a1e49e45c00b985223efd6e4a46f0fd5
6
+ metadata.gz: 2786178f4b984919e553adf443cca95d759c6057ddd7d503a789913d3f23fee55af10c2acce08039f380ed896ef45481b84c111d9d608c37e6184fc9ef773982
7
+ data.tar.gz: 7fbbf83ba65738e1ed2836465dfc9ba883d7c464215e7a2bb6ed62778e43e7b93ebf2d0657234382019806da1e04684315ee910709ee7aa0d83488e2affef927
@@ -80,7 +80,7 @@ module Reality #nodoc
80
80
 
81
81
 
82
82
  helpers = template_set_container.derive_default_helpers(options.merge(:file_type => file_extension, :artifact_type => artifact_type, :facet_key => self.facet_key)) +
83
- (options[:helpers].nil? ? [] : options[:helpers])
83
+ (options[:helpers].nil? ? [] : options[:helpers])
84
84
 
85
85
  if 'erb' == template_extension
86
86
  template_set.erb_template(facets,
@@ -106,13 +106,16 @@ module Reality #nodoc
106
106
  def facet_directory
107
107
  @facet_directory ||= nil
108
108
  if @facet_directory.nil?
109
- caller_locations.each do |location|
110
- if location.absolute_path =~ /.*\/#{self.facet_key}\/model\.rb$/
111
- @facet_directory = File.dirname(location.absolute_path)
109
+ locations = respond_to?(:caller_locations) ?
110
+ caller_locations.collect { |c| c.absolute_path } :
111
+ caller.collect { |s| s.split(':')[0] }
112
+ locations.each do |location|
113
+ if location =~ /.*\/#{self.facet_key}\/model\.rb$/
114
+ @facet_directory = File.dirname(location)
112
115
  break
113
116
  end
114
117
  end
115
- Reality::Generators.error("Unable to locate facet_directory for facet #{self.facet_key}. Caller trace: #{caller_locations.collect{|c|c.absolute_path}.inspect}") if @facet_directory.nil?
118
+ Reality::Generators.error("Unable to locate facet_directory for facet #{self.facet_key}. Caller trace: #{locations.inspect}") if @facet_directory.nil?
116
119
  end
117
120
  @facet_directory
118
121
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{reality-generators}
5
- s.version = '1.5.0'
5
+ s.version = '1.6.0'
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
8
8
  s.authors = ['Peter Donald']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reality-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Donald