metonym 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CHANGE_LOG.md +0 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +37 -0
- data/LICENSE.txt +21 -0
- data/README.md +79 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/metonym/lib/gnews.rb +48 -0
- data/lib/metonym/lib/validate.rb +61 -0
- data/lib/metonym/version.rb +3 -0
- data/lib/metonym.rb +15 -0
- data/metonym.gemspec +41 -0
- metadata +121 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '089f42b8eb9bbf9ef3d2e7fdc1cff03acdd8d2e8fad4d4413ab08f407ad568b3'
|
4
|
+
data.tar.gz: ad1d43a4d2e1f81ab1495aca8c587807d76c406c6a336c9ee1b7cbda4f019e9c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9208560a7675b7ff77b931775f6db7abe98b009d5e3a358053b8024e8818146283260ad135386b5435fe84d3c6296da4c0307ead7e5bf7f2e1ceee5696c5b513
|
7
|
+
data.tar.gz: 9609696131912296dde9e41d02db5bb3e4097417c1337b819d590d56345618ee0a6d00a6e10c1a61b0a423eec601c3dcef11e7106a67fa4d0d8771fce17963fc
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CHANGE_LOG.md
ADDED
File without changes
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at carrasco.vic@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
metonym (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
byebug (11.0.1)
|
10
|
+
diff-lcs (1.3)
|
11
|
+
rake (10.5.0)
|
12
|
+
rspec (3.8.0)
|
13
|
+
rspec-core (~> 3.8.0)
|
14
|
+
rspec-expectations (~> 3.8.0)
|
15
|
+
rspec-mocks (~> 3.8.0)
|
16
|
+
rspec-core (3.8.0)
|
17
|
+
rspec-support (~> 3.8.0)
|
18
|
+
rspec-expectations (3.8.3)
|
19
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
+
rspec-support (~> 3.8.0)
|
21
|
+
rspec-mocks (3.8.0)
|
22
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
+
rspec-support (~> 3.8.0)
|
24
|
+
rspec-support (3.8.0)
|
25
|
+
|
26
|
+
PLATFORMS
|
27
|
+
ruby
|
28
|
+
|
29
|
+
DEPENDENCIES
|
30
|
+
bundler (~> 2.0)
|
31
|
+
byebug
|
32
|
+
metonym!
|
33
|
+
rake (~> 10.0)
|
34
|
+
rspec (~> 3.0)
|
35
|
+
|
36
|
+
BUNDLED WITH
|
37
|
+
2.0.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Vic Carrasco
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# Metonym
|
2
|
+
|
3
|
+
A ruby gem for [GNews API](https://gnews.io)
|
4
|
+
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'metonym'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install metonym
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
To be able to send requests to the GNews API, you first must create an account to receive a token [here](https://gnews.io/register.php).
|
25
|
+
|
26
|
+
## Query
|
27
|
+
```ruby
|
28
|
+
# Establish parameters for query
|
29
|
+
args = { "q" => "Dragon Ball Super", "country" => "MX", "mindate" => (DateTime.now - 2), 'max' => 1 }
|
30
|
+
|
31
|
+
# Send Request
|
32
|
+
gnews = Gnews::Query.new('my-secret-key')
|
33
|
+
response = gnews.search(args)
|
34
|
+
|
35
|
+
puts response
|
36
|
+
|
37
|
+
# =>
|
38
|
+
```
|
39
|
+
|
40
|
+
```json
|
41
|
+
{
|
42
|
+
"timestamp":1558081205,
|
43
|
+
"count_results":1,
|
44
|
+
"articles":[
|
45
|
+
{
|
46
|
+
"title":"'Dragon Ball Super' Chapter 48 Release Date, Predictions: Moro Not the Real Villain, Truth Revealed?",
|
47
|
+
"desc":"It has been quite a long wait, but it wou ld appear that Dragon Ball Super Chapter 48 will be coming out soon. Along with it is rumored to be a huge bombshell ...",
|
48
|
+
"link":"https://www.econotimes.com/Dragon-Ball-Super-Chapter-48-Release-Date-Predictions-Moro-Not-the-Real-Villain-Truth-Revealed-1538175",
|
49
|
+
"website":"https://www.econotimes.com",
|
50
|
+
"source":"EconoTimes",
|
51
|
+
"date":"Fri, 17 May 2019 05:43:46 GMT",
|
52
|
+
"image":"https://lh4.googleusercontent.com/proxy/CDTeHID-9i5aNWFXTOImYAOOBAFyv8R_QewR4cwP38bycKmVpNS8W-dawVxxumt8FhuzPjXhql8c1y36tkmTaEBW5bCUhryqWH-RBtLnScf_-X8QNL-899A9Sxh2BRpN4Pkp=-c"
|
53
|
+
}
|
54
|
+
]
|
55
|
+
}
|
56
|
+
```
|
57
|
+
|
58
|
+
## Search Parameters
|
59
|
+
| Parameter | Info | Description
|
60
|
+
|--- |--- |---
|
61
|
+
| q | Required | Your search
|
62
|
+
| max | Optional (default value : 10) | The number of items you want (max possible : 100)
|
63
|
+
| lang | Optional (default value : english) | The article language ([list of all languages](https://gnews.io/documentation.php#NationList))
|
64
|
+
| country | Optional (default value : United-States) | The article origin ([list of all countries](https://gnews.io/documentation.php#NationList))
|
65
|
+
| mindate | Optional (Date/DateTime) | Get articles that are more recent than the min date
|
66
|
+
| maxdate | Optional (Date/DateTime) | Get articles that are less recent than the max date
|
67
|
+
| in | Optional | Get articles that contains q in the specified article section
|
68
|
+
|
69
|
+
## Contributing
|
70
|
+
|
71
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/viccarrasco/metonym. 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.
|
72
|
+
|
73
|
+
## License
|
74
|
+
|
75
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
76
|
+
|
77
|
+
## Code of Conduct
|
78
|
+
|
79
|
+
Everyone interacting in the Metonym project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/viccarrasco/metonym/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "metonym"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
module Gnews
|
2
|
+
class Query
|
3
|
+
attr_accessor :gnews_api_key
|
4
|
+
attr_accessor :gnews_version
|
5
|
+
attr_accessor :uri
|
6
|
+
|
7
|
+
def initialize(key, version = nil)
|
8
|
+
@gnews_api_key = key
|
9
|
+
@gnews_version = version.nil? ? 'v2' : version
|
10
|
+
@uri = URI('https://gnews.io/api/v2/')
|
11
|
+
end
|
12
|
+
|
13
|
+
def search(args, format = 'json')
|
14
|
+
begin
|
15
|
+
v = Gnews::Validate.new
|
16
|
+
raise "API Key is required" if v.is_key_present?(@gnews_api_key) == false
|
17
|
+
raise "Invalid parameter sequence" if v.is_query_valid?(args) == false
|
18
|
+
raise "Invalid country sent" if v.is_country_valid?(args) == false
|
19
|
+
raise "Invalid language sent" if v.is_language_valid?(args) == false
|
20
|
+
raise "Invalid date or dates sent" if v.is_date_valid?(args) == false
|
21
|
+
|
22
|
+
args = prepare_arguments(args)
|
23
|
+
@uri.query = URI.encode_www_form(args)
|
24
|
+
response = Net::HTTP.get_response(@uri)
|
25
|
+
rescue Exception => e
|
26
|
+
response = {"errors" => e.to_s}
|
27
|
+
ensure
|
28
|
+
if response.is_a?(Hash) && response.has_key?('errors')
|
29
|
+
return response
|
30
|
+
else
|
31
|
+
if format.nil? || format == 'json'
|
32
|
+
return response.body
|
33
|
+
elsif format == 'hash'
|
34
|
+
return JSON.parse(response.body)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
def prepare_arguments(args)
|
42
|
+
args['mindate'] = args.has_key?('mindate') ? args['mindate'].strftime("%y-%m-%d") : nil
|
43
|
+
args['maxdate'] = args.has_key?('maxdate') ? args['maxdate'].strftime("%y-%m-%d") : nil
|
44
|
+
args["token"] = @gnews_api_key
|
45
|
+
args
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Gnews
|
2
|
+
class Validate
|
3
|
+
def is_key_present?(args)
|
4
|
+
return !args.nil?
|
5
|
+
end
|
6
|
+
|
7
|
+
def is_query_valid?(args)
|
8
|
+
template = %w(q max lang country mindate maxdate in)
|
9
|
+
return (args.keys - template).empty?
|
10
|
+
end
|
11
|
+
|
12
|
+
def is_language_valid?(args)
|
13
|
+
if args['lang'].nil?
|
14
|
+
true
|
15
|
+
else
|
16
|
+
return [
|
17
|
+
'af','ak','sq','am','ar','hy','az','eu','be','bem','bn','bs','bh','br','bg','km','ca','chr','ny','zh-CN',
|
18
|
+
'zh-TW','co','hr','cs','da','nl','en','eo','et','ee','fo','tl','fi','fr','fy','gl','ka','de','el','gn','gu',
|
19
|
+
'ht','ha','haw','iw','hi','hu','is','ig','id','ia','ga','it','ja','jw','kn','kk','rw','rn','kg','ko','kri',
|
20
|
+
'ku','ckb','ky','lo','la','lv','ln','lt','loz','lg','ach','mk','mg','ms','ml','mt','mi','mr','mfe','mo','mn',
|
21
|
+
'sr-ME','ne','nso','no','nn','oc','or','om','ps','fa','pl','pt-BR','pt-PT','pa','qu','ro','rm','nyn','ru','gd',
|
22
|
+
'sr','sh','st','tn','crs','sn','sd','si','sk','sl','so','es','sp-419','su','sw','sv','tg','ta','tt','te','th','ti',
|
23
|
+
'to','lua','tum','tr','tk','tw','ug','uk','ur','uz','vi','cy','wo','xh','yi','yo','zu'
|
24
|
+
].include?(args['lang'].downcase)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def is_country_valid?(args)
|
29
|
+
if args['country'].nil?
|
30
|
+
true
|
31
|
+
else
|
32
|
+
return [
|
33
|
+
'af','al','dz','as','ad','ao','ai','aq','ag','ar','am','aw','au','at','az','bs','bh','bd','bb','by',
|
34
|
+
'be','bz','bj','bm','bt','bo','ba','bw','bv','br','io','bn','bg','bf','bi','kh','cm','ca','cv','ky',
|
35
|
+
'cf','td','cl','cn','cx','cc','co','km','cg','cd','ck','cr','ci','hr','cu','cy','cz','dk','dj','dm',
|
36
|
+
'do','ec','eg','sv','gq','er','ee','et','fk','fo','fj','fi','fr','gf','pf','tf','ga','gm','ge','de',
|
37
|
+
'gh','gi','gr','gl','gd','gp','gu','gt','gn','gw','gy','ht','hm','va','hn','hk','hu','is','in','id',
|
38
|
+
'ir','iq','ie','il','it','jm','jp','jo','kz','ke','ki','kp','kr','kw','kg','la','lv','lb','ls','lr',
|
39
|
+
'ly','li','lt','lu','mo','mk','mg','mw','my','mv','ml','mt','mh','mq','mr','mu','yt','mx','fm','md',
|
40
|
+
'mc','mn','ms','ma','mz','mm','na','nr','np','nl','an','nc','nz','ni','ne','ng','nu','nf','mp','no',
|
41
|
+
'om','pk','pw','ps','pa','pg','py','pe','ph','pn','pl','pt','pr','qa','re','ro','ru','rw','sh','kn',
|
42
|
+
'lc','pm','vc','ws','sm','st','sa','sn','cs','sc','sl','sg','sk','si','sb','so','za','gs','sp','lk',
|
43
|
+
'sd','sr','sj','sz','se','ch','sy','tw','tj','tz','th','tl','tg','tk','to','tt','tn','tr','tm','tc',
|
44
|
+
'tv','ug','ua','ae','uk','us','um','uy','uz','vu','ve','vn','vg','vi','wf','eh','ye','zm','zw'
|
45
|
+
].include?(args['country'].downcase)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def is_date_valid?(args)
|
50
|
+
if (args['mindate'].nil? && args['maxdate'].nil?)
|
51
|
+
true
|
52
|
+
elsif (args['mindate'] && args['maxdate'])
|
53
|
+
return (args['mindate'].respond_to?(:strftime) && args['maxdate'].respond_to?(:strftime))
|
54
|
+
elsif (args['mindate'] && args['maxdate'].nil?)
|
55
|
+
return args['mindate'].respond_to?(:strftime)
|
56
|
+
elsif (args['mindate'].nil? && args['maxdate'])
|
57
|
+
return args['maxdate'].respond_to?(:strftime)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/lib/metonym.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require "metonym/version"
|
2
|
+
<<<<<<< HEAD
|
3
|
+
=======
|
4
|
+
require 'date'
|
5
|
+
require 'net/http'
|
6
|
+
require 'metonym/lib/gnews.rb'
|
7
|
+
require 'metonym/lib/validate.rb'
|
8
|
+
require 'byebug'
|
9
|
+
require 'json'
|
10
|
+
>>>>>>> develop
|
11
|
+
|
12
|
+
module Metonym
|
13
|
+
class Error < StandardError; end
|
14
|
+
# Your code goes here...
|
15
|
+
end
|
data/metonym.gemspec
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "metonym/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "metonym"
|
8
|
+
spec.version = Metonym::VERSION
|
9
|
+
spec.authors = ["Vic Carrasco"]
|
10
|
+
spec.email = ["vic@viccarrasco.com"]
|
11
|
+
spec.summary = "The unofficial Google News API gem"
|
12
|
+
spec.description = "Query news from Google News' sources"
|
13
|
+
spec.homepage = "https://github.com/viccarrasco/metonym"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
21
|
+
spec.metadata["source_code_uri"] = "https://github.com/viccarrasco/metonym"
|
22
|
+
spec.metadata["changelog_uri"] = "https://github.com/viccarrasco/metonym/blob/master/CHANGE_LOG.md"
|
23
|
+
else
|
24
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
25
|
+
"public gem pushes."
|
26
|
+
end
|
27
|
+
|
28
|
+
# Specify which files should be added to the gem when it is released.
|
29
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
31
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
32
|
+
end
|
33
|
+
spec.bindir = "exe"
|
34
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
|
+
spec.require_paths = ["lib"]
|
36
|
+
|
37
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
38
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
39
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
40
|
+
spec.add_development_dependency "byebug"
|
41
|
+
end
|
metadata
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: metonym
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vic Carrasco
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-05-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Query news from Google News' sources
|
70
|
+
email:
|
71
|
+
- vic@viccarrasco.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rspec"
|
78
|
+
- ".travis.yml"
|
79
|
+
- CHANGE_LOG.md
|
80
|
+
- CODE_OF_CONDUCT.md
|
81
|
+
- Gemfile
|
82
|
+
- Gemfile.lock
|
83
|
+
- LICENSE.txt
|
84
|
+
- README.md
|
85
|
+
- Rakefile
|
86
|
+
- bin/console
|
87
|
+
- bin/setup
|
88
|
+
- lib/metonym.rb
|
89
|
+
- lib/metonym/lib/gnews.rb
|
90
|
+
- lib/metonym/lib/validate.rb
|
91
|
+
- lib/metonym/version.rb
|
92
|
+
- metonym.gemspec
|
93
|
+
homepage: https://github.com/viccarrasco/metonym
|
94
|
+
licenses:
|
95
|
+
- MIT
|
96
|
+
metadata:
|
97
|
+
allowed_push_host: https://rubygems.org
|
98
|
+
homepage_uri: https://github.com/viccarrasco/metonym
|
99
|
+
source_code_uri: https://github.com/viccarrasco/metonym
|
100
|
+
changelog_uri: https://github.com/viccarrasco/metonym/blob/master/CHANGE_LOG.md
|
101
|
+
post_install_message:
|
102
|
+
rdoc_options: []
|
103
|
+
require_paths:
|
104
|
+
- lib
|
105
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
requirements: []
|
116
|
+
rubyforge_project:
|
117
|
+
rubygems_version: 2.7.7
|
118
|
+
signing_key:
|
119
|
+
specification_version: 4
|
120
|
+
summary: The unofficial Google News API gem
|
121
|
+
test_files: []
|