edi 0.2.1 → 0.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfb2b11818294aa1d55eb18dafc55cf4b2fb98ab
4
- data.tar.gz: b01a9f0d177b3ccb03fb47458f8146c79e203857
3
+ metadata.gz: 770557f8e555a3998e5176b8aecd551218488038
4
+ data.tar.gz: ae2a0a2d6986484b123a3cb9e72a7b116768cbb2
5
5
  SHA512:
6
- metadata.gz: 4563ed37a55cd52f74c4ab8d1ddc4700b55837cef32ce9ee085830e1e0c9e2489edf39bbf5ccd90743a7b7d98bd68b2b02f89f3d22ac84ca438da12895a3813b
7
- data.tar.gz: bc236dadaf543a4f8bb94f6c9bd90fafea72cd35f838a8746f2a6bfb0f388de92b3b73a3e0fa89bc35dd3da25953ef35cf1dc3eb236637974634fc1ffcfc262e
6
+ metadata.gz: 36f78b22b10a9426805bcd55ef89078b3b92bfbee2d874f42a9ceda78c973865863ae75cf7ae4355c34f85317180039478463af8c62c241cd43147a8e8d17a37
7
+ data.tar.gz: 097b87540e4d5e76562e9b1bc44e6e25e82be58eb6154c1cede4a1392acaf4c216ef73c485d9784c1f73063e6d5656ef750a6e4a796378539104ac3a70ecac40
@@ -0,0 +1,11 @@
1
+ @vcr
2
+ Feature: ImgFlip
3
+
4
+ Because memes are awesome
5
+ As a consumer of popular culture
6
+ I want EDI to return memes
7
+
8
+ Scenario: Success Kid
9
+ Given a server is running with the img flip service enabled
10
+ When EDI recieves the message "EDI success kid testing edi, it works"
11
+ Then EDI will respond with an image
@@ -0,0 +1,3 @@
1
+ Then(/^EDI will respond with an image$/) do
2
+ expect(parsed_response(@response)).to match /jpg/
3
+ end
@@ -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: ''
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
+ - Tue, 17 Mar 2015 16:27: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=60642151672e2154f821d47d4e795467; path=/
33
+ - __cfduid=d1ff026c6d78e4abf8d98ded775479c051426609657; expires=Wed, 16-Mar-16
34
+ 16:27:37 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=bFNQ0EPuiLQgA2NvAUd6KIbxhV2KUIC7; expires=Tue, 17-Mar-2015 18:27: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
+ - 1c8a10f609b7042a-ORD
49
+ body:
50
+ encoding: ASCII-8BIT
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/iygm8.jpg","page_url":"https:\/\/imgflip.com\/i\/iygm8"}}'
52
+ http_version:
53
+ recorded_at: Tue, 17 Mar 2015 16:27:37 GMT
54
+ recorded_with: VCR 2.9.3
@@ -3,20 +3,7 @@ require 'edi/services/img_flip_memes/base_meme'
3
3
  Dir[File.dirname(__FILE__) + '/img_flip_memes/*.rb'].each {|file| require file }
4
4
 
5
5
  class ImgFlip < EDI::Service
6
- interpreter_pattern /you're gonna have a bad time|
7
- and it'?s gone|
8
- afraid to ask|
9
- sudden clarity|
10
- success kid|
11
- not sure if|
12
- picard|
13
- one does not simply|
14
- y u no|
15
- what if i told you|
16
- willy wonka|
17
- overly attached girlfriend|
18
- everywhere|
19
- i don'?t always.+but when i do'?/xi
6
+ interpreter_pattern /you're gonna have a bad time|and it'?s gone|afraid to ask|sudden clarity|success kid|not sure if|picard|one does not simply|y u no|what if i told you|willy wonka|overly attached girlfriend|everywhere|i don'?t always.+but when i do'?/i
20
7
 
21
8
  environment :imgflip_user, :imgflip_password
22
9
  before_invoke :create_meme
@@ -1,3 +1,3 @@
1
1
  module EDI
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - DVG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-16 00:00:00.000000000 Z
11
+ date: 2015-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -313,8 +313,10 @@ files:
313
313
  - features/fact_service.feature
314
314
  - features/giphy_service.feature
315
315
  - features/i_heart_quotes_service.feature
316
+ - features/img_flip_service.feature
316
317
  - features/step_definitions/fact_service_steps.rb
317
318
  - features/step_definitions/giphy_steps.rb
319
+ - features/step_definitions/img_flip_steps.rb
318
320
  - features/step_definitions/server_steps.rb
319
321
  - features/step_definitions/tweet_that_steps.rb
320
322
  - features/step_definitions/weather_steps.rb
@@ -332,6 +334,7 @@ files:
332
334
  - features/support/vcr_cassettes/I_Heart_Quotes/A_Random_Quote.yml
333
335
  - features/support/vcr_cassettes/I_Heart_Quotes/A_Simpsons_Quote.yml
334
336
  - features/support/vcr_cassettes/I_Heart_Quotes/A_Star_Wars_Quote.yml
337
+ - features/support/vcr_cassettes/ImgFlip/Success_Kid.yml
335
338
  - features/support/vcr_cassettes/Tweet_that/Post_the_last_message_to_twitter.yml
336
339
  - features/support/vcr_cassettes/Weather_Service/Use_a_specified_location.yml
337
340
  - features/support/vcr_cassettes/Weather_Service/Use_default_location.yml
@@ -461,8 +464,10 @@ test_files:
461
464
  - features/fact_service.feature
462
465
  - features/giphy_service.feature
463
466
  - features/i_heart_quotes_service.feature
467
+ - features/img_flip_service.feature
464
468
  - features/step_definitions/fact_service_steps.rb
465
469
  - features/step_definitions/giphy_steps.rb
470
+ - features/step_definitions/img_flip_steps.rb
466
471
  - features/step_definitions/server_steps.rb
467
472
  - features/step_definitions/tweet_that_steps.rb
468
473
  - features/step_definitions/weather_steps.rb
@@ -480,6 +485,7 @@ test_files:
480
485
  - features/support/vcr_cassettes/I_Heart_Quotes/A_Random_Quote.yml
481
486
  - features/support/vcr_cassettes/I_Heart_Quotes/A_Simpsons_Quote.yml
482
487
  - features/support/vcr_cassettes/I_Heart_Quotes/A_Star_Wars_Quote.yml
488
+ - features/support/vcr_cassettes/ImgFlip/Success_Kid.yml
483
489
  - features/support/vcr_cassettes/Tweet_that/Post_the_last_message_to_twitter.yml
484
490
  - features/support/vcr_cassettes/Weather_Service/Use_a_specified_location.yml
485
491
  - features/support/vcr_cassettes/Weather_Service/Use_default_location.yml