workarea-reviews 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +20 -0
  3. data/.eslintignore +2 -0
  4. data/.eslintrc +24 -0
  5. data/.eslintrc.json +35 -0
  6. data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  7. data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
  8. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  9. data/.github/workflows/ci.yml +60 -0
  10. data/.gitignore +15 -0
  11. data/.rubocop.yml +3 -0
  12. data/.scss-lint.yml +188 -0
  13. data/.stylelintrc.json +8 -0
  14. data/.yardopts +1 -0
  15. data/CHANGELOG.md +745 -0
  16. data/CODE_OF_CONDUCT.md +3 -0
  17. data/CONTRIBUTING.md +3 -0
  18. data/Gemfile +8 -0
  19. data/LICENSE +52 -0
  20. data/README.md +107 -0
  21. data/Rakefile +53 -0
  22. data/app/assets/images/workarea/admin/icons/star.svg +1 -0
  23. data/app/assets/images/workarea/storefront/icons/empty_star.svg +1 -0
  24. data/app/assets/images/workarea/storefront/icons/half_star.svg +1 -0
  25. data/app/assets/images/workarea/storefront/icons/star.svg +1 -0
  26. data/app/assets/javascripts/workarea/storefront/reviews/modules/product_review_ajax_submit.js +39 -0
  27. data/app/assets/javascripts/workarea/storefront/reviews/modules/product_reviews_sort_menus.js +82 -0
  28. data/app/assets/javascripts/workarea/storefront/reviews/modules/rating_buttons.js +103 -0
  29. data/app/assets/javascripts/workarea/storefront/reviews/templates/sort_by_property.jst.ejs +11 -0
  30. data/app/assets/stylesheets/workarea/storefront/reviews/components/_rating.scss +28 -0
  31. data/app/assets/stylesheets/workarea/storefront/reviews/components/_reviews.scss +59 -0
  32. data/app/assets/stylesheets/workarea/storefront/reviews/components/_reviews_aggregate.scss +38 -0
  33. data/app/assets/stylesheets/workarea/storefront/reviews/components/_write_review.scss +63 -0
  34. data/app/controllers/workarea/admin/catalog_products_controller.decorator +9 -0
  35. data/app/controllers/workarea/admin/reports_controller.decorator +10 -0
  36. data/app/controllers/workarea/admin/reviews_controller.rb +51 -0
  37. data/app/controllers/workarea/storefront/review_requests_controller.rb +50 -0
  38. data/app/controllers/workarea/storefront/reviews_controller.rb +53 -0
  39. data/app/helpers/workarea/admin/reviews_helper.rb +13 -0
  40. data/app/helpers/workarea/storefront/reviews_helper.rb +22 -0
  41. data/app/helpers/workarea/storefront/reviews_schema_org_helper.rb +34 -0
  42. data/app/mailers/workarea/admin/status_report_mailer.decorator +8 -0
  43. data/app/mailers/workarea/storefront/review_mailer.rb +23 -0
  44. data/app/models/workarea/catalog/product.decorator +15 -0
  45. data/app/models/workarea/fulfillment.decorator +11 -0
  46. data/app/models/workarea/insights/most_active_reviewers.rb +34 -0
  47. data/app/models/workarea/insights/most_reviewed_products.rb +33 -0
  48. data/app/models/workarea/insights/top_rated_products.rb +33 -0
  49. data/app/models/workarea/review.rb +124 -0
  50. data/app/models/workarea/review/request.rb +62 -0
  51. data/app/models/workarea/search/admin/review.rb +72 -0
  52. data/app/models/workarea/search/storefront/product.decorator +9 -0
  53. data/app/models/workarea/sort.decorator +17 -0
  54. data/app/queries/workarea/reports/reviews_by_product.rb +86 -0
  55. data/app/queries/workarea/reports/reviews_by_user.rb +71 -0
  56. data/app/queries/workarea/review_request_params.rb +47 -0
  57. data/app/queries/workarea/review_summary.rb +11 -0
  58. data/app/queries/workarea/search/admin_reviews.rb +40 -0
  59. data/app/queries/workarea/search/category_browse.decorator +9 -0
  60. data/app/queries/workarea/search/product_search.decorator +9 -0
  61. data/app/seeds/workarea/review_seeds.rb +49 -0
  62. data/app/services/workarea/create_review.rb +99 -0
  63. data/app/view_models/workarea/admin/dashboards/reports_view_model.decorator +11 -0
  64. data/app/view_models/workarea/admin/product_view_model.decorator +7 -0
  65. data/app/view_models/workarea/admin/reports/reviews_by_product_view_model.rb +27 -0
  66. data/app/view_models/workarea/admin/review_view_model.rb +23 -0
  67. data/app/view_models/workarea/admin/reviews_search_view_model.rb +46 -0
  68. data/app/view_models/workarea/storefront/product_view_model.decorator +13 -0
  69. data/app/view_models/workarea/storefront/review_view_model.rb +14 -0
  70. data/app/views/workarea/admin/activities/_review_create.html.haml +12 -0
  71. data/app/views/workarea/admin/activities/_review_destroy.html.haml +10 -0
  72. data/app/views/workarea/admin/activities/_review_update.html.haml +10 -0
  73. data/app/views/workarea/admin/dashboards/_reviews_by_product_card.html.haml +17 -0
  74. data/app/views/workarea/admin/insights/_most_active_reviewers.html.haml +22 -0
  75. data/app/views/workarea/admin/insights/_most_reviewed_products.html.haml +22 -0
  76. data/app/views/workarea/admin/insights/_top_rated_products.html.haml +22 -0
  77. data/app/views/workarea/admin/reports/reviews_by_product.html.haml +44 -0
  78. data/app/views/workarea/admin/reviews/_aux_navigation.html.haml +5 -0
  79. data/app/views/workarea/admin/reviews/_catalog_products_aux_link.html.haml +5 -0
  80. data/app/views/workarea/admin/reviews/_dashboard_navigation.html.haml +1 -0
  81. data/app/views/workarea/admin/reviews/_menu.html.haml +3 -0
  82. data/app/views/workarea/admin/reviews/_summary.html.haml +12 -0
  83. data/app/views/workarea/admin/reviews/edit.html.haml +77 -0
  84. data/app/views/workarea/admin/reviews/index.html.haml +74 -0
  85. data/app/views/workarea/admin/status_report_mailer/_reviews.html.haml +5 -0
  86. data/app/views/workarea/storefront/products/_rating.html.haml +9 -0
  87. data/app/views/workarea/storefront/products/_reviews.html.haml +23 -0
  88. data/app/views/workarea/storefront/products/_reviews_aggregate.html.haml +22 -0
  89. data/app/views/workarea/storefront/products/_reviews_summary.html.haml +2 -0
  90. data/app/views/workarea/storefront/review_mailer/review_request.html.haml +24 -0
  91. data/app/views/workarea/storefront/review_requests/show.html.haml +45 -0
  92. data/app/views/workarea/storefront/reviews/new.html.haml +68 -0
  93. data/app/views/workarea/storefront/style_guides/_reviews_product_summary_docs.html.haml +13 -0
  94. data/app/views/workarea/storefront/style_guides/components/_reviews.html.haml +17 -0
  95. data/app/workers/workarea/create_review_requests.rb +33 -0
  96. data/app/workers/workarea/schedule_review_requests.rb +44 -0
  97. data/app/workers/workarea/send_review_requests.rb +12 -0
  98. data/app/workers/workarea/update_product_review_data.rb +26 -0
  99. data/bin/rails +18 -0
  100. data/config/initializers/append_points.rb +75 -0
  101. data/config/initializers/assets.rb +1 -0
  102. data/config/initializers/configuration.rb +31 -0
  103. data/config/initializers/rack_attack.rb +11 -0
  104. data/config/initializers/recaptcha.rb +19 -0
  105. data/config/initializers/scheduled_jobs.rb +8 -0
  106. data/config/locales/en.yml +150 -0
  107. data/config/routes.rb +25 -0
  108. data/lib/tasks/verify.rake +16 -0
  109. data/lib/workarea/mailer_previews/storefront/review_mailer_preview.rb +10 -0
  110. data/lib/workarea/reviews.rb +13 -0
  111. data/lib/workarea/reviews/engine.rb +16 -0
  112. data/lib/workarea/reviews/version.rb +5 -0
  113. data/package.json +9 -0
  114. data/test/dummy/Rakefile +6 -0
  115. data/test/dummy/app/assets/config/manifest.js +4 -0
  116. data/test/dummy/app/assets/images/.keep +0 -0
  117. data/test/dummy/app/assets/javascripts/application.js +13 -0
  118. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  119. data/test/dummy/app/controllers/application_controller.rb +3 -0
  120. data/test/dummy/app/controllers/concerns/.keep +0 -0
  121. data/test/dummy/app/helpers/application_helper.rb +2 -0
  122. data/test/dummy/app/jobs/application_job.rb +2 -0
  123. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  124. data/test/dummy/app/models/concerns/.keep +0 -0
  125. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  126. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  127. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  128. data/test/dummy/bin/bundle +3 -0
  129. data/test/dummy/bin/rails +4 -0
  130. data/test/dummy/bin/rake +4 -0
  131. data/test/dummy/bin/setup +34 -0
  132. data/test/dummy/bin/update +29 -0
  133. data/test/dummy/config.ru +5 -0
  134. data/test/dummy/config/application.rb +25 -0
  135. data/test/dummy/config/boot.rb +5 -0
  136. data/test/dummy/config/cable.yml +9 -0
  137. data/test/dummy/config/environment.rb +5 -0
  138. data/test/dummy/config/environments/development.rb +55 -0
  139. data/test/dummy/config/environments/production.rb +86 -0
  140. data/test/dummy/config/environments/test.rb +43 -0
  141. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  142. data/test/dummy/config/initializers/assets.rb +11 -0
  143. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  144. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  145. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  146. data/test/dummy/config/initializers/inflections.rb +16 -0
  147. data/test/dummy/config/initializers/mime_types.rb +4 -0
  148. data/test/dummy/config/initializers/new_framework_defaults.rb +21 -0
  149. data/test/dummy/config/initializers/session_store.rb +5 -0
  150. data/test/dummy/config/initializers/workarea.rb +5 -0
  151. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  152. data/test/dummy/config/locales/en.yml +23 -0
  153. data/test/dummy/config/puma.rb +47 -0
  154. data/test/dummy/config/routes.rb +5 -0
  155. data/test/dummy/config/secrets.yml +22 -0
  156. data/test/dummy/config/spring.rb +6 -0
  157. data/test/dummy/db/seeds.rb +2 -0
  158. data/test/dummy/lib/assets/.keep +0 -0
  159. data/test/dummy/log/.keep +0 -0
  160. data/test/factories/reviews.rb +32 -0
  161. data/test/fixtures/reviews.csv +5 -0
  162. data/test/helpers/workarea/storefront/reviews_helper_test.rb +20 -0
  163. data/test/integration/workarea/admin/reviews_integration_test.rb +37 -0
  164. data/test/integration/workarea/storefront/review_requests_integration_test.rb +63 -0
  165. data/test/integration/workarea/storefront/reviews_integration_test.rb +82 -0
  166. data/test/javascripts/fixtures/product_review_ajax_submit.html.haml +4 -0
  167. data/test/javascripts/product_review_ajax_submit_spec.js +28 -0
  168. data/test/javascripts/spec_helper.js +23 -0
  169. data/test/models/workarea/insights/most_active_reviewers_test.rb +32 -0
  170. data/test/models/workarea/insights/most_reviewed_products_test.rb +32 -0
  171. data/test/models/workarea/insights/top_rated_products_test.rb +49 -0
  172. data/test/models/workarea/review/request_test.rb +18 -0
  173. data/test/models/workarea/review_test.rb +105 -0
  174. data/test/models/workarea/search/storefront/product_test.decorator +14 -0
  175. data/test/queries/workarea/reports/reviews_by_product_test.rb +104 -0
  176. data/test/queries/workarea/reports/reviews_by_user_test.rb +102 -0
  177. data/test/queries/workarea/review_request_params_test.rb +64 -0
  178. data/test/services/workarea/create_review_test.rb +131 -0
  179. data/test/system/workarea/admin/review_system_test.rb +96 -0
  180. data/test/system/workarea/admin/reviews_by_product_system_test.rb +60 -0
  181. data/test/system/workarea/storefront/review_request_system_test.rb +34 -0
  182. data/test/system/workarea/storefront/review_system_test.rb +113 -0
  183. data/test/teaspoon_env.rb +10 -0
  184. data/test/test_helper.rb +11 -0
  185. data/test/workers/workarea/create_review_requests_test.rb +38 -0
  186. data/test/workers/workarea/schedule_review_requests_test.rb +115 -0
  187. data/test/workers/workarea/send_review_requests_test.rb +30 -0
  188. data/workarea-reviews.gemspec +22 -0
  189. data/yarn.lock +3265 -0
  190. 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,8 @@
