i18n-js_padrino 0.1
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/LICENSE +19 -0
- data/README.rdoc +16 -0
- data/Rakefile +22 -0
- data/lib/i18n-js_padrino.rb +26 -0
- metadata +64 -0
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (C) 2011 by Darío Javier Cravero
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
= i18n-js wrapper for Padrino
|
2
|
+
|
3
|
+
Read https://github.com/fnando/i18n-js for how to use i18n-js on your app but include the gem i18n-js_padrino instead of the original in your Gemfile.
|
4
|
+
|
5
|
+
== Make it work in dev mode (quick & dirty way)
|
6
|
+
|
7
|
+
Include this in your app.rb:
|
8
|
+
|
9
|
+
before do
|
10
|
+
SimplesIdeias::I18n.export! if (Padrino.env == :development)
|
11
|
+
end
|
12
|
+
|
13
|
+
== TODO
|
14
|
+
- Figure out why it doesn't reload the locales when reloading the page (you have to restart the server) even if
|
15
|
+
the before is there in dev mode.
|
16
|
+
- Make the rake tasks available through padrino rake. You can include them yourself for now from https://github.com/fnando/i18n-js/blob/master/lib/i18n-js/rake.rb
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
require "bundler"
|
4
|
+
Bundler.setup
|
5
|
+
|
6
|
+
require 'rake'
|
7
|
+
require 'rake/gempackagetask'
|
8
|
+
|
9
|
+
gemspec = eval(File.read('i18-js_padrino.gemspec'))
|
10
|
+
Rake::GemPackageTask.new(gemspec) do |pkg|
|
11
|
+
pkg.gem_spec = gemspec
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "build the gem and release it to rubygems.org"
|
15
|
+
task :release => :gem do
|
16
|
+
puts "Tagging #{gemspec.version}..."
|
17
|
+
system "git tag -a #{gemspec.version} -m 'Tagging #{gemspec.version}'"
|
18
|
+
puts "Pushing to Github..."
|
19
|
+
system "git push --tags"
|
20
|
+
puts "Pushing to rubygems.org..."
|
21
|
+
system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
22
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Stub Rails so we don't have to change almost everything in obligation_scope
|
2
|
+
module SimplesIdeias
|
3
|
+
module I18n
|
4
|
+
module Rails
|
5
|
+
def self.version
|
6
|
+
=begin
|
7
|
+
require 'padrino' unless ::Padrino.respond_to? :version
|
8
|
+
if ::Padrino.version >= "0.10.3"
|
9
|
+
"3.1"
|
10
|
+
else
|
11
|
+
"3"
|
12
|
+
end
|
13
|
+
=end
|
14
|
+
# TODO Implement support for sprockets by setting the version to 3.1 if
|
15
|
+
# sprockets is present (perhaps with padrino-sprockets?).
|
16
|
+
# Will also need to define Rails.configuration.assets.enabled
|
17
|
+
"0"
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.root
|
21
|
+
Pathname.new(PADRINO_ROOT)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
require "i18n-js"
|
metadata
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: i18n-js_padrino
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Dario Javier Cravero
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-10-10 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: i18n-js
|
16
|
+
requirement: &2157829940 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.0.1
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2157829940
|
25
|
+
description:
|
26
|
+
email: dario@qinnova.com.ar
|
27
|
+
executables: []
|
28
|
+
extensions: []
|
29
|
+
extra_rdoc_files:
|
30
|
+
- README.rdoc
|
31
|
+
files:
|
32
|
+
- LICENSE
|
33
|
+
- README.rdoc
|
34
|
+
- Rakefile
|
35
|
+
- lib/i18n-js_padrino.rb
|
36
|
+
homepage: http://github.com/dariocravero/i18n-js_padrino
|
37
|
+
licenses: []
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.8.6
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
hash: -2766522311271050893
|
57
|
+
requirements: []
|
58
|
+
rubyforge_project:
|
59
|
+
rubygems_version: 1.8.11
|
60
|
+
signing_key:
|
61
|
+
specification_version: 3
|
62
|
+
summary: i18n-js_padrino is a Padrino's wrapper around i18n-js' Rails plugin for using
|
63
|
+
your I18n locales in JavaScript.
|
64
|
+
test_files: []
|