postageapp 1.3.0 → 1.3.1

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: 99701f8c8bb6345d893d0e891e4080b574934fd2
4
- data.tar.gz: 96c72f588f097c9a04ed8e0d47dc1ca836f96799
3
+ metadata.gz: eee8e5a9e9b96751117b5069f54aa8ecb833fdf1
4
+ data.tar.gz: 27f7144b8dddb20b7002e83020397b20c2f0bd26
5
5
  SHA512:
6
- metadata.gz: 3bfdec8d06ffb5af34bd0e13897f46986fde993d36009c96aa34d0710e2ff5729415d157b1e7af28448592da86566b272fec80d4ea52d1038c254d506c098ac9
7
- data.tar.gz: 8da78d92e5d62ca7e5a9e7e77d04dd33dee17977a37f372738cb1c58d278f954132f1ae722f04a5c7b9b76e53b05ac1cada4328517b9c8d74aef631ef09da37f
6
+ metadata.gz: b4595cceffe1fc5f6343757db1aef22fbe8529656bf7f30c5c3c7ed53042228d4174e5d26fd2d88bed85e8f7b63976e272faf0265fbb903183876f4d87e27aac
7
+ data.tar.gz: a2491f2ca1da5d85d2a75c2ecf321190449ae1d9f2b6d4faca827c940910cbff06b7cc2f46714af205684f4bec11d7c04114eb016044208c7810822536f7db8c
@@ -8,6 +8,7 @@ rvm:
8
8
  - 2.1.10
9
9
  - 2.2.5
10
10
  - 2.3.1
11
+ - 2.4.1
11
12
  - jruby-9.1.2.0
12
13
  gemfile:
13
14
  - test/gemfiles/Gemfile.ruby
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2015 Scott Tadman, Oleg Khabarov, The Working Group, Inc
1
+ Copyright (c) 2011-2016 Scott Tadman, Oleg Khabarov, PostageApp
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -220,4 +220,4 @@ end
220
220
 
221
221
  # Copyright
222
222
 
223
- (C) 2011-2016 Scott Tadman, Oleg Khabarov, [PostageApp](http://www.postageapp.com/)
223
+ (C) 2011-2017 Scott Tadman, Oleg Khabarov, [PostageApp](http://www.postageapp.com/)
@@ -1,3 +1,3 @@
1
1
  module PostageApp
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.1'.freeze
3
3
  end
@@ -29,6 +29,6 @@ Gem::Specification.new do |s|
29
29
 
30
30
  s.required_ruby_version = '>= 1.9.3'
31
31
 
32
- s.add_dependency 'json', '~> 1.8'
32
+ s.add_dependency 'json', '>= 1.8'
33
33
  s.add_dependency 'mail', '~> 2.4'
34
34
  end
@@ -3,25 +3,29 @@ require_relative './helper'
3
3
  class ConfigurationTest < MiniTest::Test
4
4
  def test_initialization_defaults
5
5
  config = PostageApp::Configuration.new
6
-
6
+
7
7
  assert_equal true, config.secure
8
- assert_equal ENV['POSTAGEAPP_API_KEY'], config.api_key
8
+
9
+ if (ENV['POSTAGEAPP_API_KEY'])
10
+ assert_equal ENV['POSTAGEAPP_API_KEY'], config.api_key
11
+ end
12
+
9
13
  assert_equal 'https', config.scheme
10
14
  assert_equal ENV['POSTAGEAPP_API_HOST'] || 'api.postageapp.com', config.host
11
15
  assert_equal 443, config.port
12
16
 
13
- assert_equal nil, config.proxy_host
17
+ assert_nil config.proxy_host
14
18
  assert_equal 1080, config.proxy_port
15
- assert_equal nil, config.proxy_user
16
- assert_equal nil, config.proxy_pass
19
+ assert_nil config.proxy_user
20
+ assert_nil config.proxy_pass
17
21
 
18
- assert_equal 5, config.http_open_timeout
19
- assert_equal 10, config.http_read_timeout
20
- assert_equal nil, config.recipient_override
22
+ assert_equal 5, config.http_open_timeout
23
+ assert_equal 10, config.http_read_timeout
24
+ assert_nil config.recipient_override
21
25
  assert_equal %w( send_message ), config.requests_to_resend
22
- assert_equal nil, config.project_root
26
+ assert_nil config.project_root
23
27
  assert_equal 'production', config.environment
24
- assert_equal nil, config.logger
28
+ assert_nil config.logger
25
29
  assert_equal 'Ruby', config.framework
26
30
  end
27
31
 
@@ -13,6 +13,8 @@ require 'fileutils'
13
13
  $LOAD_PATH.unshift(File.dirname(__FILE__))
14
14
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
15
15
 
16
+ ENV['POSTAGEAPP_API_KEY'] ||= '__TEST_API_KEY__'
17
+
16
18
  require 'mail'
17
19
 
18
20
  require 'postageapp'
@@ -4,7 +4,7 @@ class LiveTest < MiniTest::Test
4
4
  # Note: Need access to a live PostageApp.com account
5
5
  # See helper.rb to set host / api key
6
6
 
7
- if (ENV['POSTAGEAPP_API_KEY'])
7
+ if (ENV['POSTAGEAPP_API_KEY'] and ENV['POSTAGEAPP_API_KEY'] != '__TEST_API_KEY__')
8
8
  def test_configuration
9
9
  config = PostageApp.config
10
10
 
@@ -19,7 +19,7 @@ class LiveTest < MiniTest::Test
19
19
  assert_equal 'PostageApp::Response', response.class.name
20
20
  assert_equal 'ok', response.status
21
21
  assert_match(/^\w{40}$/, response.uid)
22
- assert_equal nil, response.message
22
+ assert_nil response.message
23
23
  assert_equal(
24
24
  {
25
25
  'methods' => %w[
@@ -67,7 +67,7 @@ class LiveTest < MiniTest::Test
67
67
  assert_equal 'ok', response.status
68
68
 
69
69
  assert_match(/^\w{40}$/, response.uid)
70
- assert_equal nil, response.message
70
+ assert_nil response.message
71
71
  assert_match(/\d+/, response.data['message']['id'].to_s)
72
72
 
73
73
  receipt = PostageApp::Request.new(
@@ -95,7 +95,7 @@ class LiveTest < MiniTest::Test
95
95
 
96
96
  assert_match(/\A\w{40}$/, response.uid)
97
97
  assert_match(/\ARequest could not be processed/, response.message)
98
- assert_equal nil, response.data
98
+ assert_nil response.data
99
99
  end
100
100
 
101
101
  # Testable under ruby 1.9.2 Probably OK in production too... Probably
@@ -34,6 +34,7 @@ class RequestTest < MiniTest::Test
34
34
 
35
35
  args = request.arguments_to_send
36
36
 
37
+ assert args['api_key']
37
38
  assert !args['api_key'].empty?
38
39
  assert_match(/^\w{40}$/, args['uid'])
39
40
 
@@ -122,7 +123,7 @@ class RequestTest < MiniTest::Test
122
123
  response = request.send
123
124
 
124
125
  assert_equal 'fail', response.status
125
- assert_equal nil, response.uid
126
- assert_equal nil, response.data
126
+ assert_nil response.uid
127
+ assert_nil response.data
127
128
  end
128
129
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postageapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Tadman
@@ -10,20 +10,20 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-09-14 00:00:00.000000000 Z
13
+ date: 2017-09-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.8'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - "~>"
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '1.8'
29
29
  - !ruby/object:Gem::Dependency
@@ -51,7 +51,7 @@ files:
51
51
  - ".gitignore"
52
52
  - ".travis.yml"
53
53
  - Gemfile
54
- - LICENSE
54
+ - LICENSE.md
55
55
  - README.md
56
56
  - Rakefile
57
57
  - doc/RAILS2.md
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.5.1
148
+ rubygems_version: 2.5.2
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Client library for PostageApp Email API