rails-i18nterface 0.1.7 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/README.md +17 -10
  2. data/app/controllers/rails_i18nterface/application_controller.rb +2 -0
  3. data/app/controllers/rails_i18nterface/translate_controller.rb +29 -80
  4. data/app/helpers/rails_i18nterface/application_helper.rb +2 -0
  5. data/app/helpers/rails_i18nterface/translate_helper.rb +2 -0
  6. data/app/views/rails_i18nterface/translate/index.html.erb +14 -23
  7. data/config/routes.rb +2 -0
  8. data/lib/rails-i18nterface.rb +3 -1
  9. data/lib/rails-i18nterface/cache.rb +40 -0
  10. data/lib/rails-i18nterface/engine.rb +2 -0
  11. data/lib/rails-i18nterface/keys.rb +24 -112
  12. data/lib/rails-i18nterface/sourcefiles.rb +14 -12
  13. data/lib/rails-i18nterface/storage.rb +2 -4
  14. data/lib/rails-i18nterface/utils.rb +51 -0
  15. data/lib/rails-i18nterface/version.rb +3 -1
  16. data/lib/rails-i18nterface/yamlfile.rb +15 -17
  17. data/lib/tasks/rails-i18nterface.rake +1 -0
  18. data/spec/controllers/translate_controller_spec.rb +18 -33
  19. data/spec/internal/app/controllers/application_controller.rb +2 -0
  20. data/spec/internal/app/models/article.rb +8 -2
  21. data/spec/internal/config/routes.rb +2 -0
  22. data/spec/internal/db/combustion_test.sqlite +0 -0
  23. data/spec/internal/log/test.log +241 -1608
  24. data/spec/lib/cache_spec.rb +51 -0
  25. data/spec/lib/keys_spec.rb +59 -88
  26. data/spec/lib/sourcefiles_spec.rb +8 -6
  27. data/spec/lib/storage_spec.rb +2 -0
  28. data/spec/lib/utils_spec.rb +34 -0
  29. data/spec/lib/yamlfile_spec.rb +10 -5
  30. data/spec/requests/search_spec.rb +2 -0
  31. data/spec/spec_helper.rb +3 -3
  32. metadata +104 -67
  33. checksums.yaml +0 -7
  34. data/app/models/rails_i18nterface/translation.rb +0 -23
  35. data/db/migrate/20110921112044_create_translations.rb +0 -18
  36. data/db/migrate/20130422115639_rename_translation_to_namespace.rb +0 -8
  37. data/lib/rails-i18nterface/log.rb +0 -40
  38. data/spec/lib/log_spec.rb +0 -47
  39. data/spec/models/translation_spec.rb +0 -9
@@ -0,0 +1,51 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RailsI18nterface::Cache do
6
+ include RailsI18nterface::Cache
7
+
8
+ before :each do
9
+ @cachefile = File.expand_path(File.join('..', 'files', 'cache_test'), __FILE__)
10
+ @file = File.join(File.dirname(@cachefile), 'test.yml')
11
+ @sample = { 'a' => 'a', 'b' => 'b' }
12
+ File.open(@file, 'w') do |f|
13
+ f.write YAML.dump(@sample)
14
+ end
15
+ end
16
+
17
+ after :each do
18
+ FileUtils.rm @cachefile if File.exists? @cachefile
19
+ FileUtils.rm @file if File.exists? @file
20
+ end
21
+
22
+ it 'stores cache of an object' do
23
+ a = { a: 'a' }
24
+ cache_save a, @cachefile
25
+ File.exists?(@cachefile).should be_true
26
+ end
27
+
28
+ it 'reads cache from marshalled file' do
29
+ a = { a: 'a' }
30
+ cache_save a, @cachefile
31
+ b = cache_load @cachefile, @file
32
+ b.should == a
33
+ end
34
+
35
+ it 'creates the cache if not present' do
36
+ b = cache_load @cachefile, @file do
37
+ YAML.load_file @file
38
+ end
39
+ b.should == @sample
40
+ end
41
+
42
+ it 'refreshes the cache if the origin file changed' do
43
+ mtime = File.mtime(@file) - 100
44
+ File.utime(mtime, mtime, @file)
45
+ b = cache_load @cachefile, @file do
46
+ YAML.load_file @file
47
+ end
48
+ b.should == @sample
49
+ end
50
+
51
+ end
@@ -1,25 +1,29 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe RailsI18nterface::Keys do
6
+
7
+ include RailsI18nterface::Utils
8
+
4
9
  before(:each) do
