idiom 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/idiom.gemspec +2 -2
  3. data/lib/idiom/base.rb +12 -0
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{idiom}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeff Coleman"]
12
- s.date = %q{2011-09-12}
12
+ s.date = %q{2011-09-30}
13
13
  s.default_executable = %q{idiom}
14
14
  s.description = %q{Takes a set of keys in Yaml format and translates them through Google Translate.}
15
15
  s.email = %q{progressions@gmail.com}
@@ -70,6 +70,9 @@ module Idiom #:nodoc:
70
70
  value = value.capitalize
71
71
  end
72
72
 
73
+ value.gsub!("{{", "{{_")
74
+ value.gsub!("}}", "_}}")
75
+
73
76
  value
74
77
  end
75
78
 
@@ -80,6 +83,13 @@ module Idiom #:nodoc:
80
83
  value.gsub!('"', "'")
81
84
  value.gsub!("«", "")
82
85
  value.gsub!("»", "")
86
+ value.gsub!("&lt;", "<")
87
+ value.gsub!("&gt;", ">")
88
+ value.gsub!("{ ", "{")
89
+ value.gsub!(" }", "}")
90
+ value.gsub!("{{_", "{{")
91
+ value.gsub!("_}}", "}}")
92
+ value.gsub!(/\\$/, "")
83
93
 
84
94
  value.strip!
85
95
  value.capitalize!
@@ -88,6 +98,8 @@ module Idiom #:nodoc:
88
98
  value
89
99
  end
90
100
  end
101
+
102
+ end
91
103
 
92
104
  module ClassMethods #:nodoc:
93
105
  def translate(options={})
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idiom
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeff Coleman
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-12 00:00:00 -05:00
18
+ date: 2011-09-30 00:00:00 -05:00
19
19
  default_executable: idiom
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency