Skip to content

Commit 45852e4

Browse files
committed
Merge branch 'effRelease'
2 parents cea1c9d + 3736914 commit 45852e4

File tree

1,211 files changed

+29429
-19074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,211 files changed

+29429
-19074
lines changed

.build_exclusions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ webextension/chrome-resources/update-from-chrome-svn.sh
1616
.eslintrc.json
1717
webextension/.eslintrc.json
1818
.eslintignore
19+
node_modules

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ root = true
66
end_of_line = lf
77
insert_final_newline = true
88
charset = utf-8
9+
trim_trailing_whitespace = true
910

1011
[src/chrome/content/rules/*.xml]
1112
indent_style = tab

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
.idea
66
.vagrant
77
.venv/
8+
.venv2/
9+
.venv3/
810
chromium.pem
911
from-preloads/
1012
pkg/

.travis.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,38 @@ sudo: required
22
os: linux
33
dist: trusty
44
language: python
5-
python: 2.7
5+
python: 3.6
6+
group: deprecated-2017Q4
67
services:
78
- docker
89
matrix:
910
fast_finish: true
1011
include:
11-
- env: INFO="lint"
12+
- env: TEST="lint"
1213
language: node_js
1314
node_js:
1415
- "node"
15-
- env: INFO="unittests"
16+
- env: TEST="unittests"
1617
language: node_js
1718
node_js: node
1819
- "node"
19-
- env: INFO="rules"
20-
- env: INFO="fetch"
21-
- env: INFO="preloaded"
20+
- env: TEST="validations"
21+
- env: TEST="fetch"
22+
- env: TEST="preloaded"
2223
- addons:
2324
chrome: beta
24-
env: INFO="chrome beta" BROWSER=google-chrome-beta
25+
env: TEST="chrome beta" BROWSER=google-chrome-beta
2526
- addons:
2627
chrome: stable
27-
env: INFO="chrome stable" BROWSER=google-chrome-stable
28+
env: TEST="chrome stable" BROWSER=google-chrome-stable
2829
- addons:
2930
firefox: latest
30-
env: INFO="firefox" BROWSER=firefox
31+
env: TEST="firefox" BROWSER=firefox
3132
- addons:
3233
firefox: latest-esr
33-
env: INFO="firefox esr" BROWSER=firefox
34+
env: TEST="firefox esr" BROWSER=firefox
3435
before_install:
3536
- export DISPLAY=:99.0
3637
- sh -e /etc/init.d/xvfb start
37-
before_script: travis_retry ./setup_travis.sh
38-
script: . ./run_travis.sh
38+
before_script: travis_retry test/setup_travis.sh
39+
script: . test/run_travis.sh

CONTRIBUTING.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* [Regular Rules](#regular-rules)
3131
* [HSTS Preloaded Rules](#hsts-preloaded-rules)
3232
* [Contributing Code](#contributing-code)
33+
* [Contributing Documentation](#contributing-documentation)
3334
* [Contributing Translations](#contributing-translations)
3435

3536
* * *
@@ -55,7 +56,7 @@ There are several main areas of development on HTTPS Everywhere: the rulesets, t
5556

5657
The rulesets can be found in the [`rules`](rules) top-level path and include all the rules for redirecting individual sites to HTTPS. These are written in XML. If you want to get started contributing to HTTPS Everywhere, we recommend starting here.
5758

58-
The core codebase consists of the code that performs the redirects, the UI, logging code, and ruleset loading. This encompasses all code delivered with the extension itself that is *not* a ruleset. It is written in JavaScript, using the `WebExtensions` API (located in [`chromium`](chromium)) on all supported browsers. In Firefox, this extension is wrapped in a thin `XPCOM` layer for the purposes of migrating settings, located in [`src`](src), which will soon be deprecated.
59+
The core codebase consists of the code that performs the redirects, the UI, logging code, and ruleset loading. This encompasses all code delivered with the extension itself that is *not* a ruleset. It is written in JavaScript, using the `WebExtensions` API (located in [`chromium`](chromium)).
5960

6061
The utilities ([`utils`](utils) top-level path) include scripts that build the extension, sanitize and perform normalization on rulesets, simplify rules, and help label GitHub issues. Historically, these utilities have been written in Python. Many of the newer utilities are written in JavaScript, and are meant to be run in node. Some of the wrappers for these utilities are in shell scripts.
6162

@@ -103,7 +104,7 @@ Some `rulesets` have the attribute `platform="mixedcontent"`. These `rulesets`
103104

104105
## New Rulesets
105106

106-
If you want to create new `rulesets` to submit to us, we expect them to be in the `src/chrome/content/rules` directory. That directory also contains a useful script, `make-trivial-rule`, to create a simple `ruleset` for a specified domain. There is also a script called `utils/trivial-validate.py`, to check all the pending `rulesets` for several common errors and oversights. For example, if you wanted to make a `ruleset` for the `example.com` domain, you could run:
107+
If you want to create new `rulesets` to submit to us, we expect them to be in the `src/chrome/content/rules` directory. That directory also contains a useful script, `make-trivial-rule`, to create a simple `ruleset` for a specified domain. There is also a script in `test/validations/special/run.py`, to check all the pending `rulesets` for several common errors and oversights. For example, if you wanted to make a `ruleset` for the `example.com` domain, you could run:
107108
```
108109
cd src/chrome/content/rules
109110
bash ./make-trivial-rule example.com
@@ -148,7 +149,7 @@ Avoid using the left-wildcard (`<target host="*.example.com" />`) unless you int
148149

149150
Instead, prefer listing explicit target hosts and a single rewrite from `"^http:"` to `"^https:"`. This saves you time as a ruleset author because each explicit target host automatically creates an implicit test URL, reducing the need to add your own test URLs. These also make it easier for someone reading the ruleset to figure out which subdomains are covered.
150151

151-
If you know all subdomains of a given domain support HTTPS, go ahead and use a left-wildcard, along with a plain rewrite from `"^http:"` to `"^https:"`. Make sure to add a bunch of test URLs for the more important subdomains.
152+
If you know all subdomains of a given domain support HTTPS, go ahead and use a left-wildcard, along with a plain rewrite from `"^http:"` to `"^https:"`. Make sure to add a bunch of test URLs for the more important subdomains.
152153

153154
#### Edge-Case: Right-Wildcards
154155

@@ -334,7 +335,7 @@ In `utils` we have a tool called `hsts-prune` which removes `targets` from rules
334335
Every new pull request automatically has the `hsts-prune` utility applied to it as part of the continual integration process. If a new PR introduces a `target` which is preloaded, it will fail the CI test suite. See:
335336

336337
- `.travis.yml`
337-
- `test/travis.sh`
338+
- `test/run_travis.sh`
338339

339340
* * *
340341

@@ -356,6 +357,20 @@ Several of our utilities and our full test suite is written in Python. Eventual
356357

357358
* * *
358359

360+
# Contributing Documentation
361+
362+
Standalone documentation should be written in [Markdown](https://en.wikipedia.org/wiki/Markdown) that follows the [Google style guide](https://github.com/google/styleguide/blob/gh-pages/docguide/style.md). If you are updating existing documentation that does not follow the Google style guide, then you should follow the style of the file you are updating.
363+
364+
* * *
365+
366+
# Pull Requests from Deleted Accounts
367+
368+
Sometimes a contributor will [delete their GitHub account](https://help.github.com/articles/deleting-your-user-account/) after submitting a pull request, resulting in the pull request being associated with the [Ghost user (@ghost)](https://github.com/ghost). These @ghost pull requests can cause problems for HTTPS Everywhere maintainers, leaving questions unanswered and closing off the possibility of receiving maintainer feedback to solicit clarification or request changes.
369+
370+
We ask that if you want to delete your GitHub account, you either close your HTTPS Everywhere pull requests before you delete your account, or wait to delete your account until we merge your pull requests. Otherwise, maintainers are free to close @ghost pull requests without any comment.
371+
372+
* * *
373+
359374
# Contributing Translations
360375

361376
HTTPS Everywhere translations are handled through Transifex. The easiest way to help with translations is to [create a Transifex account](https://www.transifex.com/signup/) if you don't already have one. Then log into your account and click "Explore", then search for "Tor Project", and click on The Tor Project. Then choose the language you plan to translate into, click on the name of that language, and then click "Join team" and "Go" to accept joining the translation team for your language.

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:17.10
22

33
# general build deps
44
RUN apt-get update && apt-get install -y \
@@ -39,7 +39,8 @@ RUN apt-get install -y \
3939
xvfb \
4040
libssl-dev \
4141
git \
42-
chromium-chromedriver
42+
chromium-chromedriver \
43+
rsync
4344

4445
RUN pip install \
4546
lxml>=3.3.3 \

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
node {
1+
node("master") {
22

33
stage 'checkout'
44

LICENSE.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ To the extent copyright applies to the rulesets, they can be used according to G
88
Issue Format Bot (utils/issue-format-bot/*):
99
Copyright © 2017 AJ Jordan, AGPLv3+
1010

11-
The build system incorporates code from Python 2.6,
12-
Copyright © 2001-2006 Python Software Foundation
13-
Python Software Foundation License Version 2
11+
The build system incorporates code from Python 3.6
12+
Copyright © 2001-2018 Python Software Foundation; All Rights Reserved

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Get the packages you need and install a git hook to run tests before push:
99

1010
bash install-dev-dependencies.sh
1111

12-
Run all the tests:
12+
Run the ruleset validations and browser tests:
1313

1414
bash test.sh
1515

@@ -50,20 +50,18 @@ This is the source tree for HTTPS Everywhere for Firefox and Chrome.
5050

5151
Important directories you might want to know about
5252

53-
src/ The Firefox source
5453

55-
chromium/ The Chromium/Chrome source
56-
(not to be confused with Firefox browser "chrome" or UI)
54+
chromium/ WebExtension source code (for Firefox & Chromium/chrome)
55+
chromium/external External dependencies
56+
chromium/test Unit tests
5757

58-
src/components |
59-
src/chrome/content | Firefox JavaScript and XUL code
60-
src/chrome/content/code |
58+
rules/ Symbolic link to src/chrome/content/rules
6159

62-
src/chrome/content/rules The rulesets live here
60+
src/chrome/content/rules Ruleset files live here
6361

64-
test/ The tests live here
62+
test/ Travis unit test source code live here
6563

66-
utils/ Various utilities
64+
utils/ Various utilities (includes some Travis test source)
6765

6866
Hacking on the Source Code
6967
--------------------------

0 commit comments

Comments
 (0)