ruby-bsdconv 9.1 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Rakefile +1 -1
- data/ruby-bsdconv.gemspec +6 -13
- data/task/gemgem.rb +9 -17
- data/test/test_basic.rb +13 -0
- metadata +8 -8
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: 54a67adad3a37bdadd7c228cf646c550639c3699
|
4
|
+
data.tar.gz: 390d6efe3f26711152c6470a863f23f09c032a8f
|
5
|
+
!binary "U0hBNTEy":
|
6
|
+
metadata.gz: ecac181bd594764a69ddcd7d404bfd620f4fa6cbaa905e33c073e3f3981afcd2718c16b3783c9af2a36b6c18339463353da7bfc9dd35f44a74f6ab11ed2c0a9c
|
7
|
+
data.tar.gz: eb2479c38dd3afebd4b374cc16d19344dcf25eb3554d05c36014fb987a51527b86bb09958fd16d916ea839f06120fb89af208cd7eed5553cf9a1dfd28e8db395
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ desc 'Generate gemspec'
|
|
9
9
|
task 'gem:spec' do
|
10
10
|
Gemgem.spec = Gemgem.create do |s|
|
11
11
|
s.name = 'ruby-bsdconv'
|
12
|
-
s.version = '9.1'
|
12
|
+
s.version = '9.1.1'
|
13
13
|
s.extensions = 'ext/ruby-bsdconv/extconf.rb'
|
14
14
|
s.authors = ['Buganini Q']
|
15
15
|
s.homepage = 'https://github.com/buganini/ruby-bsdconv'
|
data/ruby-bsdconv.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "ruby-bsdconv"
|
5
|
-
s.version = "9.1"
|
5
|
+
s.version = "9.1.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Buganini Q"]
|
9
|
-
s.date = "
|
9
|
+
s.date = "2013-03-02"
|
10
10
|
s.description = "ruby wrapper for bsdconv. bsdconv is a BSD licensed charset/encoding converter library with more functionalities than libiconv"
|
11
11
|
s.extensions = ["ext/ruby-bsdconv/extconf.rb"]
|
12
12
|
s.files = [
|
@@ -19,18 +19,11 @@ Gem::Specification.new do |s|
|
|
19
19
|
"ext/ruby-bsdconv/bsdconv.c",
|
20
20
|
"ext/ruby-bsdconv/extconf.rb",
|
21
21
|
"ruby-bsdconv.gemspec",
|
22
|
-
"task/gemgem.rb"
|
22
|
+
"task/gemgem.rb",
|
23
|
+
"test/test_basic.rb"]
|
23
24
|
s.homepage = "https://github.com/buganini/ruby-bsdconv"
|
24
25
|
s.require_paths = ["lib"]
|
25
|
-
s.rubygems_version = "
|
26
|
+
s.rubygems_version = "2.0.0"
|
26
27
|
s.summary = "ruby wrapper for bsdconv"
|
27
|
-
|
28
|
-
if s.respond_to? :specification_version then
|
29
|
-
s.specification_version = 3
|
30
|
-
|
31
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
32
|
-
else
|
33
|
-
end
|
34
|
-
else
|
35
|
-
end
|
28
|
+
s.test_files = ["test/test_basic.rb"]
|
36
29
|
end
|
data/task/gemgem.rb
CHANGED
@@ -20,7 +20,11 @@ module Gemgem
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def gem_tag
|
23
|
-
|
23
|
+
spec.version.to_s
|
24
|
+
end
|
25
|
+
|
26
|
+
def gem_filename
|
27
|
+
"#{spec.name}-#{spec.version}.gem"
|
24
28
|
end
|
25
29
|
|
26
30
|
def write
|
@@ -104,14 +108,14 @@ namespace :gem do
|
|
104
108
|
|
105
109
|
desc 'Install gem'
|
106
110
|
task :install => [:build] do
|
107
|
-
sh("#{Gem.ruby} -S gem install pkg/#{Gemgem.
|
111
|
+
sh("#{Gem.ruby} -S gem install pkg/#{Gemgem.gem_filename}")
|
108
112
|
end
|
109
113
|
|
110
114
|
desc 'Build gem'
|
111
115
|
task :build => [:spec] do
|
112
116
|
sh("#{Gem.ruby} -S gem build #{Gemgem.spec.name}.gemspec")
|
113
117
|
sh("mkdir -p pkg")
|
114
|
-
sh("mv #{Gemgem.
|
118
|
+
sh("mv #{Gemgem.gem_filename} pkg/")
|
115
119
|
end
|
116
120
|
|
117
121
|
desc 'Release gem'
|
@@ -119,7 +123,7 @@ task :release => [:spec, :check, :build] do
|
|
119
123
|
sh("git tag #{Gemgem.gem_tag}")
|
120
124
|
sh("git push")
|
121
125
|
sh("git push --tags")
|
122
|
-
sh("#{Gem.ruby} -S gem push pkg/#{Gemgem.
|
126
|
+
sh("#{Gem.ruby} -S gem push pkg/#{Gemgem.gem_filename}")
|
123
127
|
end
|
124
128
|
|
125
129
|
task :check do
|
@@ -142,21 +146,9 @@ end # of gem namespace
|
|
142
146
|
|
143
147
|
desc 'Run tests in memory'
|
144
148
|
task :test do
|
145
|
-
require 'bacon'
|
146
|
-
Bacon.extend(Bacon::TestUnitOutput)
|
147
|
-
Bacon.summary_on_exit
|
148
149
|
$LOAD_PATH.unshift('lib')
|
149
150
|
Dir['./test/**/test_*.rb'].each{ |file| require file[0..-4] }
|
150
|
-
|
151
|
-
|
152
|
-
desc 'Run tests with shell'
|
153
|
-
task 'test:shell', :RUBY_OPTS do |t, args|
|
154
|
-
files = Dir['test/**/test_*.rb'].join(' ')
|
155
|
-
|
156
|
-
cmd = [Gem.ruby, args[:RUBY_OPTS],
|
157
|
-
'-I', 'lib', '-S', 'bacon', '--quiet', files]
|
158
|
-
|
159
|
-
sh(cmd.compact.join(' '))
|
151
|
+
Test::Unit::Runner.autorun
|
160
152
|
end
|
161
153
|
|
162
154
|
task :default do
|
data/test/test_basic.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'bsdconv'
|
5
|
+
|
6
|
+
class TestBasic < Test::Unit::TestCase
|
7
|
+
def test_basic
|
8
|
+
c = Bsdconv.new('big5:utf-8')
|
9
|
+
c.init
|
10
|
+
assert_equal '許功蓋',
|
11
|
+
c.conv_chunk("\263\134\245\134\273\134").force_encoding('utf-8')
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-bsdconv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 9.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Buganini Q
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-03-02 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: ruby wrapper for bsdconv. bsdconv is a BSD licensed charset/encoding
|
15
14
|
converter library with more functionalities than libiconv
|
@@ -29,28 +28,29 @@ files:
|
|
29
28
|
- ext/ruby-bsdconv/extconf.rb
|
30
29
|
- ruby-bsdconv.gemspec
|
31
30
|
- task/gemgem.rb
|
31
|
+
- test/test_basic.rb
|
32
32
|
homepage: https://github.com/buganini/ruby-bsdconv
|
33
33
|
licenses: []
|
34
|
+
metadata: {}
|
34
35
|
post_install_message:
|
35
36
|
rdoc_options: []
|
36
37
|
require_paths:
|
37
38
|
- lib
|
38
39
|
required_ruby_version: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
46
45
|
requirements:
|
47
46
|
- - ! '>='
|
48
47
|
- !ruby/object:Gem::Version
|
49
48
|
version: '0'
|
50
49
|
requirements: []
|
51
50
|
rubyforge_project:
|
52
|
-
rubygems_version:
|
51
|
+
rubygems_version: 2.0.0
|
53
52
|
signing_key:
|
54
|
-
specification_version:
|
53
|
+
specification_version: 4
|
55
54
|
summary: ruby wrapper for bsdconv
|
56
|
-
test_files:
|
55
|
+
test_files:
|
56
|
+
- test/test_basic.rb
|