5
- #I18n.stub!(:default_locale).and_return(:en)
6
- #RailsI18nterface::Storage.stub!(:root_dir).and_return(i18n_files_dir)
7
- @keys = RailsI18nterface::Keys.new
10
+ @root_dir = File.expand_path(File.join('..', '..', '..', 'spec', 'internal'), __FILE__)
11
+ @keys = RailsI18nterface::Keys.new(@root_dir, :sv, :no)
8
12
  end
9
13
 
10
14
  describe 'to_a' do
11
15
  it 'extracts keys from I18n lookups in .rb, .html.erb, and .rhtml files' do
12
- @keys.to_a.map(&:to_s).sort.should == [
16
+ @keys.files.keys.map(&:to_s).sort.should == [
13
17
  'activerecord.attributes.article.active',
14
18
  'activerecord.attributes.article.body',
15
19
  'activerecord.attributes.article.created_at',
16
20
  'activerecord.attributes.article.title',
17
21
  'activerecord.attributes.article.updated_at',
18
- 'activerecord.attributes.topics.created_at',
19
- 'activerecord.attributes.topics.title',
20
- 'activerecord.attributes.topics.updated_at',
22
+ 'activerecord.attributes.topic.created_at',
23
+ 'activerecord.attributes.topic.title',
24
+ 'activerecord.attributes.topic.updated_at',
21
25
  'activerecord.models.article',
22
- 'activerecord.models.topics',
26
+ 'activerecord.models.topic',
23
27
  'article.key1',
24
28
  'article.key2',
25
29
  'article.key3',
@@ -35,7 +39,7 @@ describe RailsI18nterface::Keys do
35
39
 
36
40
  describe 'to_hash' do
37
41
  it 'return a hash with I18n keys and file lists' do
38
- @keys.to_hash[:'article.key3'].should == ['app/models/article.rb']
42
+ @keys.files[:'article.key3'].should == ['app/models/article.rb']
39
43
  end
40
44
  end
41
45
 
@@ -49,93 +53,63 @@ describe RailsI18nterface::Keys do
49
53
  @keys.i18n_keys(:en).should == ['articles.new.page_title', 'categories.flash.created', 'empty', 'home.about']
50
54
  end
51
55
 
52
- describe 'untranslated_keys' do
53
- before(:each) do
54
- I18n.backend.stub!(:translations).and_return(translations)
55
- end
56
-
57
- it 'should return a hash with keys with missing translations in each locale' do
58
- @keys.untranslated_keys.should == {
59
- :sv => ['articles.new.page_title', 'categories.flash.created', 'empty'],
60
- :no => ['articles.new.page_title', 'categories.flash.created', 'empty', 'home.about']
61
- }
62
- end
63
- end
56
+ describe 'untranslated_keys' do
57
+ before(:each) do
58
+ I18n.backend.stub!(:translations).and_return(translations)
59
+ end
64
60
 
65
- describe 'missing_keys' do
66
- before(:each) do
67
- @file_path = File.join(i18n_files_dir, 'config', 'locales', 'en.yml')
68
- RailsI18nterface::Yamlfile.new(@file_path).write({
69
- :en => {
70
- :home => {
71
- :page_title => false,
72
- :intro => {
73
- :one => 'intro one',
74
- :other => 'intro other'
75
- }
76
- }
61
+ it 'should return a hash with keys with missing translations in each locale' do
62
+ @keys.untranslated_keys.should == {
63
+ :sv => ['articles.new.page_title', 'categories.flash.created', 'empty'],
64
+ :no => ['articles.new.page_title', 'categories.flash.created', 'empty', 'home.about']
77
65
  }
78
- })
79
- end
80
-
81
- after(:each) do
82
- FileUtils.rm(@file_path)
66
+ end
83
67
  end
84
68
 
85
- it 'should return a hash with keys that are not in the locale file' do
86
- @keys.stub!(:files).and_return({
87
- :'home.page_title' => 'app/views/home/index.rhtml',
88
- :'home.intro' => 'app/views/home/index.rhtml',
89
- :'home.signup' => 'app/views/home/_signup.rhtml',
90
- :'about.index.page_title' => 'app/views/about/index.rhtml'
91
- })
92
- @keys.missing_keys.should == {
93
- :'home.signup' => 'app/views/home/_signup.rhtml',
94
- :'about.index.page_title' => 'app/views/about/index.rhtml'
95
- }
96
- end
97
- end
98
-
99
- describe 'contains_key?' do
100
- it 'works' do
101
- hash = {
102
- :foo => {
103
- :bar => {
104
- :baz => false
69
+ describe 'missing_keys' do
70
+ before(:each) do
71
+ @file_path = File.join(@root_dir, 'config', 'locales', 'en.yml')
72
+ yaml = RailsI18nterface::Yamlfile.new(@root_dir, :en)
73
+ yaml.write({
74
+ :en => {
75
+ :home => {
76
+ :page_title => false,
77
+ :intro => {
78
+ :one => 'intro one',
79
+ :other => 'intro other'
80
+ }
81
+ }
105
82
  }
106
- }
107
- }
108
- RailsI18nterface::Keys.contains_key?(hash, '').should be_false
109
- RailsI18nterface::Keys.contains_key?(hash, 'foo').should be_true
110
- RailsI18nterface::Keys.contains_key?(hash, 'foo.bar').should be_true
111
- RailsI18nterface::Keys.contains_key?(hash, 'foo.bar.baz').should be_true
112
- RailsI18nterface::Keys.contains_key?(hash, :'foo.bar.baz').should be_true
113
- RailsI18nterface::Keys.contains_key?(hash, 'foo.bar.baz.bla').should be_false
83
+ })
84
+ end
85
+
86
+ after(:each) do
87
+ FileUtils.rm(@file_path) if File.exists? @file_path
88
+ end
89
+
90
+ it 'should return a hash with keys that are not in the locale file' do
91
+ @keys.stub!(:files).and_return({
92
+ :'home.page_title' => 'app/views/home/index.rhtml',
93
+ :'home.intro' => 'app/views/home/index.rhtml',
94
+ :'home.signup' => 'app/views/home/_signup.rhtml',
95
+ :'about.index.page_title' => 'app/views/about/index.rhtml'
96
+ })
97
+ @keys.missing_keys.size.should == 19
98
+ end
114
99
  end
115
- end
116
100
 
117
- describe 'translated_locales' do
118
- before(:each) do
119
- I18n.stub!(:default_locale).and_return(:en)
120
- I18n.stub!(:available_locales).and_return([:sv, :no, :en, :root])
121
- end
122
101
 
123
- it 'returns all avaiable except :root and the default' do
124
- RailsI18nterface::Keys.translated_locales.should == [:sv, :no]
125
- end
126
- end
102
+ describe 'translated_locales' do
103
+ before(:each) do
104
+ I18n.stub!(:default_locale).and_return(:en)
105
+ I18n.stub!(:available_locales).and_return([:sv, :no, :en, :root])
106
+ end
127
107
 
128
- describe 'to_deep_hash' do
129
- it 'convert shallow hash with dot separated keys to deep hash' do
130
- RailsI18nterface::Keys.to_deep_hash(shallow_hash).should == deep_hash
108
+ it 'returns all avaiable except :root and the default' do
109
+ RailsI18nterface::Keys.translated_locales.should == [:sv, :no]
110
+ end
131
111
  end
132
- end
133
112
 
134
- describe 'to_shallow_hash' do
135
- it 'converts a deep hash to a shallow one' do
136
- RailsI18nterface::Keys.to_shallow_hash(deep_hash).should == shallow_hash
137
- end
138
- end
139
113
 
140
114
  ##########################################################################
141
115
  #
@@ -192,7 +166,4 @@ describe RailsI18nterface::Keys do
192
166
  }
193
167
  end
194
168
 
195
- def i18n_files_dir
196
- File.expand_path(File.join('..', '..', '..', 'spec', 'internal'), __FILE__)
197
- end
198
169
  end
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe RailsI18nterface::Sourcefiles do
@@ -10,13 +12,13 @@ describe RailsI18nterface::Sourcefiles do
10
12
  'activerecord.attributes.article.created_at'=>['db/schema.rb'],
11
13
  'activerecord.attributes.article.updated_at'=>['db/schema.rb'],
12
14
  'activerecord.attributes.article.active'=>['db/schema.rb'],
13
- 'activerecord.models.topics'=>['db/schema.rb'],
14
- 'activerecord.attributes.topics.title'=>['db/schema.rb'],
15
- 'activerecord.attributes.topics.created_at'=>['db/schema.rb'],
16
- 'activerecord.attributes.topics.updated_at'=>['db/schema.rb']
15
+ 'activerecord.models.topic'=>['db/schema.rb'],
16
+ 'activerecord.attributes.topic.title'=>['db/schema.rb'],
17
+ 'activerecord.attributes.topic.created_at'=>['db/schema.rb'],
18
+ 'activerecord.attributes.topic.updated_at'=>['db/schema.rb']
17
19
  }
18
-
19
- hash = RailsI18nterface::Sourcefiles.extract_activerecords
20
+ root_dir = File.expand_path(File.join('..', '..', '..', 'spec', 'internal'), __FILE__)
21
+ hash = RailsI18nterface::Sourcefiles.extract_activerecords(root_dir)
20
22
  hash.should == expected
21
23
  end
22
24
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe RailsI18nterface::Storage do
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe RailsI18nterface::Utils do
@@ -16,4 +18,36 @@ describe RailsI18nterface::Utils do
16
18
  hash.should == expected
17
19
  end
18
20
 
21
+ describe 'to_deep_hash' do
22
+ before :each do
23
+ @shallow_hash = { 'pressrelease.label.one' => 'Pressmeddelande',
24
+ 'pressrelease.label.other' => 'Pressmeddelanden',
25
+ 'article' => 'Artikel', 'category' => '' }
26
+ @deep_hash = { pressrelease: { label: { one: 'Pressmeddelande',
27
+ other: 'Pressmeddelanden' } },
28
+ article: 'Artikel', category: ''}
29
+ end
30
+
31
+ it 'convert shallow hash with dot separated keys to deep hash' do
32
+ to_deep_hash(@shallow_hash).should == @deep_hash
33
+ end
34
+
35
+ it 'converts a deep hash to a shallow one' do
36
+ to_shallow_hash(@deep_hash).should == @shallow_hash
37
+ end
38
+
39
+ end
40
+
41
+ describe 'contains_key?' do
42
+ it 'works' do
43
+ hash = { foo: { bar: { baz: false } } }
44
+ contains_key?(hash, '').should be_false
45
+ contains_key?(hash, 'foo').should be_true
46
+ contains_key?(hash, 'foo.bar').should be_true
47
+ contains_key?(hash, 'foo.bar.baz').should be_true
48
+ contains_key?(hash, :'foo.bar.baz').should be_true
49
+ contains_key?(hash, 'foo.bar.baz.bla').should be_false
50
+ end
51
+ end
52
+
19
53
  end
@@ -1,24 +1,29 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe RailsI18nterface::Yamlfile do
4
6
 
7
+ include RailsI18nterface::Utils
8
+
5
9
  before :each do
6
10
  @translations = { en: { a: { aa: 'aa' }, b: 'b' } }
7
11
  end
8
12
 
9
13
  describe 'write' do
10
14
  before(:each) do
11
- @file_path = File.join(File.dirname(__FILE__), 'files', 'en.yml')
12
- @file = RailsI18nterface::Yamlfile.new(@file_path)
15
+ @root_dir = File.expand_path(File.join('..', '..', '..', 'spec', 'internal'), __FILE__)
16
+ @file_path = File.join(@root_dir, 'config', 'locales', 'en.yml')
17
+ @file = RailsI18nterface::Yamlfile.new(@root_dir, :en)
13
18
  end
14
19
 
15
20
  after(:each) do
16
- FileUtils.rm(@file_path)
21
+ FileUtils.rm(@file_path) if File.exists? @file_path
17
22
  end
18
23
 
19
24
  it 'writes all I18n messages for a locale to YAML file' do
20
25
  @file.write(@translations)
21
- @file.read.should == RailsI18nterface::Yamlfile.new(nil).deep_stringify_keys(@translations)
26
+ @file.read.should == deep_stringify_keys(@translations)
22
27
  end
23
28
 
24
29
  end
@@ -26,7 +31,7 @@ describe RailsI18nterface::Yamlfile do
26
31
  describe 'deep_stringify_keys' do
27
32
  it 'should convert all keys in a hash to strings' do
28
33
  expected = { 'en' => { 'a' => { 'aa' => 'aa' }, 'b' => 'b' } }
29
- RailsI18nterface::Yamlfile.new(nil).deep_stringify_keys(@translations).should == expected
34
+ deep_stringify_keys(@translations).should == expected
30
35
  end
31
36
  end
32
37
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe 'searching' do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  if ENV['COV']
2
4
  require 'simplecov'
3
5
  SimpleCov.start do
@@ -22,7 +24,7 @@ Bundler.require :default, :test
22
24
 
23
25
  require 'capybara/rspec'
24
26
 
25
- Combustion.initialize! :active_record, :action_controller, :action_view, :sprockets
27
+ Combustion.initialize! :action_controller, :action_view
26
28
 
27
29
  require 'rspec/rails'
28
30
  require 'rspec/autorun'
@@ -35,11 +37,9 @@ new_root = File.expand_path(File.join('..', 'internal'), __FILE__)
35
37
 
36
38
  RSpec.configure do |config|
37
39
  config.mock_with :rspec
38
- config.use_transactional_fixtures = true
39
40
  config.include Capybara::DSL, example_group: { file_path: /\bspec\/request\// }
40
41
  config.include RailsI18nterface::Engine.routes.url_helpers
41
42
  config.before(:each) do
42
- RailsI18nterface::Storage.stub!(:root_dir).and_return(new_root)
43
43
  RailsI18nterface::Keys.stub(:i18n_keys).and_return(:en)
44
44
  I18n.stub!(:default_locale).and_return(:en)
45
45
  I18n.stub!(:available_locales).and_return([:sv, :no, :en, :root])
metadata CHANGED
@@ -1,46 +1,68 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-i18nterface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Mose
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-04-23 00:00:00.000000000 Z
12
+ date: 2013-04-25 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: rails
15
+ name: railties
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: 3.1.0
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: 3.1.0
27
30
  - !ruby/object:Gem::Dependency
28
- name: sqlite3
31
+ name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
- version: '0'
37
+ version: 3.1.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 3.1.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: tzinfo
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.3.37
34
54
  type: :development
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
37
58
  requirements:
38
- - - '>='
59
+ - - ! '>='
39
60
  - !ruby/object:Gem::Version
40
- version: '0'
61
+ version: 0.3.37
41
62
  - !ruby/object:Gem::Dependency
42
63
  name: combustion
43
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
44
66
  requirements:
45
67
  - - ~>
46
68
  - !ruby/object:Gem::Version
@@ -48,6 +70,7 @@ dependencies:
48
70
  type: :development
49
71
  prerelease: false
50
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
51
74
  requirements:
52
75
  - - ~>
53
76
  - !ruby/object:Gem::Version
@@ -55,6 +78,7 @@ dependencies:
55
78
  - !ruby/object:Gem::Dependency
56
79
  name: rspec
57
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
58
82
  requirements:
59
83
  - - ~>
60
84
  - !ruby/object:Gem::Version
@@ -62,6 +86,7 @@ dependencies:
62
86
  type: :development
63
87
  prerelease: false
64
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
65
90
  requirements:
66
91
  - - ~>
67
92
  - !ruby/object:Gem::Version
@@ -69,6 +94,7 @@ dependencies:
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: rspec-rails
71
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
72
98
  requirements:
73
99
  - - ~>
74
100
  - !ruby/object:Gem::Version
@@ -76,6 +102,7 @@ dependencies:
76
102
  type: :development
77
103
  prerelease: false
78
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
79
106
  requirements:
80
107
  - - ~>
81
108
  - !ruby/object:Gem::Version
@@ -83,57 +110,65 @@ dependencies:
83
110
  - !ruby/object:Gem::Dependency
84
111
  name: capybara
85
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
86
114
  requirements:
87
- - - '>='
115
+ - - ! '>='
88
116
  - !ruby/object:Gem::Version
89
117
  version: '0'
90
118
  type: :development
91
119
  prerelease: false
92
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
93
122
  requirements:
94
- - - '>='
123
+ - - ! '>='
95
124
  - !ruby/object:Gem::Version
96
125
  version: '0'
97
126
  - !ruby/object:Gem::Dependency
98
127
  name: simplecov
99
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
100
130
  requirements:
101
- - - '>='
131
+ - - ! '>='
102
132
  - !ruby/object:Gem::Version
103
133
  version: '0'
104
134
  type: :development
105
135
  prerelease: false
106
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
107
138
  requirements:
108
- - - '>='
139
+ - - ! '>='
109
140
  - !ruby/object:Gem::Version
110
141
  version: '0'
111
142
  - !ruby/object:Gem::Dependency
112
143
  name: metric_fu
113
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
114
146
  requirements:
115
- - - '>='
147
+ - - ! '>='
116
148
  - !ruby/object:Gem::Version
117
149
  version: '0'
118
150
  type: :development
119
151
  prerelease: false
120
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
121
154
  requirements:
122
- - - '>='
155
+ - - ! '>='
123
156
  - !ruby/object:Gem::Version
124
157
  version: '0'
125
158
  - !ruby/object:Gem::Dependency
126
159
  name: rubocop
127
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
128
162
  requirements:
129
- - - '>='
163
+ - - ! '>='
130
164
  - !ruby/object:Gem::Version
131
165
  version: '0'
132
166
  type: :development
133
167
  prerelease: false
134
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
135
170
  requirements:
136
- - - '>='
171
+ - - ! '>='
137
172
  - !ruby/object:Gem::Version
138
173
  version: '0'
139
174
  description: A rails 3.1/4 engine adding an interface for translating and writing
@@ -146,106 +181,108 @@ extra_rdoc_files: []
146
181
  files:
147
182
  - app/helpers/rails_i18nterface/application_helper.rb
148
183
  - app/helpers/rails_i18nterface/translate_helper.rb
149
- - app/models/rails_i18nterface/translation.rb
150
184
  - app/views/layouts/rails_i18nterface/translate.html.erb
185
+ - app/views/rails_i18nterface/translate/_namespaces.html.erb
151
186
  - app/views/rails_i18nterface/translate/index.html.erb
152
187
  - app/views/rails_i18nterface/translate/_pagination.html.erb
153
- - app/views/rails_i18nterface/translate/_namespaces.html.erb
154
- - app/assets/stylesheets/rails_i18nterface/application.css
155
- - app/assets/javascripts/rails_i18nterface/application.js
156
- - app/assets/javascripts/rails_i18nterface/ender.min.js
157
188
  - app/assets/javascripts/rails_i18nterface/ender.js
158
189
  - app/assets/javascripts/rails_i18nterface/base.js
190
+ - app/assets/javascripts/rails_i18nterface/application.js
191
+ - app/assets/javascripts/rails_i18nterface/ender.min.js
192
+ - app/assets/stylesheets/rails_i18nterface/application.css
159
193
  - app/controllers/rails_i18nterface/application_controller.rb
160
194
  - app/controllers/rails_i18nterface/translate_controller.rb
161
195
  - config/routes.rb
162
- - db/migrate/20110921112044_create_translations.rb
163
- - db/migrate/20130422115639_rename_translation_to_namespace.rb
164
196
  - lib/tasks/rails-i18nterface.rake
165
- - lib/rails-i18nterface/storage.rb
197
+ - lib/rails-i18nterface.rb
198
+ - lib/rails-i18nterface/keys.rb
199
+ - lib/rails-i18nterface/sourcefiles.rb
200
+ - lib/rails-i18nterface/cache.rb
166
201
  - lib/rails-i18nterface/utils.rb
167
202
  - lib/rails-i18nterface/engine.rb
203
+ - lib/rails-i18nterface/storage.rb
168
204
  - lib/rails-i18nterface/yamlfile.rb
169
- - lib/rails-i18nterface/log.rb
170
205
  - lib/rails-i18nterface/version.rb
171
- - lib/rails-i18nterface/keys.rb
172
- - lib/rails-i18nterface/sourcefiles.rb
173
- - lib/rails-i18nterface.rb
174
206
  - MIT-LICENSE
175
207
  - Rakefile
176
208
  - README.md
177
- - spec/models/translation_spec.rb
178
- - spec/spec_helper.rb
179
- - spec/internal/log/test.log
180
- - spec/internal/app/models/article.rb
181
- - spec/internal/app/views/application/index.html.erb
182
- - spec/internal/app/views/categories/category.erb
183
- - spec/internal/app/views/categories/category.rhtml
184
- - spec/internal/app/views/categories/category.html.erb
209
+ - spec/internal/public/favicon.ico
185
210
  - spec/internal/app/views/categories/category.html
186
- - spec/internal/app/assets/stylesheets/application.css
211
+ - spec/internal/app/views/categories/category.html.erb
212
+ - spec/internal/app/views/categories/category.rhtml
213
+ - spec/internal/app/views/categories/category.erb
214
+ - spec/internal/app/views/application/index.html.erb
215
+ - spec/internal/app/models/article.rb
187
216
  - spec/internal/app/assets/javascripts/application.js
217
+ - spec/internal/app/assets/stylesheets/application.css
188
218
  - spec/internal/app/controllers/application_controller.rb
189
- - spec/internal/config/database.yml
219
+ - spec/internal/log/test.log
190
220
  - spec/internal/config/routes.rb
221
+ - spec/internal/config/database.yml
191
222
  - spec/internal/db/schema.rb
192
223
  - spec/internal/db/combustion_test.sqlite
193
- - spec/internal/public/favicon.ico
194
- - spec/lib/log_spec.rb
195
- - spec/lib/sourcefiles_spec.rb
196
- - spec/lib/keys_spec.rb
224
+ - spec/requests/search_spec.rb
197
225
  - spec/lib/utils_spec.rb
198
- - spec/lib/yamlfile_spec.rb
199
226
  - spec/lib/storage_spec.rb
200
- - spec/requests/search_spec.rb
227
+ - spec/lib/cache_spec.rb
228
+ - spec/lib/yamlfile_spec.rb
229
+ - spec/lib/keys_spec.rb
230
+ - spec/lib/sourcefiles_spec.rb
231
+ - spec/spec_helper.rb
201
232
  - spec/controllers/translate_controller_spec.rb
202
233
  homepage: https://github.com/mose/rails-i18nterface
203
234
  licenses:
204
235
  - MIT
205
- metadata: {}
206
236
  post_install_message:
207
237
  rdoc_options: []
208
238
  require_paths:
209
239
  - lib
210
240
  required_ruby_version: !ruby/object:Gem::Requirement
241
+ none: false
211
242
  requirements:
212
- - - '>='
243
+ - - ! '>='
213
244
  - !ruby/object:Gem::Version
214
245
  version: '0'
246
+ segments:
247
+ - 0
248
+ hash: -998383263
215
249
  required_rubygems_version: !ruby/object:Gem::Requirement
250
+ none: false
216
251
  requirements:
217
- - - '>='
252
+ - - ! '>='
218
253
  - !ruby/object:Gem::Version
219
254
  version: '0'
255
+ segments:
256
+ - 0
257
+ hash: -998383263
220
258
  requirements: []
221
259
  rubyforge_project:
222
- rubygems_version: 2.0.0.rc.2
260
+ rubygems_version: 1.8.25
223
261
  signing_key:
224
- specification_version: 4
262
+ specification_version: 3
225
263
  summary: A rails 3.1/4 engine for translating in a web page.
226
264
  test_files:
227
- - spec/models/translation_spec.rb
228
- - spec/spec_helper.rb
229
- - spec/internal/log/test.log
230
- - spec/internal/app/models/article.rb
231
- - spec/internal/app/views/application/index.html.erb
232
- - spec/internal/app/views/categories/category.erb
233
- - spec/internal/app/views/categories/category.rhtml
234
- - spec/internal/app/views/categories/category.html.erb
265
+ - spec/internal/public/favicon.ico
235
266
  - spec/internal/app/views/categories/category.html
236
- - spec/internal/app/assets/stylesheets/application.css
267
+ - spec/internal/app/views/categories/category.html.erb
268
+ - spec/internal/app/views/categories/category.rhtml
269
+ - spec/internal/app/views/categories/category.erb
270
+ - spec/internal/app/views/application/index.html.erb
271
+ - spec/internal/app/models/article.rb
237
272
  - spec/internal/app/assets/javascripts/application.js
273
+ - spec/internal/app/assets/stylesheets/application.css
238
274
  - spec/internal/app/controllers/application_controller.rb
239
- - spec/internal/config/database.yml
275
+ - spec/internal/log/test.log
240
276
  - spec/internal/config/routes.rb
277
+ - spec/internal/config/database.yml
241
278
  - spec/internal/db/schema.rb
242
279
  - spec/internal/db/combustion_test.sqlite
243
- - spec/internal/public/favicon.ico
244
- - spec/lib/log_spec.rb
245
- - spec/lib/sourcefiles_spec.rb
246
- - spec/lib/keys_spec.rb
280
+ - spec/requests/search_spec.rb
247
281
  - spec/lib/utils_spec.rb
248
- - spec/lib/yamlfile_spec.rb
249
282
  - spec/lib/storage_spec.rb
250
- - spec/requests/search_spec.rb
283
+ - spec/lib/cache_spec.rb
284
+ - spec/lib/yamlfile_spec.rb
285
+ - spec/lib/keys_spec.rb
286
+ - spec/lib/sourcefiles_spec.rb
287
+ - spec/spec_helper.rb
251
288
  - spec/controllers/translate_controller_spec.rb