flash_integration 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2f23dde3fb12c40861560bd60bb180f1586f63095a7f9d29ad23dd9d930f777
4
- data.tar.gz: 201d2a58f30ee5084bd5feefa3b2e156063aa2d23a2b5d92473dbff2bb150731
3
+ metadata.gz: 76e51e20627ae43c8025cf1d9fe4ce5fc6f2a73716dc5e7f0f21860ebe9b3c86
4
+ data.tar.gz: a245994953db3eebc61a4edc3a7ed203cc791f8e1515af49efe15a154bd59c2c
5
5
  SHA512:
6
- metadata.gz: 221cc98e24c5a4108e315baff391197488ce22f40f1734c84681328b2beb86a8202948152b7d62e96f41816efc9635309317b1061aaaa365081888e0962d7ee6
7
- data.tar.gz: 816300806c206582b671275bce3b9355154683780dce4b750a74744d18e7e0a8792c024d0ff9d07c1aa5e63c239f0547419087f15fce645e40b8df39c0417d67
6
+ metadata.gz: 14b7a1910fc80a5fa78aa11f0738c6f56acdc7ba832d121915d98c28f97c1199fae12bebd8e5578053a1ad59bd15a2a0affe7e61db0e861a38fb12dbbdf2383b
7
+ data.tar.gz: cb8b66482ff2706c4173036f2ac5a141b6d8901fd50f509564cee4ecb45d639ed243e7f6543258cff22ec6ced2cf2610710a7e29c678b6885a879c9f9a141a71
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.1.1-20220202 - Danilo Carolino
4
+
5
+ * [QC-79](https://qflash.atlassian.net/jira/software/projects/QC/boards/31?selectedIssue=QC-79)
6
+ Reduzir uso de pipelines em projetos Ruby [Dependabot]
7
+ * Bump Ruby version to v3.1.0
8
+
3
9
  ## v0.1.0
4
10
 
5
11
  * Initial release
data/README.md CHANGED
@@ -2,7 +2,7 @@ BigId Auth's Library for Ruby
2
2
  ==============
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/flash_integration.svg)](https://badge.fury.io/rb/flash_integration)
5
- [![Build Status](https://travis-ci.com/Quasar-Flash/flash-integration-ruby.svg?branch=master)](https://travis-ci.com/Quasar-Flash/flash-integration-ruby)
5
+ [![flash_integration](https://github.com/Quasar-Flash/flash_integration/actions/workflows/ruby.yml/badge.svg)](https://github.com/Quasar-Flash/flash_integration/actions/workflows/ruby.yml)
6
6
 
7
7
  Dev Requirements
8
8
  -----------------
@@ -13,56 +13,64 @@ Dev Requirements
13
13
  Global Installation
14
14
  -----------------
15
15
 
16
- gem install flash_integration
16
+ ```ruby
17
+ gem install flash_integration
18
+ ```
17
19
 
18
20
  Installation for Rails
19
21
  -----------------
20
22
 
21
- # Add to the Gemfile
22
- gem 'flash_integration', '~> 0.1.0'
23
+ ```ruby
24
+ # Add to the Gemfile
25
+ gem 'flash_integration', '~> 0.1.0'
26
+ ```
23
27
 
24
28
  Example - How to extend
25
29
  -----------------
26
30
 
27
- module MyApp
28
- class Connection < Flash::Integration::Connection
29
- def initialize(base_url: "http://localhost")
30
- super(base_url: base_url)
31
- end
32
-
33
- def default_headers
34
- {
35
- "Accept": "application/json",
36
- "Content-Type": "application/json"
37
- }
38
- end
39
- end
31
+ ```ruby
32
+ module MyApp
33
+ class Connection < Flash::Integration::Connection
34
+ def initialize(base_url: "http://localhost")
35
+ super(base_url: base_url)
40
36
  end
41
37
 
38
+ def default_headers
39
+ {
40
+ "Accept": "application/json",
41
+ "Content-Type": "application/json"
42
+ }
43
+ end
44
+ end
45
+ end
46
+ ```
47
+
42
48
  Example - How to request
43
49
  -----------------
44
50
 
45
- res = @connection.post(
46
- method: :post,
47
- url: url,
48
- params: {},
49
- headers: {},
50
- body: body, # except for get
51
- multipart: multipart # only for post
52
- )
53
- res # Flash::Integration::Response type
54
- res.request
55
- res.status
56
- res.headers
57
- res.body
58
- res.time
51
+ ```ruby
52
+ res = @connection.post(
53
+ method: :post,
54
+ url: url,
55
+ params: {},
56
+ headers: {},
57
+ body: body, # except for get
58
+ multipart: multipart # only for post
59
+ )
60
+ res # Flash::Integration::Response type
61
+ res.request
62
+ res.status
63
+ res.headers
64
+ res.body
65
+ res.time
66
+ ```
59
67
 
60
68
  Problems?
61
69
  -----------------
62
70
 
63
71
  **Please do not directly email any committers with questions or problems.** A community is best served when discussions are held in public.
64
72
 
65
- Searching the [issues](https://github.com/Quasar-Flash/flash-integration-ruby/issues) for your problem is also a good idea.
73
+ Searching the [issues](https://github.com/Quasar-Flash/flash_integration/issues) for your problem is also a good idea.
66
74
 
67
75
  Contributing
68
76
  -----------------
@@ -78,7 +86,7 @@ Contributing
78
86
  License
79
87
  -----------------
80
88
 
81
- Please see [LICENSE](https://github.com/Quasar-Flash/flash-integration-ruby/blob/master/LICENSE.txt) for licensing details.
89
+ Please see [LICENSE](https://github.com/Quasar-Flash/flash_integration/blob/master/LICENSE.txt) for licensing details.
82
90
 
83
91
  Authors
84
92
  -----------------
@@ -13,50 +13,50 @@ module Flash
13
13
  def get(url: "", params: {}, headers: {})
14
14
  send_request(
15
15
  method: :get,
16
- url: url,
17
- params: params,
18
- headers: headers
16
+ url:,
17
+ params:,
18
+ headers:
19
19
  )
20
20
  end
21
21
 
22
22
  def post(url: "", params: {}, headers: {}, body: {}, multipart: false)
23
23
  send_request(
24
24
  method: :post,
25
- url: url,
26
- params: params,
27
- headers: headers,
28
- body: body,
29
- multipart: multipart
25
+ url:,
26
+ params:,
27
+ headers:,
28
+ body:,
29
+ multipart:
30
30
  )
31
31
  end
32
32
 
33
33
  def put(url: "", params: {}, headers: {}, body: {})
34
34
  send_request(
35
35
  method: :put,
36
- url: url,
37
- params: params,
38
- headers: headers,
39
- body: body
36
+ url:,
37
+ params:,
38
+ headers:,
39
+ body:
40
40
  )
41
41
  end
42
42
 
43
43
  def patch(url: "", params: {}, headers: {}, body: {})
44
44
  send_request(
45
45
  method: :patch,
46
- url: url,
47
- params: params,
48
- headers: headers,
49
- body: body
46
+ url:,
47
+ params:,
48
+ headers:,
49
+ body:
50
50
  )
51
51
  end
52
52
 
53
53
  def delete(url: "", params: {}, headers: {}, body: {})
54
54
  send_request(
55
55
  method: :delete,
56
- url: url,
57
- params: params,
58
- headers: headers,
59
- body: body
56
+ url:,
57
+ params:,
58
+ headers:,
59
+ body:
60
60
  )
61
61
  end
62
62
 
@@ -95,21 +95,21 @@ module Flash
95
95
 
96
96
  def build_request(method, url, params, headers, body)
97
97
  Flash::Integration::Request.new(
98
- method: method,
99
- url: url,
100
- params: params,
101
- headers: headers,
102
- body: body,
98
+ method:,
99
+ url:,
100
+ params:,
101
+ headers:,
102
+ body:,
103
103
  time: Time.now.utc
104
104
  )
105
105
  end
106
106
 
107
107
  def build_response(request, status, headers, body)
108
108
  Flash::Integration::Response.new(
109
- request: request,
110
- status: status,
111
- headers: headers,
112
- body: body,
109
+ request:,
110
+ status:,
111
+ headers:,
112
+ body:,
113
113
  time: Time.now.utc
114
114
  )
115
115
  end
@@ -9,6 +9,6 @@ module Flash
9
9
  # Major - Incremented for incompatible changes with previous release (or big enough new features)
10
10
  # Minor - Incremented for new backwards-compatible features + deprecations
11
11
  # Patch - Incremented for backwards-compatible bug fixes
12
- VERSION = "0.1.0"
12
+ VERSION = "0.1.1"
13
13
  end
14
14
  end
@@ -5,7 +5,7 @@ require "spec_helper"
5
5
  describe Flash::Integration::Connection do
6
6
  let(:base_url) { "http://localhost" }
7
7
  let(:connection) { Faraday::Connection.new(url: base_url) }
8
- let(:instance) { described_class.new(request_class: request_class, base_url: base_url) }
8
+ let(:instance) { described_class.new(request_class:, base_url:) }
9
9
  let(:request_params) { double("request-params") }
10
10
  let(:request_class) { class_double(Faraday, default_adapter: double("request-params")) }
11
11
  let(:request_headers) { {} }
@@ -19,7 +19,7 @@ describe Flash::Integration::Connection do
19
19
  let(:response) do
20
20
  double(
21
21
  "response",
22
- request: request,
22
+ request:,
23
23
  status: response_status,
24
24
  headers: response_headers,
25
25
  body: response_body
@@ -32,7 +32,7 @@ describe Flash::Integration::Connection do
32
32
  params: request_params,
33
33
  headers: request_headers,
34
34
  body: request_body,
35
- time: time
35
+ time:
36
36
  )
37
37
  end
38
38
 
@@ -4,7 +4,7 @@ require "spec_helper"
4
4
 
5
5
  describe Flash::Integration::Response do
6
6
  let(:request) { double("request") }
7
- let(:instance) { described_class.new(request: request, status: status) }
7
+ let(:instance) { described_class.new(request:, status:) }
8
8
 
9
9
  describe "#success?" do
10
10
  subject { instance.success? }
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "simplecov"
4
+
5
+ SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter]
6
+ SimpleCov.minimum_coverage 70.0
7
+
8
+ SimpleCov.start do
9
+ add_filter "/spec/"
10
+ minimum_coverage 70
11
+ minimum_coverage_by_file 40
12
+ end
13
+
3
14
  require "rubygems"
4
15
  require "bundler"
5
16
  require "pry"
@@ -14,12 +25,6 @@ rescue Bundler::BundlerError => e
14
25
  exit e.status_code
15
26
  end
16
27
 
17
- require "simplecov"
18
-
19
- SimpleCov.start do
20
- add_filter "spec"
21
- end
22
-
23
28
  RSpec.configure do |config|
24
29
  config.alias_example_group_to :detail, detailed: true
25
30
  end
metadata CHANGED
@@ -1,63 +1,63 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flash_integration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danilo Carolino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-25 00:00:00.000000000 Z
11
+ date: 2022-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.4.1
20
- - - ">="
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '1.0'
22
+ version: 1.9.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: 1.4.1
30
- - - ">="
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '1.0'
32
+ version: 1.9.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: bundler
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 1.1.0
39
+ version: '1.2'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 1.1.0
46
+ version: '1.2'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: pry
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 0.14.1
53
+ version: '0.14'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 0.14.1
60
+ version: '0.14'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  version: '13.0'
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 10.0.0
70
+ version: '10.0'
71
71
  type: :development
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -77,91 +77,91 @@ dependencies:
77
77
  version: '13.0'
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 10.0.0
80
+ version: '10.0'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rspec
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: 3.10.0
87
+ version: '3.10'
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: 3.10.0
94
+ version: '3.10'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: rubocop
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
99
  - - "~>"
100
100
  - !ruby/object:Gem::Version
101
- version: 1.12.1
101
+ version: '1.25'
102
102
  type: :development
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
- version: 1.12.1
108
+ version: '1.25'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: rubocop-packaging
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - "~>"
114
114
  - !ruby/object:Gem::Version
115
- version: 0.5.1
115
+ version: '0.5'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
- version: 0.5.1
122
+ version: '0.5'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: rubocop-performance
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
127
  - - "~>"
128
128
  - !ruby/object:Gem::Version
129
- version: 1.10.2
129
+ version: '1.13'
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
134
  - - "~>"
135
135
  - !ruby/object:Gem::Version
136
- version: 1.10.2
136
+ version: '1.13'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: rubocop-rspec
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: 2.2.0
143
+ version: '2.8'
144
144
  type: :development
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
- version: 2.2.0
150
+ version: '2.8'
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: simplecov
153
153
  requirement: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - - "~>"
156
156
  - !ruby/object:Gem::Version
157
- version: 0.21.0
157
+ version: '0.21'
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: 0.21.0
164
+ version: '0.21'
165
165
  description: A library to make easily to build integrations
166
166
  email:
167
167
  - danilo.carolino@qflash.com.br
@@ -183,13 +183,13 @@ files:
183
183
  - spec/flash/integration/response_spec.rb
184
184
  - spec/flash_integration_spec.rb
185
185
  - spec/spec_helper.rb
186
- homepage: https://github.com/Quasar-Flash/flash-integration-ruby
186
+ homepage: https://github.com/Quasar-Flash/flash_integration
187
187
  licenses:
188
188
  - MIT
189
189
  metadata:
190
- changelog_uri: https://github.com/Quasar-Flash/flash-integration-ruby/blob/master/CHANGELOG.md
191
- source_code_uri: https://github.com/Quasar-Flash/flash-integration-ruby
192
- bug_tracker_uri: https://github.com/Quasar-Flash/flash-integration-ruby/issues
190
+ changelog_uri: https://github.com/Quasar-Flash/flash_integration/blob/master/CHANGELOG.md
191
+ source_code_uri: https://github.com/Quasar-Flash/flash_integration
192
+ bug_tracker_uri: https://github.com/Quasar-Flash/flash_integration/issues
193
193
  post_install_message:
194
194
  rdoc_options: []
195
195
  require_paths:
@@ -198,14 +198,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: '2.5'
201
+ version: '2.7'
202
202
  required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  requirements:
204
204
  - - ">="
205
205
  - !ruby/object:Gem::Version
206
206
  version: '0'
207
207
  requirements: []
208
- rubygems_version: 3.2.16
208
+ rubygems_version: 3.3.3
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: Flash Integration Library