socialcast-git-extensions 3.0.0.pre → 3.0.0.pre2
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/Rakefile +3 -7
- data/lib/socialcast-git-extensions.rb +3 -0
- data/lib/socialcast-git-extensions/cli.rb +19 -17
- data/lib/socialcast-git-extensions/git.rb +4 -3
- data/lib/socialcast-git-extensions/github.rb +3 -2
- data/lib/socialcast-git-extensions/version.rb +1 -1
- data/socialcast-git-extensions.gemspec +3 -1
- data/spec/cli_spec.rb +263 -0
- data/spec/spec_helper.rb +36 -0
- metadata +43 -11
- data/test/helper.rb +0 -10
- data/test/test_socialcast-git-extensions.rb +0 -7
data/Rakefile
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
3
|
|
4
|
-
require '
|
5
|
-
|
6
|
-
|
7
|
-
test.pattern = 'test/**/test_*.rb'
|
8
|
-
test.verbose = true
|
9
|
-
end
|
10
|
-
task :default => :test
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
RSpec::Core::RakeTask.new('spec')
|
6
|
+
task :default => :spec
|
@@ -9,7 +9,6 @@ module Socialcast
|
|
9
9
|
include Socialcast::Gitx::Git
|
10
10
|
include Socialcast::Gitx::Github
|
11
11
|
|
12
|
-
BASE_BRANCH = 'master'
|
13
12
|
PULL_REQUEST_DESCRIPTION = "\n\n" + <<-EOS.dedent
|
14
13
|
# Describe your pull request
|
15
14
|
# Use GitHub flavored Markdown http://github.github.com/github-flavored-markdown/
|
@@ -49,21 +48,21 @@ module Socialcast
|
|
49
48
|
say 'updating '
|
50
49
|
say "#{branch} ", :green
|
51
50
|
say "to have most recent changes from "
|
52
|
-
say BASE_BRANCH, :green
|
51
|
+
say Socialcast::Gitx::BASE_BRANCH, :green
|
53
52
|
|
54
53
|
run_cmd "git pull origin #{branch}" rescue nil
|
55
|
-
run_cmd "git pull origin #{BASE_BRANCH}"
|
54
|
+
run_cmd "git pull origin #{Socialcast::Gitx::BASE_BRANCH}"
|
56
55
|
run_cmd 'git push origin HEAD'
|
57
56
|
run_cmd 'git remote prune origin'
|
58
57
|
end
|
59
58
|
|
60
59
|
desc 'cleanup', 'Cleanup branches that have been merged into master from the repo'
|
61
60
|
def cleanup
|
62
|
-
run_cmd "git checkout #{BASE_BRANCH}"
|
61
|
+
run_cmd "git checkout #{Socialcast::Gitx::BASE_BRANCH}"
|
63
62
|
run_cmd "git pull"
|
64
63
|
|
65
64
|
say "Deleting branches that have been merged into "
|
66
|
-
say BASE_BRANCH, :green
|
65
|
+
say Socialcast::Gitx::BASE_BRANCH, :green
|
67
66
|
branches(:merged => true).each do |branch|
|
68
67
|
run_cmd "git branch -d #{branch}"
|
69
68
|
end
|
@@ -92,7 +91,7 @@ module Socialcast
|
|
92
91
|
end
|
93
92
|
end
|
94
93
|
|
95
|
-
run_cmd "git checkout #{BASE_BRANCH}"
|
94
|
+
run_cmd "git checkout #{Socialcast::Gitx::BASE_BRANCH}"
|
96
95
|
run_cmd 'git pull'
|
97
96
|
run_cmd "git checkout -b #{branch_name}"
|
98
97
|
|
@@ -105,23 +104,27 @@ module Socialcast
|
|
105
104
|
end
|
106
105
|
|
107
106
|
desc 'integrate', 'integrate the current branch into one of the aggregate development branches'
|
108
|
-
def integrate(target_branch)
|
107
|
+
def integrate(target_branch = 'prototype')
|
109
108
|
branch = current_branch
|
110
109
|
|
111
110
|
update
|
112
111
|
integrate_branch(branch, target_branch)
|
113
|
-
integrate_branch(
|
112
|
+
integrate_branch(target_branch, 'prototype') if target_branch == 'staging'
|
113
|
+
run_cmd "git checkout #{branch}"
|
114
114
|
|
115
115
|
post "#worklog integrating #{branch} into #{target_branch} #scgitx"
|
116
116
|
end
|
117
117
|
|
118
118
|
desc 'nuke', 'nuke the specified aggregate branch and reset it to a known good state'
|
119
|
-
|
119
|
+
method_option :destination, :type => :string, :aliases => '-d', :desc => 'destination branch to reset to'
|
120
|
+
def nuke(bad_branch)
|
121
|
+
good_branch = options[:destination] || ask("What branch do you want to reset #{bad_branch} to? (default: #{Socialcast::Gitx::BASE_BRANCH})")
|
122
|
+
good_branch = Socialcast::Gitx::BASE_BRANCH if good_branch.length == 0
|
120
123
|
good_branch = "last_known_good_#{good_branch}" unless good_branch.starts_with?('last_known_good_')
|
121
124
|
removed_branches = reset_branch(bad_branch, good_branch)
|
122
|
-
reset_branch("last_known_good_#{bad_branch}", good_branch)
|
125
|
+
reset_branch("last_known_good_#{bad_branch}", good_branch) unless "last_known_good_#{bad_branch}" == good_branch
|
123
126
|
|
124
|
-
post "#worklog resetting #{
|
127
|
+
post "#worklog resetting #{bad_branch} branch to #{good_branch} #scgitx\n\nthe following branches were affected:\n#{removed_branches.map{|b| '* ' + b}.join("\n") }"
|
125
128
|
end
|
126
129
|
|
127
130
|
desc 'release', 'release the current branch to production'
|
@@ -132,20 +135,19 @@ module Socialcast
|
|
132
135
|
return unless yes?("Release #{branch} to production? (y/n)", :green)
|
133
136
|
|
134
137
|
update
|
135
|
-
|
136
|
-
integrate
|
137
|
-
run_cmd "git checkout #{BASE_BRANCH}"
|
138
|
+
integrate_branch branch, Socialcast::Gitx::BASE_BRANCH
|
139
|
+
invoke :integrate, ['staging']
|
140
|
+
run_cmd "git checkout #{Socialcast::Gitx::BASE_BRANCH}"
|
138
141
|
run_cmd "grb rm #{branch}"
|
139
142
|
|
140
|
-
|
143
|
+
post "#worklog releasing #{branch} to production #scgitx"
|
141
144
|
end
|
142
145
|
|
143
|
-
|
144
146
|
private
|
145
147
|
|
146
148
|
# build a summary of changes
|
147
149
|
def changelog_summary(branch)
|
148
|
-
changes = `git diff --stat origin/#{BASE_BRANCH}...#{branch}`.split("\n")
|
150
|
+
changes = `git diff --stat origin/#{Socialcast::Gitx::BASE_BRANCH}...#{branch}`.split("\n")
|
149
151
|
stats = changes.pop
|
150
152
|
if changes.length > 5
|
151
153
|
dirs = changes.map do |file_change|
|
@@ -5,6 +5,7 @@ module Socialcast
|
|
5
5
|
module Git
|
6
6
|
RESERVED_BRANCHES = %w{ HEAD master staging prototype next_release }
|
7
7
|
|
8
|
+
private
|
8
9
|
def assert_not_protected_branch!(branch, action)
|
9
10
|
raise "Cannot #{action} reserved branch" if RESERVED_BRANCHES.include?(branch) || aggregate_branch?(branch)
|
10
11
|
end
|
@@ -61,9 +62,9 @@ module Socialcast
|
|
61
62
|
end
|
62
63
|
|
63
64
|
# integrate a branch into a destination aggregate branch
|
64
|
-
def integrate_branch(branch, destination_branch
|
65
|
-
assert_not_protected_branch!(branch, 'integrate')
|
66
|
-
raise "Only aggregate branches are allowed for integration: #{AGGREGATE_BRANCHES}" unless aggregate_branch?(destination_branch)
|
65
|
+
def integrate_branch(branch, destination_branch)
|
66
|
+
assert_not_protected_branch!(branch, 'integrate') unless aggregate_branch?(destination_branch)
|
67
|
+
raise "Only aggregate branches are allowed for integration: #{AGGREGATE_BRANCHES}" unless aggregate_branch?(destination_branch) || destination_branch == Socialcast::Gitx::BASE_BRANCH
|
67
68
|
say "Integrating "
|
68
69
|
say "#{branch} ", :green
|
69
70
|
say "into "
|
@@ -5,6 +5,7 @@ require 'socialcast'
|
|
5
5
|
module Socialcast
|
6
6
|
module Gitx
|
7
7
|
module Github
|
8
|
+
private
|
8
9
|
# request github authorization token
|
9
10
|
# store the token in ~/.socialcast/credentials.yml for future reuse
|
10
11
|
# @see http://developer.github.com/v3/oauth/#scopes
|
@@ -30,11 +31,11 @@ module Socialcast
|
|
30
31
|
|
31
32
|
# @see http://developer.github.com/v3/pulls/
|
32
33
|
def create_pull_request(token, branch, repo, body)
|
33
|
-
payload = {:title => branch, :base =>
|
34
|
+
payload = {:title => branch, :base => Socialcast::Gitx::BASE_BRANCH, :head => branch, :body => body}.to_json
|
34
35
|
say "Creating pull request for "
|
35
36
|
say "#{branch} ", :green
|
36
37
|
say "against "
|
37
|
-
say "
|
38
|
+
say "#{Socialcast::Gitx::BASE_BRANCH} ", :green
|
38
39
|
say "in "
|
39
40
|
say repo, :green
|
40
41
|
response = RestClient::Request.new(:url => "https://api.github.com/repos/#{repo}/pulls", :method => "POST", :payload => payload, :headers => {:accept => :json, :content_type => :json, 'Authorization' => "token #{token}"}).execute
|
@@ -21,7 +21,9 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_runtime_dependency(%q<json_pure>, [">= 0"])
|
22
22
|
s.add_runtime_dependency(%q<thor>, [">= 0"])
|
23
23
|
s.add_development_dependency(%q<rake>, ["0.9.2.2"])
|
24
|
-
s.add_development_dependency
|
24
|
+
s.add_development_dependency "rspec", '>= 2.11.0'
|
25
|
+
s.add_development_dependency "pry", '>= 0'
|
26
|
+
s.add_development_dependency "webmock", '>= 0'
|
25
27
|
|
26
28
|
s.files = `git ls-files`.split("\n")
|
27
29
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/spec/cli_spec.rb
ADDED
@@ -0,0 +1,263 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Socialcast::Gitx::CLI do
|
4
|
+
# stub methods on cli
|
5
|
+
class Socialcast::Gitx::CLI
|
6
|
+
class << self
|
7
|
+
attr_accessor :stubbed_executed_commands
|
8
|
+
end
|
9
|
+
private
|
10
|
+
# stub out command execution and record commands for test inspection
|
11
|
+
def run_cmd(cmd)
|
12
|
+
self.class.stubbed_executed_commands << cmd
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
before do
|
17
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands = []
|
18
|
+
Socialcast::Gitx::CLI.any_instance.stub(:current_branch).and_return('FOO')
|
19
|
+
Socialcast::Gitx::CLI.any_instance.stub(:post)
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#update' do
|
23
|
+
before do
|
24
|
+
@script = Socialcast::Gitx::CLI.new
|
25
|
+
@script.invoke :update
|
26
|
+
end
|
27
|
+
it 'should run expected commands' do
|
28
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
29
|
+
'git pull origin FOO',
|
30
|
+
'git pull origin master',
|
31
|
+
'git push origin HEAD',
|
32
|
+
'git remote prune origin'
|
33
|
+
]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#integrate' do
|
38
|
+
context 'when target branch is ommitted' do
|
39
|
+
before do
|
40
|
+
@script = Socialcast::Gitx::CLI.new
|
41
|
+
@script.invoke :integrate
|
42
|
+
end
|
43
|
+
it 'should default to prototype' do
|
44
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
45
|
+
"git pull origin FOO",
|
46
|
+
"git pull origin master",
|
47
|
+
"git push origin HEAD",
|
48
|
+
"git remote prune origin",
|
49
|
+
"git remote prune origin",
|
50
|
+
"git checkout prototype",
|
51
|
+
"git pull . FOO",
|
52
|
+
"git push origin HEAD",
|
53
|
+
"git checkout FOO",
|
54
|
+
"git checkout FOO"
|
55
|
+
]
|
56
|
+
end
|
57
|
+
end
|
58
|
+
context 'when target branch == prototype' do
|
59
|
+
before do
|
60
|
+
@script = Socialcast::Gitx::CLI.new
|
61
|
+
@script.invoke :integrate, ['prototype']
|
62
|
+
end
|
63
|
+
it 'should run expected commands' do
|
64
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
65
|
+
"git pull origin FOO",
|
66
|
+
"git pull origin master",
|
67
|
+
"git push origin HEAD",
|
68
|
+
"git remote prune origin",
|
69
|
+
"git remote prune origin",
|
70
|
+
"git checkout prototype",
|
71
|
+
"git pull . FOO",
|
72
|
+
"git push origin HEAD",
|
73
|
+
"git checkout FOO",
|
74
|
+
"git checkout FOO"
|
75
|
+
]
|
76
|
+
end
|
77
|
+
end
|
78
|
+
context 'when target branch == staging' do
|
79
|
+
before do
|
80
|
+
@script = Socialcast::Gitx::CLI.new
|
81
|
+
@script.invoke :integrate, ['staging']
|
82
|
+
end
|
83
|
+
it 'should run expected commands' do
|
84
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
85
|
+
"git pull origin FOO",
|
86
|
+
"git pull origin master",
|
87
|
+
"git push origin HEAD",
|
88
|
+
"git remote prune origin",
|
89
|
+
"git remote prune origin",
|
90
|
+
"git checkout staging",
|
91
|
+
"git pull . FOO",
|
92
|
+
"git push origin HEAD",
|
93
|
+
"git checkout FOO",
|
94
|
+
"git remote prune origin",
|
95
|
+
"git checkout prototype",
|
96
|
+
"git pull . staging",
|
97
|
+
"git push origin HEAD",
|
98
|
+
"git checkout staging",
|
99
|
+
"git checkout FOO"
|
100
|
+
]
|
101
|
+
end
|
102
|
+
end
|
103
|
+
context 'when target branch != staging || prototype' do
|
104
|
+
it 'should raise an error' do
|
105
|
+
@script = Socialcast::Gitx::CLI.new
|
106
|
+
lambda { @script.invoke :integrate, ['asdfasdf'] }.should raise_error(/Only aggregate branches are allowed for integration/)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
describe '#release' do
|
112
|
+
context 'when user rejects release' do
|
113
|
+
before do
|
114
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:yes?).and_return(false)
|
115
|
+
@script = Socialcast::Gitx::CLI.new
|
116
|
+
@script.invoke :release
|
117
|
+
end
|
118
|
+
it 'should run no commands' do
|
119
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == []
|
120
|
+
end
|
121
|
+
end
|
122
|
+
context 'when user confirms release' do
|
123
|
+
before do
|
124
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:yes?).and_return(true)
|
125
|
+
@script = Socialcast::Gitx::CLI.new
|
126
|
+
@script.invoke :release
|
127
|
+
end
|
128
|
+
it 'should run expected commands' do
|
129
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
130
|
+
"git pull origin FOO",
|
131
|
+
"git pull origin master",
|
132
|
+
"git push origin HEAD",
|
133
|
+
"git remote prune origin",
|
134
|
+
"git remote prune origin",
|
135
|
+
"git checkout master",
|
136
|
+
"git pull . FOO",
|
137
|
+
"git push origin HEAD",
|
138
|
+
"git checkout FOO",
|
139
|
+
"git pull origin FOO",
|
140
|
+
"git pull origin master",
|
141
|
+
"git push origin HEAD",
|
142
|
+
"git remote prune origin",
|
143
|
+
"git remote prune origin",
|
144
|
+
"git checkout staging",
|
145
|
+
"git pull . FOO",
|
146
|
+
"git push origin HEAD",
|
147
|
+
"git checkout FOO",
|
148
|
+
"git remote prune origin",
|
149
|
+
"git checkout prototype",
|
150
|
+
"git pull . staging",
|
151
|
+
"git push origin HEAD",
|
152
|
+
"git checkout staging",
|
153
|
+
"git checkout FOO",
|
154
|
+
"git checkout master",
|
155
|
+
"grb rm FOO"
|
156
|
+
]
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
describe '#nuke' do
|
162
|
+
context 'when target branch == prototype and --destination == master' do
|
163
|
+
before do
|
164
|
+
@script = Socialcast::Gitx::CLI.new
|
165
|
+
@script.invoke :nuke, ['prototype'], {:destination => 'master'}
|
166
|
+
end
|
167
|
+
it 'should run expected commands' do
|
168
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
169
|
+
"git checkout last_known_good_master",
|
170
|
+
"git pull",
|
171
|
+
"git branch -D prototype",
|
172
|
+
"git push origin :prototype",
|
173
|
+
"git checkout -b prototype",
|
174
|
+
"grb publish prototype",
|
175
|
+
"git checkout last_known_good_master",
|
176
|
+
"git checkout last_known_good_master",
|
177
|
+
"git pull",
|
178
|
+
"git branch -D last_known_good_prototype",
|
179
|
+
"git push origin :last_known_good_prototype",
|
180
|
+
"git checkout -b last_known_good_prototype",
|
181
|
+
"grb publish last_known_good_prototype",
|
182
|
+
"git checkout last_known_good_master"
|
183
|
+
]
|
184
|
+
end
|
185
|
+
end
|
186
|
+
context 'when target branch == staging and --destination == last_known_good_staging' do
|
187
|
+
before do
|
188
|
+
@script = Socialcast::Gitx::CLI.new
|
189
|
+
@script.invoke :nuke, ['staging'], {:destination => 'last_known_good_staging'}
|
190
|
+
end
|
191
|
+
it 'should run expected commands' do
|
192
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
193
|
+
"git checkout last_known_good_staging",
|
194
|
+
"git pull",
|
195
|
+
"git branch -D staging",
|
196
|
+
"git push origin :staging",
|
197
|
+
"git checkout -b staging",
|
198
|
+
"grb publish staging",
|
199
|
+
"git checkout last_known_good_staging",
|
200
|
+
]
|
201
|
+
end
|
202
|
+
end
|
203
|
+
context 'when target branch == prototype and destination prompt == nil' do
|
204
|
+
before do
|
205
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:ask).and_return('')
|
206
|
+
@script = Socialcast::Gitx::CLI.new
|
207
|
+
@script.invoke :nuke, ['prototype']
|
208
|
+
end
|
209
|
+
it 'defaults to master and should run expected commands' do
|
210
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
211
|
+
"git checkout last_known_good_master",
|
212
|
+
"git pull",
|
213
|
+
"git branch -D prototype",
|
214
|
+
"git push origin :prototype",
|
215
|
+
"git checkout -b prototype",
|
216
|
+
"grb publish prototype",
|
217
|
+
"git checkout last_known_good_master",
|
218
|
+
"git checkout last_known_good_master",
|
219
|
+
"git pull",
|
220
|
+
"git branch -D last_known_good_prototype",
|
221
|
+
"git push origin :last_known_good_prototype",
|
222
|
+
"git checkout -b last_known_good_prototype",
|
223
|
+
"grb publish last_known_good_prototype",
|
224
|
+
"git checkout last_known_good_master"
|
225
|
+
]
|
226
|
+
end
|
227
|
+
end
|
228
|
+
context 'when target branch == prototype and destination prompt = master' do
|
229
|
+
before do
|
230
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:ask).and_return('master')
|
231
|
+
@script = Socialcast::Gitx::CLI.new
|
232
|
+
@script.invoke :nuke, ['prototype']
|
233
|
+
end
|
234
|
+
it 'should run expected commands' do
|
235
|
+
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
236
|
+
"git checkout last_known_good_master",
|
237
|
+
"git pull",
|
238
|
+
"git branch -D prototype",
|
239
|
+
"git push origin :prototype",
|
240
|
+
"git checkout -b prototype",
|
241
|
+
"grb publish prototype",
|
242
|
+
"git checkout last_known_good_master",
|
243
|
+
"git checkout last_known_good_master",
|
244
|
+
"git pull",
|
245
|
+
"git branch -D last_known_good_prototype",
|
246
|
+
"git push origin :last_known_good_prototype",
|
247
|
+
"git checkout -b last_known_good_prototype",
|
248
|
+
"grb publish last_known_good_prototype",
|
249
|
+
"git checkout last_known_good_master"
|
250
|
+
]
|
251
|
+
end
|
252
|
+
end
|
253
|
+
context 'when target branch != staging || prototype' do
|
254
|
+
it 'should raise error' do
|
255
|
+
lambda {
|
256
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:ask).and_return('master')
|
257
|
+
@script = Socialcast::Gitx::CLI.new
|
258
|
+
@script.invoke :nuke, ['asdfasdf']
|
259
|
+
}.should raise_error /Only aggregate branches are allowed to be reset/
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'rspec/mocks'
|
4
|
+
require 'webmock/rspec'
|
5
|
+
require 'pry'
|
6
|
+
RSpec::Mocks::setup(Object.new)
|
7
|
+
|
8
|
+
require 'socialcast-git-extensions/cli'
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.mock_with :rspec
|
12
|
+
|
13
|
+
def capture_with_status(stream)
|
14
|
+
exit_status = 0
|
15
|
+
begin
|
16
|
+
stream = stream.to_s
|
17
|
+
eval "$#{stream} = StringIO.new"
|
18
|
+
begin
|
19
|
+
yield
|
20
|
+
rescue SystemExit => system_exit # catch any exit calls
|
21
|
+
exit_status = system_exit.status
|
22
|
+
end
|
23
|
+
result = eval("$#{stream}").string
|
24
|
+
ensure
|
25
|
+
eval("$#{stream} = #{stream.upcase}")
|
26
|
+
end
|
27
|
+
return result, exit_status
|
28
|
+
end
|
29
|
+
|
30
|
+
def remove_directories(*names)
|
31
|
+
project_dir = Pathname.new(Dir.pwd)
|
32
|
+
names.each do |name|
|
33
|
+
FileUtils.rm_rf(project_dir.join(name)) if FileTest.exists?(project_dir.join(name))
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialcast-git-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.pre2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -124,21 +124,53 @@ dependencies:
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: 0.9.2.2
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
127
|
+
name: rspec
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
|
-
- - '
|
131
|
+
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 2.11.
|
133
|
+
version: 2.11.0
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
none: false
|
138
138
|
requirements:
|
139
|
-
- - '
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 2.11.0
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: pry
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
140
156
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
157
|
+
version: '0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: webmock
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
142
174
|
description: GIT it done!
|
143
175
|
email:
|
144
176
|
- ryan@socialcast.com
|
@@ -180,8 +212,8 @@ files:
|
|
180
212
|
- lib/socialcast-git-extensions/string_ext.rb
|
181
213
|
- lib/socialcast-git-extensions/version.rb
|
182
214
|
- socialcast-git-extensions.gemspec
|
183
|
-
-
|
184
|
-
-
|
215
|
+
- spec/cli_spec.rb
|
216
|
+
- spec/spec_helper.rb
|
185
217
|
homepage: http://github.com/socialcast/socialcast-git-extensions
|
186
218
|
licenses: []
|
187
219
|
post_install_message:
|
@@ -196,7 +228,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
228
|
version: '0'
|
197
229
|
segments:
|
198
230
|
- 0
|
199
|
-
hash:
|
231
|
+
hash: -4402162274573639000
|
200
232
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
233
|
none: false
|
202
234
|
requirements:
|
@@ -210,5 +242,5 @@ signing_key:
|
|
210
242
|
specification_version: 3
|
211
243
|
summary: git extension scripts for socialcast workflow
|
212
244
|
test_files:
|
213
|
-
-
|
214
|
-
-
|
245
|
+
- spec/cli_spec.rb
|
246
|
+
- spec/spec_helper.rb
|
data/test/helper.rb
DELETED