summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-07-18 07:33:19 +0200
committerRemi Collet <remi@remirepo.net>2017-07-18 07:33:19 +0200
commit1137e5eff06404c8ad833932bee60c88d31198ea (patch)
treea0ab81c51dc1070f1729062ff929b98d2a883a11
parentebc70311fc43ca038cc4611948fb8ee49e75e9dd (diff)
v1.2.0 from FedoraHEADmaster
-rw-r--r--.gitignore7
-rw-r--r--composer.json25
-rw-r--r--php-cssjanus-data.json85
-rw-r--r--php-cssjanus.spec29
4 files changed, 124 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..dc715a9
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,25 @@
+{
+ "name": "cssjanus/cssjanus",
+ "description": "Convert CSS stylesheets between left-to-right and right-to-left.",
+ "license": "Apache-2.0",
+ "autoload": {
+ "psr-0": {
+ "": "src/"
+ }
+ },
+ "require": {
+ "php": ">=5.4"
+ },
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "0.8.*",
+ "phpunit/phpunit": "4.8.*",
+ "squizlabs/php_codesniffer": "2.3.*"
+ },
+ "scripts": {
+ "test": [
+ "parallel-lint . --exclude vendor",
+ "phpunit",
+ "phpcs -p"
+ ]
+ }
+}
diff --git a/php-cssjanus-data.json b/php-cssjanus-data.json
index bede15f..21f7086 100644
--- a/php-cssjanus-data.json
+++ b/php-cssjanus-data.json
@@ -395,6 +395,51 @@
]
]
},
+ "flip transform translate x-axis": {
+ "cases": [
+ [
+ ".foo { transform: translate( 30px ); }",
+ ".foo { transform: translate( -30px ); }"
+ ],
+ [
+ ".foo { transform: translate( 30% ); }",
+ ".foo { transform: translate( -30% ); }"
+ ],
+ [
+ ".foo { transform: translate( 30%, 20% ); }",
+ ".foo { transform: translate( -30%, 20% ); }"
+ ],
+ [
+ ".foo { transform: translate( 30%, 20%, 10% ); }",
+ ".foo { transform: translate( -30%, 20%, 10% ); }"
+ ],
+ [
+ ".foo { transform: translate( 30%, 20%, 10%, 0% ); }"
+ ],
+ [
+ ".foo { transform: translateY( 30px ) rotate( 20deg ) translateX( 10px ); }",
+ ".foo { transform: translateY( 30px ) rotate( 20deg ) translateX( -10px ); }"
+ ],
+ [
+ ".foo { transform: translateX( 30px ) rotate( 20deg ) translateY( 10px ); }",
+ ".foo { transform: translateX( -30px ) rotate( 20deg ) translateY( 10px ); }"
+ ],
+ [
+ ".foo { transform: translateX( 30px ); }",
+ ".foo { transform: translateX( -30px ); }"
+ ],
+ [
+ ".foo { other-property: translateX( 30px ); }"
+ ],
+ [
+ ".foo { -webkit-transform: translateX( 30px ); }",
+ ".foo { -webkit-transform: translateX( -30px ); }"
+ ],
+ [
+ ".foo { transform: translateY( 30px ); }"
+ ]
+ ]
+ },
"flip background-position keywords": {
"cases": [
[
@@ -538,10 +583,10 @@
]
]
},
- "do not flip URLs when flags are off": {
- "settings": {
- "swapLtrRtlInUrl": false,
- "swapLeftRightInUrl": false
+ "do not flip URLs when url transforms are off": {
+ "options": {
+ "transformDirInUrl": false,
+ "transformEdgeInUrl": false
},
"cases": [
[
@@ -579,10 +624,10 @@
]
]
},
- "flip URLs when flags are on": {
- "settings": {
- "swapLtrRtlInUrl": true,
- "swapLeftRightInUrl": true
+ "flip URLs when url transforms are on": {
+ "options": {
+ "transformDirInUrl": true,
+ "transformEdgeInUrl": true
},
"cases": [
[
@@ -630,6 +675,30 @@
]
]
},
+ "do not flip URLs (back-compat boolean argument)": {
+ "args": [
+ false,
+ false
+ ],
+ "cases": [
+ [
+ "background: url(/foo/bar-ltr_left.png);right:10px; direction: ltr",
+ "background: url(/foo/bar-ltr_left.png);left:10px; direction: rtl"
+ ]
+ ]
+ },
+ "flip URLs (back-compat boolean argument)": {
+ "args": [
+ true,
+ true
+ ],
+ "cases": [
+ [
+ "background: url(/foo/bar-ltr_left.png);right:10px; direction: ltr",
+ "background: url(/foo/bar-rtl_right.png);left:10px; direction: rtl"
+ ]
+ ]
+ },
"leave class names alone": {
"cases": [
[
diff --git a/php-cssjanus.spec b/php-cssjanus.spec
index 0cca0ac..fe0df26 100644
--- a/php-cssjanus.spec
+++ b/php-cssjanus.spec
@@ -8,7 +8,7 @@
# Please preserve changelog entries
#
Name: php-cssjanus
-Version: 1.1.2
+Version: 1.2.0
Release: 1%{?dist}
Summary: Convert CSS stylesheets between left-to-right and right-to-left
Group: Development/Libraries
@@ -18,12 +18,11 @@ URL: https://github.com/cssjanus/php-cssjanus
Source0: https://github.com/cssjanus/php-cssjanus/archive/v%{version}.tar.gz#/php-cssjanus-%{version}.tar.gz
Source1: https://github.com/cssjanus/cssjanus/raw/v%{version}/test/data.json#/php-cssjanus-data.json
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-phpunit-PHPUnit
-Requires: php(language) >= 5.3.3
+Requires: php(language) >= 5.4
Requires: php-pcre
Provides: php-composer(cssjanus/cssjanus) = %{version}
@@ -42,26 +41,21 @@ cp -p %{SOURCE1} test/data-v%{version}.json
%install
-rm -rf %{buildroot}
-
mkdir -pm 0755 %{buildroot}%{_datadir}/php/cssjanus
cp -p src/CSSJanus.php %{buildroot}%{_datadir}/php/cssjanus
%check
-%{_bindir}/phpunit --bootstrap src/CSSJanus.php test/
-
-if which php70; then
- php70 %{_bindir}/phpunit --bootstrap src/CSSJanus.php test/
-fi
+phpunit --bootstrap src/CSSJanus.php test/
-
-%clean
-rm -rf %{buildroot}
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit --bootstrap src/CSSJanus.php test/
+ fi
+done
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license APACHE-LICENSE-2.0.txt
%doc README.md
@@ -69,6 +63,13 @@ rm -rf %{buildroot}
%changelog
+* Mon Jul 17 2017 Michael Cronenworth <mike@cchtml.com> - 1.2.0-1
+- Version update
+
+* Mon Feb 13 2017 Michael Cronenworth <mike@cchtml.com> - 1.1.3-1
+- Version update
+- Add upstream patch for php 7.1 support
+
* Mon Dec 7 2015 Remi Collet <remi@remirepo.net> - 1.1.2-1
- update to 1.1.2 (backport from Fedora)
- run test suite with both php 5 and 7 when available