atlassian_upm 0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5a3bdbcfa971ac941c92dad168892cf702e0bf4f
4
+ data.tar.gz: 91f081455d7fb5f2c096fcce54845e138e3a4984
5
+ SHA512:
6
+ metadata.gz: 7b4d202088d90a8d322f880b6c48d8178e807a1b33030dced3774ce547f3aebb4e8328a0b806487f766b77a741e3750fa080893610949f8aaf36b5d40f309db2
7
+ data.tar.gz: b4132ae68eee2d2022145718c86cf38fb3a0c926a531c1dbc99c0a12bd9de8f083594525f33661ec46b81da92bb15f1b3bb1e244789709a177c0cf86b66b0871
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem "rspec"
6
+ gem "webmock"
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 KinWah Lai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ atlassian_upm
2
+ =============
3
+
4
+ ruby interface to universal plugin manager
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require "rspec/core/rake_task"
2
+
3
+ RSpec::Core::RakeTask.new(:spec)
4
+
5
+ task :default => :spec
@@ -0,0 +1,20 @@
1
+ # encoding: utf-8
2
+ require File.expand_path('../lib/atlassian_upm/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = 'atlassian_upm'
6
+ gem.version = UPM::VERSION
7
+ gem.date = Date.today.to_s
8
+
9
+ gem.summary = "Atlassian_UPM is an interface to Atlassian UPM REST"
10
+ gem.description = "Atlassian_UPM provides an interface to the Atlassian Universal Plugin Manager"
11
+
12
+ gem.authors = ['KinWah Lai, Bas Vodde']
13
+ gem.email = ['kinwah@odd-e.com', 'basv@odd-e.com']
14
+ gem.homepage = 'https://github.com/kinwahlai/attempt_to'
15
+
16
+ gem.add_dependency('rake')
17
+ gem.add_development_dependency('rest_client', ['~> 1.7.3'])
18
+
19
+ gem.files = `git ls-files -- {.,test,spec,lib}/*`.split("\n")
20
+ end
@@ -0,0 +1,5 @@
1
+
2
+ require 'rest_client'
3
+
4
+ require_relative "atlassian_upm/upm_client.rb"
5
+ require_relative "atlassian_upm/version.rb"
@@ -0,0 +1,12 @@
1
+
2
+
3
+ class UPMClient
4
+
5
+ def initialize(url, user, password)
6
+ @rest_client = RestClient::Resource.new(url, user, password)
7
+ end
8
+
9
+ def token
10
+ @rest_client.head.headers[:upm_token]
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+
2
+
3
+ module UPM
4
+ VERSION = "0.1"
5
+ end
@@ -0,0 +1,3 @@
1
+
2
+
3
+ require_relative "../lib/atlassian_upm.rb"
data/spec/upm_spec.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+ require 'webmock/rspec'
3
+
4
+ describe "Atlassian Universal Plugin Manager" do
5
+
6
+ it "should be get the upm_token" do
7
+ stub_request(:head, "user:password@url").to_return(:headers => { 'upm_token' => 'token123' })
8
+ UPMClient.new('url','user','password').token.should == 'token123'
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: atlassian_upm
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ platform: ruby
6
+ authors:
7
+ - KinWah Lai, Bas Vodde
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest_client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 1.7.3
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 1.7.3
41
+ description: Atlassian_UPM provides an interface to the Atlassian Universal Plugin
42
+ Manager
43
+ email:
44
+ - kinwah@odd-e.com
45
+ - basv@odd-e.com
46
+ executables: []
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - Gemfile
51
+ - LICENSE
52
+ - README.md
53
+ - Rakefile
54
+ - atlassian_upm.gemspec
55
+ - lib/atlassian_upm.rb
56
+ - lib/atlassian_upm/upm_client.rb
57
+ - lib/atlassian_upm/version.rb
58
+ - spec/spec_helper.rb
59
+ - spec/upm_spec.rb
60
+ homepage: https://github.com/kinwahlai/attempt_to
61
+ licenses: []
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 2.2.2
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: Atlassian_UPM is an interface to Atlassian UPM REST
83
+ test_files: []