lmb-developers 1.2.3 → 1.2.4
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/lib/lmb/developers/loyalty.rb +29 -0
- data/lmb-developers.gemspec +1 -1
- metadata +1 -3
- data/.devcontainer/Dockerfile +0 -20
- data/.devcontainer/devcontainer.json +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce218988bcf4b7711e62904275feba9655196bf0af64897d3dfd50b88968398c
|
4
|
+
data.tar.gz: 379238f9fc28bd54d8b7cc54a5e2f20b1e489e97977eef50640c8c2258017a75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d9dabfd2b6423f86ffb15d807c0eb38140cb8eb5ea4b14e2b32baa4863b5d0b36eb8970a2ff46a7223bd713496c7e72e69aa6b24400035b2979dc8a85357c63
|
7
|
+
data.tar.gz: 64dab8cd523325f6101c7a2a1e197f1b07991b05cf06bb97f2c1500d03c68d0733e89e2dd3b62d035535d49c63435b03805424d132df20281fb9a9d7b9d4c16a
|
@@ -84,19 +84,48 @@ module Lmb
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def self.redemption(redemptions)
|
87
|
+
puts "-"*25
|
88
|
+
puts "entrou no metodo"
|
89
|
+
puts "-"*25
|
87
90
|
uri = URI.parse("#{configuration.url}#{SCORING_REDEMPTION_PATH}")
|
91
|
+
puts "-"*25
|
92
|
+
puts uri = URI.parse("#{configuration.url}#{SCORING_REDEMPTION_PATH}")
|
93
|
+
puts "-"*25
|
88
94
|
request = Net::HTTP::Post.new(uri)
|
95
|
+
puts "-"*25
|
96
|
+
puts request = Net::HTTP::Post.new(uri)
|
97
|
+
puts "-"*25
|
89
98
|
request['Apikey'] = configuration.api_key.to_s
|
99
|
+
puts "-"*25
|
100
|
+
puts request['Apikey'] = configuration.api_key.to_s
|
101
|
+
puts "-"*25
|
90
102
|
request['Cache-Control'] = 'no-cache'
|
103
|
+
puts "-"*25
|
104
|
+
puts request['Cache-Control'] = 'no-cache'
|
105
|
+
puts "-"*25
|
91
106
|
request.body = redemptions
|
107
|
+
puts "-"*25
|
108
|
+
puts request.body = redemptions
|
109
|
+
puts "-"*25
|
92
110
|
req_options = {
|
93
111
|
use_ssl: uri.scheme == 'https'
|
94
112
|
}
|
113
|
+
puts "-"*25
|
114
|
+
puts req_options = {
|
115
|
+
use_ssl: uri.scheme == 'https'
|
116
|
+
}
|
117
|
+
puts "-"*25
|
95
118
|
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
|
96
119
|
http.request(request)
|
97
120
|
end
|
121
|
+
puts "-"*25
|
122
|
+
puts response.code.to_i
|
123
|
+
puts "-"*25
|
98
124
|
response.code.to_i == 202
|
99
125
|
rescue StandardError => exception
|
126
|
+
puts "-"*25
|
127
|
+
puts "chegou no erro"
|
128
|
+
puts "-"*25
|
100
129
|
exception
|
101
130
|
end
|
102
131
|
end
|
data/lmb-developers.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'lmb-developers'
|
3
|
-
s.version = '1.2.
|
3
|
+
s.version = '1.2.4'
|
4
4
|
s.date = '2019-05-19'
|
5
5
|
s.summary = "Consume APIs at Leroy Merlin Brazil Developer's Portal"
|
6
6
|
s.description = "Gem to consume APIs available at Leroy Merlin Brazil Developer's Portal https://developers.leroymerlin.com.br"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lmb-developers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PRTE - Tecnologia e Soluções
|
@@ -17,8 +17,6 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- ".devcontainer/Dockerfile"
|
21
|
-
- ".devcontainer/devcontainer.json"
|
22
20
|
- ".gitignore"
|
23
21
|
- README.md
|
24
22
|
- Rakefile
|
data/.devcontainer/Dockerfile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/ruby/.devcontainer/base.Dockerfile
|
2
|
-
|
3
|
-
# [Choice] Ruby version: 3, 3.0, 2, 2.7, 2.6
|
4
|
-
ARG VARIANT="3.0"
|
5
|
-
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
|
6
|
-
|
7
|
-
# [Option] Install Node.js
|
8
|
-
ARG INSTALL_NODE="true"
|
9
|
-
ARG NODE_VERSION="lts/*"
|
10
|
-
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
11
|
-
|
12
|
-
# [Optional] Uncomment this section to install additional OS packages.
|
13
|
-
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
14
|
-
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
15
|
-
|
16
|
-
# [Optional] Uncomment this line to install additional gems.
|
17
|
-
# RUN gem install <your-gem-names-here>
|
18
|
-
|
19
|
-
# [Optional] Uncomment this line to install global node packages.
|
20
|
-
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
@@ -1,33 +0,0 @@
|
|
1
|
-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
2
|
-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/ruby
|
3
|
-
{
|
4
|
-
"name": "Ruby",
|
5
|
-
"build": {
|
6
|
-
"dockerfile": "Dockerfile",
|
7
|
-
"args": {
|
8
|
-
// Update 'VARIANT' to pick a Ruby version: 3, 3.0, 2, 2.7, 2.6
|
9
|
-
"VARIANT": "3",
|
10
|
-
// Options
|
11
|
-
"INSTALL_NODE": "false",
|
12
|
-
"NODE_VERSION": "lts/*"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
|
16
|
-
// Set *default* container specific settings.json values on container create.
|
17
|
-
"settings": {},
|
18
|
-
|
19
|
-
// Add the IDs of extensions you want installed when the container is created.
|
20
|
-
"extensions": [
|
21
|
-
"rebornix.Ruby"
|
22
|
-
],
|
23
|
-
|
24
|
-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
25
|
-
// "forwardPorts": [],
|
26
|
-
|
27
|
-
// Use 'postCreateCommand' to run commands after the container is created.
|
28
|
-
// "postCreateCommand": "ruby --version",
|
29
|
-
|
30
|
-
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
31
|
-
"remoteUser": "vscode"
|
32
|
-
|
33
|
-
}
|