armrest 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +2 -2
- data/lib/armrest/api/auth/base.rb +0 -4
- data/lib/armrest/api/base.rb +0 -7
- data/lib/armrest/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4c4f5c3ad0273b918079782f07fc19afeb79f27643507425170a669b13189f1
|
4
|
+
data.tar.gz: f24c988d305341bdf9dec63cee30b10c4731cc6869944899e30d4720c43a54fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72e496e6289d559f4830922aaf0d88c2ebce9e1d02c4168f27197d10bb164c7ef6470096683ce0a59628c2b60d77df749d0a7bc8eb046c5577f60b2c77c0898a
|
7
|
+
data.tar.gz: c72f975deeeac2c870e9b484aa6d94782ac73bcb11fe3bcdb4d4c9a013d7709b352e567b1f00f6d9746691d5ae3614db3b455ab81241a6ab57678285e82b982c
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.1.3] - 2022-05-03
|
7
|
+
- [#1](https://github.com/boltops-tools/armrest/pull/1) remove camelize
|
8
|
+
|
6
9
|
## [0.1.2] - 2022-01-20
|
7
10
|
- fix syntax error
|
8
11
|
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/armrest.svg)](https://badge.fury.io/rb/armrest)
|
6
6
|
|
7
|
-
A very lightweight Azure library that works with the [Azure REST API](https://docs.microsoft.com/en-us/rest/api/azure/), it is not meant to be
|
7
|
+
A very lightweight Azure library that works with the [Azure REST API](https://docs.microsoft.com/en-us/rest/api/azure/), it is not meant to be exhaustive.
|
8
8
|
|
9
9
|
This was built because there doesn't seem to be a good library out there with the Azure features that [Terraspace](https://terraspace.cloud/) and [Terraspace Plugin Azurerm](https://github.com/boltops-tools/terraspace_plugin_azurerm) wanted to use:
|
10
10
|
|
@@ -45,7 +45,7 @@ Auth:
|
|
45
45
|
|
46
46
|
The auth chain is: app -> msi -> cli
|
47
47
|
|
48
|
-
armrest auth
|
48
|
+
armrest auth
|
49
49
|
|
50
50
|
You can disable MSI with `ARMREST_DISABLE_MSI=1`.
|
51
51
|
|
data/lib/armrest/api/base.rb
CHANGED
@@ -8,7 +8,6 @@ module Armrest::Api
|
|
8
8
|
|
9
9
|
def initialize(options={})
|
10
10
|
@options = options
|
11
|
-
@camelize_request_data = true
|
12
11
|
end
|
13
12
|
|
14
13
|
HTTP_WRITE_METHODS = %w[post patch put delete]
|
@@ -64,7 +63,6 @@ module Armrest::Api
|
|
64
63
|
end
|
65
64
|
|
66
65
|
def build_request(klass, path, data={})
|
67
|
-
data = camelize(data)
|
68
66
|
req = klass.new(path) # url includes query string and uri.path does not, must used url
|
69
67
|
set_headers!(req)
|
70
68
|
|
@@ -83,11 +81,6 @@ module Armrest::Api
|
|
83
81
|
req
|
84
82
|
end
|
85
83
|
|
86
|
-
def camelize(data)
|
87
|
-
return data unless @camelize_request_data
|
88
|
-
data.deep_transform_keys { |k| k.to_s.camelize(:lower) }
|
89
|
-
end
|
90
|
-
|
91
84
|
def standarize_path(path)
|
92
85
|
path = "/#{path}" unless path.starts_with?('/')
|
93
86
|
path = append_api_version(path)
|
data/lib/armrest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: armrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -272,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
|
-
rubygems_version: 3.
|
275
|
+
rubygems_version: 3.3.12
|
276
276
|
signing_key:
|
277
277
|
specification_version: 4
|
278
278
|
summary: Ruby Azure REST API Library
|