sinatraband 0.2.3 → 0.2.4

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: f283e45cf27dfbd3f042bc006c8d15ea563da070
4
- data.tar.gz: 8a2ccd92153ccd08cae03c6cfdb22d5aa6ef210b
3
+ metadata.gz: 77ccc539d59df68401aefbd8aafa95067d88e8bc
4
+ data.tar.gz: 871c300229980da584a6f5f4fa3f07286c132fdc
5
5
  SHA512:
6
- metadata.gz: c751fbb881ed97f18b0da6824daa533ffdd44952499149544ab7a99fd313e8c6f7690a1582ef4e7ad3c01974f0258806575a39b23558b389a6a818b258540644
7
- data.tar.gz: a589f3d9c70fc421be7140e773f66f9ce0a970ddaef7aec3cda5d44f7e4d2c7d88a87381702ba84f114c397e60231a5fc51beb59cf38a11a4d516b959ab50851
6
+ metadata.gz: 9cae1ebf3628cc32e1e7db25f3957b4a8a56dea7dc088cb9b091665002399a704b99bd22e4e30675fe1b7f50e5ae320e3014f4eea9109b66ad11a24c7c53053e
7
+ data.tar.gz: ffa8feda9aa49dcfbf6df40a485fd721de59a1bfb37fb4ca41f021cb9c9ab38a1a8da65aaab9eaaf03bc8aa6ef0c307c1cd8414e383ac5ab891d7de82a0f21cd
@@ -8,6 +8,7 @@ gem "sinatra-activerecord"
8
8
 
9
9
  # gem "sinatra-flash"
10
10
  # gem "bcrypt-ruby"
11
+ # gem "i18n"
11
12
 
12
13
  # group :production do
13
14
  # gem "pg"
@@ -2,15 +2,10 @@ require 'sinatra'
2
2
  require 'sinatra/activerecord'
3
3
  # require 'active_support/core_ext'
4
4
  # require 'sinatra/flash'
5
+ # require 'i18n'
5
6
 
6
- # Loads app config
7
- require_relative './config/config.rb'
8
-
9
- # Loads all models in models directory
10
- Dir["./models/*.rb"].each {|file| require_relative file }
11
-
12
- # Loads all controllers in controllers directory
13
- Dir["./controllers/*.rb"].each {|file| require_relative file }
7
+ # Loads application configuration
8
+ require './config/config.rb'
14
9
 
15
10
  # Default root_route
16
11
  get '/' do
@@ -1,6 +1,11 @@
1
1
  # Adds gzip compression to requests
2
2
  use Rack::Deflater
3
3
 
4
+ # I18n Internationalization
5
+ # I18n.enforce_available_locales = false
6
+ # I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'locales', '*.yml').to_s]
7
+ # I18n.default_locale = :pt
8
+
4
9
  # Register Flash Sinatra messages
5
10
  # register Sinatra::Flash
6
11
 
@@ -18,19 +23,31 @@ set :database, "mysql2://root:@localhost/<%= @name %>"
18
23
  # configure :production do
19
24
  # db = URI.parse(ENV['DATABASE_URL'] || 'postgres:///localhost/<%= @name %>')
20
25
 
21
- # ActiveRecord::Base.establish_connection(
22
- # :adapter => db.scheme == 'postgres' ? 'postgresql' : db.scheme,
23
- # :host => db.host,
24
- # :username => db.user,
25
- # :password => db.password,
26
- # :database => db.path[1..-1],
27
- # :encoding => 'utf8'
28
- # )
26
+ # ActiveRecord::Base.establish_connection(
27
+ # adapter: db.scheme == 'postgres' ? 'postgresql' : db.scheme,
28
+ # host: db.host,
29
+ # username: db.user,
30
+ # password: db.password,
31
+ # database: db.path[1..-1],
32
+ # encoding: 'utf8'
33
+ # )
29
34
  # end
30
35
 
31
- # html escape method
36
+ # Application helpers
32
37
  # helpers do
38
+ # # html escape method
33
39
  # def h(text)
34
40
  # Rack::Utils.escape_html(text)
35
41
  # end
36
- # end
42
+
43
+ # # I18n translate method
44
+ # def t(*args)
45
+ # I18n.t(*args)
46
+ # end
47
+ # end
48
+
49
+ # Loads all models in models directory
50
+ Dir["./models/*.rb"].each {|file| require file }
51
+
52
+ # Loads all controllers in controllers directory
53
+ Dir["./controllers/*.rb"].each {|file| require file }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatraband
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julio Bueno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport