contao 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,12 +30,30 @@ namespace :contao do
30
30
  Rake::Task['contao:fix_permissions'].invoke
31
31
  Rake::Task['contao:generate_localconfig'].invoke
32
32
  Rake::Task['contao:generate_htaccess'].invoke
33
+ Rake::Task['contao:apply_patches'].invoke
33
34
  Rake::Task['assets:precompile'].invoke
34
35
 
35
36
  TechnoGate::Contao::Notifier.notify("The contao folder has been bootstraped, Good Luck.", title: "Contao Bootstrap")
36
37
  end
37
38
 
38
- desc "Fix permissions"
39
+ desc 'Apply Patches'
40
+ task :apply_patches do
41
+ path = File.expand_path "../../../contao_patches/#{TechnoGate::Contao.env}", __FILE__
42
+ Dir["#{path}/**/*.patch"].each do |patch|
43
+ TechnoGate::Contao::Notifier.notify("Applying patch #{File.basename patch}", title: "Contao Bootstrap")
44
+ result = system <<-CMD
45
+ cd #{TechnoGate::Contao.expandify(TechnoGate::Contao::Application.config.contao_public_path)}
46
+ patch -Nfp1 -i #{patch} --no-backup-if-mismatch
47
+ CMD
48
+
49
+ if !result
50
+ TechnoGate::Contao::Notifier.notify("Patch #{File.basename patch} failed to apply", title: "Contao Bootstrap")
51
+ abort "Please fix patches before bootstrapping"
52
+ end
53
+ end
54
+ end
55
+
56
+ desc 'Fix permissions'
39
57
  task :fix_permissions do
40
58
  require 'fileutils'
41
59
 
@@ -1,3 +1,3 @@
1
1
  module Contao
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
@@ -0,0 +1,73 @@
1
+ This patch tells Apache to disable browser caching by asking the browser to
2
+ load HTML/assets on each request
3
+
4
+ diff -Naur a/.htaccess b/.htaccess
5
+ --- a/.htaccess 2012-06-05 14:36:55.000000000 +0200
6
+ +++ b/.htaccess 2012-06-05 14:40:32.000000000 +0200
7
+ @@ -119,36 +119,42 @@
8
+ ##
9
+ <IfModule mod_expires.c>
10
+ ExpiresActive on
11
+ - ExpiresByType text/cache-manifest "access plus 0 seconds"
12
+ - ExpiresByType text/html "access plus 0 seconds"
13
+ + ExpiresByType text/cache-manifest "access"
14
+ + ExpiresByType text/html "access"
15
+ # Data
16
+ - ExpiresByType text/xml "access plus 0 seconds"
17
+ - ExpiresByType application/xml "access plus 0 seconds"
18
+ - ExpiresByType application/json "access plus 0 seconds"
19
+ + ExpiresByType text/xml "access"
20
+ + ExpiresByType application/xml "access"
21
+ + ExpiresByType application/json "access"
22
+ # Feed
23
+ - ExpiresByType application/rss+xml "access plus 1 hour"
24
+ - ExpiresByType application/atom+xml "access plus 1 hour"
25
+ + ExpiresByType application/rss+xml "access"
26
+ + ExpiresByType application/atom+xml "access"
27
+ # Media: images, video, audio
28
+ - ExpiresByType image/gif "access plus 1 month"
29
+ - ExpiresByType image/png "access plus 1 month"
30
+ - ExpiresByType image/jpg "access plus 1 month"
31
+ - ExpiresByType image/jpeg "access plus 1 month"
32
+ - ExpiresByType image/x-icon "access plus 1 month"
33
+ - ExpiresByType video/ogg "access plus 1 month"
34
+ - ExpiresByType audio/ogg "access plus 1 month"
35
+ - ExpiresByType video/mp4 "access plus 1 month"
36
+ - ExpiresByType video/webm "access plus 1 month"
37
+ + ExpiresByType image/gif "access"
38
+ + ExpiresByType image/png "access"
39
+ + ExpiresByType image/jpg "access"
40
+ + ExpiresByType image/jpeg "access"
41
+ + ExpiresByType image/x-icon "access"
42
+ + ExpiresByType video/ogg "access"
43
+ + ExpiresByType audio/ogg "access"
44
+ + ExpiresByType video/mp4 "access"
45
+ + ExpiresByType video/webm "access"
46
+ # HTC files (css3pie)
47
+ - ExpiresByType text/x-component "access plus 1 month"
48
+ + ExpiresByType text/x-component "access"
49
+ # Webfonts
50
+ - ExpiresByType application/x-font-ttf "access plus 1 month"
51
+ - ExpiresByType font/opentype "access plus 1 month"
52
+ - ExpiresByType application/x-font-woff "access plus 1 month"
53
+ - ExpiresByType image/svg+xml "access plus 1 month"
54
+ - ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
55
+ + ExpiresByType application/x-font-ttf "access"
56
+ + ExpiresByType font/opentype "access"
57
+ + ExpiresByType application/x-font-woff "access"
58
+ + ExpiresByType image/svg+xml "access"
59
+ + ExpiresByType application/vnd.ms-fontobject "access"
60
+ # CSS and JavaScript
61
+ - ExpiresByType text/css "access plus 1 year"
62
+ - ExpiresByType application/javascript "access plus 1 year"
63
+ + ExpiresByType text/css "access"
64
+ + ExpiresByType application/javascript "access"
65
+ +</IfModule>
66
+ +
67
+ +# Reset the header
68
+ +<IfModule mod_headers.c>
69
+ + Header unset Cache-Control
70
+ + Header append Cache-Control must-revalidate
71
+ </IfModule>
72
+
73
+ ##
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contao
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -230,6 +230,7 @@ files:
230
230
  - lib/contao/tasks/jasmine.rake
231
231
  - lib/contao/tasks/whitespace.rake
232
232
  - lib/contao/version.rb
233
+ - lib/contao_patches/development/development_htaccess.patch
233
234
  - lib/guard/assets.rb
234
235
  - lib/monkey_patches.rb
235
236
  - lib/monkey_patches/compass/urls.rb
@@ -258,7 +259,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
258
259
  version: '0'
259
260
  segments:
260
261
  - 0
261
- hash: 343131435900038940
262
+ hash: -4565490712393146300
262
263
  required_rubygems_version: !ruby/object:Gem::Requirement
263
264
  none: false
264
265
  requirements:
@@ -267,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
268
  version: '0'
268
269
  segments:
269
270
  - 0
270
- hash: 343131435900038940
271
+ hash: -4565490712393146300
271
272
  requirements: []
272
273
  rubyforge_project:
273
274
  rubygems_version: 1.8.24