versionone_sdk 0.2.0 → 0.2.1

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: 35eb4c49dfa7e75b424bf730097f077bbe9a420c
4
- data.tar.gz: e3f477f0f83e0b3fb3aa885c7c2dabcc67c8b405
3
+ metadata.gz: 02fbf3cf28e3b313d11b05f641eb49e06beb8871
4
+ data.tar.gz: c8e6e63230e3fed52fb9c8f5d98dc15d928ff17e
5
5
  SHA512:
6
- metadata.gz: 2e6162a198d02b40475e198fb22a4a8b864040d34b9c3389b3ed1def2d5379c7ba5198608635c8ddd66f6c78b62e6b106fe95bd6e6cc0cde5ea91540ebd72fd9
7
- data.tar.gz: bc8d46678499d305630526f921cf9084a4cc05d88ccbaa8b5949811a356e4d391f5fd8257965575e00932c8df05c2294af386bad53bdf3650fa7b4ae115d03c5
6
+ metadata.gz: d3de9a4765a94782805327f4ebd5cd59a0163b653dee79d8bf645dbdc043115177aa522ef75451594939e86da3f3eff9b6ba1b637245422b875e6354dffa4ddc
7
+ data.tar.gz: 241f2a0644bcd85daac4e5390dc317fd6d8d561064e6b80edaab7077bfd9ab3971eb5703fa6613fc16120124a29c9da8c1f6e026f74e80819c68fe7ab40ed1e0
@@ -1,6 +1,9 @@
1
1
  CHANGELOG
2
2
  ---------
3
- - **2015-02-16**: 0.2.0
3
+ - **2016-06-10**: 0.2.1
4
+ - Add raise asset not found error
5
+ - Update `Gemfile` to use `gemspec`
6
+ - **2016-02-16**: 0.2.0
4
7
  - Add Access Token Authentication handling from pccasto. More info at: https://community.versionone.com/Developers/Developer-Library/Documentation/API_Authentication/Access_Token_Authentication
5
8
  - Update client's default protocol, hostname and port to use constants.
6
9
  - Fix Coveralls code coverage support.
data/Gemfile CHANGED
@@ -1,11 +1,5 @@
1
1
  source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
2
 
3
- gem 'coveralls'
4
- gem 'faraday', '~> 0.9.0'
5
- gem 'jsondoc', '~> 0.1.2'
6
- gem 'nokogiri'
7
- gem 'rake'
8
- gem 'simplecov'
9
- gem 'test-unit'
3
+ gemspec
10
4
 
11
- # vim:ft=ruby
5
+ # vim:ft=ruby
@@ -63,6 +63,9 @@ module VersiononeSdk
63
63
  oAsset.setProp(yPropKey,xxPropVal)
64
64
  end
65
65
  else
66
+ if oNodeChild.name == 'Message' && oNodeChild.text == 'Not Found'
67
+ raise RuntimeError, "E_ASSET_NOT_FOUND #{oNodeAsset.attribute('href').value}"
68
+ end
66
69
  raise RuntimeError, "E_UNKNOWN_ASSET_NODE_NAME #{oNodeChild.name}"
67
70
  end
68
71
  end
@@ -1,3 +1,3 @@
1
1
  module VersiononeSdk
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -0,0 +1,20 @@
1
+ require './test/test_base.rb'
2
+
3
+ class ParserXmlAssetsTest < Test::Unit::TestCase
4
+ def testGetJsondocForXmlAssetNodeNilNodeFailure
5
+ oParser = VersiononeSdk::ParserXmlAssets.new
6
+
7
+ assert_raise (RuntimeError.new("E_NIL_NODE")) do
8
+ oParser.getJsondocForXmlAssetNode(nil)
9
+ end
10
+ end
11
+
12
+ def testGetJsondocForXmlAssetNodeAssetNotFound
13
+ oParser = VersiononeSdk::ParserXmlAssets.new
14
+
15
+ assert_raise(RuntimeError.new("E_ASSET_NOT_FOUND /v1sdktesting/rest-1.v1/Data/Story/12345")) do
16
+ errorDocument = Nokogiri::XML('<Error href="/v1sdktesting/rest-1.v1/Data/Story/12345"><Message>Not Found</Message></Error>')
17
+ oParser.getJsondocForXmlAssetNode(errorDocument.child)
18
+ end
19
+ end
20
+ end
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Wang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-16 00:00:00.000000000 Z
11
+ date: 2016-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -70,6 +70,62 @@ dependencies:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: 1.5.0
73
+ - !ruby/object:Gem::Dependency
74
+ name: rake
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ type: :development
81
+ prerelease: false
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ - !ruby/object:Gem::Dependency
88
+ name: simplecov
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ type: :development
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ - !ruby/object:Gem::Dependency
102
+ name: test-unit
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ type: :development
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ - !ruby/object:Gem::Dependency
116
+ name: coveralls
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - "~>"
120
+ - !ruby/object:Gem::Version
121
+ version: 0.8.13
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - "~>"
127
+ - !ruby/object:Gem::Version
128
+ version: 0.8.13
73
129
  description: A Ruby SDK for the VersionOne REST API
74
130
  email: john@johnwang.com
75
131
  executables: []
@@ -88,6 +144,7 @@ files:
88
144
  - lib/versionone_sdk/update.rb
89
145
  - lib/versionone_sdk/version.rb
90
146
  - test/test_base.rb
147
+ - test/test_parser_xml_assets.rb
91
148
  - test/test_setup.rb
92
149
  homepage: http://johnwang.com/
93
150
  licenses: