pimpmychangelog 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +6 -0
- data/lib/pimpmychangelog/git_remote.rb +16 -4
- data/lib/pimpmychangelog/version.rb +1 -1
- data/pimpmychangelog.gemspec +1 -0
- data/spec/git_remote_spec.rb +10 -1
- metadata +23 -7
data/Rakefile
CHANGED
@@ -1,8 +1,20 @@
|
|
1
1
|
class GitRemote
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
|
3
|
+
REPOSITORY_PATTERN = %r{
|
4
|
+
# Define recurring patterns
|
5
|
+
(?<part> [\w\d-]+ ){0}
|
6
|
+
|
7
|
+
(?<user>\g<part>)/(?<repo>\g<part>).git$
|
8
|
+
}x
|
9
|
+
|
10
|
+
def initialize(url = nil)
|
11
|
+
@url = url || fetch_url
|
12
|
+
|
13
|
+
match = @url.match(REPOSITORY_PATTERN)
|
14
|
+
|
15
|
+
@user = match[:user]
|
16
|
+
@project = match[:repo]
|
17
|
+
|
6
18
|
unless @user && @project
|
7
19
|
raise "Can't extract github user and project from origin remote"
|
8
20
|
end
|
data/pimpmychangelog.gemspec
CHANGED
data/spec/git_remote_spec.rb
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe GitRemote do
|
4
|
-
context "when
|
4
|
+
context "when passed a SSH url to a repo" do
|
5
|
+
subject { described_class.new('git@github.com:pcreux/pimpmychangelog.git') }
|
6
|
+
|
7
|
+
its(:user) { should == 'pcreux' }
|
8
|
+
its(:project) { should == 'pimpmychangelog' }
|
9
|
+
end
|
10
|
+
|
11
|
+
context "when passed a HTTPS url to a repo" do
|
12
|
+
subject { described_class.new('https://github.com/pcreux/pimpmychangelog.git') }
|
13
|
+
|
5
14
|
its(:user) { should == 'pcreux' }
|
6
15
|
its(:project) { should == 'pimpmychangelog' }
|
7
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pimpmychangelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70336240420000 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70336240420000
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: guard-rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &70336240419440 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,18 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70336240419440
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rake
|
38
|
+
requirement: &70336240418720 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70336240418720
|
36
47
|
description: Linkify issue numbers (#123) and github users (@gregbell) in markdown
|
37
48
|
changelogs.
|
38
49
|
email:
|
@@ -73,12 +84,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
84
|
- - ! '>='
|
74
85
|
- !ruby/object:Gem::Version
|
75
86
|
version: '0'
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
hash: 4367698830413585535
|
76
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
91
|
none: false
|
78
92
|
requirements:
|
79
93
|
- - ! '>='
|
80
94
|
- !ruby/object:Gem::Version
|
81
95
|
version: '0'
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
hash: 4367698830413585535
|
82
99
|
requirements: []
|
83
100
|
rubyforge_project:
|
84
101
|
rubygems_version: 1.8.11
|
@@ -91,4 +108,3 @@ test_files:
|
|
91
108
|
- spec/parser_spec.rb
|
92
109
|
- spec/pimper_spec.rb
|
93
110
|
- spec/spec_helper.rb
|
94
|
-
has_rdoc:
|