aws-ses 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.4.1:
2
+ * Removed many unneeded monkeypatch extensions
3
+ * Tests ( and gem ) run in 1.9.2
4
+
1
5
  0.4.0:
2
6
  * This version may have some small incompatibilities due to adding support for MessageId. Check that the result still matches what you previously expected.
3
7
  * Added MessageId support in responses
data/README.erb CHANGED
@@ -20,7 +20,7 @@ This gem is compatible with Rails >= 3.0.0 and Rails 2.3.x
20
20
 
21
21
  To use, first add the gem to your Gemfile:
22
22
 
23
- gem "aws-ses", "~> 0.4.0", :require => 'aws/ses'
23
+ gem "aws-ses", "~> 0.4.1", :require => 'aws/ses'
24
24
 
25
25
  == For Rails 3.x
26
26
 
data/README.rdoc CHANGED
@@ -118,7 +118,7 @@ This gem is compatible with Rails >= 3.0.0 and Rails 2.3.x
118
118
 
119
119
  To use, first add the gem to your Gemfile:
120
120
 
121
- gem "aws-ses", "~> 0.3.1", :require => 'aws/ses'
121
+ gem "aws-ses", "~> 0.4.1", :require => 'aws/ses'
122
122
 
123
123
  == For Rails 3.x
124
124
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
data/aws-ses.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{aws-ses}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Drew Blas", "Marcel Molina Jr."]
@@ -1,75 +1,4 @@
1
1
  #:stopdoc:
2
- class String
3
- if RUBY_VERSION <= '1.9'
4
- def previous!
5
- self[-1] -= 1
6
- self
7
- end
8
- else
9
- def previous!
10
- self[-1] = (self[-1].ord - 1).chr
11
- self
12
- end
13
- end
14
-
15
- def previous
16
- dup.previous!
17
- end
18
-
19
- def to_header
20
- downcase.tr('_', '-')
21
- end
22
-
23
- # ActiveSupport adds an underscore method to String so let's just use that one if
24
- # we find that the method is already defined
25
- def underscore
26
- gsub(/::/, '/').
27
- gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
28
- gsub(/([a-z\d])([A-Z])/,'\1_\2').
29
- tr("-", "_").downcase
30
- end unless public_method_defined? :underscore
31
-
32
- if RUBY_VERSION >= '1.9'
33
- def valid_utf8?
34
- dup.force_encoding('UTF-8').valid_encoding?
35
- end
36
- else
37
- def valid_utf8?
38
- scan(Regexp.new('[^\x00-\xa0]', nil, 'u')) { |s| s.unpack('U') }
39
- true
40
- rescue ArgumentError
41
- false
42
- end
43
- end
44
-
45
- # All paths in in S3 have to be valid unicode so this takes care of
46
- # cleaning up any strings that aren't valid utf-8 according to String#valid_utf8?
47
- if RUBY_VERSION >= '1.9'
48
- def remove_extended!
49
- sanitized_string = ''
50
- each_byte do |byte|
51
- character = byte.chr
52
- sanitized_string << character if character.ascii_only?
53
- end
54
- sanitized_string
55
- end
56
- else
57
- def remove_extended!
58
- gsub!(/[\x80-\xFF]/) { "%02X" % $&[0] }
59
- end
60
- end
61
-
62
- def remove_extended
63
- dup.remove_extended!
64
- end
65
- end
66
-
67
- class Symbol
68
- def to_header
69
- to_s.to_header
70
- end
71
- end
72
-
73
2
  module Kernel
74
3
  def __method__(depth = 0)
75
4
  caller[depth][/`([^']+)'/, 1]
@@ -91,20 +20,6 @@ module Kernel
91
20
  end
92
21
  instance_variable_set(storage, yield)
93
22
  end
94
-
95
- def require_library_or_gem(library, gem_name = nil)
96
- if RUBY_VERSION >= '1.9'
97
- gem(gem_name || library, '>=0')
98
- end
99
- require library
100
- rescue LoadError => library_not_installed
101
- begin
102
- require 'rubygems'
103
- require library
104
- rescue LoadError
105
- raise library_not_installed
106
- end
107
- end
108
23
  end
109
24
 
110
25
  class Module
@@ -119,26 +34,6 @@ class Module
119
34
  end
120
35
  EVAL
121
36
  end
122
-
123
- def constant(name, value)
124
- unless const_defined?(name)
125
- const_set(name, value)
126
- module_eval(<<-EVAL, __FILE__, __LINE__)
127
- def self.#{name.to_s.downcase}
128
- #{name.to_s}
129
- end
130
- EVAL
131
- end
132
- end
133
37
  end
134
38
 
135
-
136
- class XmlGenerator < String #:nodoc:
137
- attr_reader :xml
138
- def initialize
139
- @xml = Builder::XmlMarkup.new(:indent => 2, :target => self)
140
- super()
141
- build
142
- end
143
- end
144
39
  #:startdoc:
@@ -3,7 +3,7 @@ module AWS
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = '0'
5
5
  MINOR = '4'
6
- TINY = '0'
6
+ TINY = '1'
7
7
  BETA = Time.now.to_i.to_s
8
8
  end
9
9
 
data/test/address_test.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper'
1
+ require File.expand_path('../helper', __FILE__)
2
2
 
3
3
  class AddressTest < Test::Unit::TestCase
4
4
  context 'verifying an address' do
data/test/base_test.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper'
1
+ require File.expand_path('../helper', __FILE__)
2
2
 
3
3
  class BaseTest < Test::Unit::TestCase
4
4
  def test_connection_established
@@ -1,39 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper'
2
-
3
- class StringExtensionsTest < Test::Unit::TestCase
4
- def test_previous
5
- expectations = {'abc' => 'abb', '123' => '122', '1' => '0'}
6
- expectations.each do |before, after|
7
- assert_equal after, before.previous
8
- end
9
- end
10
-
11
- def test_to_header
12
- transformations = {
13
- 'foo' => 'foo',
14
- :foo => 'foo',
15
- 'foo-bar' => 'foo-bar',
16
- 'foo_bar' => 'foo-bar',
17
- :foo_bar => 'foo-bar',
18
- 'Foo-Bar' => 'foo-bar',
19
- 'Foo_Bar' => 'foo-bar'
20
- }
21
-
22
- transformations.each do |before, after|
23
- assert_equal after, before.to_header
24
- end
25
- end
26
-
27
- def test_valid_utf8?
28
- assert !"318597/620065/GTL_75\24300_A600_A610.zip".valid_utf8?
29
- assert "318597/620065/GTL_75£00_A600_A610.zip".valid_utf8?
30
- end
31
-
32
- def test_remove_extended
33
- assert "318597/620065/GTL_75\24300_A600_A610.zip".remove_extended.valid_utf8?
34
- assert "318597/620065/GTL_75£00_A600_A610.zip".remove_extended.valid_utf8?
35
- end
36
- end
1
+ require File.expand_path('../helper', __FILE__)
37
2
 
38
3
  class KerneltExtensionsTest < Test::Unit::TestCase
39
4
  class Foo
@@ -135,29 +100,6 @@ class ModuleExtensionsTest < Test::Unit::TestCase
135
100
  assert_equal new_cache, @instance.send(:instance_variable_get, :@quux)
136
101
  end
137
102
 
138
- def test_constant_setting
139
- some_module = Module.new
140
- assert !some_module.const_defined?(:FOO)
141
- assert_nothing_raised do
142
- some_module.constant :FOO, 'bar'
143
- end
144
-
145
- assert some_module.const_defined?(:FOO)
146
- assert_nothing_raised do
147
- some_module::FOO
148
- some_module.foo
149
- end
150
- assert_equal 'bar', some_module::FOO
151
- assert_equal 'bar', some_module.foo
152
-
153
- assert_nothing_raised do
154
- some_module.constant :FOO, 'baz'
155
- end
156
-
157
- assert_equal 'bar', some_module::FOO
158
- assert_equal 'bar', some_module.foo
159
- end
160
-
161
103
  private
162
104
  # For 1.9 compatibility
163
105
  def instance_variables_of(object)
data/test/info_test.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper'
1
+ require File.expand_path('../helper', __FILE__)
2
2
 
3
3
  class InfoTest < Test::Unit::TestCase
4
4
  context 'getting send quota' do
@@ -1,4 +1,5 @@
1
- require File.dirname(__FILE__) + '/helper'
1
+ require File.expand_path('../helper', __FILE__)
2
+
2
3
  class BaseResponseTest < Test::Unit::TestCase
3
4
  def setup
4
5
  @headers = {'content-type' => 'text/plain', 'date' => Time.now}
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper'
1
+ require File.expand_path('../helper', __FILE__)
2
2
 
3
3
  class SendEmailTest < Test::Unit::TestCase
4
4
  context 'when sending email' do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-ses
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Drew Blas