Add artist finding tests for new Pixiv URLs.

* Add tests for finding artists using the new Pixiv URLs in Artist#find_all_by_url.
* Add tests for the artist finder JSON API in ArtistsController#finder.
* Add tests for the artist page search form in ArtistsController#index.
This commit is contained in:
evazion
2014-10-05 13:39:55 -05:00
parent 8e2be03a6b
commit a36472f35b
18 changed files with 6166 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_80b071246e635ff4098e3f857f1e934a&illust_id=32049358
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_80b071246e635ff4098e3f857f1e934a
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Sun, 05 Oct 2014 18:16:23 GMT
Content-Type:
- text/html; charset=UTF-8
Content-Length:
- '0'
Connection:
- keep-alive
X-Host-Time:
- '142'
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control:
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma:
- no-cache
body:
encoding: US-ASCII
string: ''
http_version:
recorded_at: Sun, 05 Oct 2014 18:16:32 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,84 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_80b071246e635ff4098e3f857f1e934a&illust_id=46170939
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_80b071246e635ff4098e3f857f1e934a
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoxNjoyMiBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NTg3
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQ1
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MTcwOTM5IiwiMzI3NzciLCJqcGciLCLjg6bjg4vjgrPjg7zjg7MiLCI0
Iiwi44Oe44K144KqIiwiaHR0cDovL2kyLnBpeGl2Lm5ldC9pbWctaW5mL2lt
Zy8yMDE0LzA5LzI1LzAwLzU3LzI0LzQ2MTcwOTM5XzEyOHgxMjguanBnIiws
LCJodHRwOi8vaTIucGl4aXYubmV0L2ltZzA0L2ltZy9zeW91bmVuX25vX3V0
YS9tb2JpbGUvNDYxNzA5MzlfNDgwbXcuanBnIiwsLCIyMDE0LTA5LTI1IDAw
OjU3OjI0Iiwi5ryr55S7IOWUhyDjgqrjg6rjgrjjg4rjg6sg44Om44OL44Kz
44O844OzIOmOpyIsIlBob3Rvc2hvcCBDb21pY1N0dWRpbyIsIjg5MCIsIjg1
NzgiLCIxNzQwMyIsIuWUh+OBjOOBiuawl+OBq+WFpeOCiuOBp+OBmeOAgjxi
ciAvPjxiciAvPuaEj+WkluOBq+aPj+OBj+OBruOBq+aZgumWk+OBi+OBi+OC
iuOBvuOBl+OBn+OAgjxiciAvPu+8lOaZgumWk+OBu+OBqeOBi+OBi+OBo+OB
n+OBqOaAneOBhOOBvuOBmeOAgiIsIjE2IiwsLCI0OTkiLCIxOSIsInN5b3Vu
ZW5fbm9fdXRhIiwsIjAiLCwsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nMDQv
cHJvZmlsZS9zeW91bmVuX25vX3V0YS9tb2JpbGUvNTc4MTUyNV84MC5qcGci
LAo=
http_version:
recorded_at: Sun, 05 Oct 2014 18:16:31 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,85 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_5cf6afd4c2ff777b3a378458103e2dac&illust_id=46239857
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_5cf6afd4c2ff777b3a378458103e2dac
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo0NiBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NjYx
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQz
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MjM5ODU3IiwiOTk0OCIsImpwZyIsIuODneODl+ODhuODlOODlOODg+OC
r+esrOS6jOipseOBr+OBmOOBvuOCiuOBvuOBl+OBnyIsIjEiLCLlpKflt53j
gbbjgY/jgbYvYmt1YiIsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nLWluZi9p
bWcvMjAxNC8wOS8yOC8yMS81OS80NC80NjIzOTg1N18xMjh4MTI4LmpwZyIs
LCwiaHR0cDovL2kxLnBpeGl2Lm5ldC9pbWcwMS9pbWcvYmt1YmIvbW9iaWxl
LzQ2MjM5ODU3XzQ4MG13LmpwZyIsLCwiMjAxNC0wOS0yOCAyMTo1OTo0NCIs
IuOCquODquOCuOODiuODqyDjg53jg5fjg4bjg5Tjg5Tjg4Pjgq8iLCwiMzI5
IiwiMzI0NiIsIjgzMDEiLCI8YSBocmVmPSIiaHR0cDovL21hbmdhbGlmZXdp
bi50YWtlc2hvYm8uY28uanAvcmVuc2FpL3BvcHV0ZS9wb3B1dGUtMDAyLzEz
MTYxLyIiIHRhcmdldD0iIl9ibGFuayIiPmh0dHA6Ly9tYW5nYWxpZmV3aW4u
dGFrZXNob2JvLmNvLmpwL3JlbnNhaS9wb3B1dGUvcG9wdXRlLTAwMi8xMzE2
MS88L2E+PGJyIC8+77yR77yR5pel6ZaT5pu05paw44Gn44GZ44CA44KI44KN
44GX44GP44GK44Gt44GM44GE44GX44G+44GZIiwsLCwiODgiLCIxNCIsImJr
dWJiIiwsIjAiLCwsImh0dHA6Ly9pMS5waXhpdi5uZXQvaW1nMDEvcHJvZmls
ZS9ia3ViYi9tb2JpbGUvNTcyODA5XzgwLmpwZyIsCg==
http_version:
recorded_at: Sun, 05 Oct 2014 18:20:55 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,84 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_5cf6afd4c2ff777b3a378458103e2dac&illust_id=46170939
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_5cf6afd4c2ff777b3a378458103e2dac
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo0NCBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NTg3
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQ0
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MTcwOTM5IiwiMzI3NzciLCJqcGciLCLjg6bjg4vjgrPjg7zjg7MiLCI0
Iiwi44Oe44K144KqIiwiaHR0cDovL2kyLnBpeGl2Lm5ldC9pbWctaW5mL2lt
Zy8yMDE0LzA5LzI1LzAwLzU3LzI0LzQ2MTcwOTM5XzEyOHgxMjguanBnIiws
LCJodHRwOi8vaTIucGl4aXYubmV0L2ltZzA0L2ltZy9zeW91bmVuX25vX3V0
YS9tb2JpbGUvNDYxNzA5MzlfNDgwbXcuanBnIiwsLCIyMDE0LTA5LTI1IDAw
OjU3OjI0Iiwi5ryr55S7IOWUhyDjgqrjg6rjgrjjg4rjg6sg44Om44OL44Kz
44O844OzIOmOpyIsIlBob3Rvc2hvcCBDb21pY1N0dWRpbyIsIjg5MCIsIjg1
NzgiLCIxNzQwMyIsIuWUh+OBjOOBiuawl+OBq+WFpeOCiuOBp+OBmeOAgjxi
ciAvPjxiciAvPuaEj+WkluOBq+aPj+OBj+OBruOBq+aZgumWk+OBi+OBi+OC
iuOBvuOBl+OBn+OAgjxiciAvPu+8lOaZgumWk+OBu+OBqeOBi+OBi+OBo+OB
n+OBqOaAneOBhOOBvuOBmeOAgiIsIjE2IiwsLCI0OTkiLCIxOSIsInN5b3Vu
ZW5fbm9fdXRhIiwsIjAiLCwsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nMDQv
cHJvZmlsZS9zeW91bmVuX25vX3V0YS9tb2JpbGUvNTc4MTUyNV84MC5qcGci
LAo=
http_version:
recorded_at: Sun, 05 Oct 2014 18:20:54 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,85 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_5cf6afd4c2ff777b3a378458103e2dac&illust_id=46239857
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_5cf6afd4c2ff777b3a378458103e2dac
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo0NiBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NjYx
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQy
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MjM5ODU3IiwiOTk0OCIsImpwZyIsIuODneODl+ODhuODlOODlOODg+OC
r+esrOS6jOipseOBr+OBmOOBvuOCiuOBvuOBl+OBnyIsIjEiLCLlpKflt53j
gbbjgY/jgbYvYmt1YiIsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nLWluZi9p
bWcvMjAxNC8wOS8yOC8yMS81OS80NC80NjIzOTg1N18xMjh4MTI4LmpwZyIs
LCwiaHR0cDovL2kxLnBpeGl2Lm5ldC9pbWcwMS9pbWcvYmt1YmIvbW9iaWxl
LzQ2MjM5ODU3XzQ4MG13LmpwZyIsLCwiMjAxNC0wOS0yOCAyMTo1OTo0NCIs
IuOCquODquOCuOODiuODqyDjg53jg5fjg4bjg5Tjg5Tjg4Pjgq8iLCwiMzI5
IiwiMzI0NiIsIjgzMDEiLCI8YSBocmVmPSIiaHR0cDovL21hbmdhbGlmZXdp
bi50YWtlc2hvYm8uY28uanAvcmVuc2FpL3BvcHV0ZS9wb3B1dGUtMDAyLzEz
MTYxLyIiIHRhcmdldD0iIl9ibGFuayIiPmh0dHA6Ly9tYW5nYWxpZmV3aW4u
dGFrZXNob2JvLmNvLmpwL3JlbnNhaS9wb3B1dGUvcG9wdXRlLTAwMi8xMzE2
MS88L2E+PGJyIC8+77yR77yR5pel6ZaT5pu05paw44Gn44GZ44CA44KI44KN
44GX44GP44GK44Gt44GM44GE44GX44G+44GZIiwsLCwiODgiLCIxNCIsImJr
dWJiIiwsIjAiLCwsImh0dHA6Ly9pMS5waXhpdi5uZXQvaW1nMDEvcHJvZmls
ZS9ia3ViYi9tb2JpbGUvNTcyODA5XzgwLmpwZyIsCg==
http_version:
recorded_at: Sun, 05 Oct 2014 18:20:56 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,84 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350&illust_id=46170939
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo1MSBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NTg3
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQz
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MTcwOTM5IiwiMzI3NzciLCJqcGciLCLjg6bjg4vjgrPjg7zjg7MiLCI0
Iiwi44Oe44K144KqIiwiaHR0cDovL2kyLnBpeGl2Lm5ldC9pbWctaW5mL2lt
Zy8yMDE0LzA5LzI1LzAwLzU3LzI0LzQ2MTcwOTM5XzEyOHgxMjguanBnIiws
LCJodHRwOi8vaTIucGl4aXYubmV0L2ltZzA0L2ltZy9zeW91bmVuX25vX3V0
YS9tb2JpbGUvNDYxNzA5MzlfNDgwbXcuanBnIiwsLCIyMDE0LTA5LTI1IDAw
OjU3OjI0Iiwi5ryr55S7IOWUhyDjgqrjg6rjgrjjg4rjg6sg44Om44OL44Kz
44O844OzIOmOpyIsIlBob3Rvc2hvcCBDb21pY1N0dWRpbyIsIjg5MCIsIjg1
NzgiLCIxNzQwMyIsIuWUh+OBjOOBiuawl+OBq+WFpeOCiuOBp+OBmeOAgjxi
ciAvPjxiciAvPuaEj+WkluOBq+aPj+OBj+OBruOBq+aZgumWk+OBi+OBi+OC
iuOBvuOBl+OBn+OAgjxiciAvPu+8lOaZgumWk+OBu+OBqeOBi+OBi+OBo+OB
n+OBqOaAneOBhOOBvuOBmeOAgiIsIjE2IiwsLCI0OTkiLCIxOSIsInN5b3Vu
ZW5fbm9fdXRhIiwsIjAiLCwsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nMDQv
cHJvZmlsZS9zeW91bmVuX25vX3V0YS9tb2JpbGUvNTc4MTUyNV84MC5qcGci
LAo=
http_version:
recorded_at: Sun, 05 Oct 2014 18:21:01 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,85 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350&illust_id=46239857
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo1MyBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NjYx
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQy
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MjM5ODU3IiwiOTk0OCIsImpwZyIsIuODneODl+ODhuODlOODlOODg+OC
r+esrOS6jOipseOBr+OBmOOBvuOCiuOBvuOBl+OBnyIsIjEiLCLlpKflt53j
gbbjgY/jgbYvYmt1YiIsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nLWluZi9p
bWcvMjAxNC8wOS8yOC8yMS81OS80NC80NjIzOTg1N18xMjh4MTI4LmpwZyIs
LCwiaHR0cDovL2kxLnBpeGl2Lm5ldC9pbWcwMS9pbWcvYmt1YmIvbW9iaWxl
LzQ2MjM5ODU3XzQ4MG13LmpwZyIsLCwiMjAxNC0wOS0yOCAyMTo1OTo0NCIs
IuOCquODquOCuOODiuODqyDjg53jg5fjg4bjg5Tjg5Tjg4Pjgq8iLCwiMzI5
IiwiMzI0NiIsIjgzMDEiLCI8YSBocmVmPSIiaHR0cDovL21hbmdhbGlmZXdp
bi50YWtlc2hvYm8uY28uanAvcmVuc2FpL3BvcHV0ZS9wb3B1dGUtMDAyLzEz
MTYxLyIiIHRhcmdldD0iIl9ibGFuayIiPmh0dHA6Ly9tYW5nYWxpZmV3aW4u
dGFrZXNob2JvLmNvLmpwL3JlbnNhaS9wb3B1dGUvcG9wdXRlLTAwMi8xMzE2
MS88L2E+PGJyIC8+77yR77yR5pel6ZaT5pu05paw44Gn44GZ44CA44KI44KN
44GX44GP44GK44Gt44GM44GE44GX44G+44GZIiwsLCwiODgiLCIxNCIsImJr
dWJiIiwsIjAiLCwsImh0dHA6Ly9pMS5waXhpdi5uZXQvaW1nMDEvcHJvZmls
ZS9ia3ViYi9tb2JpbGUvNTcyODA5XzgwLmpwZyIsCg==
http_version:
recorded_at: Sun, 05 Oct 2014 18:21:02 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,84 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350&illust_id=46170939
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo1MCBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NTg3
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQz
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MTcwOTM5IiwiMzI3NzciLCJqcGciLCLjg6bjg4vjgrPjg7zjg7MiLCI0
Iiwi44Oe44K144KqIiwiaHR0cDovL2kyLnBpeGl2Lm5ldC9pbWctaW5mL2lt
Zy8yMDE0LzA5LzI1LzAwLzU3LzI0LzQ2MTcwOTM5XzEyOHgxMjguanBnIiws
LCJodHRwOi8vaTIucGl4aXYubmV0L2ltZzA0L2ltZy9zeW91bmVuX25vX3V0
YS9tb2JpbGUvNDYxNzA5MzlfNDgwbXcuanBnIiwsLCIyMDE0LTA5LTI1IDAw
OjU3OjI0Iiwi5ryr55S7IOWUhyDjgqrjg6rjgrjjg4rjg6sg44Om44OL44Kz
44O844OzIOmOpyIsIlBob3Rvc2hvcCBDb21pY1N0dWRpbyIsIjg5MCIsIjg1
NzgiLCIxNzQwMyIsIuWUh+OBjOOBiuawl+OBq+WFpeOCiuOBp+OBmeOAgjxi
ciAvPjxiciAvPuaEj+WkluOBq+aPj+OBj+OBruOBq+aZgumWk+OBi+OBi+OC
iuOBvuOBl+OBn+OAgjxiciAvPu+8lOaZgumWk+OBu+OBqeOBi+OBi+OBo+OB
n+OBqOaAneOBhOOBvuOBmeOAgiIsIjE2IiwsLCI0OTkiLCIxOSIsInN5b3Vu
ZW5fbm9fdXRhIiwsIjAiLCwsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nMDQv
cHJvZmlsZS9zeW91bmVuX25vX3V0YS9tb2JpbGUvNTc4MTUyNV84MC5qcGci
LAo=
http_version:
recorded_at: Sun, 05 Oct 2014 18:21:00 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,85 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350&illust_id=46239857
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo1MiBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NjYx
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQ0
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MjM5ODU3IiwiOTk0OCIsImpwZyIsIuODneODl+ODhuODlOODlOODg+OC
r+esrOS6jOipseOBr+OBmOOBvuOCiuOBvuOBl+OBnyIsIjEiLCLlpKflt53j
gbbjgY/jgbYvYmt1YiIsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nLWluZi9p
bWcvMjAxNC8wOS8yOC8yMS81OS80NC80NjIzOTg1N18xMjh4MTI4LmpwZyIs
LCwiaHR0cDovL2kxLnBpeGl2Lm5ldC9pbWcwMS9pbWcvYmt1YmIvbW9iaWxl
LzQ2MjM5ODU3XzQ4MG13LmpwZyIsLCwiMjAxNC0wOS0yOCAyMTo1OTo0NCIs
IuOCquODquOCuOODiuODqyDjg53jg5fjg4bjg5Tjg5Tjg4Pjgq8iLCwiMzI5
IiwiMzI0NiIsIjgzMDEiLCI8YSBocmVmPSIiaHR0cDovL21hbmdhbGlmZXdp
bi50YWtlc2hvYm8uY28uanAvcmVuc2FpL3BvcHV0ZS9wb3B1dGUtMDAyLzEz
MTYxLyIiIHRhcmdldD0iIl9ibGFuayIiPmh0dHA6Ly9tYW5nYWxpZmV3aW4u
dGFrZXNob2JvLmNvLmpwL3JlbnNhaS9wb3B1dGUvcG9wdXRlLTAwMi8xMzE2
MS88L2E+PGJyIC8+77yR77yR5pel6ZaT5pu05paw44Gn44GZ44CA44KI44KN
44GX44GP44GK44Gt44GM44GE44GX44G+44GZIiwsLCwiODgiLCIxNCIsImJr
dWJiIiwsIjAiLCwsImh0dHA6Ly9pMS5waXhpdi5uZXQvaW1nMDEvcHJvZmls
ZS9ia3ViYi9tb2JpbGUvNTcyODA5XzgwLmpwZyIsCg==
http_version:
recorded_at: Sun, 05 Oct 2014 18:21:02 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,84 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350&illust_id=46170939
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo1MSBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NTg3
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQ1
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MTcwOTM5IiwiMzI3NzciLCJqcGciLCLjg6bjg4vjgrPjg7zjg7MiLCI0
Iiwi44Oe44K144KqIiwiaHR0cDovL2kyLnBpeGl2Lm5ldC9pbWctaW5mL2lt
Zy8yMDE0LzA5LzI1LzAwLzU3LzI0LzQ2MTcwOTM5XzEyOHgxMjguanBnIiws
LCJodHRwOi8vaTIucGl4aXYubmV0L2ltZzA0L2ltZy9zeW91bmVuX25vX3V0
YS9tb2JpbGUvNDYxNzA5MzlfNDgwbXcuanBnIiwsLCIyMDE0LTA5LTI1IDAw
OjU3OjI0Iiwi5ryr55S7IOWUhyDjgqrjg6rjgrjjg4rjg6sg44Om44OL44Kz
44O844OzIOmOpyIsIlBob3Rvc2hvcCBDb21pY1N0dWRpbyIsIjg5MCIsIjg1
NzgiLCIxNzQwMyIsIuWUh+OBjOOBiuawl+OBq+WFpeOCiuOBp+OBmeOAgjxi
ciAvPjxiciAvPuaEj+WkluOBq+aPj+OBj+OBruOBq+aZgumWk+OBi+OBi+OC
iuOBvuOBl+OBn+OAgjxiciAvPu+8lOaZgumWk+OBu+OBqeOBi+OBi+OBo+OB
n+OBqOaAneOBhOOBvuOBmeOAgiIsIjE2IiwsLCI0OTkiLCIxOSIsInN5b3Vu
ZW5fbm9fdXRhIiwsIjAiLCwsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nMDQv
cHJvZmlsZS9zeW91bmVuX25vX3V0YS9tb2JpbGUvNTc4MTUyNV84MC5qcGci
LAo=
http_version:
recorded_at: Sun, 05 Oct 2014 18:21:01 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,84 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350&illust_id=46170939
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo1MSBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NTg3
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQz
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MTcwOTM5IiwiMzI3NzciLCJqcGciLCLjg6bjg4vjgrPjg7zjg7MiLCI0
Iiwi44Oe44K144KqIiwiaHR0cDovL2kyLnBpeGl2Lm5ldC9pbWctaW5mL2lt
Zy8yMDE0LzA5LzI1LzAwLzU3LzI0LzQ2MTcwOTM5XzEyOHgxMjguanBnIiws
LCJodHRwOi8vaTIucGl4aXYubmV0L2ltZzA0L2ltZy9zeW91bmVuX25vX3V0
YS9tb2JpbGUvNDYxNzA5MzlfNDgwbXcuanBnIiwsLCIyMDE0LTA5LTI1IDAw
OjU3OjI0Iiwi5ryr55S7IOWUhyDjgqrjg6rjgrjjg4rjg6sg44Om44OL44Kz
44O844OzIOmOpyIsIlBob3Rvc2hvcCBDb21pY1N0dWRpbyIsIjg5MCIsIjg1
NzgiLCIxNzQwMyIsIuWUh+OBjOOBiuawl+OBq+WFpeOCiuOBp+OBmeOAgjxi
ciAvPjxiciAvPuaEj+WkluOBq+aPj+OBj+OBruOBq+aZgumWk+OBi+OBi+OC
iuOBvuOBl+OBn+OAgjxiciAvPu+8lOaZgumWk+OBu+OBqeOBi+OBi+OBo+OB
n+OBqOaAneOBhOOBvuOBmeOAgiIsIjE2IiwsLCI0OTkiLCIxOSIsInN5b3Vu
ZW5fbm9fdXRhIiwsIjAiLCwsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nMDQv
cHJvZmlsZS9zeW91bmVuX25vX3V0YS9tb2JpbGUvNTc4MTUyNV84MC5qcGci
LAo=
http_version:
recorded_at: Sun, 05 Oct 2014 18:21:00 GMT
recorded_with: VCR 2.9.0

