mailinator 0.0.4 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10f12c48f1b71d26578d3717df3fd82253a318fa
4
- data.tar.gz: 01632b4025b16d889b6459c6f81de18453b8b210
3
+ metadata.gz: 847d003a5f9435a732e165deac69687bc953fb66
4
+ data.tar.gz: 9233fd344c73eeee545f15964f399d09d962f116
5
5
  SHA512:
6
- metadata.gz: 2a75f51b758f713126ded94a1f1b08e39c04c3663b634638030230950889a291008398f784d95c2a613995ef8ad108f058f8eec107a15d94f737949347be1617
7
- data.tar.gz: 2c247d0ab084a4890c04af23808dc385955f67503e9c16d1d886f141c4808869d4dbde59a27463b54f06f4dd1c46db54d961b55b399bf25ff3154b7f48d9712d
6
+ metadata.gz: 14b63db677610fb9f69650975bfb10d28c5afaf824d4dfa29ea3135010d4a4ddf8b7f9c77ea69d7243b7fee9d2c5a671779e3b7cfee527b810e74df5426c6adb
7
+ data.tar.gz: c882b2ec9b5691d225d7ad06c5b6907043479e26d6fba3bf09d243c0081e66e7a29a14ac82fa4511eb6e45554667a76cf2c2e1466c1bd0f9a85012d5ce803385
@@ -1,14 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.0
6
- - 2.1.1
7
- - 2.1.2
8
- - 2.1.3
9
- - 2.1.4
10
- - 2.1.5
11
- - 2.2.0
3
+ - 2.3.0
4
+ - 2.4.0
5
+ - 2.5.0
6
+ - 2.6.0
12
7
  bundler_args: --without debug
13
8
  before_install:
14
- - gem update bundler
9
+ - gem update --system
10
+ - gem install bundler
data/Gemfile CHANGED
@@ -1,18 +1,21 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in mailinator.gemspec
4
6
  gemspec
5
7
 
6
8
  group :development do
7
- gem 'rubocop', '~> 0.40'
8
- gem 'rspec', '~> 3.4.0'
9
- gem 'guard', '~> 2.14.0'
10
- gem 'guard-rspec', '~> 4.7.0'
11
- gem 'listen', '~> 2.10.1'
12
- gem 'fakeweb', '~> 1.3'
9
+ gem 'coveralls', require: false
10
+ gem 'fakeweb', '~> 1.3.0'
11
+ gem 'guard', '~> 2.14.2'
12
+ gem 'guard-rspec', '~> 4.7.3'
13
+ gem 'listen', '~> 3.1.5'
14
+ gem 'rspec', '~> 3.7.0'
15
+ gem 'rubocop', '~> 0.57.1'
13
16
  end
14
17
 
15
18
  group :debug do
16
- gem 'pry', '~> 0.10.3'
17
- gem 'pry-byebug', '~> 3.4.0'
19
+ gem 'pry', '~> 0.11.3'
20
+ gem 'pry-byebug', '~> 3.6.0'
18
21
  end
data/Guardfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # A sample Guardfile
2
4
  # More info at https://github.com/guard/guard#readme
3
5
 
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  [![Build Status](https://travis-ci.org/ainformatico/mailinator.svg)](https://travis-ci.org/ainformatico/mailinator)
2
2
  [![Code Climate](https://codeclimate.com/github/ainformatico/mailinator/badges/gpa.svg)](https://codeclimate.com/github/ainformatico/mailinator)
3
+ [![Coverage Status](https://coveralls.io/repos/github/ainformatico/mailinator/badge.svg?branch=master)](https://coveralls.io/github/ainformatico/mailinator?branch=master)
3
4
 
4
5
  # Mailinator
5
6
 
@@ -39,24 +40,27 @@ Access to an email
39
40
  email = Mailinator::Email.get('email-abcd1234')
40
41
  ```
41
42
 
43
+ Access to a private email
44
+
45
+ ```ruby
46
+ email = Mailinator::Email.get('email-abcd1234', private_domain: true)
47
+ ```
48
+
42
49
  Now you have access to some methods:
43
50
 
44
- * `email.id`
51
+ * `email.from_full`
52
+ * `email.date`
53
+ * `email.received`
54
+ * `email.from`
55
+ * `email.to`
45
56
  * `email.subject`
57
+ * `email.request_id`
46
58
  * `email.body`
47
- * `email.body_html`
48
- * `email.read?`
49
- * `email.inbox_fetches_left`
50
- * `email.email_fetches_left`
51
- * `email.sender`
52
- * `email.reply_to`
53
- * `email.from`
54
- * `email.ip`
55
- * `email.received`
56
- * `email.date`
59
+ * `email.body_base_64`
60
+ * `email.orig_from`
61
+ * `email.id`
57
62
  * `email.time`
58
- * `email.forwards_left`
59
- * `email.original`, original request
63
+ * `email.seconds_ago`
60
64
 
61
65
  ### Inbox
62
66
 
@@ -81,6 +85,19 @@ inbox.messages.first.download do |email|
81
85
  end
82
86
  ```
83
87
 
88
+ To delete an `Email` you need:
89
+
90
+ ```ruby
91
+ inbox.messages.first.delete
92
+ ```
93
+
94
+ Access to a private inbox
95
+ ```ruby
96
+ inbox = Mailinator::Inbox.get('inbox-abcd1234', private_domain: true)
97
+ ```
98
+
99
+ The 'download' and 'delete' work the same with private domain.
100
+
84
101
  ## Contributing
85
102
 
86
103
  1. Fork it ( https://github.com/ainformatico/mailinator/fork )
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
@@ -5,4 +7,4 @@ RSpec::Core::RakeTask.new(:spec) do |task|
5
7
  task.rspec_opts = ['--color', '--format', 'documentation']
6
8
  end
7
9
 
8
- task :default => :spec
10
+ task default: :spec
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'mailinator/model'
2
4
  require 'mailinator/models/email'
3
5
  require 'mailinator/models/entry'
@@ -1,14 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'net/http'
2
4
  require 'json'
3
5
 
4
6
  module Mailinator
5
-
6
7
  class Api
7
8
  class NotFound < StandardError; end
8
9
  class RequestError < StandardError; end
9
10
 
10
11
  def get(url, params = {})
11
12
  response = request(url, params)
13
+
12
14
  handle_response(response)
13
15
  end
14
16
 
@@ -21,12 +23,14 @@ module Mailinator
21
23
  def request(url, params)
22
24
  uri = generate_url(url)
23
25
  uri.query = generate_params(params)
26
+
24
27
  perform_request(uri)
25
28
  end
26
29
 
27
30
  def perform_request(uri)
28
31
  http = Net::HTTP.new(uri.host, uri.port)
29
32
  http.use_ssl = (uri.scheme == 'https')
33
+
30
34
  http.get(uri.request_uri)
31
35
  end
32
36
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Mailinator
2
4
  class TokenError < StandardError; end
3
5
 
@@ -5,7 +7,8 @@ module Mailinator
5
7
  attr_accessor :token
6
8
 
7
9
  def token
8
- fail TokenError, 'Please provide a token' if @token.nil?
10
+ raise TokenError, 'Please provide a token' if @token.nil?
11
+
9
12
  @token
10
13
  end
11
14
  end
@@ -1,12 +1,22 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Mailinator
2
4
  class Email
3
5
  class << self
4
- def get(id)
6
+ def get(id, opts = {})
5
7
  api = Api.new
6
- data = api.get('email', msgid: id)
8
+ params = opts.merge(msgid: id)
9
+ data = api.get('email', params)
10
+
7
11
  populate(data)
8
12
  end
9
13
 
14
+ def delete(id)
15
+ api = Api.new
16
+
17
+ api.get('delete', msgid: id)
18
+ end
19
+
10
20
  private
11
21
 
12
22
  def populate(data)
@@ -1,9 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Mailinator
2
4
  class Inbox
3
5
  class << self
4
- def get(to)
6
+ def get(to, opts = {})
5
7
  api = Api.new
6
- data = api.get('inbox', to: to)
8
+ params = opts.merge(to: to)
9
+ data = api.get('inbox', params)
10
+
7
11
  populate(data)
8
12
  end
9
13
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'hashie'
2
4
 
3
5
  module Mailinator
@@ -5,6 +7,7 @@ module Mailinator
5
7
  class Base < Hashie::Mash
6
8
  def initialize(data)
7
9
  @data = data
10
+
8
11
  super(transform_data)
9
12
  end
10
13
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'date'
2
4
 
3
5
  module Mailinator
@@ -5,31 +7,21 @@ module Mailinator
5
7
  class Email < Base
6
8
  def transform_data
7
9
  {
8
- id: @data['data']['id'],
10
+ from_full: @data['data']['fromfull'],
11
+ date: DateTime.parse(@data['data']['headers']['date']),
12
+ received: @data['data']['headers']['received'],
13
+ from: @data['data']['headers']['from'],
14
+ to: @data['data']['headers']['to'],
9
15
  subject: @data['data']['subject'],
16
+ request_id: @data['data']['requestId'],
10
17
  body: @data['data']['parts'].first['body'],
11
- body_html: retrieve_body_html,
12
- inbox_fetches_left: @data['apiInboxFetchesLeft'],
13
- email_fetches_left: @data['apiEmailFetchesLeft'],
14
- forwards_left: @data['forwardsLeft'],
15
- sender: @data['data']['headers']['sender'],
16
- from: @data['data']['from'],
17
- date: DateTime.parse(@data['data']['headers']['date']),
18
+ body_base_64: @data['data']['parts'].last['body'],
19
+ orig_from: @data['data']['origfrom'],
20
+ id: @data['data']['id'],
18
21
  time: @data['data']['time'],
19
- ip: @data['data']['ip'],
20
- to: @data['data']['headers']['to'],
21
- reply_to: @data['data']['headers']['reply-to'],
22
- received: @data['data']['headers']['received'],
23
- read?: @data['data']['been_read']
22
+ seconds_ago: @data['data']['seconds_ago']
24
23
  }
25
24
  end
26
-
27
- private
28
-
29
- def retrieve_body_html
30
- html = @data['data']['parts'][1] || {}
31
- html['body']
32
- end
33
25
  end
34
26
  end
35
27
  end
@@ -1,14 +1,20 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Mailinator
2
4
  module Models
3
5
  class Entry < Base
4
- def download
5
- email = Mailinator::Email.get(id)
6
+ def download(opts = {})
7
+ email = Mailinator::Email.get(id, opts)
6
8
  if block_given?
7
9
  yield email
8
10
  else
9
11
  email
10
12
  end
11
13
  end
14
+
15
+ def delete
16
+ Mailinator::Email.delete(id)
17
+ end
12
18
  end
13
19
  end
14
20
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Mailinator
2
4
  module Models
3
5
  class Inbox < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Mailinator
2
- VERSION = '0.0.4'
4
+ VERSION = '1.0.0'
3
5
  end
@@ -1,5 +1,6 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'mailinator/version'
5
6
 
@@ -8,7 +9,7 @@ Gem::Specification.new do |spec|
8
9
  spec.version = Mailinator::VERSION
9
10
  spec.authors = ['Alejandro Dev.']
10
11
  spec.email = ['aeinformatico@gmail.com']
11
- spec.summary = %q{Mailinator REST API wrapper}
12
+ spec.summary = 'Mailinator REST API wrapper'
12
13
  spec.homepage = 'https://github.com/ainformatico/mailinator'
13
14
  spec.license = 'MIT'
14
15
 
@@ -17,8 +18,8 @@ Gem::Specification.new do |spec|
17
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
19
  spec.require_paths = ['lib']
19
20
 
20
- spec.add_dependency 'hashie', '~> 3.4.4'
21
+ spec.add_dependency 'hashie', '~> 3.5.4'
21
22
 
22
- spec.add_development_dependency 'bundler', '~> 1.7'
23
- spec.add_development_dependency 'rake', '~> 11.1.2'
23
+ spec.add_development_dependency 'bundler', '~> 1.16.2'
24
+ spec.add_development_dependency 'rake', '~> 12.3.1'
24
25
  end
@@ -0,0 +1,7 @@
1
+ HTTP/1.1 200 OK
2
+ Server: Apache-Coyote/1.1
3
+ Content-Type: application/json;charset=ISO-8859-1
4
+ Content-Length: 15
5
+ Date: Mon, 10 Oct 2016 07:24:54 GMT
6
+
7
+ {"status":"ok"}
@@ -1,5 +1,42 @@
1
1
  HTTP/1.1 200 OK
2
2
  Server: Apache-Coyote/1.1
3
- Date: Sun, 28 Dec 2014 13:39:51 GMT
3
+ Date: Mon, 14 May 2018 13:39:51 GMT
4
4
 
5
- {"apiInboxFetchesLeft":696,"apiEmailFetchesLeft":10,"data":{"headers":{"sender":"example@example.net","content-type":"multipart\/alternative;\r\n\tboundary=\"MIMEBoundaryec1dc8828d9bbedf095f9e9d2ebdbdeb\"","to":"recipient@mailinator.com","x-connecting-ip":"127.0.0.1","subject":"This is a subject","mime-version":"1.0","x-received-time":"1419696967076","reply-to":"example@example.net","received":"from 127-0-0-1.dynamic-ip.example.net ()\r\n by mail.mailinator.com with SMTP (Postfix)\r\n for recipient@mailinator.com;\r\n Sat, 27 Dec 2014 16:16:07 +0000 (UTC)","from":"\"Sender\" <example@example.net>","date":"Sun, 28 Dec 2014 00:16:00 +0800"},"seconds_ago":77024,"id":"1419696967-44152505-recipient","to":"recipient@mailinator.com","time":1419696967076,"subject":"This is a subject","fromfull":"example@example.net","parts":[{"headers":{"content-type":"text\/plain;\r\n\tcharset=\"iso-8859-1\"","content-transfer-encoding":"quoted-printable"},"body":"This is a body"}],"been_read":false,"from":"Sender","ip":"127.0.0.1"},"forwardsLeft":10}
5
+ {
6
+ "data": {
7
+ "fromfull": "example@example.net",
8
+ "headers": {
9
+ "date": "Mon, 14 May 2018 00:47:55 -0600 (MDT)",
10
+ "mime-version": "1.0",
11
+ "x-virus-scanned": "ClamAV using ClamSMTP",
12
+ "subject": "This is a Subject",
13
+ "message-id": "<message.id@example.com>",
14
+ "received": ["from 127-0-0-1.dynamic-ip.example.net ()\r\n by mail.mailinator.com with SMTP (Postfix)\r\n for recipient@mailinator.com;\r\n Sat, 27 Dec 2014 16:16:07 +0000 (UTC)"],
15
+ "from": "\"Sender\" <example@example.net>",
16
+ "content-type": "multipart/mixed; boundary=\"----=_part_50750_324040880.1526280475585\"",
17
+ "to": "<recipient@mailinator.com>",
18
+ "x-mailinator-smtp": ["system: start;0", "s: 220 mail.mailinator.com esmtp postfix;0", "r: ehlo bmta1.somemail.com;102", "s: 250-mail.mailinator.com 250-8bitmime 250 ok;102", "r: mail from:<exampl@example.net>;194", "s: 250 ok;194", "r: rcpt to:<recipient@mailinator.com>;286", "s: 250 ok;286", "r: data;377", "s: 354 end data with <cr><lf>.<cr><lf>;377", "s: 250 ok;6137"]
19
+ },
20
+ "subject": "This is a Subject",
21
+ "parts": [{
22
+ "headers": {
23
+ "content-transfer-encoding": "7bit",
24
+ "content-type": "text/html; charset=\"utf-8\""
25
+ },
26
+ "body": "This is a body"
27
+ }, {
28
+ "headers": {
29
+ "content-transfer-encoding": "base64",
30
+ "content-disposition": "attachment; filename=some.pdf",
31
+ "content-type": "text\/html;\r\n\tcharset=\"iso-8859-1\""
32
+ },
33
+ "body": "This is a BASE64 body"
34
+ }],
35
+ "from": "Sender",
36
+ "origfrom": "Example <example@example.net>",
37
+ "to": "recipient",
38
+ "id": "1419696967-44152505-recipient",
39
+ "time": 1526072140000,
40
+ "seconds_ago": 55994
41
+ }
42
+ }
@@ -1,5 +1,50 @@
1
1
  HTTP/1.1 200 OK
2
2
  Server: Apache-Coyote/1.1
3
- Date: Sun, 28 Dec 2014 13:39:51 GMT
3
+ Date: Fri, 11 May 2018 13:39:51 GMT
4
4
 
5
- {"apiInboxFetchesLeft":696,"apiEmailFetchesLeft":10,"data":{"headers":{"sender":"example@example.net","content-type":"multipart\/alternative;\r\n\tboundary=\"MIMEBoundaryec1dc8828d9bbedf095f9e9d2ebdbdeb\"","to":"recipient@mailinator.com","x-connecting-ip":"127.0.0.1","subject":"This is a subject","mime-version":"1.0","x-received-time":"1419696967076","reply-to":"example@example.net","received":"from 127-0-0-1.dynamic-ip.example.net ()\r\n by mail.mailinator.com with SMTP (Postfix)\r\n for recipient@mailinator.com;\r\n Sat, 27 Dec 2014 16:16:07 +0000 (UTC)","from":"\"Sender\" <example@example.net>","date":"Sun, 28 Dec 2014 00:16:00 +0800"},"seconds_ago":77024,"id":"1419696967-44152505-recipient","to":"recipient@mailinator.com","time":1419696967076,"subject":"This is a subject","fromfull":"example@example.net","parts":[{"headers":{"content-type":"text\/plain;\r\n\tcharset=\"iso-8859-1\"","content-transfer-encoding":"quoted-printable"},"body":"This is a body"},{"headers":{"content-type":"text\/html;\r\n\tcharset=\"iso-8859-1\"","content-transfer-encoding":"quoted-printable"},"body":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\r\n\r\n<head>\r\n<meta content=\"en-us\" http-equiv=\"Content-Language\" \/>\r\n<meta content=\"text\/html; charset=utf-8\" http-equiv=\"Content-Type\" \/>\r\n<title>Alert<\/title>\r\n<\/head>\r\n\r\n<body><p>This is a body<\/p><\/body>\r\n\r\n<\/html>"}],"been_read":false,"from":"Sender","ip":"127.0.0.1"},"forwardsLeft":10}
5
+ {
6
+ "data": {
7
+ "fromfull": "example@example.net",
8
+ "headers": {
9
+ "date": "Mon, 14 May 2018 00:47:55 -0600 (MDT)",
10
+ "mime-version": "1.0",
11
+ "x-virus-scanned": "ClamAV using ClamSMTP",
12
+ "subject": "This is a Subject",
13
+ "message-id": "<message.id@example.com>",
14
+ "received": [
15
+ "from bmta1.example.com([9.9.9.9]) by mail.mailinator.com with SMTP (Postfix) for receipient@example.com; Fri, 11 May 2018 20:55:36 +0000 (UTC)",
16
+ "from mail-2.example.com (mail.example.com [9.9.9.9]) by bmta1.example.com (Postfix) with ESMTP id 5B2118627 for <receipient@example.com>; Fri, 11 May 2018 14:55:39 -0600 (MDT)",
17
+ "from mail-2.example.com (localhost [127.0.0.1]) by mail.example.com (Postfix) with ESMTP id 4BF611FFAF for <receipient@example.com>; Fri, 11 May 2018 16:55:39 -0400 (EDT)",
18
+ "from mail-1.example.com (smtp.example.com [9.9.9.9]) by mail-prod-2.example.com (Postfix) with ESMTP id 3BB0E1FF38 for <receipient@example.com>; Fri, 11 May 2018 16:55:39 -0400 (EDT)",
19
+ "from app-4.example.net (app-4.example.net [9.9.9.9]) by mail.example.com (Postfix) with ESMTP id 3946F20A83 for <receipient@example.com>; Fri, 11 May 2018 16:55:39 -0400 (EDT)",
20
+ "from app-4.example.net (localhost [127.0.0.1]) by app-4.example.net (Postfix) with ESMTP id 3481E413E1 for <receipient@example.com>; Fri, 11 May 2018 14:55:39 -0600 (MDT)"
21
+ ],
22
+ "from": "Sender <sender@example.com>",
23
+ "content-type": "multipart/mixed; boundary=\"-- -- = _part_124646_371774408 .1526072139209 \"",
24
+ "to": "<recipient@mailinator.com>",
25
+ "x-mailinator-smtp": ["system: start;0", "s: 220 mail.mailinator.com esmtp postfix;0", "r: ehlo bmta1.somemail.com;102", "s: 250-mail.mailinator.com 250-8bitmime 250 ok;102", "r: mail from:<exampl@example.net>;194", "s: 250 ok;194", "r: rcpt to:<recipient@mailinator.com>;286", "s: 250 ok;286", "r: data;377", "s: 354 end data with <cr><lf>.<cr><lf>;377", "s: 250 ok;6137"]
26
+ },
27
+ "subject": "This is a Subject",
28
+ "requestId": "638363",
29
+ "parts": [{
30
+ "headers": {
31
+ "content-transfer-encoding": "quoted-printable",
32
+ "content-type": "text/html; charset=\"utf-8\""
33
+ },
34
+ "body": "<p>This is a body</p>"
35
+ }, {
36
+ "headers": {
37
+ "content-transfer-encoding": "base64",
38
+ "content-disposition": "attachment; filename=some.pdf",
39
+ "content-type": "text\/html;\r\n\tcharset=\"iso-8859-1\""
40
+ },
41
+ "body": "This is a BASE64 body JVBERi0xLjUKJeLjz9MKMSAwIG9iag08PC9UeXBlL1BhZ2UvUGFyZW50IDYgMCBSIC9NZWRpYUJv"
42
+ }],
43
+ "from": "Sender",
44
+ "origfrom": "Sender <sender@example.com>",
45
+ "to": "Recipient",
46
+ "id": "1419696967-44152505-recipient",
47
+ "time": 1526072140000,
48
+ "seconds_ago": 15258
49
+ }
50
+ }
@@ -0,0 +1,50 @@
1
+ HTTP/1.1 200 OK
2
+ Server: Apache-Coyote/1.1
3
+ Date: Mon, 4 14 2018 12:26:18 GMT
4
+
5
+ {
6
+ "data": {
7
+ "fromfull": "example@example.net",
8
+ "headers": {
9
+ "date": "Mon, 14 May 2018 00:47:55 -0600 (MDT)",
10
+ "mime-version": "1.0",
11
+ "x-virus-scanned": "ClamAV using ClamSMTP",
12
+ "subject": "This is a Subject",
13
+ "message-id": "<message.id@example.com>",
14
+ "received": [
15
+ "from bmta1.example.com([9.9.9.9]) by mail.mailinator.com with SMTP (Postfix) for receipient@example.com; Fri, 11 May 2018 20:55:36 +0000 (UTC)",
16
+ "from mail-2.example.com (mail.example.com [9.9.9.9]) by bmta1.example.com (Postfix) with ESMTP id 5B2118627 for <receipient@example.com>; Fri, 11 May 2018 14:55:39 -0600 (MDT)",
17
+ "from mail-2.example.com (localhost [127.0.0.1]) by mail.example.com (Postfix) with ESMTP id 4BF611FFAF for <receipient@example.com>; Fri, 11 May 2018 16:55:39 -0400 (EDT)",
18
+ "from mail-1.example.com (smtp.example.com [9.9.9.9]) by mail-prod-2.example.com (Postfix) with ESMTP id 3BB0E1FF38 for <receipient@example.com>; Fri, 11 May 2018 16:55:39 -0400 (EDT)",
19
+ "from app-4.example.net (app-4.example.net [9.9.9.9]) by mail.example.com (Postfix) with ESMTP id 3946F20A83 for <receipient@example.com>; Fri, 11 May 2018 16:55:39 -0400 (EDT)",
20
+ "from app-4.example.net (localhost [127.0.0.1]) by app-4.example.net (Postfix) with ESMTP id 3481E413E1 for <receipient@example.com>; Fri, 11 May 2018 14:55:39 -0600 (MDT)"
21
+ ],
22
+ "from": "Sender <sender@example.com>",
23
+ "content-type": "multipart/mixed; boundary=\"-- -- = _part_124646_371774408 .1526072139209 \"",
24
+ "to": "<recipient@mailinator.com>",
25
+ "x-mailinator-smtp": ["system: start;0", "s: 220 mail.mailinator.com esmtp postfix;0", "r: ehlo bmta1.somemail.com;102", "s: 250-mail.mailinator.com 250-8bitmime 250 ok;102", "r: mail from:<exampl@example.net>;194", "s: 250 ok;194", "r: rcpt to:<recipient@mailinator.com>;286", "s: 250 ok;286", "r: data;377", "s: 354 end data with <cr><lf>.<cr><lf>;377", "s: 250 ok;6137"]
26
+ },
27
+ "subject": "This is a Subject",
28
+ "requestId": "638363",
29
+ "parts": [{
30
+ "headers": {
31
+ "content-transfer-encoding": "7bit",
32
+ "content-type": "text/html; charset=\"utf-8\""
33
+ },
34
+ "body": "<p>This is a body</p>"
35
+ }, {
36
+ "headers": {
37
+ "content-transfer-encoding": "base64",
38
+ "content-disposition": "attachment; filename=some.pdf",
39
+ "content-type": "text\/html;\r\n\tcharset=\"iso-8859-1\""
40
+ },
41
+ "body": "This is a BASE64 body JVBERi0xLjUKJeLjz9MKMSAwIG9iag08PC9UeXBlL1BhZ2UvUGFyZW50IDYgMCBSIC9NZWRpYUJv"
42
+ }],
43
+ "from": "Sender",
44
+ "origfrom": "Sender <sender@example.com>",
45
+ "to": "recipient",
46
+ "id": "1419696967-44152505-recipient",
47
+ "time": 1526072140000,
48
+ "seconds_ago": 15258
49
+ }
50
+ }
@@ -1,5 +1,27 @@
1
1
  HTTP/1.1 200 OK
2
2
  Server: Apache-Coyote/1.1
3
- Date: Sun, 28 Dec 2014 16:26:18 GMT
3
+ Date: Mon, 14 May 2018 16:26:18 GMT
4
4
 
5
- {"messages":[{"seconds_ago":87011,"id":"1419696967-44152505-recipient","to":"recipient@mailinator.com","time":1419696967076,"subject":"First subject","fromfull":"sender@example.org","been_read":false,"from":"Sender name","ip":"127.0.0.1"},{"seconds_ago":73130,"id":"1419710848-46252175-recipient","to":"recipient@mailinator.com","time":1419710848789,"subject":"Second subject","fromfull":"sender@example.org","been_read":false,"from":"Another sender name","ip":"127.0.0.2"}]}
5
+ {
6
+ "messages": [{
7
+ "seconds_ago": 87011,
8
+ "id": "1419696967-44152505-recipient",
9
+ "to": "recipient@mailinator.com",
10
+ "time": 1419696967076,
11
+ "subject": "First subject",
12
+ "fromfull": "sender@example.org",
13
+ "been_read": false,
14
+ "from": "Sender name",
15
+ "ip": "127.0.0.1"
16
+ }, {
17
+ "seconds_ago": 73130,
18
+ "id": "1419710848-46252175-recipient",
19
+ "to": "recipient@mailinator.com",
20
+ "time": 1419710848789,
21
+ "subject": "Second subject",
22
+ "fromfull": "sender@example.org",
23
+ "been_read": false,
24
+ "from": "Another sender name",
25
+ "ip": "127.0.0.2"
26
+ }]
27
+ }
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: Apache-Coyote/1.1
3
+ Date: Mon, 14 2018 12:26:18 GMT
4
+
5
+ {
6
+ "messages": [{
7
+ "subject": "First subject",
8
+ "from": "Sender name",
9
+ "id": "1419696967-44152505-recipient",
10
+ "to": "recipient@private_domain.mailinator.com",
11
+ "seconds_ago": 41616
12
+ }, {
13
+ "subject": "Second subject",
14
+ "from": "Another Sender name",
15
+ "id": "1556696970-44152699-recipient",
16
+ "to": "recipient@private_domain.mailinator.com",
17
+ "seconds_ago": 41506
18
+ }]
19
+ }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Mailinator::Api do
@@ -9,33 +11,39 @@ describe Mailinator::Api do
9
11
  end
10
12
  end
11
13
 
12
- it 'should raise when document not found' do
13
- api = Mailinator::Api.new
14
- expect { api.get('not-found') }.to raise_error(Mailinator::Api::NotFound)
15
- end
14
+ context 'when success' do
15
+ let(:params) { { custom: :custom, token: token } }
16
+ let(:url) { 'url' }
17
+ let(:response) { double(:response, code: '200', body: { id: 1 }.to_json) }
16
18
 
17
- it 'should raise when an error occurred' do
18
- api = Mailinator::Api.new
19
- expect { api.get('error') }.to raise_error(Mailinator::Api::RequestError)
20
- end
19
+ let(:uri) do
20
+ uri = URI("#{subject.send(:base_url)}/#{url}")
21
+ uri.query = URI.encode_www_form(params.merge(params))
22
+
23
+ uri
24
+ end
21
25
 
22
- it 'should GET' do
23
- api = Mailinator::Api.new
24
- params = {custom: :custom, token: token}
25
- url = 'url'
26
- uri = URI("#{api.send(:base_url)}/#{url}")
27
- uri.query = URI.encode_www_form(params.merge(params))
28
- response = double(:response, {code: '200', body: {id: 1}.to_json})
26
+ before do
27
+ expect(subject)
28
+ .to receive(:perform_request)
29
+ .with(uri)
30
+ .and_return(response)
31
+ end
29
32
 
30
- expect(api)
31
- .to receive(:get)
32
- .with(url, params)
33
- .and_call_original
33
+ it 'GET' do
34
+ subject.get(url, params)
35
+ end
36
+ end
34
37
 
35
- expect(api)
36
- .to receive(:perform_request)
37
- .with(uri) { response }
38
+ context 'when failure' do
39
+ it 'raises error when the document is not found' do
40
+ expect { subject.get('not-found') }
41
+ .to raise_error(described_class::NotFound)
42
+ end
38
43
 
39
- api.get(url, params)
44
+ it 'raises error when an error occurred' do
45
+ expect { subject.get('error') }
46
+ .to raise_error(described_class::RequestError)
47
+ end
40
48
  end
41
49
  end
@@ -1,14 +1,23 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Mailinator::Config do
4
- it 'should assign the token propery' do
5
- token = 'ABCD'
6
- config = subject
7
- config.token = token
8
- expect(config.token).to eq(token)
6
+ before { subject.token = token }
7
+
8
+ context 'when success' do
9
+ let(:token) { 'ABCD' }
10
+
11
+ it 'assigns the token properly' do
12
+ expect(subject.token).to eq(token)
13
+ end
9
14
  end
10
15
 
11
- it 'should raise an error if no token specified' do
12
- expect { subject.token }.to raise_error(Mailinator::TokenError)
16
+ context 'when failure' do
17
+ let(:token) { nil }
18
+
19
+ it 'raises an error if no token is specified' do
20
+ expect { subject.token }.to raise_error(Mailinator::TokenError)
21
+ end
13
22
  end
14
23
  end
@@ -1,37 +1,56 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Mailinator::Email do
6
+ subject { described_class }
7
+
4
8
  before do
5
9
  Mailinator.configure do |config|
6
10
  config.token = 'ABCD'
7
11
  end
8
12
  end
9
13
 
10
- it 'should get an email' do
11
- body = 'This is a body'
12
- message = Mailinator::Email.get('abcd1234')
13
- expect(message.id).to eq('1419696967-44152505-recipient')
14
- expect(message.subject).to eq('This is a subject')
15
- expect(message.body).to eq(body)
16
- expect(message.body_html).to include("<p>#{body}</p>")
17
- expect(message.read?).to_not be
18
- expect(message.inbox_fetches_left).to eq(696)
19
- expect(message.email_fetches_left).to eq(10)
20
- expect(message.sender).to eq('example@example.net')
21
- expect(message.reply_to).to eq('example@example.net')
22
- expect(message.from).to eq('Sender')
23
- expect(message.ip).to eq('127.0.0.1')
24
- expect(message.received).to match(a_string_matching('from 127-0-0-1.dynamic-ip.example.net'))
25
- expect(message.date).to be_a(DateTime)
26
- expect(message.time).to eq(1419696967076)
27
- expect(message.forwards_left).to eq(10)
28
- expect(message.original).to be_a(Hash)
14
+ describe '#get' do
15
+ context 'when full email' do
16
+ let(:body) { 'This is a body' }
17
+ let(:message) { subject.get('abcd1234') }
18
+
19
+ it 'gets the email' do
20
+ message = Mailinator::Email.get('abcd1234')
21
+ expect(message.from_full).to eq('example@example.net')
22
+ expect(message.date).to be_a(DateTime)
23
+ expect(message.received)
24
+ .to include('from bmta1.example.com([9.9.9.9]) by mail.mailinator.com with SMTP (Postfix) for receipient@example.com; Fri, 11 May 2018 20:55:36 +0000 (UTC)')
25
+ expect(message.from).to eq('Sender <sender@example.com>')
26
+ expect(message.to).to eq('<recipient@mailinator.com>')
27
+ expect(message.subject).to eq('This is a Subject')
28
+ expect(message.request_id).to eq('638363')
29
+ expect(message.body).to include('<p>This is a body</p>')
30
+ expect(message.body_base_64).to include('This is a BASE64 body JVBERi0xLjUKJe')
31
+ expect(message.orig_from).to eq('Sender <sender@example.com>')
32
+ expect(message.id).to eq('1419696967-44152505-recipient')
33
+ expect(message.time).to eq(1_526_072_140_000)
34
+ expect(message.seconds_ago).to eq(15_258)
35
+ end
36
+ end
37
+
38
+ context 'when no #body_html' do
39
+ let(:body) { 'This is a body' }
40
+ let(:message) { subject.get('abcd1234plain') }
41
+
42
+ it 'returns nil for #body_html when no html body' do
43
+ expect(message.body).to eq(body)
44
+ expect(message.body_html).to_not be
45
+ end
46
+ end
29
47
  end
30
48
 
31
- it 'should return nil for #body_html when no html body' do
32
- body = 'This is a body'
33
- message = Mailinator::Email.get('abcd1234plain')
34
- expect(message.body).to eq(body)
35
- expect(message.body_html).to_not be
49
+ describe '#delete' do
50
+ let(:response) { subject.delete('abcd1234') }
51
+
52
+ it 'deletes an email' do
53
+ expect(response).to eq('status' => 'ok')
54
+ end
36
55
  end
37
56
  end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Mailinator::Inbox do
6
+ let(:inbox_private) do
7
+ Mailinator::Inbox.get('abcd1234', private_domain: true)
8
+ end
9
+
10
+ before do
11
+ Mailinator.configure do |config|
12
+ config.token = 'ABCD'
13
+ end
14
+ end
15
+
16
+ it 'gets a private domain inbox' do
17
+ expect(inbox_private.messages).to be_a(Array)
18
+ expect(inbox_private.original).to be_a(Hash)
19
+ expect(inbox_private.messages.first).to \
20
+ include(id: '1419696967-44152505-recipient')
21
+ expect(inbox_private.messages.last).to \
22
+ include(id: '1556696970-44152699-recipient')
23
+ end
24
+
25
+ it '#download a private domain email' do
26
+ expect(inbox_private.messages.first.download(private_domain: true)).to \
27
+ be_a(Mailinator::Models::Email)
28
+ expect(inbox_private.messages.first.download(private_domain: true)).to \
29
+ eq(Mailinator::Email.get(inbox_private.messages.first.id))
30
+ inbox_private.messages.first.download do |message|
31
+ expect(message).to \
32
+ eq(Mailinator::Email.get(inbox_private.messages.first.id))
33
+ end
34
+ end
35
+
36
+ it '#delete a private domain email' do
37
+ expect(inbox_private.messages.first.delete).to eq('status' => 'ok')
38
+ end
39
+ end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Mailinator::Inbox do
4
- let(:inbox) { Mailinator::Inbox.get('abcd1234') }
6
+ let(:inbox) { described_class.get('abcd1234') }
5
7
 
6
8
  before do
7
9
  Mailinator.configure do |config|
@@ -9,18 +11,33 @@ describe Mailinator::Inbox do
9
11
  end
10
12
  end
11
13
 
12
- it 'should get an inbox' do
13
- expect(inbox.messages).to be_a(Array)
14
- expect(inbox.original).to be_a(Hash)
15
- expect(inbox.messages.first).to include(id: '1419696967-44152505-recipient')
16
- expect(inbox.messages.last).to include(id: '1419710848-46252175-recipient')
14
+ describe '#get' do
15
+ let(:first_expected_id) { '1419696967-44152505-recipient' }
16
+ let(:second_expected_id) { '1419710848-46252175-recipient' }
17
+
18
+ it 'fetches the inbox' do
19
+ expect(inbox.messages).to be_a(Array)
20
+ expect(inbox.original).to be_a(Hash)
21
+ expect(inbox.messages.first).to include(id: first_expected_id)
22
+ expect(inbox.messages.last).to include(id: second_expected_id)
23
+ end
24
+ end
25
+
26
+ describe '#download' do
27
+ it 'downloads an email' do
28
+ expect(inbox.messages.first.download).to be_a(Mailinator::Models::Email)
29
+ expect(inbox.messages.first.download)
30
+ .to eq(Mailinator::Email.get(inbox.messages.first.id))
31
+
32
+ inbox.messages.first.download do |message|
33
+ expect(message).to eq(Mailinator::Email.get(inbox.messages.first.id))
34
+ end
35
+ end
17
36
  end
18
37
 
19
- it 'should #download an email' do
20
- expect(inbox.messages.first.download).to be_a(Mailinator::Models::Email)
21
- expect(inbox.messages.first.download).to eq(Mailinator::Email.get(inbox.messages.first.id))
22
- inbox.messages.first.download do |message|
23
- expect(message).to eq(Mailinator::Email.get(inbox.messages.first.id))
38
+ describe '#delete' do
39
+ it 'deletes an email' do
40
+ expect(inbox.messages.first.delete).to eq('status' => 'ok')
24
41
  end
25
42
  end
26
43
  end
@@ -1,32 +1,38 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Mailinator::Models::Base do
4
6
 
5
- let(:data) { {custom: :custom} }
6
-
7
- it 'should #transform_data with defaults' do
8
- class CustomModel < Mailinator::Models::Base; end
7
+ let(:data) { { custom: :custom } }
9
8
 
10
- klass = CustomModel.new(data)
9
+ describe '#transform_data ' do
10
+ let(:klass) { CustomModel.new(data) }
11
11
 
12
- expect(klass).to be_a(Mailinator::Models::Base)
13
- expect(klass.custom).to eq(data[:custom])
14
- expect(klass.original).to eq(data)
15
- end
12
+ context 'when default class' do
13
+ class CustomModel < Mailinator::Models::Base; end
16
14
 
17
- it 'should #transform_data' do
18
- class CustomModel < Mailinator::Models::Base
19
- def transform_data
20
- {
21
- custom: @data[:custom]
22
- }
15
+ it 'merges data with defaults' do
16
+ expect(klass).to be_a(Mailinator::Models::Base)
17
+ expect(klass.custom).to eq(data[:custom])
18
+ expect(klass.original).to eq(data)
23
19
  end
24
20
  end
25
21
 
26
- klass = CustomModel.new(data)
27
-
28
- expect(klass).to be_a(Mailinator::Models::Base)
29
- expect(klass.custom).to eq(data[:custom])
30
- expect(klass.original).to eq(data)
22
+ context 'when custom class' do
23
+ it 'defines methods out of a hash' do
24
+ class CustomModel < Mailinator::Models::Base
25
+ def transform_data
26
+ {
27
+ foo: @data[:custom]
28
+ }
29
+ end
30
+ end
31
+
32
+ expect(klass).to be_a(Mailinator::Models::Base)
33
+ expect(klass.foo).to eq(data[:custom])
34
+ expect(klass.original).to eq(data)
35
+ end
36
+ end
31
37
  end
32
38
  end
@@ -1,20 +1,31 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Mailinator do
6
+ subject { described_class }
7
+
4
8
  describe 'configuration' do
5
9
  let(:token) { 'ABCD' }
6
10
 
7
- it 'should configure the token' do
8
- Mailinator.configure do |config|
9
- config.token = token
11
+ context 'when using a block' do
12
+ before do
13
+ subject.configure do |config|
14
+ config.token = token
15
+ end
10
16
  end
11
17
 
12
- expect(Mailinator.config.token).to eq token
18
+ it 'configures the token' do
19
+ expect(subject.config.token).to eq token
20
+ end
13
21
  end
14
22
 
15
- it 'should configure the token, short version' do
16
- Mailinator.config.token = token
17
- expect(Mailinator.config.token).to eq token
23
+ context 'when using the short version' do
24
+ before { subject.config.token = token }
25
+
26
+ it 'configures the token, short version' do
27
+ expect(subject.config.token).to eq token
28
+ end
18
29
  end
19
30
  end
20
31
  end
@@ -1,4 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'mailinator'
4
+ require 'coveralls'
5
+
6
+ Coveralls.wear!
2
7
 
3
8
  Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
4
9
 
@@ -6,4 +11,12 @@ RSpec.configure do |config|
6
11
  config.color = true
7
12
  config.filter_run focus: true
8
13
  config.run_all_when_everything_filtered = true
14
+
15
+ config.before(:suite) do
16
+ FakeWeb.allow_net_connect = false
17
+ end
18
+
19
+ config.after(:suite) do
20
+ FakeWeb.allow_net_connect = true
21
+ end
9
22
  end
@@ -1,11 +1,10 @@
1
- require 'fakeweb'
1
+ # frozen_string_literal: true
2
2
 
3
- FakeWeb.allow_net_connect = false
3
+ require 'fakeweb'
4
4
 
5
5
  def fixture_file(filename)
6
6
  return '' if filename == ''
7
-
8
- file_path = File.join(File.expand_path(File.dirname(__FILE__)), '../', 'fixtures/', filename)
7
+ file_path = File.join(__dir__, '../', 'fixtures/', filename)
9
8
  File.read(file_path)
10
9
  end
11
10
 
@@ -19,6 +18,10 @@ register_uri('https://api.mailinator.com/api/email?msgid=abcd1234plain&token=ABC
19
18
  register_uri('https://api.mailinator.com/api/email?msgid=1419696967-44152505-recipient&token=ABCD', 'email.response')
20
19
  register_uri('https://api.mailinator.com/api/not-found?token=ABCD', 'not-found.response')
21
20
  register_uri('https://api.mailinator.com/api/error?token=ABCD', 'error.response')
21
+ register_uri('https://api.mailinator.com/api/delete?msgid=abcd1234&token=ABCD', 'delete.response')
22
+ register_uri('https://api.mailinator.com/api/delete?msgid=1419696967-44152505-recipient&token=ABCD', 'delete.response')
23
+ register_uri('https://api.mailinator.com/api/inbox?private_domain=true&to=abcd1234&token=ABCD', 'inbox_private.response')
24
+ register_uri('https://api.mailinator.com/api/email?private_domain=true&msgid=1419696967-44152505-recipient&token=ABCD', 'email_private.response')
22
25
 
23
26
  # NOTE: fix for travis ruby 1.9.3
24
27
  # it replaces https:// to http://:443
@@ -28,3 +31,7 @@ register_uri('http://api.mailinator.com:443/api/email?msgid=abcd1234plain&token=
28
31
  register_uri('http://api.mailinator.com:443/api/email?msgid=1419696967-44152505-recipient&token=ABCD', 'email.response')
29
32
  register_uri('http://api.mailinator.com:443/api/not-found?token=ABCD', 'not-found.response')
30
33
  register_uri('http://api.mailinator.com:443/api/error?token=ABCD', 'error.response')
34
+ register_uri('http://api.mailinator.com:443/api/delete?msgid=abcd1234&token=ABCD', 'delete.response')
35
+ register_uri('http://api.mailinator.com:443/api/delete?msgid=1419696967-44152505-recipient&token=ABCD', 'delete.response')
36
+ register_uri('http://api.mailinator.com:443/api/inbox?private_domain=true&to=abcd1234&token=ABCD', 'inbox_private.response')
37
+ register_uri('http://api.mailinator.com:443/api/email?private_domain=true&msgid=1419696967-44152505-recipient&token=ABCD', 'email_private.response')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Dev.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-02 00:00:00.000000000 Z
11
+ date: 2018-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.4
19
+ version: 3.5.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.4.4
26
+ version: 3.5.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.7'
33
+ version: 1.16.2
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.7'
40
+ version: 1.16.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 11.1.2
47
+ version: 12.3.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 11.1.2
54
+ version: 12.3.1
55
55
  description:
56
56
  email:
57
57
  - aeinformatico@gmail.com
@@ -62,6 +62,7 @@ files:
62
62
  - ".gitignore"
63
63
  - ".travis.yml"
64
64
  - Gemfile
65
+ - Gemfile.lock
65
66
  - Guardfile
66
67
  - LICENSE.txt
67
68
  - README.md
@@ -77,14 +78,18 @@ files:
77
78
  - lib/mailinator/models/inbox.rb
78
79
  - lib/mailinator/version.rb
79
80
  - mailinator.gemspec
81
+ - spec/fixtures/delete.response
80
82
  - spec/fixtures/email-plain.response
81
83
  - spec/fixtures/email.response
84
+ - spec/fixtures/email_private.response
82
85
  - spec/fixtures/error.response
83
86
  - spec/fixtures/inbox.response
87
+ - spec/fixtures/inbox_private.response
84
88
  - spec/fixtures/not-found.response
85
89
  - spec/lib/mailinator/api_spec.rb
86
90
  - spec/lib/mailinator/config_spec.rb
87
91
  - spec/lib/mailinator/email_spec.rb
92
+ - spec/lib/mailinator/inbox_private_spec.rb
88
93
  - spec/lib/mailinator/inbox_spec.rb
89
94
  - spec/lib/mailinator/model_spec.rb
90
95
  - spec/mailinator_spec.rb
@@ -110,19 +115,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
115
  version: '0'
111
116
  requirements: []
112
117
  rubyforge_project:
113
- rubygems_version: 2.2.2
118
+ rubygems_version: 2.6.11
114
119
  signing_key:
115
120
  specification_version: 4
116
121
  summary: Mailinator REST API wrapper
117
122
  test_files:
123
+ - spec/fixtures/delete.response
118
124
  - spec/fixtures/email-plain.response
119
125
  - spec/fixtures/email.response
126
+ - spec/fixtures/email_private.response
120
127
  - spec/fixtures/error.response
121
128
  - spec/fixtures/inbox.response
129
+ - spec/fixtures/inbox_private.response
122
130
  - spec/fixtures/not-found.response
123
131
  - spec/lib/mailinator/api_spec.rb
124
132
  - spec/lib/mailinator/config_spec.rb
125
133
  - spec/lib/mailinator/email_spec.rb
134
+ - spec/lib/mailinator/inbox_private_spec.rb
126
135
  - spec/lib/mailinator/inbox_spec.rb
127
136
  - spec/lib/mailinator/model_spec.rb
128
137
  - spec/mailinator_spec.rb