socialcast-git-extensions 2.1.3 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -18,4 +18,7 @@ coverage
18
18
  rdoc
19
19
  pkg
20
20
 
21
+ #bundler
22
+ Gemfile.lock
23
+
21
24
  ## PROJECT::SPECIFIC
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # create a github review request for the current branch
4
+ # usage:
5
+ # git reviewrequest
6
+
7
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extensions.rb')
8
+ include Socialcast
9
+
10
+ is_quiet = ARGV.delete("--quiet") || ARGV.delete("-q")
11
+
12
+ branch = current_branch
13
+ username = `git config -z --global --get github.user`.strip
14
+ password = HighLine.ask("Github password: ") { |q| q.echo = false }
15
+
16
+ run_cmd 'git update'
17
+
18
+ url = create_pull_request username, password, branch
19
+ run_cmd "socialcast share '@SocialcastDevelopers #reviewrequest for #{branch} #scgitx' --url #{url}" unless is_quiet
@@ -1,8 +1,13 @@
1
1
  require 'grit'
2
2
  require 'active_support/all'
3
3
  require 'highline/import'
4
+ require 'rest_client'
5
+ require 'json'
4
6
 
5
7
  module Socialcast
8
+ module Gitx
9
+
10
+ end
6
11
 
7
12
  def current_branch
8
13
  repo = Grit::Repo.new(Dir.pwd)
@@ -52,4 +57,9 @@ module Socialcast
52
57
 
53
58
  run_cmd "git checkout #{branch}"
54
59
  end
60
+ def create_pull_request(username, password, branch)
61
+ response = RestClient.post "https://#{username}:#{password}@api.github.com/repos/socialcast/socialcast/pulls", {:title => branch, :base => 'master', :head => branch}.to_json, :accept => :json, :content_type => :json
62
+ data = JSON.parse response.body
63
+ url = data['html_url']
64
+ end
55
65
  end
@@ -1,7 +1,7 @@
1
1
  module Socialcast
2
2
  module Git
3
3
  module Extensions
4
- VERSION = "2.1.3"
4
+ VERSION = "2.2.0"
5
5
  end
6
6
  end
7
7
  end
@@ -19,6 +19,9 @@ Gem::Specification.new do |s|
19
19
  s.add_runtime_dependency(%q<git_remote_branch>, [">= 0"])
20
20
  s.add_runtime_dependency(%q<highline>, [">= 0"])
21
21
  s.add_runtime_dependency(%q<socialcast>, [">= 0.3.4"])
22
+ s.add_runtime_dependency(%q<rest-client>, [">= 1.4.0"])
23
+ s.add_runtime_dependency(%q<json_pure>, [">= 0"])
24
+ s.add_development_dependency(%q<rake>, ["0.9.2"])
22
25
 
23
26
  s.files = `git ls-files`.split("\n")
24
27
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialcast-git-extensions
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
- - 1
9
- - 3
10
- version: 2.1.3
8
+ - 2
9
+ - 0
10
+ version: 2.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Sonnek
@@ -15,12 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-21 00:00:00 Z
18
+ date: 2011-10-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: grit
22
22
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
26
  - - ">="
@@ -29,12 +29,12 @@ dependencies:
29
29
  segments:
30
30
  - 0
31
31
  version: "0"
32
+ requirement: *id001
32
33
  type: :runtime
33
- version_requirements: *id001
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activesupport
36
36
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
38
38
  none: false
39
39
  requirements:
40
40
  - - ">="
@@ -43,12 +43,12 @@ dependencies:
43
43
  segments:
44
44
  - 0
45
45
  version: "0"
46
+ requirement: *id002
46
47
  type: :runtime
47
- version_requirements: *id002
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: git_remote_branch
50
50
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
51
+ version_requirements: &id003 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ">="
@@ -57,12 +57,12 @@ dependencies:
57
57
  segments:
58
58
  - 0
59
59
  version: "0"
60
+ requirement: *id003
60
61
  type: :runtime
61
- version_requirements: *id003
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: highline
64
64
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
65
+ version_requirements: &id004 !ruby/object:Gem::Requirement
66
66
  none: false
67
67
  requirements:
68
68
  - - ">="
@@ -71,12 +71,12 @@ dependencies:
71
71
  segments:
72
72
  - 0
73
73
  version: "0"
74
+ requirement: *id004
74
75
  type: :runtime
75
- version_requirements: *id004
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: socialcast
78
78
  prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
79
+ version_requirements: &id005 !ruby/object:Gem::Requirement
80
80
  none: false
81
81
  requirements:
82
82
  - - ">="
@@ -87,8 +87,54 @@ dependencies:
87
87
  - 3
88
88
  - 4
89
89
  version: 0.3.4
90
+ requirement: *id005
90
91
  type: :runtime
91
- version_requirements: *id005
92
+ - !ruby/object:Gem::Dependency
93
+ name: rest-client
94
+ prerelease: false
95
+ version_requirements: &id006 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ hash: 7
101
+ segments:
102
+ - 1
103
+ - 4
104
+ - 0
105
+ version: 1.4.0
106
+ requirement: *id006
107
+ type: :runtime
108
+ - !ruby/object:Gem::Dependency
109
+ name: json_pure
110
+ prerelease: false
111
+ version_requirements: &id007 !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ hash: 3
117
+ segments:
118
+ - 0
119
+ version: "0"
120
+ requirement: *id007
121
+ type: :runtime
122
+ - !ruby/object:Gem::Dependency
123
+ name: rake
124
+ prerelease: false
125
+ version_requirements: &id008 !ruby/object:Gem::Requirement
126
+ none: false
127
+ requirements:
128
+ - - "="
129
+ - !ruby/object:Gem::Version
130
+ hash: 63
131
+ segments:
132
+ - 0
133
+ - 9
134
+ - 2
135
+ version: 0.9.2
136
+ requirement: *id008
137
+ type: :development
92
138
  description: GIT it done!
93
139
  email:
94
140
  - ryan@socialcast.com
@@ -99,6 +145,7 @@ executables:
99
145
  - git-release
100
146
  - git-reset-prototype
101
147
  - git-reset-staging
148
+ - git-reviewrequest
102
149
  - git-share
103
150
  - git-start
104
151
  - git-track
@@ -121,6 +168,7 @@ files:
121
168
  - bin/git-release
122
169
  - bin/git-reset-prototype
123
170
  - bin/git-reset-staging
171
+ - bin/git-reviewrequest
124
172
  - bin/git-share
125
173
  - bin/git-start
126
174
  - bin/git-track
@@ -160,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
208
  requirements: []
161
209
 
162
210
  rubyforge_project: socialcast-git-extensions
163
- rubygems_version: 1.8.10
211
+ rubygems_version: 1.8.5
164
212
  signing_key:
165
213
  specification_version: 3
166
214
  summary: git extension scripts for socialcast workflow