atlassian-stash 0.5.0 → 0.6.0

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: 682bc271a57ab40dff60664829c0eb186b85f69c
4
- data.tar.gz: 77065a5e776e9a090981dd406d67a315ad346888
3
+ metadata.gz: c9676d2b106ef0c5cb7975edba9b0a336228de8f
4
+ data.tar.gz: c0a735cd0e637848a542cdef74026074f18c4b7d
5
5
  SHA512:
6
- metadata.gz: d78247c9ade2009da701d9703dde0264cf51928f3c75a3a14eb65760e35e1a43609672866d7151ff57ad3e741d8f296556fa23244131dfc28aa3ced118e052b0
7
- data.tar.gz: c1d5600c4575f3099fc91e1ae108d172011c93aa2d680bd0348ece4f873e2698226407dc4f4475500f30a2d74aa5ea6f40822e1b43d6556b362218bf5f060a11
6
+ metadata.gz: 2ed30f419fe6c9c74547cc2dda41006633f26c761eef83dbd34595b30963a9e5713e673b6df01df7533763071b790b5deec28fb803535633c184397d1f29b444
7
+ data.tar.gz: 9da1cb589e071ee573cc709b77ea54d7e42de7928c9ff8b48c6b63a1b9ccd62fbfb2da010ff24bf604944c7f09105dcd8eda5ccf1d3a7a699ab676a6db6debc7
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Atlassian Stash Command Line Tools
2
2
 
3
+ [ ![Build Status](https://codeship.com/projects/813f7dc0-2924-0133-5117-3e546cad586a/status?branch=master)](https://codeship.com/projects/97914)
4
+
3
5
  ## Installing this tool
4
6
  This command line helper for Stash is written in Ruby and is deployed as a [Ruby Gem](https://rubygems.org/gems/atlassian-stash/). Installation is easy, simply run the following command
5
7
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.6.0
@@ -1,7 +1,6 @@
1
1
  require 'json'
2
2
  require 'net/https'
3
3
  require 'uri'
4
- require 'git'
5
4
  require 'launchy'
6
5
 
7
6
  include Atlassian::Util::TextUtil
@@ -52,10 +52,11 @@ module Atlassian
52
52
  end
53
53
  end
54
54
 
55
- if m = remoteUrl.match(/[\/:]([a-zA-Z~][a-zA-Z0-9_\-]*)\/([[:alnum:]][\w\-\.]*).git$/)
56
- return RepoInfo.new(config, m[1], m[2])
55
+ if !m = remoteUrl.match(/[\/:]([a-zA-Z~][a-zA-Z0-9_\-\.]*)\/([[:alnum:]][\w\-\.]*).git$/)
56
+ raise "Repository does not seem to be hosted in Stash; Remote url: " + remoteUrl
57
57
  end
58
- raise "Repository does not seem to be hosted in Stash; Remote url: " + remoteUrl
58
+
59
+ return RepoInfo.new(config, m[1], m[2])
59
60
  end
60
61
  end
61
62
  end
@@ -24,10 +24,19 @@ class TestStashRepoInfo < Minitest::Test
24
24
 
25
25
  should "repo with hyphes" do
26
26
  Atlassian::Stash::Git.stubs(:get_remotes).returns("origin https://sruiz@stash-dev.atlassian.com/scm/s745h/stash-repository.git (push)")
27
+
27
28
  ri = RepoInfo.create({})
28
29
  assert_equal 's745h', ri.projectKey
29
30
  assert_equal 'stash-repository', ri.slug
30
31
  end
32
+
33
+ should "extracting project key and repo slug from SSH remote with special repository url" do
34
+ Atlassian::Stash::Git.stubs(:get_remotes).returns("origin https://sruiz@stash-dev.atlassian.com/project.name/stash-repository.git (push)")
35
+
36
+ ri = RepoInfo.create({})
37
+ assert_equal 'project.name', ri.projectKey
38
+ assert_equal 'stash-repository', ri.slug
39
+ end
31
40
  end
32
41
 
33
42
  context "Create repo url" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atlassian-stash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seb Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-14 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  version: '0'
227
227
  requirements: []
228
228
  rubyforge_project:
229
- rubygems_version: 2.4.2
229
+ rubygems_version: 2.0.14
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: Command line tools for Atlassian Stash