slack_export 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/slack_export/exporter.rb +9 -5
- data/lib/slack_export/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 41c94a6b1cf9514ab099cf59e459e848636d62e997cf51326930eb288d0b595d
|
4
|
+
data.tar.gz: 96e7efde96ac1972d0a11d30c41b5974ab43499c46f32b81411068e09878eec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c7df081fddab19ba2b7b63fb8bee965219661abe130ccbde3738a18f09be3af95bcadd760a7f7ffd166eccf1a853ccfc2404d03874629399b9d54d83bfac348
|
7
|
+
data.tar.gz: 467d6aa3756bbd132c4070750c55a25558e09d6197ff39fc8548c52e51abbcbcd33ab96444dd0a7a773cab2b47996d153578a6bc152624d358b4361cab3096ad
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require 'slack_export/slack_client'
|
2
|
+
require 'json'
|
3
|
+
require 'zip'
|
4
4
|
|
5
5
|
module SlackExport
|
6
6
|
class Exporter
|
@@ -12,7 +12,7 @@ module SlackExport
|
|
12
12
|
@client = SlackClient.new(api_key, channel)
|
13
13
|
@channel = channel
|
14
14
|
@base_path = base_path
|
15
|
-
|
15
|
+
@logger = logger || self.logger
|
16
16
|
end
|
17
17
|
|
18
18
|
def export
|
@@ -47,6 +47,10 @@ module SlackExport
|
|
47
47
|
zip.add(channels_filename, channels_path)
|
48
48
|
zip.add(messages_sub_path, messages_path)
|
49
49
|
end
|
50
|
+
|
51
|
+
# cleanup
|
52
|
+
File.delete(users_path, messages_path, channels_path)
|
53
|
+
Dir.delete(messages_base_path)
|
50
54
|
end
|
51
55
|
|
52
56
|
def export_path
|
@@ -88,7 +92,7 @@ module SlackExport
|
|
88
92
|
end
|
89
93
|
|
90
94
|
def log(message)
|
91
|
-
logger.call message if logger
|
95
|
+
@logger.call message if @logger
|
92
96
|
end
|
93
97
|
|
94
98
|
end
|
data/lib/slack_export/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack_export
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Tucker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubyzip
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.
|
117
|
+
rubygems_version: 2.7.9
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Export private Slack channels
|