peek-moped 1.0.2 → 1.0.3

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: 16afba790704ccf8ea686a6bda3730ab0f46cc28
4
- data.tar.gz: 3d23cd27ebfc284231d4d3c6484b4826fb2e2fba
3
+ metadata.gz: 01c781815c55a953958ed7af7ac1e23ec7957aff
4
+ data.tar.gz: 90c292f395657a3f6e11bc910fdc8d7dc1b2eff3
5
5
  SHA512:
6
- metadata.gz: 9f184e562257ca7782c9beca93d32cbe49f7dfacee9b81e57f0483ca89e5b86a3025fa4bfb567ecfe2d9afad6a53594566aa5bb04024841f7c48d799379f8892
7
- data.tar.gz: 66018e2664b1e0e9fa5a5bad36789d42778c36fa2a13c34d0d4d6dfbba14d634a5936a89f4343c8642fac25b7071d4cdcde80f16cbbf9077f791b8d2dca9a556
6
+ metadata.gz: 60feb86f394d27f0a665bc9a57293f51a334efbfcc5d20fc11b0ce749afdf1246cf6095499b9dc537c3ecd110e0f00f971b18a5cb11648c149ec981d6c968a2c
7
+ data.tar.gz: a81d0dd583089414cf10038f214e1c8f91efb7435717ead50eb009a00955401e99aa67c40c51f96c793006af36e433bd3089078b6f61b7628945eb05d84fd29a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.0.3
2
+ - Fix undefined method 'database' for Moped::Protocol::KillCursors
3
+
1
4
  # 1.0.2
2
5
 
3
6
  - Write ObjectId in mongodb query format (previously was in binary)
@@ -1,5 +1,5 @@
1
1
  module Peek
2
2
  module Moped
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
@@ -55,32 +55,38 @@ module Peek
55
55
  end
56
56
 
57
57
  def cmd_collection_name cmd
58
- if %w(admin config local).include? cmd.database
59
- name = "<span class=\"peek-moped-system-db\">#{cmd.database}</span>."
58
+ if not cmd.respond_to? :database
59
+ name = "#{cmd.class.name} "
60
+ elsif %w(admin config local).include? cmd.database
61
+ name = %Q(<span class="peek-moped-system-db">#{cmd.database}</span>.)
60
62
  else
61
63
  name = ''
62
64
  end
63
65
 
64
- if cmd.collection == '$cmd'
65
- if cmd.selector.has_key? :getlasterror
66
- name << 'getLastError()'
67
- elsif cmd.selector.has_key? :count
68
- name << "#{cmd.selector[:count]}.count()"
69
- elsif cmd.selector.has_key? :aggregate
70
- name << "#{cmd.selector[:aggregate]}.aggregate(#{cmd.selector[:pipeline].map{|p| p.keys}.flatten.join(', ')})"
71
- elsif cmd.selector.has_key? :mapreduce
72
- name << "#{cmd.selector[:mapreduce]}.mapReduce(#{cmd.selector[:out].to_s})"
73
- elsif cmd.selector.has_key? :findAndModify
74
- name << "#{cmd.selector[:findAndModify]}.findAndModify()"
75
- elsif cmd.selector.has_key? :geoNear
76
- name << "#{cmd.selector[:geoNear]}.geoNear()"
77
- elsif cmd.selector.has_key? :ismaster
78
- name << "isMaster()"
66
+ if cmd.respond_to? :collection
67
+ if cmd.collection == '$cmd'
68
+ if not cmd.respond_to? :selector
69
+ name << '$cmd'
70
+ elsif cmd.selector.has_key? :getlasterror
71
+ name << 'getLastError()'
72
+ elsif cmd.selector.has_key? :count
73
+ name << "#{cmd.selector[:count]}.count()"
74
+ elsif cmd.selector.has_key? :aggregate
75
+ name << "#{cmd.selector[:aggregate]}.aggregate(#{cmd.selector[:pipeline].map{|p| p.keys}.flatten.join(', ')})"
76
+ elsif cmd.selector.has_key? :mapreduce
77
+ name << "#{cmd.selector[:mapreduce]}.mapReduce(#{cmd.selector[:out].to_s})"
78
+ elsif cmd.selector.has_key? :findAndModify
79
+ name << "#{cmd.selector[:findAndModify]}.findAndModify()"
80
+ elsif cmd.selector.has_key? :geoNear
81
+ name << "#{cmd.selector[:geoNear]}.geoNear()"
82
+ elsif cmd.selector.has_key? :ismaster
83
+ name << 'isMaster()'
84
+ else
85
+ name << '$cmd'
86
+ end
79
87
  else
80
- name << '$cmd'
88
+ name << cmd.collection
81
89
  end
82
- else
83
- name << cmd.collection
84
90
  end
85
91
 
86
92
  name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peek-moped
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Chertorogov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-09 00:00:00.000000000 Z
11
+ date: 2013-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: peek