summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml18
-rw-r--r--Makefile2
-rw-r--r--README.md3
-rw-r--r--ranger/core/main.py3
4 files changed, 23 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..2bc017d3
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,18 @@
+language: python
+python:
+  - "2.6"
+  - "2.7"
+  - "3.2"
+  - "3.3"
+  - "3.4"
+  - "3.5"
+  - "3.5-dev" # 3.5 development branch
+  - "nightly" # currently points to 3.6-dev
+
+# command to install dependencies
+install:
+  - pip install pytest
+
+# command to run tests
+script:
+  - make test
diff --git a/Makefile b/Makefile
index 5de061ff..870901da 100644
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,7 @@ test:
 		echo "Testing $$FILE..."; \
 		RANGER_DOCTEST=1 PYTHONPATH=".:"$$PYTHONPATH ${PYTHON} $$FILE; \
 	done
-	@if type -t py.test > /dev/null; then \
+	@if type py.test > /dev/null; then \
 		echo "Running py.test tests..."; \
 		py.test tests; \
 	else \
diff --git a/README.md b/README.md
index 20a84964..b5fc03ea 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
 ranger v.1.7.2
 ==============
+
+[![Build Status](https://travis-ci.org/ranger/ranger.svg?branch=master)](https://travis-ci.org/ranger/ranger)
+
 ranger is a console file manager with VI key bindings.  It provides a
 minimalistic and nice curses interface with a view on the directory hierarchy.
 It ships with "rifle", a file launcher that is good at automatically finding
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 62a21b85..528d849c 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -6,7 +6,6 @@
 import os.path
 import sys
 import tempfile
-import importlib
 
 
 def main():
@@ -304,7 +303,7 @@ def load_settings(fm, clean):
             ranger.fm = fm
             for plugin in sorted(plugins):
                 try:
-                    module = importlib.import_module('plugins.' + plugin)
+                    module = __import__('plugins', fromlist=[plugin])
                     fm.commands.load_commands_from_module(module)
                     fm.log.append("Loaded plugin '%s'." % plugin)
                 except Exception as e: