dynarex 1.5.26 → 1.5.27

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 648a0a423a4e7fc466e6d400e7d6c67eff091c21
4
- data.tar.gz: 030d0a41abde5c9991130ba18129f32a7defc147
3
+ metadata.gz: bdf53cf29ad59049ba3cc051e83c5dcc6bf1bdce
4
+ data.tar.gz: b4523f7fc0fdbf14beff8058e5b710295ebabae6
5
5
  SHA512:
6
- metadata.gz: 4d5f64501a79fb8eb8af355d88d8e1774652f1b2d3edba9ba358860553673138d8b44dfb9aa292da300822a6148b0bffb925dddcd5233d596e9b6b1ec6c5f2ba
7
- data.tar.gz: 0aebb5ee12fd06892e7660a11a8edccbd4c8949a13097c2457de71a80c5cc7977f644b3d3956d6be296688e14cb5d6f7244a7fd256dd10bdc1cca51acb4ece5d
6
+ metadata.gz: 06d70892f4e0fcd5d53c7d9f5b8d26f32f78b2834899b8783970402ff5d96909d6aec29fe4ccaa2482d5ef64948eff0d4027ee1dfd22292b053ee95a99da1199
7
+ data.tar.gz: 2a221c7f133992bfca3d2134865bce07c19a766b82a97950b76d5560a5db364b091c6521a973ae710b920a1781b8607b3b4a36a0ebd85db8550244925fbf765d
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -339,7 +339,7 @@ EOF
339
339
  # dynarex.create name: Bob, age: 52
340
340
 
341
341
  def create(arg, id=nil, custom_attributes: {})
342
-
342
+
343
343
  raise 'Dynarex#create(): input error: no arg provided' unless arg
344
344
 
345
345
  methods = {Hash: :hash_create, String: :create_from_line}
@@ -376,11 +376,12 @@ EOF
376
376
  # dynarex.update 4, name: Jeff, age: 38
377
377
 
378
378
  def update(id, params={})
379
- fields = capture_fields(params)
380
379
 
380
+ fields = capture_fields(params)
381
381
 
382
382
  # for each field update each record field
383
383
  record = @doc.root.element("records/#{@record_name}[@id='#{id.to_s}']")
384
+
384
385
  fields.each {|k,v| record.element(k.to_s).text = v if v}
385
386
  record.add_attribute(last_modified: Time.now.to_s)
386
387
 
@@ -678,7 +679,7 @@ EOF
678
679
  alias refresh_doc display_xml
679
680
 
680
681
  def parse_links(raw_lines)
681
- puts 'raw_lines : ' + raw_lines.inspect
682
+
682
683
  raw_lines.map do |line|
683
684
 
684
685
  buffer = RXFHelper.read(line.chomp).first
@@ -909,8 +910,14 @@ EOF
909
910
  ptrn = %r((\w+)\[?([^\]]+)?\]?\/(\w+)\(([^\)]+)\))
910
911
 
911
912
  if s.match(ptrn) then
913
+
912
914
  @root_name, raw_summary, record_name, raw_fields = s.match(ptrn).captures
913
- summary, fields = [raw_summary || '',raw_fields].map {|x| x.split(/,/).map &:strip}
915
+ summary, fields = [raw_summary || '',raw_fields].map {|x| x.split(/,/).map &:strip}
916
+
917
+ if fields.include? 'id' then
918
+ raise 'Dynarex#dynarex_new: schema field id is a reserved keyword'
919
+ end
920
+
914
921
  create_find fields
915
922
 
916
923
  reserved = %w(require parent)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.26
4
+ version: 1.5.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  zafTuKRozNy5wCw7Z32VaDGcJ+yTPq73CrcPrNyaoxqGfU0qNsh6oGvwrq4Q1k4j
32
32
  Pz2GWE7KigXTBg==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-06-19 00:00:00.000000000 Z
34
+ date: 2015-06-23 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dynarex-import
metadata.gz.sig CHANGED
Binary file