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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d58bdb6ad7d794aaac896d657fe5affbb9f3aaa
4
- data.tar.gz: 70d3eaeb9faea477ad67e9c53f5ecbf8cec076eb
3
+ metadata.gz: dd79d9ad1791ace1aca8e01b0e99939ba788d4a8
4
+ data.tar.gz: 5c2743edc592a375f1ffe875b4e4c903298467f0
5
5
  SHA512:
6
- metadata.gz: 87d31a62a9638d62decff68f2db30322bb9b4414cad0973daa98458f3e178437b571c6122134117d3c1dd220464b4684c6c896f0a05f73732870addeff18c678
7
- data.tar.gz: 08f15cd67db4609480cc74a6349de739ad0cfb9d4cfe412648c331d83fa45251b261a8cc244e8cfa64bb6e13f6fe5067ea26465d8f07b986a052f5606ba16b76
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 goobye_chatwork
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
@@ -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
- r = @client.get '/'
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]
@@ -1,3 +1,3 @@
1
1
  module GoodbyeChatwork
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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: 2015-04-22 00:00:00.000000000 Z
11
+ date: 2016-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler