scrape_got 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ae29e5087ce0907585158ec6112f9f3464f2a9d24f5c6340185589f9abe61ff8
4
+ data.tar.gz: c1a38db328b0a67768136d609a0dae772bee3778d012c5de02df7cb477a8dffd
5
+ SHA512:
6
+ metadata.gz: 763104261af7e033088450af38dcfd80b338dc2223754661f754893d73cba87694638759dbdcbd075a6725c1eff6ee7e06b60f078f26fe14e2dd7737a8691489
7
+ data.tar.gz: 4a395193ec0657f83fe6881fa4721a04ad6e6fda309f1f2f433a16f0a166946fe6ccdf442aa37dd10ff6722e12486fb4ae855cb53144d2d9a384ea608dfbdd2a
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in scrape_got.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ scrape_got (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ coderay (1.1.3)
10
+ gem-release (2.1.1)
11
+ method_source (1.0.0)
12
+ pry (0.13.1)
13
+ coderay (~> 1.1)
14
+ method_source (~> 1.0)
15
+ rake (12.3.3)
16
+
17
+ PLATFORMS
18
+ ruby
19
+
20
+ DEPENDENCIES
21
+ gem-release
22
+ pry
23
+ rake (~> 12.0)
24
+ scrape_got!
25
+
26
+ BUNDLED WITH
27
+ 2.1.4
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 ByteSizeMagic
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.
@@ -0,0 +1,40 @@
1
+ # ScrapeGot
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/scrape_got`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'scrape_got'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install scrape_got
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
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/[USERNAME]/scrape_got.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "scrape_got"
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__)
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative "../lib/scrape_got.rb"
4
+
5
+ ScrapeGot::CLI.new.run
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,9 @@
1
+ require "pry"
2
+ require_relative "./scrape_got/version"
3
+ require_relative "./scrape_got/cli"
4
+ require_relative "./scrape_got/api"
5
+
6
+ module ScrapeGot
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
@@ -0,0 +1,3 @@
1
+ class ScrapeGot::API
2
+
3
+ end
@@ -0,0 +1,42 @@
1
+ class ScrapeGot::CLI
2
+ def run
3
+ system("clear")
4
+ greeting
5
+ puts "___________________________\nPlease choose an option: "
6
+ @user_input = nil
7
+ menu
8
+ while @user_input != "exit"
9
+ @user_input = gets.strip.downcase
10
+ if @user_input == "1"
11
+ print_articles
12
+ elsif @user_input == "2"
13
+ "puts more here"
14
+ elsif @user_input == "exit"
15
+ break
16
+ else
17
+ puts "Please enter a menu item number or 'exit' to exit the program"
18
+ end
19
+ end
20
+ binding.pry
21
+ end_program
22
+ end
23
+
24
+ def greeting
25
+ puts " ... Welcome to ... \nI scrape and I know things!\n "
26
+
27
+ end
28
+
29
+ def menu
30
+ puts <<-MENU
31
+ 1. List Articles
32
+ 2. To see next page of articles.
33
+ Enter 'exit' to exit program.
34
+ MENU
35
+ end
36
+
37
+ def end_program
38
+ puts "Thanks for checking out I scrape and I know things, see ya soon!"
39
+ end
40
+
41
+
42
+ end
@@ -0,0 +1,3 @@
1
+ module ScrapeGot
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,32 @@
1
+ require_relative 'lib/scrape_got/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "scrape_got"
5
+ spec.version = ScrapeGot::VERSION
6
+ spec.authors = ["ByteSizeMagic"]
7
+ spec.email = ["bytesizemagic@gmail.com"]
8
+
9
+ spec.summary = %q{Game of Thrones scraping CLI gem}
10
+ spec.description = %q{I scrape and I know things. Provides a CLI to run and find info about Game of Thrones.}
11
+ spec.homepage = "https://github.com/ByteSizeMagic/scrape_got"
12
+ spec.license = "MIT"
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
+
15
+ spec.metadata["allowed_push_host"] = "https://rubygems.org/"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/ByteSizeMagic/scrape_got.git"
19
+ #spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ end
26
+ spec.bindir = "bin"
27
+ spec.executables = ["scrape_got"]
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_development_dependency "pry"
31
+ spec.add_development_dependency "gem-release"
32
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: scrape_got
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ByteSizeMagic
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: gem-release
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: I scrape and I know things. Provides a CLI to run and find info about
42
+ Game of Thrones.
43
+ email:
44
+ - bytesizemagic@gmail.com
45
+ executables:
46
+ - scrape_got
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - ".gitignore"
51
+ - Gemfile
52
+ - Gemfile.lock
53
+ - LICENSE.txt
54
+ - README.md
55
+ - Rakefile
56
+ - bin/console
57
+ - bin/scrape_got
58
+ - bin/setup
59
+ - lib/scrape_got.rb
60
+ - lib/scrape_got/api.rb
61
+ - lib/scrape_got/cli.rb
62
+ - lib/scrape_got/version.rb
63
+ - scrape_got.gemspec
64
+ homepage: https://github.com/ByteSizeMagic/scrape_got
65
+ licenses:
66
+ - MIT
67
+ metadata:
68
+ allowed_push_host: https://rubygems.org/
69
+ homepage_uri: https://github.com/ByteSizeMagic/scrape_got
70
+ source_code_uri: https://github.com/ByteSizeMagic/scrape_got.git
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 2.3.0
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubygems_version: 3.1.2
87
+ signing_key:
88
+ specification_version: 4
89
+ summary: Game of Thrones scraping CLI gem
90
+ test_files: []