maestrano 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a64334938f45947288cdb208fa1aabd196ea9ad6
4
- data.tar.gz: 4f457ee89b936840d1193930f702d51971d40e4f
3
+ metadata.gz: 0f0377826614c2469d948ba76c3843da79486b01
4
+ data.tar.gz: 922b23eaa85a71423000b00863fe311981339d6a
5
5
  SHA512:
6
- metadata.gz: 569142a2fc04140618f7ccf05266b999c8a2618d62a7fdcb4f609376753f90e1328bca03ac9dde3a69d4fbd72eec206e0f5c8d097325ada8557dd0eb9b8b19d3
7
- data.tar.gz: 28d0e46e581528180a0956c725698696f9efaba2265c6c162b5ffaae95ae5e14f67768736eb7ff0cd179bd6329fde88ffaec00443f3eb1be2361bacc56a34a8c
6
+ metadata.gz: 9db2b6c5d2f991d7e090c8a8030f281120250c73aed3cda810d6292333295b145feecad8322d3ee36fe286d16bb63d6722313df4f87fd089264443a10b59a76c
7
+ data.tar.gz: e2804fdc0470ad512944e3fd4f050c887fd7a8384030520e0f3f1cd2193c200c894251d931ddf5fb9adfd9a2443b0e7c2aee0dede09ef3f1aa48412af8b66e0a
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Maestrano
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
  end
@@ -30,5 +30,5 @@ Gem::Specification.new do |s|
30
30
  s.add_development_dependency('rake', '~> 10')
31
31
 
32
32
  s.add_runtime_dependency("uuid", ["~> 2.3"])
33
- s.add_runtime_dependency("nokogiri", [">= 1.5.0"])
33
+ s.add_runtime_dependency("nokogiri", [">= 1.8.1"])
34
34
  end
@@ -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 = 'test' }
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['test'][parameter], Maestrano.param(parameter)
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 = 'test'
235
- Maestrano[@preset].configure { |config| config.environment = 'test' }
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['test'][parameter], Maestrano[@preset].param(parameter)
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 = 'test' }
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['test'][key], Maestrano.param(parameter)
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.5
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-06-28 00:00:00.000000000 Z
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.5.0
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.5.0
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.8
307
+ rubygems_version: 2.6.14
308
308
  signing_key:
309
309
  specification_version: 4
310
310
  summary: Ruby bindings for the Maestrano API