gh-trending 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: 461ee5d745b9d3b316bd3cb709efbcdeeb7507ea
4
- data.tar.gz: 2d2a4630245ab5e3bae4f35f64091fa8896fe942
3
+ metadata.gz: 5db3207b8da3785a10c4f6e8af29e0b92aab5e10
4
+ data.tar.gz: 1a30ff5b7958abc430316fb036df5da401982002
5
5
  SHA512:
6
- metadata.gz: 3b09330b0ae4a00ab8941a18e21e330a719ac0477dc7741e8c7e2b0b8ed78b867c6b331fd73ab92048b9aaef9843b2fa96efb995de6d43cba9ed95ac539b5aef
7
- data.tar.gz: 66225f25a11535bca3c1004927cf28f87733fd5d51336a10841e830dd76ddca1349adbc8b1e4b8647b846b041468a7c3c68dcf18c25d4d23c7d5c7bce3e0aa36
6
+ metadata.gz: 46ab1c4fbc8aed72605a82a91a804ce50cf51c8ebda3983f9c9d34b34fa95ec8c7b04d60b8fc963629ba2d7f0d7eaac70356acf4d3e33acbbc9a79e666b24b45
7
+ data.tar.gz: 4003f6bb6bf5f25fa2e526153979ca61a9d5643b34133fc49e8ce907d535fa896ff2abf80eaa34f7b5102a27cfe916b827fe3030cf6367a61cfe86414bffb48c
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  *.gem
11
+ bin
data/README.md CHANGED
@@ -91,17 +91,9 @@ crawler.get language: 'javascript'
91
91
  * `url` => The github's URL of the repository
92
92
  * `period_stars` => The number of stars of the repository in the requested `time_period`.
93
93
 
94
- ## Development
94
+ ## Dependencies
95
95
 
96
- 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.
97
-
98
- ## Contributing
99
-
100
- You can run `bin/dev` to play around with the tool. You should run this command every time you make a change in the gem to test your modifications.
101
-
102
- * If for some reason you can't run the `bin/dev` script, make sure the script has executions rights (`chmod +x bin/dev`).
103
-
104
- Bug reports and pull requests are welcome on GitHub at https://github.com/luispcosta/gh-trending. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
96
+ * [Mechanize](https://github.com/sparklemotion/mechanizes)
105
97
 
106
98
  ## Tests
107
99
 
@@ -6,13 +6,13 @@ module Gh
6
6
  attr_reader :full_name, :user_profile_url, :hot_repository_url
7
7
 
8
8
  def initialize(
9
- full_name: nil,
10
- user_profile_url: nil,
11
- hot_repository_url: nil
9
+ full_name: '',
10
+ user_profile_url: '',
11
+ hot_repository_url: ''
12
12
  )
13
- @full_name = full_name || ''
14
- @user_profile_url = user_profile_url || ''
15
- @hot_repository_url = hot_repository_url || ''
13
+ @full_name = full_name
14
+ @user_profile_url = user_profile_url
15
+ @hot_repository_url = hot_repository_url
16
16
  end
17
17
 
18
18
  def to_h
@@ -18,7 +18,7 @@ module Gh
18
18
  def get(*args)
19
19
  parse_args = Gh::Trending::Parsers::ParserArguments.new(*args)
20
20
  developers_list.clear
21
- developers_list << parser.parse(parse_args).to_a.compact
21
+ developers_list << @parser.parse(parse_args).to_a.compact
22
22
  developers_list.flatten!
23
23
  end
24
24
 
@@ -29,10 +29,6 @@ module Gh
29
29
  def to_h
30
30
  developers_list.map(&:to_h)
31
31
  end
32
-
33
- private
34
-
35
- attr_reader :parser
36
32
  end
37
33
  end
38
34
  end
@@ -19,7 +19,7 @@ module Gh
19
19
  def get(*args)
20
20
  parse_args = Gh::Trending::Parsers::ParserArguments.new(*args)
21
21
  repos_list.clear
22
- repos_list << parser.parse(parse_args).to_a.compact
22
+ repos_list << @parser.parse(parse_args).to_a.compact
23
23
  repos_list.flatten!
24
24
  end
25
25
 
@@ -30,10 +30,6 @@ module Gh
30
30
  def to_h
31
31
  repos_list.map(&:to_h)
32
32
  end
33
-
34
- private
35
-
36
- attr_reader :parser
37
33
  end
38
34
  end
39
35
  end
@@ -7,17 +7,17 @@ module Gh
7
7
  # Period stars correspond to the stars that the repository has in the
8
8
  # current period being considered, for example: 283 stars THIS WEEK.
9
9
  def initialize(
10
- name: nil,
11
- description: nil,
12
- language: nil,
13
- period_stars: nil,
14
- url: nil
10
+ name: '',
11
+ description: '',
12
+ language: '',
13
+ period_stars: 0,
14
+ url: ''
15
15
  )
16
- @name = name || ''
17
- @description = description || ''
18
- @language = language || ''
19
- @period_stars = period_stars || 0
20
- @url = url || ''
16
+ @name = name
17
+ @description = description
18
+ @language = language
19
+ @period_stars = period_stars
20
+ @url = url
21
21
  end
22
22
 
23
23
  def to_h
@@ -1,5 +1,5 @@
1
1
  module Gh
2
2
  module Trending
3
- VERSION = '1.0.1'.freeze
3
+ VERSION = '1.0.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gh-trending
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
  - luispcosta
@@ -121,7 +121,6 @@ files:
121
121
  - CODE_OF_CONDUCT.md
122
122
  - Gemfile
123
123
  - LICENSE
124
- - LICENSE.txt
125
124
  - README.md
126
125
  - Rakefile
127
126
  - bin/console
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 luispcosta
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.