1
+ unless Workarea.config.skip_service_connections
2
+ Sidekiq::Cron::Job.create(
3
+ name: 'Workarea::SendReviewRequests',
4
+ klass: 'Workarea::SendReviewRequests',
5
+ cron: "0 0 * * * #{Time.zone.tzinfo.identifier}",
6
+ queue: 'low'
7
+ )
8
+ 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
@@ -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,10 @@
1
+ module Workarea
2
+ module Storefront
3
+ class ReviewMailerPreview < ActionMailer::Preview
4
+ def review_request
5
+ request = Review::Request.ready_to_send.first || Review::Request.first
6
+ ReviewMailer.review_request(request.id.to_s)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,13 @@
1
+ require 'workarea'
2
+ require 'workarea/storefront'
3
+ require 'workarea/admin'
4
+
5
+ require 'recaptcha/rails'
6
+
7
+ module Workarea
8
+ module Reviews
9
+ end
10
+ end
11
+
12
+ require 'workarea/reviews/version'
13
+ require 'workarea/reviews/engine'
@@ -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
@@ -0,0 +1,5 @@
1
+ module Workarea
2
+ module Reviews
3
+ VERSION = '3.1.0'.freeze
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ {
2
+ "devDependencies": {
3
+ "eslint": "~5.16.0",
4
+ "eslint-config-recommended": "~4.0.0",
5
+ "stylelint": "~10.1.0",
6
+ "stylelint-config-recommended-scss": "~3.3.0",
7
+ "stylelint-scss": "~3.9.2"
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,4 @@
1
+
2
+ //= link_tree ../images
3
+ //= link_directory ../javascripts .js
4
+ //= link_directory ../stylesheets .css
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
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
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,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'