tes-request 0.3 → 0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2801298fca82cc8a1001b03f767bc40762bb584
4
- data.tar.gz: d03c89d8663d1e995ba8874a6f5a47decb86e7b9
3
+ metadata.gz: 3d0275c362a3e421084ffed8f81836519569ca20
4
+ data.tar.gz: 4c0361fb7ce849ee3bab2980e0530fd50ea1025e
5
5
  SHA512:
6
- metadata.gz: 5a804cb2eec661e57d60fb074ee95e7d4d070b1f4aa8df3992e6497fa5fa7b4f101cef785ce195d9e9e54b6de1bd9304231068f9ec968e542fca84fe7c356e20
7
- data.tar.gz: af30855c4cc23fd18318eb78bd3dab35b171bd216cb08cfe5cba2937180fef4aa927e2b977d59a0f39764b6df96f91786cb00c99467f8858af835534e54cf0ba
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/wuhuizuo/tes-request.svg)](https://travis-ci.org/wuhuizuo/tes-request)
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/wuhuizuo/tes-request.
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_.]+)(\?|=|>=|<=|<|>)?(-?[\w]+(\.[\d]+)?)?/
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
@@ -1,5 +1,5 @@
1
1
  module Tes
2
2
  module Request
3
- VERSION = '0.3'
3
+ VERSION = '0.4'
4
4
  end
5
5
  end
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.3'
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-05-26 00:00:00.000000000 Z
11
+ date: 2017-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: java-properties