simple_helpers 0.0.2 → 0.0.3
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.
- data/CHANGELOG.md +4 -0
- data/README.md +7 -9
- data/lib/simple_helpers/support.rb +1 -2
- data/lib/simple_helpers/version.rb +1 -1
- data/simple_helpers.gemspec +1 -1
- data/templates/initializer.rb +3 -3
- metadata +5 -5
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -44,21 +44,21 @@ If you didn't set the value manually, the gem will get it from your I18n backend
|
|
44
44
|
|
45
45
|
```ruby
|
46
46
|
en:
|
47
|
-
|
47
|
+
page_title:
|
48
48
|
simple_helper_default:
|
49
49
|
"Default page title"
|
50
50
|
users:
|
51
51
|
new: "Sign up"
|
52
52
|
show: "%{name}'s Page"
|
53
|
-
|
53
|
+
page_subtitle:
|
54
54
|
simple_helper_default:
|
55
55
|
"Default page subtitle"
|
56
|
-
|
56
|
+
user_alert:
|
57
57
|
users:
|
58
58
|
index: "This alert goes to %{username}"
|
59
|
-
|
59
|
+
sponsor:
|
60
60
|
simple_helper_default:
|
61
|
-
"
|
61
|
+
"This article %{title} is sponsored by %{company}."
|
62
62
|
```
|
63
63
|
|
64
64
|
### Interpolation
|
@@ -168,11 +168,9 @@ https://github.com/vitormil/simple_helpers/blob/master/templates/initializer.rb
|
|
168
168
|
|
169
169
|
## Special thanks
|
170
170
|
|
171
|
-
I have been
|
171
|
+
I have been learning a lot with Nando Vieira and this gem was inspired by the "page_title" feature from his gem @swiss_knife.
|
172
172
|
|
173
|
-
|
174
|
-
- http://nandovieira.com.br/
|
175
|
-
- http://github.com/fnando
|
173
|
+
Thanks @fnando! (<http://github.com/fnando>)
|
176
174
|
|
177
175
|
## Contributing
|
178
176
|
|
@@ -24,8 +24,7 @@ module SimpleHelpers
|
|
24
24
|
simple_helper_aliases = controller.class.const_get :SIMPLE_HELPER_ALIASES
|
25
25
|
action_name = simple_helper_aliases.fetch(action_name, action_name) if simple_helper_aliases.is_a? Hash
|
26
26
|
end
|
27
|
-
group =
|
28
|
-
group = group.pluralize
|
27
|
+
group = group.pluralize if options.has_key? :pluralize
|
29
28
|
|
30
29
|
{
|
31
30
|
:first => "#{group}.#{controller_name}.#{action_name.to_s}",
|
data/simple_helpers.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.email = ["vitormil@gmail.com"]
|
13
13
|
gem.summary = "Customizable helper methods with I18n support."
|
14
14
|
gem.description = gem.summary
|
15
|
-
gem.homepage = "http://
|
15
|
+
gem.homepage = "http://rubygems.org/gems/simple_helpers"
|
16
16
|
|
17
17
|
gem.files = `git ls-files`.split($\)
|
18
18
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/templates/initializer.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
require "simple_helpers"
|
3
3
|
|
4
4
|
SimpleHelpers.configure do |config|
|
5
|
-
|
6
5
|
# Helper methods that will be automatically
|
7
6
|
# created in the controllers
|
8
7
|
# config.helpers = [:page_title]
|
@@ -18,6 +17,7 @@ SimpleHelpers.configure do |config|
|
|
18
17
|
# config.whitelist = []
|
19
18
|
|
20
19
|
# Options:
|
21
|
-
#
|
22
|
-
|
20
|
+
# :pluralize => I18n pluralized helper names
|
21
|
+
# [ :log, :pluralize ]
|
22
|
+
# config.options = [ :log ]
|
23
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -110,7 +110,7 @@ files:
|
|
110
110
|
- spec/support/public/javascripts/.gitkeep
|
111
111
|
- spec/support/public/stylesheets/.gitkeep
|
112
112
|
- templates/initializer.rb
|
113
|
-
homepage: http://
|
113
|
+
homepage: http://rubygems.org/gems/simple_helpers
|
114
114
|
licenses: []
|
115
115
|
post_install_message:
|
116
116
|
rdoc_options: []
|
@@ -124,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
segments:
|
126
126
|
- 0
|
127
|
-
hash:
|
127
|
+
hash: 4057646735331039904
|
128
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
segments:
|
135
135
|
- 0
|
136
|
-
hash:
|
136
|
+
hash: 4057646735331039904
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
139
|
rubygems_version: 1.8.23
|