mailkick 0.1.6 → 0.2.0

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: 1f87170752ac89e4482f6f10211bfcd3c0e12f3d
4
- data.tar.gz: 48e44c8d786a2b75fe34bc1d9435932e4fb8b5ec
3
+ metadata.gz: 76321359a2413e9e97430e88ffa1bdea99830e5e
4
+ data.tar.gz: 670f814ee9ed48dd9b538f9ed23be64616ab65ee
5
5
  SHA512:
6
- metadata.gz: 98fd63a5858b70759ea11bbe64666cdea206744bd3ec6896f7ab8f1e2ea115c80e502923b03f6c171405b7be0cc23f6caed6e4f4c4cf9f3be55a964c02573aa5
7
- data.tar.gz: f358a7f4df99d494f267d4c59c5982da6d1d20ee585663e72dae8bf64fd100d064ddbf77f6fbdc386a24cf52c91ad86a73c1d4801448b78333b2ece9c7e7b9dd
6
+ metadata.gz: b73507e59e778e21879cea81b8f8a566baf4f890ca96faadae085d291996ee61ca893d3edea51cea24ed85e0258cafaac5b59769d85dcb87895b39ca4082c055
7
+ data.tar.gz: fa53579ac51115bc51fd925bb293828756c732a60a30f8fca44ce6f2d6e1bc187a9529e4be17b6869dcfedc6d3ccdabb465f1b787b3d360c754dc9b0f5a00d6b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.0
2
+
3
+ - Added support for Rails 5.1
4
+
1
5
  ## 0.1.6
2
6
 
3
7
  - Fixed error with frozen strings
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in mailkick.gemspec
4
4
  gemspec
5
5
 
6
- gem "actionmailer"
6
+ gem "actionmailer", "~> 5.1.0"
data/Rakefile CHANGED
@@ -5,4 +5,5 @@ task default: :test
5
5
  Rake::TestTask.new do |t|
6
6
  t.libs << "test"
7
7
  t.pattern = "test/**/*_test.rb"
8
+ t.warning = false
8
9
  end
@@ -1,5 +1,7 @@
1
1
  module Mailkick
2
2
  class SubscriptionsController < ActionController::Base
3
+ protect_from_forgery with: :exception
4
+
3
5
  before_action :set_email
4
6
 
5
7
  def show
@@ -22,7 +22,13 @@ module Mailkick
22
22
  end
23
23
 
24
24
  def copy_migration
25
- migration_template "install.rb", "db/migrate/install_mailkick.rb"
25
+ migration_template "install.rb", "db/migrate/install_mailkick.rb", migration_version: migration_version
26
+ end
27
+
28
+ def migration_version
29
+ if ActiveRecord::VERSION::MAJOR >= 5
30
+ "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
31
+ end
26
32
  end
27
33
  end
28
34
  end
@@ -1,4 +1,4 @@
1
- class <%= migration_class_name %> < ActiveRecord::Migration
1
+ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
2
2
  def change
3
3
  create_table :mailkick_opt_outs do |t|
4
4
  t.string :email
@@ -1,3 +1,3 @@
1
1
  module Mailkick
2
- VERSION = "0.1.6"
2
+ VERSION = "0.2.0"
3
3
  end
data/test/test_helper.rb CHANGED
@@ -15,8 +15,8 @@ class UserMailer < ActionMailer::Base
15
15
 
16
16
  def welcome
17
17
  mail to: "test@example.org", subject: "Hello" do |format|
18
- format.html { render text: "<p>%7B%7BMAILKICK_TOKEN%7D%7D</p>" }
19
- format.text { render text: "Boom: %7B%7BMAILKICK_TOKEN%7D%7D" }
18
+ format.html { render plain: "<p>%7B%7BMAILKICK_TOKEN%7D%7D</p>" }
19
+ format.text { render plain: "Boom: %7B%7BMAILKICK_TOKEN%7D%7D" }
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-10 00:00:00.000000000 Z
11
+ date: 2017-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.6.8
138
+ rubygems_version: 2.5.1
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Email subscriptions made easy