goodbye_chatwork 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/goodbye_chatwork.rb +7 -2
- data/lib/goodbye_chatwork/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd79d9ad1791ace1aca8e01b0e99939ba788d4a8
|
4
|
+
data.tar.gz: 5c2743edc592a375f1ffe875b4e4c903298467f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a636abf280485000a82afb69bbbebd960b4d98ec2cc7743a6024f9f5779ba46383a2c951f83b38965c085bd664fbbd2f66be8a1c79efa28e206e0dcc9b0948df
|
7
|
+
data.tar.gz: 537a3dbcf29e44f6e3505d813200369b6063d42e4b2541808215e97d7e60f64805ac492fb9e1c4349c97c140d190f951590af84cebaaca566327bace8f2ce86a
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ This is Chatwork(chatwork.com) log exporter. This can be used also when you can
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
$ gem install
|
7
|
+
$ gem install goodbye_chatwork
|
8
8
|
|
9
9
|
## Usage
|
10
10
|
|
@@ -26,4 +26,4 @@ export logs (chat logs and attachment files: -x option)
|
|
26
26
|
|
27
27
|
Copyright (c) 2014 swdyh
|
28
28
|
MIT License
|
29
|
-
https://github.com/swdyh/goodbye_chatwork
|
29
|
+
https://github.com/swdyh/goodbye_chatwork
|
data/lib/goodbye_chatwork.rb
CHANGED
@@ -27,8 +27,13 @@ module GoodbyeChatwork
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def login
|
30
|
-
@client.post '/login.php', email: @id, password: @pw, autologin: 'on'
|
31
|
-
|
30
|
+
login_r = @client.post '/login.php', email: @id, password: @pw, autologin: 'on'
|
31
|
+
if login_r.env.status == 302
|
32
|
+
@client.url_prefix = URI.parse(login_r.env.response_headers[:location].match(/^https?(:\/\/[-_.!~*\'()a-zA-Z0-9;\:\@&=+\$,%#]+)/).to_s)
|
33
|
+
@client.get login_r.env.response_headers[:location]
|
34
|
+
end
|
35
|
+
|
36
|
+
r = @client.get "/"
|
32
37
|
self.wait
|
33
38
|
self.info "login as #{@id} ..."
|
34
39
|
@token = r.body.match(/var ACCESS_TOKEN = '(.+)'/).to_a[1]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goodbye_chatwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- swdyh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|