corn_starch 1.1.8 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 501815f7531bc0bc0706f4caf88a1900936c490c
4
- data.tar.gz: 17c2356ec1a4c9f599bd74446e69a7e7edc071d7
3
+ metadata.gz: 69ee03da14eb1397eede12bd552cbda0e76c7b0d
4
+ data.tar.gz: 7e9cf49f0be79bc40eced5dc7711c00705e5a05d
5
5
  SHA512:
6
- metadata.gz: c026af6631054df71ba3d69e72cec69de1eb63f7d36165f5f76fde38cb6f06d1274f5ad88d081bcccb834fa557822270010a708bf1290071a72d1a9bd13c52c9
7
- data.tar.gz: cccbee66fab33f35aaf8dc420d1ccd6a866cb718e34c96a726b9ac4b48400bb3f4cfeb37bef2a2663e6ea5c82ca29529411a69c241b9fa80b03dcd5538ab9f76
6
+ metadata.gz: b4c49ba8433360756cd5d4b17e6100d7b185799e2bc7d28d6fb875f31690c9a81d0f2c2082c1b4529736c4dfb50fe22db78ab473041d105edacc223fcf001777
7
+ data.tar.gz: 64c52a08bf427294f420a079c4a8800c3e5dcfb9e4c3743167472613a3ec6279a7648268ec7eedfccf820c4b6f8c6c08225085289343035587e0ba845bde8624
@@ -74,22 +74,22 @@ module CornStarch
74
74
 
75
75
  # Authentication Filter
76
76
  def auth_filter
77
- redirect_to new_session_url, alert: { head: t('corn_starch.auth.access_denied'), body: t('corn_starch.auth.login_required') } unless is_authed
77
+ redirect_to new_session_url, alert: { head: t('auth.access_denied'), body: t('auth.login_required') } unless is_authed
78
78
  end
79
79
 
80
80
  # Un-Authentication Filter
81
81
  def unauth_filter
82
- redirect_to root_url, alert: { head: t('corn_starch.auth.access_denied'), body: t('corn_starch.auth.already_logged_in') } if is_authed
82
+ redirect_to root_url, alert: { head: t('auth.access_denied'), body: t('auth.already_logged_in') } if is_authed
83
83
  end
84
84
 
85
85
  # Self Filter
86
86
  def self_filter
87
- redirect_to root_url, alert: { head: t('corn_starch.auth.access_denied'), body: t('corn_starch.auth.invalid_user_id') } unless is_self
87
+ redirect_to root_url, alert: { head: t('auth.access_denied'), body: t('auth.invalid_user_id') } unless is_self
88
88
  end
89
89
 
90
90
  # Not Self Filter
91
91
  def not_self_filter
92
- redirect_to root_url, alert: { head: t('corn_starch.auth.access_denied'), body: t('corn_starch.auth.invalid_user_id') } if is_self
92
+ redirect_to root_url, alert: { head: t('auth.access_denied'), body: t('auth.invalid_user_id') } if is_self
93
93
  end
94
94
 
95
95
  # Pagination Filter
@@ -174,29 +174,29 @@ module CornStarch
174
174
  # Session Control
175
175
  when :login
176
176
  {
177
- pass: { head: t('corn_starch.gen_msg.login.pass.head'), body: t('corn_starch.gen_msg.login.pass.body', name: uname) },
178
- fail: { head: t('corn_starch.gen_msg.login.fail.head'), body: t('corn_starch.gen_msg.login.fail.body') }
177
+ pass: { head: t('gen_msg.login.pass.head'), body: t('gen_msg.login.pass.body', name: uname) },
178
+ fail: { head: t('gen_msg.login.fail.head'), body: t('gen_msg.login.fail.body') }
179
179
  }[result_or_name]
180
180
  when :logout
181
- { head: t('corn_starch.gen_msg.logout.head'), body: t('corn_starch.gen_msg.logout.body') }
181
+ { head: t('gen_msg.logout.head'), body: t('gen_msg.logout.body') }
182
182
 
183
183
  # Generic Resources
184
184
  when :create
185
185
  {
186
- pass: { head: t('corn_starch.gen_msg.create.pass.head', model: model), body: t('corn_starch.gen_msg.create.pass.body', model: model, name: ename) },
187
- fail: { head: t('corn_starch.gen_msg.create.fail.head', model: model), body: t('corn_starch.gen_msg.create.fail.body') }
186
+ pass: { head: t('gen_msg.create.pass.head', model: model), body: t('gen_msg.create.pass.body', model: model, name: ename) },
187
+ fail: { head: t('gen_msg.create.fail.head', model: model), body: t('gen_msg.create.fail.body') }
188
188
  }[result_or_name]
189
189
  when :update
190
190
  {
191
- pass: { head: t('corn_starch.gen_msg.update.pass.head', model: model), body: t('corn_starch.gen_msg.update.pass.body', model: model, name: ename) },
192
- fail: { head: t('corn_starch.gen_msg.update.fail.head', model: model), body: t('corn_starch.gen_msg.update.fail.body') }
191
+ pass: { head: t('gen_msg.update.pass.head', model: model), body: t('gen_msg.update.pass.body', model: model, name: ename) },
192
+ fail: { head: t('gen_msg.update.fail.head', model: model), body: t('gen_msg.update.fail.body') }
193
193
  }[result_or_name]
194
194
  when :destroy
195
- { head: t('corn_starch.gen_msg.destroy.head', model: model), body: t('corn_starch.gen_msg.destroy.body', model: model, name: result_or_name) }
195
+ { head: t('gen_msg.destroy.head', model: model), body: t('gen_msg.destroy.body', model: model, name: result_or_name) }
196
196
 
