conexa 0.1.1 → 0.2.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +265 -1
- data/README.md +36 -4
- data/README_pt-BR.md +37 -3
- data/REFERENCE.md +53 -10
- data/lib/conexa/configuration.rb +48 -2
- data/lib/conexa/deprecation.rb +44 -0
- data/lib/conexa/errors.rb +79 -7
- data/lib/conexa/model.rb +80 -14
- data/lib/conexa/object.rb +24 -3
- data/lib/conexa/request.rb +90 -11
- data/lib/conexa/resources/charge.rb +61 -8
- data/lib/conexa/resources/company.rb +20 -1
- data/lib/conexa/resources/contract.rb +147 -30
- data/lib/conexa/resources/credit_card.rb +46 -0
- data/lib/conexa/resources/recurring_sale.rb +16 -5
- data/lib/conexa/resources/result.rb +23 -5
- data/lib/conexa/util.rb +49 -9
- data/lib/conexa/version.rb +1 -1
- data/lib/conexa.rb +40 -3
- metadata +28 -70
- data/.editorconfig +0 -30
- data/.rspec +0 -3
- data/.rubocop.yml +0 -13
- data/.solargraph.yml +0 -2
- data/.vscode/launch.json +0 -30
- data/Gemfile +0 -18
- data/Gemfile.lock +0 -159
- data/Rakefile +0 -12
- data/bin/console +0 -61
- data/bin/setup +0 -8
- data/docs/postman-collection.json +0 -30785
- data/lib/conexa/authenticator.rb +0 -116
- data/lib/conexa/order_common.rb +0 -44
- data/lib/conexa/token_manager.rb +0 -136
- data/scripts/extract_fixtures.rb +0 -35
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: conexa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Guilherme Gazzinelli
|
|
@@ -9,118 +9,90 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
-
- !ruby/object:Gem::Dependency
|
|
13
|
-
name: jwt
|
|
14
|
-
requirement: !ruby/object:Gem::Requirement
|
|
15
|
-
requirements:
|
|
16
|
-
- - ">="
|
|
17
|
-
- !ruby/object:Gem::Version
|
|
18
|
-
version: '0'
|
|
19
|
-
type: :runtime
|
|
20
|
-
prerelease: false
|
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
-
requirements:
|
|
23
|
-
- - ">="
|
|
24
|
-
- !ruby/object:Gem::Version
|
|
25
|
-
version: '0'
|
|
26
12
|
- !ruby/object:Gem::Dependency
|
|
27
13
|
name: rest-client
|
|
28
14
|
requirement: !ruby/object:Gem::Requirement
|
|
29
15
|
requirements:
|
|
30
|
-
- - "
|
|
16
|
+
- - "~>"
|
|
31
17
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
18
|
+
version: '2.1'
|
|
33
19
|
type: :runtime
|
|
34
20
|
prerelease: false
|
|
35
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
22
|
requirements:
|
|
37
|
-
- - "
|
|
23
|
+
- - "~>"
|
|
38
24
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
25
|
+
version: '2.1'
|
|
40
26
|
- !ruby/object:Gem::Dependency
|
|
41
27
|
name: multi_json
|
|
42
28
|
requirement: !ruby/object:Gem::Requirement
|
|
43
29
|
requirements:
|
|
44
|
-
- - "
|
|
30
|
+
- - "~>"
|
|
45
31
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
32
|
+
version: '1.15'
|
|
47
33
|
type: :runtime
|
|
48
34
|
prerelease: false
|
|
49
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
36
|
requirements:
|
|
51
|
-
- - "
|
|
37
|
+
- - "~>"
|
|
52
38
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
39
|
+
version: '1.15'
|
|
54
40
|
- !ruby/object:Gem::Dependency
|
|
55
41
|
name: vcr
|
|
56
42
|
requirement: !ruby/object:Gem::Requirement
|
|
57
43
|
requirements:
|
|
58
|
-
- - "
|
|
44
|
+
- - "~>"
|
|
59
45
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0'
|
|
46
|
+
version: '6.0'
|
|
61
47
|
type: :development
|
|
62
48
|
prerelease: false
|
|
63
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
50
|
requirements:
|
|
65
|
-
- - "
|
|
51
|
+
- - "~>"
|
|
66
52
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0'
|
|
53
|
+
version: '6.0'
|
|
68
54
|
- !ruby/object:Gem::Dependency
|
|
69
55
|
name: webmock
|
|
70
56
|
requirement: !ruby/object:Gem::Requirement
|
|
71
57
|
requirements:
|
|
72
|
-
- - "
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: '0'
|
|
75
|
-
type: :development
|
|
76
|
-
prerelease: false
|
|
77
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - ">="
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0'
|
|
82
|
-
- !ruby/object:Gem::Dependency
|
|
83
|
-
name: debug
|
|
84
|
-
requirement: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - ">="
|
|
58
|
+
- - "~>"
|
|
87
59
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: '0'
|
|
60
|
+
version: '3.0'
|
|
89
61
|
type: :development
|
|
90
62
|
prerelease: false
|
|
91
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
64
|
requirements:
|
|
93
|
-
- - "
|
|
65
|
+
- - "~>"
|
|
94
66
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '0'
|
|
67
|
+
version: '3.0'
|
|
96
68
|
- !ruby/object:Gem::Dependency
|
|
97
69
|
name: faker
|
|
98
70
|
requirement: !ruby/object:Gem::Requirement
|
|
99
71
|
requirements:
|
|
100
|
-
- - "
|
|
72
|
+
- - "~>"
|
|
101
73
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: '0'
|
|
74
|
+
version: '3.0'
|
|
103
75
|
type: :development
|
|
104
76
|
prerelease: false
|
|
105
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
78
|
requirements:
|
|
107
|
-
- - "
|
|
79
|
+
- - "~>"
|
|
108
80
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '0'
|
|
81
|
+
version: '3.0'
|
|
110
82
|
- !ruby/object:Gem::Dependency
|
|
111
83
|
name: factory_bot
|
|
112
84
|
requirement: !ruby/object:Gem::Requirement
|
|
113
85
|
requirements:
|
|
114
|
-
- - "
|
|
86
|
+
- - "~>"
|
|
115
87
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '0'
|
|
88
|
+
version: '6.0'
|
|
117
89
|
type: :development
|
|
118
90
|
prerelease: false
|
|
119
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
92
|
requirements:
|
|
121
|
-
- - "
|
|
93
|
+
- - "~>"
|
|
122
94
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '0'
|
|
95
|
+
version: '6.0'
|
|
124
96
|
description: Gem para integração com a Conexa
|
|
125
97
|
email:
|
|
126
98
|
- guilherme.gazzinelli@gmail.com
|
|
@@ -128,32 +100,20 @@ executables: []
|
|
|
128
100
|
extensions: []
|
|
129
101
|
extra_rdoc_files: []
|
|
130
102
|
files:
|
|
131
|
-
- ".editorconfig"
|
|
132
|
-
- ".rspec"
|
|
133
|
-
- ".rubocop.yml"
|
|
134
|
-
- ".solargraph.yml"
|
|
135
|
-
- ".vscode/launch.json"
|
|
136
103
|
- CHANGELOG.md
|
|
137
104
|
- CODE_OF_CONDUCT.md
|
|
138
|
-
- Gemfile
|
|
139
|
-
- Gemfile.lock
|
|
140
105
|
- LICENSE
|
|
141
106
|
- README.md
|
|
142
107
|
- README_pt-BR.md
|
|
143
108
|
- REFERENCE.md
|
|
144
|
-
- Rakefile
|
|
145
|
-
- bin/console
|
|
146
|
-
- bin/setup
|
|
147
|
-
- docs/postman-collection.json
|
|
148
109
|
- lib/conexa.rb
|
|
149
|
-
- lib/conexa/authenticator.rb
|
|
150
110
|
- lib/conexa/configuration.rb
|
|
151
111
|
- lib/conexa/core_ext.rb
|
|
112
|
+
- lib/conexa/deprecation.rb
|
|
152
113
|
- lib/conexa/errors.rb
|
|
153
114
|
- lib/conexa/generators/install_generator.rb
|
|
154
115
|
- lib/conexa/model.rb
|
|
155
116
|
- lib/conexa/object.rb
|
|
156
|
-
- lib/conexa/order_common.rb
|
|
157
117
|
- lib/conexa/request.rb
|
|
158
118
|
- lib/conexa/resources/account.rb
|
|
159
119
|
- lib/conexa/resources/address.rb
|
|
@@ -181,10 +141,8 @@ files:
|
|
|
181
141
|
- lib/conexa/resources/sale.rb
|
|
182
142
|
- lib/conexa/resources/service_category.rb
|
|
183
143
|
- lib/conexa/resources/supplier.rb
|
|
184
|
-
- lib/conexa/token_manager.rb
|
|
185
144
|
- lib/conexa/util.rb
|
|
186
145
|
- lib/conexa/version.rb
|
|
187
|
-
- scripts/extract_fixtures.rb
|
|
188
146
|
homepage: https://github.com/guilhermegazzinelli/conexa-ruby
|
|
189
147
|
licenses:
|
|
190
148
|
- MIT
|
|
@@ -199,14 +157,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
199
157
|
requirements:
|
|
200
158
|
- - ">="
|
|
201
159
|
- !ruby/object:Gem::Version
|
|
202
|
-
version:
|
|
160
|
+
version: 3.1.0
|
|
203
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
162
|
requirements:
|
|
205
163
|
- - ">="
|
|
206
164
|
- !ruby/object:Gem::Version
|
|
207
165
|
version: '0'
|
|
208
166
|
requirements: []
|
|
209
|
-
rubygems_version:
|
|
167
|
+
rubygems_version: 4.0.16
|
|
210
168
|
specification_version: 4
|
|
211
169
|
summary: Gem para integração com a Api da Conexa
|
|
212
170
|
test_files: []
|
data/.editorconfig
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
end_of_line = lf
|
|
5
|
-
indent_size = 2
|
|
6
|
-
indent_style = space
|
|
7
|
-
insert_final_newline = true
|
|
8
|
-
tab_width = 4
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
|
|
11
|
-
[*.bat]
|
|
12
|
-
end_of_line = crlf
|
|
13
|
-
|
|
14
|
-
[*.gemspec]
|
|
15
|
-
indent_size = 2
|
|
16
|
-
|
|
17
|
-
[*.rb]
|
|
18
|
-
indent_size = 2
|
|
19
|
-
|
|
20
|
-
[*.yml]
|
|
21
|
-
indent_size = 2
|
|
22
|
-
|
|
23
|
-
[{*[Mm]akefile*,*.mak,*.mk,depend}]
|
|
24
|
-
indent_style = tab
|
|
25
|
-
|
|
26
|
-
[enc/*]
|
|
27
|
-
indent_size = 2
|
|
28
|
-
|
|
29
|
-
[reg*.[ch]]
|
|
30
|
-
indent_size = 2
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/.solargraph.yml
DELETED
data/.vscode/launch.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
"name": "Run console",
|
|
10
|
-
"debugPort": "9999",
|
|
11
|
-
"request": "launch",
|
|
12
|
-
"script": "${workspaceRoot}/bin/console",
|
|
13
|
-
"type": "rdbg",
|
|
14
|
-
"useTerminal": true,
|
|
15
|
-
"rdbgPath": "bundle exec rdbg",
|
|
16
|
-
|
|
17
|
-
"args": []
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "Run rspec",
|
|
21
|
-
"request": "launch",
|
|
22
|
-
"script": "respec",
|
|
23
|
-
"type": "rdbg",
|
|
24
|
-
"useTerminal": true,
|
|
25
|
-
"rdbgPath": "bundle exec rdbg",
|
|
26
|
-
|
|
27
|
-
"args": []
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}
|
data/Gemfile
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
# Specify your gem's dependencies in conexa.gemspec
|
|
6
|
-
gemspec
|
|
7
|
-
|
|
8
|
-
gem "rake", "~> 13.0"
|
|
9
|
-
|
|
10
|
-
gem "rspec", "~> 3.0"
|
|
11
|
-
|
|
12
|
-
gem "rubocop", "~> 1.21"
|
|
13
|
-
|
|
14
|
-
gem "standard"
|
|
15
|
-
|
|
16
|
-
gem "debug"
|
|
17
|
-
gem "byebug"
|
|
18
|
-
|
data/Gemfile.lock
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
conexa (0.1.1)
|
|
5
|
-
jwt
|
|
6
|
-
multi_json
|
|
7
|
-
rest-client
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
activesupport (7.2.1.1)
|
|
13
|
-
base64
|
|
14
|
-
bigdecimal
|
|
15
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
16
|
-
connection_pool (>= 2.2.5)
|
|
17
|
-
drb
|
|
18
|
-
i18n (>= 1.6, < 2)
|
|
19
|
-
logger (>= 1.4.2)
|
|
20
|
-
minitest (>= 5.1)
|
|
21
|
-
securerandom (>= 0.3)
|
|
22
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
23
|
-
addressable (2.8.7)
|
|
24
|
-
public_suffix (>= 2.0.2, < 7.0)
|
|
25
|
-
ast (2.4.2)
|
|
26
|
-
base64 (0.2.0)
|
|
27
|
-
bigdecimal (3.1.8)
|
|
28
|
-
byebug (11.1.3)
|
|
29
|
-
concurrent-ruby (1.3.4)
|
|
30
|
-
connection_pool (2.4.1)
|
|
31
|
-
crack (1.0.0)
|
|
32
|
-
bigdecimal
|
|
33
|
-
rexml
|
|
34
|
-
debug (1.9.2)
|
|
35
|
-
irb (~> 1.10)
|
|
36
|
-
reline (>= 0.3.8)
|
|
37
|
-
diff-lcs (1.5.1)
|
|
38
|
-
domain_name (0.6.20240107)
|
|
39
|
-
drb (2.2.1)
|
|
40
|
-
factory_bot (6.5.0)
|
|
41
|
-
activesupport (>= 5.0.0)
|
|
42
|
-
faker (3.5.1)
|
|
43
|
-
i18n (>= 1.8.11, < 2)
|
|
44
|
-
hashdiff (1.1.1)
|
|
45
|
-
http-accept (1.7.0)
|
|
46
|
-
http-cookie (1.1.0)
|
|
47
|
-
domain_name (~> 0.5)
|
|
48
|
-
i18n (1.14.6)
|
|
49
|
-
concurrent-ruby (~> 1.0)
|
|
50
|
-
io-console (0.7.2)
|
|
51
|
-
irb (1.14.1)
|
|
52
|
-
rdoc (>= 4.0.0)
|
|
53
|
-
reline (>= 0.4.2)
|
|
54
|
-
json (2.7.2)
|
|
55
|
-
jwt (3.1.2)
|
|
56
|
-
base64
|
|
57
|
-
language_server-protocol (3.17.0.3)
|
|
58
|
-
lint_roller (1.1.0)
|
|
59
|
-
logger (1.6.1)
|
|
60
|
-
mime-types (3.7.0)
|
|
61
|
-
logger
|
|
62
|
-
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
|
63
|
-
mime-types-data (3.2026.0203)
|
|
64
|
-
minitest (5.25.1)
|
|
65
|
-
multi_json (1.19.1)
|
|
66
|
-
netrc (0.11.0)
|
|
67
|
-
parallel (1.26.3)
|
|
68
|
-
parser (3.3.5.0)
|
|
69
|
-
ast (~> 2.4.1)
|
|
70
|
-
racc
|
|
71
|
-
psych (5.1.2)
|
|
72
|
-
stringio
|
|
73
|
-
public_suffix (6.0.1)
|
|
74
|
-
racc (1.8.1)
|
|
75
|
-
rainbow (3.1.1)
|
|
76
|
-
rake (13.2.1)
|
|
77
|
-
rdoc (6.7.0)
|
|
78
|
-
psych (>= 4.0.0)
|
|
79
|
-
regexp_parser (2.9.2)
|
|
80
|
-
reline (0.5.10)
|
|
81
|
-
io-console (~> 0.5)
|
|
82
|
-
rest-client (2.1.0)
|
|
83
|
-
http-accept (>= 1.7.0, < 2.0)
|
|
84
|
-
http-cookie (>= 1.0.2, < 2.0)
|
|
85
|
-
mime-types (>= 1.16, < 4.0)
|
|
86
|
-
netrc (~> 0.8)
|
|
87
|
-
rexml (3.3.8)
|
|
88
|
-
rspec (3.13.0)
|
|
89
|
-
rspec-core (~> 3.13.0)
|
|
90
|
-
rspec-expectations (~> 3.13.0)
|
|
91
|
-
rspec-mocks (~> 3.13.0)
|
|
92
|
-
rspec-core (3.13.2)
|
|
93
|
-
rspec-support (~> 3.13.0)
|
|
94
|
-
rspec-expectations (3.13.3)
|
|
95
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
96
|
-
rspec-support (~> 3.13.0)
|
|
97
|
-
rspec-mocks (3.13.2)
|
|
98
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
99
|
-
rspec-support (~> 3.13.0)
|
|
100
|
-
rspec-support (3.13.1)
|
|
101
|
-
rubocop (1.66.1)
|
|
102
|
-
json (~> 2.3)
|
|
103
|
-
language_server-protocol (>= 3.17.0)
|
|
104
|
-
parallel (~> 1.10)
|
|
105
|
-
parser (>= 3.3.0.2)
|
|
106
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
107
|
-
regexp_parser (>= 2.4, < 3.0)
|
|
108
|
-
rubocop-ast (>= 1.32.2, < 2.0)
|
|
109
|
-
ruby-progressbar (~> 1.7)
|
|
110
|
-
unicode-display_width (>= 2.4.0, < 3.0)
|
|
111
|
-
rubocop-ast (1.32.3)
|
|
112
|
-
parser (>= 3.3.1.0)
|
|
113
|
-
rubocop-performance (1.22.1)
|
|
114
|
-
rubocop (>= 1.48.1, < 2.0)
|
|
115
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
116
|
-
ruby-progressbar (1.13.0)
|
|
117
|
-
securerandom (0.3.1)
|
|
118
|
-
standard (1.41.1)
|
|
119
|
-
language_server-protocol (~> 3.17.0.2)
|
|
120
|
-
lint_roller (~> 1.0)
|
|
121
|
-
rubocop (~> 1.66.0)
|
|
122
|
-
standard-custom (~> 1.0.0)
|
|
123
|
-
standard-performance (~> 1.5)
|
|
124
|
-
standard-custom (1.0.2)
|
|
125
|
-
lint_roller (~> 1.0)
|
|
126
|
-
rubocop (~> 1.50)
|
|
127
|
-
standard-performance (1.5.0)
|
|
128
|
-
lint_roller (~> 1.1)
|
|
129
|
-
rubocop-performance (~> 1.22.0)
|
|
130
|
-
stringio (3.1.1)
|
|
131
|
-
tzinfo (2.0.6)
|
|
132
|
-
concurrent-ruby (~> 1.0)
|
|
133
|
-
unicode-display_width (2.6.0)
|
|
134
|
-
vcr (6.3.1)
|
|
135
|
-
base64
|
|
136
|
-
webmock (3.24.0)
|
|
137
|
-
addressable (>= 2.8.0)
|
|
138
|
-
crack (>= 0.3.2)
|
|
139
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
|
140
|
-
|
|
141
|
-
PLATFORMS
|
|
142
|
-
ruby
|
|
143
|
-
x86_64-linux-gnu
|
|
144
|
-
|
|
145
|
-
DEPENDENCIES
|
|
146
|
-
byebug
|
|
147
|
-
conexa!
|
|
148
|
-
debug
|
|
149
|
-
factory_bot
|
|
150
|
-
faker
|
|
151
|
-
rake (~> 13.0)
|
|
152
|
-
rspec (~> 3.0)
|
|
153
|
-
rubocop (~> 1.21)
|
|
154
|
-
standard
|
|
155
|
-
vcr
|
|
156
|
-
webmock
|
|
157
|
-
|
|
158
|
-
BUNDLED WITH
|
|
159
|
-
2.3.11
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
require "irb"
|
|
5
|
-
require "irb/completion"
|
|
6
|
-
require "bundler/setup"
|
|
7
|
-
require "conexa"
|
|
8
|
-
require "factory_bot"
|
|
9
|
-
require "faker"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
13
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
14
|
-
|
|
15
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
16
|
-
# require "pry"
|
|
17
|
-
# Pry.start
|
|
18
|
-
|
|
19
|
-
# Config IRB to enable --simple-prompt and auto indent
|
|
20
|
-
IRB.conf[:PROMPT_MODE] = :SIMPLE
|
|
21
|
-
IRB.conf[:AUTO_INDENT] = true
|
|
22
|
-
include FactoryBot::Syntax::Methods
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
FactoryBot.find_definitions
|
|
26
|
-
FactoryBot.reload
|
|
27
|
-
Faker::Config.locale = 'pt-BR'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def reload!(print = true)
|
|
31
|
-
puts 'Reloading ...' if print
|
|
32
|
-
# Main project directory.
|
|
33
|
-
root_dir = File.expand_path('..', __dir__)
|
|
34
|
-
# Directories within the project that should be reloaded.
|
|
35
|
-
reload_dirs = %w{lib}
|
|
36
|
-
# Loop through and reload every file in all relevant project directories.
|
|
37
|
-
reload_dirs.each do |dir|
|
|
38
|
-
Dir.glob("#{root_dir}/#{dir}/**/*.rb").each { |f| load(f) }
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
FactoryBot.reload
|
|
42
|
-
|
|
43
|
-
# Return true when complete.
|
|
44
|
-
true
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def initialize_conexa
|
|
48
|
-
pp "Initilizing..."
|
|
49
|
-
|
|
50
|
-
Conexa.configure do |config|
|
|
51
|
-
config.api_token = ENV['API_TOKEN']
|
|
52
|
-
config.api_host = ENV['API_HOST']
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
pp Conexa.configuration
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
initialize_conexa
|
|
61
|
-
IRB.start
|