jarvis-cli 0.0.7 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jarvis.rb +19 -2
  3. data/lib/jarvis/exceptions.rb +2 -3
  4. data/lib/jarvis/server.rb +2 -0
  5. data/lib/jarvis/services.rb +1 -0
  6. data/lib/jarvis/services/img_flip.rb +69 -0
  7. data/lib/jarvis/services/img_flip_memes/afraid_to_ask.rb +17 -0
  8. data/lib/jarvis/services/img_flip_memes/and_its_gone.rb +17 -0
  9. data/lib/jarvis/services/img_flip_memes/base_meme.rb +57 -0
  10. data/lib/jarvis/services/img_flip_memes/everywhere.rb +15 -0
  11. data/lib/jarvis/services/img_flip_memes/gonna_have_a_bad_time.rb +17 -0
  12. data/lib/jarvis/services/img_flip_memes/most_interesting_man.rb +13 -0
  13. data/lib/jarvis/services/img_flip_memes/not_sure_if.rb +13 -0
  14. data/lib/jarvis/services/img_flip_memes/one_does_not_simply.rb +17 -0
  15. data/lib/jarvis/services/img_flip_memes/overly_attached_girlfriend.rb +13 -0
  16. data/lib/jarvis/services/img_flip_memes/picard.rb +13 -0
  17. data/lib/jarvis/services/img_flip_memes/success_kid.rb +13 -0
  18. data/lib/jarvis/services/img_flip_memes/sudden_clarity.rb +13 -0
  19. data/lib/jarvis/services/img_flip_memes/what_if_i_told_you.rb +17 -0
  20. data/lib/jarvis/services/img_flip_memes/willy_wonka.rb +13 -0
  21. data/lib/jarvis/services/img_flip_memes/y_u_no.rb +17 -0
  22. data/lib/jarvis/version.rb +1 -1
  23. data/spec/services/img_flip_spec.rb +89 -0
  24. data/spec/support/fixtures/vcr_cassettes/img_flip_afraid_to_ask.yml +54 -0
  25. data/spec/support/fixtures/vcr_cassettes/img_flip_and_its_gone.yml +54 -0
  26. data/spec/support/fixtures/vcr_cassettes/img_flip_everywhere.yml +54 -0
  27. data/spec/support/fixtures/vcr_cassettes/img_flip_gonna_have_a_bad_time.yml +54 -0
  28. data/spec/support/fixtures/vcr_cassettes/img_flip_most_interesting_man.yml +54 -0
  29. data/spec/support/fixtures/vcr_cassettes/img_flip_not_sure_if.yml +54 -0
  30. data/spec/support/fixtures/vcr_cassettes/img_flip_one_does_not_simply.yml +54 -0
  31. data/spec/support/fixtures/vcr_cassettes/img_flip_overly_attached_girlfriend.yml +54 -0
  32. data/spec/support/fixtures/vcr_cassettes/img_flip_picard.yml +54 -0
  33. data/spec/support/fixtures/vcr_cassettes/img_flip_success_kid.yml +54 -0
  34. data/spec/support/fixtures/vcr_cassettes/img_flip_sudden_clarity.yml +54 -0
  35. data/spec/support/fixtures/vcr_cassettes/img_flip_what_if_I_told_you.yml +54 -0
  36. data/spec/support/fixtures/vcr_cassettes/img_flip_willy_wonka.yml +54 -0
  37. data/spec/support/fixtures/vcr_cassettes/img_flip_y_u_no.yml +54 -0
  38. metadata +48 -2
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=61544&username=imgflip_user&password=imgflip_password&text0=hello&text1=world
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - cloudflare-nginx
23
+ Date:
24
+ - Sun, 22 Feb 2015 19:48:12 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=20f67b465a2cddda7d71f56cb3ac0f47; path=/
33
+ - __cfduid=dabd0c7f840cdb415cbd242f3ff64b8851424634492; expires=Mon, 22-Feb-16
34
+ 19:48:12 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=AhWp1eH65ej9-AvuA9OvVUQGP3zkHRPk; expires=Sun, 22-Feb-2015 21:48:12
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bcdb32889460424-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hz9zo.jpg","page_url":"https:\/\/imgflip.com\/i\/hz9zo"}}'
52
+ http_version:
53
+ recorded_at: Sun, 22 Feb 2015 19:48:12 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=100948&username=imgflip_user&password=imgflip_password&text0=can't%20think%20of&text1=anything%20clever%20right%20now
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 02:53:37 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=64c0801c721a70282c33bf38568099aa; path=/
33
+ - __cfduid=dface20af6cf192293232beed83c4b2711424660016; expires=Tue, 23-Feb-16
34
+ 02:53:36 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=_pK8a3CJVGgHTzec8IersEXtk3v-F1PU; expires=Mon, 23-Feb-2015 04:53:36
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd0224c45680168-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzspk.jpg","page_url":"https:\/\/imgflip.com\/i\/hzspk"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 02:53:37 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=100947&username=imgflip_user&password=imgflip_password&text0=What%20if%20I%20told%20you&text1=Jarvis%20is%20the%20best%20bot%20ever%3F
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 02:57:37 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=d183c244a68b1e5f0ae5097d62e3f1e7; path=/
33
+ - __cfduid=dbcfd169b613c41dd5e0302ebd4eabfa11424660256; expires=Tue, 23-Feb-16
34
+ 02:57:36 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=w5LJYhtiFnPPWu0lgtu67LlYHaG7Ch5_; expires=Mon, 23-Feb-2015 04:57:36
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd0282bca7710c3-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzsv9.jpg","page_url":"https:\/\/imgflip.com\/i\/hzsv9"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 02:57:37 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=61582&username=imgflip_user&password=imgflip_password&text0=hello&text1=world
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 03:01:34 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=9120b433c903f0bbfb39f8ea2f42bab9; path=/
33
+ - __cfduid=d9147c503dda8cef3ff01a00f952ac1371424660493; expires=Tue, 23-Feb-16
34
+ 03:01:33 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=eAsLjP7ImGikzQwlAO13xX3Cw13VJUOm; expires=Mon, 23-Feb-2015 05:01:33
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd02df3d0de10c3-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzt18.jpg","page_url":"https:\/\/imgflip.com\/i\/hzt18"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 03:01:34 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=61527&username=imgflip_user&password=imgflip_password&text0=Y%20U%20NO&text1=sql
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 03:04:17 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=514b2e232a6f97f863aa88441b4ea437; path=/
33
+ - __cfduid=d44e92334d92c185830d2305d6644083f1424660655; expires=Tue, 23-Feb-16
34
+ 03:04:15 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=cYvB1oqX5BKuk7JhMp7rUfd9Vb36GUZn; expires=Mon, 23-Feb-2015 05:04:16
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd031e8ec8e09ac-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzt5g.jpg","page_url":"https:\/\/imgflip.com\/i\/hzt5g"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 03:04:17 GMT
54
+ recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jarvis-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DVG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-22 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -338,6 +338,22 @@ files:
338
338
  - lib/jarvis/services/fact.rb
339
339
  - lib/jarvis/services/giphy.rb
340
340
  - lib/jarvis/services/i_heart_quotes.rb
341
+ - lib/jarvis/services/img_flip.rb
342
+ - lib/jarvis/services/img_flip_memes/afraid_to_ask.rb
343
+ - lib/jarvis/services/img_flip_memes/and_its_gone.rb
344
+ - lib/jarvis/services/img_flip_memes/base_meme.rb
345
+ - lib/jarvis/services/img_flip_memes/everywhere.rb
346
+ - lib/jarvis/services/img_flip_memes/gonna_have_a_bad_time.rb
347
+ - lib/jarvis/services/img_flip_memes/most_interesting_man.rb
348
+ - lib/jarvis/services/img_flip_memes/not_sure_if.rb
349
+ - lib/jarvis/services/img_flip_memes/one_does_not_simply.rb
350
+ - lib/jarvis/services/img_flip_memes/overly_attached_girlfriend.rb
351
+ - lib/jarvis/services/img_flip_memes/picard.rb
352
+ - lib/jarvis/services/img_flip_memes/success_kid.rb
353
+ - lib/jarvis/services/img_flip_memes/sudden_clarity.rb
354
+ - lib/jarvis/services/img_flip_memes/what_if_i_told_you.rb
355
+ - lib/jarvis/services/img_flip_memes/willy_wonka.rb
356
+ - lib/jarvis/services/img_flip_memes/y_u_no.rb
341
357
  - lib/jarvis/services/null_service.rb
342
358
  - lib/jarvis/services/tweet_that.rb
343
359
  - lib/jarvis/services/weather.rb
@@ -355,6 +371,7 @@ files:
355
371
  - spec/services/fact_spec.rb
356
372
  - spec/services/giphy_spec.rb
357
373
  - spec/services/i_heart_quotes_spec.rb
374
+ - spec/services/img_flip_spec.rb
358
375
  - spec/services/null_service_spec.rb
359
376
  - spec/services/tweet_that_spec.rb
360
377
  - spec/services/weather_spec.rb
@@ -362,6 +379,20 @@ files:
362
379
  - spec/support/fixtures/vcr_cassettes/fact.yml
363
380
  - spec/support/fixtures/vcr_cassettes/giphy.yml
364
381
  - spec/support/fixtures/vcr_cassettes/i_heart_quotes.yml
382
+ - spec/support/fixtures/vcr_cassettes/img_flip_afraid_to_ask.yml
383
+ - spec/support/fixtures/vcr_cassettes/img_flip_and_its_gone.yml
384
+ - spec/support/fixtures/vcr_cassettes/img_flip_everywhere.yml
385
+ - spec/support/fixtures/vcr_cassettes/img_flip_gonna_have_a_bad_time.yml
386
+ - spec/support/fixtures/vcr_cassettes/img_flip_most_interesting_man.yml
387
+ - spec/support/fixtures/vcr_cassettes/img_flip_not_sure_if.yml
388
+ - spec/support/fixtures/vcr_cassettes/img_flip_one_does_not_simply.yml
389
+ - spec/support/fixtures/vcr_cassettes/img_flip_overly_attached_girlfriend.yml
390
+ - spec/support/fixtures/vcr_cassettes/img_flip_picard.yml
391
+ - spec/support/fixtures/vcr_cassettes/img_flip_success_kid.yml
392
+ - spec/support/fixtures/vcr_cassettes/img_flip_sudden_clarity.yml
393
+ - spec/support/fixtures/vcr_cassettes/img_flip_what_if_I_told_you.yml
394
+ - spec/support/fixtures/vcr_cassettes/img_flip_willy_wonka.yml
395
+ - spec/support/fixtures/vcr_cassettes/img_flip_y_u_no.yml
365
396
  - spec/support/fixtures/vcr_cassettes/tweet_that.yml
366
397
  - spec/support/fixtures/vcr_cassettes/weather.yml
367
398
  - spec/support/shared_contexts/server.rb
@@ -431,6 +462,7 @@ test_files:
431
462
  - spec/services/fact_spec.rb
432
463
  - spec/services/giphy_spec.rb
433
464
  - spec/services/i_heart_quotes_spec.rb
465
+ - spec/services/img_flip_spec.rb
434
466
  - spec/services/null_service_spec.rb
435
467
  - spec/services/tweet_that_spec.rb
436
468
  - spec/services/weather_spec.rb
@@ -438,6 +470,20 @@ test_files:
438
470
  - spec/support/fixtures/vcr_cassettes/fact.yml
439
471
  - spec/support/fixtures/vcr_cassettes/giphy.yml
440
472
  - spec/support/fixtures/vcr_cassettes/i_heart_quotes.yml
473
+ - spec/support/fixtures/vcr_cassettes/img_flip_afraid_to_ask.yml
474
+ - spec/support/fixtures/vcr_cassettes/img_flip_and_its_gone.yml
475
+ - spec/support/fixtures/vcr_cassettes/img_flip_everywhere.yml
476
+ - spec/support/fixtures/vcr_cassettes/img_flip_gonna_have_a_bad_time.yml
477
+ - spec/support/fixtures/vcr_cassettes/img_flip_most_interesting_man.yml
478
+ - spec/support/fixtures/vcr_cassettes/img_flip_not_sure_if.yml
479
+ - spec/support/fixtures/vcr_cassettes/img_flip_one_does_not_simply.yml
480
+ - spec/support/fixtures/vcr_cassettes/img_flip_overly_attached_girlfriend.yml
481
+ - spec/support/fixtures/vcr_cassettes/img_flip_picard.yml
482
+ - spec/support/fixtures/vcr_cassettes/img_flip_success_kid.yml
483
+ - spec/support/fixtures/vcr_cassettes/img_flip_sudden_clarity.yml
484
+ - spec/support/fixtures/vcr_cassettes/img_flip_what_if_I_told_you.yml
485
+ - spec/support/fixtures/vcr_cassettes/img_flip_willy_wonka.yml
486
+ - spec/support/fixtures/vcr_cassettes/img_flip_y_u_no.yml
441
487
  - spec/support/fixtures/vcr_cassettes/tweet_that.yml
442
488
  - spec/support/fixtures/vcr_cassettes/weather.yml
443
489
  - spec/support/shared_contexts/server.rb