workarea-email_signup_popup 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +20 -0
- data/.eslintignore +2 -0
- data/.eslintrc +20 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.gitignore +16 -0
- data/.scss-lint.yml +192 -0
- data/CHANGELOG.md +89 -0
- data/CODE_OF_CONDUCT.md +3 -0
- data/CONTRIBUTING.md +3 -0
- data/Gemfile +6 -0
- data/LICENSE +52 -0
- data/README.md +34 -0
- data/Rakefile +52 -0
- data/app/assets/javascripts/workarea/storefront/email_signup_popup/modules/email_signup_popup.js +34 -0
- data/bin/rails +17 -0
- data/config/initializers/append_points.rb +4 -0
- data/lib/tasks/email_signup_popup_tasks.rake +4 -0
- data/lib/workarea/email_signup_popup.rb +10 -0
- data/lib/workarea/email_signup_popup/engine.rb +8 -0
- data/lib/workarea/email_signup_popup/version.rb +5 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +4 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +34 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +24 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +9 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +54 -0
- data/test/dummy/config/environments/production.rb +86 -0
- data/test/dummy/config/environments/test.rb +43 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/new_framework_defaults.rb +21 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/workarea.rb +5 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/puma.rb +47 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/javascripts/email_signup_popup_spec.js +23 -0
- data/test/javascripts/spec_helper.js +4 -0
- data/test/teaspoon_env.rb +10 -0
- data/test/test_helper.rb +9 -0
- data/workarea-email_signup_popup.gemspec +21 -0
- metadata +136 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
//= require workarea/storefront/spec_helper
|
2
|
+
//= require workarea/storefront/email_signup_popup/modules/email_signup_popup
|
3
|
+
|
4
|
+
(function () {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
describe('WORKAREA.emailSignupPopup', function () {
|
8
|
+
it('requests the email signup page when no cookie is present', function() {
|
9
|
+
var spy = sinon.spy($, 'get');
|
10
|
+
|
11
|
+
WORKAREA.cookie.create('email_signup_popup', '', 999);
|
12
|
+
|
13
|
+
WORKAREA.emailSignupPopup.init();
|
14
|
+
expect(WORKAREA.cookie.read('email_signup_popup')).to.equal('true');
|
15
|
+
|
16
|
+
WORKAREA.emailSignupPopup.init();
|
17
|
+
expect(spy.calledOnce).to.equal(true);
|
18
|
+
|
19
|
+
WORKAREA.cookie.create('email_signup_popup', '', 999);
|
20
|
+
$.get.restore();
|
21
|
+
});
|
22
|
+
});
|
23
|
+
}());
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'workarea/testing/teaspoon'
|
2
|
+
|
3
|
+
Teaspoon.configure do |config|
|
4
|
+
config.root = Workarea::EmailSignupPopup::Engine.root
|
5
|
+
Workarea::Teaspoon.apply(config)
|
6
|
+
|
7
|
+
config.suite do |suite|
|
8
|
+
suite.stylesheets += ['workarea/storefront/application']
|
9
|
+
end
|
10
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV['RAILS_ENV'] = 'test'
|
3
|
+
require File.expand_path('../../test/dummy/config/environment.rb', __FILE__)
|
4
|
+
require 'rails/test_help'
|
5
|
+
require 'workarea/test_help'
|
6
|
+
|
7
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
8
|
+
# to be shown.
|
9
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
@@ -0,0 +1,21 @@
|
|
1
|
+
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
2
|
+
|
3
|
+
# Maintain your gem's version:
|
4
|
+
require 'workarea/email_signup_popup/version'
|
5
|
+
|
6
|
+
# Describe your gem and declare its dependencies:
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'workarea-email_signup_popup'
|
9
|
+
s.version = Workarea::EmailSignupPopup::VERSION
|
10
|
+
s.authors = ['Matt Duffy']
|
11
|
+
s.email = ['mduffy@workarea.com']
|
12
|
+
s.homepage = 'https://github.com/workarea-commerce/workarea-email-signup-popup'
|
13
|
+
s.summary = 'Email Signup popup plugin for Workarea Commerce Platform'
|
14
|
+
s.description = 'Adds JavaScript to prompt user to signup for emails on the Workarea Commerce Platform'
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.license = 'Business Software License'
|
17
|
+
|
18
|
+
s.required_ruby_version = '>= 2.0.0'
|
19
|
+
|
20
|
+
s.add_dependency 'workarea', '~> 3.x'
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: workarea-email_signup_popup
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matt Duffy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-08-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: workarea
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.x
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.x
|
27
|
+
description: Adds JavaScript to prompt user to signup for emails on the Workarea Commerce
|
28
|
+
Platform
|
29
|
+
email:
|
30
|
+
- mduffy@workarea.com
|
31
|
+
executables: []
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- ".editorconfig"
|
36
|
+
- ".eslintignore"
|
37
|
+
- ".eslintrc"
|
38
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
39
|
+
- ".github/ISSUE_TEMPLATE/documentation-request.md"
|
40
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
41
|
+
- ".gitignore"
|
42
|
+
- ".scss-lint.yml"
|
43
|
+
- CHANGELOG.md
|
44
|
+
- CODE_OF_CONDUCT.md
|
45
|
+
- CONTRIBUTING.md
|
46
|
+
- Gemfile
|
47
|
+
- LICENSE
|
48
|
+
- README.md
|
49
|
+
- Rakefile
|
50
|
+
- app/assets/javascripts/workarea/storefront/email_signup_popup/modules/email_signup_popup.js
|
51
|
+
- bin/rails
|
52
|
+
- config/initializers/append_points.rb
|
53
|
+
- lib/tasks/email_signup_popup_tasks.rake
|
54
|
+
- lib/workarea/email_signup_popup.rb
|
55
|
+
- lib/workarea/email_signup_popup/engine.rb
|
56
|
+
- lib/workarea/email_signup_popup/version.rb
|
57
|
+
- test/dummy/Rakefile
|
58
|
+
- test/dummy/app/assets/config/manifest.js
|
59
|
+
- test/dummy/app/assets/images/.keep
|
60
|
+
- test/dummy/app/assets/javascripts/application.js
|
61
|
+
- test/dummy/app/assets/stylesheets/application.css
|
62
|
+
- test/dummy/app/controllers/application_controller.rb
|
63
|
+
- test/dummy/app/controllers/concerns/.keep
|
64
|
+
- test/dummy/app/helpers/application_helper.rb
|
65
|
+
- test/dummy/app/jobs/application_job.rb
|
66
|
+
- test/dummy/app/mailers/application_mailer.rb
|
67
|
+
- test/dummy/app/models/concerns/.keep
|
68
|
+
- test/dummy/app/views/layouts/application.html.erb
|
69
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
70
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
71
|
+
- test/dummy/bin/bundle
|
72
|
+
- test/dummy/bin/rails
|
73
|
+
- test/dummy/bin/rake
|
74
|
+
- test/dummy/bin/setup
|
75
|
+
- test/dummy/bin/update
|
76
|
+
- test/dummy/config.ru
|
77
|
+
- test/dummy/config/application.rb
|
78
|
+
- test/dummy/config/boot.rb
|
79
|
+
- test/dummy/config/cable.yml
|
80
|
+
- test/dummy/config/environment.rb
|
81
|
+
- test/dummy/config/environments/development.rb
|
82
|
+
- test/dummy/config/environments/production.rb
|
83
|
+
- test/dummy/config/environments/test.rb
|
84
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
85
|
+
- test/dummy/config/initializers/assets.rb
|
86
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
87
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
88
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
89
|
+
- test/dummy/config/initializers/inflections.rb
|
90
|
+
- test/dummy/config/initializers/mime_types.rb
|
91
|
+
- test/dummy/config/initializers/new_framework_defaults.rb
|
92
|
+
- test/dummy/config/initializers/session_store.rb
|
93
|
+
- test/dummy/config/initializers/workarea.rb
|
94
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
95
|
+
- test/dummy/config/locales/en.yml
|
96
|
+
- test/dummy/config/puma.rb
|
97
|
+
- test/dummy/config/routes.rb
|
98
|
+
- test/dummy/config/secrets.yml
|
99
|
+
- test/dummy/config/spring.rb
|
100
|
+
- test/dummy/lib/assets/.keep
|
101
|
+
- test/dummy/log/.keep
|
102
|
+
- test/dummy/public/404.html
|
103
|
+
- test/dummy/public/422.html
|
104
|
+
- test/dummy/public/500.html
|
105
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
106
|
+
- test/dummy/public/apple-touch-icon.png
|
107
|
+
- test/dummy/public/favicon.ico
|
108
|
+
- test/javascripts/email_signup_popup_spec.js
|
109
|
+
- test/javascripts/spec_helper.js
|
110
|
+
- test/teaspoon_env.rb
|
111
|
+
- test/test_helper.rb
|
112
|
+
- workarea-email_signup_popup.gemspec
|
113
|
+
homepage: https://github.com/workarea-commerce/workarea-email-signup-popup
|
114
|
+
licenses:
|
115
|
+
- Business Software License
|
116
|
+
metadata: {}
|
117
|
+
post_install_message:
|
118
|
+
rdoc_options: []
|
119
|
+
require_paths:
|
120
|
+
- lib
|
121
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 2.0.0
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
requirements: []
|
132
|
+
rubygems_version: 3.0.4
|
133
|
+
signing_key:
|
134
|
+
specification_version: 4
|
135
|
+
summary: Email Signup popup plugin for Workarea Commerce Platform
|
136
|
+
test_files: []
|