git-trend 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6641384803b52d0137e15a7dd865efc72d161e88
4
- data.tar.gz: 2ca21b6db9fc883138dd6e26e0f711c0b86ee89b
3
+ metadata.gz: 3de2ef516de70662c6b0e2fc26fadb1c474b3b7b
4
+ data.tar.gz: 23424ba56d2c4d993448d35174dba801d661140c
5
5
  SHA512:
6
- metadata.gz: 0ae46689a4200911cd7a3f50c193f0cfe6c35e39d1081b6a2f703d67ea5ab2984aa0e2391817d130fbcdb95f9d27582e8763df471fa92792a5fc450fd8f097e0
7
- data.tar.gz: 82c7030844fff4aa6e2d8f6b99eb94735fedb5eb85259e6dfa13d18d4baf09188c1e4487fce4af0a1940d34b8abd07746af459dbae214b4b2c862ff50fbf452c
6
+ metadata.gz: 59767034d3a06bd1a49748a32638db9056b44e31005ee41aaacf50b98f5688a49162e6779850019539f964f594cfd0bbec80963df56889babac94bea72ef92df
7
+ data.tar.gz: a04ede690fcfd3610a374f1b882a336c936023b1ace92240b1479192bf71439494c82754c186d3a7a2161d09960a3be13457aee9c65a027948f84c87ce56bd99
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v1.0.2 (Fri Apr 1 2016)
2
+ - Update gems [0d24fae]
3
+
1
4
  ## v1.0.1 (Wed Feb 12 2016)
2
5
  - Rename executable file [f0f605b]
3
6
 
data/README.md CHANGED
@@ -16,12 +16,15 @@ Ruby versions is 2.0 or later.
16
16
 
17
17
  ## Installation
18
18
  Add this line to your application's Gemfile:
19
+
19
20
  gem 'git-trend'
20
21
 
21
22
  And then execute:
22
- $bundle
23
+
24
+ $ bundle
23
25
 
24
26
  Or install it yourself as:
27
+
25
28
  $ gem install git-trend
26
29
 
27
30
  ## Usage Of a gem
@@ -32,38 +35,42 @@ Require it if you haven't:
32
35
 
33
36
  ### Fetch trending
34
37
 
35
- repos = GitTrend.get
36
- repos.each do |r|
37
- puts "#{r.name} (#{r.star_count} stargazers)"
38
- puts "--- #{r.description}\n\n"
39
- end
40
-
41
- # =>
42
- # jayphelps/git-blame-someone-else (625 stargazers)
43
- # --- Blame someone else for your bad code.
44
- #
45
- # FreeCodeCamp/FreeCodeCamp (574 stargazers)
46
- # --- The http://FreeCodeCamp.com open source codebase and curriculum. Learn to # code and help nonprofits.
47
- #
48
- # p-e-w/maybe (519 stargazers)
49
- # --- See what a program does before deciding whether you really want it to happen.
50
- # ...
38
+ ```ruby
39
+ repos = GitTrend.get
40
+ repos.each do |r|
41
+ puts "#{r.name} (#{r.star_count} stargazers)"
42
+ puts "--- #{r.description}\n\n"
43
+ end
44
+
45
+ # =>
46
+ # jayphelps/git-blame-someone-else (625 stargazers)
47
+ # --- Blame someone else for your bad code.
48
+ #
49
+ # FreeCodeCamp/FreeCodeCamp (574 stargazers)
50
+ # --- The http://FreeCodeCamp.com open source codebase and curriculum. Learn to # code and help nonprofits.
51
+ #
52
+ # p-e-w/maybe (519 stargazers)
53
+ # --- See what a program does before deciding whether you really want it to happen.
54
+ # ...
55
+ ```
51
56
 
52
57
  ### Use language and since options
53
58
 
54
- # language
55
- GitTrend.get('ruby')
56
- GitTrend.get(:ruby)
59
+ ```ruby
60
+ # language
61
+ GitTrend.get('ruby')
62
+ GitTrend.get(:ruby)
57
63
 
58
- # since
59
- GitTrend.get(since: :weekly)
60
- GitTrend.get(since: :week)
61
- GitTrend.get(since: :w)
62
-
63
- # language and since
64
- GitTrend.get('ruby', 'weekly')
65
- GitTrend.get(:ruby, :weekly)
66
- GitTrend.get(language: :ruby, since: :weekly)
64
+ # since
65
+ GitTrend.get(since: :weekly)
66
+ GitTrend.get(since: :week)
67
+ GitTrend.get(since: :w)
68
+
69
+ # language and since
70
+ GitTrend.get('ruby', 'weekly')
71
+ GitTrend.get(:ruby, :weekly)
72
+ GitTrend.get(language: :ruby, since: :weekly)
73
+ ```
67
74
 
68
75
  ### Show enable languages
69
76
 
@@ -150,15 +157,17 @@ No. Name Lang Star Description
150
157
 
151
158
  ### Fetch weekly/monthly trending
152
159
 
153
- git trend -s weekly
154
- git trend -s week
155
- git trend -s w
156
-
157
- or
158
-
159
- git trend -s monthly
160
- git trend -s month
161
- git trend -s m
160
+ ```ruby
161
+ git trend -s weekly
162
+ git trend -s week
163
+ git trend -s w
164
+
165
+ or
166
+
167
+ git trend -s monthly
168
+ git trend -s month
169
+ git trend -s m
170
+ ```
162
171
 
