witei_web_api 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/witei_web_api/base.rb +3 -1
- data/lib/witei_web_api/house.rb +2 -1
- data/lib/witei_web_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff86af65124a22f14b2a6c047eba2dfd8a326fd61e44cc46b7e2b68173dc1886
|
4
|
+
data.tar.gz: d0090260665754d8d95ae9c51b2e11dd8be4d09ff8f06e1db33bf3d97a90fc26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e70f5a774f33a57a3326f1c73d4048bc0f9d1d3e5fab51c72c2f652031f007d735e87070d8b9100d65fd6373748a1fde5d0b9d18c7402b809707a75bf6a59d6
|
7
|
+
data.tar.gz: ce07c85a6c082e61f181db5d0a4b61573ac25e060ffd52fb4b45ffac10332943dde6deda7dbdd947be4a8d3217664b520284394955dca0655bbee48722aa8ffe
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
witei_web_api (0.1.
|
4
|
+
witei_web_api (0.1.2)
|
5
5
|
activemodel (~> 5.0)
|
6
6
|
mechanize (~> 2.7)
|
7
7
|
|
@@ -51,7 +51,7 @@ GEM
|
|
51
51
|
net-http-digest_auth (1.4.1)
|
52
52
|
net-http-persistent (3.0.0)
|
53
53
|
connection_pool (~> 2.2)
|
54
|
-
nokogiri (1.8.
|
54
|
+
nokogiri (1.8.4)
|
55
55
|
mini_portile2 (~> 2.3.0)
|
56
56
|
ntlm-http (0.1.1)
|
57
57
|
public_suffix (3.0.2)
|
@@ -92,4 +92,4 @@ DEPENDENCIES
|
|
92
92
|
yard (~> 0.9, >= 0.9.11)
|
93
93
|
|
94
94
|
BUNDLED WITH
|
95
|
-
1.16.
|
95
|
+
1.16.4
|
data/lib/witei_web_api/base.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'thread'
|
2
|
+
|
1
3
|
module WiteiWebApi
|
2
4
|
class Base
|
3
5
|
include ActiveModel::AttributeAssignment
|
@@ -5,7 +7,7 @@ module WiteiWebApi
|
|
5
7
|
private
|
6
8
|
|
7
9
|
def self.agent
|
8
|
-
|
10
|
+
Thread.current[:witei_web_api_agent] ||= begin
|
9
11
|
agent = WiteiWebApi::Agent.new
|
10
12
|
login!(agent)
|
11
13
|
agent
|
data/lib/witei_web_api/house.rb
CHANGED
@@ -10,6 +10,7 @@ class WiteiWebApi::House < WiteiWebApi::Base
|
|
10
10
|
def self.find(identifier)
|
11
11
|
page = agent.get "https://witei.com/pro/agencies/houses/list/?_hidden__action_identifier_bcd32c=unacc_eq&_hidden_identifier_bcd32c=#{identifier}&listView=block"
|
12
12
|
id = page.css('#id_houses_0').first['value']
|
13
|
+
p id
|
13
14
|
|
14
15
|
page = agent.get "https://witei.com/pro/house/update/#{id}/"
|
15
16
|
|
@@ -25,4 +26,4 @@ class WiteiWebApi::House < WiteiWebApi::Base
|
|
25
26
|
)
|
26
27
|
house
|
27
28
|
end
|
28
|
-
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: witei_web_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Polushkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|