rails_apps_composer 2.2.26 → 2.2.27
Sign up to get free protection for your applications and to get access to all the features.
- data/templates/helpers.erb +15 -2
- data/version.rb +1 -1
- metadata +4 -4
data/templates/helpers.erb
CHANGED
@@ -94,8 +94,21 @@ def copy_from_repo(filename, opts = {})
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def html_to_haml(source)
|
97
|
-
|
98
|
-
|
97
|
+
begin
|
98
|
+
html = open(source) {|input| input.binmode.read }
|
99
|
+
Haml::HTML.new(html, :erb => true, :xhtml => true).render
|
100
|
+
rescue RubyParser::SyntaxError
|
101
|
+
say_wizard "Ignoring RubyParser::SyntaxError"
|
102
|
+
# special case to accommodate https://github.com/RailsApps/rails-composer/issues/55
|
103
|
+
html = open(source) {|input| input.binmode.read }
|
104
|
+
say_wizard "applying patch" if html.include? 'card_month'
|
105
|
+
say_wizard "applying patch" if html.include? 'card_year'
|
106
|
+
html = html.gsub(/, {add_month_numbers: true}, {name: nil, id: "card_month"}/, '')
|
107
|
+
html = html.gsub(/, {start_year: Date\.today\.year, end_year: Date\.today\.year\+10}, {name: nil, id: "card_year"}/, '')
|
108
|
+
result = Haml::HTML.new(html, :erb => true, :xhtml => true).render
|
109
|
+
result = result.gsub(/select_month nil/, "select_month nil, {add_month_numbers: true}, {name: nil, id: \"card_month\"}")
|
110
|
+
result = result.gsub(/select_year nil/, "select_year nil, {start_year: Date.today.year, end_year: Date.today.year+10}, {name: nil, id: \"card_year\"}")
|
111
|
+
end
|
99
112
|
end
|
100
113
|
|
101
114
|
def html_to_slim(source)
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_apps_composer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.27
|
5
5
|
prerelease:
|
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-12-
|
12
|
+
date: 2012-12-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
@@ -202,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
202
202
|
version: '0'
|
203
203
|
segments:
|
204
204
|
- 0
|
205
|
-
hash:
|
205
|
+
hash: 4010866690309646770
|
206
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
207
|
none: false
|
208
208
|
requirements:
|
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
211
|
version: '0'
|
212
212
|
segments:
|
213
213
|
- 0
|
214
|
-
hash:
|
214
|
+
hash: 4010866690309646770
|
215
215
|
requirements: []
|
216
216
|
rubyforge_project: rails_apps_composer
|
217
217
|
rubygems_version: 1.8.24
|