163
172
  e.g.:
164
173
 
@@ -223,7 +232,7 @@ alias trend='g trend -n 10 && g trend -l ruby -n 5 && g trend -l JavaScript -n 5
223
232
 
224
233
  ## Contributing
225
234
 
226
- 1. Fork it ( https://github.com/[my-github-username]/git-trend/fork )
235
+ 1. Fork it ( https://github.com/rochefort/git-trend/fork )
227
236
  2. Create your feature branch (`git checkout -b my-new-feature`)
228
237
  3. Commit your changes (`git commit -am 'Add some feature'`)
229
238
  4. Push to the branch (`git push origin my-new-feature`)
data/git-trend.gemspec CHANGED
@@ -36,19 +36,18 @@ Gem::Specification.new do |spec|
36
36
  spec.post_install_message = install_message
37
37
 
38
38
  spec.add_dependency 'addressable', '~> 2.4.0'
39
- spec.add_dependency 'mb_string', '~> 0.1.4'
39
+ spec.add_dependency 'mb_string', '~> 0.1.6'
40
40
  spec.add_dependency 'mechanize', '~> 2.7.4'
41
41
  spec.add_dependency 'thor', '~> 0.19.1'
42
- spec.add_dependency 'unicode-display_width', '~> 0.3.1'
42
+ spec.add_dependency 'unicode-display_width', '~> 1.0.3'
43
43
 
44
44
  spec.add_development_dependency 'bundler', '~> 1.6'
45
- spec.add_development_dependency 'rake'
45
+ spec.add_development_dependency 'rake', '~> 11.1.2'
46
46
 
47
47
  spec.add_development_dependency 'rspec', '~> 3.4.0'
48
- spec.add_development_dependency 'rspec-its', '~> 1.2.0'
49
- spec.add_development_dependency 'simplecov', '~> 0.11.1'
48
+ spec.add_development_dependency 'simplecov', '~> 0.11.2'
50
49
  spec.add_development_dependency 'safe_yaml', '~> 1.0.4' # for Ruby2.2.0
51
- spec.add_development_dependency 'webmock', '~> 1.22.6'
50
+ spec.add_development_dependency 'webmock', '~> 1.24.2'
52
51
 
53
52
  spec.add_development_dependency 'coveralls'
54
53
  spec.add_development_dependency 'codeclimate-test-reporter'
@@ -1,3 +1,3 @@
1
1
  module GitTrend
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -1,16 +1,25 @@
1
+ include GitTrend
1
2
  RSpec.describe GitTrend::Scraper do
2
3
  let(:scraper) { Scraper.new }
3
4
 
4
5
  describe 'settings' do
5
6
  before do
6
- allow(ENV).to receive(:[]).with('http_proxy').and_return('http://proxy_user:proxy_pass@192.168.1.99:9999')
7
+ allow(ENV).to receive(:[]).with('http_proxy').and_return("http://#{proxy_user}:#{proxy_pass}@#{proxy_addr}:#{proxy_port}")
7
8
  end
9
+ let(:proxy_addr) { '192.168.1.99' }
10
+ let(:proxy_port) { 9999 }
11
+ let(:proxy_user) { 'proxy_user' }
12
+ let(:proxy_pass) { 'proxy_pass' }
8
13
  subject { scraper.instance_variable_get(:@agent) }
9
- its(:user_agent) { should eq "git-trend #{VERSION}" }
10
- its(:proxy_addr) { should eq '192.168.1.99' }
11
- its(:proxy_user) { should eq 'proxy_user' }
12
- its(:proxy_pass) { should eq 'proxy_pass' }
13
- its(:proxy_port) { should eq 9999 }
14
+ it 'should use proxy settings of ENV' do
15
+ aggregate_failures do
16
+ expect(subject.proxy_addr).to eq proxy_addr
17
+ expect(subject.proxy_user).to eq proxy_user
18
+ expect(subject.proxy_pass).to eq proxy_pass
19
+ expect(subject.proxy_port).to eq proxy_port
20
+ expect(subject.user_agent).to eq "git-trend #{VERSION}"
21
+ end
22
+ end
14
23
  end
15
24
 
16
25
  describe '#get' do
data/spec/spec_helper.rb CHANGED
@@ -31,7 +31,6 @@ SimpleCov.start do
31
31
  ])
32
32
  end
33
33
 
34
- require 'rspec/its'
35
34
  require 'webmock/rspec'
36
35
 
37
36
  require 'git_trend'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-trend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rochefort
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-11 00:00:00.000000000 Z
11
+ date: 2016-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.4
33
+ version: 0.1.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.4
40
+ version: 0.1.6
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mechanize
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.3.1
75
+ version: 1.0.3
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.3.1
82
+ version: 1.0.3
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 11.1.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 11.1.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -122,34 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 3.4.0
125
- - !ruby/object:Gem::Dependency
126
- name: rspec-its
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 1.2.0
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: 1.2.0
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: simplecov
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: 0.11.1
131
+ version: 0.11.2
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: 0.11.1
138
+ version: 0.11.2
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: safe_yaml
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +156,14 @@ dependencies:
170
156
  requirements:
171
157
  - - "~>"
172
158
  - !ruby/object:Gem::Version
173
- version: 1.22.6
159
+ version: 1.24.2
174
160
  type: :development
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
- version: 1.22.6
166
+ version: 1.24.2
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: coveralls
183
169
  requirement: !ruby/object:Gem::Requirement