contact_us 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/views/contact_us/contacts/new.html.erb +11 -11
- data/config/locales/contact_us.he.yml +22 -0
- data/lib/contact_us/version.rb +1 -1
- data/spec/controllers/contact_us/contact_controller_spec.rb +1 -0
- metadata +26 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b4af9a7e1a040a09d56fb900c45a423271c1b3c
|
4
|
+
data.tar.gz: 9c1da5313dacabbe5504d188102081854492ef34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e80d5d953abe298c375c08ea8f383e86786b4aab675237d284dbea293a0db518e831127d561a2f77835e53ea381ae984242b1b35798a2b6f7abae65262359ae4
|
7
|
+
data.tar.gz: 12087ba06b082c2ef0216d64e881aaf2dd18185a0aa9ddad6a2ed7dd81ad46d3502cfa17e342b4c860b05a01848295709ef8da5e6cda5080112f2397fb6b0560
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ It is also recommended to use Formtastic or SimpleForm (see configuration) in or
|
|
24
24
|
In your `Gemfile`, add the following dependencies:
|
25
25
|
|
26
26
|
```ruby
|
27
|
-
gem 'contact_us', '~> 0.
|
27
|
+
gem 'contact_us', '~> 0.5.1'
|
28
28
|
```
|
29
29
|
|
30
30
|
From `Rails.root` in your Terminal run:
|
@@ -1,38 +1,38 @@
|
|
1
1
|
<h2><%= t('.contact_us') %></h2>
|
2
2
|
<%= form_for @contact, :url => contacts_path, :html => {:class => 'formtastic'} do |f| %>
|
3
3
|
<% if ContactUs.require_name %>
|
4
|
-
<
|
4
|
+
<div class='string required' id='contact_us_contact_name_input'>
|
5
5
|
<%= f.label :name, (t('.name') + content_tag(:abbr, '*', :class => 'required')).html_safe %>
|
6
6
|
<%= f.text_field :name %>
|
7
7
|
<% if f.object.errors[:name].present? %>
|
8
8
|
<p class='inline-error'><%= f.object.errors[:name].join(' and ') %></p>
|
9
9
|
<% end %>
|
10
|
-
</
|
10
|
+
</div>
|
11
11
|
<% end %>
|
12
|
-
<
|
12
|
+
<div class='string required' id='contact_us_contact_email_input'>
|
13
13
|
<%= f.label :email, (t('.email') + content_tag(:abbr, '*', :class => 'required')).html_safe %>
|
14
14
|
<%= f.text_field :email %>
|
15
15
|
<% if f.object.errors[:email].present? %>
|
16
16
|
<p class='inline-error'><%= f.object.errors[:email].join(' and ') %></p>
|
17
17
|
<% end %>
|
18
|
-
</
|
18
|
+
</div>
|
19
19
|
<% if ContactUs.require_subject %>
|
20
|
-
<
|
20
|
+
<div class='string required' id='contact_us_contact_subject_input'>
|
21
21
|
<%= f.label :subject, (t('.subject') + content_tag(:abbr, '*', :class => 'required')).html_safe %>
|
22
22
|
<%= f.text_field :subject %>
|
23
23
|
<% if f.object.errors[:subject].present? %>
|
24
24
|
<p class='inline-error'><%= f.object.errors[:subject].join(' and ') %></p>
|
25
25
|
<% end %>
|
26
|
-
</
|
26
|
+
</div>
|
27
27
|
<% end %>
|
28
|
-
<
|
28
|
+
<div class='text required' id='contact_us_contact_message_input'>
|
29
29
|
<%= f.label :message, (t('.message') + content_tag(:abbr, '*', :class => 'required')).html_safe %>
|
30
30
|
<%= f.text_area :message %>
|
31
31
|
<% if f.object.errors[:message].present? %>
|
32
32
|
<p class='inline-error'><%= f.object.errors[:message].join(' and ') %></p>
|
33
33
|
<% end %>
|
34
|
-
</
|
35
|
-
<
|
36
|
-
<%= f.submit :submit, :
|
37
|
-
</
|
34
|
+
</div>
|
35
|
+
<div class='commit'>
|
36
|
+
<%= f.submit :submit, :class => 'submit create', :title => t('.submit') %>
|
37
|
+
</div>
|
38
38
|
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
he:
|
2
|
+
contact_us:
|
3
|
+
contact_mailer:
|
4
|
+
contact_email:
|
5
|
+
sent_by_contact_form: "נשלח על ידי קונטקט פורם מאת %{email}"
|
6
|
+
sent_by_name: "נשלח על ידי %{name} מאת %{email}"
|
7
|
+
subject: "צור קשר, הודעה מאת %{email}"
|
8
|
+
contacts:
|
9
|
+
new: &new
|
10
|
+
contact_us: "צור קשר"
|
11
|
+
email: "מייל"
|
12
|
+
message: "הודעה"
|
13
|
+
name: "שם"
|
14
|
+
subject: "נושא"
|
15
|
+
submit: "שלח"
|
16
|
+
new_formtastic:
|
17
|
+
<<: *new
|
18
|
+
new_simple_form:
|
19
|
+
<<: *new
|
20
|
+
notices:
|
21
|
+
error: "הנך צריך למלא את שתי השדות."
|
22
|
+
success: "הטופס נשלח בהצלחה."
|
data/lib/contact_us/version.rb
CHANGED
@@ -22,6 +22,7 @@ describe ContactUs::ContactsController do
|
|
22
22
|
assigns(:contact).valid?.should eql(true)
|
23
23
|
flash[:notice].should eql('Contact email was successfully sent.')
|
24
24
|
response.should redirect_to('/success')
|
25
|
+
ContactUs.success_redirect = '/'
|
25
26
|
end
|
26
27
|
|
27
28
|
it 'should render new with error message if invalid contact' do
|
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contact_us
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Dutil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.13'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.13'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: shoulda-matchers
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.5.4
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.5.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: simplecov
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.7'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.7'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sqlite3
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 1.3.5
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.3.5
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: formtastic
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 2.1.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 2.1.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: simple_form
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rails
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 4.0.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 4.0.0
|
125
125
|
description: A Rails 3+ Engine providing a basic contact form. I used Formtastic
|
@@ -130,9 +130,9 @@ executables: []
|
|
130
130
|
extensions: []
|
131
131
|
extra_rdoc_files: []
|
132
132
|
files:
|
133
|
-
- .gitignore
|
134
|
-
- .rspec
|
135
|
-
- .travis.yml
|
133
|
+
- ".gitignore"
|
134
|
+
- ".rspec"
|
135
|
+
- ".travis.yml"
|
136
136
|
- CHANGELOG.md
|
137
137
|
- Gemfile
|
138
138
|
- MIT-LICENSE
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- config/locales/contact_us.en.yml
|
152
152
|
- config/locales/contact_us.es.yml
|
153
153
|
- config/locales/contact_us.fr.yml
|
154
|
+
- config/locales/contact_us.he.yml
|
154
155
|
- config/locales/contact_us.it.yml
|
155
156
|
- config/locales/contact_us.ja.yml
|
156
157
|
- config/locales/contact_us.pl.yml
|
@@ -214,17 +215,17 @@ require_paths:
|
|
214
215
|
- lib
|
215
216
|
required_ruby_version: !ruby/object:Gem::Requirement
|
216
217
|
requirements:
|
217
|
-
- -
|
218
|
+
- - ">="
|
218
219
|
- !ruby/object:Gem::Version
|
219
220
|
version: 1.9.3
|
220
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
222
|
requirements:
|
222
|
-
- -
|
223
|
+
- - ">="
|
223
224
|
- !ruby/object:Gem::Version
|
224
225
|
version: '0'
|
225
226
|
requirements: []
|
226
227
|
rubyforge_project: contact_us
|
227
|
-
rubygems_version: 2.
|
228
|
+
rubygems_version: 2.2.2
|
228
229
|
signing_key:
|
229
230
|
specification_version: 4
|
230
231
|
summary: Gem providing simple Contact Us functionality with a Rails 3+ Engine.
|
@@ -268,3 +269,4 @@ test_files:
|
|
268
269
|
- spec/models/contact_us/contact_spec.rb
|
269
270
|
- spec/spec_helper.rb
|
270
271
|
- spec/support/active_model_lint.rb
|
272
|
+
has_rdoc:
|