simple_helpers 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/.travis.yml +2 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +2 -0
- data/LICENSE +22 -0
- data/README.md +156 -0
- data/Rakefile +5 -0
- data/lib/simple_helpers.rb +18 -0
- data/lib/simple_helpers/action_controller.rb +61 -0
- data/lib/simple_helpers/config.rb +50 -0
- data/lib/simple_helpers/generators.rb +16 -0
- data/lib/simple_helpers/helpers.rb +9 -0
- data/lib/simple_helpers/railtie.rb +32 -0
- data/lib/simple_helpers/support.rb +37 -0
- data/lib/simple_helpers/version.rb +8 -0
- data/simple_helpers.gemspec +26 -0
- data/spec/controllers/application_controller_spec.rb +23 -0
- data/spec/schema.rb +5 -0
- data/spec/spec_helper.rb +25 -0
- data/spec/support/app/controllers/application_controller.rb +2 -0
- data/spec/support/config/boot.rb +20 -0
- data/spec/support/config/database.yml +3 -0
- data/spec/support/config/locales/en.yml +14 -0
- data/spec/support/log/test.log +330 -0
- data/spec/support/public/javascripts/.gitkeep +0 -0
- data/spec/support/public/stylesheets/.gitkeep +0 -0
- data/templates/initializer.rb +23 -0
- metadata +153 -0
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --format documentation
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Vitor Oliveira
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
# Simple Helpers
|
2
|
+
|
3
|
+
Easily create variables with I18n and interpolation support to your controllers and views.
|
4
|
+
|
5
|
+
You can configure it to automaticly create some methods (like page_title, page_subtitle) or call the method **simple_helper** manually according to your needs.
|
6
|
+
|
7
|
+
Examples:
|
8
|
+
|
9
|
+
To display page title in your view:
|
10
|
+
|
11
|
+
**<%= page_title %>**
|
12
|
+
|
13
|
+
Setting page title from I18n files.
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
en:
|
17
|
+
titles:
|
18
|
+
simple_helper_default:
|
19
|
+
"Default page title"
|
20
|
+
users:
|
21
|
+
new: "Sign up"
|
22
|
+
show: "%{name}'s Page"
|
23
|
+
```
|
24
|
+
|
25
|
+
### Interpolation
|
26
|
+
|
27
|
+
In many cases you want to abstract your translations so that variables can be interpolated into the translation, just like Rails do.
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
page_title :name => @user.name
|
31
|
+
or
|
32
|
+
page_title_options.merge!({:name => "John Doe"})
|
33
|
+
or
|
34
|
+
simple_helper :page_title, :name => "John Doe"
|
35
|
+
```
|
36
|
+
|
37
|
+
### Aliases
|
38
|
+
|
39
|
+
There are some action aliases:
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
"create" => "new"
|
43
|
+
"update" => "edit"
|
44
|
+
"remove" => "destroy"
|
45
|
+
```
|
46
|
+
|
47
|
+
I18n Backend Chain:
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
en:
|
51
|
+
<helper method name>:
|
52
|
+
simple_helper_default:
|
53
|
+
"My default data"
|
54
|
+
<controller>:
|
55
|
+
<action>: "My custom data for this action"
|
56
|
+
```
|
57
|
+
|
58
|
+
Adding custom aliases:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
class PostsController < ApplicationController
|
62
|
+
|
63
|
+
SIMPLE_HELPER_ALIASES = {
|
64
|
+
"the_custom_action" => "index"
|
65
|
+
}
|
66
|
+
|
67
|
+
def index
|
68
|
+
...
|
69
|
+
end
|
70
|
+
|
71
|
+
def the_custom_action
|
72
|
+
...
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
```
|
77
|
+
|
78
|
+
This means that the I18n scope for the action "the_custom_action" will be the same as "index".
|
79
|
+
|
80
|
+
You can also specify a custom location at the "scope" key at the options hash, like rails does.
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
simple_helper :page_title, :scope => "my.awesome.chain", :name => "John Doe"
|
84
|
+
or
|
85
|
+
page_title_options.merge!({:scope => "my.awesome.chain", :name => "John Doe"})
|
86
|
+
```
|
87
|
+
|
88
|
+
### Usage
|
89
|
+
|
90
|
+
Other examples that could be called in your controllers:
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
simple_helper :page_subtitle, :special_message, :title => @post.title
|
94
|
+
special_message_options.merge({:author => @post.author.name})
|
95
|
+
page_subtitle "Keep Calm and %{text}", :text => "Call Batman"
|
96
|
+
simple_helper :user_alert
|
97
|
+
```
|
98
|
+
|
99
|
+
## Getting started
|
100
|
+
|
101
|
+
Simple helpers works with Rails 3.0 onwards. You can add it to your Gemfile with:
|
102
|
+
|
103
|
+
**gem 'simple_helpers'**
|
104
|
+
|
105
|
+
Run the bundle command to install it.
|
106
|
+
|
107
|
+
After you install and add it to your Gemfile, you need to run the generator to create the initializer file. In this file you will configure the default behavior to your controllers.
|
108
|
+
|
109
|
+
**rails generate simple_helpers**
|
110
|
+
|
111
|
+
Take a look at the generated file:
|
112
|
+
|
113
|
+
https://github.com/vitormil/simple_helpers/blob/master/templates/initializer.rb
|
114
|
+
|
115
|
+
## Maintainer
|
116
|
+
|
117
|
+
* Vitor Oliveira (<http://github.com/vitormil>)
|
118
|
+
|
119
|
+
## Special thanks
|
120
|
+
|
121
|
+
I have been studying (and learning a lot!) with Nando Vieira (@fnando) and this gem was inspired by the "page_title" feature from his gem @swiss_knife.
|
122
|
+
|
123
|
+
Check out his work! Thanks @fnando
|
124
|
+
- http://nandovieira.com.br/
|
125
|
+
- http://github.com/fnando
|
126
|
+
|
127
|
+
## Contributing
|
128
|
+
|
129
|
+
1. Fork it
|
130
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
131
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
132
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
133
|
+
5. Create new Pull Request
|
134
|
+
|
135
|
+
## License
|
136
|
+
|
137
|
+
(The MIT License)
|
138
|
+
|
139
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
140
|
+
a copy of this software and associated documentation files (the
|
141
|
+
'Software'), to deal in the Software without restriction, including
|
142
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
143
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
144
|
+
permit persons to whom the Software is furnished to do so, subject to
|
145
|
+
the following conditions:
|
146
|
+
|
147
|
+
The above copyright notice and this permission notice shall be
|
148
|
+
included in all copies or substantial portions of the Software.
|
149
|
+
|
150
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
151
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
152
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
153
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
154
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
155
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
156
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "simple_helpers/config"
|
2
|
+
require "simple_helpers/support"
|
3
|
+
require "simple_helpers/helpers"
|
4
|
+
require "simple_helpers/action_controller"
|
5
|
+
require "simple_helpers/railtie"
|
6
|
+
|
7
|
+
module SimpleHelpers
|
8
|
+
def self.configure(&block)
|
9
|
+
yield Config
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
SimpleHelpers.configure do |config|
|
14
|
+
config.helpers = []
|
15
|
+
config.whitelist = []
|
16
|
+
config.blacklist = []
|
17
|
+
config.options = [:log]
|
18
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module SimpleHelpers
|
2
|
+
module ActionController
|
3
|
+
def simple_helper(*name_or_array_of_names)
|
4
|
+
main_options = name_or_array_of_names.extract_options!
|
5
|
+
array_of_names = SimpleHelpers::Support.certified_array!(name_or_array_of_names)
|
6
|
+
|
7
|
+
SimpleHelpers::Support.log "Defining methods #{array_of_names.inspect} to #{self.class.inspect}"
|
8
|
+
|
9
|
+
array_of_names.each do |name_symbol|
|
10
|
+
name = name_symbol.underscore
|
11
|
+
|
12
|
+
self.class_eval do
|
13
|
+
define_method(name) do |*args|
|
14
|
+
if args.empty?
|
15
|
+
send "#{name}_get"
|
16
|
+
else
|
17
|
+
options = args.extract_options!
|
18
|
+
send "#{name}_set", args.first, options
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
define_method("#{name}_options") do
|
23
|
+
options = instance_variable_get "@#{name}_options"
|
24
|
+
options ||= {}
|
25
|
+
end
|
26
|
+
|
27
|
+
define_method("#{name}_set") do |*args|
|
28
|
+
instance_variable_set "@#{name}", args.first
|
29
|
+
instance_variable_set "@#{name}_options", args.last
|
30
|
+
end
|
31
|
+
|
32
|
+
define_method("#{name}_get") do |*args|
|
33
|
+
scopes = SimpleHelpers::Support.scopes(self, name)
|
34
|
+
|
35
|
+
value = instance_variable_get("@#{name}")
|
36
|
+
options = send("#{name}_options")
|
37
|
+
|
38
|
+
result = value % options unless value.nil?
|
39
|
+
|
40
|
+
# TODO: refactor
|
41
|
+
new_options = options.delete_if{|k,v| k.to_sym == :scope}
|
42
|
+
|
43
|
+
result ||= t(scopes[:first], new_options)
|
44
|
+
if result.include? "translation missing" and scopes.has_key? :second
|
45
|
+
new_options.merge! :default => result
|
46
|
+
result = t(scopes[:second], new_options)
|
47
|
+
end
|
48
|
+
|
49
|
+
result
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# method helper
|
54
|
+
::ActionController::Base.helper_method name.to_s
|
55
|
+
|
56
|
+
# initialize
|
57
|
+
instance_variable_set "@#{name}_options", Hash[main_options] unless main_options.empty?
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module SimpleHelpers
|
2
|
+
class Config
|
3
|
+
|
4
|
+
VALID_OPTIONS = [:log]
|
5
|
+
|
6
|
+
def self.whitelist
|
7
|
+
@whitelist ||= []
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.whitelist=(*allowed)
|
11
|
+
@whitelist = SimpleHelpers::Support.certified_array!(allowed)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.blacklist
|
15
|
+
@blacklist ||= []
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.blacklist=(*not_allowed)
|
19
|
+
@blacklist = SimpleHelpers::Support.certified_array!(not_allowed)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.helpers
|
23
|
+
@helpers ||= []
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.helpers=(*helper_methods)
|
27
|
+
@helpers = SimpleHelpers::Support.certified_array!(helper_methods)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.allowed_controller?(controller)
|
31
|
+
( @whitelist.empty? and @blacklist.empty? ) or
|
32
|
+
( not @whitelist.empty? and @whitelist.include?(controller) ) or
|
33
|
+
( not @blacklist.empty? and not @blacklist.include?(controller) )
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.options
|
37
|
+
@options ||= []
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.options=(*args)
|
41
|
+
options_list = SimpleHelpers::Support.certified_array!(args)
|
42
|
+
@options = options_list.collect{|c| c.to_sym }
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.has_option?(option)
|
46
|
+
@options.include?(option.to_sym)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "rails/generators/base"
|
2
|
+
|
3
|
+
module SimpleHelpers
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
|
7
|
+
namespace "simple_helpers"
|
8
|
+
source_root File.dirname(__FILE__) + "/../../templates"
|
9
|
+
|
10
|
+
desc "Creates a Simple Helper initializer and copy to config/initializers/simple_helpers.rb"
|
11
|
+
def copy_initializer_file
|
12
|
+
copy_file "initializer.rb", "config/initializers/simple_helpers.rb"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require "rails/railtie"
|
2
|
+
|
3
|
+
module SimpleHelpers
|
4
|
+
class Railtie < Rails::Railtie
|
5
|
+
|
6
|
+
generators do
|
7
|
+
require "simple_helpers/generators"
|
8
|
+
end
|
9
|
+
|
10
|
+
initializer "simple_helpers.initialize" do
|
11
|
+
|
12
|
+
::ActionController::Base.instance_eval do
|
13
|
+
include SimpleHelpers::ActionController
|
14
|
+
|
15
|
+
initialize_method = instance_method(:initialize)
|
16
|
+
|
17
|
+
define_method :initialize do |*args|
|
18
|
+
if SimpleHelpers::Config.allowed_controller?(self.class.name)
|
19
|
+
simple_helper(SimpleHelpers::Config.helpers)
|
20
|
+
else
|
21
|
+
SimpleHelpers::Support.log "Controller #{self.class.inspect} not allowed."
|
22
|
+
end
|
23
|
+
|
24
|
+
initialize_method.bind(self).call(*args)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
::I18n.load_path += Dir[File.dirname(__FILE__) + "/../../locales/*.yml"]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module SimpleHelpers
|
2
|
+
class Support
|
3
|
+
|
4
|
+
def self.log(message)
|
5
|
+
Rails.logger.debug "SimpleHelpers => #{message}" if SimpleHelpers::Config.has_option? :log
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.certified_array!(splat_arg)
|
9
|
+
array = splat_arg.first.is_a?(Array) ? splat_arg.first : Array(splat_arg)
|
10
|
+
array.collect{|item| item.to_s}
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.scopes(controller, method_name)
|
14
|
+
options = controller.send "#{method_name}_options"
|
15
|
+
return {:first => options[:scope]} if options.has_key? :scope
|
16
|
+
|
17
|
+
controller_name = controller.class.name.underscore
|
18
|
+
controller_name.gsub!(/\//, "_")
|
19
|
+
controller_name.gsub!(/_controller$/, "")
|
20
|
+
|
21
|
+
action_name = controller.action_name
|
22
|
+
action_name = SimpleHelpers::Helpers::ACTION_ALIASES.fetch(action_name, action_name)
|
23
|
+
if controller.class.constants.include? :SIMPLE_HELPER_ALIASES
|
24
|
+
simple_helper_aliases = controller.class.const_get :SIMPLE_HELPER_ALIASES
|
25
|
+
action_name = simple_helper_aliases.fetch(action_name, action_name) if simple_helper_aliases.is_a? Hash
|
26
|
+
end
|
27
|
+
group = method_name.gsub(/^page_/,"")
|
28
|
+
group = group.pluralize
|
29
|
+
|
30
|
+
{
|
31
|
+
:first => "#{group}.#{controller_name}.#{action_name.to_s}",
|
32
|
+
:second => "#{group}.simple_helper_default"
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
$:.push File.expand_path('../lib', __FILE__)
|
4
|
+
require "simple_helpers/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "simple_helpers"
|
8
|
+
gem.version = SimpleHelpers::Version::STRING
|
9
|
+
gem.platform = Gem::Platform::RUBY
|
10
|
+
|
11
|
+
gem.authors = ["Vitor Oliveira"]
|
12
|
+
gem.email = ["vitormil@gmail.com"]
|
13
|
+
gem.summary = "Customizable helper methods with I18n support."
|
14
|
+
gem.description = gem.summary
|
15
|
+
gem.homepage = "http://www.github.com/vitormil"
|
16
|
+
|
17
|
+
gem.files = `git ls-files`.split($\)
|
18
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
19
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
20
|
+
gem.require_paths = ["lib"]
|
21
|
+
|
22
|
+
gem.add_dependency "rails", ">= 3.0.0"
|
23
|
+
gem.add_development_dependency "rspec-rails"
|
24
|
+
gem.add_development_dependency "sqlite3"
|
25
|
+
gem.add_development_dependency "rake"
|
26
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe ApplicationController, "helper methods" do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
controller = double("ApplicationController")
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should return the customized title" do
|
10
|
+
controller.page_title = "My awesome page title"
|
11
|
+
expect(controller.page_title).to eql("My awesome page title")
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should return the customized subtitle" do
|
15
|
+
controller.page_subtitle = "My awesome page subtitle"
|
16
|
+
expect(controller.page_subtitle).to eql("My awesome page subtitle")
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should fail" do
|
20
|
+
test = "test"
|
21
|
+
expect(test).to eql("fail")
|
22
|
+
end
|
23
|
+
end
|
data/spec/schema.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
|
3
|
+
require "rails"
|
4
|
+
require "simple_helpers"
|
5
|
+
require File.dirname(__FILE__) + "/support/config/boot"
|
6
|
+
require 'sqlite3'
|
7
|
+
require "rspec/rails"
|
8
|
+
|
9
|
+
# Load support files
|
10
|
+
# Dir[File.dirname(__FILE__) + "/support/rspec/**/*.rb"].each {|file| require file}
|
11
|
+
|
12
|
+
# Load database schema
|
13
|
+
load File.dirname(__FILE__) + "/schema.rb"
|
14
|
+
|
15
|
+
# Restore default configuration
|
16
|
+
RSpec.configure do |config|
|
17
|
+
config.expect_with :rspec do |config|
|
18
|
+
config.syntax = :expect
|
19
|
+
end
|
20
|
+
config.mock_with :rspec
|
21
|
+
config.around do
|
22
|
+
Dir[Rails.root.join("public/javascripts/*.js")].each {|file| File.unlink(file)}
|
23
|
+
Dir[Rails.root.join("public/stylesheets/*.css")].each {|file| File.unlink(file)}
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
ENV["BUNDLE_GEMFILE"] = File.expand_path(File.dirname(__FILE__) + "/../../../Gemfile")
|
2
|
+
require "bundler"
|
3
|
+
Bundler.setup(:default, :development, :test)
|
4
|
+
|
5
|
+
require "active_record/railtie"
|
6
|
+
require "action_controller/railtie"
|
7
|
+
# require "action_mailer/railtie"
|
8
|
+
# require "active_resource/railtie"
|
9
|
+
# require "rails/test_unit/railtie"
|
10
|
+
|
11
|
+
Bundler.require(:default, :development, :test)
|
12
|
+
|
13
|
+
module SimpleHelpers
|
14
|
+
class Application < Rails::Application
|
15
|
+
config.root = File.dirname(__FILE__) + "/.."
|
16
|
+
config.active_support.deprecation = :log
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
SimpleHelpers::Application.initialize!
|
@@ -0,0 +1,14 @@
|
|
1
|
+
en:
|
2
|
+
titles:
|
3
|
+
simple_helper_default:
|
4
|
+
"default value to title"
|
5
|
+
products:
|
6
|
+
index: "My awesome products i18n title - index"
|
7
|
+
show: "My awesome products i18n title - default"
|
8
|
+
|
9
|
+
subtitles:
|
10
|
+
simple_helper_default:
|
11
|
+
"default value to subtitle"
|
12
|
+
products:
|
13
|
+
index: "My awesome products i18n subtitle - index"
|
14
|
+
show: "My awesome products i18n subtitle - show"
|
@@ -0,0 +1,330 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
Connecting to database specified by database.yml
|
3
|
+
Connecting to database specified by database.yml
|
4
|
+
Connecting to database specified by database.yml
|
5
|
+
Connecting to database specified by database.yml
|
6
|
+
Connecting to database specified by database.yml
|
7
|
+
Connecting to database specified by database.yml
|
8
|
+
Connecting to database specified by database.yml
|
9
|
+
Connecting to database specified by database.yml
|
10
|
+
Connecting to database specified by database.yml
|
11
|
+
Connecting to database specified by database.yml
|
12
|
+
Connecting to database specified by database.yml
|
13
|
+
Connecting to database specified by database.yml
|
14
|
+
Connecting to database specified by database.yml
|
15
|
+
Connecting to database specified by database.yml
|
16
|
+
Connecting to database specified by database.yml
|
17
|
+
Connecting to database specified by database.yml
|
18
|
+
[1m[36m (2.1ms)[0m [1mselect sqlite_version(*)[0m
|
19
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
20
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
21
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
22
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
23
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
24
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
25
|
+
Connecting to database specified by database.yml
|
26
|
+
[1m[36m (1.9ms)[0m [1mselect sqlite_version(*)[0m
|
27
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
28
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
29
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
30
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
31
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
32
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
33
|
+
Connecting to database specified by database.yml
|
34
|
+
[1m[36m (3.7ms)[0m [1mselect sqlite_version(*)[0m
|
35
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
36
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
37
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
38
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
39
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
40
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
41
|
+
Connecting to database specified by database.yml
|
42
|
+
[1m[36m (1.8ms)[0m [1mselect sqlite_version(*)[0m
|
43
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
44
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
45
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
46
|
+
[1m[36m (0.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
47
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
48
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
49
|
+
Connecting to database specified by database.yml
|
50
|
+
[1m[36m (1.8ms)[0m [1mselect sqlite_version(*)[0m
|
51
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
52
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
53
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
54
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
55
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
56
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
57
|
+
Connecting to database specified by database.yml
|
58
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
59
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
60
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
61
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
62
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
63
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
64
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
65
|
+
Connecting to database specified by database.yml
|
66
|
+
[1m[36m (2.6ms)[0m [1mselect sqlite_version(*)[0m
|
67
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
68
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
69
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
70
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
71
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
72
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
73
|
+
Connecting to database specified by database.yml
|
74
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
75
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
76
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
77
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
78
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
79
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
80
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
81
|
+
Connecting to database specified by database.yml
|
82
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
83
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
84
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
85
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
86
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
87
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
88
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
89
|
+
Connecting to database specified by database.yml
|
90
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
91
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
92
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
93
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
94
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
95
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
96
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
97
|
+
Connecting to database specified by database.yml
|
98
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
99
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
100
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
101
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
102
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
103
|
+
[1m[35m (0.2ms)[0m SELECT version FROM "schema_migrations"
|
104
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
105
|
+
Connecting to database specified by database.yml
|
106
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
107
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
108
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
109
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
110
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
111
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
112
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
113
|
+
Connecting to database specified by database.yml
|
114
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
115
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
116
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
117
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
118
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
119
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
120
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
121
|
+
Connecting to database specified by database.yml
|
122
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
123
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
124
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
125
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
126
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
127
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
128
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
129
|
+
Connecting to database specified by database.yml
|
130
|
+
[1m[36m (1.8ms)[0m [1mselect sqlite_version(*)[0m
|
131
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
132
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
133
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
134
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
135
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
136
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
137
|
+
Connecting to database specified by database.yml
|
138
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
139
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
140
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
141
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
142
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
143
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
144
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
145
|
+
Connecting to database specified by database.yml
|
146
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
147
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
148
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
149
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
150
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
151
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
152
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
153
|
+
Connecting to database specified by database.yml
|
154
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
155
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
156
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
157
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
158
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
159
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
160
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
161
|
+
Connecting to database specified by database.yml
|
162
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
163
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
164
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
165
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
166
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
167
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
168
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
169
|
+
Connecting to database specified by database.yml
|
170
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
171
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
172
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
173
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
174
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
175
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
176
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
177
|
+
Connecting to database specified by database.yml
|
178
|
+
[1m[36m (2.1ms)[0m [1mselect sqlite_version(*)[0m
|
179
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
180
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
181
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
182
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
183
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
184
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
185
|
+
Connecting to database specified by database.yml
|
186
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
187
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
188
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
189
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
190
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
191
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
192
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
193
|
+
Connecting to database specified by database.yml
|
194
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
195
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
196
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
197
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
198
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
199
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
200
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
201
|
+
Connecting to database specified by database.yml
|
202
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
203
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
204
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
205
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
206
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
207
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
208
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
209
|
+
Connecting to database specified by database.yml
|
210
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
211
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
212
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
213
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
214
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
215
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
216
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
217
|
+
Connecting to database specified by database.yml
|
218
|
+
[1m[36m (2.7ms)[0m [1mselect sqlite_version(*)[0m
|
219
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
220
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
221
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
222
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
223
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
224
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
225
|
+
Connecting to database specified by database.yml
|
226
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
227
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
228
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
229
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
230
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
231
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
232
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
233
|
+
Connecting to database specified by database.yml
|
234
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
235
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
236
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
237
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
238
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
239
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
240
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
241
|
+
Connecting to database specified by database.yml
|
242
|
+
[1m[36m (1.5ms)[0m [1mselect sqlite_version(*)[0m
|
243
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
244
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
245
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
246
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
247
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
248
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
249
|
+
Connecting to database specified by database.yml
|
250
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
251
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
252
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
253
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("schema_migrations")
|
254
|
+
[1m[36m (0.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
255
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
256
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
257
|
+
Connecting to database specified by database.yml
|
258
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
259
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
260
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
261
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
262
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
263
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
264
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
265
|
+
Connecting to database specified by database.yml
|
266
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
267
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
268
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
269
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
270
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
271
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
272
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
273
|
+
Connecting to database specified by database.yml
|
274
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
275
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
276
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
277
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
278
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
279
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
280
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
281
|
+
Connecting to database specified by database.yml
|
282
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
283
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
284
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
285
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
286
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
287
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
288
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
289
|
+
Connecting to database specified by database.yml
|
290
|
+
[1m[36m (1.5ms)[0m [1mselect sqlite_version(*)[0m
|
291
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
292
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
293
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
294
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
295
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
296
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
297
|
+
Connecting to database specified by database.yml
|
298
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
299
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
300
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
301
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
302
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
303
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
304
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
305
|
+
Connecting to database specified by database.yml
|
306
|
+
[1m[36m (3.7ms)[0m [1mselect sqlite_version(*)[0m
|
307
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
308
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
309
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
310
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
311
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
312
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
313
|
+
Connecting to database specified by database.yml
|
314
|
+
[1m[36m (3.0ms)[0m [1mselect sqlite_version(*)[0m
|
315
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
|
316
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
317
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
318
|
+
[1m[36m (0.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
319
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
320
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
321
|
+
Connecting to database specified by database.yml
|
322
|
+
Connecting to database specified by database.yml
|
323
|
+
Connecting to database specified by database.yml
|
324
|
+
Connecting to database specified by database.yml
|
325
|
+
Connecting to database specified by database.yml
|
326
|
+
Connecting to database specified by database.yml
|
327
|
+
Connecting to database specified by database.yml
|
328
|
+
Connecting to database specified by database.yml
|
329
|
+
Connecting to database specified by database.yml
|
330
|
+
Connecting to database specified by database.yml
|
File without changes
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Use this file to setup SimpleHelpers.
|
2
|
+
require "simple_helpers"
|
3
|
+
|
4
|
+
SimpleHelpers.configure do |config|
|
5
|
+
|
6
|
+
# Helper methods that will be automatically
|
7
|
+
# created in the controllers
|
8
|
+
# config.helpers = [:page_title]
|
9
|
+
|
10
|
+
# config.helpers will NOT be created automatically in these controllers
|
11
|
+
# *** keep it empty if you would allow all controlers
|
12
|
+
# example: [SessionsController]
|
13
|
+
# config.blacklist = []
|
14
|
+
|
15
|
+
# config.helpers will be created automatically in these controllers
|
16
|
+
# *** keep it empty if you would allow all controlers
|
17
|
+
# example: [ApplicationController]
|
18
|
+
# config.whitelist = []
|
19
|
+
|
20
|
+
# Options:
|
21
|
+
# [ :log ]
|
22
|
+
config.options = [:log]
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simple_helpers
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Vitor Oliveira
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-07-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.0.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.0.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec-rails
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: sqlite3
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: Customizable helper methods with I18n support.
|
79
|
+
email:
|
80
|
+
- vitormil@gmail.com
|
81
|
+
executables: []
|
82
|
+
extensions: []
|
83
|
+
extra_rdoc_files: []
|
84
|
+
files:
|
85
|
+
- .gitignore
|
86
|
+
- .rspec
|
87
|
+
- .travis.yml
|
88
|
+
- CHANGELOG.md
|
89
|
+
- Gemfile
|
90
|
+
- LICENSE
|
91
|
+
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- lib/simple_helpers.rb
|
94
|
+
- lib/simple_helpers/action_controller.rb
|
95
|
+
- lib/simple_helpers/config.rb
|
96
|
+
- lib/simple_helpers/generators.rb
|
97
|
+
- lib/simple_helpers/helpers.rb
|
98
|
+
- lib/simple_helpers/railtie.rb
|
99
|
+
- lib/simple_helpers/support.rb
|
100
|
+
- lib/simple_helpers/version.rb
|
101
|
+
- simple_helpers.gemspec
|
102
|
+
- spec/controllers/application_controller_spec.rb
|
103
|
+
- spec/schema.rb
|
104
|
+
- spec/spec_helper.rb
|
105
|
+
- spec/support/app/controllers/application_controller.rb
|
106
|
+
- spec/support/config/boot.rb
|
107
|
+
- spec/support/config/database.yml
|
108
|
+
- spec/support/config/locales/en.yml
|
109
|
+
- spec/support/log/test.log
|
110
|
+
- spec/support/public/javascripts/.gitkeep
|
111
|
+
- spec/support/public/stylesheets/.gitkeep
|
112
|
+
- templates/initializer.rb
|
113
|
+
homepage: http://www.github.com/vitormil
|
114
|
+
licenses: []
|
115
|
+
post_install_message:
|
116
|
+
rdoc_options: []
|
117
|
+
require_paths:
|
118
|
+
- lib
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
segments:
|
126
|
+
- 0
|
127
|
+
hash: -3047608726697320755
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
segments:
|
135
|
+
- 0
|
136
|
+
hash: -3047608726697320755
|
137
|
+
requirements: []
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 1.8.23
|
140
|
+
signing_key:
|
141
|
+
specification_version: 3
|
142
|
+
summary: Customizable helper methods with I18n support.
|
143
|
+
test_files:
|
144
|
+
- spec/controllers/application_controller_spec.rb
|
145
|
+
- spec/schema.rb
|
146
|
+
- spec/spec_helper.rb
|
147
|
+
- spec/support/app/controllers/application_controller.rb
|
148
|
+
- spec/support/config/boot.rb
|
149
|
+
- spec/support/config/database.yml
|
150
|
+
- spec/support/config/locales/en.yml
|
151
|
+
- spec/support/log/test.log
|
152
|
+
- spec/support/public/javascripts/.gitkeep
|
153
|
+
- spec/support/public/stylesheets/.gitkeep
|