app_manager 0.1.1 → 0.1.2
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/.github/workflows/ruby.yml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -2
- data/lib/app_manager/client.rb +6 -4
- data/lib/app_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9e83adb4c7828d26d8c6479837f58ea9e168726669c7a1d68f21e717a7802a4
|
|
4
|
+
data.tar.gz: 2d8f6811b2c09d80d268289b7e1b745583d1cec54b7bd7e9384544d3fa516caf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fdf9b28f822093de96a8dd4f4324e1dd10c543a6667f9b76cc959ebe3ca2e65736b37388db7c400f3b08b441637c97ec39497001e32e597e073f85545319491b
|
|
7
|
+
data.tar.gz: 44d81124d5e88947f08648381705a309d86b8f789c450760c2f589ae585f63ac4dd02aaf9e640eafd585acfe8bc74ca59d8a6c86df346ead925de06854736df4
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -23,15 +23,15 @@ jobs:
|
|
|
23
23
|
runs-on: ubuntu-latest
|
|
24
24
|
strategy:
|
|
25
25
|
matrix:
|
|
26
|
-
ruby-version: ['2.7'
|
|
26
|
+
ruby-version: ['2.7']
|
|
27
27
|
|
|
28
28
|
steps:
|
|
29
|
-
- uses: actions/checkout@
|
|
29
|
+
- uses: actions/checkout@v2
|
|
30
30
|
- name: Set up Ruby
|
|
31
31
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
32
32
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
33
|
-
|
|
34
|
-
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
|
|
33
|
+
uses: ruby/setup-ruby@v1
|
|
34
|
+
# uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
|
|
35
35
|
with:
|
|
36
36
|
ruby-version: ${{ matrix.ruby-version }}
|
|
37
37
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -23,7 +23,9 @@ Step 2) Execute following in terminal:
|
|
|
23
23
|
|
|
24
24
|
Step 3) You must have to set ENV variable with key 'APP_MANAGER_ACCESS_TOKEN' in your application.yml or .env file like this:
|
|
25
25
|
|
|
26
|
-
APP_MANAGER_ACCESS_TOKEN: 'XXXXXXXXXXXXXXXXXXX'
|
|
26
|
+
APP_MANAGER_ACCESS_TOKEN: 'XXXXXXXXXXXXXXXXXXX'
|
|
27
|
+
APP_MANAGER_API_URL: 'https://XXXXXXXX.com'
|
|
28
|
+
|
|
27
29
|
|
|
28
30
|
## Usage
|
|
29
31
|
|
|
@@ -33,7 +35,7 @@ APP_MANAGER_ACCESS_TOKEN: 'XXXXXXXXXXXXXXXXXXX'
|
|
|
33
35
|
Then, initialize app_manager instance like with App Manager Portal access:
|
|
34
36
|
|
|
35
37
|
```ruby
|
|
36
|
-
ob = AppManager::Client.new(ENV'APP_MANAGER_ACCESS_TOKEN')
|
|
38
|
+
ob = AppManager::Client.new(ENV['APP_MANAGER_ACCESS_TOKEN'])
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
To get banners use this command:
|
data/lib/app_manager/client.rb
CHANGED
|
@@ -5,16 +5,18 @@ module AppManager
|
|
|
5
5
|
class Client
|
|
6
6
|
include HTTParty
|
|
7
7
|
include AppManager::Client::Connection
|
|
8
|
-
|
|
8
|
+
include AppManager::Client::Banners
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
# debug_output $stderr if Rails.env.development?
|
|
12
|
+
# base_uri "https://app-manager.hulkapps.com/api"
|
|
13
|
+
format :json
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def initialize(access_token = nil)
|
|
17
17
|
access_token ||= ENV["APP_MANAGER_ACCESS_TOKEN"]
|
|
18
|
+
hostport = ENV['APP_MANAGER_API_URL'] || 'https://app-manager.hulkapps.com'
|
|
19
|
+
self.class.base_uri "#{hostport}/api"
|
|
18
20
|
self.class.default_options.merge!(headers: { 'token' => "#{access_token}" })
|
|
19
21
|
end
|
|
20
22
|
|
data/lib/app_manager/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: app_manager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hulkapps
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-04-
|
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|