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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2bc9b609ad56354f4831431a9adaa3ae1ec7c72c
4
- data.tar.gz: 95dbeb7ff4c03c13aa6cf1c9096229cacec4c1ab
2
+ SHA256:
3
+ metadata.gz: 41c94a6b1cf9514ab099cf59e459e848636d62e997cf51326930eb288d0b595d
4
+ data.tar.gz: 96e7efde96ac1972d0a11d30c41b5974ab43499c46f32b81411068e09878eec6
5
5
  SHA512:
6
- metadata.gz: b8a21b02a8ca0abf09d9b0c5d80c34a64b2d02cb5b7246ea974adfce199a1133297e81d67b11e3a8ee76094bae2475ed9427a88e4bbc4125a1e02fcb06c2991f
7
- data.tar.gz: 79ef1d173294a27433add9aa8765ac0d6eaf47a608452f00bd3867aec24c26854f55f9e922f60cec606d3932990f191aaa7f3388f96f1af1f9c2fa94b48dc4fe
6
+ metadata.gz: 8c7df081fddab19ba2b7b63fb8bee965219661abe130ccbde3738a18f09be3af95bcadd760a7f7ffd166eccf1a853ccfc2404d03874629399b9d54d83bfac348
7
+ data.tar.gz: 467d6aa3756bbd132c4070750c55a25558e09d6197ff39fc8548c52e51abbcbcd33ab96444dd0a7a773cab2b47996d153578a6bc152624d358b4361cab3096ad
@@ -1,6 +1,6 @@
1
- require "slack_export/slack_client"
2
- require "json"
3
- require "zip"
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
- self.logger = logger
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
@@ -1,3 +1,3 @@
1
1
  module SlackExport
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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: 2015-08-05 00:00:00.000000000 Z
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: '1.0'
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: '1.0'
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.4.8
117
+ rubygems_version: 2.7.9
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Export private Slack channels