Skip to content

Commit 4213f03

Browse files
[FGTW-1795] Initialize gem (#1)
1 parent 21587f3 commit 4213f03

15 files changed

+407
-0
lines changed

.github/workflows/check.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
security_check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Salus Scan
11+
run: docker run --rm -t -v $(pwd):/home/repo coinbase/salus:latest
12+
13+
tests:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: ruby:2.7.6
17+
env:
18+
BUNDLE_JOBS: 3
19+
BUNDLE_RETRY: 3
20+
BUNDLE_PATH: vendor/bundle
21+
RAILS_ENV: test
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: Which bundler?
26+
run: |
27+
bundle -v
28+
29+
- name: Cache
30+
id: restore-cache
31+
uses: actions/cache@v3
32+
with:
33+
path: vendor/bundle
34+
key: rails-demo-bundle-v2-${{ hashFiles('Gemfile.lock') }}
35+
36+
- name: Bundle Install
37+
run: |
38+
bundle check || bundle install
39+
40+
- name: Rubocop
41+
run: bundle exec rubocop --require rubocop-rspec
42+
43+
- name: Run rspec
44+
run: |
45+
bundle exec rspec spec

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
4+
/coverage/
5+
/doc/
6+
/pkg/
7+
/spec/reports/
8+
/tmp/
9+
10+
# rspec failure tracking
11+
.rspec_status

.rubocop.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
require: rubocop-rspec
2+
3+
inherit_gem:
4+
rubocop-github:
5+
- "config/default.yml"
6+
rubocop-rspec:
7+
- "config/default.yml"
8+
9+
Metrics/LineLength:
10+
Max: 120
11+
12+
Documentation:
13+
Enabled: false
14+
15+
Metrics/MethodLength:
16+
Max: 30
17+
18+
Metrics/AbcSize:
19+
Max: 30
20+
21+
RSpec/ExampleLength:
22+
Max: 20
23+
24+
Naming/FileName:
25+
Exclude:
26+
- "lib/lightspark-client.rb"
27+
28+
Metrics/BlockLength:
29+
Exclude:
30+
- "spec/**/*.rb"

Gemfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec

Gemfile.lock

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
PATH
2+
remote: .
3+
specs:
4+
lightspark-client (0.0.1)
5+
typhoeus (~> 1.3)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
activesupport (7.1.3.4)
11+
base64
12+
bigdecimal
13+
concurrent-ruby (~> 1.0, >= 1.0.2)
14+
connection_pool (>= 2.2.5)
15+
drb
16+
i18n (>= 1.6, < 2)
17+
minitest (>= 5.1)
18+
mutex_m
19+
tzinfo (~> 2.0)
20+
addressable (2.8.7)
21+
public_suffix (>= 2.0.2, < 7.0)
22+
ast (2.4.2)
23+
base64 (0.2.0)
24+
bigdecimal (3.1.8)
25+
byebug (10.0.2)
26+
coderay (1.1.3)
27+
concurrent-ruby (1.3.4)
28+
connection_pool (2.4.1)
29+
crack (1.0.0)
30+
bigdecimal
31+
rexml
32+
diff-lcs (1.5.1)
33+
drb (2.2.1)
34+
ethon (0.16.0)
35+
ffi (>= 1.15.0)
36+
ffi (1.16.3)
37+
hashdiff (1.1.1)
38+
i18n (1.14.5)
39+
concurrent-ruby (~> 1.0)
40+
method_source (1.1.0)
41+
minitest (5.25.1)
42+
mutex_m (0.2.0)
43+
parallel (1.26.3)
44+
parser (3.3.4.2)
45+
ast (~> 2.4.1)
46+
racc
47+
pry (0.14.2)
48+
coderay (~> 1.1)
49+
method_source (~> 1.0)
50+
pry-byebug (3.6.0)
51+
byebug (~> 10.0)
52+
pry (~> 0.10)
53+
public_suffix (5.1.1)
54+
racc (1.8.1)
55+
rack (3.1.7)
56+
rainbow (3.1.1)
57+
rake (12.3.3)
58+
regexp_parser (2.9.2)
59+
rexml (3.3.5)
60+
strscan
61+
rspec (3.13.0)
62+
rspec-core (~> 3.13.0)
63+
rspec-expectations (~> 3.13.0)
64+
rspec-mocks (~> 3.13.0)
65+
rspec-core (3.13.0)
66+
rspec-support (~> 3.13.0)
67+
rspec-expectations (3.13.2)
68+
diff-lcs (>= 1.2.0, < 2.0)
69+
rspec-support (~> 3.13.0)
70+
rspec-mocks (3.13.1)
71+
diff-lcs (>= 1.2.0, < 2.0)
72+
rspec-support (~> 3.13.0)
73+
rspec-support (3.13.1)
74+
rubocop (0.93.1)
75+
parallel (~> 1.10)
76+
parser (>= 2.7.1.5)
77+
rainbow (>= 2.2.2, < 4.0)
78+
regexp_parser (>= 1.8)
79+
rexml
80+
rubocop-ast (>= 0.6.0)
81+
ruby-progressbar (~> 1.7)
82+
unicode-display_width (>= 1.4.0, < 2.0)
83+
rubocop-ast (1.32.1)
84+
parser (>= 3.3.1.0)
85+
rubocop-github (0.17.0)
86+
rubocop
87+
rubocop-performance
88+
rubocop-rails
89+
rubocop-performance (1.10.2)
90+
rubocop (>= 0.90.0, < 2.0)
91+
rubocop-ast (>= 0.4.0)
92+
rubocop-rails (2.9.1)
93+
activesupport (>= 4.2.0)
94+
rack (>= 1.1)
95+
rubocop (>= 0.90.0, < 2.0)
96+
rubocop-rspec (1.44.1)
97+
rubocop (~> 0.87)
98+
rubocop-ast (>= 0.7.1)
99+
ruby-progressbar (1.13.0)
100+
strscan (3.1.0)
101+
typhoeus (1.4.1)
102+
ethon (>= 0.9.0)
103+
tzinfo (2.0.6)
104+
concurrent-ruby (~> 1.0)
105+
unicode-display_width (1.8.0)
106+
webmock (3.23.1)
107+
addressable (>= 2.8.0)
108+
crack (>= 0.3.2)
109+
hashdiff (>= 0.4.0, < 2.0.0)
110+
111+
PLATFORMS
112+
ruby
113+
114+
DEPENDENCIES
115+
bundler (~> 1.16)
116+
byebug (~> 10.0)
117+
lightspark-client!
118+
pry-byebug (<= 3.6)
119+
rake (~> 12.3.3)
120+
rspec (~> 3.8)
121+
rubocop (~> 0.53)
122+
rubocop-github (~> 0.10)
123+
rubocop-rspec (~> 1.24)
124+
webmock (~> 3.5)
125+
126+
BUNDLED WITH
127+
2.1.4

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# lightspark-client
22
Ruby GEM client to integrate lightspark API
3+
4+
# Installation
5+
6+
Add this line to your application's Gemfile:
7+
```ruby
8+
gem 'lightspark-client', git: '[email protected]:foxbit-group/lightspark-client.git', branch: 'main'
9+
```

Rakefile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
require "bundler/gem_tasks"
3+
require "rspec/core/rake_task"
4+
5+
RSpec::Core::RakeTask.new(:spec)
6+
7+
task default: :spec

bin/console

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
require "bundler/setup"
5+
require "lightspark/client"
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__)

