sendgrid-rails 3.0.0 → 3.1.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: 1e0b97f00ec78eb62f01dc83f37ef4db123f66ef
4
- data.tar.gz: 3711e1c714bcc9de24435f778885dccbe5c70dc2
3
+ metadata.gz: 3ae5d873d9e18ffc5cc8b72b14ff451165f8f994
4
+ data.tar.gz: 3e71eec07bc71b8cd8dd093ca4adc8ed02d873f0
5
5
  SHA512:
6
- metadata.gz: 0b5b1def2d5c44a9a8a1706621c6f648a2b92a82e3f4dcaf952327c026edb2d62ff1e4ad6f09bd0155fbdaaf20342ca00e66a7a600369155bf1b16ebd2b3a323
7
- data.tar.gz: 8ae569b05a2e2dd702042cce10d07e066cc2519bcb01d56a652a9930acd3fc5fe2b0b06f4719e699051f4d70ee6e548345389c44d4ce62c3de305b42f2fd6ea8
6
+ metadata.gz: 6f03fd53a91dee556be1f9dfebd15db64c055106fad3832e2be47dc1e2115005bdbb1d08e3b01a37262e27b425a7b5f1ba155b0defeab6492b4e21a16892a8ef
7
+ data.tar.gz: 6400274bd5c3184e8ea3ee3632bd16d1a40f5ecdbd35d453200798105f06a365a1d269c820ee1fa75ab9a6608a05650e032f90bd9d456ff4855e11393024cafc
@@ -119,9 +119,13 @@ Add an invisible image at the end of the email to track e-mail opens. If the ema
119
119
 
120
120
  == Change log
121
121
 
122
+ *v3.1.0*
123
+
124
+ * Introduced `template_id` feature
125
+
122
126
  *v3.0.0*
123
127
 
124
- * Depricated method `:alias_method_chain` has been replaced with `Module#prepend` Ruby 2.0 feature.
128
+ * Depricated method `:alias_method_chain` has been replaced with `Module#prepend` Ruby 2.0 feature
125
129
  * Requires Ruby 2.0+
126
130
 
127
131
  *v2.0.5*
@@ -7,7 +7,7 @@ module SendGrid
7
7
  def self.included(base)
8
8
  base.class_eval do
9
9
  prepend InstanceMethods
10
- delegate :substitute, :uniq_args, :category, :add_filter_setting, :deliver_at, :to => :sendgrid_header
10
+ delegate :substitute, :uniq_args, :category, :add_filter_setting, :deliver_at, :template_id, :to => :sendgrid_header
11
11
  alias_method :sendgrid_header, :send_grid_header
12
12
  end
13
13
  end
@@ -30,6 +30,11 @@ class SendGrid::ApiHeader
30
30
  @data[:send_at] = timestamp
31
31
  end
32
32
 
33
+ def template_id(temp_id)
34
+ add_filter_setting('templates', 'enable', '1')
35
+ add_filter_setting('templates', 'template_id', temp_id)
36
+ end
37
+
33
38
  def to_json
34
39
  JSON.generate(@data, :array_nl => ' ')
35
40
  end
@@ -1,4 +1,4 @@
1
1
  module SendGrid
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
4
4
 
@@ -38,6 +38,11 @@ describe SendGrid::ApiHeader do
38
38
  header.to_json.should eql "{\"send_at\":#{ts}}"
39
39
  end
40
40
 
41
+ it "contains template_id" do
42
+ header.template_id 'template_id_1'
43
+ header.to_json.should eql '{"filters":{"templates":{"settings":{"enable":"1","template_id":"template_id_1"}}}}'
44
+ end
45
+
41
46
  it "contains filter settings" do
42
47
  header.add_filter_setting :filter1, :setting1, 'val1'
43
48
  header.to_json.should eql '{"filters":{"filter1":{"settings":{"setting1":"val1"}}}}'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendgrid-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PavelTyk