socialcast-git-extensions 3.1.12 → 3.1.13
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzEwOTM0ZjE3NGM1MWFjMWFlNWFjMDU3MzJmMTJmOTcxZTFhMmJjNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODA5YmU0ZGIxZDMzMTU4MTY2ODFiYjQ0ZjRlNTNiYTgxNjc4ZDNlMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Mjg5OTRlNjU0NjExOWFmZjNhMWNiMWJlMzM1MjFlYjg5Mjc4NmUzMTI5MDdj
|
10
|
+
YzQ3NjlmMDA1OTgwYjkzZWJlZTdmODgxZDk1MGIwM2RjN2Y5M2VlZGM2OTFj
|
11
|
+
YThhNjI1NGIwNWU5MTUwM2RlYTk2ZDM4YzMzYTE1NzIzYjgxMGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTVlMmRjM2MxNWNhOTEyMDAzOGEzNmJhYzNkNzFhZjZmMmFkZTdlMmIyY2Rh
|
14
|
+
YzZiZWVlOWRmZmNiMDRjZDA1MWI3ZDYwYzBlN2MwMDEwNWU2NDQ1NDdmOWY2
|
15
|
+
ZDFlMGYzZThmODJjMmVhN2ZlN2VhZjE5ZmM5NTUxMzJkMjA2ZTA=
|
@@ -193,7 +193,7 @@ module Socialcast
|
|
193
193
|
def post(message, params = {})
|
194
194
|
return if options[:quiet]
|
195
195
|
require 'socialcast'
|
196
|
-
require 'socialcast/message'
|
196
|
+
require 'socialcast/command_line/message'
|
197
197
|
ActiveResource::Base.logger = Logger.new(STDOUT) if options[:trace]
|
198
198
|
Socialcast::Message.configure_from_credentials
|
199
199
|
Socialcast::Message.create params.merge(:body => message)
|
@@ -12,7 +12,7 @@ module Socialcast
|
|
12
12
|
# @see http://developer.github.com/v3/oauth/#scopes
|
13
13
|
# @see http://developer.github.com/v3/#user-agent-required
|
14
14
|
def authorization_token
|
15
|
-
credentials = Socialcast.credentials
|
15
|
+
credentials = Socialcast::CommandLine.credentials
|
16
16
|
return credentials[:scgitx_token] if credentials[:scgitx_token]
|
17
17
|
|
18
18
|
username = current_user
|
@@ -23,7 +23,7 @@ module Socialcast
|
|
23
23
|
response = RestClient::Request.new(:url => "https://api.github.com/authorizations", :method => "POST", :user => username, :password => password, :payload => payload, :headers => {:accept => :json, :content_type => :json, :user_agent => 'socialcast-git-extensions'}).execute
|
24
24
|
data = JSON.parse response.body
|
25
25
|
token = data['token']
|
26
|
-
Socialcast.credentials = credentials.merge(:scgitx_token => token)
|
26
|
+
Socialcast::CommandLine.credentials = credentials.merge(:scgitx_token => token)
|
27
27
|
token
|
28
28
|
rescue RestClient::Exception => e
|
29
29
|
process_error e
|
@@ -14,10 +14,10 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = "socialcast-git-extensions"
|
16
16
|
|
17
|
+
s.add_dependency(%q<json_pure>, [">= 0"])
|
17
18
|
s.add_runtime_dependency(%q<grit>, [">= 0"])
|
18
|
-
s.add_runtime_dependency(%q<socialcast>, [">= 1.
|
19
|
+
s.add_runtime_dependency(%q<socialcast>, [">= 1.3.0"])
|
19
20
|
s.add_runtime_dependency(%q<rest-client>, [">= 1.4.0"])
|
20
|
-
s.add_runtime_dependency(%q<json_pure>, [">= 0"])
|
21
21
|
s.add_runtime_dependency(%q<thor>, [">= 0"])
|
22
22
|
s.add_development_dependency(%q<rake>, ["0.9.2.2"])
|
23
23
|
s.add_development_dependency "rspec", '>= 2.11.0'
|
data/spec/cli_spec.rb
CHANGED
@@ -150,6 +150,7 @@ describe Socialcast::Gitx::CLI do
|
|
150
150
|
before do
|
151
151
|
Socialcast::Gitx::CLI.any_instance.should_receive(:post).with("#worklog releasing FOO to master #scgitx")
|
152
152
|
Socialcast::Gitx::CLI.any_instance.should_receive(:yes?).and_return(true)
|
153
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:cleanup)
|
153
154
|
Socialcast::Gitx::CLI.start ['release']
|
154
155
|
end
|
155
156
|
it 'should post message to socialcast' do end # see expectations
|
@@ -167,10 +168,7 @@ describe Socialcast::Gitx::CLI do
|
|
167
168
|
"git checkout staging",
|
168
169
|
"git pull . master",
|
169
170
|
"git push origin HEAD",
|
170
|
-
"git checkout master"
|
171
|
-
"git checkout master",
|
172
|
-
"git pull",
|
173
|
-
"git remote prune origin"
|
171
|
+
"git checkout master"
|
174
172
|
]
|
175
173
|
end
|
176
174
|
end
|
@@ -192,6 +190,7 @@ describe Socialcast::Gitx::CLI do
|
|
192
190
|
Socialcast::Gitx::CLI.any_instance.should_receive(:post).with("#worklog releasing FOO to special-master #scgitx")
|
193
191
|
Socialcast::Gitx::CLI.any_instance.should_receive(:yes?).and_return(true)
|
194
192
|
Socialcast::Gitx::CLI.any_instance.stub(:config).and_return( { 'base_branch' => 'special-master' })
|
193
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:cleanup)
|
195
194
|
Socialcast::Gitx::CLI.start ['release']
|
196
195
|
end
|
197
196
|
it 'should post message to socialcast' do end # see expectations
|
@@ -212,10 +211,7 @@ describe Socialcast::Gitx::CLI do
|
|
212
211
|
"git checkout staging",
|
213
212
|
"git pull . special-master",
|
214
213
|
"git push origin HEAD",
|
215
|
-
"git checkout special-master"
|
216
|
-
"git checkout special-master",
|
217
|
-
"git pull",
|
218
|
-
"git remote prune origin"
|
214
|
+
"git checkout special-master"
|
219
215
|
]
|
220
216
|
end
|
221
217
|
end
|
@@ -225,6 +221,7 @@ describe Socialcast::Gitx::CLI do
|
|
225
221
|
Socialcast::Gitx::CLI.any_instance.should_receive(:post).with("#worklog releasing FOO to special-master #scgitx")
|
226
222
|
Socialcast::Gitx::CLI.any_instance.should_receive(:yes?).and_return(true)
|
227
223
|
Socialcast::Gitx::CLI.any_instance.stub(:config).and_return({})
|
224
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:cleanup)
|
228
225
|
ENV['BASE_BRANCH'] = 'special-master'
|
229
226
|
Socialcast::Gitx::CLI.start ['release']
|
230
227
|
end
|
@@ -249,10 +246,7 @@ describe Socialcast::Gitx::CLI do
|
|
249
246
|
"git checkout staging",
|
250
247
|
"git pull . special-master",
|
251
248
|
"git push origin HEAD",
|
252
|
-
"git checkout special-master"
|
253
|
-
"git checkout special-master",
|
254
|
-
"git pull",
|
255
|
-
"git remote prune origin"
|
249
|
+
"git checkout special-master"
|
256
250
|
]
|
257
251
|
end
|
258
252
|
end
|
@@ -262,6 +256,7 @@ describe Socialcast::Gitx::CLI do
|
|
262
256
|
Socialcast::Gitx::CLI.any_instance.should_receive(:post).with("#worklog releasing FOO to special-master #scgitx")
|
263
257
|
Socialcast::Gitx::CLI.any_instance.should_receive(:yes?).and_return(true)
|
264
258
|
Socialcast::Gitx::CLI.any_instance.stub(:config).and_return({ 'base_branch' => 'extra-special-master' })
|
259
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:cleanup)
|
265
260
|
ENV['BASE_BRANCH'] = 'special-master'
|
266
261
|
Socialcast::Gitx::CLI.start ['release']
|
267
262
|
end
|
@@ -287,10 +282,7 @@ describe Socialcast::Gitx::CLI do
|
|
287
282
|
"git checkout staging",
|
288
283
|
"git pull . special-master",
|
289
284
|
"git push origin HEAD",
|
290
|
-
"git checkout special-master"
|
291
|
-
"git checkout special-master",
|
292
|
-
"git pull",
|
293
|
-
"git remote prune origin"
|
285
|
+
"git checkout special-master"
|
294
286
|
]
|
295
287
|
end
|
296
288
|
end
|
@@ -465,7 +457,7 @@ describe Socialcast::Gitx::CLI do
|
|
465
457
|
}
|
466
458
|
|
467
459
|
stub_request(:get, "https://api.github.com/search/issues?q=abc123%20type:pr%20repo:socialcast/socialcast-git-extensions").
|
468
|
-
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Authorization'
|
460
|
+
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Authorization'=>/token\s\w+/, 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}).
|
469
461
|
to_return(:status => 200, :body => stub_response.to_json, :headers => {})
|
470
462
|
Socialcast::Gitx::CLI.any_instance.should_receive(:findpr).and_call_original
|
471
463
|
Socialcast::Gitx::CLI.any_instance.stub(:say).with do |message|
|
@@ -508,7 +500,9 @@ describe Socialcast::Gitx::CLI do
|
|
508
500
|
context 'when review_buddies are specified via a /config YML file' do
|
509
501
|
before do
|
510
502
|
stub_request(:post, "https://api.github.com/repos/socialcast/socialcast-git-extensions/pulls").
|
511
|
-
to_return(:status => 200, :body => %q({"html_url": "http://github.com/repo/project/pulls/1"}), :headers => {})
|
503
|
+
to_return(:status => 200, :body => %q({"html_url": "http://github.com/repo/project/pulls/1", "issue_url": "http://github.com/repos/repo/project/issues/1"}), :headers => {})
|
504
|
+
|
505
|
+
stub_request(:patch, "http://github.com/repos/repo/project/issues/1").to_return(:status => 200)
|
512
506
|
|
513
507
|
# The Review Buddy should be @mentioned in the message
|
514
508
|
Socialcast::Gitx::CLI.any_instance.should_receive(:post).with("#reviewrequest for FOO #scgitx\n\n/cc @SocialcastDevelopers\n\nAssigned to @VanMiranda\n\ntesting\n\n", :url => 'http://github.com/repo/project/pulls/1', :message_type => 'review_request')
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialcast-git-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Sonnek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: json_pure
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ! '>='
|
@@ -25,47 +25,47 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: grit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: socialcast
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.3.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rest-client
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.4.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.4.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: thor
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|