translation_panel 0.2.1 → 0.2.2
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/.rvmrc +1 -1
- data/VERSION +1 -1
- data/lib/translation_panel/filter.rb +2 -1
- data/spec/app/app/controllers/home_controller.rb +3 -0
- data/spec/app/app/views/home/without_head.html.erb +5 -0
- data/spec/app/config/routes.rb +1 -0
- data/spec/translation_panel_spec.rb +16 -0
- data/translation_panel.gemspec +7 -6
- metadata +7 -4
data/.rvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
rvm 1.9.2@translation_panel --create
|
|
1
|
+
rvm use 1.9.2@translation_panel --create
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.2
|
|
@@ -13,10 +13,11 @@ module TranslationPanel
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def after(controller)
|
|
16
|
-
if controller.send(@condition)
|
|
16
|
+
if controller.send(@condition) && controller.response.status == 200
|
|
17
17
|
case controller.response.content_type
|
|
18
18
|
when "text/html"
|
|
19
19
|
return unless page = controller.response.body
|
|
20
|
+
return unless page.index("</head>")
|
|
20
21
|
header_part = tag :link, :href => "/assets/translation_panel.css",
|
|
21
22
|
:media => "screen", :rel => "stylesheet", :type => "text/css"
|
|
22
23
|
header_part+= content_tag :script, "", :src => "/assets/translation_panel.js",
|
data/spec/app/config/routes.rb
CHANGED
|
@@ -50,4 +50,20 @@ describe HomeController, :type => :controller do
|
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
|
+
|
|
54
|
+
describe "without_head" do
|
|
55
|
+
render_views
|
|
56
|
+
before :all do
|
|
57
|
+
I18n.backend.store.flushdb
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
it "is successfull" do
|
|
61
|
+
lambda{ get :without_head, :translator => true }.should_not raise_error
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
it "isn't show panel" do
|
|
65
|
+
get :without_head, :translator => true
|
|
66
|
+
response.body.should_not have_selector("script")
|
|
67
|
+
end
|
|
68
|
+
end
|
|
53
69
|
end
|
data/translation_panel.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{translation_panel}
|
|
8
|
-
s.version = "0.2.
|
|
8
|
+
s.version = "0.2.2"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
|
-
s.authors = [
|
|
12
|
-
s.date = %q{2011-
|
|
11
|
+
s.authors = ["Mik-die"]
|
|
12
|
+
s.date = %q{2011-08-09}
|
|
13
13
|
s.description = %q{I18n backend, based on redis, with frontend panel for translations}
|
|
14
14
|
s.email = %q{MikDiet@gmail.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -37,6 +37,7 @@ Gem::Specification.new do |s|
|
|
|
37
37
|
"spec/app/app/controllers/application_controller.rb",
|
|
38
38
|
"spec/app/app/controllers/home_controller.rb",
|
|
39
39
|
"spec/app/app/views/home/index.html.erb",
|
|
40
|
+
"spec/app/app/views/home/without_head.html.erb",
|
|
40
41
|
"spec/app/config.ru",
|
|
41
42
|
"spec/app/config/application.rb",
|
|
42
43
|
"spec/app/config/boot.rb",
|
|
@@ -58,9 +59,9 @@ Gem::Specification.new do |s|
|
|
|
58
59
|
"translation_panel.gemspec"
|
|
59
60
|
]
|
|
60
61
|
s.homepage = %q{http://github.com/Mik-die/translation_panel}
|
|
61
|
-
s.licenses = [
|
|
62
|
-
s.require_paths = [
|
|
63
|
-
s.rubygems_version = %q{1.
|
|
62
|
+
s.licenses = ["MIT"]
|
|
63
|
+
s.require_paths = ["lib"]
|
|
64
|
+
s.rubygems_version = %q{1.6.2}
|
|
64
65
|
s.summary = %q{I18n backend}
|
|
65
66
|
|
|
66
67
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: translation_panel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.2.
|
|
5
|
+
version: 0.2.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Mik-die
|
|
@@ -10,7 +10,8 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-
|
|
13
|
+
date: 2011-08-09 00:00:00 +08:00
|
|
14
|
+
default_executable:
|
|
14
15
|
dependencies:
|
|
15
16
|
- !ruby/object:Gem::Dependency
|
|
16
17
|
name: rails
|
|
@@ -108,6 +109,7 @@ files:
|
|
|
108
109
|
- spec/app/app/controllers/application_controller.rb
|
|
109
110
|
- spec/app/app/controllers/home_controller.rb
|
|
110
111
|
- spec/app/app/views/home/index.html.erb
|
|
112
|
+
- spec/app/app/views/home/without_head.html.erb
|
|
111
113
|
- spec/app/config.ru
|
|
112
114
|
- spec/app/config/application.rb
|
|
113
115
|
- spec/app/config/boot.rb
|
|
@@ -127,6 +129,7 @@ files:
|
|
|
127
129
|
- spec/spec_helper.rb
|
|
128
130
|
- spec/translation_panel_spec.rb
|
|
129
131
|
- translation_panel.gemspec
|
|
132
|
+
has_rdoc: true
|
|
130
133
|
homepage: http://github.com/Mik-die/translation_panel
|
|
131
134
|
licenses:
|
|
132
135
|
- MIT
|
|
@@ -140,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
140
143
|
requirements:
|
|
141
144
|
- - ">="
|
|
142
145
|
- !ruby/object:Gem::Version
|
|
143
|
-
hash: -
|
|
146
|
+
hash: -923747487
|
|
144
147
|
segments:
|
|
145
148
|
- 0
|
|
146
149
|
version: "0"
|
|
@@ -153,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
153
156
|
requirements: []
|
|
154
157
|
|
|
155
158
|
rubyforge_project:
|
|
156
|
-
rubygems_version: 1.
|
|
159
|
+
rubygems_version: 1.6.2
|
|
157
160
|
signing_key:
|
|
158
161
|
specification_version: 3
|
|
159
162
|
summary: I18n backend
|