usd 1.1 → 1.2

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/change_log.md +6 -1
  3. data/lib/usd.rb +8 -0
  4. data/usd.gemspec +16 -16
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34c19bfe569d436235dd61b312a9f7edcb191c3598daf05f77c94664efda6a5a
4
- data.tar.gz: 1e84341f1befdb3eb2dab78e2a0516f7b21b55413e6635da588deefd889d3ce8
3
+ metadata.gz: 278dc411942f77e45434ee0463e50b748af2f65f373923107b979d4c41cf8064
4
+ data.tar.gz: '0265695f32cf5e377cf94d0e49c1370923d278cd625b557bc188bd0bd1bb6f0e'
5
5
  SHA512:
6
- metadata.gz: 80fa09424ea66980cee551c30dcdc337237c25c125ea66105a43f1672e5da297d9fc64730f4d1e2650ecf2c3692408c22566a447cd3d729a018c2f065276afff
7
- data.tar.gz: 19172f70b81b7ede21f11639c6469a3f5d85137499e4611b065a3a6042529b3a1aa213d943114dc7ad86024fb2644b5557c9610b6363c6347c0e90505c845df3
6
+ metadata.gz: 8ade7a831bc17847218142b30ad9a0d30b57d2b214b021c42befc4775271a376ec4d2a600ea0272595da3b1f018fc5a02b1a5f51792995142e7a3936b0ed624e
7
+ data.tar.gz: 650d000528d4af5d2132e7737dca6aa2fbcfd9e0bb74d85b981753727ef2f9feb80c5d82fcae33c3456d7a0818053b947ddfe066bb7c59b022496850d65f38c4
@@ -1,6 +1,11 @@
1
1
  # rusdc changelog
2
2
 
3
- ## 1.0
3
+ ## 1.2
4
+
5
+ - now in Usd.search function:
6
+ - whereclause is enriched with "common_name like '% wc%'" if it is not a valid whereclause.
7
+
8
+ ## 1.0 and 1.1
4
9
 
5
10
  - `update_ref_attr` rusdc-function fetches the IDs to update the object by itself.
6
11
 
data/lib/usd.rb CHANGED
@@ -248,6 +248,14 @@ class Usd
248
248
  attr.push set_url_parm(params,"start","1")
249
249
  attr.push set_url_parm(params,"size","50")
250
250
  attr.push set_url_parm(params,"WC","")
251
+ # if wc contains no sql-compare operater, it will be changed to "COMMON_NAME like '%<wc-before>%'"
252
+ wc = attr.pop
253
+ wc.gsub!(/^WC=/,'')
254
+ if ([" like ","<",">","="," is "].find {|e| wc =~ /#{e}/}).nil?
255
+ wc = "#{CN[object]} like '%#{wc}%'"
256
+ end
257
+ attr.push "WC=#{wc}"
258
+ # puts attr.jp # debug
251
259
  fields = set_param(params,"fields","COMMON_NAME,id")
252
260
  query_string=attr.join("&")
253
261
  res_rdata = request("/caisd-rest/#{object}?#{query_string}",{:method => "get", :header => header({'X-Obj-Attrs' => fields})})
@@ -1,16 +1,16 @@
1
- Gem::Specification.new do |spec|
2
- spec.name = 'usd'
3
- spec.version = '1.1'
4
- spec.date = '2020-08-31'
5
- spec.summary = "SDM REST-API-Calls"
6
- spec.description = "a Ruby class and a commandlinetool for SDM REST-API-Calls"
7
- spec.authors = ["Oliver Gaida"]
8
- spec.email = 'oliver.gaida@sycor.de'
9
- #spec.files = ["bin/rusdc", "bin/set_env", "lib/usd.rb"] # Dir["*/*"]
10
- spec.files = `git ls-files`.split($/)
11
- spec.homepage = 'https://github.com/ogaida/usd'
12
- spec.executables = %w(rusdc)
13
- spec.add_runtime_dependency 'thor', '~> 0.20', '>= 0.20.3'
14
- spec.add_runtime_dependency 'rest-client', '~> 2.0', '>= 2.0.0'
15
- spec.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
16
- end
1
+ Gem::Specification.new do |spec|
2
+ spec.name = 'usd'
3
+ spec.version = '1.2'
4
+ spec.date = '2020-09-02'
5
+ spec.summary = "SDM REST-API-Calls"
6
+ spec.description = "a Ruby class and a commandlinetool for SDM REST-API-Calls"
7
+ spec.authors = ["Oliver Gaida"]
8
+ spec.email = 'oliver.gaida@sycor.de'
9
+ #spec.files = ["bin/rusdc", "bin/set_env", "lib/usd.rb"] # Dir["*/*"]
10
+ spec.files = `git ls-files`.split($/)
11
+ spec.homepage = 'https://github.com/ogaida/usd'
12
+ spec.executables = %w(rusdc)
13
+ spec.add_runtime_dependency 'thor', '~> 0.20', '>= 0.20.3'
14
+ spec.add_runtime_dependency 'rest-client', '~> 2.0', '>= 2.0.0'
15
+ spec.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usd
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Gaida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-31 00:00:00.000000000 Z
11
+ date: 2020-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor