mailinator 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7efcb76908b0e9f39c3555c0c0447a1f5ed36c01
4
- data.tar.gz: 74d3502adfb850d8f1e1b6a965878ae7c637281b
3
+ metadata.gz: 10f12c48f1b71d26578d3717df3fd82253a318fa
4
+ data.tar.gz: 01632b4025b16d889b6459c6f81de18453b8b210
5
5
  SHA512:
6
- metadata.gz: 77b2108f3a333285681ff4e58828b3470b4dcba9ab663d068e416c7a884baa8c6c278b705d2fc169cac54ebb9678111f6d23902bbd361b7db2dc54a54304a6ad
7
- data.tar.gz: 097a2073cab6f220e2f650036f6d44c743db2e0537b09afd65d663832110e520b93126be84cd7b52828cb663803f8ca29950ac877f58536a0730d593347671cd
6
+ metadata.gz: 2a75f51b758f713126ded94a1f1b08e39c04c3663b634638030230950889a291008398f784d95c2a613995ef8ad108f058f8eec107a15d94f737949347be1617
7
+ data.tar.gz: 2c247d0ab084a4890c04af23808dc385955f67503e9c16d1d886f141c4808869d4dbde59a27463b54f06f4dd1c46db54d961b55b399bf25ff3154b7f48d9712d
@@ -10,3 +10,5 @@ rvm:
10
10
  - 2.1.5
11
11
  - 2.2.0
12
12
  bundler_args: --without debug
13
+ before_install:
14
+ - gem update bundler
data/Gemfile CHANGED
@@ -4,14 +4,15 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :development do
7
- gem 'rubocop', '~> 0.28'
8
- gem 'rspec', '~> 3.1'
9
- gem 'guard', '~> 2.10'
10
- gem 'guard-rspec', '~> 4.5'
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'
11
12
  gem 'fakeweb', '~> 1.3'
12
13
  end
13
14
 
14
15
  group :debug do
15
- gem 'pry', '~> 0.10'
16
- gem 'pry-byebug', '~> 2.0'
16
+ gem 'pry', '~> 0.10.3'
17
+ gem 'pry-byebug', '~> 3.4.0'
17
18
  end
data/README.md CHANGED
@@ -42,6 +42,7 @@ email = Mailinator::Email.get('email-abcd1234')
42
42
  Now you have access to some methods:
43
43
 
44
44
  * `email.id`
45
+ * `email.subject`
45
46
  * `email.body`
46
47
  * `email.body_html`
47
48
  * `email.read?`
@@ -25,7 +25,9 @@ module Mailinator
25
25
  end
26
26
 
27
27
  def perform_request(uri)
28
- Net::HTTP.get_response(uri)
28
+ http = Net::HTTP.new(uri.host, uri.port)
29
+ http.use_ssl = (uri.scheme == 'https')
30
+ http.get(uri.request_uri)
29
31
  end
30
32
 
31
33
  def generate_url(url)
@@ -6,6 +6,7 @@ module Mailinator
6
6
  def transform_data
7
7
  {
8
8
  id: @data['data']['id'],
9
+ subject: @data['data']['subject'],
9
10
  body: @data['data']['parts'].first['body'],
10
11
  body_html: retrieve_body_html,
11
12
  inbox_fetches_left: @data['apiInboxFetchesLeft'],
@@ -1,3 +1,3 @@
1
1
  module Mailinator
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.add_dependency 'hashie', '~> 3.3'
20
+ spec.add_dependency 'hashie', '~> 3.4.4'
21
21
 
22
- spec.add_development_dependency 'bundler', '~> 1.6'
23
- spec.add_development_dependency 'rake', '~> 10.0'
22
+ spec.add_development_dependency 'bundler', '~> 1.7'
23
+ spec.add_development_dependency 'rake', '~> 11.1.2'
24
24
  end
@@ -32,8 +32,8 @@ describe Mailinator::Api do
32
32
  .with(url, params)
33
33
  .and_call_original
34
34
 
35
- expect(Net::HTTP)
36
- .to receive(:get_response)
35
+ expect(api)
36
+ .to receive(:perform_request)
37
37
  .with(uri) { response }
38
38
 
39
39
  api.get(url, params)
@@ -11,6 +11,7 @@ describe Mailinator::Email do
11
11
  body = 'This is a body'
12
12
  message = Mailinator::Email.get('abcd1234')
13
13
  expect(message.id).to eq('1419696967-44152505-recipient')
14
+ expect(message.subject).to eq('This is a subject')
14
15
  expect(message.body).to eq(body)
15
16
  expect(message.body_html).to include("<p>#{body}</p>")
16
17
  expect(message.read?).to_not be
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Dev.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-09 00:00:00.000000000 Z
11
+ date: 2016-06-02 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.3'
19
+ version: 3.4.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.3'
26
+ version: 3.4.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.6'
33
+ version: '1.7'
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.6'
40
+ version: '1.7'
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: '10.0'
47
+ version: 11.1.2
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: '10.0'
54
+ version: 11.1.2
55
55
  description:
56
56
  email:
57
57
  - aeinformatico@gmail.com