bin/setup

+8
Original file line numberDiff line numberDiff line change
@@ -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

docs/pull_request_template.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<details open>
2+
<summary>
3+
<b>Feature (descrever funcionalidade e motivação)</b>
4+
</summary>
5+
N/A
6+
</details>
7+
8+
<details open>
9+
<summary>
10+
<b>Bugfix</b>
11+
</summary>
12+
13+
- **Descrição do problema**
14+
N/A
15+
16+
- **Causa do problema**
17+
N/A
18+
19+
- **Solução**
20+
N/A
21+
22+
- **Sustentação da solução**
23+
N/A
24+
25+
</details>
26+
27+
<details open>
28+
<summary>
29+
<b>Changelog</b>
30+
</summary>
31+
N/A
32+
</details>
33+
34+
<details open>
35+
<summary>
36+
<b>Testes</b>
37+
</summary>
38+
39+
- **Sumário**
40+
- [ ] (descrever os testes em checkbox)
41+
42+
- **Observações**
43+
N/A
44+
45+
- **Evidências visuais**
46+
N/A
47+
48+
49+
</details>
50+
51+
<details open>
52+
<summary>
53+
<b>Evidencias visuais :framed_picture:</b>
54+
</summary>
55+
N/A
56+
</details>
57+
58+
<details open>
59+
<summary>
60+
<b>Existe breaking change sendo introduzido?</b>
61+
</summary>
62+
63+
- [ ] Sim (descrever)
64+
- [ ] Não
65+
</details>
66+
67+
<details open>
68+
<summary>
69+
<b>Checklist antes de abrir o PR</b>
70+
</summary>
71+
72+
- [ ] Tags adicionadas
73+
- [ ] Changelog preenchido
74+
- [ ] Code reviewers adicionados
75+
- [ ] Build passando
76+
- [ ] Testado em ambiente de stage
77+
</details>
78+
79+
<details open>
80+
<summary>
81+
<b>Informações adicionais</b>
82+
</summary>
83+
N/A
84+
</details>

lib/lightspark-client.rb

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
# Dependencies
4+
5+
# Source
6+
require "lightspark-client/version"

lib/lightspark-client/version.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
module LightsparkClient
4+
VERSION = "0.0.1"
5+
end

lightspark-client.gemspec

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# frozen_string_literal: true
2+
3+
lib = File.expand_path("lib", __dir__)
4+
5+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6+
7+
require "lightspark-client/version"
8+
9+
Gem::Specification.new do |spec|
10+
spec.name = "lightspark-client"
11+
spec.version = LightsparkClient::VERSION
12+
spec.authors = ["Arthur Ferraz dos Santos"]
13+
spec.email = ["[email protected]"]
14+
15+
spec.summary = "Lightspark Client"
16+
spec.description = "A ruby client to integrate Lightspark API"
17+
spec.homepage = "https://github.com/foxbit-group/lightspark-client"
18+
spec.license = "MIT"
19+
20+
spec.files = Dir["lib/**/*"]
21+
spec.require_paths = ["lib"]
22+
23+
spec.add_dependency "typhoeus", "~> 1.3"
24+
25+
spec.add_development_dependency "bundler", "~> 1.16"
26+
spec.add_development_dependency "byebug", "~> 10.0"
27+
spec.add_development_dependency "pry-byebug", "<= 3.6"
28+
spec.add_development_dependency "rake", "~> 12.3.3"
29+
spec.add_development_dependency "rspec", "~> 3.8"
30+
spec.add_development_dependency "rubocop", "~> 0.53"
31+
spec.add_development_dependency "rubocop-github", "~> 0.10"
32+
spec.add_development_dependency "rubocop-rspec", "~> 1.24"
33+
spec.add_development_dependency "webmock", "~> 3.5"
34+
end

0 commit comments

Comments
 (0)