ruby_peter_v 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -6,5 +6,4 @@ rvm:
6
6
  - 1.9.3
7
7
  - 1.9.2
8
8
  - jruby-19mode
9
- - ruby-head
10
9
  - jruby-head
data/HISTORY.txt CHANGED
@@ -39,9 +39,14 @@
39
39
 
40
40
  * Object#each_recursively always returns self
41
41
 
42
- 0.0.10 (2013-07-08)
42
+ 0.0.10 (2013-07-08) <== BROKEN on JRuby !!
43
43
 
44
44
  * truncate_utf8(max_byte_size)
45
+ (see https://github.com/jruby/jruby/issues/861)
46
+
47
+ 0.0.11 (2013-07-08)
48
+
49
+ * fix truncate_utf8(max_byte_size) to also work on JRuby
45
50
 
46
51
  TODO
47
52
  * Object#assert_keys_in
@@ -1,7 +1,11 @@
1
1
  class String
2
2
 
3
3
  def truncate_utf8(max_byte_size)
4
- self.bytes.to_a[0...max_byte_size].pack('c*').force_encoding('UTF-8').encode("UTF-16BE", :invalid => :replace, :replace =>"").encode("UTF-8")
4
+ cut_off = self.bytes.to_a[0...max_byte_size].pack('c*').force_encoding('UTF-8')
5
+ while ! cut_off.valid_encoding? do
6
+ cut_off = cut_off[0..-2]
7
+ end
8
+ cut_off
5
9
  end
6
10
 
7
11
  end
@@ -1,3 +1,3 @@
1
1
  module RubyPeterV
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,71 +1,80 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_peter_v
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ prerelease:
5
+ version: 0.0.11
5
6
  platform: ruby
6
7
  authors:
7
8
  - Peter Vandenabeele
8
- autorequire:
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
  date: 2013-07-08 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rspec
15
- requirement: !ruby/object:Gem::Requirement
16
+ version_requirements: !ruby/object:Gem::Requirement
16
17
  requirements:
17
18
  - - '>='
18
19
  - !ruby/object:Gem::Version
19
20
  version: '2'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
21
+ none: false
22
+ requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2'
27
+ none: false
28
+ prerelease: false
29
+ type: :development
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: guard-rspec
29
- requirement: !ruby/object:Gem::Requirement
32
+ version_requirements: !ruby/object:Gem::Requirement
30
33
  requirements:
31
34
  - - '>='
32
35
  - !ruby/object:Gem::Version
33
36
  version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirement: !ruby/object:Gem::Requirement
37
39
  requirements:
38
40
  - - '>='
39
41
  - !ruby/object:Gem::Version
40
42
  version: '0'
43
+ none: false
44
+ prerelease: false
45
+ type: :development
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rb-fsevent
43
- requirement: !ruby/object:Gem::Requirement
48
+ version_requirements: !ruby/object:Gem::Requirement
44
49
  requirements:
45
50
  - - ~>
46
51
  - !ruby/object:Gem::Version
47
52
  version: '0.9'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirement: !ruby/object:Gem::Requirement
51
55
  requirements:
52
56
  - - ~>
53
57
  - !ruby/object:Gem::Version
54
58
  version: '0.9'
59
+ none: false
60
+ prerelease: false
61
+ type: :development
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: terminal-notifier-guard
57
- requirement: !ruby/object:Gem::Requirement
64
+ version_requirements: !ruby/object:Gem::Requirement
58
65
  requirements:
59
66
  - - '>='
60
67
  - !ruby/object:Gem::Version
61
68
  version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirement: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - '>='
67
73
  - !ruby/object:Gem::Version
68
74
  version: '0'
75
+ none: false
76
+ prerelease: false
77
+ type: :development
69
78
  description: Ruby helpers for @peter_v
70
79
  email:
71
80
  - peter@vandenabeele.com
@@ -99,8 +108,7 @@ files:
99
108
  - spec/spec_helper.rb
100
109
  homepage: https://github.com/petervandenabeele/ruby_peter_v
101
110
  licenses: []
102
- metadata: {}
103
- post_install_message:
111
+ post_install_message:
104
112
  rdoc_options: []
105
113
  require_paths:
106
114
  - lib
@@ -109,16 +117,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
117
  - - '>='
110
118
  - !ruby/object:Gem::Version
111
119
  version: '0'
120
+ none: false
112
121
  required_rubygems_version: !ruby/object:Gem::Requirement
113
122
  requirements:
114
123
  - - '>='
115
124
  - !ruby/object:Gem::Version
116
125
  version: '0'
126
+ none: false
117
127
  requirements: []
118
- rubyforge_project:
119
- rubygems_version: 2.0.3
120
- signing_key:
121
- specification_version: 4
128
+ rubyforge_project:
129
+ rubygems_version: 1.8.24
130
+ signing_key:
131
+ specification_version: 3
122
132
  summary: Ruby helpers for @peter_v
123
133
  test_files:
124
134
  - spec/lib/ruby_peter_v/define_equality_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 7190173c2c5c5a0bfadfcb55c312266cad3ac5d5
4
- data.tar.gz: 2f8acf9357dfcd5806d1780f87dbc8457904aa8d
5
- SHA512:
6
- metadata.gz: 37531a42eef7fd73f99004ef47fccccae802a4219e8eb58ae30d26baffa9d4353c515102ae5a8741649decbcf61dae002036d6193f1a803545273a33b4ab3404
7
- data.tar.gz: 43fe5335e3e48d2ce37a73e06b39cf36614c2dabade2b6e9b6dfb52ab185aefe075687e2fa531c3e5ec47c7a942ec622611c55c70ffac38cf2879b1ee0f2c7b0