forked from spree-contrib/spree_email_to_friend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add specs and test tools, was 1% now 97% coverage. - Fixed missing translations and translated mails. - Add Swedish locale. - Fixed assets paths and engine issues (mainly for tests to run). - Updated README. - Add Travis badge and config. It was actually very broken, now only the Captcha integration need some additional attention.
- Loading branch information
Showing
36 changed files
with
607 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,7 @@ | |
spec/test_app | ||
Gemfile.lock | ||
.rvmrc | ||
spec/dummy | ||
spec/dummy | ||
tmp | ||
.localeapp | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: ruby | ||
before_script: | ||
- sh -e /etc/init.d/xvfb start | ||
- export DISPLAY=:99.0 | ||
- bundle exec rake test_app | ||
script: | ||
- bundle exec rspec spec | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
source 'https://rubygems.org' | ||
gem 'spree', github: 'spree/spree' | ||
|
||
gem 'spree', github: 'spree/spree', branch: 'master' | ||
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: 'master' | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
guard "rspec", cmd: "bundle exec rspec", all_on_start: false, all_after_pass: false do | ||
watch("spec/spec_helper.rb") { "spec" } | ||
watch("config/routes.rb") { "spec/controllers" } | ||
watch(%r{^spec/(.+)_spec\.rb$}) { |m| "spec/#{m[1]}_spec.rb"} | ||
watch(%r{^app/(.+)_decorator\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | ||
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | ||
watch(%r{^app/(.*)(\.erb)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | ||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | ||
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb" } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,59 @@ | ||
Spree Email to Friend | ||
===================== | ||
|
||
[![Build Status](https://api.travis-ci.org/spree/spree_email_to_friend.png?branch=master)](https://api.travis-ci.org/spree/spree_email_to_friend.png) | ||
|
||
The Spree Email to Friend extension enables you to send the product reference to your friend via email. | ||
|
||
Installation | ||
------------ | ||
|
||
Add the following to your <code>Gemfile</code> | ||
|
||
gem 'spree_email_to_friend', :git => 'git://github.com/spree/spree_email_to_friend.git' | ||
Add to your `Gemfile` | ||
```ruby | ||
gem 'spree_email_to_friend', github: 'spree/spree_email_to_friend', branch: 'master' | ||
``` | ||
|
||
Run | ||
``` | ||
bundle install | ||
``` | ||
|
||
Thats all! | ||
|
||
Contributing | ||
------------ | ||
|
||
In the spirit of [free software][1], **everyone** is encouraged to help improve this project. | ||
|
||
Here are some ways *you* can contribute: | ||
|
||
* by using prerelease versions | ||
* by reporting [bugs][2] | ||
* by suggesting new features | ||
* by writing translations | ||
* by writing or editing documentation | ||
* by writing specifications | ||
* by writing code (*no patch is too small*: fix typos, add comments, clean up inconsistent whitespace) | ||
* by refactoring code | ||
* by resolving [issues][2] | ||
* by reviewing patches | ||
|
||
Starting point: | ||
|
||
* Fork the repo | ||
* Clone your repo | ||
* Run `bundle install` | ||
* Run `bundle exec rake test_app` to create the test application in `spec/test_app` | ||
* Make your changes | ||
* Ensure specs pass by running `bundle exec rspec spec` | ||
* Submit your pull request | ||
|
||
bundle install | ||
Copyright (c) 2014 [Jorge Calás Lozano][5], [Roman Smirnov][6], [Trung Lê][7] and other [contributors][8], released under the [New BSD License][3] | ||
|
||
|
||
[1]: http://www.fsf.org/licensing/essays/free-sw.html | ||
[2]: https://github.com/spree/spree_email_to_friend/issues | ||
[3]: https://github.com/spree/spree_email_to_friend/blob/master/LICENSE.md | ||
[5]: https://github.com/calas | ||
[6]: https://github.com/romul | ||
[7]: https://github.com/joneslee85 | ||
[8]: https://github.com/spree/spree_email_to_friend/graphs/contributors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//= require spree/backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//= require spree/frontend |
3 changes: 3 additions & 0 deletions
3
app/assets/stylesheets/spree/backend/spree_email_to_friend.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
*= require spree/backend | ||
*/ |
3 changes: 3 additions & 0 deletions
3
app/assets/stylesheets/spree/frontend/spree_email_to_friend.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
*= require spree/frontend | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<%= mail.recipient_name %>, | ||
<%= @mail.recipient_name %>, | ||
|
||
I think you would like this item: | ||
<%= Spree.t(:you_would_like_this_item, scope: :email_to_friend) %> | ||
|
||
* <%= object.name %> | ||
* <%= @object.name %> | ||
<% unless mail.message.blank? -%> | ||
<%= mail.message %> | ||
<% unless @mail.message.blank? -%> | ||
<%= @mail.message %> | ||
<% end -%> | ||
<%= mail.sender_name %> | ||
<%= @mail.sender_name %> | ||
Click the link below to view the <%= object.name %> page. | ||
<%= spree.product_url(object) %> | ||
<%= Spree.t(:click_link_to_view, scope: :email_to_friend, name: @object.name) %> | ||
<%= spree.product_url(@object) %> | ||
For more online shopping, visit <%= spree.products_url %> | ||
<%= Spree.t(:visit_page, scope: :email_to_friend, url: spree.products_url) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
--- | ||
de: | ||
spree: | ||
email_to_friend: | ||
send_to_friend: "Per Email Empfehlen" | ||
tell_about: "Empfehle '%{product}' weiter" | ||
sender_name: "Dein Name" | ||
sender_email: "Deine Emailadresse" | ||
recipient_name: "Name vom Empfänger" | ||
recipient_email: "Email vom Empfänger" | ||
recipient_emails: "Empfänger Emails (mit Beistrich getrennt)" | ||
message: "Nachricht" | ||
send_message: "Diesen Artikel per E-Mail empfehlen!" | ||
mail_sent_to: "Email wurde an %{email} verschickt " | ||
send_to_other: "Jemanden anders empfehlen" | ||
you_would_like_this: "Ich glaube das könnte dir gefallen" | ||
|
||
captcha: | ||
captcha_settings: "Captcha Einstellungen" | ||
public_key: "Öffentlichter Schlüssel (Public key)" | ||
private_key: "Privater Schlüssel (Private key)" | ||
manage_keys: "Ihre (re)captcha Schlüssel verwalten" | ||
theme: "Theme" | ||
spree: | ||
email_to_friend: | ||
send_to_friend: "Per Email Empfehlen" | ||
tell_about: "Empfehle '%{product}' weiter" | ||
sender_name: "Dein Name" | ||
sender_email: "Deine Emailadresse" | ||
recipient_name: "Name vom Empfänger" | ||
recipient_email: "Email vom Empfänger" | ||
recipient_emails: "Empfänger Emails (mit Beistrich getrennt)" | ||
message: "Nachricht" | ||
send_message: "Diesen Artikel per E-Mail empfehlen!" | ||
mail_sent_to: "Email wurde an %{email} verschickt " | ||
send_to_other: "Jemanden anders empfehlen" | ||
sender_subject: "Ich glaube das könnte dir gefallen" | ||
you_would_like_this_item: "Ich glaube das könnte dir gefallen:" | ||
click_link_to_view: "Klicken Sie auf den Link unten, um den %{name} Seite zu sehen." | ||
visit_page: "Weitere Online-Shopping, Besuch %{url}" | ||
captcha: | ||
captcha_settings: "Captcha Einstellungen" | ||
public_key: "Öffentlichter Schlüssel (Public key)" | ||
private_key: "Privater Schlüssel (Private key)" | ||
manage_keys: "Ihre (re)captcha Schlüssel verwalten" | ||
use_captcha: "Verwenden Captcha?" | ||
theme: "Thema" | ||
validation: | ||
recipients: "muss mindestens eine gültige E-Mail-Adresse enthalten" | ||
invalid_recipients: "müssen entfernt werden" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
--- | ||
es: | ||
spree: | ||
email_to_friend: | ||
send_to_friend: "Enviar a un amigo" | ||
tell_about: "Enviar {{product}} a un amigo" | ||
sender_name: "Tu nombre" | ||
sender_email: "Tu dirección de correo" | ||
recipient_name: "Nombre de tu amigo" | ||
recipient_email: "Dirección de correo de tu amigo" | ||
message: "Mensaje" | ||
send_message: "¡Enviar a un amigo!" | ||
mail_sent_to: "Mensaje enviado a {{email}} " | ||
send_to_other: "Enviar a otro amigo" | ||
you_would_like_this: "Creo que este artículo te gustará" | ||
captcha: | ||
captcha_settings: "Configuracion de Captcha" | ||
public_key: "Llave pública" | ||
private_key: "Llave privada" | ||
manage_keys: "Administrar tus llaves de recaptcha." | ||
theme: "Tema" | ||
spree: | ||
email_to_friend: | ||
send_to_friend: "Enviar a un amigo" | ||
tell_about: "Enviar %{product} a un amigo" | ||
sender_name: "Tu nombre" | ||
sender_email: "Tu dirección de correo" | ||
recipient_name: "Nombre de tu amigo" | ||
recipient_email: "Dirección de correo de tu amigo" | ||
recipient_emails: "Direcciones de correo electrónico (separadas por comas)" | ||
message: "Mensaje" | ||
send_message: "¡Enviar a un amigo!" | ||
mail_sent_to: "Mensaje enviado a %{email} " | ||
send_to_other: "Enviar a otro amigo" | ||
sender_subject: "Creo que este artículo te gustará" | ||
you_would_like_this_item: "Creo que este artículo te gustará:" | ||
click_link_to_view: "Haga clic en el enlace de abajo para ver la página %{name}." | ||
visit_page: "Para ir de compras más en línea, visite %{url}" | ||
captcha: | ||
captcha_settings: "Configuracion de Captcha" | ||
public_key: "Llave pública" | ||
private_key: "Llave privada" | ||
manage_keys: "Administrar tus llaves de recaptcha." | ||
use_captcha: "Usar Captcha?" | ||
theme: "Tema" | ||
validation: | ||
recipients: "debe contener al menos una dirección de e-mail válida" | ||
invalid_recipients: "debe ser eliminado" |
Oops, something went wrong.