Commit Graph

29 Commits

Author SHA1 Message Date
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Ingo Schommer
aa72425e84 Fixed PHPUnit assertions for incomplete tests in core
Avoid PHPUnit throwing "test didn't run any assertions"
notices in PHP. If nothing else, it keeps test output
looking less broken by default, making it more likely
that actual errors do get noticed.
2012-11-23 15:16:39 +01:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Fred Condo
3e0782267c Allow scheme-relative URLs in requirements
The Requirements class currently treats only absolute URLs as URLs, and
tries to interpret anything else as a filesystem path. This prevents
using scheme-relative URLs for requirements.

Example:
<% require javascript(//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js) %>

This forces the unfortunate choice of not using a CDN for common
scripts, always using an https absolute URL, or accepting that some
browsers will throw a security warning when viewing the site in https.

This change allows scheme-relative URLs & updates RequirementsTest.
2012-08-22 16:49:55 -07:00
Sean Harvey
01e0ce7b24 MINOR Ensure assertions of RequirementsTest use "framework" as the
FRAMEWORK_DIR, otherwise assertions of require() calls in
RequirementsTest_Conditionals template fail
2012-04-15 10:50:20 +12:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Ingo Schommer
565e2ab318 Merge pull request #143 from Innovatif/sapphire
---

BUGFIX Having <header tag in HTML causes requirements to double. See http://www.silverstripe.org/general-questions/show/17524
2011-12-23 16:36:01 +01:00
Ingo Schommer
2870eb9212 MINOR Changed $fixture_path to relative filenames in all sapphire test cases in order to allow easier file moving and less verbosity in tests 2011-03-30 23:04:48 +13:00
Ingo Schommer
25a0c3e7fb ENHANCEMENT: in referencing a file in combine_files() it should fall back to standard requirement tags if combining has been disabled eg dev mode (from r107091)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112549 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:09:15 +00:00
Sam Minnee
34207e069a BUGFIX #4188 simon_w: Let require tags in templates be conditional (from r101867)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112044 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:15:47 +00:00
Ingo Schommer
656eccc7a4 MINOR Removed Requirements:: static call and replace with instance (from r100533)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105598 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:16:33 +00:00
Ingo Schommer
9a438d26b0 ENHANCEMENT #3387 Requirements now has a new static function called Requirements::set_combined_files_folder() for setting where the combined files should belong (from r100528)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105596 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:15:43 +00:00
Ingo Schommer
a030d33f33 MINOR Removed whitespace (from r100517)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105592 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:14:18 +00:00
Ingo Schommer
7d8ac7662b MINOR Removed end php tag for Requirements and RequirementsTest (from r100514)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105591 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:14:00 +00:00
Ingo Schommer
9c03cc7fe1 API CHANGE Refactored Requirements to use Requirements_Backend at all times - this makes testing far easier. Thanks tobych!
MINOR Updated RequirementsTest to test Requirements_Backend instead of global statics (from r100513)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:13:45 +00:00
Ingo Schommer
f512347e33 BUGFIX Making sure RequirementsTest? has combine_files activated (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82055 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 23:45:23 +00:00
Sean Harvey
13b358a8dd Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75582 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 00:07:39 +00:00
Ingo Schommer
023e733b16 BUGFIX Fixed wrong condition in Requirements::includeInHTML() which failed to process requirements if only customCSS() was used
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-08 19:06:15 +00:00
Sam Minnee
2e955b498e BUGFIX: Fixing tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 19:28:46 +00:00
Sam Minnee
12e62c6329 ENHANCEMENT: Change MySQLDatabase connection to operate in ANSI SQL mode, to ease the transition to DB abstraction
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66399 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-22 03:51:04 +00:00
Sam Minnee
e6c4d32dbc ARCHITECTURE #3034 wakeless: Make Requirements mockable by pushing the meat of the functionality to Requirements_Backend
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65436 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 02:06:28 +00:00
Ingo Schommer
72de4163b7 ENHANCEMENT Using namespaces for filenames in RequirementsTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65029 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 14:04:31 +00:00
Ingo Schommer
9371f4688b ENHANCEMENT Introduced constants for system paths like /sapphire in preparation for a more flexible directory reorganisation. Instead of hardcoding your path, please use the following constants: BASE_PATH, BASE_URL, SAPPHIRE_DIR, SAPPHIRE_PATH, CMS_DIR, CMS_PATH, THIRDPARTY_DIR, THIRDPARTY_PATH, ASSETS_DIR, ASSETS_PATH, THEMES_DIR, THEMES_PATH
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63154 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 16:02:38 +00:00
Sam Minnee
4258361337 API Change: Turned Requirements::clear_combined_files() into Requirements::delete_combined_files() and Requirements::clear_combined_files()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60431 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 23:18:56 +00:00
Ingo Schommer
655802177c BUGFIX Added Requirements::path_for_file() to support external URLs in required paths (incl. unit test)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60415 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 07:22:50 +00:00
Ingo Schommer
15b11e3f13 BUGFIX Fixed RequirementsTest combine_files() testing to accept new javascript inclusion format with added modified flags
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60413 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 06:28:29 +00:00
Ingo Schommer
4478228ff4 ENHANCEMENT Respecting $blocked in Requirements::$combine_files
ENHANCEMENT Changed Requirements::$customHeader to array storage with uniquenessID
FEATURE Added Requirements::clear_combined_files()
ENHANCEMENT Extended unit test coverage for Requirements
MINOR Documentation in Requirements
MINOR Changed Requirements::$files_to_combine to Requirements::$combine_files

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@58347 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-07-18 03:47:17 +00:00
Ingo Schommer
60a0a04c39 FEATURE Added Requirements::combine_files() to reduce HTTP requests by concatenating javascript and css files. Uses JSMin library to further minify the payload by default.
Merged revisions 55913 via svnmerge from 
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r55913 | gmunn | 2008-06-10 10:30:14 +1200 (Tue, 10 Jun 2008) | 1 line
  
  javascript combined files and google CDN implemented
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@58316 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-07-17 23:32:31 +00:00