pubsub_dumper 0.1.0 → 0.2.0
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/Gemfile.lock +73 -0
- data/README.md +5 -3
- data/bin/pubsub_dumper +8 -4
- data/lib/pubsub_dumper/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca77eb969ac9026deae2a0fba74cd1905b632a0d5e9d2a58610e927229c15322
|
4
|
+
data.tar.gz: c448df4f16218a0a6f75e227122687f18d2590d85a9a06b5e7cae18f9b7e2730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a2d1771e9846e5921c11c76ff2928e3772dc5830df5cb5bfafa00b9f7cba12eea28c3bd2859dac728c42436abe12336fed4ee0571675a3a3024863d811d1dda
|
7
|
+
data.tar.gz: c10682f831c700e4f1da23efc065f60c44b5f0eb4cce29aa0de38b552b96a40cf52f2a725b8cce36ee6ba38b6f646acbebb9dd7feb7d57a5f6e8f99d986e03f0
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
pubsub_dumper (0.1.0)
|
5
|
+
google-cloud-pubsub (= 0.35.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.6.0)
|
11
|
+
public_suffix (>= 2.0.2, < 4.0)
|
12
|
+
concurrent-ruby (1.1.5)
|
13
|
+
faraday (0.15.4)
|
14
|
+
multipart-post (>= 1.2, < 3)
|
15
|
+
google-cloud-core (1.3.0)
|
16
|
+
google-cloud-env (~> 1.0)
|
17
|
+
google-cloud-env (1.0.5)
|
18
|
+
faraday (~> 0.11)
|
19
|
+
google-cloud-pubsub (0.35.0)
|
20
|
+
concurrent-ruby (~> 1.0)
|
21
|
+
google-cloud-core (~> 1.2)
|
22
|
+
google-gax (~> 1.3)
|
23
|
+
grpc-google-iam-v1 (~> 0.6.9)
|
24
|
+
google-gax (1.5.0)
|
25
|
+
google-protobuf (~> 3.2)
|
26
|
+
googleapis-common-protos (>= 1.3.5, < 2.0)
|
27
|
+
googleauth (>= 0.6.2, < 0.10.0)
|
28
|
+
grpc (>= 1.7.2, < 2.0)
|
29
|
+
rly (~> 0.2.3)
|
30
|
+
google-protobuf (3.7.1)
|
31
|
+
googleapis-common-protos (1.3.9)
|
32
|
+
google-protobuf (~> 3.0)
|
33
|
+
googleapis-common-protos-types (~> 1.0)
|
34
|
+
grpc (~> 1.0)
|
35
|
+
googleapis-common-protos-types (1.0.4)
|
36
|
+
google-protobuf (~> 3.0)
|
37
|
+
googleauth (0.8.1)
|
38
|
+
faraday (~> 0.12)
|
39
|
+
jwt (>= 1.4, < 3.0)
|
40
|
+
memoist (~> 0.16)
|
41
|
+
multi_json (~> 1.11)
|
42
|
+
os (>= 0.9, < 2.0)
|
43
|
+
signet (~> 0.7)
|
44
|
+
grpc (1.20.0)
|
45
|
+
google-protobuf (~> 3.7)
|
46
|
+
googleapis-common-protos-types (~> 1.0.0)
|
47
|
+
grpc-google-iam-v1 (0.6.9)
|
48
|
+
googleapis-common-protos (>= 1.3.1, < 2.0)
|
49
|
+
grpc (~> 1.0)
|
50
|
+
jwt (2.1.0)
|
51
|
+
memoist (0.16.0)
|
52
|
+
multi_json (1.13.1)
|
53
|
+
multipart-post (2.1.1)
|
54
|
+
os (1.0.1)
|
55
|
+
public_suffix (3.0.3)
|
56
|
+
rake (10.5.0)
|
57
|
+
rly (0.2.3)
|
58
|
+
signet (0.11.0)
|
59
|
+
addressable (~> 2.3)
|
60
|
+
faraday (~> 0.9)
|
61
|
+
jwt (>= 1.5, < 3.0)
|
62
|
+
multi_json (~> 1.10)
|
63
|
+
|
64
|
+
PLATFORMS
|
65
|
+
ruby
|
66
|
+
|
67
|
+
DEPENDENCIES
|
68
|
+
bundler (~> 1.17)
|
69
|
+
pubsub_dumper!
|
70
|
+
rake (~> 10.0)
|
71
|
+
|
72
|
+
BUNDLED WITH
|
73
|
+
1.17.2
|
data/README.md
CHANGED
@@ -22,10 +22,12 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
+
usage: pubsub_dumper topic subscription [start-utc] [stop-utc]
|
26
|
+
|
25
27
|
```bash
|
26
|
-
pubsub_dumper topic temporary-
|
27
|
-
pubsub_dumper topic temporary-
|
28
|
-
pubsub_dumper topic temporary-
|
28
|
+
pubsub_dumper topic temporary-subscription
|
29
|
+
pubsub_dumper topic temporary-subscription 2019-05-14
|
30
|
+
pubsub_dumper topic temporary-subscription 2019-05-14T15:30 2019-05-14T15:45
|
29
31
|
|
30
32
|
```
|
31
33
|
|
data/bin/pubsub_dumper
CHANGED
@@ -4,13 +4,17 @@ require 'google/cloud/pubsub'
|
|
4
4
|
|
5
5
|
pubsub = Google::Cloud::PubSub.new
|
6
6
|
|
7
|
-
topic_name,
|
8
|
-
abort 'usage: pubsub_dumper topic
|
7
|
+
topic_name, start, stop = ARGV
|
8
|
+
abort 'usage: pubsub_dumper topic [start-utc] [stop-utc]' unless ARGV.size >= 1
|
9
9
|
|
10
10
|
topic = pubsub.topic(topic_name)
|
11
11
|
abort 'no such topic' unless topic
|
12
|
-
|
13
|
-
|
12
|
+
subscription_name = "pubsub_dumper_#{rand(1000)}"
|
13
|
+
abort 'already exists' if topic.subscription(subscription_name)
|
14
|
+
subscription = topic.subscribe(subscription_name, retain_acked: true)
|
15
|
+
at_exit do
|
16
|
+
subscription.delete
|
17
|
+
end
|
14
18
|
|
15
19
|
start_time = start && Time.utc(*start.scan(/\d+/).map(&:to_i))
|
16
20
|
start_time ||= Time.new - 604800
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubsub_dumper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fonsan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-pubsub
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- ".rspec"
|
65
65
|
- ".travis.yml"
|
66
66
|
- Gemfile
|
67
|
+
- Gemfile.lock
|
67
68
|
- README.md
|
68
69
|
- Rakefile
|
69
70
|
- bin/console
|