versionone_sdk 0.0.3 → 0.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 +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +8 -6
- data/VERSION +1 -1
- data/lib/versionone_sdk/update.rb +4 -4
- 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: e31a77bb8c908a4ceecef2fed819f89e21dc9ff6
|
4
|
+
data.tar.gz: 97d3d7e6aa23cc1e50ab218b1088d58e89051c0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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"},:
|
72
|
+
v1client.updateAsset("Scope",0,"Owner",{:value=>"Member:20",:act=>"set"},:single_relationship)
|
73
73
|
|
74
|
-
# Updating an asset with a multi-value relationship:
|
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
|
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
|
-
],:
|
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.
|
1
|
+
0.0.4
|
@@ -5,7 +5,7 @@ module VersiononeSdk
|
|
5
5
|
|
6
6
|
def initialize(oClient=nil)
|
7
7
|
@oClient = oClient
|
8
|
-
@
|
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
|
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.
|
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-
|
11
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|