View File

@@ -0,0 +1,85 @@
---
http_interactions:
- request:
method: get
uri: http://spapi.pixiv.net/iphone/illust.php?PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350&illust_id=46239857
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- ! '*/*'
User-Agent:
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
Accept-Encoding:
- gzip,deflate,identity
Accept-Charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language:
- en-us,en;q=0.5
Cookie:
- PHPSESSID=696859_b9becee82841e8fde3d723c763dc1350
Host:
- spapi.pixiv.net
Connection:
- keep-alive
Keep-Alive:
- 300
response:
status:
code: 200
message: !binary |-
T0s=
headers:
!binary "U2VydmVy":
- !binary |-
bmdpbng=
!binary "RGF0ZQ==":
- !binary |-
U3VuLCAwNSBPY3QgMjAxNCAxODoyMDo1MiBHTVQ=
!binary "Q29udGVudC1UeXBl":
- !binary |-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
!binary "Q29udGVudC1MZW5ndGg=":
- !binary |-
NjYx
!binary "Q29ubmVjdGlvbg==":
- !binary |-
a2VlcC1hbGl2ZQ==
!binary "WC1Ib3N0LVRpbWU=":
- !binary |-
MTQ1
!binary "RXhwaXJlcw==":
- !binary |-
VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
!binary "Q2FjaGUtQ29udHJvbA==":
- !binary |-
bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
Y2s9MCwgcHJlLWNoZWNrPTA=
!binary "UHJhZ21h":
- !binary |-
bm8tY2FjaGU=
!binary "WC1Db250ZW50LVR5cGUtT3B0aW9ucw==":
- !binary |-
bm9zbmlmZg==
body:
encoding: ASCII-8BIT
string: !binary |-
IjQ2MjM5ODU3IiwiOTk0OCIsImpwZyIsIuODneODl+ODhuODlOODlOODg+OC
r+esrOS6jOipseOBr+OBmOOBvuOCiuOBvuOBl+OBnyIsIjEiLCLlpKflt53j
gbbjgY/jgbYvYmt1YiIsImh0dHA6Ly9pMi5waXhpdi5uZXQvaW1nLWluZi9p
bWcvMjAxNC8wOS8yOC8yMS81OS80NC80NjIzOTg1N18xMjh4MTI4LmpwZyIs
LCwiaHR0cDovL2kxLnBpeGl2Lm5ldC9pbWcwMS9pbWcvYmt1YmIvbW9iaWxl
LzQ2MjM5ODU3XzQ4MG13LmpwZyIsLCwiMjAxNC0wOS0yOCAyMTo1OTo0NCIs
IuOCquODquOCuOODiuODqyDjg53jg5fjg4bjg5Tjg5Tjg4Pjgq8iLCwiMzI5
IiwiMzI0NiIsIjgzMDEiLCI8YSBocmVmPSIiaHR0cDovL21hbmdhbGlmZXdp
bi50YWtlc2hvYm8uY28uanAvcmVuc2FpL3BvcHV0ZS9wb3B1dGUtMDAyLzEz
MTYxLyIiIHRhcmdldD0iIl9ibGFuayIiPmh0dHA6Ly9tYW5nYWxpZmV3aW4u
dGFrZXNob2JvLmNvLmpwL3JlbnNhaS9wb3B1dGUvcG9wdXRlLTAwMi8xMzE2
MS88L2E+PGJyIC8+77yR77yR5pel6ZaT5pu05paw44Gn44GZ44CA44KI44KN
44GX44GP44GK44Gt44GM44GE44GX44G+44GZIiwsLCwiODgiLCIxNCIsImJr
dWJiIiwsIjAiLCwsImh0dHA6Ly9pMS5waXhpdi5uZXQvaW1nMDEvcHJvZmls
ZS9ia3ViYi9tb2JpbGUvNTcyODA5XzgwLmpwZyIsCg==
http_version:
recorded_at: Sun, 05 Oct 2014 18:21:01 GMT
recorded_with: VCR 2.9.0

