dryml 2.0.0.pre6 → 2.0.0.pre7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.pre6
1
+ 2.0.0.pre7
data/lib/dryml/helper.rb CHANGED
@@ -82,4 +82,8 @@ module Dryml::Helper
82
82
  register_form_field(name)
83
83
  name
84
84
  end
85
+
86
+ def param_name_for_this_parent
87
+ param_name_for(path_for_form_field[0..-2])
88
+ end
85
89
  end
data/lib/dryml/taglib.rb CHANGED
@@ -36,7 +36,8 @@
36
36
  def taglib_filenames(options)
37
37
  plugin = options[:plugin]
38
38
  gem = options[:gem]
39
- app_root = Object.const_defined?(:Rails) ? Rails.root : Pathname.new(File.expand_path('.'))
39
+ app_root = Rails.root if Object.const_defined?(:Rails)
40
+ app_root ||= Pathname.new(File.expand_path('.'))
40
41
  search_path = []
41
42
  search_path << Dryml.root.join('taglibs') if plugin == 'dryml'
42
43
  search_path << Hobo.root.join('lib/hobo/rapid/taglibs') if plugin == 'hobo' || gem == 'hobo'
@@ -38,7 +38,7 @@ module Dryml
38
38
  @src = src
39
39
  @environment = environment # a class or a module
40
40
  @template_path = template_path
41
- @template_path = @template_path.sub(%r(^#{Regexp.escape(Rails.root.to_s)}/), "") if Object.const_defined? :Rails
41
+ @template_path = @template_path.sub(%r(^#{Regexp.escape(Rails.root.to_s)}/), "") if Object.const_defined?(:Rails) && Rails.root
42
42
 
43
43
  @builder = Template.build_cache[@template_path] || DRYMLBuilder.new(self)
44
44
  @builder.set_environment(environment)
data/lib/dryml.rb CHANGED
@@ -43,7 +43,7 @@ module Dryml
43
43
  def precompile_taglibs
44
44
  Dir.chdir(Rails.root) do
45
45
  Dir["app/views/taglibs/**/*.dryml"].each do |f|
46
- Taglib.get(:template_dir => File.dirname(f), :src => File.basename(f).remove(".dryml"), :source_template => f)
46
+ Taglib.get(:template_dir => File.dirname(f), :src => File.basename(f).remove(".dryml"), :source_template => "_.dryml")
47
47
  end
48
48
  end
49
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dryml
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre6
4
+ version: 2.0.0.pre7
5
5
  prerelease: 6
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: 2012-11-15 00:00:00.000000000 Z
12
+ date: 2012-12-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 2.0.0.pre6
37
+ version: 2.0.0.pre7
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 2.0.0.pre6
45
+ version: 2.0.0.pre7
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rubydoctest
48
48
  requirement: !ruby/object:Gem::Requirement