swole-news 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 +8 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +47 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/bin/swole-news +4 -0
- data/lib/swole-news.rb +10 -0
- data/lib/swole-news/CLI.rb +124 -0
- data/lib/swole-news/article.rb +28 -0
- data/lib/swole-news/scraper.rb +36 -0
- data/lib/swole-news/version.rb +3 -0
- data/lib/swole-news/workout.rb +19 -0
- data/spec.md +14 -0
- data/swole-news.gemspec +30 -0
- metadata +146 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 664c1d6976da01027ac6e56b945e29db1aad1705a3da2cc362aeaabe1b3da133
|
4
|
+
data.tar.gz: 55c4705bfa18370ebc317271bad7a2c79cbb94ffb6a9058e3bb08d9a4653e602
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ef1818bea05accf9cf9e80f0158bc83decdee66e176e903c8fb9d6a6aa921d1d966f2c0945472de9004f0092f12aee9b29d7a68e880c826d26cc08c2cfa3436e
|
7
|
+
data.tar.gz: 55835180e32227e4772002683c35af080c84047335ccf41c30d441c24027f7c744cead41ac04ee51629989619fac7c3406184737187174057bba4040fb38d984
|
data/.gitignore
ADDED
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 'kriti.rai@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,47 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
swole-news (0.1.0)
|
5
|
+
colorize
|
6
|
+
nokogiri
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
coderay (1.1.2)
|
12
|
+
colorize (0.8.1)
|
13
|
+
diff-lcs (1.3)
|
14
|
+
method_source (0.9.0)
|
15
|
+
mini_portile2 (2.3.0)
|
16
|
+
nokogiri (1.8.2)
|
17
|
+
mini_portile2 (~> 2.3.0)
|
18
|
+
pry (0.11.3)
|
19
|
+
coderay (~> 1.1.0)
|
20
|
+
method_source (~> 0.9.0)
|
21
|
+
rake (10.5.0)
|
22
|
+
rspec (3.7.0)
|
23
|
+
rspec-core (~> 3.7.0)
|
24
|
+
rspec-expectations (~> 3.7.0)
|
25
|
+
rspec-mocks (~> 3.7.0)
|
26
|
+
rspec-core (3.7.1)
|
27
|
+
rspec-support (~> 3.7.0)
|
28
|
+
rspec-expectations (3.7.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.7.0)
|
31
|
+
rspec-mocks (3.7.0)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.7.0)
|
34
|
+
rspec-support (3.7.1)
|
35
|
+
|
36
|
+
PLATFORMS
|
37
|
+
ruby
|
38
|
+
|
39
|
+
DEPENDENCIES
|
40
|
+
bundler (~> 1.16)
|
41
|
+
pry
|
42
|
+
rake (~> 10.0)
|
43
|
+
rspec
|
44
|
+
swole-news!
|
45
|
+
|
46
|
+
BUNDLED WITH
|
47
|
+
1.16.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 'Kriti Rai'
|
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,43 @@
|
|
1
|
+
# SwoleNews
|
2
|
+
The swole-news CLI gem scrapes the latest workout articles from www.bodybuilding.com and provides end-users with the list of articles from which they can access specific workouts.
|
3
|
+
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'swole-news'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install swole-news
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
In the terminal type:
|
24
|
+
|
25
|
+
$ swole-news
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/'kriti-rai'/swole-news. 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.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the SwoleNews project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/'kriti-rai'/swole-news/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
# require "swole-news"
|
5
|
+
require "swole-news.rb"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/bin/swole-news
ADDED
data/lib/swole-news.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'open-uri'
|
3
|
+
require 'colorize'
|
4
|
+
|
5
|
+
|
6
|
+
require_relative "./swole-news/version"
|
7
|
+
require_relative "./swole-news/CLI"
|
8
|
+
require_relative "./swole-news/article"
|
9
|
+
require_relative "./swole-news/scraper"
|
10
|
+
require_relative "./swole-news/workout"
|
@@ -0,0 +1,124 @@
|
|
1
|
+
class CLI
|
2
|
+
|
3
|
+
def call
|
4
|
+
puts" || ||".colorize(:red)
|
5
|
+
puts" |||||| ||||||".colorize(:red)
|
6
|
+
puts"=========||||||||=======".colorize(:red)+"SWOLENEWS".colorize(:color => :black, :background => :light_blue).underline+"=======||||||||=========".colorize(:red)
|
7
|
+
puts" |||||| ||||||".colorize(:red)
|
8
|
+
puts" || ||".colorize(:red)
|
9
|
+
puts ""
|
10
|
+
puts "Tired of your old workout routine? Need some guidance or something new? Look no further!".colorize(:green)
|
11
|
+
sleep(1.5)
|
12
|
+
puts "SwoleNews has got your back!".colorize(:green)
|
13
|
+
sleep(1.5)
|
14
|
+
puts ""
|
15
|
+
puts "Here is what's latest in workout.".colorize(:color => :blue).underline
|
16
|
+
puts ""
|
17
|
+
make_articles
|
18
|
+
list_articles
|
19
|
+
sleep(1)
|
20
|
+
action
|
21
|
+
sleep(1)
|
22
|
+
goodbye
|
23
|
+
end
|
24
|
+
|
25
|
+
def make_articles
|
26
|
+
scraped_articles = Scraper.scrape_page
|
27
|
+
Article.create_from_collection(scraped_articles)
|
28
|
+
@articles = Article.all
|
29
|
+
@articles
|
30
|
+
end
|
31
|
+
|
32
|
+
def list_articles
|
33
|
+
@articles.each.with_index(1) do |article, i|
|
34
|
+
puts "#{i}.".colorize(:blue)+ " #{article.title}".colorize(:red) + " * #{article.read_time} *"
|
35
|
+
puts "--------------------------------------------------------------------------------------------------------".colorize(:green)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def view_articles(input)
|
40
|
+
puts ""
|
41
|
+
sleep(1)
|
42
|
+
puts "Viewing article no.#{input}".colorize(:blue)
|
43
|
+
puts ""
|
44
|
+
puts "== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =="
|
45
|
+
sleep(1.5)
|
46
|
+
puts "#{@article.title}".colorize(:red) + " * #{@article.read_time} *"
|
47
|
+
puts "#{@article.description}...".colorize(:yellow)
|
48
|
+
puts "To read more go to:".colorize(:green) + " #{@article.url}".colorize(:blue)
|
49
|
+
puts "== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =="
|
50
|
+
puts ""
|
51
|
+
sleep(1)
|
52
|
+
end
|
53
|
+
|
54
|
+
def list_workouts
|
55
|
+
sleep(1)
|
56
|
+
puts "Now listing the workouts...".colorize(:blue)
|
57
|
+
puts "---------------------------".colorize (:yellow)
|
58
|
+
sleep(1.5)
|
59
|
+
@article.workouts.each.with_index(1) do |workout, i|
|
60
|
+
puts "#{i}. #{workout.title}".upcase.colorize(:blue)
|
61
|
+
puts "**#{workout.definition}**".colorize(:yellow)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def view_workouts
|
66
|
+
input = nil
|
67
|
+
while input != "exit"
|
68
|
+
puts "Would you like to view the workouts listed inside the article?".colorize(:green)
|
69
|
+
puts "If yes, please type 'yes' or 'menu' to go back to the main menu or 'exit' to exit.".colorize(:green)
|
70
|
+
input = gets.strip.downcase
|
71
|
+
if input == "yes"
|
72
|
+
list_workouts
|
73
|
+
repeat
|
74
|
+
break
|
75
|
+
elsif input == "menu"
|
76
|
+
list_articles
|
77
|
+
action
|
78
|
+
break
|
79
|
+
elsif input == "exit"
|
80
|
+
break
|
81
|
+
else
|
82
|
+
puts "Not sure what you typed.".colorize(:red)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def repeat
|
88
|
+
input = nil
|
89
|
+
while input != "exit"
|
90
|
+
puts "Please type 'menu' to go back to the main menu or 'exit' to exit".colorize(:green)
|
91
|
+
input = gets.strip.downcase
|
92
|
+
if input == "menu"
|
93
|
+
list_articles
|
94
|
+
action
|
95
|
+
break
|
96
|
+
elsif input == "exit"
|
97
|
+
break
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def action
|
103
|
+
input = nil
|
104
|
+
while input != "exit"
|
105
|
+
puts "Please enter a number from the list to view the article or enter 'exit' to exit".colorize(:green)
|
106
|
+
input = gets.strip.downcase
|
107
|
+
if input =~ /^-?[0-9]+$/ && input.to_i.between?(1, @articles.size)
|
108
|
+
@article = @articles[input.to_i - 1]
|
109
|
+
view_articles(input)
|
110
|
+
view_workouts
|
111
|
+
break
|
112
|
+
elsif input == "exit"
|
113
|
+
break
|
114
|
+
else
|
115
|
+
puts "Either the number you entered is out of range or is not recognized by the system.".colorize(:red)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def goodbye
|
121
|
+
puts "Keep up the good work and stay swole! See you soon!".colorize(:yellow)
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class Article
|
2
|
+
attr_accessor :title, :url, :workouts, :read_time, :description
|
3
|
+
|
4
|
+
@@all = []
|
5
|
+
|
6
|
+
def initialize(article_hash)
|
7
|
+
article_hash.each {|k,v| self.send("#{k}=", v)}
|
8
|
+
@@all << self
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.create_from_collection(article_array)
|
12
|
+
article_array.map{|article_hash|self.new(article_hash)}
|
13
|
+
self.add_workouts
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.add_workouts
|
17
|
+
@@all.map do |article|
|
18
|
+
scraped_workouts = Scraper.scrape_workouts(article.url)
|
19
|
+
article.workouts = Workout.create_from_collection(scraped_workouts)
|
20
|
+
article.workouts.each {|workout| workout.article = article}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.all
|
25
|
+
@@all
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class Scraper
|
2
|
+
|
3
|
+
def self.scrape_page
|
4
|
+
article_array = []
|
5
|
+
|
6
|
+
doc = Nokogiri::HTML(open('https://www.bodybuilding.com/category/workouts'))
|
7
|
+
|
8
|
+
doc.css(".cms-article-list--article.col.col-1").map do |article|
|
9
|
+
article_hash = {
|
10
|
+
:title => article.search("h3.title").text,
|
11
|
+
:url => article.search("a").attribute('href').to_s,
|
12
|
+
:read_time => article.search(".bb-read-time__time").text,
|
13
|
+
:description => article.search("span.description").text
|
14
|
+
}
|
15
|
+
article_array << article_hash
|
16
|
+
end
|
17
|
+
article_array
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.scrape_workouts(article_url)
|
21
|
+
workout_array = []
|
22
|
+
|
23
|
+
article = Nokogiri::HTML(open(article_url))
|
24
|
+
wrapper = article.search(".cms-article-list__content--wrapper")
|
25
|
+
|
26
|
+
wrapper.search(".cms-article-list__content--container .cms-article-list__content").each do |container|
|
27
|
+
workout_hash = {
|
28
|
+
:title => container.search(".cms-article-workout__exercise--title").text,
|
29
|
+
:definition => container.search(".cms-article-workout__sets--definition span").text.strip
|
30
|
+
}
|
31
|
+
workout_array << workout_hash
|
32
|
+
end
|
33
|
+
workout_array
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class Workout
|
2
|
+
attr_accessor :title, :definition, :article
|
3
|
+
|
4
|
+
@@all =[]
|
5
|
+
|
6
|
+
def initialize(workout_hash)
|
7
|
+
workout_hash.each {|k,v| self.send("#{k}=",v)}
|
8
|
+
@@all << self
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.create_from_collection(workout_array)
|
12
|
+
workout_array.map {|workout_hash| self.new(workout_hash)}
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.all
|
16
|
+
@@all
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
data/spec.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
Specifications for the CLI Assessment
|
2
|
+
Specs:
|
3
|
+
|
4
|
+
[X] Have a CLI for interfacing with the application
|
5
|
+
|
6
|
+
My CLI interface resides in the CLI.rb file that outlines how the user will be prompted for an input in various scenarios. It calls in various helper methods to create articles, view and list the articles and the workouts, and an exit option to quit the program.
|
7
|
+
|
8
|
+
[X]Pull data from an external source
|
9
|
+
|
10
|
+
My Scraper class extracts a list of articles and workouts inside from http://bodybuilding.com/category/workouts using various css selectors and returns arrays of those elements that are hashes.
|
11
|
+
|
12
|
+
[X]Implement both list and detail views
|
13
|
+
|
14
|
+
The users are provided with a list of articles that consists of the title of an article and read-time. After choosing an article, the viewer will get to see the same info alongside a brief description of the article and a URL. The viewer will then get an option to view the workouts listed inside the article, which then consists of a number of workouts.
|
data/swole-news.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "swole-news/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "swole-news"
|
8
|
+
spec.version = SwoleNews::VERSION
|
9
|
+
spec.authors = ["'Kriti Rai'"]
|
10
|
+
spec.email = ["'kriti.rai@gmail.com'"]
|
11
|
+
|
12
|
+
spec.summary = "Pulls up the latest articles in workouts"
|
13
|
+
spec.homepage = "https://github.com/kriti-rai/swole-news"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.bindir = "exe"
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "rspec"
|
26
|
+
spec.add_development_dependency "pry"
|
27
|
+
|
28
|
+
spec.add_dependency "nokogiri"
|
29
|
+
spec.add_dependency "colorize"
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: swole-news
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- "'Kriti Rai'"
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-04-15 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: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
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: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
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
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: nokogiri
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: colorize
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description:
|
98
|
+
email:
|
99
|
+
- "'kriti.rai@gmail.com'"
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- CODE_OF_CONDUCT.md
|
106
|
+
- Gemfile
|
107
|
+
- Gemfile.lock
|
108
|
+
- LICENSE.txt
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- bin/console
|
112
|
+
- bin/setup
|
113
|
+
- bin/swole-news
|
114
|
+
- lib/swole-news.rb
|
115
|
+
- lib/swole-news/CLI.rb
|
116
|
+
- lib/swole-news/article.rb
|
117
|
+
- lib/swole-news/scraper.rb
|
118
|
+
- lib/swole-news/version.rb
|
119
|
+
- lib/swole-news/workout.rb
|
120
|
+
- spec.md
|
121
|
+
- swole-news.gemspec
|
122
|
+
homepage: https://github.com/kriti-rai/swole-news
|
123
|
+
licenses:
|
124
|
+
- MIT
|
125
|
+
metadata: {}
|
126
|
+
post_install_message:
|
127
|
+
rdoc_options: []
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
requirements: []
|
141
|
+
rubyforge_project:
|
142
|
+
rubygems_version: 2.7.6
|
143
|
+
signing_key:
|
144
|
+
specification_version: 4
|
145
|
+
summary: Pulls up the latest articles in workouts
|
146
|
+
test_files: []
|