versionone_sdk 0.0.3 → 0.0.4

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: 1b73cb7be100cfcc1e7876932bc74f01fc46c159
4
- data.tar.gz: 2cb79c808b19d41516e68a7eca08f3e3dd89f6f4
3
+ metadata.gz: e31a77bb8c908a4ceecef2fed819f89e21dc9ff6
4
+ data.tar.gz: 97d3d7e6aa23cc1e50ab218b1088d58e89051c0f
5
5
  SHA512:
6
- metadata.gz: 4cbe7275af7d76974ce395b95c0b3e129f4aeece5aadb3b4ba5711fec210fcd48918c6803427b9fb38a0c690714ec5371f32b0829eb129c27d728326d52e330c
7
- data.tar.gz: dac4d6f0c7d1bfaf552556fa18c11fac7ff7999a1eb54a3cf75a51173a0578dbfe40d91c3987c3c41b3e1343f3f0924936bff35459ab6b31c7a7c168724c8c6b
6
+ metadata.gz: 6425eae5af6a0bd94da2a685a51cf19abf07a7688de93a324211547e4af6501d714081a6bef3e98b66baf309458f4d0b3342eafb0d65a23fd9182661c83282cb
7
+ data.tar.gz: 7c18b03697ca72c73c9d25fdedc24b434620ac051c9d8c26a236897727fe7af0583f4382635ca009e70ecab66bb563f76886ae0fc2418d13f50532345a805dc8
data/CHANGELOG.md CHANGED
@@ -1,7 +1,9 @@
1
1
  CHANGELOG
2
2
  ---------
3
3
 
4
- - **2014-03-20**: 0.0.3
4
+ - **2014-03-20**: 0.0.4
5
+ - Fix for VersiononeSdk::Update::updateAsset
6
+ - **2014-03-17**: 0.0.3
5
7
  - Add ability to retrieve a single asset using an OID token or Number
6
8
  - Add VersiononeSdk::Update to support updating Assets
7
9
  - **2014-03-17**: 0.0.2
data/README.md CHANGED
@@ -11,7 +11,7 @@ VersionOne currently offers SDKs in Java, .NET, Python and JavaScript but not in
11
11
  It currently offers the following capabilities:
12
12
 
13
13
  1. Ability to retrieve and parse all Assets of a certain type to JSON (via JsonDoc) seeking to match the JSON produced by the VersionOne JavaScript SDK.
14
- 2. Ability to query Assets transparently whether using Asset Token OIDs (e.g. "Story:1") or Asset Numbers (e.g. "B-1").
14
+ 2. Ability to query Assets transparently using Asset OID Tokens (e.g. "Story:1") or Asset Numbers (e.g. "B-1").
15
15
  3. Ability to update Assets using Ruby without needing to manually create XML.
16
16
 
17
17
  Installing
@@ -69,18 +69,18 @@ Download and install versionone_sdk with the following:
69
69
 
70
70
  v1client.updateAsset("Scope",0,"Owner","Member:20")
71
71
  v1client.updateAsset("Scope",0,"Owner",{:value=>"Member:20",:act=>"set"})
72
- v1client.updateAsset("Scope",0,"Owner",{:value=>"Member:20",:act=>"set"},:single_relation)
72
+ v1client.updateAsset("Scope",0,"Owner",{:value=>"Member:20",:act=>"set"},:single_relationship)
73
73
 
74
- # Updating an asset with a multi-value relationship: Adding members
74
+ # Updating an asset with a multi-value relationship: adding members
75
75
 
76
- v1client.updateAsset("Scope",0,"Members",["Member:1000","Member:1001"])
76
+ v1client.updateAsset("Scope",0,"Members",["Member:1000","Member:1001"],:multi_relationship)
77
77
 
78
- # Updating an asset with a multi-value relatinoship: Adding and removing members
78
+ # Updating an asset with a multi-value relationship: adding and removing members
79
79
 
80
80
  v1client.updateAsset("Scope",0,"Members",[ \
81
81
  { :value => "Member:1000", :act => "add" }, \
82
82
  { :value => "Member:1001", :act => "remove " } \
83
- ],:multi_relation)
83
+ ],:multi_relationship)
84
84
 
85
85
  #Documentation
86
86
  --------------
@@ -105,6 +105,8 @@ Notes
105
105
  #Change Log
106
106
  -----------
107
107
 
108
+ - **2014-03-20**: 0.0.4
109
+ - Fix for VersiononeSdk::Update::updateAsset
108
110
  - **2014-03-20**: 0.0.3
109
111
  - Add ability to retrieve a single asset using an OID token or Number
110
112
  - Add VersiononeSdk::Update to support updating Assets
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -5,7 +5,7 @@ module VersiononeSdk
5
5
 
6
6
  def initialize(oClient=nil)
7
7
  @oClient = oClient
8
- @sTagTypes = {:simple_attribute=>1,:single_relationship=>1,:multi_relationship=>1}
8
+ @dTagTypes = {:simple_attribute=>1,:single_relationship=>1,:multi_relationship=>1}
9
9
  @sRelationships = 'BuildProjects,Owner,Parent,Schedule,Scheme,SecurityScope,Status,TestSuite'
10
10
  @dRelationships = Hash[@sRelationships.split(',').collect {|v| [v,1]}]
11
11
  end
@@ -53,9 +53,9 @@ module VersiononeSdk
53
53
  = yTagType == :simple_attribute \
54
54
  ? getXmlBodyForSimpleAttributeUpdate(sName,aValues) \
55
55
  : yTagType == :single_relationship \
56
- ? getXmlBodyForSingleRelationship(aValues) \
56
+ ? getXmlBodyForSingleRelationship(sName,aValues) \
57
57
  : yTagType == :multi_relationship \
58
- ? getXmlBodyForMultiRelationship(aValues) \
58
+ ? getXmlBodyForMultiRelationship(sName,aValues) \
59
59
  : nil
60
60
 
61
61
  unless xBody.nil?
@@ -125,7 +125,7 @@ module VersiononeSdk
125
125
  return oBuilder.to_xml
126
126
  end
127
127
 
128
- def getgetXmlBodyForMultiRelationship(sName=nil, aValues=[])
128
+ def getXmlBodyForMultiRelationship(sName=nil,aValues=[])
129
129
  oBuilder = aValues.length == 0 \
130
130
  ? Nokogiri::XML::Builder.new { |xml| xml.Asset { \
131
131
  xml.Relation(:name=>sName,:act=>'set')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: versionone_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Wang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-17 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday