Skip to content

Commit 14816ac

Browse files
committed
initial
0 parents  commit 14816ac

22 files changed

+1050
-0
lines changed

Diff for: .github/workflows/gem-push.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Ruby Gem
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: Build + Publish
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Ruby 2.6
18+
uses: ruby/setup-ruby@v1
19+
20+
- name: Publish to GPR
21+
run: |
22+
mkdir -p $HOME/.gem
23+
touch $HOME/.gem/credentials
24+
chmod 0600 $HOME/.gem/credentials
25+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
26+
gem build *.gemspec
27+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
28+
env:
29+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
30+
OWNER: ${{ github.repository_owner }}
31+
32+
- name: Publish to RubyGems
33+
run: |
34+
mkdir -p $HOME/.gem
35+
touch $HOME/.gem/credentials
36+
chmod 0600 $HOME/.gem/credentials
37+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
38+
gem build *.gemspec
39+
gem push --host https://rubygems.org *.gem
40+
env:
41+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}

Diff for: .gitignore

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
*.gem
2+
*.rbc
3+
/.config
4+
/coverage/
5+
/InstalledFiles
6+
/pkg/
7+
/spec/reports/
8+
/spec/examples.txt
9+
/test/tmp/
10+
/test/version_tmp/
11+
/tmp/
12+
13+
# Used by dotenv library to load environment variables.
14+
# .env
15+
16+
# Ignore Byebug command history file.
17+
.byebug_history
18+
19+
## Specific to RubyMotion:
20+
.dat*
21+
.repl_history
22+
build/
23+
*.bridgesupport
24+
build-iPhoneOS/
25+
build-iPhoneSimulator/
26+
27+
## Specific to RubyMotion (use of CocoaPods):
28+
#
29+
# We recommend against adding the Pods directory to your .gitignore. However
30+
# you should judge for yourself, the pros and cons are mentioned at:
31+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32+
#
33+
# vendor/Pods/
34+
35+
## Documentation cache and generated files:
36+
/.yardoc/
37+
/_yardoc/
38+
/doc/
39+
/rdoc/
40+
41+
## Environment normalization:
42+
/.bundle/
43+
/vendor/bundle
44+
/lib/bundler/man/
45+
46+
# for a library or gem, you might want to ignore these files since the code is
47+
# intended to run in multiple environments; otherwise, check them in:
48+
# Gemfile.lock
49+
# .ruby-version
50+
# .ruby-gemset
51+
52+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53+
.rvmrc
54+
55+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
56+
# .rubocop-https?--*

Diff for: .rspec

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--format documentation
2+
--color
3+
--require spec_helper

Diff for: .rspec_status

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
example_id | status | run_time |
2+
---------------------------------- | ------ | --------------- |
3+
./spec/api_2captcha_spec.rb[1:1] | passed | 0.00937 seconds |
4+
./spec/api_2captcha_spec.rb[1:2:1] | passed | 0.00111 seconds |
5+
./spec/api_2captcha_spec.rb[1:3:1] | passed | 7.1 seconds |

Diff for: .rubocop.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
AllCops:
2+
TargetRubyVersion: 2.6
3+
4+
Style/StringLiterals:
5+
Enabled: true
6+
EnforcedStyle: double_quotes
7+
8+
Style/StringLiteralsInInterpolation:
9+
Enabled: true
10+
EnforcedStyle: double_quotes
11+
12+
Layout/LineLength:
13+
Max: 120

Diff for: .ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0.0

Diff for: Gemfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
# Specify your gem's dependencies in api_2captcha.gemspec
6+
gemspec
7+
8+
gem "rake", "~> 13.0"
9+
10+
gem "rspec", "~> 3.0"
11+
12+
gem "rubocop", "~> 1.21"
13+
gem 'open-uri'
14+

Diff for: Gemfile.lock

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
PATH
2+
remote: .
3+
specs:
4+
ruby-2captcha (0.1.0)
5+
6+
GEM
7+
remote: https://rubygems.org/
8+
specs:
9+
ast (2.4.2)
10+
date (3.3.3)
11+
diff-lcs (1.5.0)
12+
json (2.6.3)
13+
open-uri (0.3.0)
14+
stringio
15+
time
16+
uri
17+
parallel (1.23.0)
18+
parser (3.2.2.1)
19+
ast (~> 2.4.1)
20+
rainbow (3.1.1)
21+
rake (13.0.6)
22+
regexp_parser (2.8.0)
23+
rexml (3.2.5)
24+
rspec (3.12.0)
25+
rspec-core (~> 3.12.0)
26+
rspec-expectations (~> 3.12.0)
27+
rspec-mocks (~> 3.12.0)
28+
rspec-core (3.12.2)
29+
rspec-support (~> 3.12.0)
30+
rspec-expectations (3.12.3)
31+
diff-lcs (>= 1.2.0, < 2.0)
32+
rspec-support (~> 3.12.0)
33+
rspec-mocks (3.12.5)
34+
diff-lcs (>= 1.2.0, < 2.0)
35+
rspec-support (~> 3.12.0)
36+
rspec-support (3.12.0)
37+
rubocop (1.51.0)
38+
json (~> 2.3)
39+
parallel (~> 1.10)
40+
parser (>= 3.2.0.0)
41+
rainbow (>= 2.2.2, < 4.0)
42+
regexp_parser (>= 1.8, < 3.0)
43+
rexml (>= 3.2.5, < 4.0)
44+
rubocop-ast (>= 1.28.0, < 2.0)
45+
ruby-progressbar (~> 1.7)
46+
unicode-display_width (>= 2.4.0, < 3.0)
47+
rubocop-ast (1.28.1)
48+
parser (>= 3.2.1.0)
49+
ruby-progressbar (1.13.0)
50+
stringio (3.0.6)
51+
time (0.2.2)
52+
date
53+
unicode-display_width (2.4.2)
54+
uri (0.12.1)
55+
56+
PLATFORMS
57+
ruby
58+
59+
DEPENDENCIES
60+
open-uri
61+
rake (~> 13.0)
62+
rspec (~> 3.0)
63+
rubocop (~> 1.21)
64+
ruby-2captcha!
65+
66+
BUNDLED WITH
67+
2.4.12

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 2captcha
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 all
13+
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 THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)