lmb-developers 1.2.5 → 1.2.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c041717903419dce19db99de43a58f72f0cb20924f47282b026ab58d71cb151b
4
- data.tar.gz: b8f0184e994b1352542cd2587260bc5e2a3036aea3449ed9806e63e05a4427c1
3
+ metadata.gz: 116335cfce5fee58cb5ec019c2cb6c09338ecaa11df65eaae3edb8b1750b3190
4
+ data.tar.gz: 669698a0afe1ff1b34b1a65badd15efcb511365a131dbdef80c6d26c764b8258
5
5
  SHA512:
6
- metadata.gz: f543c20e80be8b711b9df5f470b0b006b3a73e8dd307b7590d464f2eb2b39403b25af3de995c591d677d2355dfb5d8ecb1ac80aa5961805371e48a8074b0f89d
7
- data.tar.gz: c6129fccfb03505e830f8f29e6130e4c5ffddbc0ad4edb8b65d9ec2ae0967a53b218777b38a665428e5b516945addb6f362a76eebad3971fca63a38b59b2f532
6
+ metadata.gz: 21589eae4e89f9538f06ab1478ccfb2be7beaecfbcdc6ce4c83c50a496b338e7aceed0b2d6e4eb75db2b5ae2a28a9af8e06fba5033858911442fbc0b9bf8bf18
7
+ data.tar.gz: 3633e10e988f6451687733bbba7ab483f10f0f12b669be1c70d4faf979c18a0e54de80c385ff4aeba9f648aeb398ef279222835fced83e266a60588de8caaf9e
@@ -0,0 +1,20 @@
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
@@ -0,0 +1,33 @@
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
+ }
@@ -84,43 +84,17 @@ module Lmb
84
84
  end
85
85
 
86
86
  def self.redemption(redemptions)
87
- puts "-"*25
88
- puts "entrou no metodo"
89
- puts "-"*25
90
87
  uri = URI.parse("#{configuration.url}#{SCORING_REDEMPTION_PATH}")
91
- puts "-"*25
92
- puts uri = URI.parse("#{configuration.url}#{SCORING_REDEMPTION_PATH}")
93
- puts "-"*25
94
88
  request = Net::HTTP::Post.new(uri)
95
- puts "-"*25
96
- puts request = Net::HTTP::Post.new(uri)
97
- puts "-"*25
98
89
  request['Apikey'] = configuration.api_key.to_s
99
- puts "-"*25
100
- puts request['Apikey'] = configuration.api_key.to_s
101
- puts "-"*25
102
90
  request['Cache-Control'] = 'no-cache'
103
- puts "-"*25
104
- puts request['Cache-Control'] = 'no-cache'
105
- puts "-"*25
106
- request.body = redemptions
107
- puts "-"*25
108
- puts request.body = redemptions
109
- puts "-"*25
91
+ request.body = redemptions.to_json
110
92
  req_options = {
111
93
  use_ssl: uri.scheme == 'https'
112
94
  }
113
- puts "-"*25
114
- puts req_options = {
115
- use_ssl: uri.scheme == 'https'
116
- }
117
- puts "-"*25
118
95
  response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
119
96
  http.request(request)
120
97
  end
121
- puts "-"*25
122
- puts response.code.to_i
123
- puts "-"*25
124
98
  response.code.to_i == 202
125
99
  rescue StandardError => exception
126
100
  puts "-"*25
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'lmb-developers'
3
- s.version = '1.2.5'
3
+ s.version = '1.2.6'
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.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - PRTE - Tecnologia e Soluções
@@ -17,6 +17,8 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - ".devcontainer/Dockerfile"
21
+ - ".devcontainer/devcontainer.json"
20
22
  - ".gitignore"
21
23
  - README.md
22
24
  - Rakefile