versionone_sdk 0.1.0 → 0.1.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: c9f526811b6a5f98ec420330a8427ab7274834db
4
- data.tar.gz: d4df27978d440d828bc4b57ae492f5ea5fbda5b2
3
+ metadata.gz: 84cb9b1e6cd4dae9bdb0677179d384f3aac83442
4
+ data.tar.gz: 9835fc512d709ab2243ba8b41898bc01a953b042
5
5
  SHA512:
6
- metadata.gz: f03fc89debd7eb1d9cf2d7c03c37994cec558368317d05228c851dc438271326a6608bf0250e86080d1993f4c8e7c5a94add42b96af3307878652048f988d1bc
7
- data.tar.gz: 5204230875899a06d7c1866ef8053c64e05152984fde1259c511dc880d54e2d7f94993c8c1afecfb3dae2703e2985d35dc36c93a5de6a698b2aa43f148c544ed
6
+ metadata.gz: c72b5240ab7cceb342143ceb3dc6550d39b819cf7e51d724cda98cfa04f5bfef58deaeb85de1b098bc8ee103a11711b7d44a8f942559b6044e5f0dc855e6a46a
7
+ data.tar.gz: e1eee8d4139961462edff92f7fcb3de46ae4b7fb3c6ee8f9fa80d71d48f94a8036544bd0b215ccebfb6befb0293385a501a63f09183688fa1842441cb2b02cb2
@@ -1,14 +1,17 @@
1
1
  CHANGELOG
2
2
  ---------
3
-
3
+ - **2015-09-14**: 0.1.1
4
+ - Update `README.md`
5
+ - Add Travis CI, Code Climate, Coveralls support
4
6
  - **2014-03-24**: 0.1.0
5
- - Update JSON representation to use Array for multiple values and String for single values for both Attribute and Relation tags. Previously Relation tags would be converted to arrays even if there was only a single element. This change is not backward compatible.
7
+ - Update JSON representation to use array for multiple values and string for single values for both attribute and relation XML tags. Previously relation tags would be converted to arrays even if there was only a single element. This change is not backward compatible.
8
+ - Update control properties format from `__id__#{property}` to `_#{property}__id`. This change is not backward compatible.
6
9
  - **2014-03-20**: 0.0.4
7
- - Fix for VersiononeSdk::Update::updateAsset
10
+ - Fix for `VersiononeSdk::Update::updateAsset`
8
11
  - **2014-03-20**: 0.0.3
9
12
  - Add ability to retrieve a single asset using an OID token or Number
10
- - Add VersiononeSdk::Update to support updating Assets
13
+ - Add `VersiononeSdk::Update` to support updating Assets
11
14
  - **2014-03-17**: 0.0.2
12
- - Add VersiononeSdk::Asset object to support value inflation, starting with AssetState.Name
15
+ - Add `VersiononeSdk::Asset` object to support value inflation, starting with `AssetState.Name`
13
16
  - **2014-03-16**: 0.0.1
14
17
  - Initial release
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 John Wang
1
+ Copyright (c) 2014-2015 John Wang
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
17
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,8 +1,14 @@
1
1
  VersionOne SDK - A Ruby SDK for the VersionOne REST API
2
2
  =======================================================
3
3
 
