diversion 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +193 -0
- data/Rakefile +7 -0
- data/diversion.gemspec +40 -0
- data/lib/diversion.rb +35 -0
- data/lib/diversion/client.rb +21 -0
- data/lib/diversion/configurable.rb +100 -0
- data/lib/diversion/decode.rb +21 -0
- data/lib/diversion/decode/json.rb +47 -0
- data/lib/diversion/decode/params.rb +55 -0
- data/lib/diversion/encode.rb +67 -0
- data/lib/diversion/encode/json.rb +31 -0
- data/lib/diversion/encode/params.rb +26 -0
- data/lib/diversion/error.rb +2 -0
- data/lib/diversion/error/bad_url_data_format.rb +6 -0
- data/lib/diversion/error/configuration_error.rb +6 -0
- data/lib/diversion/error/key_missing_error.rb +6 -0
- data/lib/diversion/error/uri_missing_error.rb +6 -0
- data/lib/diversion/mailer.rb +11 -0
- data/lib/diversion/signing.rb +19 -0
- data/lib/diversion/url.rb +43 -0
- data/lib/diversion/version.rb +17 -0
- data/spec/coverage/assets/0.7.1/application.css +1110 -0
- data/spec/coverage/assets/0.7.1/application.js +626 -0
- data/spec/coverage/assets/0.7.1/fancybox/blank.gif +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_close.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_loading.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_nav_left.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_nav_right.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_title_left.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_title_main.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_title_over.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancy_title_right.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancybox-x.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancybox-y.png +0 -0
- data/spec/coverage/assets/0.7.1/fancybox/fancybox.png +0 -0
- data/spec/coverage/assets/0.7.1/favicon_green.png +0 -0
- data/spec/coverage/assets/0.7.1/favicon_red.png +0 -0
- data/spec/coverage/assets/0.7.1/favicon_yellow.png +0 -0
- data/spec/coverage/assets/0.7.1/loading.gif +0 -0
- data/spec/coverage/assets/0.7.1/magnify.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/spec/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/spec/coverage/index.html +3146 -0
- data/spec/diversion/client_spec.rb +23 -0
- data/spec/diversion/configurable_spec.rb +128 -0
- data/spec/diversion/decode/json_decode_spec.rb +70 -0
- data/spec/diversion/decode/params_decode_spec.rb +74 -0
- data/spec/diversion/decode_spec.rb +12 -0
- data/spec/diversion/encode/json_encode_spec.rb +39 -0
- data/spec/diversion/encode/params_encode_spec.rb +39 -0
- data/spec/diversion/encode_spec.rb +30 -0
- data/spec/diversion/mailer_spec.rb +31 -0
- data/spec/diversion/support/global_shared_context.rb +29 -0
- data/spec/diversion/url_spec.rb +36 -0
- data/spec/fixtures/mail.html +13 -0
- data/spec/fixtures/sample_email.multipart +39 -0
- data/spec/fixtures/sample_email.text +12 -0
- data/spec/spec_helper.rb +84 -0
- metadata +323 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
def use_json
|
2
|
+
{ :url_encoding => Diversion::Encode::Json, :url_decoding => Diversion::Decode::Json }
|
3
|
+
end
|
4
|
+
|
5
|
+
def use_params
|
6
|
+
{ :url_encoding => Diversion::Encode::Params, :url_decoding => Diversion::Decode::Params }
|
7
|
+
end
|
8
|
+
|
9
|
+
shared_context 'json' do
|
10
|
+
let(:client) { @client ||= Diversion::Client.new(use_json) }
|
11
|
+
let(:client_sign) { @client ||= Diversion::Client.new(use_json.merge({:sign_length => 32, :sign_key => SIGN_KEY})) }
|
12
|
+
let(:encode_email) { @email = client.encode(fixture('mail.html').read, {:a => 1}) }
|
13
|
+
let(:encode_json_html) { client.encode(HTML) }
|
14
|
+
let(:encode_json_html_signed) { client_sign.encode(HTML) }
|
15
|
+
let(:decode_json) { client.decode(JSON_ENCODED) }
|
16
|
+
let(:decode_json_signed) { client_sign.decode(JSON_ENCODED_SIGNED) }
|
17
|
+
let(:decode_json_bad_key) { client_sign.decode(JSON_ENCODED_SIGNED_KEY_BAD) }
|
18
|
+
end
|
19
|
+
|
20
|
+
shared_context 'params' do
|
21
|
+
let(:client) { Diversion::Client.new(use_params) }
|
22
|
+
let(:client_sign) { Diversion::Client.new(use_params.merge({:sign_length => 32, :sign_key => SIGN_KEY})) }
|
23
|
+
let(:encode_email) { @email = client.encode(fixture('mail.html').read, {:a => 1}) }
|
24
|
+
let(:encode_params_html) { client.encode(HTML) }
|
25
|
+
let(:encode_params_html_signed) { client_sign.encode(HTML) }
|
26
|
+
let(:decode_params) { client.decode(PARAMS_ENCODED) }
|
27
|
+
let(:decode_params_signed) { client_sign.decode(PARAMS_ENCODED_SIGNED) }
|
28
|
+
let(:decode_params_bad_key) { client_sign.decode(PARAMS_ENCODED_SIGNED_KEY_BAD) }
|
29
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Diversion::Url do
|
4
|
+
|
5
|
+
# long enough to line break with older routines
|
6
|
+
QUICK_BROWN_TEXT = "https://www.google.co.uk/search?q=if+%240+%3D~+%2Fgem%5Cz%2F&oq=if+%240+%3D~+%2Fgem%5Cz%2F&aqs=chrome.0.57j62l3.352&sourceid=chrome&ie=UTF-8"
|
7
|
+
# encoded result from 1.9.3
|
8
|
+
QUICK_BROWN_ENCODED = Diversion::Url::escape("aHR0cHM6Ly93d3cuZ29vZ2xlLmNvLnVrL3NlYXJjaD9xPWlmKyUyNDArJTNEfislMkZnZW0lNUN6JTJGJm9xPWlmKyUyNDArJTNEfislMkZnZW0lNUN6JTJGJmFxcz1jaHJvbWUuMC41N2o2MmwzLjM1MiZzb3VyY2VpZD1jaHJvbWUmaWU9VVRGLTg=")
|
9
|
+
|
10
|
+
# this tests our assumption that we can encode/decode as we'd expect
|
11
|
+
it "can encode/decode URL successfully" do
|
12
|
+
attrs = { :test => 1234, :url => 'http://somewhere.over.rainbow'}
|
13
|
+
url = "d=#{CGI::escape(attrs.to_param)}&s=testkey"
|
14
|
+
parsed = CGI::parse(url)
|
15
|
+
#puts parsed
|
16
|
+
expect(parsed.length).to eq(2)
|
17
|
+
expect(parsed.has_key?('d')).to be_true
|
18
|
+
expect(parsed.has_key?('s')).to be_true
|
19
|
+
expect(parsed.has_key?('url')).to be_false
|
20
|
+
expect(parsed.has_key?('test')).to be_false
|
21
|
+
expect(parsed['s'].first).to eq("testkey")
|
22
|
+
data = CGI::parse(parsed['d'].first)
|
23
|
+
#puts data
|
24
|
+
expect(data['test'].first).to eq("1234")
|
25
|
+
expect(data['url'].first).to eq("http://somewhere.over.rainbow")
|
26
|
+
end
|
27
|
+
|
28
|
+
it "encodes correctly" do
|
29
|
+
expect(subject.encode_url(QUICK_BROWN_TEXT)).to eq(QUICK_BROWN_ENCODED)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "decodes correctly" do
|
33
|
+
expect(subject.decode_url(QUICK_BROWN_ENCODED)).to eq(QUICK_BROWN_TEXT)
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<p>Dear User</p>
|
2
|
+
|
3
|
+
<p>This is a test email</p>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
<a data-n="r" href="https://twitter.com/intent/tweet?in_reply_to=51113028241989632">Reply</a>
|
7
|
+
<a data-n="rt" href="https://twitter.com/intent/retweet?tweet_id=51113028241989632">Retweet</a>
|
8
|
+
<a data-n="f" href="https://twitter.com/intent/favorite?tweet_id=51113028241989632">Favorite</a>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p>Mail: <a href="mailto:jess@doesnotexist.domain">Send us an email</a></p>
|
12
|
+
|
13
|
+
<p><a href="http://visit.our-homepage.com/">Visit our homepage</a></p>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
|
2
|
+
Delivered-To: nobody@no.where
|
3
|
+
Date: Tue, 02 Apr 2013 00:00:42 +0100
|
4
|
+
From: Mr Fixture <hi@fixtures.nowhere>
|
5
|
+
To: nobody@no.where
|
6
|
+
Message-ID: <515a119a3b0af_728046196223316bf@pinpoint.mail>
|
7
|
+
Subject: Test fixture
|
8
|
+
Mime-Version: 1.0
|
9
|
+
Content-Type: multipart/alternative;
|
10
|
+
boundary="--==_mimepart_515a119a33ca7_728046196223313b8";
|
11
|
+
charset=UTF-8
|
12
|
+
Content-Transfer-Encoding: 7bit
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
----==_mimepart_515a119a33ca7_728046196223313b8
|
17
|
+
Date: Tue, 02 Apr 2013 00:00:42 +0100
|
18
|
+
Mime-Version: 1.0
|
19
|
+
Content-Type: text/plain;
|
20
|
+
charset=UTF-8
|
21
|
+
Content-Transfer-Encoding: 7bit
|
22
|
+
Content-ID: <515a119a38906_72804619622331456@pinpoint.mail>
|
23
|
+
|
24
|
+
http://www.youtube.com/watch?v=FE_9CzLCbkY
|
25
|
+
https://www.youtube.com/watch?v=OyQ6pqPFwTI
|
26
|
+
|
27
|
+
----==_mimepart_515a119a33ca7_728046196223313b8
|
28
|
+
Date: Tue, 02 Apr 2013 00:00:42 +0100
|
29
|
+
Mime-Version: 1.0
|
30
|
+
Content-Type: text/html;
|
31
|
+
charset=UTF-8
|
32
|
+
Content-Transfer-Encoding: 7bit
|
33
|
+
Content-ID: <515a119a39da8_728046196223315fd@pinpoint.mail>
|
34
|
+
|
35
|
+
<a href="http://www.youtube.com/watch?v=FE_9CzLCbkY">Dream of the 90s</a>
|
36
|
+
<a href="https://www.youtube.com/watch?v=OyQ6pqPFwTI">Customers only</a>
|
37
|
+
|
38
|
+
|
39
|
+
----==_mimepart_515a119a33ca7_728046196223313b8--
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
Delivered-To: nobody@no.where
|
3
|
+
Date: Tue, 02 Apr 2013 00:00:42 +0100
|
4
|
+
From: Mr Fixture <hi@fixtures.nowhere>
|
5
|
+
To: nobody@no.where
|
6
|
+
Message-ID: <515a119a3b0af_728046196223316bf@pinpoint.mail>
|
7
|
+
Subject: Test fixture
|
8
|
+
|
9
|
+
|
10
|
+
http://www.youtube.com/watch?v=FE_9CzLCbkY
|
11
|
+
http://www.youtube.com/watch?v=OyQ6pqPFwTI
|
12
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
4
|
+
SimpleCov::Formatter::HTMLFormatter,
|
5
|
+
Coveralls::SimpleCov::Formatter
|
6
|
+
]
|
7
|
+
if RUBY_VERSION >= '1.9'
|
8
|
+
SimpleCov.start do
|
9
|
+
add_group 'Libraries', 'lib'
|
10
|
+
add_group 'Spec', 'spec'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'action_mailer'
|
15
|
+
require 'mail'
|
16
|
+
|
17
|
+
require "diversion"
|
18
|
+
require 'diversion/support/global_shared_context'
|
19
|
+
|
20
|
+
SIGN_KEY = "abcdefghijklmnopqrstuvwzxy"
|
21
|
+
|
22
|
+
HTML = '<a data-test="1234" href="http://test.com/test">test</a>'
|
23
|
+
HTML_ATTRIBS = { :test => 1234, :url => 'http://test.com/test'}
|
24
|
+
|
25
|
+
DEFAULT_SIGN_LEN = 32
|
26
|
+
KEY_BAD = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
27
|
+
|
28
|
+
#json
|
29
|
+
JSON_RAW = HTML_ATTRIBS.to_json
|
30
|
+
JSON_ENCODED = Diversion::Url::encode_url(JSON_RAW)
|
31
|
+
JSON_HTML = "<a href=\"http://localhost.domain/redirect/1/#{JSON_ENCODED}\">test</a>"
|
32
|
+
JSON_KEY = HMAC::MD5.new(SIGN_KEY).update(JSON_RAW).hexdigest[0..DEFAULT_SIGN_LEN-1]
|
33
|
+
JSON_KEY_BAD = KEY_BAD
|
34
|
+
JSON_ENCODED_SIGNED = "#{JSON_ENCODED}-#{JSON_KEY}"
|
35
|
+
JSON_ENCODED_SIGNED_KEY_BAD = "#{JSON_ENCODED}-#{JSON_KEY_BAD}"
|
36
|
+
|
37
|
+
# params
|
38
|
+
PARAMS_KEY = '6b18e4b2864ab25c7fde6116eb942080'
|
39
|
+
PARAMS_KEY_BAD = KEY_BAD
|
40
|
+
PARAMS_ENCODED = "d=#{CGI::escape(HTML_ATTRIBS.to_param)}"
|
41
|
+
PARAMS_ENCODED_SIGNED = "#{PARAMS_ENCODED}&s=6b18e4b2864ab25c7fde6116eb942080"
|
42
|
+
PARAMS_ENCODED_SIGNED_KEY_BAD = "#{PARAMS_ENCODED}&s=#{PARAMS_KEY_BAD}"
|
43
|
+
|
44
|
+
RSpec.configure do |config|
|
45
|
+
config.expect_with :rspec do |c|
|
46
|
+
c.syntax = :expect
|
47
|
+
end
|
48
|
+
config.color_enabled = true
|
49
|
+
end
|
50
|
+
|
51
|
+
def fixture_path
|
52
|
+
File.expand_path("../fixtures", __FILE__)
|
53
|
+
end
|
54
|
+
|
55
|
+
def fixture(file)
|
56
|
+
File.new(fixture_path + '/' + file)
|
57
|
+
end
|
58
|
+
|
59
|
+
def sample_default_opts
|
60
|
+
{ :port => 80, :sign_length => 0 }
|
61
|
+
end
|
62
|
+
|
63
|
+
def html_json_encoded(opts = {})
|
64
|
+
opts = sample_default_opts.merge(opts)
|
65
|
+
key = ""
|
66
|
+
unless opts[:sign_length] == 0
|
67
|
+
key = "-#{JSON_KEY[0..opts[:sign_length]-1]}"
|
68
|
+
end
|
69
|
+
return "<a href=\"http://localhost.domain/redirect/1/#{JSON_ENCODED}#{key}\">test</a>" if opts[:port] == 80
|
70
|
+
"<a href=\"http://localhost.domain:#{opts[:port]}/redirect/1/#{JSON_ENCODED}#{key}\">test</a>"
|
71
|
+
end
|
72
|
+
|
73
|
+
def html_params_encoded(opts = {})
|
74
|
+
opts = sample_default_opts.merge(opts)
|
75
|
+
if opts[:sign_length] == 0
|
76
|
+
path = PARAMS_ENCODED
|
77
|
+
else
|
78
|
+
path = PARAMS_ENCODED_SIGNED
|
79
|
+
key = "#{PARAMS_KEY[0..opts[:sign_length]-1]}"
|
80
|
+
path = path.gsub(PARAMS_KEY, key)
|
81
|
+
end
|
82
|
+
return "<a href=\"http://localhost.domain/redirect/1/?#{path}\">test</a>" if opts[:port] == 80
|
83
|
+
"<a href=\"http://localhost.domain:#{opts[:port]}/redirect/1/?#{path}\">test</a>"
|
84
|
+
end
|
metadata
ADDED
@@ -0,0 +1,323 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: diversion
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Richard Hollis
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDApyaWNo
|
14
|
+
aG9sbGlzMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
|
15
|
+
b20wHhcNMTMwNDAyMTEzODA0WhcNMTQwNDAyMTEzODA0WjBBMRMwEQYDVQQDDApy
|
16
|
+
aWNoaG9sbGlzMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
|
17
|
+
FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9lueRqZlS9BWQ
|
18
|
+
KM2Vt8Ajc7goi4mivw+QfuQTbkk3quGuF/ZFrQuyh/N+GXKJmIt/GPoDphVUOBGo
|
19
|
+
nDMd10NAIdQzHsOzElTAZi85KonMJ8KUG3JTqnomNFjKtxdVSTyi4COSpSemT6Y1
|
20
|
+
WglANxXyG2PtUOypsMjdDmDrZ0zx0N/+Ovg5lGh862f6rDQDk1EGsdUAa1E7cGGu
|
21
|
+
FCIBimJ5t/YX86g0+XedXcMeu8neb7zjIb0TaH5p5N/+hRwWh155kt8EsP9Grz7t
|
22
|
+
SWhepZAEkLouOmUxPD+HdiqjG2ZpwPoANL6VxcikwSNWnLyt2rlVTmpzQO+xxLlk
|
23
|
+
XgC2R1S5AgMBAAGjOTA3MAkGA1UdEwQCMAAwHQYDVR0OBBYEFJV4Ds/CQpyNum5L
|
24
|
+
DxPQvQACsLuGMAsGA1UdDwQEAwIEsDANBgkqhkiG9w0BAQUFAAOCAQEAbzLguX6N
|
25
|
+
G6SZEdxRpjjOyMx7pPqcekb5cz/wkdAA/dL/FMFiYzrVOanY/dkrjjpTjy8AfT5S
|
26
|
+
nzRKDy+iNiI0BZt6SwQT0I1PAeNnwLeGcMpSLHnlKkxRfKTdce13YcfOUB+XYLBD
|
27
|
+
XhleuPSPnlUp74T4V4+/NjPd3zMBaUtxrPiL37Uf/l7pahAb8bIgRxdL7tZpWTKS
|
28
|
+
jMxngAUA3bN08JNJlGZV8l+Ivh9pqExtsQ3XOHjXKKaw3kyrVcOSFUud1sA+6vzt
|
29
|
+
AoGuclv0sqJvLuOBsZ0NvEczKVNXG6a/5yR3B+JwmMwFq1nf637VMChIMcLkLL2U
|
30
|
+
1ABC6ICOYHjTWQ==
|
31
|
+
-----END CERTIFICATE-----
|
32
|
+
date: 2013-04-08 00:00:00.000000000 Z
|
33
|
+
dependencies:
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: activesupport
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
41
|
+
- - <
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '4.1'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '3.0'
|
51
|
+
- - <
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '4.1'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: nokogiri
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
type: :runtime
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: ruby-hmac
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :runtime
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: multi_json
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ~>
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
89
|
+
type: :runtime
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ~>
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: actionmailer
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '3.0'
|
103
|
+
- - <
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '4.1'
|
106
|
+
type: :development
|
107
|
+
prerelease: false
|
108
|
+
version_requirements: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '3.0'
|
113
|
+
- - <
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '4.1'
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: rspec
|
118
|
+
requirement: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
type: :development
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - '>='
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
- !ruby/object:Gem::Dependency
|
131
|
+
name: simplecov
|
132
|
+
requirement: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
type: :development
|
138
|
+
prerelease: false
|
139
|
+
version_requirements: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
- !ruby/object:Gem::Dependency
|
145
|
+
name: coveralls
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - '>='
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
type: :development
|
152
|
+
prerelease: false
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
description: Redirect HTML links through your preferred redirection URL
|
159
|
+
email:
|
160
|
+
- richhollis@gmail.com
|
161
|
+
executables: []
|
162
|
+
extensions: []
|
163
|
+
extra_rdoc_files: []
|
164
|
+
files:
|
165
|
+
- LICENSE.txt
|
166
|
+
- README.md
|
167
|
+
- Rakefile
|
168
|
+
- diversion.gemspec
|
169
|
+
- lib/diversion.rb
|
170
|
+
- lib/diversion/version.rb
|
171
|
+
- lib/diversion/error.rb
|
172
|
+
- lib/diversion/url.rb
|
173
|
+
- lib/diversion/signing.rb
|
174
|
+
- lib/diversion/mailer.rb
|
175
|
+
- lib/diversion/decode/json.rb
|
176
|
+
- lib/diversion/decode/params.rb
|
177
|
+
- lib/diversion/encode/json.rb
|
178
|
+
- lib/diversion/encode/params.rb
|
179
|
+
- lib/diversion/error/key_missing_error.rb
|
180
|
+
- lib/diversion/error/bad_url_data_format.rb
|
181
|
+
- lib/diversion/error/configuration_error.rb
|
182
|
+
- lib/diversion/error/uri_missing_error.rb
|
183
|
+
- lib/diversion/encode.rb
|
184
|
+
- lib/diversion/client.rb
|
185
|
+
- lib/diversion/configurable.rb
|
186
|
+
- lib/diversion/decode.rb
|
187
|
+
- spec/spec_helper.rb
|
188
|
+
- spec/diversion/client_spec.rb
|
189
|
+
- spec/diversion/decode_spec.rb
|
190
|
+
- spec/diversion/support/global_shared_context.rb
|
191
|
+
- spec/diversion/mailer_spec.rb
|
192
|
+
- spec/diversion/url_spec.rb
|
193
|
+
- spec/diversion/decode/params_decode_spec.rb
|
194
|
+
- spec/diversion/decode/json_decode_spec.rb
|
195
|
+
- spec/diversion/encode/json_encode_spec.rb
|
196
|
+
- spec/diversion/encode/params_encode_spec.rb
|
197
|
+
- spec/diversion/encode_spec.rb
|
198
|
+
- spec/diversion/configurable_spec.rb
|
199
|
+
- spec/fixtures/sample_email.multipart
|
200
|
+
- spec/fixtures/mail.html
|
201
|
+
- spec/fixtures/sample_email.text
|
202
|
+
- spec/coverage/assets/0.7.1/favicon_red.png
|
203
|
+
- spec/coverage/assets/0.7.1/application.js
|
204
|
+
- spec/coverage/assets/0.7.1/magnify.png
|
205
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
206
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
207
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png
|
208
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png
|
209
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
210
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
211
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
212
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png
|
213
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
214
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png
|
215
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
216
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
217
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png
|
218
|
+
- spec/coverage/assets/0.7.1/application.css
|
219
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png
|
220
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png
|
221
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_title_right.png
|
222
|
+
- spec/coverage/assets/0.7.1/fancybox/blank.gif
|
223
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_nav_left.png
|
224
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png
|
225
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_nav_right.png
|
226
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_title_main.png
|
227
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_title_left.png
|
228
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_close.png
|
229
|
+
- spec/coverage/assets/0.7.1/fancybox/fancybox.png
|
230
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_loading.png
|
231
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png
|
232
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png
|
233
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png
|
234
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png
|
235
|
+
- spec/coverage/assets/0.7.1/fancybox/fancybox-y.png
|
236
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_title_over.png
|
237
|
+
- spec/coverage/assets/0.7.1/fancybox/fancybox-x.png
|
238
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png
|
239
|
+
- spec/coverage/assets/0.7.1/favicon_yellow.png
|
240
|
+
- spec/coverage/assets/0.7.1/loading.gif
|
241
|
+
- spec/coverage/assets/0.7.1/favicon_green.png
|
242
|
+
- spec/coverage/index.html
|
243
|
+
homepage: https://github.com/richhollis/diversion/
|
244
|
+
licenses:
|
245
|
+
- MIT
|
246
|
+
metadata: {}
|
247
|
+
post_install_message:
|
248
|
+
rdoc_options: []
|
249
|
+
require_paths:
|
250
|
+
- lib
|
251
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
252
|
+
requirements:
|
253
|
+
- - '>='
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
version: '0'
|
256
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
|
+
requirements:
|
258
|
+
- - '>='
|
259
|
+
- !ruby/object:Gem::Version
|
260
|
+
version: '0'
|
261
|
+
requirements: []
|
262
|
+
rubyforge_project:
|
263
|
+
rubygems_version: 2.0.0.rc.2
|
264
|
+
signing_key:
|
265
|
+
specification_version: 4
|
266
|
+
summary: Redirect HTML links through your preferred redirection URL
|
267
|
+
test_files:
|
268
|
+
- spec/spec_helper.rb
|
269
|
+
- spec/diversion/client_spec.rb
|
270
|
+
- spec/diversion/decode_spec.rb
|
271
|
+
- spec/diversion/support/global_shared_context.rb
|
272
|
+
- spec/diversion/mailer_spec.rb
|
273
|
+
- spec/diversion/url_spec.rb
|
274
|
+
- spec/diversion/decode/params_decode_spec.rb
|
275
|
+
- spec/diversion/decode/json_decode_spec.rb
|
276
|
+
- spec/diversion/encode/json_encode_spec.rb
|
277
|
+
- spec/diversion/encode/params_encode_spec.rb
|
278
|
+
- spec/diversion/encode_spec.rb
|
279
|
+
- spec/diversion/configurable_spec.rb
|
280
|
+
- spec/fixtures/sample_email.multipart
|
281
|
+
- spec/fixtures/mail.html
|
282
|
+
- spec/fixtures/sample_email.text
|
283
|
+
- spec/coverage/assets/0.7.1/favicon_red.png
|
284
|
+
- spec/coverage/assets/0.7.1/application.js
|
285
|
+
- spec/coverage/assets/0.7.1/magnify.png
|
286
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
287
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
288
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png
|
289
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png
|
290
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
291
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
292
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
293
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png
|
294
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
295
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png
|
296
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
297
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
298
|
+
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png
|
299
|
+
- spec/coverage/assets/0.7.1/application.css
|
300
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png
|
301
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png
|
302
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_title_right.png
|
303
|
+
- spec/coverage/assets/0.7.1/fancybox/blank.gif
|
304
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_nav_left.png
|
305
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png
|
306
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_nav_right.png
|
307
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_title_main.png
|
308
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_title_left.png
|
309
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_close.png
|
310
|
+
- spec/coverage/assets/0.7.1/fancybox/fancybox.png
|
311
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_loading.png
|
312
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png
|
313
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png
|
314
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png
|
315
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png
|
316
|
+
- spec/coverage/assets/0.7.1/fancybox/fancybox-y.png
|
317
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_title_over.png
|
318
|
+
- spec/coverage/assets/0.7.1/fancybox/fancybox-x.png
|
319
|
+
- spec/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png
|
320
|
+
- spec/coverage/assets/0.7.1/favicon_yellow.png
|
321
|
+
- spec/coverage/assets/0.7.1/loading.gif
|
322
|
+
- spec/coverage/assets/0.7.1/favicon_green.png
|
323
|
+
- spec/coverage/index.html
|