workarea-reviews 3.1.0
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 +24 -0
- data/.eslintrc.json +35 -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/.github/workflows/ci.yml +60 -0
- data/.gitignore +15 -0
- data/.rubocop.yml +3 -0
- data/.scss-lint.yml +188 -0
- data/.stylelintrc.json +8 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +745 -0
- data/CODE_OF_CONDUCT.md +3 -0
- data/CONTRIBUTING.md +3 -0
- data/Gemfile +8 -0
- data/LICENSE +52 -0
- data/README.md +107 -0
- data/Rakefile +53 -0
- data/app/assets/images/workarea/admin/icons/star.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/empty_star.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/half_star.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/star.svg +1 -0
- data/app/assets/javascripts/workarea/storefront/reviews/modules/product_review_ajax_submit.js +39 -0
- data/app/assets/javascripts/workarea/storefront/reviews/modules/product_reviews_sort_menus.js +82 -0
- data/app/assets/javascripts/workarea/storefront/reviews/modules/rating_buttons.js +103 -0
- data/app/assets/javascripts/workarea/storefront/reviews/templates/sort_by_property.jst.ejs +11 -0
- data/app/assets/stylesheets/workarea/storefront/reviews/components/_rating.scss +28 -0
- data/app/assets/stylesheets/workarea/storefront/reviews/components/_reviews.scss +59 -0
- data/app/assets/stylesheets/workarea/storefront/reviews/components/_reviews_aggregate.scss +38 -0
- data/app/assets/stylesheets/workarea/storefront/reviews/components/_write_review.scss +63 -0
- data/app/controllers/workarea/admin/catalog_products_controller.decorator +9 -0
- data/app/controllers/workarea/admin/reports_controller.decorator +10 -0
- data/app/controllers/workarea/admin/reviews_controller.rb +51 -0
- data/app/controllers/workarea/storefront/review_requests_controller.rb +50 -0
- data/app/controllers/workarea/storefront/reviews_controller.rb +53 -0
- data/app/helpers/workarea/admin/reviews_helper.rb +13 -0
- data/app/helpers/workarea/storefront/reviews_helper.rb +22 -0
- data/app/helpers/workarea/storefront/reviews_schema_org_helper.rb +34 -0
- data/app/mailers/workarea/admin/status_report_mailer.decorator +8 -0
- data/app/mailers/workarea/storefront/review_mailer.rb +23 -0
- data/app/models/workarea/catalog/product.decorator +15 -0
- data/app/models/workarea/fulfillment.decorator +11 -0
- data/app/models/workarea/insights/most_active_reviewers.rb +34 -0
- data/app/models/workarea/insights/most_reviewed_products.rb +33 -0
- data/app/models/workarea/insights/top_rated_products.rb +33 -0
- data/app/models/workarea/review.rb +124 -0
- data/app/models/workarea/review/request.rb +62 -0
- data/app/models/workarea/search/admin/review.rb +72 -0
- data/app/models/workarea/search/storefront/product.decorator +9 -0
- data/app/models/workarea/sort.decorator +17 -0
- data/app/queries/workarea/reports/reviews_by_product.rb +86 -0
- data/app/queries/workarea/reports/reviews_by_user.rb +71 -0
- data/app/queries/workarea/review_request_params.rb +47 -0
- data/app/queries/workarea/review_summary.rb +11 -0
- data/app/queries/workarea/search/admin_reviews.rb +40 -0
- data/app/queries/workarea/search/category_browse.decorator +9 -0
- data/app/queries/workarea/search/product_search.decorator +9 -0
- data/app/seeds/workarea/review_seeds.rb +49 -0
- data/app/services/workarea/create_review.rb +99 -0
- data/app/view_models/workarea/admin/dashboards/reports_view_model.decorator +11 -0
- data/app/view_models/workarea/admin/product_view_model.decorator +7 -0
- data/app/view_models/workarea/admin/reports/reviews_by_product_view_model.rb +27 -0
- data/app/view_models/workarea/admin/review_view_model.rb +23 -0
- data/app/view_models/workarea/admin/reviews_search_view_model.rb +46 -0
- data/app/view_models/workarea/storefront/product_view_model.decorator +13 -0
- data/app/view_models/workarea/storefront/review_view_model.rb +14 -0
- data/app/views/workarea/admin/activities/_review_create.html.haml +12 -0
- data/app/views/workarea/admin/activities/_review_destroy.html.haml +10 -0
- data/app/views/workarea/admin/activities/_review_update.html.haml +10 -0
- data/app/views/workarea/admin/dashboards/_reviews_by_product_card.html.haml +17 -0
- data/app/views/workarea/admin/insights/_most_active_reviewers.html.haml +22 -0
- data/app/views/workarea/admin/insights/_most_reviewed_products.html.haml +22 -0
- data/app/views/workarea/admin/insights/_top_rated_products.html.haml +22 -0
- data/app/views/workarea/admin/reports/reviews_by_product.html.haml +44 -0
- data/app/views/workarea/admin/reviews/_aux_navigation.html.haml +5 -0
- data/app/views/workarea/admin/reviews/_catalog_products_aux_link.html.haml +5 -0
- data/app/views/workarea/admin/reviews/_dashboard_navigation.html.haml +1 -0
- data/app/views/workarea/admin/reviews/_menu.html.haml +3 -0
- data/app/views/workarea/admin/reviews/_summary.html.haml +12 -0
- data/app/views/workarea/admin/reviews/edit.html.haml +77 -0
- data/app/views/workarea/admin/reviews/index.html.haml +74 -0
- data/app/views/workarea/admin/status_report_mailer/_reviews.html.haml +5 -0
- data/app/views/workarea/storefront/products/_rating.html.haml +9 -0
- data/app/views/workarea/storefront/products/_reviews.html.haml +23 -0
- data/app/views/workarea/storefront/products/_reviews_aggregate.html.haml +22 -0
- data/app/views/workarea/storefront/products/_reviews_summary.html.haml +2 -0
- data/app/views/workarea/storefront/review_mailer/review_request.html.haml +24 -0
- data/app/views/workarea/storefront/review_requests/show.html.haml +45 -0
- data/app/views/workarea/storefront/reviews/new.html.haml +68 -0
- data/app/views/workarea/storefront/style_guides/_reviews_product_summary_docs.html.haml +13 -0
- data/app/views/workarea/storefront/style_guides/components/_reviews.html.haml +17 -0
- data/app/workers/workarea/create_review_requests.rb +33 -0
- data/app/workers/workarea/schedule_review_requests.rb +44 -0
- data/app/workers/workarea/send_review_requests.rb +12 -0
- data/app/workers/workarea/update_product_review_data.rb +26 -0
- data/bin/rails +18 -0
- data/config/initializers/append_points.rb +75 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/configuration.rb +31 -0
- data/config/initializers/rack_attack.rb +11 -0
- data/config/initializers/recaptcha.rb +19 -0
- data/config/initializers/scheduled_jobs.rb +8 -0
- data/config/locales/en.yml +150 -0
- data/config/routes.rb +25 -0
- data/lib/tasks/verify.rake +16 -0
- data/lib/workarea/mailer_previews/storefront/review_mailer_preview.rb +10 -0
- data/lib/workarea/reviews.rb +13 -0
- data/lib/workarea/reviews/engine.rb +16 -0
- data/lib/workarea/reviews/version.rb +5 -0
- data/package.json +9 -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 +25 -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 +55 -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 +5 -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/db/seeds.rb +2 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/factories/reviews.rb +32 -0
- data/test/fixtures/reviews.csv +5 -0
- data/test/helpers/workarea/storefront/reviews_helper_test.rb +20 -0
- data/test/integration/workarea/admin/reviews_integration_test.rb +37 -0
- data/test/integration/workarea/storefront/review_requests_integration_test.rb +63 -0
- data/test/integration/workarea/storefront/reviews_integration_test.rb +82 -0
- data/test/javascripts/fixtures/product_review_ajax_submit.html.haml +4 -0
- data/test/javascripts/product_review_ajax_submit_spec.js +28 -0
- data/test/javascripts/spec_helper.js +23 -0
- data/test/models/workarea/insights/most_active_reviewers_test.rb +32 -0
- data/test/models/workarea/insights/most_reviewed_products_test.rb +32 -0
- data/test/models/workarea/insights/top_rated_products_test.rb +49 -0
- data/test/models/workarea/review/request_test.rb +18 -0
- data/test/models/workarea/review_test.rb +105 -0
- data/test/models/workarea/search/storefront/product_test.decorator +14 -0
- data/test/queries/workarea/reports/reviews_by_product_test.rb +104 -0
- data/test/queries/workarea/reports/reviews_by_user_test.rb +102 -0
- data/test/queries/workarea/review_request_params_test.rb +64 -0
- data/test/services/workarea/create_review_test.rb +131 -0
- data/test/system/workarea/admin/review_system_test.rb +96 -0
- data/test/system/workarea/admin/reviews_by_product_system_test.rb +60 -0
- data/test/system/workarea/storefront/review_request_system_test.rb +34 -0
- data/test/system/workarea/storefront/review_system_test.rb +113 -0
- data/test/teaspoon_env.rb +10 -0
- data/test/test_helper.rb +11 -0
- data/test/workers/workarea/create_review_requests_test.rb +38 -0
- data/test/workers/workarea/schedule_review_requests_test.rb +115 -0
- data/test/workers/workarea/send_review_requests_test.rb +30 -0
- data/workarea-reviews.gemspec +22 -0
- data/yarn.lock +3265 -0
- metadata +265 -0
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile += %w( workarea/**/icons/*.svg )
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Workarea.configure do |config|
|
2
|
+
config.seeds.insert('Workarea::InsightsSeeds', 'Workarea::ReviewSeeds')
|
3
|
+
|
4
|
+
config.jump_to_navigation.merge!('Product Reviews' => :reviews_path)
|
5
|
+
|
6
|
+
config.product_copy_default_attributes ||= {}
|
7
|
+
config.product_copy_default_attributes.merge!(
|
8
|
+
total_reviews: 0,
|
9
|
+
average_rating: nil
|
10
|
+
)
|
11
|
+
|
12
|
+
config.data_file_ignored_fields << %w(total_reviews average_rating)
|
13
|
+
|
14
|
+
config.insights_model_classes << 'Workarea::User'
|
15
|
+
|
16
|
+
# The amount of time before a Review::Request will auto expire
|
17
|
+
# and be removed from the collection
|
18
|
+
config.review_request_ttl = 6.months
|
19
|
+
|
20
|
+
# The maximum number of review requests to send for each order
|
21
|
+
# Each request will be for a different order item, selected by
|
22
|
+
# most expensive.
|
23
|
+
config.review_requests_per_order = 3
|
24
|
+
|
25
|
+
# The amount of time after an order is shipped before the first review
|
26
|
+
# requests will be sent.
|
27
|
+
config.review_request_initial_delivery_delay = 14.days
|
28
|
+
|
29
|
+
# The amount of time after the last request was sent to send another.
|
30
|
+
config.review_request_secondary_delivery_delay = 5.days
|
31
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Rack::Attack
|
2
|
+
# Throttle POST requests to /reviews by email address
|
3
|
+
#
|
4
|
+
# Key: "rack::attack:#{Time.now.to_i/:period}:reviews/email:#{req.email}"
|
5
|
+
throttle('reviews/email', limit: 2, period: 2.minutes) do |req|
|
6
|
+
if req.path == '/reviews' && req.post?
|
7
|
+
# return the email if present, nil otherwise
|
8
|
+
req.params['email'].presence
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
recaptcha =
|
2
|
+
if Rails.application.secrets.recaptcha.present?
|
3
|
+
Rails.application.secrets.recaptcha.symbolize_keys
|
4
|
+
elsif Rails.env.development? || Rails.env.test?
|
5
|
+
# These are keys provided by google for the purpose of testing.
|
6
|
+
# See https://developers.google.com/recaptcha/docs/faq
|
7
|
+
{
|
8
|
+
site_key: '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI',
|
9
|
+
secret_key: '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe'
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
if recaptcha.present?
|
14
|
+
Recaptcha.configure do |config|
|
15
|
+
config.site_key = recaptcha[:site_key]
|
16
|
+
config.secret_key = recaptcha[:secret_key]
|
17
|
+
config.proxy = ENV.fetch('HTTP_PROXY', (recaptcha[:proxy] if recaptcha[:proxy].present?))
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
en:
|
2
|
+
workarea:
|
3
|
+
admin:
|
4
|
+
activities:
|
5
|
+
review: Review
|
6
|
+
review_create_html: Created a %{name}
|
7
|
+
review_destroy_html: Removed a %{name}
|
8
|
+
review_update_html: updated %{fields} on the %{name} review
|
9
|
+
catalog:
|
10
|
+
dashboard_link: Dashboard link
|
11
|
+
catalog_products:
|
12
|
+
reviews_link: All Reviews
|
13
|
+
pending: (%{pending} Pending)
|
14
|
+
dashboards:
|
15
|
+
marketing:
|
16
|
+
reviews: Product reviews
|
17
|
+
fields:
|
18
|
+
average_rating: Average Rating
|
19
|
+
body: Body
|
20
|
+
title: Title
|
21
|
+
rating: Rating
|
22
|
+
reviews: Reviews
|
23
|
+
approved: Approved
|
24
|
+
auto_approve: Approve All Reviews
|
25
|
+
verified: Verified Purchaser
|
26
|
+
verified_reviews: Verified
|
27
|
+
weighted_average_rating: Weighted Average Rating
|
28
|
+
insights:
|
29
|
+
most_active_reviewers:
|
30
|
+
info: Your customers that are submitting the most reviews.
|
31
|
+
reviews: Reviews
|
32
|
+
title: Most Active Reviewers
|
33
|
+
user: User
|
34
|
+
verified: Verified Reviews
|
35
|
+
most_reviewed_products:
|
36
|
+
title: Most Reviewed Products
|
37
|
+
info: Your products that have received the most reviews.
|
38
|
+
reviews:
|
39
|
+
one: '%{count} Review'
|
40
|
+
other: '%{count} Reviews'
|
41
|
+
top_rated_products:
|
42
|
+
title: Top Rated Products
|
43
|
+
info: Your products with the highest weighted average rating.
|
44
|
+
rating: '%{rating} Rating'
|
45
|
+
reports:
|
46
|
+
reference:
|
47
|
+
terms:
|
48
|
+
average_rating:
|
49
|
+
name: Average Rating
|
50
|
+
description: The sum of all review ratings divided by the total number of reviews.
|
51
|
+
reviews:
|
52
|
+
name: Reviews
|
53
|
+
description: The total number of reviews.
|
54
|
+
verified:
|
55
|
+
name: Verified
|
56
|
+
description: The total number of reviews made by customers who have purchased the product.
|
57
|
+
weighted_average_rating:
|
58
|
+
name: Weighted Average Rating
|
59
|
+
description: A base rating of 3.0, adjusted up or down by each review rating.
|
60
|
+
reviews_by_product:
|
61
|
+
filters:
|
62
|
+
all: All Reviews
|
63
|
+
approved: Approved Reviews
|
64
|
+
unapproved: Unapproved Reviews
|
65
|
+
results_filter: Results Filter
|
66
|
+
title: Reviews By Product
|
67
|
+
reviews:
|
68
|
+
approved: Approved
|
69
|
+
catalog_products_cards:
|
70
|
+
title: Reviews
|
71
|
+
edit:
|
72
|
+
review: Review
|
73
|
+
review_for_html: Review for %{product_link}
|
74
|
+
save_review: Save Review
|
75
|
+
title: Title
|
76
|
+
view_product: View Product
|
77
|
+
view_user: View User
|
78
|
+
flash_messages:
|
79
|
+
destroyed: Review has been removed.
|
80
|
+
updated: Review has been saved
|
81
|
+
index:
|
82
|
+
dashboard_link: Marketing dashboard
|
83
|
+
heading: Reviews
|
84
|
+
page_title: Reviews
|
85
|
+
review: Review
|
86
|
+
review_for: Review for %{product}
|
87
|
+
menu:
|
88
|
+
product_reviews:
|
89
|
+
one: Product Reviews (%{count})
|
90
|
+
other: Product Reviews (%{count})
|
91
|
+
zero: Product Reviews
|
92
|
+
pending: Pending
|
93
|
+
summary:
|
94
|
+
type: Review
|
95
|
+
unverified: Unverified
|
96
|
+
verified: Verified
|
97
|
+
status_report_mailer:
|
98
|
+
reviews:
|
99
|
+
pending_html: "%{count} awaiting approval."
|
100
|
+
review: review
|
101
|
+
recent_html: "%{count} submitted within the last day."
|
102
|
+
title: Reviews
|
103
|
+
sorts:
|
104
|
+
top_rated: Top Rated
|
105
|
+
highest_rating: Highest Rating
|
106
|
+
lowest_rating: Lowest Rating
|
107
|
+
storefront:
|
108
|
+
email:
|
109
|
+
review_request:
|
110
|
+
subject: Review your recent purchase of %{product}
|
111
|
+
link: Write a review
|
112
|
+
email_action:
|
113
|
+
name: Write Review
|
114
|
+
description: Please review your recent purchase
|
115
|
+
fields:
|
116
|
+
username: Username
|
117
|
+
review_requests:
|
118
|
+
flash_messages:
|
119
|
+
already_submitted: This review has already been submitted.
|
120
|
+
reviews:
|
121
|
+
flash_messages:
|
122
|
+
created: Your review has been submitted. Thanks!
|
123
|
+
failure: There was a problem saving your review.
|
124
|
+
heading: Reviews
|
125
|
+
out_of: out of
|
126
|
+
purchase_requirement: A purchase is required before you can post a review
|
127
|
+
rating: Rating
|
128
|
+
read_reviews: Read Reviews
|
129
|
+
review_for: Review for %{product}
|
130
|
+
review_title: Review Title
|
131
|
+
reviews:
|
132
|
+
one: "%{count} review"
|
133
|
+
other: "%{count} reviews"
|
134
|
+
zero: "%{count} reviews"
|
135
|
+
stars:
|
136
|
+
one: 1 star
|
137
|
+
other: "%{count} stars"
|
138
|
+
submit: Submit Review
|
139
|
+
submit_disabled: Submitting Review...
|
140
|
+
total_spent_validation: must make a purchase before creating a review
|
141
|
+
verified_purchaser: Verified Purchaser
|
142
|
+
write_a_review: Write a Review
|
143
|
+
write_a_review_title: Write a Review for "%{name}"
|
144
|
+
your_review: Your Review
|
145
|
+
notes:
|
146
|
+
display_name: Only the first letter of your name will be displayed.
|
147
|
+
email: Will only be used if we need to get in touch with you.
|
148
|
+
users:
|
149
|
+
first_name: First name
|
150
|
+
last_name: Last name
|
data/config/routes.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Workarea::Admin::Engine.routes.draw do
|
2
|
+
scope '(:locale)', constraints: Workarea::I18n.routes_constraint do
|
3
|
+
resources :reviews, except: [:new, :create]
|
4
|
+
resources :catalog_products, only: [] do
|
5
|
+
member do
|
6
|
+
get :reviews
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
resource :report, only: [] do
|
11
|
+
get :reviews_by_product
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
Workarea::Storefront::Engine.routes.draw do
|
17
|
+
scope '(:locale)', constraints: Workarea::I18n.routes_constraint do
|
18
|
+
get 'reviews/:product_id/new' => 'reviews#new', as: :new_product_review
|
19
|
+
post 'reviews/:product_id' => 'reviews#create', as: :create_product_review
|
20
|
+
|
21
|
+
resources :review_requests, only: :show do
|
22
|
+
member { post :complete }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
namespace :workarea do
|
2
|
+
namespace :reviews do
|
3
|
+
desc 'Assign verified to each review based on whether the user has any orders with the product being reviewed'
|
4
|
+
task verify: :environment do
|
5
|
+
Workarea::Review.all.each_by(100) do |review|
|
6
|
+
user = Workarea::User.find(review.user_id) rescue nil
|
7
|
+
|
8
|
+
next unless user.present?
|
9
|
+
|
10
|
+
creator = Workarea::CreateReview.new(review, user: user)
|
11
|
+
|
12
|
+
review.update!(verified: creator.verified?)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Workarea
|
2
|
+
module Reviews
|
3
|
+
class Engine < ::Rails::Engine
|
4
|
+
include Workarea::Plugin
|
5
|
+
isolate_namespace Workarea::Reviews
|
6
|
+
|
7
|
+
config.to_prepare do
|
8
|
+
Admin::ApplicationController.helper(Admin::ReviewsHelper)
|
9
|
+
Storefront::ApplicationController.helper(Storefront::ReviewsHelper)
|
10
|
+
Workarea::Storefront::ApplicationController.helper(
|
11
|
+
Workarea::Storefront::ReviewsSchemaOrgHelper
|
12
|
+
)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/package.json
ADDED
data/test/dummy/Rakefile
ADDED
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= csrf_meta_tags %>
|
6
|
+
|
7
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
8
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
9
|
+
</head>
|
10
|
+
|
11
|
+
<body>
|
12
|
+
<%= yield %>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|