oplog_event_handler 0.0.1 → 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/oplog_event_handler.rb +10 -2
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjBkYzI1Y2NjNGIyMDg4NmU0MTNhMGNjMTc3ZDMxMDgxZGM3NGYyZA==
4
+ YmM3NGYxNzRkYmExNzI4MWFlM2UzOGMyOTlkMzUyY2U4NzhjNjdmNw==
5
5
  data.tar.gz: !binary |-
6
- OTIyZWEyMDJmY2RkZjUyMjRjMmFhM2VhMzdlYzAxNDIxMDZlOWMyMQ==
6
+ MzQyMGM2MTIzMTU2ZDUyNWRhYWEwZjBjODQ0ZDgyZDgyNGQwMGQxNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTcxYjhlMzk3OWYxYmUwMTQxMjIwZmQzYWIzYTU5MzU5MDVkNmUwMDZmMDdi
10
- ZGQzZTFjZjk0ZGJmNzQ1MzY0NTNiNTc2ZjM4MjMxMGFkNTA1NTAzYTY5OTIy
11
- MjY2ZDkzM2Y0YTRlODgzYWEwZTlkYWY1NDVmNWUxZjdmODMxZGQ=
9
+ NDUyYjljYWUxNzZjZTYwN2YzNGY3NDA0ZmQ1OTg4MWZiOGU1ZWFlNzU0ZGMz
10
+ OTQ4OTQwYTI3YTM0N2I0MmIzMmM3MGVlMmEzODQwNDdkNWZkZGY1ZDAzODA3
11
+ Y2U2ZTdhNjQxZjI1NGQyOWQxMjk0ODk2MDFkYzY4YjE4MmJiMmU=
12
12
  data.tar.gz: !binary |-
13
- OTQ1ZDM0YmYzZWJkOWEyZWZmOTZkMzE0YzMwMDllOTU2YjVkY2MwMzlmMzdh
14
- ZTBkMTkzMWEyYTdjNjk4NzZhYmU5NWQyOTI5ZDE1YTI2YzJlNjUwNzhmOTJl
15
- MzkwMDBlYTkxYzIyY2QyNTdhMTA5NzBjNjZmYThlZWYzZDM4ZTc=
13
+ ZjlmZDBjNmJlM2Q2ZDg4NDhiZGNmMmYwOTlhMTk1YzEyOWVkYTI1NmMyNzk0
14
+ NDJlY2RlODhkZmViMDY1YTJhN2JlYTljYjQ4OWJlYWNmZTViY2IxYTg0NDAz
15
+ ZDZiN2ZkOTIzZjI4Zjk0MjEzZDQzN2RlNjIwMmQ4MGU5ZjkyNTk=
@@ -31,6 +31,14 @@ module OplogEventHandler
31
31
  @db_name
32
32
  end
33
33
 
34
+ def set_oplog_name(name)
35
+ @oplog_name = name
36
+ end
37
+
38
+ def oplog_name
39
+ @oplog_name || 'oplog.rs'
40
+ end
41
+
34
42
  def for_db(db)
35
43
  @db_name = db
36
44
  yield
@@ -148,7 +156,7 @@ module OplogEventHandler
148
156
  end
149
157
 
150
158
  def tail
151
- oplog_coll = Mongo::Connection.new(self.class.host, self.class.port)['local']['oplog.rs']
159
+ oplog_coll = Mongo::Connection.new(self.class.host, self.class.port)['local'][self.class.oplog_name]
152
160
  start = oplog_coll.count
153
161
  tailable_oplog = Mongo::Cursor.new(oplog_coll, :timeout => false, :tailable => true).skip(start)
154
162
  while not tailable_oplog.closed?
@@ -160,4 +168,4 @@ module OplogEventHandler
160
168
  end
161
169
  end
162
170
  end
163
- end
171
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oplog_event_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathieu Laporte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-18 00:00:00.000000000 Z
11
+ date: 2014-01-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Just parse the oplog
14
14
  email: mathieu.laporte+rubygem@gmail.com
@@ -36,8 +36,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  version: '0'
37
37
  requirements: []
38
38
  rubyforge_project:
39
- rubygems_version: 2.0.3
39
+ rubygems_version: 2.0.6
40
40
  signing_key:
41
41
  specification_version: 4
42
42
  summary: oplog parser
43
43
  test_files: []
44
+ has_rdoc: