gettext_i18n_rails 0.7.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ rvm:
2
+ - ree
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - jruby
6
+ - rbx
data/Gemfile CHANGED
@@ -5,7 +5,6 @@ gem 'appraisal'
5
5
  gem 'bump'
6
6
  gem 'gettext'
7
7
  gem 'haml'
8
- gem 'hamlet'
9
8
  gem 'rails'
10
9
  gem 'rake'
11
10
  gem 'ruby_parser', '~> 2.3' # 3 breaks haml/slim parsing
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gettext_i18n_rails (0.7.2)
4
+ gettext_i18n_rails (0.8.0)
5
5
  fast_gettext (>= 0.4.8)
6
6
 
7
7
  GEM
@@ -46,8 +46,6 @@ GEM
46
46
  gettext (2.3.3)
47
47
  locale
48
48
  haml (3.1.7)
49
- hamlet (0.5.0.1)
50
- slim (~> 1.0.0)
51
49
  hike (1.2.1)
52
50
  i18n (0.6.1)
53
51
  journey (1.0.4)
@@ -121,7 +119,6 @@ DEPENDENCIES
121
119
  gettext
122
120
  gettext_i18n_rails!
123
121
  haml
124
- hamlet
125
122
  rails
126
123
  rake
127
124
  rspec
data/Readme.md CHANGED
@@ -28,7 +28,7 @@ Setup
28
28
 
29
29
  ##### Optional:
30
30
  Add `gettext` if you want to find translations or build .mo files<br/>
31
- Add `ruby_parser` if you want to find translations inside haml/slim/hamlet files (does not support ruby 1.9 syntax)
31
+ Add `ruby_parser` if you want to find translations inside haml/slim files (does not support ruby 1.9 syntax)
32
32
 
33
33
 
34
34
  # Gemfile
@@ -233,4 +233,6 @@ If want to use your .PO files on client side javascript you should have a look a
233
233
 
