git-it 0.1.0 → 0.1.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.
- data/bin/git-it +7 -3
- data/lib/git-it/commander.rb +20 -0
- data/lib/git-it/url_generator.rb +5 -0
- data/lib/git-it/version.rb +1 -1
- metadata +8 -2
data/bin/git-it
CHANGED
@@ -63,6 +63,13 @@ command :pulled do |c|
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
desc 'Tests current branch.'
|
67
|
+
command :tested do |c|
|
68
|
+
c.action do |global_options, options, args|
|
69
|
+
GitIt::Commander.new( global_options ).test( args, options )
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
66
73
|
# ===========================
|
67
74
|
# = Future verbs to support =
|
68
75
|
# ===========================
|
@@ -76,9 +83,6 @@ end
|
|
76
83
|
# git it tagged
|
77
84
|
# - tags current head given a phrase
|
78
85
|
|
79
|
-
# git it tested
|
80
|
-
# - runs new tests added or modified in the current head since master (cucumber features)
|
81
|
-
|
82
86
|
# git it removed
|
83
87
|
# - removes current branch from remote repository
|
84
88
|
|
data/lib/git-it/commander.rb
CHANGED
@@ -118,7 +118,27 @@ module GitIt
|
|
118
118
|
end
|
119
119
|
end
|
120
120
|
|
121
|
+
# [get it opened]
|
122
|
+
#
|
123
|
+
# Opens the current branch
|
124
|
+
#
|
125
|
+
# [sample usage]
|
126
|
+
#
|
127
|
+
# Open the current branch:
|
128
|
+
# git it opened
|
129
|
+
#
|
130
|
+
def test(args, options)
|
131
|
+
_closest_branch = closest_branch
|
121
132
|
|
133
|
+
if _closest_branch
|
134
|
+
branch_name = clean_branch_name_for( _closest_branch )
|
135
|
+
link = @url_generator.test_url( branch_name )
|
136
|
+
|
137
|
+
launch link
|
138
|
+
else
|
139
|
+
fail "Could not find closest remote branch for sha: #{@git_object.oid.inspect}"
|
140
|
+
end
|
141
|
+
end
|
122
142
|
|
123
143
|
# ============
|
124
144
|
# = Privates =
|
data/lib/git-it/url_generator.rb
CHANGED
@@ -31,5 +31,10 @@ module GitIt
|
|
31
31
|
"https://#{@site}/#{@user}/#{@proj}/pull/new/#{@user}:#{destination}...#{source}"
|
32
32
|
end
|
33
33
|
|
34
|
+
# https://github.com/more-ron/git-it/tree/gh-pages
|
35
|
+
def test_url(branch_name)
|
36
|
+
"https://circleci.com/gh/#{@user}/#{@proj}/tree/#{branch_name}"
|
37
|
+
end
|
38
|
+
|
34
39
|
end
|
35
40
|
end
|
data/lib/git-it/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -157,12 +157,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
157
|
- - ! '>='
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
|
+
segments:
|
161
|
+
- 0
|
162
|
+
hash: -3969426227330127026
|
160
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
164
|
none: false
|
162
165
|
requirements:
|
163
166
|
- - ! '>='
|
164
167
|
- !ruby/object:Gem::Version
|
165
168
|
version: '0'
|
169
|
+
segments:
|
170
|
+
- 0
|
171
|
+
hash: -3969426227330127026
|
166
172
|
requirements: []
|
167
173
|
rubyforge_project:
|
168
174
|
rubygems_version: 1.8.25
|