ama_layout 1.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.simplecov +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +146 -0
- data/Rakefile +2 -0
- data/ama_layout.gemspec +33 -0
- data/app/assets/images/AMA-Logo.png +0 -0
- data/app/assets/images/alberta-blur.jpg +0 -0
- data/app/assets/images/footer-racetrack-big.png +0 -0
- data/app/assets/javascripts/ama_layout/ama_layout_namespace.js.coffee +1 -0
- data/app/assets/javascripts/ama_layout/desktop/drop_down.js.coffee +46 -0
- data/app/assets/javascripts/ama_layout/desktop/foundation-namespace.coffee +2 -0
- data/app/assets/javascripts/ama_layout/desktop/foundation-ready.js.coffee +2 -0
- data/app/assets/javascripts/ama_layout/desktop/header_menu.coffee +3 -0
- data/app/assets/javascripts/ama_layout/desktop/index.js +9 -0
- data/app/assets/javascripts/ama_layout/desktop/ready.js.coffee +3 -0
- data/app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee +16 -0
- data/app/assets/javascripts/ama_layout/desktop/toggle_menu.js.coffee +8 -0
- data/app/assets/javascripts/ama_layout/mobile/index.js +4 -0
- data/app/assets/javascripts/ama_layout/mobile/mobile_menu.js.coffee +11 -0
- data/app/assets/javascripts/ama_layout/mobile/ready.js.coffee +2 -0
- data/app/assets/javascripts/ama_layout/mobile/tablesaw.stackonly.js +277 -0
- data/app/assets/stylesheets/ama_layout/application.scss +10 -0
- data/app/assets/stylesheets/ama_layout/foundation_and_overrides.scss +1486 -0
- data/app/assets/stylesheets/ama_layout/layout/base-styles.scss +60 -0
- data/app/assets/stylesheets/ama_layout/layout/helper-classes.scss +342 -0
- data/app/assets/stylesheets/ama_layout/layout/index.scss +3 -0
- data/app/assets/stylesheets/ama_layout/layout/variables.scss +32 -0
- data/app/assets/stylesheets/ama_layout/layout_components/accordions.scss +24 -0
- data/app/assets/stylesheets/ama_layout/layout_components/blue-boxes.scss +32 -0
- data/app/assets/stylesheets/ama_layout/layout_components/error-messages.scss +9 -0
- data/app/assets/stylesheets/ama_layout/layout_components/error-page.scss +25 -0
- data/app/assets/stylesheets/ama_layout/layout_components/forms.scss +189 -0
- data/app/assets/stylesheets/ama_layout/layout_components/index.scss +8 -0
- data/app/assets/stylesheets/ama_layout/layout_components/responsive-table.scss +175 -0
- data/app/assets/stylesheets/ama_layout/layout_components/sidebar.scss +170 -0
- data/app/assets/stylesheets/ama_layout/layout_components/siteheader.scss +14 -0
- data/app/assets/stylesheets/ama_layout/media_queries/index.scss +3 -0
- data/app/assets/stylesheets/ama_layout/media_queries/mobile-and-tablet.scss +14 -0
- data/app/assets/stylesheets/ama_layout/media_queries/mobile.scss +69 -0
- data/app/assets/stylesheets/ama_layout/media_queries/tablet.scss +13 -0
- data/app/assets/stylesheets/ama_layout/old-ie.scss +74 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.eot +0 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.scss +50 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.svg +982 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.ttf +0 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.woff +0 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons.js +84 -0
- data/app/helpers/ama_layout_content_helper.rb +56 -0
- data/app/helpers/ama_layout_path_helper.rb +69 -0
- data/app/views/ama_layout/_alert.html.erb +3 -0
- data/app/views/ama_layout/_applogo.html.erb +3 -0
- data/app/views/ama_layout/_custom_nav_links.html.erb +0 -0
- data/app/views/ama_layout/_custom_sidebar.html.erb +1 -0
- data/app/views/ama_layout/_footer.html.erb +2 -0
- data/app/views/ama_layout/_main_nav_item.html.erb +7 -0
- data/app/views/ama_layout/_main_top_nav_item.html.erb +5 -0
- data/app/views/ama_layout/_notice.html.erb +5 -0
- data/app/views/ama_layout/_notices.html.erb +2 -0
- data/app/views/ama_layout/_sidebar.html.erb +11 -0
- data/app/views/ama_layout/_siteheader.html.erb +32 -0
- data/app/views/ama_layout/_sub_nav.html.erb +3 -0
- data/app/views/ama_layout/_sub_nav_item.html.erb +3 -0
- data/app/views/ama_layout/_top_nav.html.erb +12 -0
- data/app/views/ama_layout/_top_sub_nav.html.erb +3 -0
- data/app/views/ama_layout/_top_sub_nav_item.html.erb +4 -0
- data/lib/ama_layout.rb +19 -0
- data/lib/ama_layout/decorators/moneris_decorator.rb +9 -0
- data/lib/ama_layout/decorators/navigation_decorator.rb +24 -0
- data/lib/ama_layout/decorators/navigation_item_decorator.rb +30 -0
- data/lib/ama_layout/moneris.rb +12 -0
- data/lib/ama_layout/moneris/textbox.txt +61 -0
- data/lib/ama_layout/navigation.rb +33 -0
- data/lib/ama_layout/navigation.yml +66 -0
- data/lib/ama_layout/navigation_item.rb +21 -0
- data/lib/ama_layout/version.rb +3 -0
- data/spec/helpers/ama_layout_content_helper_spec.rb +131 -0
- data/spec/helpers/ama_layout_path_helper_spec.rb +117 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/routes.rb +3 -0
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/db/schema.rb +3 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/spec_helper.rb +25 -0
- metadata +325 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
module AmaLayout
|
2
|
+
class Navigation
|
3
|
+
include ActiveModel::Model
|
4
|
+
include Draper::Decoratable
|
5
|
+
|
6
|
+
attr_accessor :user, :current_url
|
7
|
+
|
8
|
+
cattr_accessor :member do
|
9
|
+
"member"
|
10
|
+
end
|
11
|
+
cattr_accessor :non_member do
|
12
|
+
"non-member"
|
13
|
+
end
|
14
|
+
cattr_accessor :member_in_renewal do
|
15
|
+
"member-in-renewal"
|
16
|
+
end
|
17
|
+
cattr_accessor :member_in_renewal_late do
|
18
|
+
"member-in-renewal-late"
|
19
|
+
end
|
20
|
+
|
21
|
+
def items
|
22
|
+
navigation_items.fetch(user.try(:navigation), []).map do |n|
|
23
|
+
NavigationItem.new n.merge({ current_url: current_url})
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def navigation_items
|
29
|
+
file = File.join Gem.loaded_specs["ama_layout"].full_gem_path, "lib", "ama_layout", "navigation.yml"
|
30
|
+
YAML.load ERB.new(File.read file).result
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
member:
|
2
|
+
- text: "Account Dashboard"
|
3
|
+
alt: "Back to my dashboard"
|
4
|
+
link: "<%= Rails.configuration.youraccount_site %>/dashboard"
|
5
|
+
icon: "fa-tachometer"
|
6
|
+
- text: "Membership"
|
7
|
+
link: "<%= Rails.configuration.membership_site %>/membership/overview"
|
8
|
+
icon: "fa-credit-card"
|
9
|
+
sub_nav:
|
10
|
+
- text: "Membership Overview"
|
11
|
+
link: "<%= Rails.configuration.membership_site %>/membership/overview"
|
12
|
+
- text: "Manage Membership"
|
13
|
+
link: "<%= Rails.configuration.membership_site %>/membership/manage"
|
14
|
+
- text: "Billing Options"
|
15
|
+
link: "<%= Rails.configuration.youraccount_site %>/billing"
|
16
|
+
- text: "Print/Request New Card"
|
17
|
+
link: "<%= Rails.configuration.youraccount_site %>/membership"
|
18
|
+
- text: "Driver Education"
|
19
|
+
link: "<%= Rails.configuration.driveredonline_site %>/login"
|
20
|
+
icon: "fa-car"
|
21
|
+
- text: "Reward Dollars"
|
22
|
+
link: "<%= Rails.configuration.youraccount_site %>/reward_dollars"
|
23
|
+
icon: "fa-usd"
|
24
|
+
- text: "Reload Esso Gift Cards"
|
25
|
+
link: "<%= Rails.configuration.membership_site %>/reward_cards"
|
26
|
+
icon: "fa-arrow-up"
|
27
|
+
- text: "Settings & Subscriptions"
|
28
|
+
link: "<%= Rails.configuration.gatekeeper_site %>/"
|
29
|
+
icon: "fa-cogs"
|
30
|
+
sub_nav:
|
31
|
+
- text: "Change Email/Password"
|
32
|
+
link: "<%= Rails.configuration.gatekeeper_site %>/user/edit"
|
33
|
+
- text: "Email Subscriptions"
|
34
|
+
link: "<%= Rails.configuration.youraccount_site %>/subscriptions"
|
35
|
+
- text: "Westworld"
|
36
|
+
link: "<%= Rails.configuration.youraccount_site %>/westworld"
|
37
|
+
- text: "Change Address"
|
38
|
+
link: "<%= Rails.configuration.youraccount_site %>/membership_update/new"
|
39
|
+
non-member:
|
40
|
+
- text: "Account Dashboard"
|
41
|
+
alt: "Back to my dashboard"
|
42
|
+
link: "<%= Rails.configuration.gatekeeper_site %>"
|
43
|
+
icon: "fa-tachometer"
|
44
|
+
- text: "Join AMA"
|
45
|
+
alt: "Join AMA"
|
46
|
+
link: <%= Rails.configuration.membership_site %>
|
47
|
+
icon: "fa-credit-card"
|
48
|
+
- text: "Driver Education"
|
49
|
+
link: "<%= Rails.configuration.driveredonline_site %>/login"
|
50
|
+
icon: "fa-car"
|
51
|
+
member-in-renewal:
|
52
|
+
- text: "Account Dashboard"
|
53
|
+
alt: "Back to my dashboard"
|
54
|
+
link: "<%= Rails.configuration.youraccount_site %>/dashboard"
|
55
|
+
icon: "fa-tachometer"
|
56
|
+
- text: "Renew"
|
57
|
+
link: "<%= Rails.configuration.youraccount_site %>/renew"
|
58
|
+
icon: "fa-credit-card"
|
59
|
+
- text: "Driver Education"
|
60
|
+
link: "<%= Rails.configuration.driveredonline_site %>/login"
|
61
|
+
icon: "fa-car"
|
62
|
+
member-in-renewal-late:
|
63
|
+
- text: "Account Dashboard"
|
64
|
+
alt: "Back to my dashboard"
|
65
|
+
link: "<%= Rails.configuration.youraccount_site %>/dashboard"
|
66
|
+
icon: "fa-tachometer"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AmaLayout
|
2
|
+
class NavigationItem
|
3
|
+
include ActiveModel::Model
|
4
|
+
include Draper::Decoratable
|
5
|
+
|
6
|
+
attr_accessor :text, :icon, :link, :target, :alt, :sub_nav, :current_url
|
7
|
+
|
8
|
+
def initialize(args = {})
|
9
|
+
self.current_url = args[:current_url]
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def sub_nav=(items)
|
14
|
+
@sub_nav = items.map { |i| NavigationItem.new i.merge({ current_url: current_url}) }
|
15
|
+
end
|
16
|
+
|
17
|
+
def sub_nav
|
18
|
+
@sub_nav || []
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
describe AmaLayoutContentHelper do
|
2
|
+
let(:greeting) { "DJ Funky Fresh" }
|
3
|
+
let(:site_name) { "Waffle Emporium" }
|
4
|
+
let(:site_domain) { "http://waffleemporium.ca" }
|
5
|
+
let(:site_url) { "#{site_domain}/wafflesauce" }
|
6
|
+
|
7
|
+
describe "#greeting" do
|
8
|
+
it "returns the greeting set in the domain cookie" do
|
9
|
+
helper.request.cookies[:logged_in_meta] = greeting
|
10
|
+
expect(helper.greeting).to eq greeting
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "#utm_source" do
|
15
|
+
it "returns the downcased character-only representation of the site name" do
|
16
|
+
allow(Rails.configuration).to receive(:site_name).and_return(site_name)
|
17
|
+
expect(helper.utm_source).to eq site_name.downcase.gsub(/\W/, "")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "#active_page" do
|
22
|
+
before(:each) do
|
23
|
+
allow(helper.request).to receive(:fullpath).and_return(site_url)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "returns active if the given path matches the request path" do
|
27
|
+
expect(helper.active_page(site_url)).to eq "active"
|
28
|
+
end
|
29
|
+
|
30
|
+
it "returns nothing if the given patch does not match the request path" do
|
31
|
+
expect(helper.active_page("http://waffleemporium.ca/ecuaselffaw")).to be_nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "#active_domain" do
|
36
|
+
before(:each) do
|
37
|
+
allow(helper.request).to receive(:url).and_return(site_url)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "returns active if the request domain matches the given domain" do
|
41
|
+
expect(helper.active_domain(site_domain)).to eq "active"
|
42
|
+
end
|
43
|
+
|
44
|
+
it "returns nothing if the request domain does not match the given domain" do
|
45
|
+
expect(helper.active_domain("http://pancakeemporium.ca")).to be_nil
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe "#renew_or_join_path" do
|
50
|
+
it "returns nothing if the visitor is logged in" do
|
51
|
+
expect(helper.renew_or_join_path(true)).to eq ""
|
52
|
+
end
|
53
|
+
|
54
|
+
it "returns the join link if the visitor is not logged in" do
|
55
|
+
expect(helper.renew_or_join_path(false)).to include "Become a Member"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe "#gift_or_pricing_path" do
|
60
|
+
it "returns nothing if the visitor is logged in" do
|
61
|
+
expect(helper.gift_or_pricing_path(true)).to eq ""
|
62
|
+
end
|
63
|
+
|
64
|
+
it "returns the gift link if the visitor is not logged in" do
|
65
|
+
expect(helper.gift_or_pricing_path(false)).to include "Gift Membership"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe "#dropdown_menu" do
|
70
|
+
let(:render_args) do
|
71
|
+
{ partial: "ama_layout/dropdown_menu", locals: { logged_in: true, greeting: greeting } }
|
72
|
+
end
|
73
|
+
|
74
|
+
it "renders the dropdown menu if the visitor is logged in" do
|
75
|
+
expect(helper).to receive(:render).with(render_args)
|
76
|
+
helper.dropdown_menu(true, greeting)
|
77
|
+
end
|
78
|
+
|
79
|
+
it "does not render the dropdown menu if the visitor is not logged in" do
|
80
|
+
expect(helper.dropdown_menu(false, greeting)).to eq ""
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
describe "#tablet_menu" do
|
85
|
+
let(:render_args) do
|
86
|
+
{ partial: "ama_layout/tablet_menu", locals: { logged_in: true, greeting: greeting } }
|
87
|
+
end
|
88
|
+
|
89
|
+
it "renders the tablet menu if the visitor is logged in" do
|
90
|
+
expect(helper).to receive(:render).with(render_args)
|
91
|
+
helper.tablet_menu(true, greeting)
|
92
|
+
end
|
93
|
+
|
94
|
+
it "does not render the tablet menu if the visitor is not logged in" do
|
95
|
+
expect(helper.tablet_menu(false, greeting)).to eq ""
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "#tablet_signout" do
|
100
|
+
it "renders a signout link if the visitor is logged in" do
|
101
|
+
expect(helper).to receive(:render).with("ama_layout/tablet_signout")
|
102
|
+
helper.tablet_signout(true)
|
103
|
+
end
|
104
|
+
|
105
|
+
it "does not render the tablet menu if the visitor is not logged in" do
|
106
|
+
expect(helper.tablet_signout(false)).to eq ""
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
describe "#notice" do
|
111
|
+
it "renders the notice partial if a notice is present" do
|
112
|
+
expect(helper).to receive(:render).with "ama_layout/notice"
|
113
|
+
helper.notice("This is a notice.")
|
114
|
+
end
|
115
|
+
|
116
|
+
it "does not render the notice partial if a notice is not present" do
|
117
|
+
expect(helper.notice(nil)).to be_nil
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
describe "#alert" do
|
122
|
+
it "renders the alert partial if a alert is present" do
|
123
|
+
expect(helper).to receive(:render).with "ama_layout/alert"
|
124
|
+
helper.alert("This is an alert.")
|
125
|
+
end
|
126
|
+
|
127
|
+
it "does not render the alert partial if a alert is not present" do
|
128
|
+
expect(helper.notice(nil)).to be_nil
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
describe AmaLayoutPathHelper do
|
2
|
+
let(:gatekeeper_site) { "http://auth.waffles.ca" }
|
3
|
+
let(:youraccount_site) { "http://youraccount.waffles.ca" }
|
4
|
+
let(:insurance_site) { "http://insurance.waffles.ca" }
|
5
|
+
let(:membership_site) { "http://membership.waffles.ca" }
|
6
|
+
let(:driveredonline_site) { "http://driveredonline.waffles.ca" }
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
allow(Rails.configuration).to receive(:gatekeeper_site).and_return(gatekeeper_site)
|
10
|
+
allow(Rails.configuration).to receive(:youraccount_site).and_return(youraccount_site)
|
11
|
+
allow(Rails.configuration).to receive(:insurance_site).and_return(insurance_site)
|
12
|
+
allow(Rails.configuration).to receive(:membership_site).and_return(membership_site)
|
13
|
+
allow(Rails.configuration).to receive(:driveredonline_site).and_return(:driveredonline_site)
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "#gatekeeper_profile_path" do
|
17
|
+
it "returns the profile path" do
|
18
|
+
expect(helper.gatekeeper_profile_path).to eq "#{gatekeeper_site}/user/edit"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "#youraccount_dashboard_path" do
|
23
|
+
it "returns the dashboard path" do
|
24
|
+
expect(helper.youraccount_dashboard_path).to eq "#{youraccount_site}/dashboard"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "#youraccount_help_path" do
|
29
|
+
it "returns the help path" do
|
30
|
+
expect(helper.youraccount_help_path).to eq "#{youraccount_site}/help"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe "#youraccount_billing_path" do
|
35
|
+
it "returns the billing path" do
|
36
|
+
expect(helper.youraccount_billing_path).to eq "#{youraccount_site}/billing"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "#youraccount_automatic_credit_card_renewals_path" do
|
41
|
+
it "returns the automatic credit card renewal path" do
|
42
|
+
expect(helper.youraccount_automatic_credit_card_renewals_path).to eq "#{youraccount_site}/automatic_credit_card_renewals"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#youraccount_ebill_path" do
|
47
|
+
it "returns the ebill path" do
|
48
|
+
expect(helper.youraccount_ebill_path).to eq "#{youraccount_site}/ebill"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "#youraccount_reward_dollars_path" do
|
53
|
+
it "returns the reward dollars path" do
|
54
|
+
expect(helper.youraccount_reward_dollars_path).to eq "#{youraccount_site}/reward_dollars"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "#youraccount_membership_path" do
|
59
|
+
it "returns the membership path" do
|
60
|
+
expect(helper.youraccount_membership_path).to eq "#{youraccount_site}/membership"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe "#youraccount_new_membership_update_path" do
|
65
|
+
it "returns the new membership path" do
|
66
|
+
expect(helper.youraccount_new_membership_update_path).to eq "#{youraccount_site}/membership_update/new"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe "#youraccount_memberships_printcard_path" do
|
71
|
+
it "returns the printcard path" do
|
72
|
+
expect(helper.youraccount_memberships_printcard_path).to eq "#{youraccount_site}/memberships/printcard"
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe "#youraccount_subscriptions_path" do
|
77
|
+
it "returns the subscriptions path" do
|
78
|
+
expect(helper.youraccount_subscriptions_path).to eq "#{youraccount_site}/subscriptions"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "#youraccount_westworld_path" do
|
83
|
+
it "returns the westworld path" do
|
84
|
+
expect(helper.youraccount_westworld_path).to eq "#{youraccount_site}/westworld"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe "#youraccount_privacy_path" do
|
89
|
+
it "returns the privacy path" do
|
90
|
+
expect(helper.youraccount_privacy_path).to eq "#{youraccount_site}/privacy"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
describe "#youraccount_terms_path" do
|
95
|
+
it "returns the terms path" do
|
96
|
+
expect(helper.youraccount_terms_path).to eq "#{youraccount_site}/terms"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
describe "#insurance_path" do
|
101
|
+
it "returns the profile path" do
|
102
|
+
expect(helper.insurance_path).to eq insurance_site
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
describe "#membership_path" do
|
107
|
+
it "returns the membership esso reload path" do
|
108
|
+
expect(helper.membership_esso_reload_path).to eq "#{membership_site}/reward_"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
describe "#driveredonline_path" do
|
113
|
+
it "returns the driveredonile path" do
|
114
|
+
expect(helper.driveredonline_path).to eq "#{driveredonline_site}/login"
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
*.log
|
File without changes
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require "simplecov"
|
2
|
+
require "ama_layout"
|
3
|
+
require "pry"
|
4
|
+
require "rspec/rails"
|
5
|
+
require "combustion"
|
6
|
+
|
7
|
+
ENV["RAILS_ENV"] ||= "test"
|
8
|
+
|
9
|
+
Combustion.initialize! :all
|
10
|
+
|
11
|
+
Dir["./spec/support/**/*.rb"].sort.each { |file| require file }
|
12
|
+
|
13
|
+
ActionView::TestCase::TestController.instance_eval do
|
14
|
+
helper Rails.application.routes.url_helpers
|
15
|
+
end
|
16
|
+
|
17
|
+
ActionView::TestCase::TestController.class_eval do
|
18
|
+
def _routes
|
19
|
+
Rails.application.routes
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
RSpec.configure do |config|
|
24
|
+
config.include Rails.application.routes.url_helpers
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,325 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ama_layout
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.13
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael van den Beuken
|
8
|
+
- Ruben Estevez
|
9
|
+
- Jordan Babe
|
10
|
+
- Mathieu Gilbert
|
11
|
+
- Ryan Jones
|
12
|
+
- Darko Dosenovic
|
13
|
+
- Jonathan Weyermann
|
14
|
+
- Adam Melnyk
|
15
|
+
- Kayt Campbell
|
16
|
+
- Kathleen Robertson
|
17
|
+
autorequire:
|
18
|
+
bindir: bin
|
19
|
+
cert_chain: []
|
20
|
+
date: 2015-09-17 00:00:00.000000000 Z
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: foundation-rails
|
24
|
+
requirement: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - '='
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: 5.4.5.0
|
29
|
+
type: :runtime
|
30
|
+
prerelease: false
|
31
|
+
version_requirements: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 5.4.5.0
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rails
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '4'
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '4'
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: sass-rails
|
52
|
+
requirement: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: font-awesome-sass
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: draper
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
type: :runtime
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: bundler
|
94
|
+
requirement: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '1.7'
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '1.7'
|
106
|
+
- !ruby/object:Gem::Dependency
|
107
|
+
name: rake
|
108
|
+
requirement: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '10.0'
|
113
|
+
type: :development
|
114
|
+
prerelease: false
|
115
|
+
version_requirements: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - "~>"
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '10.0'
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
name: rspec-rails
|
122
|
+
requirement: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
type: :development
|
128
|
+
prerelease: false
|
129
|
+
version_requirements: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
- !ruby/object:Gem::Dependency
|
135
|
+
name: simplecov
|
136
|
+
requirement: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
type: :development
|
142
|
+
prerelease: false
|
143
|
+
version_requirements: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
name: pry
|
150
|
+
requirement: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
155
|
+
type: :development
|
156
|
+
prerelease: false
|
157
|
+
version_requirements: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - ">="
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0'
|
162
|
+
- !ruby/object:Gem::Dependency
|
163
|
+
name: combustion
|
164
|
+
requirement: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
type: :development
|
170
|
+
prerelease: false
|
171
|
+
version_requirements: !ruby/object:Gem::Requirement
|
172
|
+
requirements:
|
173
|
+
- - ">="
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '0'
|
176
|
+
- !ruby/object:Gem::Dependency
|
177
|
+
name: sqlite3
|
178
|
+
requirement: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
type: :development
|
184
|
+
prerelease: false
|
185
|
+
version_requirements: !ruby/object:Gem::Requirement
|
186
|
+
requirements:
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
description: ".ama.ab.ca site layouts"
|
191
|
+
email:
|
192
|
+
- michael.beuken@gmail.com
|
193
|
+
- ruben.a.estevez@gmail.com
|
194
|
+
- jorbabe@gmail.com
|
195
|
+
- mathieu.gilbert@ama.ab.ca
|
196
|
+
- ryan.michael.jones@gmail.com
|
197
|
+
- darko.dosenovic@ama.ab.ca
|
198
|
+
- jonathan.weyermann@ama.ab.caadam.melnyk@ama.ab.ca
|
199
|
+
- kayt.campbell@ama.ab.ca
|
200
|
+
- kathleen.robertson@ama.ab.ca
|
201
|
+
executables: []
|
202
|
+
extensions: []
|
203
|
+
extra_rdoc_files: []
|
204
|
+
files:
|
205
|
+
- ".gitignore"
|
206
|
+
- ".rspec"
|
207
|
+
- ".simplecov"
|
208
|
+
- Gemfile
|
209
|
+
- LICENSE.txt
|
210
|
+
- README.md
|
211
|
+
- Rakefile
|
212
|
+
- ama_layout.gemspec
|
213
|
+
- app/assets/images/AMA-Logo.png
|
214
|
+
- app/assets/images/alberta-blur.jpg
|
215
|
+
- app/assets/images/footer-racetrack-big.png
|
216
|
+
- app/assets/javascripts/ama_layout/ama_layout_namespace.js.coffee
|
217
|
+
- app/assets/javascripts/ama_layout/desktop/drop_down.js.coffee
|
218
|
+
- app/assets/javascripts/ama_layout/desktop/foundation-namespace.coffee
|
219
|
+
- app/assets/javascripts/ama_layout/desktop/foundation-ready.js.coffee
|
220
|
+
- app/assets/javascripts/ama_layout/desktop/header_menu.coffee
|
221
|
+
- app/assets/javascripts/ama_layout/desktop/index.js
|
222
|
+
- app/assets/javascripts/ama_layout/desktop/ready.js.coffee
|
223
|
+
- app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
|
224
|
+
- app/assets/javascripts/ama_layout/desktop/toggle_menu.js.coffee
|
225
|
+
- app/assets/javascripts/ama_layout/mobile/index.js
|
226
|
+
- app/assets/javascripts/ama_layout/mobile/mobile_menu.js.coffee
|
227
|
+
- app/assets/javascripts/ama_layout/mobile/ready.js.coffee
|
228
|
+
- app/assets/javascripts/ama_layout/mobile/tablesaw.stackonly.js
|
229
|
+
- app/assets/stylesheets/ama_layout/application.scss
|
230
|
+
- app/assets/stylesheets/ama_layout/foundation_and_overrides.scss
|
231
|
+
- app/assets/stylesheets/ama_layout/layout/base-styles.scss
|
232
|
+
- app/assets/stylesheets/ama_layout/layout/helper-classes.scss
|
233
|
+
- app/assets/stylesheets/ama_layout/layout/index.scss
|
234
|
+
- app/assets/stylesheets/ama_layout/layout/variables.scss
|
235
|
+
- app/assets/stylesheets/ama_layout/layout_components/accordions.scss
|
236
|
+
- app/assets/stylesheets/ama_layout/layout_components/blue-boxes.scss
|
237
|
+
- app/assets/stylesheets/ama_layout/layout_components/error-messages.scss
|
238
|
+
- app/assets/stylesheets/ama_layout/layout_components/error-page.scss
|
239
|
+
- app/assets/stylesheets/ama_layout/layout_components/forms.scss
|
240
|
+
- app/assets/stylesheets/ama_layout/layout_components/index.scss
|
241
|
+
- app/assets/stylesheets/ama_layout/layout_components/responsive-table.scss
|
242
|
+
- app/assets/stylesheets/ama_layout/layout_components/sidebar.scss
|
243
|
+
- app/assets/stylesheets/ama_layout/layout_components/siteheader.scss
|
244
|
+
- app/assets/stylesheets/ama_layout/media_queries/index.scss
|
245
|
+
- app/assets/stylesheets/ama_layout/media_queries/mobile-and-tablet.scss
|
246
|
+
- app/assets/stylesheets/ama_layout/media_queries/mobile.scss
|
247
|
+
- app/assets/stylesheets/ama_layout/media_queries/tablet.scss
|
248
|
+
- app/assets/stylesheets/ama_layout/old-ie.scss
|
249
|
+
- app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.eot
|
250
|
+
- app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.scss
|
251
|
+
- app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.svg
|
252
|
+
- app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.ttf
|
253
|
+
- app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.woff
|
254
|
+
- app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons.js
|
255
|
+
- app/helpers/ama_layout_content_helper.rb
|
256
|
+
- app/helpers/ama_layout_path_helper.rb
|
257
|
+
- app/views/ama_layout/_alert.html.erb
|
258
|
+
- app/views/ama_layout/_applogo.html.erb
|
259
|
+
- app/views/ama_layout/_custom_nav_links.html.erb
|
260
|
+
- app/views/ama_layout/_custom_sidebar.html.erb
|
261
|
+
- app/views/ama_layout/_footer.html.erb
|
262
|
+
- app/views/ama_layout/_main_nav_item.html.erb
|
263
|
+
- app/views/ama_layout/_main_top_nav_item.html.erb
|
264
|
+
- app/views/ama_layout/_notice.html.erb
|
265
|
+
- app/views/ama_layout/_notices.html.erb
|
266
|
+
- app/views/ama_layout/_sidebar.html.erb
|
267
|
+
- app/views/ama_layout/_siteheader.html.erb
|
268
|
+
- app/views/ama_layout/_sub_nav.html.erb
|
269
|
+
- app/views/ama_layout/_sub_nav_item.html.erb
|
270
|
+
- app/views/ama_layout/_top_nav.html.erb
|
271
|
+
- app/views/ama_layout/_top_sub_nav.html.erb
|
272
|
+
- app/views/ama_layout/_top_sub_nav_item.html.erb
|
273
|
+
- lib/ama_layout.rb
|
274
|
+
- lib/ama_layout/decorators/moneris_decorator.rb
|
275
|
+
- lib/ama_layout/decorators/navigation_decorator.rb
|
276
|
+
- lib/ama_layout/decorators/navigation_item_decorator.rb
|
277
|
+
- lib/ama_layout/moneris.rb
|
278
|
+
- lib/ama_layout/moneris/textbox.txt
|
279
|
+
- lib/ama_layout/navigation.rb
|
280
|
+
- lib/ama_layout/navigation.yml
|
281
|
+
- lib/ama_layout/navigation_item.rb
|
282
|
+
- lib/ama_layout/version.rb
|
283
|
+
- spec/helpers/ama_layout_content_helper_spec.rb
|
284
|
+
- spec/helpers/ama_layout_path_helper_spec.rb
|
285
|
+
- spec/internal/config/database.yml
|
286
|
+
- spec/internal/config/routes.rb
|
287
|
+
- spec/internal/db/combustion_test.sqlite
|
288
|
+
- spec/internal/db/schema.rb
|
289
|
+
- spec/internal/log/.gitignore
|
290
|
+
- spec/internal/public/favicon.ico
|
291
|
+
- spec/spec_helper.rb
|
292
|
+
homepage: ''
|
293
|
+
licenses:
|
294
|
+
- MIT
|
295
|
+
metadata: {}
|
296
|
+
post_install_message:
|
297
|
+
rdoc_options: []
|
298
|
+
require_paths:
|
299
|
+
- lib
|
300
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
301
|
+
requirements:
|
302
|
+
- - ">="
|
303
|
+
- !ruby/object:Gem::Version
|
304
|
+
version: '0'
|
305
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
306
|
+
requirements:
|
307
|
+
- - ">="
|
308
|
+
- !ruby/object:Gem::Version
|
309
|
+
version: '0'
|
310
|
+
requirements: []
|
311
|
+
rubyforge_project:
|
312
|
+
rubygems_version: 2.4.6
|
313
|
+
signing_key:
|
314
|
+
specification_version: 4
|
315
|
+
summary: ".ama.ab.ca site layouts"
|
316
|
+
test_files:
|
317
|
+
- spec/helpers/ama_layout_content_helper_spec.rb
|
318
|
+
- spec/helpers/ama_layout_path_helper_spec.rb
|
319
|
+
- spec/internal/config/database.yml
|
320
|
+
- spec/internal/config/routes.rb
|
321
|
+
- spec/internal/db/combustion_test.sqlite
|
322
|
+
- spec/internal/db/schema.rb
|
323
|
+
- spec/internal/log/.gitignore
|
324
|
+
- spec/internal/public/favicon.ico
|
325
|
+
- spec/spec_helper.rb
|