234
234
  [Michael Grosser](http://grosser.it)<br/>
235
235
  grosser.michael@gmail.com<br/>
236
- License: MIT
236
+ License: MIT<br/>
237
+ [![Build Status](https://travis-ci.org/grosser/gettext_i18n_rails.png)](https://travis-ci.org/grosser/gettext_i18n_rails)
238
+
@@ -3,14 +3,14 @@
3
3
  source :rubygems
4
4
 
5
5
  gem "appraisal"
6
- gem "haml"
7
- gem "slim"
8
- gem "hamlet"
9
- gem "ruby_parser", "~> 2.3"
6
+ gem "bump"
10
7
  gem "gettext"
11
- gem "sqlite3"
8
+ gem "haml"
12
9
  gem "rake"
10
+ gem "ruby_parser", "~> 2.3"
13
11
  gem "rspec"
12
+ gem "slim"
13
+ gem "sqlite3"
14
14
  gem "rails", "~>2.3.0"
15
15
 
16
16
  gemspec :path=>"../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/gettext_i18n_rails
3
3
  specs:
4
- gettext_i18n_rails (0.7.1)
4
+ gettext_i18n_rails (0.7.2)
5
5
  fast_gettext (>= 0.4.8)
6
6
 
7
7
  GEM
@@ -20,13 +20,12 @@ GEM
20
20
  appraisal (0.5.1)
21
21
  bundler
22
22
  rake
23
+ bump (0.3.5)
23
24
  diff-lcs (1.1.3)
24
25
  fast_gettext (0.6.11)
25
26
  gettext (2.3.3)
26
27
  locale
27
28
  haml (3.1.7)
28
- hamlet (0.5.0.1)
29
- slim (~> 1.0.0)
30
29
  locale (2.0.8)
31
30
  rack (1.1.3)
32
31
  rails (2.3.14)
@@ -60,10 +59,10 @@ PLATFORMS
60
59
 
61
60
  DEPENDENCIES
62
61
  appraisal
62
+ bump
63
63
  gettext
64
64
  gettext_i18n_rails!
65
65
  haml
66
- hamlet
67
66
  rails (~> 2.3.0)
68
67
  rake
69
68
  rspec
@@ -3,14 +3,14 @@
3
3
  source :rubygems
4
4
 
5
5
  gem "appraisal"
6
- gem "haml"
7
- gem "slim"
8
- gem "hamlet"
9
- gem "ruby_parser", "~> 2.3"
6
+ gem "bump"
10
7
  gem "gettext"
11
- gem "sqlite3"
8
+ gem "haml"
12
9
  gem "rake"
10
+ gem "ruby_parser", "~> 2.3"
13
11
  gem "rspec"
12
+ gem "slim"
13
+ gem "sqlite3"
14
14
  gem "rails", "~>3.0.0"
15
15
 
16
16
  gemspec :path=>"../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/gettext_i18n_rails
3
3
  specs:
4
- gettext_i18n_rails (0.7.1)
4
+ gettext_i18n_rails (0.7.2)
5
5
  fast_gettext (>= 0.4.8)
6
6
 
7
7
  GEM
@@ -39,6 +39,7 @@ GEM
39
39
  rake
40
40
  arel (2.0.10)
41
41
  builder (2.1.2)
42
+ bump (0.3.5)
42
43
  diff-lcs (1.1.3)
43
44
  erubis (2.6.6)
44
45
  abstract (>= 1.0.0)
@@ -46,8 +47,6 @@ GEM
46
47
  gettext (2.3.3)
47
48
  locale
48
49
  haml (3.1.7)
49
- hamlet (0.5.0.1)
50
- slim (~> 1.0.0)
51
50
  i18n (0.5.0)
52
51
  json (1.7.5)
53
52
  locale (2.0.8)
@@ -108,10 +107,10 @@ PLATFORMS
108
107
 
109
108
  DEPENDENCIES
110
109
  appraisal
110
+ bump
111
111
  gettext
112
112
  gettext_i18n_rails!
113
113
  haml
114
- hamlet
115
114
  rails (~> 3.0.0)
116
115
  rake
117
116
  rspec
@@ -3,14 +3,14 @@
3
3
  source :rubygems
4
4
 
5
5
  gem "appraisal"
6
- gem "haml"
7
- gem "slim"
8
- gem "hamlet"
9
- gem "ruby_parser", "~> 2.3"
6
+ gem "bump"
10
7
  gem "gettext"
11
- gem "sqlite3"
8
+ gem "haml"
12
9
  gem "rake"
10
+ gem "ruby_parser", "~> 2.3"
13
11
  gem "rspec"
12
+ gem "slim"
13
+ gem "sqlite3"
14
14
  gem "rails", "~>3.1.0"
15
15
 
16
16
  gemspec :path=>"../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/gettext_i18n_rails
3
3
  specs:
4
- gettext_i18n_rails (0.7.1)
4
+ gettext_i18n_rails (0.7.2)
5
5
  fast_gettext (>= 0.4.8)
6
6
 
7
7
  GEM
@@ -40,14 +40,13 @@ GEM
40
40
  rake
41
41
  arel (2.2.3)
42
42
  builder (3.0.4)
43
+ bump (0.3.5)
43
44
  diff-lcs (1.1.3)
44
45
  erubis (2.7.0)
45
46
  fast_gettext (0.6.11)
46
47
  gettext (2.3.3)
47
48
  locale
48
49
  haml (3.1.7)
49
- hamlet (0.5.0.1)
50
- slim (~> 1.0.0)
51
50
  hike (1.2.1)
52
51
  i18n (0.6.1)
53
52
  json (1.7.5)
@@ -118,10 +117,10 @@ PLATFORMS
118
117
 
119
118
  DEPENDENCIES
120
119
  appraisal
120
+ bump
121
121
  gettext
122
122
  gettext_i18n_rails!
123
123
  haml
124
- hamlet
125
124
  rails (~> 3.1.0)
126
125
  rake
127
126
  rspec
@@ -3,14 +3,14 @@
3
3
  source :rubygems
4
4
 
5
5
  gem "appraisal"
6
- gem "haml"
7
- gem "slim"
8
- gem "hamlet"
9
- gem "ruby_parser", "~> 2.3"
6
+ gem "bump"
10
7
  gem "gettext"
11
- gem "sqlite3"
8
+ gem "haml"
12
9
  gem "rake"
10
+ gem "ruby_parser", "~> 2.3"
13
11
  gem "rspec"
12
+ gem "slim"
13
+ gem "sqlite3"
14
14
  gem "rails", "~>3.2.0"
15
15
 
16
16
  gemspec :path=>"../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/gettext_i18n_rails
3
3
  specs:
4
- gettext_i18n_rails (0.7.1)
4
+ gettext_i18n_rails (0.7.2)
5
5
  fast_gettext (>= 0.4.8)
6
6
 
7
7
  GEM
@@ -39,14 +39,13 @@ GEM
39
39
  rake
40
40
  arel (3.0.2)
41
41
  builder (3.0.4)
42
+ bump (0.3.5)
42
43
  diff-lcs (1.1.3)
43
44
  erubis (2.7.0)
44
45
  fast_gettext (0.6.11)
45
46
  gettext (2.3.3)
46
47
  locale
47
48
  haml (3.1.7)
48
- hamlet (0.5.0.1)
49
- slim (~> 1.0.0)
50
49
  hike (1.2.1)
51
50
  i18n (0.6.1)
52
51
  journey (1.0.4)
@@ -116,10 +115,10 @@ PLATFORMS
116
115
 
117
116
  DEPENDENCIES
118
117
  appraisal
118
+ bump
119
119
  gettext
120
120
  gettext_i18n_rails!
121
121
  haml
122
- hamlet
123
122
  rails (~> 3.2.0)
124
123
  rake
125
124
  rspec
@@ -16,7 +16,6 @@ namespace :gettext do
16
16
  $LOAD_PATH << File.join(File.dirname(__FILE__),'..','..','lib') # needed when installed as plugin
17
17
 
18
18
  require "gettext_i18n_rails/haml_parser"
19
- require "gettext_i18n_rails/hamlet_parser"
20
19
  require "gettext_i18n_rails/slim_parser"
21
20
 
22
21
  if GetText.respond_to? :update_pofiles_org
@@ -1,3 +1,3 @@
1
1
  module GettextI18nRails
2
- Version = VERSION = '0.7.2'
2
+ Version = VERSION = '0.8.0'
3
3
  end
@@ -53,7 +53,8 @@ describe GettextI18nRails::Backend do
53
53
 
54
54
  it "passes non-gettext keys to default backend" do
55
55
  subject.backend.should_receive(:translate).with('xx', 'c', {}).and_return 'd'
56
- FastGettext.should_receive(:current_repository).and_return 'a'=>'b'
56
+ # TODO track down why this is called 3 times on 1.8 (only 1 time on 1.9)
57
+ FastGettext.stub(:current_repository).and_return 'a'=>'b'
57
58
  subject.translate('xx', 'c', {}).should == 'd'
58
59
  end
59
60
 
metadata CHANGED
@@ -1,39 +1,49 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gettext_i18n_rails
3
- version: !ruby/object:Gem::Version
4
- version: 0.7.2
3
+ version: !ruby/object:Gem::Version
4
+ hash: 63
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 8
9
+ - 0
10
+ version: 0.8.0
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Michael Grosser
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-11-10 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-11-10 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: fast_gettext
16
- requirement: !ruby/object:Gem::Requirement
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
17
23
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 31
28
+ segments:
29
+ - 0
30
+ - 4
31
+ - 8
21
32
  version: 0.4.8
22
33
  type: :runtime
34
+ requirement: *id001
23
35
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: 0.4.8
30
36
  description:
31
37
  email: michael@grosser.it
32
38
  executables: []
39
+
33
40
  extensions: []
41
+
34
42
  extra_rdoc_files: []
35
- files:
43
+
44
+ files:
36
45
  - .gitignore
46
+ - .travis.yml
37
47
  - Appraisals
38
48
  - Gemfile
39
49
  - Gemfile.lock
@@ -65,7 +75,6 @@ files:
65
75
  - lib/gettext_i18n_rails/base_parser.rb
66
76
  - lib/gettext_i18n_rails/gettext_hooks.rb
67
77
  - lib/gettext_i18n_rails/haml_parser.rb
68
- - lib/gettext_i18n_rails/hamlet_parser.rb
69
78
  - lib/gettext_i18n_rails/html_safe_translations.rb
70
79
  - lib/gettext_i18n_rails/i18n_hacks.rb
71
80
  - lib/gettext_i18n_rails/model_attributes_finder.rb
@@ -81,41 +90,43 @@ files:
81
90
  - spec/gettext_i18n_rails/active_record_spec.rb
82
91
  - spec/gettext_i18n_rails/backend_spec.rb
83
92
  - spec/gettext_i18n_rails/haml_parser_spec.rb
84
- - spec/gettext_i18n_rails/hamlet_parser_spec.rb
85
93
  - spec/gettext_i18n_rails/model_attributes_finder_spec.rb
86
94
  - spec/gettext_i18n_rails/slim_parser_spec.rb
87
95
  - spec/gettext_i18n_rails/string_interpolate_fix_spec.rb
88
96
  - spec/gettext_i18n_rails_spec.rb
89
97
  - spec/spec_helper.rb
90
98
  homepage: http://github.com/grosser/gettext_i18n_rails
91
- licenses:
99
+ licenses:
92
100
  - MIT
93
101
  post_install_message:
94
102
  rdoc_options: []
95
- require_paths:
103
+
104
+ require_paths:
96
105
  - lib
97
- required_ruby_version: !ruby/object:Gem::Requirement
106
+ required_ruby_version: !ruby/object:Gem::Requirement
98
107
  none: false
99
- requirements:
100
- - - ! '>='
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
- segments:
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ hash: 3
112
+ segments:
104
113
  - 0
105
- hash: 1915795330397940793
106
- required_rubygems_version: !ruby/object:Gem::Requirement
114
+ version: "0"
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
116
  none: false
108
- requirements:
109
- - - ! '>='
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- segments:
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
113
122
  - 0
114
- hash: 1915795330397940793
123
+ version: "0"
115
124
  requirements: []
125
+
116
126
  rubyforge_project:
117
127
  rubygems_version: 1.8.24
118
128
  signing_key:
119
129
  specification_version: 3
120
130
  summary: Simple FastGettext Rails integration.
121
131
  test_files: []
132
+
@@ -1,15 +0,0 @@
1
- require 'gettext_i18n_rails/base_parser'
2
-
3
- module GettextI18nRails
4
- class HamletParser < BaseParser
5
- def self.extension
6
- "hamlet"
7
- end
8
-
9
- def self.convert_to_code(text)
10
- Hamlet::Engine.new.call(text)
11
- end
12
- end
13
- end
14
-
15
- GettextI18nRails::GettextHooks.add_parser GettextI18nRails::HamletParser
@@ -1,33 +0,0 @@
1
- require "spec_helper"
2
- require "gettext_i18n_rails/hamlet_parser"
3
-
4
- describe GettextI18nRails::HamletParser do
5
- let(:parser){ GettextI18nRails::HamletParser }
6
-
7
- describe "#target?" do
8
- it "targets .hamlet" do
9
- parser.target?('foo/bar/xxx.hamlet').should == true
10
- end
11
-
12
- it "does not target anything else" do
13
- parser.target?('foo/bar/xxx.erb').should == false
14
- end
15
- end
16
-
17
- describe "#parse" do
18
- it "finds messages in slim" do
19
- with_file '<div>= _("xxxx")' do |path|
20
- parser.parse(path, []).should == [
21
- ["xxxx", "#{path}:1"]
22
- ]
23
- end
24
- end
25
-
26
- it "does not find messages in text" do
27
- with_file '<div> _("xxxx")' do |path|
28
- parser.parse(path, []).should == []
29
- end
30
- end
31
- end
32
- end
33
-