i18nliner 0.0.14 → 0.1.0
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 +4 -4
- data/lib/i18nliner/erubi.rb +12 -0
- data/lib/i18nliner/erubis.rb +2 -9
- data/lib/i18nliner/processors/erb_processor.rb +4 -4
- data/lib/i18nliner/railtie.rb +2 -2
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bbc698173c1c8e33a96bff6fdd7d0ed5bd87f55
|
4
|
+
data.tar.gz: 6035d9a25b869329386a8618521399a5d39401ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e2e83793439b90a69a7e16db742bc9d385e53953a5872ce90987bf8507b5254594d4edf3ff637d36e30c6f02acf6fc4aaa6703197c430618f9254ca4edf82eb
|
7
|
+
data.tar.gz: d239eb5dcea8c24fcdccad4870c3cd6b33c9a33898d13c20a1962a8387db64fbdc23aa71a907ac52049d3d6ecf1d49e52a20c38e852875c7a95369bcb3ef7fb7
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'action_view/template'
|
2
|
+
require 'i18nliner/pre_processors/erb_pre_processor'
|
3
|
+
|
4
|
+
module I18nliner
|
5
|
+
class Erubi < ::ActionView::Template::Handlers::ERB::Erubi
|
6
|
+
def initialize(source, options = {})
|
7
|
+
source = I18nliner::PreProcessors::ErbPreProcessor.new(source).result
|
8
|
+
super(source, options)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
data/lib/i18nliner/erubis.rb
CHANGED
@@ -1,12 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require 'i18nliner/pre_processors/erb_pre_processor'
|
1
|
+
require "i18nliner/erubi"
|
3
2
|
|
4
3
|
module I18nliner
|
5
|
-
|
6
|
-
def initialize(source, options = {})
|
7
|
-
source = I18nliner::PreProcessors::ErbPreProcessor.new(source).result
|
8
|
-
super(source, options)
|
9
|
-
end
|
10
|
-
end
|
4
|
+
Erubis = Erubi
|
11
5
|
end
|
12
|
-
|
@@ -1,7 +1,7 @@
|
|
1
1
|
if defined?(::Rails)
|
2
|
-
require 'i18nliner/
|
2
|
+
require 'i18nliner/erubi'
|
3
3
|
else
|
4
|
-
require '
|
4
|
+
require 'erubi'
|
5
5
|
end
|
6
6
|
require 'i18nliner/processors/ruby_processor'
|
7
7
|
require 'i18nliner/pre_processors/erb_pre_processor'
|
@@ -13,12 +13,12 @@ module I18nliner
|
|
13
13
|
|
14
14
|
if defined?(::Rails) # block expressions and all that jazz
|
15
15
|
def pre_process(source)
|
16
|
-
I18nliner::
|
16
|
+
I18nliner::Erubi.new(source).src
|
17
17
|
end
|
18
18
|
else
|
19
19
|
def pre_process(source)
|
20
20
|
source = PreProcessors::ErbPreProcessor.process(source)
|
21
|
-
|
21
|
+
Erubi::Engine.new(source).src
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
data/lib/i18nliner/railtie.rb
CHANGED
@@ -10,8 +10,8 @@ module I18nliner
|
|
10
10
|
end
|
11
11
|
|
12
12
|
ActiveSupport.on_load :action_view do
|
13
|
-
require 'i18nliner/
|
14
|
-
ActionView::Template::Handlers::ERB.erb_implementation = I18nliner::
|
13
|
+
require 'i18nliner/erubi'
|
14
|
+
ActionView::Template::Handlers::ERB.erb_implementation = I18nliner::Erubi
|
15
15
|
ActionView::Base.send :include, I18nliner::Extensions::View
|
16
16
|
end
|
17
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18nliner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Jensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -81,19 +81,19 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.1.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: erubi
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 1.7.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.7.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: ya2yaml
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/i18nliner/commands/import.rb
|
173
173
|
- lib/i18nliner/controller_scope.rb
|
174
174
|
- lib/i18nliner/errors.rb
|
175
|
+
- lib/i18nliner/erubi.rb
|
175
176
|
- lib/i18nliner/erubis.rb
|
176
177
|
- lib/i18nliner/extensions/controller.rb
|
177
178
|
- lib/i18nliner/extensions/core.rb
|