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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f231587e2fb121259d565337ac2563a0d903b383
4
- data.tar.gz: 6767463306762c36b6989d39a6edc20e84d3db88
3
+ metadata.gz: 54c1a02eeaee8fa0abb0bfedbf7c761f2462f251
4
+ data.tar.gz: 43d637f13c264dfcf23d16c7245962244e3666fb
5
5
  SHA512:
6
- metadata.gz: 1b5e22b6d5a3aa91e66fb8f752fc07beefa5dcc05653999586a9b878fbe79f1d0e16b8f9edbe2aacf76132ef52acbd759bc4efa6378c3076f7ed7aa5383817cb
7
- data.tar.gz: f309cb3aa500a76dd3e16820a35cf5ef11d4cbd7ba83a73b59db3241a52d7d187461023722d86bde807671127b50e5969859798d66579e537c8d70f481e1567d
6
+ metadata.gz: 2d18c09f6c2a4e56c4b8b4599be38e77bc80b0f433713d1fe7f87f4d6a91747da148c80f59613160aa6bc04fec6202685bfc0a2eda30f4d116aaa173e657ee0d
7
+ data.tar.gz: 52cd52861b2f0a763714a96399fc6631bf745596d97ace30c8efc06659f40f02412f55f0db6bbc68007bbc4340a053695fde0a0fa643b8b3e6b7596d8c4e772a
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
+ [![Gem Version](https://badge.fury.io/rb/ruby_vsts.svg)](https://badge.fury.io/rb/ruby_vsts)
4
5
  [![Code Climate](https://codeclimate.com/github/prodexity/ruby_vsts.png)](https://codeclimate.com/github/prodexity/ruby_vsts)
5
6
  [![Issue Count](https://codeclimate.com/github/prodexity/ruby_vsts/badges/issue_count.svg)](https://codeclimate.com/github/prodexity/ruby_vsts)
6
7
  [![Test Coverage](https://codeclimate.com/github/prodexity/ruby_vsts/badges/coverage.svg)](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
@@ -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)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module VSTS
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
@@ -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.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