197
197
  # Error
198
198
  else
199
- t('corn_starch.gen_msg.unknown_action', action: action)
199
+ t('gen_msg.unknown_action', action: action)
200
200
  end
201
201
  end
202
202
  end
@@ -3,5 +3,8 @@
3
3
  <%= content_tag :div, class: "alert alert-#{{ notice: 'success', alert: 'danger' }[name.to_sym]}", role: :alert do %>
4
4
  <strong><%= msg['head'] %></strong>
5
5
  <p><%= msg['body'] %></p>
6
+ <p>
7
+ <%= msg.inspect %>
8
+ </p>
6
9
  <% end %>
7
10
  <% end %>
@@ -4,55 +4,52 @@
4
4
  # English Translations
5
5
  en:
6
6
 
7
- # CornStarch Strings
8
- corn_starch:
9
-
10
- # Auth
11
- auth:
12
- access_denied: "Access denied"
13
- login_required: "Login required"
14
- already_logged_in: "Already logged in"
15
- invalid_user_id: "Invalid user ID"
16
-
17
- # Generic Notice Messages
18
- gen_msg:
19
-
20
- # Login
21
- login:
22
- pass:
23
- head: "Logged in"
24
- body: "You have successfully logged in as %{name}"
25
- fail:
26
- head: "Login failed"
27
- body: "Invalid username / password"
28
-
29
- # Logout
30
- logout:
31
- head: "Logged out"
32
- body: "You have successfully logged out"
33
-
34
- # Create
35
- create:
36
- pass:
37
- head: "%{model} created"
38
- body: "%{model} [%{name}] was successfully created"
39
- fail:
40
- head: "%{model} creation failed"
41
- body: "Invalid information"
42
-
43
- # Update
44
- update:
45
- pass:
46
- head: "%{model} updated"
47
- body: "%{model} [%{name}] was successfully updated"
48
- fail:
49
- head: "%{model} update failed"
50
- body: "Invalid information"
51
-
52
- # Destroy
53
- destroy:
54
- head: "%{model} destroyed"
55
- body: "%{model} [%{name}] was successfully destroyed"
56
-
57
- # Unknown Action
58
- unknown_action: "Unknown action [%{action}]"
7
+ # Auth
8
+ auth:
9
+ access_denied: "Access denied"
10
+ login_required: "Login required"
11
+ already_logged_in: "Already logged in"
12
+ invalid_user_id: "Invalid user ID"
13
+
14
+ # Generic Notice Messages
15
+ gen_msg:
16
+
17
+ # Login
18
+ login:
19
+ pass:
20
+ head: "Logged in"
21
+ body: "You have successfully logged in as %{name}"
22
+ fail:
23
+ head: "Login failed"
24
+ body: "Invalid username / password"
25
+
26
+ # Logout
27
+ logout:
28
+ head: "Logged out"
29
+ body: "You have successfully logged out"
30
+
31
+ # Create
32
+ create:
33
+ pass:
34
+ head: "%{model} created"
35
+ body: "%{model} [%{name}] was successfully created"
36
+ fail:
37
+ head: "%{model} creation failed"
38
+ body: "Invalid information"
39
+
40
+ # Update
41
+ update:
42
+ pass:
43
+ head: "%{model} updated"
44
+ body: "%{model} [%{name}] was successfully updated"
45
+ fail:
46
+ head: "%{model} update failed"
47
+ body: "Invalid information"
48
+
49
+ # Destroy
50
+ destroy:
51
+ head: "%{model} destroyed"
52
+ body: "%{model} [%{name}] was successfully destroyed"
53
+
54
+ # Unknown Action
55
+ unknown_action: "Unknown action [%{action}]"
@@ -4,48 +4,52 @@
4
4
  # French Translations
5
5
  fr:
6
6
 
7
- # CornStarch Strings
8
- corn_starch:
9
-
10
- # Generic Notice Messages
11
- gen_msg:
12
-
13
- # Login
14
- login:
15
- pass:
16
- head: ""
17
- body: ""
18
- fail:
19
- head: ""
20
- body: ""
21
-
22
- # Logout
23
- logout:
7
+ # Auth
8
+ auth:
9
+ access_denied: ""
10
+ login_required: ""
11
+ already_logged_in: ""
12
+ invalid_user_id: ""
13
+
14
+ # Generic Notice Messages
15
+ gen_msg:
16
+
17
+ # Login
18
+ login:
19
+ pass:
24
20
  head: ""
25
21
  body: ""
22
+ fail:
23
+ head: ""
24
+ body: ""
25
+
26
+ # Logout
27
+ logout:
28
+ head: ""
29
+ body: ""
26
30
 
27
- # Create
28
- create:
29
- pass:
30
- head: ""
31
- body: ""
32
- fail:
33
- head: ""
34
- body: ""
35
-
36
- # Update
37
- update:
38
- pass:
39
- head: ""
40
- body: ""
41
- fail:
42
- head: ""
43
- body: ""
44
-
45
- # Destroy
46
- destroy:
31
+ # Create
32
+ create:
33
+ pass:
47
34
  head: ""
48
35
  body: ""
36
+ fail:
37
+ head: ""
38
+ body: ""
39
+
40
+ # Update
41
+ update:
42
+ pass:
43
+ head: ""
44
+ body: ""
45
+ fail:
46
+ head: ""
47
+ body: ""
48
+
49
+ # Destroy
50
+ destroy:
51
+ head: ""
52
+ body: ""
49
53
 
50
- # Unknown Action
51
- unknown_action: ""
54
+ # Unknown Action
55
+ unknown_action: ""
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.1.8'
2
+ VERSION = '1.1.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse