bloomy 0.11.4 → 0.11.5
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/bloomy/configuration.rb +13 -2
- data/lib/bloomy/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d071b4ec08a9bf16f615031f8bf83901546630686140df746419c8f1c1740673
|
4
|
+
data.tar.gz: 76788aef37b387aaaf778485764cd1155db7b08ac0dce50c697bf4ffa49c0d86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12d11081a1bd2789961c9862724dffa5cac215855086c995eecc5753ddaaa07e5f51100a9bb153432654e4cfc2caa9d23e68b0ce3036913ef44f7a91cfa68c21
|
7
|
+
data.tar.gz: 233d127739f77c8c4d608a979fb0bc53277945f2af6d1f62c00081c668a22aa3741015d5b1c2d43f08c7c2f4988e41c03377c7f846eda6bdd65e06a24d44304a
|
data/lib/bloomy/configuration.rb
CHANGED
@@ -44,8 +44,19 @@ module Bloomy
|
|
44
44
|
# @return [String] the fetched API key
|
45
45
|
def fetch_api_key(username, password)
|
46
46
|
conn = Faraday.new(url: "https://app.bloomgrowth.com")
|
47
|
-
response = conn.post("/Token"
|
48
|
-
|
47
|
+
response = conn.post("/Token") do |req|
|
48
|
+
req.headers["Content-Type"] = "application/x-www-form-urlencoded"
|
49
|
+
req.body = URI.encode_www_form(
|
50
|
+
grant_type: "password",
|
51
|
+
userName: username,
|
52
|
+
password: password
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
unless response.success?
|
57
|
+
raise "Failed to fetch API key: #{response.status} - #{response.body}"
|
58
|
+
end
|
59
|
+
|
49
60
|
JSON.parse(response.body)["access_token"]
|
50
61
|
end
|
51
62
|
|
data/lib/bloomy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bloomy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franccesco Orozco
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-23 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: faraday
|
@@ -38,7 +37,6 @@ dependencies:
|
|
38
37
|
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
39
|
version: '3.13'
|
41
|
-
description:
|
42
40
|
email:
|
43
41
|
- franccesco@thatai.dev
|
44
42
|
executables:
|
@@ -77,7 +75,6 @@ licenses:
|
|
77
75
|
metadata:
|
78
76
|
homepage_uri: https://github.com/franccesco/bloomy
|
79
77
|
rubygems_mfa_required: 'true'
|
80
|
-
post_install_message:
|
81
78
|
rdoc_options: []
|
82
79
|
require_paths:
|
83
80
|
- lib
|
@@ -92,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
89
|
- !ruby/object:Gem::Version
|
93
90
|
version: '0'
|
94
91
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
96
|
-
signing_key:
|
92
|
+
rubygems_version: 3.6.2
|
97
93
|
specification_version: 4
|
98
94
|
summary: Manage your Bloom Growth account from the command line.
|
99
95
|
test_files: []
|