4
- Synopsis
5
- --------
4
+ [![Gem Version](https://badge.fury.io/rb/versionone_sdk.svg)](http://badge.fury.io/rb/versionone_sdk)
5
+ [![Build Status](https://img.shields.io/travis/grokify/versionone-sdk-ruby/master.svg)](https://travis-ci.org/grokify/versionone-sdk-ruby)
6
+ [![Code Climate](https://codeclimate.com/github/grokify/versionone-sdk-ruby/badges/gpa.svg)](https://codeclimate.com/github/grokify/versionone-sdk-ruby)
7
+ [![Coverage Status](https://coveralls.io/repos/grokify/versionone-sdk-ruby/badge.svg?branch=master)](https://coveralls.io/r/grokify/versionone-sdk-ruby?branch=master)
8
+ [![Docs](https://img.shields.io/badge/docs-rubydoc-blue.svg)](http://www.rubydoc.info/gems/versionone_sdk/)
9
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/grokify/versionone-sdk-ruby/master/LICENSE.txt)
10
+
11
+ ## Synopsis
6
12
 
7
13
  This is a VersionOne SDK in Ruby that accesses the VersionOne REST API.
8
14
 
@@ -11,87 +17,91 @@ VersionOne currently offers SDKs in Java, .NET, Python and JavaScript but not in
11
17
  It currently offers the following capabilities:
12
18
 
13
19
  1. Ability to retrieve and parse all Assets of a certain type to JSON (via JsonDoc)
14
- 2. Ability to query Assets transparently using Asset OID Tokens (e.g. "Story:1") or Asset Numbers (e.g. "B-1").
20
+ 2. Ability to query Assets transparently using Asset OID Tokens (e.g. `Story:1`) or Asset Numbers (e.g. `B-1`).
15
21
  3. Ability to update Assets using Ruby without needing to manually create XML.
16
22
 
17
- Installing
18
- ----------
23
+ ## Installing
19
24
 
20
- Download and install versionone_sdk with the following:
25
+ Download and install `versionone_sdk` with the following:
21
26
 
22
- gem install versionone_sdk
27
+ ```bash
28
+ $ gem install versionone_sdk
29
+ ```
23
30
 
24
- #Examples
25
- ---------
31
+ This gem uses `nokogiri` which requires Ruby >= 1.9.2.
26
32
 
27
- require 'versionone_sdk'
33
+ ## Examples
28
34
 
29
- params = {
30
- :hostname => 'www1.v1host.com',
31
- :instance => 'myinstance',
32
- :username => 'myusername',
33
- :password => 'mypassword',
34
- :port => 443,
35
- :protocol => 'https'
36
- }
37
-
38
- v1client = VersiononeSdk::Client.new(params)
35
+ ```ruby
36
+ require 'versionone_sdk'
37
+
38
+ params = {
39
+ :hostname => 'www1.v1host.com',
40
+ :instance => 'myinstance',
41
+ :username => 'myusername',
42
+ :password => 'mypassword',
43
+ :port => 443,
44
+ :protocol => 'https'
45
+ }
46
+
47
+ v1client = VersiononeSdk::Client.new(params)
39
48
 
40
- # Retrieve an array of VersiononeSdk::Asset objects
49
+ # Retrieve an array of VersiononeSdk::Asset objects
41
50
 
42
- assets = v1client.getAssets('Scope')
51
+ assets = v1client.getAssets('Scope')
43
52
 
44
- assets.each do |asset|
45
- assetHash = asset.asHash
46
- end
53
+ assets.each do |asset|
54
+ assetHash = asset.asHash
55
+ end
47
56
 
48
- # Retrieve a single asset using an Asset OID Token
49
- # Returns a VersiononeSdk::Asset object
57
+ # Retrieve a single asset using an Asset OID Token
58
+ # Returns a VersiononeSdk::Asset object
50
59
 
51
- asset = v1client.getAsset("Story:1")
52
- asset = v1client.getAsset("Story",1)
60
+ asset = v1client.getAsset("Story:1")
61
+ asset = v1client.getAsset("Story",1)
53
62
 
54
- # Retrieve a single asset using an Asset Number
63
+ # Retrieve a single asset using an Asset Number
55
64
 
56
- asset = v1client.getAsset("B-1")
57
- asset = v1client.getAsset("B",1)
65
+ asset = v1client.getAsset("B-1")
66
+ asset = v1client.getAsset("B",1)
58
67
 
59
- # Updating an asset with a simple attribute
60
- # Returns a Faraday::Response object
68
+ # Updating an asset with a simple attribute
69
+ # Returns a Faraday::Response object
61
70
 
62
- v1client.updateAsset("Member",20,"Phone","555-555-1212")
63
- v1client.updateAsset("Member",20,"Phone",{:value=>"555-555-1212",:act=>"set"})
64
- v1client.updateAsset("Member",20,"Phone",{:value=>"555-555-1212",:act=>"set"},\
65
- :simple_attribute
66
- )
71
+ v1client.updateAsset("Member",20,"Phone","555-555-1212")
72
+ v1client.updateAsset("Member",20,"Phone",{:value=>"555-555-1212",:act=>"set"})
73
+ v1client.updateAsset("Member",20,"Phone",{:value=>"555-555-1212",:act=>"set"},\
74
+ :simple_attribute
75
+ )
67
76
 
68
- # Updating an asset with a single-value relationship:
77
+ # Updating an asset with a single-value relationship:
69
78
 
70
- v1client.updateAsset("Scope",0,"Owner","Member:20")
71
- v1client.updateAsset("Scope",0,"Owner",{:value=>"Member:20",:act=>"set"})
72
- v1client.updateAsset("Scope",0,"Owner",{:value=>"Member:20",:act=>"set"},:single_relationship)
79
+ v1client.updateAsset("Scope",0,"Owner","Member:20")
80
+ v1client.updateAsset("Scope",0,"Owner",{:value=>"Member:20",:act=>"set"})
81
+ v1client.updateAsset("Scope",0,"Owner",{:value=>"Member:20",:act=>"set"},:single_relationship)
73
82
 
74
- # Updating an asset with a multi-value relationship: adding members
83
+ # Updating an asset with a multi-value relationship: adding members
75
84
 
76
- v1client.updateAsset("Scope",0,"Members",["Member:1000","Member:1001"],:multi_relationship)
85
+ v1client.updateAsset("Scope",0,"Members",["Member:1000","Member:1001"],:multi_relationship)
77
86
 
78
- # Updating an asset with a multi-value relationship: adding and removing members
87
+ # Updating an asset with a multi-value relationship: adding and removing members
79
88
 
80
- v1client.updateAsset("Scope",0,"Members",[ \
81
- { :value => "Member:1000", :act => "add" }, \
82
- { :value => "Member:1001", :act => "remove " } \
83
- ],:multi_relationship)
89
+ v1client.updateAsset("Scope",0,"Members",[ \
90
+ { :value => "Member:1000", :act => "add" }, \
91
+ { :value => "Member:1001", :act => "remove " } \
92
+ ],:multi_relationship)
93
+ ```
84
94
 
85
- #Documentation
86
- --------------
95
+ ## Documentation
87
96
 
88
97
  This gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:
89
98
 
90
- $ gem install yard
91
- $ yard server -g
99
+ ```bash
100
+ $ gem install yard
101
+ $ yard server -g
102
+ ```
92
103
 
93
- Notes
94
- -----
104
+ ## Notes
95
105
 
96
106
  1. Integer Values
97
107
  - Integer values for Order and AssetState are converted from strings to integers.
@@ -100,43 +110,32 @@ Notes
100
110
  3. Inflation
101
111
  - Some values are inflated. Currently, AssetState is used to derive AssetState.Name as defined here: https://community.versionone.com/Developers/Developer-Library/Concepts/Asset_State
102
112
  4. Tracking Properties
103
- - In addition to the standard VersionOne properties, this modules adds the following generic properties for tracking: :__id__sObjectDomain, :__id__sObjectType, :__id__iObjectId, :__id__sObjectUrl. The object domain is set to 'Versionone', while object type and object id correspond to VersionOne Asset types and ids. The URL is the full URL for the resource including protocol, host and port.
104
-
105
- #Change Log
106
- -----------
107
-
108
- - **2014-03-24**: 0.1.0
109
- - Update JSON representation to use array for multiple values and string for single values for both attribute and relation XML tags. Previously relation tags would be converted to arrays even if there was only a single element. This change is not backward compatible.
110
- - Update control properties format from __id__#{property} to _#{property}__id. This change is not backward compatible.
111
- - **2014-03-20**: 0.0.4
112
- - Fix for VersiononeSdk::Update::updateAsset
113
- - **2014-03-20**: 0.0.3
114
- - Add ability to retrieve a single asset using an OID token or Number
115
- - Add VersiononeSdk::Update to support updating Assets
116
- - **2014-03-17**: 0.0.2
117
- - Add VersiononeSdk::Asset object to support value inflation, starting with AssetState.Name
118
- - **2014-03-16**: 0.0.1
119
- - Initial release
120
-
121
- #Links
122
- ------
113
+ - In addition to the standard VersionOne properties, this modules adds the following generic properties for tracking: `:__id__sObjectDomain`, `:__id__sObjectType`, `:__id__iObjectId`, `:__id__sObjectUrl`. The object domain is set to 'Versionone', while object type and object id correspond to VersionOne Asset types and ids. The URL is the full URL for the resource including protocol, host and port.
114
+
115
+ ## Change Log
116
+
117
+ See [CHANGELOG.md](CHANGELOG.md).
118
+
119
+ ## Links
120
+
121
+ Project Repo
122
+
123
+ * https://github.com/grokify/versionone-sdk-ruby
123
124
 
124
125
  VersionOne API Documentation
125
126
 
126
- http://community.versionone.com/Developers/Developer-Library/Documentation/API
127
+ * http://community.versionone.com/Developers/Developer-Library/Documentation/API
127
128
 
128
129
  VersionOne API Documentation for Updating an Asset
129
130
 
130
- https://community.versionone.com/Developers/Developer-Library/Recipes/Update_an_Asset
131
+ * https://community.versionone.com/Developers/Developer-Library/Recipes/Update_an_Asset
131
132
 
132
- #Copyright and License
133
- ----------------------
133
+ ## Copyright and License
134
134
 
135
- VersiononeSdk © 2014 by [John Wang](mailto:johncwang@gmail.com).
135
+ VersiononeSdk © 2014-2015 by [John Wang](mailto:johncwang@gmail.com).
136
136
 
137
- VersiononeSdk is licensed under the MIT license. Please see the LICENSE document for more information.
137
+ VersiononeSdk is licensed under the MIT license. Please see the [LICENSE.txt](LICENSE.txt) document for more information.
138
138
 
139
- Warranty
140
- --------
139
+ ## Warranty
141
140
 
142
141
  This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.1.1
@@ -1,5 +1,4 @@
1
1
  module VersiononeSdk
2
-
3
2
  # The current version
4
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
5
4
  end
metadata CHANGED
@@ -1,73 +1,73 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: versionone_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.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: 2014-03-24 00:00:00.000000000 Z
11
+ date: 2014-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
- - - ">="
20
+ - - '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
- - - ">="
30
+ - - '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: jsondoc
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ~>
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
- - - ">="
40
+ - - '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: 0.0.4
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
- - - ">="
50
+ - - '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: 0.0.4
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: nokogiri
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
57
+ - - ~>
58
58
  - !ruby/object:Gem::Version
59
59
  version: '1.5'
60
- - - ">="
60
+ - - '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: 1.5.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.5'
70
- - - ">="
70
+ - - '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: 1.5.0
73
73
  description: A Ruby SDK for the VersionOne REST API
@@ -77,7 +77,7 @@ extensions: []
77
77
  extra_rdoc_files: []
78
78
  files:
79
79
  - CHANGELOG.md
80
- - LICENSE
80
+ - LICENSE.txt
81
81
  - README.md
82
82
  - Rakefile
83
83
  - VERSION
@@ -98,17 +98,17 @@ require_paths:
98
98
  - lib
99
99
  required_ruby_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - ">="
106
+ - - '>='
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.2.1
111
+ rubygems_version: 2.1.5
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: VersionOne SDK - A Ruby SDK for the VersionOne REST API