vain 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0efc4d894111534f52033fed07f8f0dc373ce054
4
+ data.tar.gz: c32e2039f035b70393de111f848795ad2cff70a3
5
+ SHA512:
6
+ metadata.gz: 029a69ad74784131b6687e4a080d58ea89c796fedaa88b11b43f28ee03a18b018a54f0f215555b504c73183dd309cf72302092d0788dfa929201e54754ed546e
7
+ data.tar.gz: cf4ec17af49b93757eee9188b62c2bcd445b7dfb6a073c1bb4eda378bca853e01bf2ab6e1558a3bc92c90c762c2e5837013a940d64acb65d244da8968c7ff250
data/bin/vain CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require File.dirname(__FILE__) + '/../lib/vain'
3
+ $:.unshift File.join File.dirname(__FILE__), '..', 'lib'
4
+ require 'vain'
4
5
 
5
6
  console = Vain::CLI.new
6
7
  console.start
data/lib/vain/cli.rb CHANGED
@@ -13,7 +13,6 @@ module Vain
13
13
  ErrorColor = "\e[31m"
14
14
 
15
15
  # Get the commands from the command line
16
- # (Somewhat primitive, will be expanded) TODO
17
16
  def start
18
17
  ARGV.length == 1 ? status(ARGV[0]) : help
19
18
  end
data/lib/vain/github.rb CHANGED
@@ -6,11 +6,13 @@ module Vain
6
6
 
7
7
  module Github
8
8
 
9
+ ACCEPT = 'application/vnd.github.v3+json'
10
+
9
11
  # Try to get a user - return nil if they're not found
10
12
  class User < Hashie::Mash
11
13
  def self.get(user_name)
12
14
  begin
13
- response = RestClient.get("https://api.github.com/users/#{user_name}")
15
+ response = RestClient.get("https://api.github.com/users/#{user_name}", accept: ACCEPT)
14
16
  User.new(JSON.parse(response))
15
17
  rescue RestClient::ResourceNotFound
16
18
  nil
@@ -24,7 +26,7 @@ module Vain
24
26
  all_repos = []
25
27
  page = 1
26
28
  begin
27
- response = RestClient.get("https://api.github.com/users/#{user_name}/repos?page=#{page}")
29
+ response = RestClient.get("https://api.github.com/users/#{user_name}/repos?page=#{page}", accept: ACCEPT)
28
30
  repos = JSON.parse(response)
29
31
  all_repos.concat repos.map { |hash| Repo.new(hash) }
30
32
  page += 1
data/lib/vain/version.rb CHANGED
@@ -6,6 +6,6 @@ module Vain
6
6
 
7
7
  private
8
8
 
9
- VERSION = [0, 1, 1]
9
+ VERSION = [0, 1, 2]
10
10
 
11
11
  end
metadata CHANGED
@@ -1,60 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - John Crepezzi
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-02-13 00:00:00.000000000Z
11
+ date: 2014-01-08 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: columnizer
16
- requirement: &2157058440 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - =
17
+ - - '='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.0.3
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *2157058440
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.0.3
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: rest-client
27
- requirement: &2157057840 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ~>
31
+ - - "~>"
31
32
  - !ruby/object:Gem::Version
32
33
  version: '1.6'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *2157057840
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: json_pure
38
- requirement: &2157057320 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ~>
45
+ - - "~>"
42
46
  - !ruby/object:Gem::Version
43
47
  version: 1.4.6
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *2157057320
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.4.6
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: hashie
49
- requirement: &2157056740 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - ~>
59
+ - - "~>"
53
60
  - !ruby/object:Gem::Version
54
61
  version: '1.0'
55
62
  type: :runtime
56
63
  prerelease: false
57
- version_requirements: *2157056740
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.0'
58
69
  description: View information about a GitHub account
59
70
  email: john@crepezzi.com
60
71
  executables:
@@ -62,33 +73,32 @@ executables:
62
73
  extensions: []
63
74
  extra_rdoc_files: []
64
75
  files:
76
+ - bin/vain
77
+ - lib/vain.rb
65
78
  - lib/vain/cli.rb
66
79
  - lib/vain/github.rb
67
80
  - lib/vain/version.rb
68
- - lib/vain.rb
69
- - bin/vain
70
81
  homepage: http://github.com/seejohnrun/vain/
71
82
  licenses: []
83
+ metadata: {}
72
84
  post_install_message:
73
85
  rdoc_options: []
74
86
  require_paths:
75
87
  - lib
76
88
  required_ruby_version: !ruby/object:Gem::Requirement
77
- none: false
78
89
  requirements:
79
- - - ! '>='
90
+ - - ">="
80
91
  - !ruby/object:Gem::Version
81
92
  version: '0'
82
93
  required_rubygems_version: !ruby/object:Gem::Requirement
83
- none: false
84
94
  requirements:
85
- - - ! '>='
95
+ - - ">="
86
96
  - !ruby/object:Gem::Version
87
97
  version: '0'
88
98
  requirements: []
89
99
  rubyforge_project: vain
90
- rubygems_version: 1.8.15
100
+ rubygems_version: 2.2.0
91
101
  signing_key:
92
- specification_version: 3
102
+ specification_version: 4
93
103
  summary: GitHub account info
94
104
  test_files: []