!1 Package init

Merge pull request !1 from 雷炬/master
This commit is contained in:
openeuler-ci-bot 2020-09-08 18:28:07 +08:00 committed by Gitee
commit 5fb18d47cf
6 changed files with 78 additions and 73 deletions

BIN
1.1.3.tar.gz Normal file

Binary file not shown.

View File

@ -1,36 +0,0 @@
# nodejs-fast-levenshtein
#### Description
Efficient implementation of Levenshtein algorithm
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,37 +0,0 @@
# nodejs-fast-levenshtein
#### 介绍
Efficient implementation of Levenshtein algorithm
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -0,0 +1,22 @@
diff --git a/test/tests.js b/test/tests.js
index 54b9222..49628c5 100644
--- a/test/tests.js
+++ b/test/tests.js
@@ -108,7 +108,7 @@ var text1 = fs.readFileSync(__dirname + '/text1.txt', 'utf-8'),
exports['Async'] = {
'no progress callback': function(done) {
- this.timeout(20000);
+ this.timeout(40000);
var startTime = new Date().valueOf();
@@ -124,7 +124,7 @@ exports['Async'] = {
});
},
'with progress callback': function(done) {
- this.timeout(20000);
+ this.timeout(40000);
var percents = [];
var progress = function(percent) {

View File

@ -0,0 +1,52 @@
%{?nodejs_find_provides_and_requires}
%global packagename fast-levenshtein
%global enable_tests 1
Name: nodejs-fast-levenshtein
Version: 1.1.3
Release: 1
Summary: Efficient implementation of Levenshtein algorithm
License: MIT
URL: https://github.com/hiddentao/fast-levenshtein
Source0: https://github.com/hiddentao/fast-levenshtein/archive/%{version}.tar.gz
Patch0: fast-levenshtein_adjust-timeouts.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging uglify-js
%if 0%{?enable_tests}
BuildRequires: mocha npm(chai) npm(lodash)
%endif
%description
Efficient implementation of Levenshtein algorithm with asynchronous callback
support.
%prep
%autosetup -n fast-levenshtein-%{version} -S git
%build
%{_bindir}/uglifyjs levenshtein.js -o levenshtein.min.js
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json *.js \
%{buildroot}%{nodejs_sitelib}/%{packagename}
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/mocha -R spec
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif
%files
%{!?_licensedir:%global license %doc}
%doc README.md
%license LICENSE.md
%{nodejs_sitelib}/%{packagename}
%changelog
* Fri Aug 21 2020 leiju <leiju4@huawei.com> - 1.1.3-1
- Package init

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: hiddentao/fast-levenshtein
tag_prefix: "^"
seperator: "."