vain 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/vain/github.rb +3 -3
  2. data/lib/vain/version.rb +2 -2
  3. metadata +48 -86
data/lib/vain/github.rb CHANGED
@@ -10,8 +10,8 @@ module Vain
10
10
  class User < Hashie::Mash
11
11
  def self.get(user_name)
12
12
  begin
13
- response = RestClient.get("http://github.com/api/v2/json/user/show/#{user_name}")
14
- User.new(JSON.parse(response)["user"])
13
+ response = RestClient.get("https://api.github.com/users/#{user_name}")
14
+ User.new(JSON.parse(response))
15
15
  rescue RestClient::ResourceNotFound
16
16
  nil
17
17
  end
@@ -24,7 +24,7 @@ module Vain
24
24
  all_repos = []
25
25
  page = 1
26
26
  begin
27
- response = RestClient.get("http://github.com/api/v2/json/repos/show/#{user_name}?page=#{page}")
27
+ response = RestClient.get("https://api.github.com/users/#{user_name}/repos?page=#{page}")
28
28
  repos = JSON.parse(response)["repositories"]
29
29
  all_repos.concat repos.map { |hash| Repo.new(hash) }
30
30
  page += 1
data/lib/vain/version.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  module Vain
2
-
2
+
3
3
  def self.version
4
4
  VERSION.join('.')
5
5
  end
6
6
 
7
7
  private
8
8
 
9
- VERSION = [0, 0, 9]
9
+ VERSION = [0, 1, 0]
10
10
 
11
11
  end
metadata CHANGED
@@ -1,132 +1,94 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: vain
3
- version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 9
10
- version: 0.0.9
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - John Crepezzi
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-01-29 00:00:00 -05:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-02-13 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: columnizer
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2153465840 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - "="
28
- - !ruby/object:Gem::Version
29
- hash: 25
30
- segments:
31
- - 0
32
- - 0
33
- - 3
18
+ requirements:
19
+ - - =
20
+ - !ruby/object:Gem::Version
34
21
  version: 0.0.3
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: rest-client
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2153465840
25
+ - !ruby/object:Gem::Dependency
26
+ name: rest-client
27
+ requirement: &2153465220 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
29
+ requirements:
43
30
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 1
48
- - 6
49
- version: "1.6"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.6'
50
33
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: json_pure
54
34
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2153465220
36
+ - !ruby/object:Gem::Dependency
37
+ name: json_pure
38
+ requirement: &2153464720 !ruby/object:Gem::Requirement
56
39
  none: false
57
- requirements:
40
+ requirements:
58
41
  - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 11
61
- segments:
62
- - 1
63
- - 4
64
- - 6
42
+ - !ruby/object:Gem::Version
65
43
  version: 1.4.6
66
44
  type: :runtime
67
- version_requirements: *id003
68
- - !ruby/object:Gem::Dependency
69
- name: hashie
70
45
  prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *2153464720
47
+ - !ruby/object:Gem::Dependency
48
+ name: hashie
49
+ requirement: &2153464180 !ruby/object:Gem::Requirement
72
50
  none: false
73
- requirements:
51
+ requirements:
74
52
  - - ~>
75
- - !ruby/object:Gem::Version
76
- hash: 15
77
- segments:
78
- - 1
79
- - 0
80
- version: "1.0"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
81
55
  type: :runtime
82
- version_requirements: *id004
56
+ prerelease: false
57
+ version_requirements: *2153464180
83
58
  description: View information about a GitHub account
84
59
  email: john@crepezzi.com
85
- executables:
60
+ executables:
86
61
  - vain
87
62
  extensions: []
88
-
89
63
  extra_rdoc_files: []
90
-
91
- files:
64
+ files:
92
65
  - lib/vain/cli.rb
93
66
  - lib/vain/github.rb
94
67
  - lib/vain/version.rb
95
68
  - lib/vain.rb
96
69
  - bin/vain
97
- has_rdoc: true
98
70
  homepage: http://github.com/seejohnrun/vain/
99
71
  licenses: []
100
-
101
72
  post_install_message:
102
73
  rdoc_options: []
103
-
104
- require_paths:
74
+ require_paths:
105
75
  - lib
106
- required_ruby_version: !ruby/object:Gem::Requirement
76
+ required_ruby_version: !ruby/object:Gem::Requirement
107
77
  none: false
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- hash: 3
112
- segments:
113
- - 0
114
- version: "0"
115
- required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
83
  none: false
117
- requirements:
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- hash: 3
121
- segments:
122
- - 0
123
- version: "0"
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
124
88
  requirements: []
125
-
126
89
  rubyforge_project: vain
127
- rubygems_version: 1.3.7
90
+ rubygems_version: 1.8.15
128
91
  signing_key:
129
92
  specification_version: 3
130
93
  summary: GitHub account info
131
94
  test_files: []
132
-