gawky 0.0.2 → 0.0.3.pre1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d846dd392feec35552bbaa1f0d5bd43c8d0cc7dd
4
- data.tar.gz: 44b1f90946ee7a0f44e1dbff998a03e1a5d2d515
3
+ metadata.gz: 20445e68d3e6b37c67d02f64cbab5539c2cf40e0
4
+ data.tar.gz: bd4d31df0bb0e0712c8dfdf5cf942abeb07ec883
5
5
  SHA512:
6
- metadata.gz: 28be83687f9462407cc3be545186130828b74d5cc4ed6aab4d61abff2eaf0a18a8e06a60f81dac10a9e35f84e3cceb3b2cd96d359205be8771931a5c84825b3f
7
- data.tar.gz: 018f0ee80d84d9d8551d2bfa045a5900a22469ca7f6f153ca54c35ebcde69ac53dd1db92cf3c5b0e208e6de09725c9de679f4b1863442f2226bb438176afb428
6
+ metadata.gz: 655a428a74cb78c35ca332f45be7c15cd8188171ea0d871cf608540889961f7379932083c202cad42a2b6fa9faf474ff420045f2e3ea200a837471d9e5339df5
7
+ data.tar.gz: 23be8c519a6637797c57b8592bfb340c985bede90417ff609520b3063755098fe37cfad6dfd36693a72c0ae4ff91c6827bb6ae25cb69e0a81eb10e0ad60f4cf5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gawky (0.0.2.pre1)
4
+ gawky (0.0.3.pre1)
5
5
  github_api (~> 0.11.3)
6
6
  json (~> 1.8.1)
7
7
  term-ansicolor (~> 1.3.0)
data/README.md CHANGED
@@ -20,13 +20,7 @@ And then execute:
20
20
 
21
21
  Or install it yourself as:
22
22
 
23
- $ gem install gawky
24
-
25
- For OSx users
26
-
27
- $ brew install brew-gem
28
- $ git clone https://github.com/abstractj/gawky.git && cd gawky && bundle install //Workaround until fix this [issue](https://github.com/abstractj/gawky/issues/1)
29
- $ brew gem gawky
23
+ $ [sudo] gem install gawky
30
24
 
31
25
  Copy the sample.json file to gawky.json at your HOME directory
32
26
 
@@ -41,7 +35,7 @@ Please make sure to change the values:
41
35
 
42
36
  ## Usage
43
37
 
44
- $ gawky or gawky [organization name]
38
+ $ gawky [organization name]
45
39
 
46
40
  ## Contributing
47
41
 
data/lib/gawky/runner.rb CHANGED
@@ -4,25 +4,24 @@ module Gawky
4
4
  def initialize
5
5
  @date_now = Date.today
6
6
  end
7
-
8
7
  def run
9
- issues = Gawky.github.issues.list(:org => ARGV[0],
10
- :filter => 'all',
11
- :auto_pagination => true,
12
- :sort => 'created')
13
- issues.each do |issue|
14
- if issue['pull_request']
15
- date = DateTime.parse(issue.created_at)
16
- if elapsed_time(date) > Gawky.max_elapsed_days
17
- puts Status.new(date, issue).warning
18
- else
19
- puts Status.new(date, issue).green
8
+ repos = Gawky.github.repos.list org: Gawky.organization, per_page: 100
9
+ repos.each do |repo|
10
+ if repo.open_issues_count > 0
11
+ pulls = Gawky.github.pull_requests.list user: Gawky.organization, repo: repo.name
12
+ pulls.each do |pull|
13
+ date = DateTime.parse(pull.created_at)
14
+ if elapsed_time(date) > Gawky.max_elapsed_days
15
+ puts Status.new(date, pull).warning
16
+ else
17
+ puts Status.new(date, pull).green
18
+ end
20
19
  end
21
20
  end
22
21
  end
23
22
  end
24
23
 
25
- private
24
+ private
26
25
 
27
26
  def elapsed_time(date)
28
27
  (@date_now - date).to_i
data/lib/gawky/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gawky
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3.pre1"
3
3
  end
data/lib/gawky.rb CHANGED
@@ -8,6 +8,14 @@ module Gawky
8
8
 
9
9
  @@configuration = JSON.load(IO.read(ENV['HOME'] + '/.gawky.json'))
10
10
 
11
+ if ARGV.empty?
12
+ puts "Please provide the organization name\n Usage: gawky [organization]"
13
+ exit
14
+ end
15
+
16
+ def organization
17
+ ARGV.first
18
+ end
11
19
  def self.github
12
20
  Github.new oauth_token: @@configuration['token']
13
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gawky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Oliveira
@@ -116,9 +116,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - '>='
119
+ - - '>'
120
120
  - !ruby/object:Gem::Version
121
- version: '0'
121
+ version: 1.3.1
122
122
  requirements: []
123
123
  rubyforge_project:
124
124
  rubygems_version: 2.1.11