atlassian_upm 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/atlassian_upm/upm_client.rb +5 -0
- data/lib/atlassian_upm/version.rb +1 -1
- data/spec/upm_spec.rb +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b17101f7d066b8b4a8861de1771d82d1c3fc775
|
4
|
+
data.tar.gz: a3f4607a4f7a7a50f917410f5bef7da67fc88888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b88ac7b0baab52c81aeda51d99e4605a181d9d639a044c321f7bc95fb3eb571431ff80b40fea8d51b12d00b5eabf3917502c1d107cca6c84774cf22947f7d80
|
7
|
+
data.tar.gz: e904de4193ac315572817f0b6b8497e90caab961a98355e4b44c82e1bfe6a125b6a7db12dd50a6d75906b9136f31d186f71c154b5cc193a5c32c6f68f9ef593f
|
data/spec/upm_spec.rb
CHANGED
@@ -3,8 +3,19 @@ require 'webmock/rspec'
|
|
3
3
|
|
4
4
|
describe "Atlassian Universal Plugin Manager" do
|
5
5
|
|
6
|
-
|
6
|
+
before (:each) do
|
7
|
+
@client = UPMClient.new('url','user','password')
|
7
8
|
stub_request(:head, "user:password@url").to_return(:headers => { 'upm_token' => 'token123' })
|
8
|
-
|
9
|
+
stub_request(:post, "user:password@url").to_return(:status => 200)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should be get the upm_token" do
|
13
|
+
expect(@client.token).to eq 'token123'
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should be post the plugin to host" do
|
17
|
+
expect(File).to receive(:new).with("filename").and_return(double)
|
18
|
+
expect(@client.uploadPlugin("filename")).to eq true
|
19
|
+
expect(WebMock).to have_requested(:post, "user:password@url").with(:headers => {'token' => 'token123', 'Content-Type'=> /multipart\/form-data\; boundary=[\d]+/})
|
9
20
|
end
|
10
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atlassian_upm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KinWah Lai, Bas Vodde
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|