Skip to content

Commit

Permalink
Merge branch 'dev' into bug/settings-page-studio
Browse files Browse the repository at this point in the history
  • Loading branch information
dorosh authored Feb 6, 2017
2 parents a60dfb0 + c15a1bd commit 496de26
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 27 deletions.
8 changes: 8 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"directory": "video_xblock/static/bower_components",
"scripts": {
"preinstall": "",
"postinstall": "",
"preuninstall": ""
}
}
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@ python:
- "2.7.10"
- "2.7.13"

cache: pip
cache:
pip: true
directories:
- node_modules # NPM packages

before_install:
# Install latest stable NodeJS version. Required for eslint.
- nvm install stable
# Install binary package for lxml to speed up build
- sudo apt-get -qq update
- sudo apt-get install -y python-lxml
- pip install -r test_requirements.txt

before_script:
- make deps-test
# Install eslint, eslint-config-edx and their dependencies
- npm install "eslint@^2.12.0" eslint-config-edx "[email protected]" "eslint-plugin-import@^1.9.2"
- make tools

script:
- make quality-py
Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

all: quality test

clean:
-rm -rf node_modules/

test: test-py

test-py:
Expand All @@ -16,5 +19,15 @@ quality-py:
quality-js:
eslint video_xblock/static/js/

deps:
pip install -r requirements.txt
bower install

deps-test:
pip install -r test_requirements.txt

tools:
npm install "eslint@^2.12.0" eslint-config-edx "[email protected]" "eslint-plugin-import@^1.9.2"

package:
echo "Here be static dependencies packaging"
27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
[![Coverage Status](https://coveralls.io/repos/github/raccoongang/xblock-video/badge.svg?branch=dev)](https://coveralls.io/github/raccoongang/xblock-video?branch=dev)

# xblock-video

XBlock to embed videos hosted on different video platform into your courses.

## Installation

```bash
```shell
sudo -sHu edxapp
source ~/edxapp_env
# Clone and install xblock
git clone https://github.com/raccoongang/xblock-video.git
cd xblock-video
pip install -e .
# Install external JavaScript dependencies
cd video_xblock/static
bower install
# Install Python and JavaScript dependencies
make deps
```

## Enabling in Studio

You can enable the Wistia xblock in studio through the advanced
settings:

Expand All @@ -38,15 +39,14 @@ TODO

Install dependencies and development tools:
```shell
> pip install -r requirements.txt
> pip install -r test_requirements.txt
> npm install "eslint@^2.12.0" eslint-config-edx "[email protected]" "eslint-plugin-import@^1.9.2"
> make deps deps-test tools
```

Run quality checks:
```shell
> make quality
```

Run tests:
```shell
> make test
Expand All @@ -57,16 +57,3 @@ Run tests:
The code in this repository is licensed under the GPL v3 licence unless otherwise noted.

Please see `LICENSE` file for details.


## Tests

Assuming revealjs is installed as above, you can run python tests like so:

```nosetests video_xblock```

To get statement coverage:

```nosetests video_xblock --with-coverage --coverage-package=video_xblock```


File renamed without changes.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
git+https://github.com/edx/XBlock.git#egg=XBlock==0.4.12
git+https://github.com/edx/xblock-utils.git#egg=xblock-utils==1.0.2
git+https://github.com/edx/XBlock.git@xblock-0.4.12#egg=XBlock==0.4.12
git+https://github.com/edx/xblock-utils.git@v1.0.2#egg=xblock-utils==1.0.2
pycaption<1.0 # The latest Python 2.7 compatible version
requests==2.9.1
babelfish==0.5.5
4 changes: 2 additions & 2 deletions video_xblock/static/js/player_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ var saveState = function() {
* Save player progress in browser's local storage.
* We need it when user is switching between tabs.
*/
var saveProgressToLocalStore = function() {
var saveProgressToLocalStore = function saveProgressToLocalStore() {
var player = this;
var playbackProgress = localStorage.getItem('playbackProgress');
if (playbackProgress === undefined) {
if (!playbackProgress) {
playbackProgress = '{}';
}
playbackProgress = JSON.parse(playbackProgress);
Expand Down

0 comments on commit 496de26

Please sign in to comment.