unbork 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/unbork.rb +7 -1
  3. metadata +84 -80
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
data/lib/unbork.rb CHANGED
@@ -20,7 +20,13 @@ module Unbork
20
20
  end
21
21
 
22
22
  def unbork text
23
- text.gsub(swedish_letters, swedish)
23
+ if RUBY_VERSION > "1.9"
24
+ text.gsub(swedish_letters, swedish)
25
+ else
26
+ text.gsub(swedish_letters) do |match|
27
+ swedish[match]
28
+ end
29
+ end
24
30
  end
25
31
  end
26
32
  end
metadata CHANGED
@@ -1,89 +1,87 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: unbork
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 21
5
5
  prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 1
10
+ version: 1.0.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Krzysztof Zych
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-03-27 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: gemcutter
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
17
+
18
+ date: 2013-03-27 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
22
21
  type: :development
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ requirement: *id001
23
32
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
33
+ name: gemcutter
34
+ - !ruby/object:Gem::Dependency
35
+ type: :development
36
+ version_requirements: &id002 !ruby/object:Gem::Requirement
25
37
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
- - !ruby/object:Gem::Dependency
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ hash: 3
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ requirement: *id002
46
+ prerelease: false
31
47
  name: bundler
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
48
+ - !ruby/object:Gem::Dependency
38
49
  type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
50
+ version_requirements: &id003 !ruby/object:Gem::Requirement
41
51
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ hash: 3
56
+ segments:
57
+ - 0
58
+ version: "0"
59
+ requirement: *id003
60
+ prerelease: false
47
61
  name: jeweler
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
62
+ - !ruby/object:Gem::Dependency
54
63
  type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: simplecov
64
- requirement: !ruby/object:Gem::Requirement
64
+ version_requirements: &id004 !ruby/object:Gem::Requirement
65
65
  none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ hash: 3
70
+ segments:
71
+ - 0
72
+ version: "0"
73
+ requirement: *id004
71
74
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- description: ! 'Based on a blog post by Rowan Thorpe (http://rowanthorpe.wordpress.com/2012/10/15/unmangle-utf-8-from-double-encoded-utf-8-my-shell-script-and-batch-script-tweaks/),
79
- forcefully replaces broken UTF-8 encoded as pairs of Latin-1 characters. Includes
80
- a verbatim copy of Rowan''s sed script. '
75
+ name: simplecov
76
+ description: "Based on a blog post by Rowan Thorpe (http://rowanthorpe.wordpress.com/2012/10/15/unmangle-utf-8-from-double-encoded-utf-8-my-shell-script-and-batch-script-tweaks/), forcefully replaces broken UTF-8 encoded as pairs of Latin-1 characters. Includes a verbatim copy of Rowan's sed script. "
81
77
  email: krzysztof.zych@connectmedica.com
82
78
  executables: []
79
+
83
80
  extensions: []
84
- extra_rdoc_files:
81
+
82
+ extra_rdoc_files:
85
83
  - README.md
86
- files:
84
+ files:
87
85
  - Gemfile
88
86
  - Gemfile.lock
89
87
  - README.md
@@ -93,31 +91,37 @@ files:
93
91
  - lib/unmangle-utf8-script.sed
94
92
  - unbork.gemspec
95
93
  homepage: http://github.com/k3rni/unbork
96
- licenses:
94
+ licenses:
97
95
  - MIT
98
96
  post_install_message:
99
97
  rdoc_options: []
100
- require_paths:
98
+
99
+ require_paths:
101
100
  - lib
102
- required_ruby_version: !ruby/object:Gem::Requirement
101
+ required_ruby_version: !ruby/object:Gem::Requirement
103
102
  none: false
104
- requirements:
105
- - - ! '>='
106
- - !ruby/object:Gem::Version
107
- version: '0'
108
- segments:
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ hash: 3
107
+ segments:
109
108
  - 0
110
- hash: 469677885
111
- required_rubygems_version: !ruby/object:Gem::Requirement
109
+ version: "0"
110
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
111
  none: false
113
- requirements:
114
- - - ! '>='
115
- - !ruby/object:Gem::Version
116
- version: '0'
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ hash: 3
116
+ segments:
117
+ - 0
118
+ version: "0"
117
119
  requirements: []
120
+
118
121
  rubyforge_project:
119
122
  rubygems_version: 1.8.25
120
123
  signing_key:
121
124
  specification_version: 3
122
- summary: Unbörk your strings from MySQL's default Swedish encoding
125
+ summary: "Unb\xC3\xB6rk your strings from MySQL's default Swedish encoding"
123
126
  test_files: []
127
+