tes-request 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/tes/request/expression.rb +8 -1
- data/lib/tes/request/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d0275c362a3e421084ffed8f81836519569ca20
|
4
|
+
data.tar.gz: 4c0361fb7ce849ee3bab2980e0530fd50ea1025e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae5cce1cfdac34fa69937fdc6b7e4af2580593173b83e34bc92b7ca05b85e223824d7368e52d5508440c9a959c9cba0193a5e3cbb0ffe8c715602dc20360bd39
|
7
|
+
data.tar.gz: 156bc1b8568c7c7bd76ba4daee49256142309b17da9104e181a527337f61477cc8d9713d46d5190e880c534523ce081b6be42e9d9a2caf1bef00d2447cfdd0ce
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Tes::Request
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/
|
3
|
+
[![Build Status](https://travis-ci.org/sangfor-vtt/tes-request.svg)](https://travis-ci.org/sangfor-vtt/tes-request)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/tes-request.svg)](https://rubygems.org/gems/tes-request)
|
5
5
|
|
6
6
|
TES(Test Env Service) request profile struct, manager lib and request tools
|
@@ -86,7 +86,7 @@ $ tes-client
|
|
86
86
|
|
87
87
|
## Contributing
|
88
88
|
|
89
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
89
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sangfor-vtt/tes-request.
|
90
90
|
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
91
91
|
|
92
92
|
## License
|
@@ -3,7 +3,7 @@ module Tes
|
|
3
3
|
class Expression
|
4
4
|
include Comparable
|
5
5
|
|
6
|
-
REG_EXP_CHAIN = /^(!)?([0-9A-Za-z_.]+)(
|
6
|
+
REG_EXP_CHAIN = /^(!)?([0-9A-Za-z_.]+)(\?|=|>=|<=|<|>|!=)?(-?[\w]+(\.[\d]+)?)?/
|
7
7
|
|
8
8
|
# @param [String] exp_str 表达式字符串
|
9
9
|
def initialize(exp_str)
|
@@ -13,6 +13,7 @@ module Tes
|
|
13
13
|
@data = {}
|
14
14
|
@data[:revert] = true if mt[1]
|
15
15
|
@data[:left_exp] = mt[2]
|
16
|
+
|
16
17
|
if mt[3]
|
17
18
|
@data[:op] = mt[3]
|
18
19
|
if mt[4]
|
@@ -20,6 +21,12 @@ module Tes
|
|
20
21
|
if @data[:expect_val] =~ /^-?\d+(\.[\d]+)?/
|
21
22
|
@data[:expect_val] = mt[5] ? @data[:expect_val].to_f : @data[:expect_val].to_i
|
22
23
|
end
|
24
|
+
|
25
|
+
# 处理前置 逻辑非 与表达式中的不等比较符
|
26
|
+
if @data[:op] == '!='
|
27
|
+
@data[:revert] = (@data[:revert] ? false : true)
|
28
|
+
@data[:op] = '='
|
29
|
+
end
|
23
30
|
end
|
24
31
|
end
|
25
32
|
end
|
data/lib/tes/request/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tes-request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wuhuizuo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: java-properties
|