View File

@@ -1,12 +1,34 @@
require 'test_helper'
class ArtistsControllerTest < ActionController::TestCase
def assert_artist_found(expected_artist, source_url)
VCR.use_cassette("functional/artists_controller/#{source_url}", :record => :once) do
get :finder, { :format => :json, :url => source_url }, { :user_id => @user.id }
end
assert_response :success
assert_equal(1, assigns(:artists).size, "Testing URL: #{source_url}")
assert_equal(expected_artist, assigns(:artists).first.name)
end
def assert_artist_not_found(source_url)
VCR.use_cassette("functional/artists_controller/#{source_url}", :record => :once) do
get :finder, { :format => :json, :url => source_url }, { :user_id => @user.id }
end
assert_response :success
assert_equal(0, assigns(:artists).size, "Testing URL: #{source_url}")
end
context "An artists controller" do
setup do
CurrentUser.user = FactoryGirl.create(:user)
CurrentUser.ip_addr = "127.0.0.1"
@artist = FactoryGirl.create(:artist)
@user = FactoryGirl.create(:user)
FactoryGirl.create(:artist, :name => "masao", :url_string => "http://i2.pixiv.net/img04/img/syounen_no_uta/")
FactoryGirl.create(:artist, :name => "artgerm", :url_string => "http://artgerm.deviantart.com/")
end
teardown do
@@ -40,6 +62,35 @@ class ArtistsControllerTest < ActionController::TestCase
assert_response :success
end
context "when searching the index page" do
should "find artists by name" do
get :index, { :name => "masao" }
assert_response :success
assert_equal(1, assigns(:artists).size)
assert_equal("masao", assigns(:artists).first.name)
end
should "find artists by image URL" do
get :index, { :name => "http://i2.pixiv.net/img04/img/syounen_no_uta/46170939_m.jpg" }
assert_response :success
assert_equal(1, assigns(:artists).size)
assert_equal("masao", assigns(:artists).first.name)
end
should "find artists by page URL" do
url = "http://www.pixiv.net/member_illust.php?mode=medium&illust_id=46170939"
VCR.use_cassette("functional/artists_controller/#{url}", :record => :once) do
get :index, { :name => url }
end
assert_response :success
assert_equal(1, assigns(:artists).size)
assert_equal("masao", assigns(:artists).first.name)
end
end
should "create an artist" do
assert_difference("Artist.count", 1) do
attributes = FactoryGirl.attributes_for(:artist)
@@ -85,5 +136,34 @@ class ArtistsControllerTest < ActionController::TestCase
version = @artist.versions.first
post :revert, {:id => @artist.id, :version_id => version.id}
end
context "when finding an artist" do
should "find nothing for unknown URLs" do
assert_artist_not_found("http://www.example.com")
end
should "find deviantart artists" do
assert_artist_found("artgerm", "http://artgerm.deviantart.com/art/Peachy-Princess-Ver-2-457220550")
end
should_eventually "find deviantart artists for image URLs" do
assert_artist_found("artgerm", "http://fc06.deviantart.net/fs71/f/2014/150/d/c/peachy_princess_by_artgerm-d7k7tmu.jpg")
end
should "find pixiv artists" do
assert_artist_found("masao", "http://i2.pixiv.net/img04/img/syounen_no_uta/46170939.jpg")
assert_artist_found("masao", "http://i2.pixiv.net/img-original/img/2014/09/25/00/57/24/46170939_p0.jpg")
assert_artist_found("masao", "http://www.pixiv.net/member_illust.php?mode=medium&illust_id=46170939")
end
should "not fail for malformed Pixiv URLs" do
assert_artist_not_found("http://www.pixiv.net/member_illust.php?mode=medium&illust_id=herpderp")
assert_artist_not_found("http://www.pixiv.net/wharrgarbl")
end
should "not fail for Pixiv bad IDs" do
assert_artist_not_found("http://www.pixiv.net/member_illust.php?mode=medium&illust_id=32049358")
end
end
end
end

View File

@@ -1,6 +1,22 @@
require 'test_helper'
class ArtistTest < ActiveSupport::TestCase
def assert_artist_found(expected_name, source_url)
VCR.use_cassette("unit/artist/#{source_url}", :record => :once) do
artists = Artist.find_all_by_url(source_url)
assert_equal(1, artists.size)
assert_equal(expected_name, artists.first.name, "Testing URL: #{source_url}")
end
end
def assert_artist_not_found(source_url)
VCR.use_cassette("unit/artist/#{source_url}", :record => :once) do
artists = Artist.find_all_by_url(source_url)
assert_equal(0, artists.size, "Testing URL: #{source_url}")
end
end
context "An artist" do
setup do
user = FactoryGirl.create(:user)
@@ -136,6 +152,71 @@ class ArtistTest < ActiveSupport::TestCase
assert_equal([], Artist.find_all_by_url("http://warhol.com/a/image.jpg").map(&:name))
end
context "when finding deviantart artists" do
setup do
FactoryGirl.create(:artist, :name => "artgerm", :url_string => "http://artgerm.deviantart.com/")
FactoryGirl.create(:artist, :name => "trixia", :url_string => "http://trixdraws.deviantart.com/")
end
should "find the correct artist for page URLs" do
assert_artist_found("artgerm", "http://artgerm.deviantart.com/art/Peachy-Princess-Ver-2-457220550")
assert_artist_found("trixia", "http://trixdraws.deviantart.com/art/My-Queen-426745289")
assert_artist_found("trixia", "http://trixdraws.deviantart.com/gallery/#/d722mrt")
end
should_eventually "find the correct artist for image URLs" do
assert_artist_found("artgerm", "http://th05.deviantart.net/fs71/200H/f/2014/150/d/c/peachy_princess_by_artgerm-d7k7tmu.jpg")
assert_artist_found("artgerm", "http://th05.deviantart.net/fs71/PRE/f/2014/150/d/c/peachy_princess_by_artgerm-d7k7tmu.jpg")
assert_artist_found("artgerm", "http://fc06.deviantart.net/fs71/f/2014/150/d/c/peachy_princess_by_artgerm-d7k7tmu.jpg")
assert_artist_found("trixia", "http://fc01.deviantart.net/fs71/i/2014/050/d/e/my_queen_by_trixdraws-d722mrt.jpg")
assert_artist_found("trixia", "http://th01.deviantart.net/fs71/200H/i/2014/050/d/e/my_queen_by_trixdraws-d722mrt.jpg")
assert_artist_found("trixia", "http://th09.deviantart.net/fs71/PRE/i/2014/050/d/e/my_queen_by_trixdraws-d722mrt.jpg")
end
end
context "when finding pixiv artists" do
setup do
FactoryGirl.create(:artist, :name => "masao",:url_string => "http://i2.pixiv.net/img04/img/syounen_no_uta/")
FactoryGirl.create(:artist, :name => "bkub", :url_string => "http://i1.pixiv.net/img01/img/bkubb/")
end
should "find the correct artist for old image URLs" do
assert_artist_found("masao", "http://i2.pixiv.net/img04/img/syounen_no_uta/46170939.jpg")
assert_artist_found("bkub", "http://i1.pixiv.net/img01/img/bkubb/46239857_m.jpg")
end
should "find the correct artist for new image URLs" do
assert_artist_found("masao", "http://i2.pixiv.net/c/1200x1200/img-master/img/2014/09/25/00/57/24/46170939_p0_master1200.jpg")
assert_artist_found("masao", "http://i2.pixiv.net/img-original/img/2014/09/25/00/57/24/46170939_p0.jpg")
assert_artist_found("bkub", "http://i2.pixiv.net/c/1200x1200/img-master/img/2014/09/28/21/59/44/46239857_p0.jpg")
assert_artist_found("bkub", "http://i2.pixiv.net/img-original/img/2014/09/28/21/59/44/46239857_p0.jpg")
end
should "find the correct artist for page URLs" do
assert_artist_found("masao", "http://www.pixiv.net/member_illust.php?mode=medium&illust_id=46170939")
assert_artist_found("masao", "http://www.pixiv.net/member_illust.php?mode=big&illust_id=46170939")
assert_artist_found("masao", "http://www.pixiv.net/member_illust.php?mode=manga&illust_id=46170939")
assert_artist_found("masao", "http://www.pixiv.net/member_illust.php?mode=manga_big&illust_id=46170939&page=0")
assert_artist_found("masao", "http://www.pixiv.net/i/46170939")
assert_artist_found("bkub", "http://www.pixiv.net/member_illust.php?mode=medium&illust_id=46239857")
assert_artist_found("bkub", "http://www.pixiv.net/member_illust.php?mode=big&illust_id=46239857")
assert_artist_found("bkub", "http://www.pixiv.net/i/46239857")
end
should "find nothing for malformed URLs" do
assert_artist_not_found("http://www.pixiv.net/member_illust.php?mode=medium&illust_id=herpderp")
assert_artist_not_found("http://www.pixiv.net/wharrgarbl")
end
should "find nothing for bad IDs" do
assert_artist_not_found("http://www.pixiv.net/member_illust.php?mode=medium&illust_id=32049358")
end
end
should "normalize its other names" do
artist = FactoryGirl.create(:artist, :name => "a1", :other_names_comma => "aaa, bbb, ccc ddd")
assert_equal("aaa, bbb, ccc_ddd", artist.other_names_comma)