rightscale-nanite-dev 0.4.1.15 → 0.4.1.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -74,7 +74,7 @@ module Nanite
74
74
  Nanite::Log.info("SEND #{request.to_s([:from, :scope, :tags, :target])}")
75
75
  amq.queue(target).publish(serializer.dump(request), :persistent => request.persistent)
76
76
  else
77
- Nanite::Log.warn("RECV NOT AUTHORIZED #{request.to_s}")
77
+ Nanite::Log.error("RECV NOT AUTHORIZED #{request.to_s}")
78
78
  end
79
79
  ensure
80
80
  request.target = old_target
@@ -71,7 +71,7 @@ module Nanite
71
71
  # Retrieve nanites implementing given service and exposing given tags
72
72
  def nanites_ids_for(request)
73
73
  keys = request.tags ? request.tags.dup : []
74
- keys << request.service if request.service
74
+ keys << request.type if request.type
75
75
  keys.compact!
76
76
  return {} if keys.empty?
77
77
  log_redis_error { @redis.set_intersect(keys) }
@@ -124,4 +124,4 @@ module Nanite
124
124
  end
125
125
 
126
126
  end
127
- end
127
+ end
@@ -52,9 +52,9 @@ module Nanite
52
52
  data = JSON.load(json)
53
53
  sig = Signature.from_data(data['signature'])
54
54
  certs = @store.get_signer(data['id'])
55
- raise "Failed to check signature for signer #{data['id']}" unless certs.any? { |c| sig.match?(c) }
56
55
  raise "Could not find a cert for signer #{data['id']}" unless certs
57
- certs = [ certs ] unless certs.respond_to?(:each)
56
+ certs = [ certs ] unless certs.respond_to?(:any?)
57
+ raise "Failed to check signature for signer #{data['id']}" unless certs.any? { |c| sig.match?(c) }
58
58
  jsn = data['data']
59
59
  if jsn && @encrypt && data['encrypted']
60
60
  jsn = EncryptedDocument.from_data(jsn).decrypted_data(@key, @cert)
data/lib/nanite.rb CHANGED
@@ -39,7 +39,7 @@ require 'nanite/security/static_certificate_store'
39
39
  require 'nanite/serializer'
40
40
 
41
41
  module Nanite
42
- VERSION = '0.4.1.15' unless defined?(Nanite::VERSION)
42
+ VERSION = '0.4.1.16' unless defined?(Nanite::VERSION)
43
43
 
44
44
  class MapperNotRunning < StandardError; end
45
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rightscale-nanite-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1.15
4
+ version: 0.4.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Zygmuntowicz