maestrano 1.0.5 → 1.0.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 +4 -4
- data/lib/maestrano.rb +4 -0
- data/lib/maestrano/version.rb +1 -1
- data/maestrano.gemspec +1 -1
- data/test/maestrano/maestrano_test.rb +7 -8
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f0377826614c2469d948ba76c3843da79486b01
|
4
|
+
data.tar.gz: 922b23eaa85a71423000b00863fe311981339d6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db2b6c5d2f991d7e090c8a8030f281120250c73aed3cda810d6292333295b145feecad8322d3ee36fe286d16bb63d6722313df4f87fd089264443a10b59a76c
|
7
|
+
data.tar.gz: e2804fdc0470ad512944e3fd4f050c887fd7a8384030520e0f3f1cd2193c200c894251d931ddf5fb9adfd9a2443b0e7c2aee0dede09ef3f1aa48412af8b66e0a
|
data/lib/maestrano.rb
CHANGED
@@ -127,6 +127,10 @@ module Maestrano
|
|
127
127
|
raise "Error while fetching dynamic configuration: #{e}. Backtrace: #{e.backtrace}"
|
128
128
|
end
|
129
129
|
|
130
|
+
def self.find_by_app_id_and_app_key(app_id, app_key)
|
131
|
+
Maestrano.configs.find { |_,v| v.param('api.id') == app_id && v.param('api.key') == app_key }.first rescue nil
|
132
|
+
end
|
133
|
+
|
130
134
|
class Configuration
|
131
135
|
attr_accessor :environment, :app, :sso, :api, :webhook, :connec
|
132
136
|
|
data/lib/maestrano/version.rb
CHANGED
data/maestrano.gemspec
CHANGED
@@ -95,10 +95,9 @@ class MaestranoTest < Test::Unit::TestCase
|
|
95
95
|
context "with environment params" do
|
96
96
|
should "return the right test parameters" do
|
97
97
|
Maestrano.reset!
|
98
|
-
Maestrano.configure { |config| config.environment = '
|
99
|
-
|
98
|
+
Maestrano.configure { |config| config.environment = 'local' }
|
100
99
|
['api.host', 'api.base', 'sso.idp', 'sso.name_id_format', 'sso.x509_certificate', 'connec.host', 'connec.base_path'].each do |parameter|
|
101
|
-
assert_equal Maestrano::Configuration::EVT_CONFIG['
|
100
|
+
assert_equal Maestrano::Configuration::EVT_CONFIG['local'][parameter], Maestrano.param(parameter)
|
102
101
|
end
|
103
102
|
end
|
104
103
|
|
@@ -231,11 +230,11 @@ class MaestranoTest < Test::Unit::TestCase
|
|
231
230
|
|
232
231
|
context "with environment params" do
|
233
232
|
should "return the right test parameters" do
|
234
|
-
@preset = '
|
235
|
-
Maestrano[@preset].configure { |config| config.environment = '
|
233
|
+
@preset = 'local'
|
234
|
+
Maestrano[@preset].configure { |config| config.environment = 'local' }
|
236
235
|
|
237
236
|
['api.host','api.base','sso.idp', 'sso.name_id_format', 'sso.x509_certificate', 'connec.host','connec.base_path'].each do |parameter|
|
238
|
-
assert_equal Maestrano::Configuration::EVT_CONFIG['
|
237
|
+
assert_equal Maestrano::Configuration::EVT_CONFIG['local'][parameter], Maestrano[@preset].param(parameter)
|
239
238
|
end
|
240
239
|
end
|
241
240
|
|
@@ -410,11 +409,11 @@ class MaestranoTest < Test::Unit::TestCase
|
|
410
409
|
|
411
410
|
context "with environment params" do
|
412
411
|
should "return the right test parameters" do
|
413
|
-
Maestrano.configure { |config| config.environment = '
|
412
|
+
Maestrano.configure { |config| config.environment = 'local' }
|
414
413
|
|
415
414
|
['api_host','api_base','sso_name_id_format', 'sso_x509_certificate'].each do |parameter|
|
416
415
|
key = Maestrano::Configuration.new.legacy_param_to_new(parameter)
|
417
|
-
assert_equal Maestrano::Configuration::EVT_CONFIG['
|
416
|
+
assert_equal Maestrano::Configuration::EVT_CONFIG['local'][key], Maestrano.param(parameter)
|
418
417
|
end
|
419
418
|
end
|
420
419
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maestrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maestrano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
173
|
+
version: 1.8.1
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1.
|
180
|
+
version: 1.8.1
|
181
181
|
description: Maestrano is the next generation marketplace for SME applications. See
|
182
182
|
https://maestrano.com for details.
|
183
183
|
email:
|
@@ -304,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
304
304
|
version: '0'
|
305
305
|
requirements: []
|
306
306
|
rubyforge_project:
|
307
|
-
rubygems_version: 2.6.
|
307
|
+
rubygems_version: 2.6.14
|
308
308
|
signing_key:
|
309
309
|
specification_version: 4
|
310
310
|
summary: Ruby bindings for the Maestrano API
|