dryml 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -9,24 +9,28 @@ not optimized for that and you may end up with extra carriage returns.
9
9
  DRYML was created for the Hobo project, but this is an extraction from
10
10
  that project and can be used separately.
11
11
 
12
- # How to use with Rails but without Hobo
12
+ # How to use with Rails 3 but without Hobo
13
13
 
14
- - install both HoboSupport and Dryml as a plugin or gem
14
+ - Declare the Dryml gem in your `Gemfile`
15
+
16
+ gem 'dryml'
15
17
 
16
- - create an `application.dryml`
18
+ - Then update your bundle
19
+
20
+ $ bundle install
21
+
22
+ - Create an `application.dryml`
17
23
 
18
24
  $ mkdir app/views/taglibs
19
25
  $ touch app/views/taglibs/application.dryml
20
26
 
21
- - create `config/initializers/dryml.rb`
22
-
23
- require 'dryml'
24
- require 'dryml/template'
25
- require 'dryml/dryml_generator'
26
- Dryml.enable
27
+ Now you can use templates that end in ".dryml" or ".html.dryml". Controller
28
+ layouts will still be rendered and will enclose your templates, but you can
29
+ disable them if you wish in your ApplicationController:
27
30
 
28
- Now you can use templates that end in ".dryml". Such templates will
29
- ignore layouts.
31
+ class ApplicationController < ActionController::Base
32
+ layout nil
33
+ end
30
34
 
31
35
  # How to use outside of Rails
32
36
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -19,7 +19,7 @@
19
19
  contexts.map do |dom_id, context|
20
20
  code = context.marshal(session).split("\n").map{|line| "'#{line}\\n'"}.join(" +\n ")
21
21
  "hoboParts['#{dom_id}'] = (#{code});\n"
22
- end.join
22
+ end.join.html_safe
23
23
  end
24
24
 
25
25
 
data/lib/dryml.rb CHANGED
@@ -137,7 +137,7 @@ module Dryml
137
137
  else
138
138
  File.join(File.dirname(__FILE__), "dryml/static_tags")
139
139
  end
140
- File.readlines(path).*.chop
140
+ File.read(path).split
141
141
  end
142
142
  end
143
143
 
data/taglibs/core.dryml CHANGED
@@ -115,32 +115,32 @@ collection is considered blank)
115
115
 
116
116
 
117
117
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
118
- <def tag="html"><%=raw "<html#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</html>" -%></def>
118
+ <def tag="html"><%=raw "<html#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</html>" -%></def>
119
119
 
120
120
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
121
- <def tag="table"><%=raw "<table#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</table>" -%></def>
121
+ <def tag="table"><%=raw "<table#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</table>" -%></def>
122
122
 
123
123
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
124
- <def tag="a"><%=raw "<a#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</a>" -%></def>
124
+ <def tag="a"><%=raw "<a#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</a>" -%></def>
125
125
 
126
126
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
127
- <def tag="section"><%=raw "<section#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</section>" -%></def>
127
+ <def tag="section"><%=raw "<section#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</section>" -%></def>
128
128
 
129
129
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
130
- <def tag="header"><%=raw "<header#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</header>" -%></def>
130
+ <def tag="header"><%=raw "<header#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</header>" -%></def>
131
131
 
132
132
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
133
- <def tag="footer"><%=raw "<footer#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</footer>" -%></def>
133
+ <def tag="footer"><%=raw "<footer#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</footer>" -%></def>
134
134
 
135
135
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
136
- <def tag="form"><%=raw "<form#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</form>" -%></def>
136
+ <def tag="form"><%=raw "<form#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</form>" -%></def>
137
137
 
138
138
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
139
- <def tag="submit"><%=raw "<submit#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</submit>" -%></def>
139
+ <def tag="submit"><%=raw "<submit#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</submit>" -%></def>
140
140
 
141
141
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
142
- <def tag="input"><%=raw "<input#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</input>" -%></def>
142
+ <def tag="input"><%=raw "<input#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</input>" -%></def>
143
143
 
144
144
  <!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
145
- <def tag="link"><%=raw "<link#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</link>" -%></def>
145
+ <def tag="link"><%=raw "<link#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</link>" -%></def>
146
146
 
metadata CHANGED
@@ -1,60 +1,71 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: dryml
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.1
4
5
  prerelease:
5
- version: 1.3.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Tom Locke
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-11-14 00:00:00 -05:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2012-10-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: actionpack
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
18
+ requirements:
22
19
  - - ~>
23
- - !ruby/object:Gem::Version
20
+ - !ruby/object:Gem::Version
24
21
  version: 3.0.0
25
22
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: hobo_support
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.0.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: hobo_support
32
+ requirement: !ruby/object:Gem::Requirement
31
33
  none: false
32
- requirements:
33
- - - "="
34
- - !ruby/object:Gem::Version
35
- version: 1.3.0
34
+ requirements:
35
+ - - '='
36
+ - !ruby/object:Gem::Version
37
+ version: 1.3.1
36
38
  type: :runtime
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: rubydoctest
40
39
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - '='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.3.1
46
+ - !ruby/object:Gem::Dependency
47
+ name: rubydoctest
48
+ requirement: !ruby/object:Gem::Requirement
42
49
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
47
54
  type: :development
48
- version_requirements: *id003
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
49
62
  description: The Don't Repeat Yourself Markup Language
50
63
  email: tom@tomlocke.com
51
64
  executables: []
52
-
53
- extensions:
65
+ extensions:
54
66
  - ext/mkrf_conf.rb
55
67
  extra_rdoc_files: []
56
-
57
- files:
68
+ files:
58
69
  - CHANGES.txt
59
70
  - LICENSE.txt
60
71
  - README
@@ -90,33 +101,30 @@ files:
90
101
  - lib/dryml/template_environment.rb
91
102
  - taglibs/core.dryml
92
103
  - test/dryml.rdoctest
93
- has_rdoc: true
94
104
  homepage: http://hobocentral.net
95
105
  licenses: []
96
-
97
106
  post_install_message:
98
- rdoc_options:
107
+ rdoc_options:
99
108
  - --charset=UTF-8
100
- require_paths:
109
+ require_paths:
101
110
  - lib
102
- required_ruby_version: !ruby/object:Gem::Requirement
111
+ required_ruby_version: !ruby/object:Gem::Requirement
103
112
  none: false
104
- requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- version: "0"
108
- required_rubygems_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ! '>='
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
118
  none: false
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
119
+ requirements:
120
+ - - ! '>='
121
+ - !ruby/object:Gem::Version
113
122
  version: 1.3.6
114
123
  requirements: []
115
-
116
124
  rubyforge_project: hobo
117
- rubygems_version: 1.6.2
125
+ rubygems_version: 1.8.24
118
126
  signing_key:
119
127
  specification_version: 3
120
128
  summary: The Don't Repeat Yourself Markup Language
121
129
  test_files: []
122
-
130
+ has_rdoc: