diff --git a/.travis.yml b/.travis.yml
index f55d7f5..58e40d8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,10 @@
language: node_js
node_js:
- - 0.8
-
-before_script:
- - export DISPLAY=:99.0
- - sh -e /etc/init.d/xvfb start
- - npm install --quiet -g karma
- - ./scripts/web-server.js > /dev/null &
- - sleep 1 # give server time to start
-
-script:
- - karma start config/karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
- - karma start config/karma-e2e.conf.js --reporters=dots --browsers=Firefox
+ - "node"
+ - "6"
+ - "6.1"
+ - "5.11"
+ - "4"
+ - "0.12"
+ - "0.6"
+ - "iojs"
diff --git a/app/css/calendar.css b/app/css/calendar.css
deleted file mode 100644
index 743e694..0000000
--- a/app/css/calendar.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.community-calendar li { list-style-type: none; }
-.cc-event { border: 1px solid black; }
-.cc-event-title { font-weight: bold; }
-.cc-event-date {}
diff --git a/app/index.html b/app/index.html
index fc3a540..8d9ab40 100644
--- a/app/index.html
+++ b/app/index.html
@@ -10,11 +10,11 @@
+
-
diff --git a/app/js/seed-app.js b/app/js/seed-app.js
deleted file mode 100644
index d32c16e..0000000
--- a/app/js/seed-app.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-
-// Declare app level module which depends on filters, and services
-angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers']).
- config(['$routeProvider', function($routeProvider) {
- $routeProvider.when('/view1', {templateUrl: 'partials/seed-partial1.html', controller: 'MyCtrl1'});
- $routeProvider.when('/view2', {templateUrl: 'partials/seed-partial2.html', controller: 'MyCtrl2'});
- $routeProvider.otherwise({redirectTo: '/view1'});
- }]);
-
diff --git a/app/js/seed-controllers.js b/app/js/seed-controllers.js
deleted file mode 100644
index 35dc54d..0000000
--- a/app/js/seed-controllers.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-/* Controllers */
-
-angular.module('myApp.controllers', []).
- controller('MyCtrl1', [function() {
-
- }])
- .controller('MyCtrl2', [function() {
-
- }]);
diff --git a/app/js/seed-directives.js b/app/js/seed-directives.js
deleted file mode 100644
index 9fc16cc..0000000
--- a/app/js/seed-directives.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-/* Directives */
-
-
-angular.module('myApp.directives', []).
- directive('appVersion', ['version', function(version) {
- return function(scope, elm, attrs) {
- elm.text(version);
- };
- }]);
diff --git a/app/js/seed-filters.js b/app/js/seed-filters.js
deleted file mode 100644
index 259dd4e..0000000
--- a/app/js/seed-filters.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-/* Filters */
-
-angular.module('myApp.filters', []).
- filter('interpolate', ['version', function(version) {
- return function(text) {
- return String(text).replace(/\%VERSION\%/mg, version);
- }
- }]);
diff --git a/app/js/seed-services.js b/app/js/seed-services.js
deleted file mode 100644
index 334d543..0000000
--- a/app/js/seed-services.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-/* Services */
-
-
-// Demonstrate how to register services
-// In this case it is a simple value service.
-angular.module('myApp.services', []).
- value('version', '0.1');
diff --git a/app/partials/home.html b/app/partials/home.html
new file mode 100644
index 0000000..6671b86
--- /dev/null
+++ b/app/partials/home.html
@@ -0,0 +1 @@
+sTeam-REST API
diff --git a/app/partials/seed-partial1.html b/app/partials/seed-partial1.html
deleted file mode 100644
index 89459a6..0000000
--- a/app/partials/seed-partial1.html
+++ /dev/null
@@ -1 +0,0 @@
-This is the partial for view 1.
diff --git a/app/partials/seed-partial2.html b/app/partials/seed-partial2.html
deleted file mode 100644
index b6503ee..0000000
--- a/app/partials/seed-partial2.html
+++ /dev/null
@@ -1,5 +0,0 @@
-This is the partial for view 2.
-
- Showing of 'interpolate' filter:
- {{ 'Current version is v%VERSION%.' | interpolate }}
-
diff --git a/app/seed-index.html b/app/seed-index.html
deleted file mode 100644
index 25d1f4e..0000000
--- a/app/seed-index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
- My AngularJS App
-
-
-
-
-
-
-
- Angular seed app: v
-
-
-
-
-
-
-
-
-
-
diff --git a/bower.json b/bower.json
index f5d10c0..2bd074b 100644
--- a/bower.json
+++ b/bower.json
@@ -1,5 +1,5 @@
{
- "name": "CommunityCalendar",
+ "name": "bower",
"version": "0.1",
"private": true,
"ignore": [
@@ -11,6 +11,9 @@
],
"dependencies": {
"angular": "",
- "angular-route": "~1.4.8"
+ "angular-route": "~1.4.8",
+ "angular-ui-router": "",
+ "angular-bootstrap": "",
+ "bootstrap": ""
}
}
diff --git a/config/karma-e2e.conf.js b/config/karma-e2e.conf.js
deleted file mode 100644
index e06b39d..0000000
--- a/config/karma-e2e.conf.js
+++ /dev/null
@@ -1,22 +0,0 @@
-basePath = '../';
-
-files = [
- ANGULAR_SCENARIO,
- ANGULAR_SCENARIO_ADAPTER,
- 'test/e2e/**/*.js'
-];
-
-autoWatch = false;
-
-browsers = ['Firefox'];
-
-singleRun = true;
-
-proxies = {
- '/': 'http://localhost:8000/'
-};
-
-junitReporter = {
- outputFile: 'test_out/e2e.xml',
- suite: 'e2e'
-};
diff --git a/config/karma.conf.js b/config/karma.conf.js
deleted file mode 100644
index 2ff1c24..0000000
--- a/config/karma.conf.js
+++ /dev/null
@@ -1,22 +0,0 @@
-basePath = '../';
-
-files = [
- JASMINE,
- JASMINE_ADAPTER,
- 'app/lib/angular/angular.js',
- 'app/lib/angular/angular-*.js',
- 'test/lib/angular/angular-mocks.js',
- 'app/js/**/*.js',
- 'src/js/**/*.coffee',
- 'test/unit/**/*.js',
- 'test/unit/**/*.coffee'
-];
-
-autoWatch = true;
-
-browsers = ['Firefox'];
-
-junitReporter = {
- outputFile: 'test_out/unit.xml',
- suite: 'unit'
-};
diff --git a/package.json b/package.json
index 56b857e..b5aacc0 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "TechGrind",
+ "name": "sTeam-REST",
"version": "0.1.1",
"private": true,
"dependencies": {
@@ -11,7 +11,9 @@
"body-parser": "",
"serve-static": "",
"errorhandler": "",
- "bower": ""
+ "bower": "",
+ "jasmine-node": "",
+ "frisby": ""
},
"production_dirs": {
"coffee_src": "src/",
@@ -21,6 +23,7 @@
"devDependencies": {
},
"scripts": {
- "postinstall": "bower install"
+ "postinstall": "bower install",
+ "test": "jasmine-node --verbose test"
}
}
diff --git a/readme.md b/readme.md
index 845c52d..df64f98 100644
--- a/readme.md
+++ b/readme.md
@@ -1,4 +1,7 @@
-about this project
+[![Build Status](https://travis-ci.org/societyserver/steam-rest.svg?branch=master)](https://travis-ci.org/societyserver/steam-rest)
+
+
+About this project
==================
this project contains a set of examples and tests for the RESTful API for the
@@ -10,7 +13,7 @@ deployment can be done as static javascript files, and does not need any kind of
the back-end is a RESTful API written for the sTeam server as used by techgrind.asia
-development instructions
+Development instructions
========================
step 1: install node.js
diff --git a/scripts/e2e-test.bat b/scripts/e2e-test.bat
deleted file mode 100644
index 0b2aee6..0000000
--- a/scripts/e2e-test.bat
+++ /dev/null
@@ -1,11 +0,0 @@
-@echo off
-
-REM Windows script for running e2e tests
-REM You have to run server and capture some browser first
-REM
-REM Requirements:
-REM - NodeJS (http://nodejs.org/)
-REM - Karma (npm install -g karma)
-
-set BASE_DIR=%~dp0
-karma start "%BASE_DIR%\..\config\karma-e2e.conf.js" %*
diff --git a/scripts/e2e-test.sh b/scripts/e2e-test.sh
deleted file mode 100755
index 5d8a335..0000000
--- a/scripts/e2e-test.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-BASE_DIR=`dirname $0`
-
-echo ""
-echo "Starting Karma Server (http://karma-runner.github.io)"
-echo "-------------------------------------------------------------------"
-
-karma start $BASE_DIR/../config/karma-e2e.conf.js $*
diff --git a/scripts/test.sh b/scripts/test.sh
deleted file mode 100755
index 5fe9d02..0000000
--- a/scripts/test.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-BASE_DIR=`dirname $0`
-
-echo ""
-echo "Starting Karma Server (http://karma-runner.github.io)"
-echo "-------------------------------------------------------------------"
-
-karma start $BASE_DIR/../config/karma.conf.js $*
diff --git a/src/js/app.coffee b/src/js/app.coffee
index 5716f57..20f94df 100644
--- a/src/js/app.coffee
+++ b/src/js/app.coffee
@@ -14,7 +14,7 @@ app.config ['$urlRouterProvider', '$stateProvider', ($urlRouterProvider, $stateP
$stateProvider.state 'home',
url: '/home'
templateUrl: 'partials/home.html'
- controller: 'HomeCtrl'
+ controller: 'NavCtrl'
$stateProvider.state 'register',
url: '/register'
diff --git a/src/js/calendar.coffee b/src/js/calendar.coffee
deleted file mode 100644
index 2e092dd..0000000
--- a/src/js/calendar.coffee
+++ /dev/null
@@ -1,9 +0,0 @@
-app = angular.module 'myapp', ['LocalStorageModule','myapp.services']
-
-app.controller "MyCtrl", ($scope, steam) ->
- steam.get("techgrind.events/order-by-date").then (data) ->
- console.log("we have data!!!")
- console.log(JSON.stringify(data['event-list']))
- console.log(JSON.stringify(data))
- $scope.events = data['event-list']
- console.log(JSON.stringify($scope.events))
diff --git a/test/e2e/runner.html b/test/e2e/runner.html
index eca443c..9f241af 100644
--- a/test/e2e/runner.html
+++ b/test/e2e/runner.html
@@ -4,6 +4,7 @@
End2end Test Runner
+
diff --git a/test/e2e/seed-runner.html b/test/e2e/seed-runner.html
deleted file mode 100644
index 9ed5528..0000000
--- a/test/e2e/seed-runner.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- End2end Test Runner
-
-
-
-
-
-
-
diff --git a/test/e2e/seed-scenarios.js b/test/e2e/seed-scenarios.js
deleted file mode 100644
index eb6e957..0000000
--- a/test/e2e/seed-scenarios.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
-
-describe('my app', function() {
-
- beforeEach(function() {
- browser().navigateTo('/seed-index.html');
- });
-
-
- it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
- expect(browser().location().url()).toBe("/view1");
- });
-
-
- describe('view1', function() {
-
- beforeEach(function() {
- browser().navigateTo('#/view1');
- });
-
-
- it('should render view1 when user navigates to /view1', function() {
- expect(element('[ng-view] p:first').text()).
- toMatch(/partial for view 1/);
- });
-
- });
-
-
- describe('view2', function() {
-
- beforeEach(function() {
- browser().navigateTo('#/view2');
- });
-
-
- it('should render view2 when user navigates to /view2', function() {
- expect(element('[ng-view] p:first').text()).
- toMatch(/partial for view 2/);
- });
-
- });
-});
diff --git a/test/unit/controllersSpec.js b/test/unit/controllersSpec.js
deleted file mode 100644
index 23f6b09..0000000
--- a/test/unit/controllersSpec.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-/* jasmine specs for controllers go here */
-
-describe('controllers', function(){
- beforeEach(module('myApp.controllers'));
-
-
- it('should ....', inject(function() {
- //spec body
- }));
-
- it('should ....', inject(function() {
- //spec body
- }));
-});
diff --git a/test/unit/directivesSpec.js b/test/unit/directivesSpec.js
deleted file mode 100644
index 6061842..0000000
--- a/test/unit/directivesSpec.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-/* jasmine specs for directives go here */
-
-describe('directives', function() {
- beforeEach(module('myApp.directives'));
-
- describe('app-version', function() {
- it('should print current version', function() {
- module(function($provide) {
- $provide.value('version', 'TEST_VER');
- });
- inject(function($compile, $rootScope) {
- var element = $compile('')($rootScope);
- expect(element.text()).toEqual('TEST_VER');
- });
- });
- });
-});
diff --git a/test/unit/filtersSpec.js b/test/unit/filtersSpec.js
deleted file mode 100644
index 19af329..0000000
--- a/test/unit/filtersSpec.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-/* jasmine specs for filters go here */
-
-describe('filter', function() {
- beforeEach(module('myApp.filters'));
-
-
- describe('interpolate', function() {
- beforeEach(module(function($provide) {
- $provide.value('version', 'TEST_VER');
- }));
-
-
- it('should replace VERSION', inject(function(interpolateFilter) {
- expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after');
- }));
- });
-});
diff --git a/test/unit/servicesSpec.coffee b/test/unit/servicesSpec.coffee
deleted file mode 100644
index 79a9888..0000000
--- a/test/unit/servicesSpec.coffee
+++ /dev/null
@@ -1,7 +0,0 @@
-# jasmine specs for services go here
-
-describe 'service', ->
- beforeEach module 'myApp.services'
- describe 'version', ->
- it 'should return current version', inject (version) ->
- expect(version).toEqual('0.1')