forked from jasmine/jasmine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Greg Cobb and Luan Santos
committed
Mar 11, 2014
1 parent
ba6f994
commit 3e739e4
Showing
8 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
recursive-include . *.py | ||
include lib/jasmine-core/*.js | ||
include lib/jasmine-core/*.css | ||
include images/*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .core import Core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import pkg_resources | ||
|
||
try: | ||
from collections import OrderedDict | ||
except ImportError: | ||
from ordereddict import OrderedDict | ||
|
||
class Core(object): | ||
@classmethod | ||
def js_package(cls): | ||
return __package__ | ||
|
||
@classmethod | ||
def css_package(cls): | ||
return __package__ | ||
|
||
@classmethod | ||
def image_package(cls): | ||
return __package__ + ".images" | ||
|
||
@classmethod | ||
def js_files(cls): | ||
js_files = sorted(list(filter(lambda x: '.js' in x, pkg_resources.resource_listdir(cls.js_package(), '.')))) | ||
|
||
# jasmine.js needs to be first | ||
js_files.insert(0, 'jasmine.js') | ||
|
||
# boot needs to be last | ||
js_files.remove('boot.js') | ||
js_files.append('boot.js') | ||
|
||
return cls._uniq(js_files) | ||
|
||
@classmethod | ||
def css_files(cls): | ||
return cls._uniq(sorted(filter(lambda x: '.css' in x, pkg_resources.resource_listdir(cls.css_package(), '.')))) | ||
|
||
@classmethod | ||
def favicon(cls): | ||
return 'jasmine_favicon.png' | ||
|
||
@classmethod | ||
def _uniq(self, items, idfun=None): | ||
# order preserving | ||
|
||
if idfun is None: | ||
def idfun(x): return x | ||
seen = {} | ||
result = [] | ||
for item in items: | ||
marker = idfun(item) | ||
# in old Python versions: | ||
# if seen.has_key(marker) | ||
# but in new ones: | ||
if marker in seen: | ||
continue | ||
|
||
seen[marker] = 1 | ||
result.append(item) | ||
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ordereddict==1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from setuptools import setup, find_packages, os | ||
import json | ||
|
||
with open('package.json') as packageFile: | ||
version = json.load(packageFile)['version'] | ||
|
||
setup( | ||
name="jasmine-core", | ||
version=version, | ||
url="http://pivotal.github.io/jasmine/", | ||
author="Pivotal Labs", | ||
author_email="[email protected]", | ||
description=('Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on '+ | ||
'browsers, DOM, or any JavaScript framework. Thus it\'s suited for websites, '+ | ||
'Node.js (http://nodejs.org) projects, or anywhere that JavaScript can run.'), | ||
license='MIT', | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Console', | ||
'Environment :: Web Environment', | ||
'Framework :: Django', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.6', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.2', | ||
'Programming Language :: Python :: 3.3', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
'Topic :: Internet :: WWW/HTTP', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: Software Development :: Build Tools', | ||
'Topic :: Software Development :: Quality Assurance', | ||
'Topic :: Software Development :: Testing', | ||
], | ||
|
||
packages=['jasmine_core', 'jasmine_core.images'], | ||
package_dir={'jasmine_core': 'lib/jasmine-core', 'jasmine_core.images': 'images'}, | ||
package_data={'jasmine_core': ['*.js', '*.css'], 'jasmine_core.images': ['*.png']}, | ||
|
||
include_package_data=True, | ||
|
||
install_requires=['glob2>=0.4.1', 'ordereddict==1.1'] | ||
) |