ruby_vsts 0.1.1 → 0.1.2
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +20 -0
- data/lib/vsts/api_client.rb +4 -2
- data/lib/vsts/item.rb +1 -1
- data/lib/vsts/version.rb +1 -1
- data/ruby_vsts.gemspec +3 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54c1a02eeaee8fa0abb0bfedbf7c761f2462f251
|
4
|
+
data.tar.gz: 43d637f13c264dfcf23d16c7245962244e3666fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d18c09f6c2a4e56c4b8b4599be38e77bc80b0f433713d1fe7f87f4d6a91747da148c80f59613160aa6bc04fec6202685bfc0a2eda30f4d116aaa173e657ee0d
|
7
|
+
data.tar.gz: 52cd52861b2f0a763714a96399fc6631bf745596d97ace30c8efc06659f40f02412f55f0db6bbc68007bbc4340a053695fde0a0fa643b8b3e6b7596d8c4e772a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# ruby_vsts
|
2
2
|
An unofficial Microsoft Visual Studio Team Services (VSTS) API client in Ruby
|
3
3
|
|
4
|
+
[](https://badge.fury.io/rb/ruby_vsts)
|
4
5
|
[](https://codeclimate.com/github/prodexity/ruby_vsts)
|
5
6
|
[](https://codeclimate.com/github/prodexity/ruby_vsts)
|
6
7
|
[](https://codeclimate.com/github/prodexity/ruby_vsts/coverage)
|
@@ -9,6 +10,25 @@ An unofficial Microsoft Visual Studio Team Services (VSTS) API client in Ruby
|
|
9
10
|
This will be a Ruby gem to connect to the Microsoft Visual Studio online (VSTS) Rest API.
|
10
11
|
It may also work with recent versions of TFS too. *Work is heavily in progress!*
|
11
12
|
|
13
|
+
## Install
|
14
|
+
|
15
|
+
### Easy way
|
16
|
+
```
|
17
|
+
gem install ruby_vsts
|
18
|
+
```
|
19
|
+
|
20
|
+
### Secure way
|
21
|
+
|
22
|
+
Add the public signing key to verify signature:
|
23
|
+
```
|
24
|
+
gem cert --add <(curl -Ls https://raw.github.com/prodexity/ruby_vsts/master/certs/ruby_vsts-gem-public_cert.pem)
|
25
|
+
```
|
26
|
+
|
27
|
+
Install with checking signatures:
|
28
|
+
```
|
29
|
+
gem install ruby_vsts -P HighSecurity
|
30
|
+
```
|
31
|
+
|
12
32
|
## Usage
|
13
33
|
|
14
34
|
### Setup
|
data/lib/vsts/api_client.rb
CHANGED
@@ -16,6 +16,8 @@ module VSTS
|
|
16
16
|
# @option opts [String] :collection
|
17
17
|
# @option opts [String] :team_project
|
18
18
|
# @option opts [String] :area
|
19
|
+
# @option opts [String] :accept
|
20
|
+
# @option opts [String] :content_type
|
19
21
|
# @option opts [Hash] :urlparams
|
20
22
|
# @return [Hash] request results as parsed from json
|
21
23
|
def self.request(method, resource, opts = {})
|
@@ -27,8 +29,8 @@ module VSTS
|
|
27
29
|
payload: opts[:payload],
|
28
30
|
headers: {
|
29
31
|
Authorization: authz_header_value,
|
30
|
-
Accept: "application/json",
|
31
|
-
"Content-Type" => "application/json"
|
32
|
+
Accept: opts[:accept] || "application/json",
|
33
|
+
"Content-Type" => opts[:content_type] || "application/json"
|
32
34
|
}
|
33
35
|
}
|
34
36
|
resp = RestClient::Request.execute(req)
|
data/lib/vsts/item.rb
CHANGED
@@ -27,7 +27,7 @@ module VSTS
|
|
27
27
|
def get(opts = {})
|
28
28
|
urlparams = APIClient.build_params(opts, [:versionType, :version, :versionOptions])
|
29
29
|
urlparams[:path] = @path
|
30
|
-
resp = APIClient.get("/items", area: "tfvc", urlparams: urlparams)
|
30
|
+
resp = APIClient.get("/items", area: "tfvc", urlparams: urlparams, accept: "application/binary")
|
31
31
|
resp.body
|
32
32
|
end
|
33
33
|
end
|
data/lib/vsts/version.rb
CHANGED
data/ruby_vsts.gemspec
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
basedir = File.expand_path(File.dirname(__FILE__))
|
2
2
|
require "#{basedir}/lib/vsts/version"
|
3
3
|
|
4
|
+
# rubocop:disable Metrics/BlockLength
|
4
5
|
Gem::Specification.new do |s|
|
5
6
|
s.name = 'ruby_vsts'
|
6
7
|
s.version = VSTS::VERSION
|
@@ -14,6 +15,7 @@ Gem::Specification.new do |s|
|
|
14
15
|
s.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
|
15
16
|
s.homepage = 'https://github.com/prodexity/ruby_vsts/'
|
16
17
|
s.license = 'MIT'
|
18
|
+
s.required_ruby_version = '~> 2.0'
|
17
19
|
|
18
20
|
# s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
19
21
|
# s.require_paths = %w(lib)
|
@@ -34,3 +36,4 @@ Gem::Specification.new do |s|
|
|
34
36
|
s.cert_chain = ['certs/ruby_vsts-gem-public_cert.pem']
|
35
37
|
s.signing_key = File.expand_path("~/.ssh/ruby_vsts-gem-private_key.pem") if $PROGRAM_NAME.end_with?("gem")
|
36
38
|
end
|
39
|
+
# rubocop:enable Metrics/BlockLength
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_vsts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabor Lengyel
|
@@ -235,9 +235,9 @@ require_paths:
|
|
235
235
|
- lib
|
236
236
|
required_ruby_version: !ruby/object:Gem::Requirement
|
237
237
|
requirements:
|
238
|
-
- - "
|
238
|
+
- - "~>"
|
239
239
|
- !ruby/object:Gem::Version
|
240
|
-
version: '0'
|
240
|
+
version: '2.0'
|
241
241
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
242
|
requirements:
|
243
243
|
- - ">="
|
metadata.gz.sig
CHANGED
Binary file
|