awesome_translations 0.0.45 → 0.0.46
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awesome_translations/erb_inspector/translation_inspector.rb +6 -8
- data/lib/awesome_translations/version.rb +1 -1
- data/spec/dummy/db/awesome_translations.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +1688 -0
- data/spec/handlers/file_handler_spec.rb +3 -3
- data/spec/lib/erb_inspector/translation_inspector_spec.rb +2 -2
- metadata +2 -2
@@ -36,7 +36,7 @@ describe AwesomeTranslations::Handlers::FileHandler do
|
|
36
36
|
|
37
37
|
it "sets the correct translation path" do
|
38
38
|
danish_translation = layout_translations.find { |t| t.key == "layouts.application.danish" }
|
39
|
-
expect(danish_translation.dir).to eq "#{Rails.root}/config/locales/awesome_translations/
|
39
|
+
expect(danish_translation.dir).to eq "#{Rails.root}/config/locales/awesome_translations/layouts/application"
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -53,7 +53,7 @@ describe AwesomeTranslations::Handlers::FileHandler do
|
|
53
53
|
it "finds translations made with the t method" do
|
54
54
|
expect(admin_translation).to_not eq nil
|
55
55
|
expect(admin_translation.key).to eq "models.role.administrator"
|
56
|
-
expect(admin_translation.dir).to end_with "spec/dummy/config/locales/awesome_translations/
|
56
|
+
expect(admin_translation.dir).to end_with "spec/dummy/config/locales/awesome_translations/models/role"
|
57
57
|
end
|
58
58
|
|
59
59
|
it "generates keys with method-name for mailers" do
|
@@ -75,7 +75,7 @@ describe AwesomeTranslations::Handlers::FileHandler do
|
|
75
75
|
it "finds translations with the controller_t-method" do
|
76
76
|
expect(update_saved_translation).to_not eq nil
|
77
77
|
expect(update_saved_translation.key).to eq "users.user_was_updated"
|
78
|
-
expect(update_saved_translation.dir).to end_with "spec/dummy/config/locales/awesome_translations/
|
78
|
+
expect(update_saved_translation.dir).to end_with "spec/dummy/config/locales/awesome_translations/users"
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
@@ -27,7 +27,7 @@ describe AwesomeTranslations::ErbInspector::TranslationInspector do
|
|
27
27
|
expect(hello_world_translation.full_path).to eq Rails.root.join("app", "views", "users", "index.html.haml").to_s
|
28
28
|
end
|
29
29
|
|
30
|
-
it
|
31
|
-
expect(user_was_created_translation.dir).to end_with "spec/dummy/config/locales/awesome_translations/
|
30
|
+
it "#dir" do
|
31
|
+
expect(user_was_created_translation.dir).to end_with "spec/dummy/config/locales/awesome_translations/users/create"
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awesome_translations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: array_enumerator
|