soopr 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6022ed76e364676e4f9b4ae7b1bf801775d460de
4
+ data.tar.gz: dc65a10401131cb5884bf58af36c483a260cb9f2
5
+ SHA512:
6
+ metadata.gz: 62e4276c4dfebb8a62f834927283c78054166661b80018a309cb20e57ff732230b9488adeec2b4208fe7f352540d530090613706a8707dc90851d514ab3c457a
7
+ data.tar.gz: 904246086f4e69a9725cd8a97263007dd2dcfaf225c37e349207f2e1181a99bcdb06770be81801e784a27b46c788223858ea7a6aa6f858d8bdb842eb27176cb8
@@ -0,0 +1,4 @@
1
+ .DS_Store
2
+ results.html
3
+ pkg
4
+ html
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in soopr.gemspec
4
+ gemspec
@@ -0,0 +1,76 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ soopr (0.1.0)
5
+ methadone (~> 1.9.2)
6
+ netrc (~> 0.11.0)
7
+ octokit (~> 4.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ addressable (2.4.0)
13
+ aruba (0.14.1)
14
+ childprocess (~> 0.5.6)
15
+ contracts (~> 0.9)
16
+ cucumber (>= 1.3.19)
17
+ ffi (~> 1.9.10)
18
+ rspec-expectations (>= 2.99)
19
+ thor (~> 0.19)
20
+ builder (3.2.2)
21
+ childprocess (0.5.9)
22
+ ffi (~> 1.0, >= 1.0.11)
23
+ contracts (0.14.0)
24
+ cucumber (2.3.3)
25
+ builder (>= 2.1.2)
26
+ cucumber-core (~> 1.4.0)
27
+ cucumber-wire (~> 0.0.1)
28
+ diff-lcs (>= 1.1.3)
29
+ gherkin (~> 3.2.0)
30
+ multi_json (>= 1.7.5, < 2.0)
31
+ multi_test (>= 0.1.2)
32
+ cucumber-core (1.4.0)
33
+ gherkin (~> 3.2.0)
34
+ cucumber-wire (0.0.1)
35
+ diff-lcs (1.2.5)
36
+ faraday (0.9.2)
37
+ multipart-post (>= 1.2, < 3)
38
+ ffi (1.9.10)
39
+ gherkin (3.2.0)
40
+ json (1.8.3)
41
+ methadone (1.9.2)
42
+ bundler
43
+ multi_json (1.11.3)
44
+ multi_test (0.1.2)
45
+ multipart-post (2.0.0)
46
+ netrc (0.11.0)
47
+ octokit (4.3.0)
48
+ sawyer (~> 0.7.0, >= 0.5.3)
49
+ power_assert (0.2.7)
50
+ rake (11.1.2)
51
+ rdoc (4.2.2)
52
+ json (~> 1.4)
53
+ rspec-expectations (3.4.0)
54
+ diff-lcs (>= 1.2.0, < 2.0)
55
+ rspec-support (~> 3.4.0)
56
+ rspec-support (3.4.1)
57
+ sawyer (0.7.0)
58
+ addressable (>= 2.3.5, < 2.5)
59
+ faraday (~> 0.8, < 0.10)
60
+ test-unit (3.1.8)
61
+ power_assert
62
+ thor (0.19.1)
63
+
64
+ PLATFORMS
65
+ ruby
66
+
67
+ DEPENDENCIES
68
+ aruba
69
+ bundler (~> 1.11)
70
+ rake
71
+ rdoc
72
+ soopr!
73
+ test-unit
74
+
75
+ BUNDLED WITH
76
+ 1.11.2
@@ -0,0 +1,8 @@
1
+ Name: soopr
2
+ Copyright (c) 2016 Nils Blum-Oeste
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+
6
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,41 @@
1
+ # SOOPR
2
+
3
+ SOOPR offers open pull requests
4
+
5
+ ## Installation
6
+
7
+ Just clone it for now.
8
+
9
+ SOOPR assumes you have a `~/.netrc` file for Github API auth:
10
+
11
+ ```
12
+ machine api.github.com
13
+ login [username]
14
+ password [password or oauth token]
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ Run from the project root:
20
+
21
+ `bundle exec bin/soopr [organisation] [team]`
22
+
23
+ Usage help is available, too:
24
+
25
+ `bundle exec bin/soopr --help`
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/nblumoe/soopr.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
@@ -0,0 +1,23 @@
1
+ = soopr - DESCRIBE YOUR GEM
2
+
3
+ Author:: YOUR NAME (YOUR EMAIL)
4
+ Copyright:: Copyright (c) 2016 YOUR NAME
5
+
6
+
7
+ License:: mit, see LICENSE.txt
8
+
9
+
10
+
11
+ DESCRIBE YOUR GEM HERE
12
+
13
+ == Links
14
+
15
+ * {Source on Github}[LINK TO GITHUB]
16
+ * RDoc[LINK TO RDOC.INFO]
17
+
18
+ == Install
19
+
20
+ == Examples
21
+
22
+ == Contributing
23
+
@@ -0,0 +1,61 @@
1
+ def dump_load_path
2
+ puts $LOAD_PATH.join("\n")
3
+ found = nil
4
+ $LOAD_PATH.each do |path|
5
+ if File.exists?(File.join(path,"rspec"))
6
+ puts "Found rspec in #{path}"
7
+ if File.exists?(File.join(path,"rspec","core"))
8
+ puts "Found core"
9
+ if File.exists?(File.join(path,"rspec","core","rake_task"))
10
+ puts "Found rake_task"
11
+ found = path
12
+ else
13
+ puts "!! no rake_task"
14
+ end
15
+ else
16
+ puts "!!! no core"
17
+ end
18
+ end
19
+ end
20
+ if found.nil?
21
+ puts "Didn't find rspec/core/rake_task anywhere"
22
+ else
23
+ puts "Found in #{path}"
24
+ end
25
+ end
26
+ require 'bundler'
27
+ require 'rake/clean'
28
+
29
+ require 'rake/testtask'
30
+
31
+ require 'cucumber'
32
+ require 'cucumber/rake/task'
33
+ gem 'rdoc' # we need the installed RDoc gem, not the system one
34
+ require 'rdoc/task'
35
+
36
+ include Rake::DSL
37
+
38
+ Bundler::GemHelper.install_tasks
39
+
40
+
41
+ Rake::TestTask.new do |t|
42
+ t.pattern = 'test/tc_*.rb'
43
+ end
44
+
45
+
46
+ CUKE_RESULTS = 'results.html'
47
+ CLEAN << CUKE_RESULTS
48
+ Cucumber::Rake::Task.new(:features) do |t|
49
+ t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
50
+ t.fork = false
51
+ end
52
+
53
+ Rake::RDocTask.new do |rd|
54
+
55
+ rd.main = "README.rdoc"
56
+
57
+ rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
58
+ end
59
+
60
+ task :default => [:test,:features]
61
+
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "soopr"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ require 'methadone'
5
+ require 'octokit'
6
+ require 'soopr.rb'
7
+
8
+ class String
9
+ # colorization
10
+ def colorize(color_code)
11
+ "\e[#{color_code}m#{self}\e[0m"
12
+ end
13
+
14
+ def red
15
+ colorize(31)
16
+ end
17
+
18
+ def green
19
+ colorize(32)
20
+ end
21
+
22
+ def blue
23
+ colorize(34)
24
+ end
25
+ end
26
+
27
+ class App
28
+ include Methadone::Main
29
+ include Methadone::CLILogging
30
+
31
+ main do |organisation, team|
32
+ Octokit.configure do |c|
33
+ c.netrc = true
34
+ end
35
+
36
+ debug "Starting to fetch teams for organisation '#{organisation}'"
37
+
38
+ teams = Octokit.organization_teams organisation
39
+ team_resource = teams.find{ |t| t.name == team}
40
+ if team_resource.nil?
41
+ exit_now! 1, "No team with name '#{team}' could be found"
42
+ end
43
+
44
+ debug "Starting to fetch repos for team '#{team}'"
45
+
46
+ repos = Octokit.team_repositories(team_resource.id)
47
+ .select{|r| r.open_issues_count > 10}
48
+
49
+
50
+ if repos.empty?
51
+ puts "No open pull requests found.".green
52
+ else
53
+
54
+ debug "Open pull requests for '#{team}':"
55
+
56
+ repos.each do |repo|
57
+ pull_requests = Octokit.pull_requests repo.id
58
+ if pull_requests.size > 0 then
59
+ puts "# #{repo.name}".red
60
+ pull_requests.each do |pr|
61
+ puts "- #{pr.title}: ".blue + "#{pr.html_url}\n\n".green
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+
68
+ version Soopr::VERSION
69
+
70
+ description 'List open pull requests of a Github team'
71
+
72
+ arg :organisation, "Github organisation the team belongs to"
73
+ arg :team, "Github team from which to list open pull requests"
74
+
75
+ use_log_level_option :toggle_debug_on_signal => 'USR1'
76
+
77
+ go!
78
+ end
@@ -0,0 +1,5 @@
1
+ require "soopr/version"
2
+
3
+ module Soopr
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,3 @@
1
+ module Soopr
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'soopr/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "soopr"
8
+ spec.version = Soopr::VERSION
9
+ spec.authors = ["Nils Blum-Oeste"]
10
+ spec.email = ["nblumoeste@gmail.com"]
11
+
12
+ spec.summary = %q{Simple CLI tool to list open pull requests of a Github team.}
13
+ spec.homepage = "https://github.com/nblumoe/soopr"
14
+ spec.license = "mit"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.11"
22
+ spec.add_development_dependency('rdoc')
23
+ spec.add_development_dependency('aruba')
24
+ spec.add_development_dependency('rake')
25
+ spec.add_dependency('methadone', '~> 1.9.2')
26
+ spec.add_development_dependency('test-unit')
27
+ spec.add_dependency('octokit', '~> 4.0')
28
+ spec.add_dependency('netrc', '~>0.11.0')
29
+
30
+ end
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: soopr
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Nils Blum-Oeste
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-05-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.11'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.11'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rdoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: aruba
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: methadone
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.9.2
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.9.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: test-unit
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: octokit
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '4.0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '4.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: netrc
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.11.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.11.0
125
+ description:
126
+ email:
127
+ - nblumoeste@gmail.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - Gemfile
134
+ - Gemfile.lock
135
+ - LICENSE.txt
136
+ - README.md
137
+ - README.rdoc
138
+ - Rakefile
139
+ - bin/console
140
+ - bin/setup
141
+ - bin/soopr
142
+ - lib/soopr.rb
143
+ - lib/soopr/version.rb
144
+ - soopr.gemspec
145
+ homepage: https://github.com/nblumoe/soopr
146
+ licenses:
147
+ - mit
148
+ metadata: {}
149
+ post_install_message:
150
+ rdoc_options: []
151
+ require_paths:
152
+ - lib
153
+ required_ruby_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ requirements: []
164
+ rubyforge_project:
165
+ rubygems_version: 2.4.6
166
+ signing_key:
167
+ specification_version: 4
168
+ summary: Simple CLI tool to list open pull requests of a Github team.
169
+ test_files: []
170
+ has_rdoc: