Permalink
Browse files

Merge branch 'feature/scheme-relative' into develop

* feature/scheme-relative:
  Add Katsuma Ito to contributers
  Make asset urls scheme-relative, to avoid http/https issues.

Closes #30
  • Loading branch information...
2 parents 3bacfb8 + 3f42ac3 commit 0171128b2285305e7fd7d29b1bbc122c320c5f39 @canton7 committed Aug 21, 2012
Showing with 8 additions and 6 deletions.
  1. +4 −1 classes/casset.php
  2. +3 −5 config/casset.php
  3. +1 −0 readme.md
View
@@ -139,7 +139,10 @@ public static function _init()
\Config::load('casset', true);
- static::$asset_url = \Config::get('casset.url', \Config::get('base_url'));
+ static::$asset_url = \Config::get('casset.url');
+ if (!static::$asset_url)
+ static::$asset_url = preg_replace('#^https?://#','//', \Uri::base(false));
+ static::$asset_url = rtrim(static::$asset_url, '/') . '/';
static::$default_folders = array(
'css' => \Config::get('casset.css_dir', static::$default_folders['css']),
View
@@ -42,12 +42,10 @@
),
/**
- * URL to your Fuel root. Typically this will be your base URL,
- * WITH a trailing slash:
- *
- * Config::get('base_url')
+ * URL to your Fuel root. If null/falsy, this will default to Uri::base(false),
+ * but will be scheme-relative (starts with '//').
*/
- 'url' => Config::get('base_url'),
+ 'url' => null,
/**
* Asset Sub-folders
View
@@ -956,6 +956,7 @@ The following people have helped Casset become what it is, so thank you!
- [Derek Myers](https://github.com/dmyers)
- [Ian Turgeon](https://github.com/iturgeon)
- [Peter Wiggers](https://github.com/pwwebdev)
+ - [Katsuma Ito](katsumai@gmail.com)
Contributing
------------

0 comments on commit 0171128

Please sign in to comment.