scraper_rb 0.0.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: 18fb3bfb0c62f76e8c57f1d91a9c289550268a1a9b5651576bfd8e0cd378f7ef
4
+ data.tar.gz: 9e4ee940c85e8b3f88463ab0d4c3c41cf5ecfe5f678711690a33a9ece00a9064
5
+ SHA512:
6
+ metadata.gz: c2d6ecdc3cd7f6396a29acd40489912048748408484793f441d7928af4816fa0064310981913d45d04e842f7781767c078f5bfb317869a26df88bce1a4a32327
7
+ data.tar.gz: 614e998ecce102cc2bbd1c22d3e7a15f3de1ff98d1676844df1c4681dad9d9662419bed7ea111a473776ae6d9b6e5c833879e99eec8fff2d6884874369a4b878
@@ -0,0 +1,15 @@
1
+ [bumpversion]
2
+ current_version = 0.0.0
3
+ commit = True
4
+
5
+ [bumpversion:file:README.md]
6
+ search = scraper_rb --version "{current_version}"
7
+ replace = scraper_rb --version "{new_version}"
8
+
9
+ [bumpversion:file:lib/scraper_rb/version.rb]
10
+ search = VERSION = "{current_version}"
11
+ replace = VERSION = "{new_version}"
12
+
13
+ [bumpversion:file:Gemfile.lock]
14
+ search = scraper_rb ({current_version})
15
+ replace = scraper_rb ({new_version})
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -0,0 +1 @@
1
+ 2.7.0
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.7.0
6
+ before_install: gem install bundler -v 2.1.4
@@ -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 hello@promptapi.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 [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in scraper_rb.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
7
+ gem "minitest", "~> 5.0"
@@ -0,0 +1,25 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ scraper_rb (0.0.0)
5
+ faraday (~> 1.0, >= 1.0.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ faraday (1.0.1)
11
+ multipart-post (>= 1.2, < 3)
12
+ minitest (5.14.2)
13
+ multipart-post (2.1.1)
14
+ rake (12.3.3)
15
+
16
+ PLATFORMS
17
+ ruby
18
+
19
+ DEPENDENCIES
20
+ minitest (~> 5.0)
21
+ rake (~> 12.0)
22
+ scraper_rb!
23
+
24
+ BUNDLED WITH
25
+ 2.1.4
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Uğur Özyılmazel
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,92 @@
1
+ ![Ruby](https://img.shields.io/badge/ruby-2.7.0-green.svg)
2
+ [![Gem Version](https://badge.fury.io/rb/scraper_rb.svg)](https://badge.fury.io/rb/scraper_rb)
3
+ [![Build Status](https://travis-ci.org/promptapi/scraper_rb.svg?branch=main)](https://travis-ci.org/promptapi/scraper_rb)
4
+
5
+ # Prompt API - Scraper API - Ruby Package
6
+
7
+ `scraper_rb` is a simple python wrapper for [scraper-api][scraper-api].
8
+
9
+ ## Requirements
10
+
11
+ 1. You need to signup for [Prompt API][promptapi-signup]
12
+ 1. You need to subscribe [bincheck-api][bincheck-api], test drive is **free!!!**
13
+ 1. You need to set `PROMPTAPI_TOKEN` environment variable after subscription.
14
+
15
+ then;
16
+
17
+ ```bash
18
+ $ gem install scraper_rb
19
+ ```
20
+
21
+ or; install from GitHub:
22
+
23
+ ```bash
24
+ $ gem install scraper_rb --version "0.0.0" --source "https://rubygems.pkg.github.com/promptapi"
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Example Usage
30
+
31
+ @wip
32
+
33
+ ---
34
+
35
+ ## Development
36
+
37
+ After checking out the repo, run `bin/setup` to install dependencies. Then,
38
+ run `rake test` to run the tests. You can also run `bin/console` for an
39
+ interactive prompt that will allow you to experiment.
40
+
41
+ To install this gem onto your local machine, run `bundle exec rake install`.
42
+ To release a new version, update the version number in `version.rb`, and then
43
+ run `bundle exec rake release`, which will create a git tag for the version,
44
+ push git commits and tags, and push the `.gem` file to
45
+ [rubygems.org][rubygems]
46
+
47
+ ```bash
48
+ $ rake -T
49
+
50
+ rake build # Build bin_checker_rb-X.X.X.gem into the pkg directory
51
+ rake clean # Remove any temporary products
52
+ rake clobber # Remove any generated files
53
+ rake install # Build and install bin_checker_rb-X.X.X.gem into system gems
54
+ rake install:local # Build and install bin_checker_rb-X.X.X.gem into system gems without network access
55
+ rake release[remote] # Create tag v0.0.0 and build and push bin_checker_rb-X.X.X.gem to rubygems.org
56
+ rake test # Run tests
57
+ ```
58
+
59
+ ---
60
+
61
+ ## License
62
+
63
+ This project is licensed under MIT
64
+
65
+ ---
66
+
67
+ ## Contributer(s)
68
+
69
+ * [Prompt API](https://github.com/promptapi) - Creator, maintainer
70
+
71
+ ---
72
+
73
+ ## Contribute
74
+
75
+ Bug reports and pull requests are welcome on GitHub:
76
+
77
+ 1. `fork` (https://github.com/promptapi/scraper_rb/fork)
78
+ 1. Create your `branch` (`git checkout -b my-feature`)
79
+ 1. `commit` yours (`git commit -am 'Add awesome features...'`)
80
+ 1. `push` your `branch` (`git push origin my-feature`)
81
+ 1. Than create a new **Pull Request**!
82
+
83
+ This project is intended to be a safe,
84
+ welcoming space for collaboration, and contributors are expected to adhere to
85
+ the [code of conduct][coc].
86
+
87
+ ---
88
+
89
+ [promptapi-signup]: https://promptapi.com/#signup-form
90
+ [scraper-api]: https://promptapi.com/marketplace/description/scraper-api
91
+ [rubygems]: https://rubygems.org
92
+ [coc]: https://github.com/promptapi/scraper_rb/blob/main/CODE_OF_CONDUCT.md
@@ -0,0 +1,31 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
11
+
12
+ AVAILABLE_REVISIONS = ["major", "minor", "patch"]
13
+ desc "Bump version"
14
+ task :bump, [:revision] do |t, args|
15
+ args.with_defaults(revision: "patch")
16
+ abort "Please provide valid revision: #{AVAILABLE_REVISIONS.join(',')}" unless AVAILABLE_REVISIONS.include?(args.revision)
17
+ system "bumpversion #{args.revision}"
18
+ end
19
+
20
+ def get_package_name
21
+ name = Dir['*.gemspec'].first.split('.').first
22
+ line = File.read("lib/#{name}/version.rb")[/^\s*VERSION\s*=\s*.*/]
23
+ version = line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
24
+ "#{name}-#{version}.gem"
25
+ end
26
+
27
+ desc "Push #{get_package_name} to GitHub registry"
28
+ task :push_to_github do
29
+ package_path = "pkg/#{get_package_name}"
30
+ system "gem push --key github --host https://rubygems.pkg.github.com/promptapi #{package_path}"
31
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "scraper_rb"
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,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,6 @@
1
+ require "scraper_rb/version"
2
+
3
+ module ScraperRb
4
+ class Error < StandardError; end
5
+ # Your code goes here...
6
+ end
@@ -0,0 +1,3 @@
1
+ module ScraperRb
2
+ VERSION = "0.0.0"
3
+ end
@@ -0,0 +1,22 @@
1
+ require_relative 'lib/scraper_rb/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "scraper_rb"
5
+ spec.version = ScraperRb::VERSION
6
+ spec.authors = ["Prompt API"]
7
+ spec.email = ["Prompt API"]
8
+
9
+ spec.summary = %q{Ruby wrapper for Prompt API's Scraper Checker API}
10
+ spec.homepage = "https://github.com/promptapi/scraper_rb"
11
+ spec.license = "MIT"
12
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
+
14
+ spec.metadata["homepage_uri"] = spec.homepage
15
+ spec.metadata["source_code_uri"] = "https://github.com/promptapi/scraper_rb"
16
+
17
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
18
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ end
20
+ spec.require_paths = ["lib"]
21
+ spec.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1'
22
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: scraper_rb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Prompt API
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-09-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.1
33
+ description:
34
+ email:
35
+ - Prompt API
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - ".bumpversion.cfg"
41
+ - ".gitignore"
42
+ - ".ruby-version"
43
+ - ".travis.yml"
44
+ - CODE_OF_CONDUCT.md
45
+ - Gemfile
46
+ - Gemfile.lock
47
+ - LICENSE.txt
48
+ - README.md
49
+ - Rakefile
50
+ - bin/console
51
+ - bin/setup
52
+ - lib/scraper_rb.rb
53
+ - lib/scraper_rb/version.rb
54
+ - scraper_rb.gemspec
55
+ homepage: https://github.com/promptapi/scraper_rb
56
+ licenses:
57
+ - MIT
58
+ metadata:
59
+ homepage_uri: https://github.com/promptapi/scraper_rb
60
+ source_code_uri: https://github.com/promptapi/scraper_rb
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 2.3.0
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubygems_version: 3.1.2
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: Ruby wrapper for Prompt API's Scraper Checker API
80
+ test_files: []