sort_alphabetical 0.1.1 → 0.1.2
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.
- data/Gemfile +9 -0
- data/Gemfile.lock +30 -0
- data/Rakefile +9 -10
- data/{README.markdown → Readme.md} +4 -4
- data/VERSION +1 -1
- data/lib/sort_alphabetical.rb +13 -8
- data/sort_alphabetical.gemspec +17 -25
- data/spec/spec_helper.rb +2 -1
- metadata +36 -20
- data/spec/README.markdown +0 -2
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (3.1.0)
|
5
|
+
multi_json (~> 1.0)
|
6
|
+
diff-lcs (1.1.3)
|
7
|
+
git (1.2.5)
|
8
|
+
jeweler (1.6.4)
|
9
|
+
bundler (~> 1.0)
|
10
|
+
git (>= 1.2.5)
|
11
|
+
rake
|
12
|
+
multi_json (1.0.3)
|
13
|
+
rake (0.9.2)
|
14
|
+
rspec (2.6.0)
|
15
|
+
rspec-core (~> 2.6.0)
|
16
|
+
rspec-expectations (~> 2.6.0)
|
17
|
+
rspec-mocks (~> 2.6.0)
|
18
|
+
rspec-core (2.6.4)
|
19
|
+
rspec-expectations (2.6.0)
|
20
|
+
diff-lcs (~> 1.1.2)
|
21
|
+
rspec-mocks (2.6.0)
|
22
|
+
|
23
|
+
PLATFORMS
|
24
|
+
ruby
|
25
|
+
|
26
|
+
DEPENDENCIES
|
27
|
+
activesupport
|
28
|
+
jeweler
|
29
|
+
rake
|
30
|
+
rspec (~> 2)
|
data/Rakefile
CHANGED
@@ -1,20 +1,19 @@
|
|
1
|
-
task :default
|
2
|
-
|
3
|
-
|
1
|
+
task :default do
|
2
|
+
sh "RAILS='~>2' bundle && bundle exec rspec spec"
|
3
|
+
sh "RAILS='~>3' bundle && bundle exec rspec spec"
|
4
|
+
end
|
4
5
|
|
5
6
|
begin
|
6
|
-
project_name = 'sort_alphabetical'
|
7
7
|
require 'jeweler'
|
8
8
|
Jeweler::Tasks.new do |gem|
|
9
|
-
gem.name =
|
9
|
+
gem.name = 'sort_alphabetical'
|
10
10
|
gem.summary = "Sort UTF8 Strings alphabetical via Enumerable extension"
|
11
|
-
gem.email = "
|
12
|
-
gem.homepage = "http://github.com/grosser/#{
|
11
|
+
gem.email = "michael@grosser.it"
|
12
|
+
gem.homepage = "http://github.com/grosser/#{gem.name}"
|
13
13
|
gem.authors = ["Michael Grosser"]
|
14
|
-
gem.add_dependency "activesupport"
|
15
14
|
end
|
16
15
|
|
17
16
|
Jeweler::GemcutterTasks.new
|
18
17
|
rescue LoadError
|
19
|
-
puts "Jeweler, or one of its dependencies, is not available. Install it with:
|
20
|
-
end
|
18
|
+
puts "Jeweler, or one of its dependencies, is not available. Install it with: gem install jeweler"
|
19
|
+
end
|
@@ -5,7 +5,7 @@ This sorting is done by placing variants on the same level as base character (A
|
|
5
5
|
|
6
6
|
Setup
|
7
7
|
=====
|
8
|
-
- As Rails plugin: `
|
8
|
+
- As Rails plugin: `rails plugin install git://github.com/grosser/sort_alphabetical.git `
|
9
9
|
- As gem: ` sudo gem install sort_alphabetical `
|
10
10
|
|
11
11
|
Usage
|
@@ -22,6 +22,6 @@ Authors
|
|
22
22
|
=======
|
23
23
|
- original string_to_ascii: [Marc-Andre](http://marc-andre.ca/).
|
24
24
|
|
25
|
-
[Michael Grosser](http://
|
26
|
-
|
27
|
-
Hereby placed under public domain, do what you want, just do not hold me accountable...
|
25
|
+
[Michael Grosser](http://grosser.it)<br/>
|
26
|
+
michael@grosser.it<br/>
|
27
|
+
Hereby placed under public domain, do what you want, just do not hold me accountable...
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/sort_alphabetical.rb
CHANGED
@@ -1,5 +1,14 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# TODO do something like with_utf8 do ...
|
2
|
+
$KCODE = 'UTF8' # otherwise mb_chars produces normal strings
|
3
|
+
|
4
|
+
require 'active_support/version'
|
5
|
+
if ActiveSupport::VERSION::MAJOR > 2
|
6
|
+
# pick what we need
|
7
|
+
require 'active_support/core_ext/string/multibyte'
|
8
|
+
else
|
9
|
+
# load everything, its a mess in there ...
|
10
|
+
require 'active_support'
|
11
|
+
end
|
3
12
|
require 'sort_alphabetical/core_ext'
|
4
13
|
|
5
14
|
module SortAlphabetical
|
@@ -24,10 +33,6 @@ module SortAlphabetical
|
|
24
33
|
|
25
34
|
# returns an array of unicode codepoints, in canonical order
|
26
35
|
def split_codepoints(string)
|
27
|
-
|
28
|
-
ActiveSupport::Multibyte::Handlers::UTF8Handler.normalize(string,:d).split(//u)
|
29
|
-
else
|
30
|
-
string.mb_chars.normalize(:d).split(//u)
|
31
|
-
end
|
36
|
+
string.mb_chars.normalize(:d).split(//u)
|
32
37
|
end
|
33
|
-
end
|
38
|
+
end
|
data/sort_alphabetical.gemspec
CHANGED
@@ -1,46 +1,38 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sort_alphabetical}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Grosser"]
|
12
|
-
s.date = %q{
|
13
|
-
s.email = %q{
|
14
|
-
s.extra_rdoc_files = [
|
15
|
-
"README.markdown"
|
16
|
-
]
|
12
|
+
s.date = %q{2011-09-08}
|
13
|
+
s.email = %q{michael@grosser.it}
|
17
14
|
s.files = [
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
15
|
+
"Gemfile",
|
16
|
+
"Gemfile.lock",
|
17
|
+
"Rakefile",
|
18
|
+
"Readme.md",
|
19
|
+
"VERSION",
|
20
|
+
"init.rb",
|
21
|
+
"lib/sort_alphabetical.rb",
|
22
|
+
"lib/sort_alphabetical/core_ext.rb",
|
23
|
+
"sort_alphabetical.gemspec",
|
24
|
+
"spec/sort_alphabetical_spec.rb",
|
25
|
+
"spec/spec_helper.rb"
|
28
26
|
]
|
29
27
|
s.homepage = %q{http://github.com/grosser/sort_alphabetical}
|
30
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
31
28
|
s.require_paths = ["lib"]
|
32
|
-
s.rubygems_version = %q{1.
|
29
|
+
s.rubygems_version = %q{1.6.2}
|
33
30
|
s.summary = %q{Sort UTF8 Strings alphabetical via Enumerable extension}
|
34
|
-
s.test_files = [
|
35
|
-
"spec/spec_helper.rb",
|
36
|
-
"spec/sort_alphabetical_spec.rb"
|
37
|
-
]
|
38
31
|
|
39
32
|
if s.respond_to? :specification_version then
|
40
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
41
33
|
s.specification_version = 3
|
42
34
|
|
43
|
-
if Gem::Version.new(Gem::
|
35
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
36
|
s.add_runtime_dependency(%q<activesupport>, [">= 0"])
|
45
37
|
else
|
46
38
|
s.add_dependency(%q<activesupport>, [">= 0"])
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sort_alphabetical
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 31
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Michael Grosser
|
@@ -9,36 +15,41 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-09-08 00:00:00 +02:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
|
-
|
17
|
-
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
hash: 3
|
28
|
+
segments:
|
29
|
+
- 0
|
23
30
|
version: "0"
|
24
|
-
|
31
|
+
type: :runtime
|
32
|
+
name: activesupport
|
33
|
+
version_requirements: *id001
|
34
|
+
prerelease: false
|
25
35
|
description:
|
26
|
-
email:
|
36
|
+
email: michael@grosser.it
|
27
37
|
executables: []
|
28
38
|
|
29
39
|
extensions: []
|
30
40
|
|
31
|
-
extra_rdoc_files:
|
32
|
-
|
41
|
+
extra_rdoc_files: []
|
42
|
+
|
33
43
|
files:
|
34
|
-
-
|
44
|
+
- Gemfile
|
45
|
+
- Gemfile.lock
|
35
46
|
- Rakefile
|
47
|
+
- Readme.md
|
36
48
|
- VERSION
|
37
49
|
- init.rb
|
38
50
|
- lib/sort_alphabetical.rb
|
39
51
|
- lib/sort_alphabetical/core_ext.rb
|
40
52
|
- sort_alphabetical.gemspec
|
41
|
-
- spec/README.markdown
|
42
53
|
- spec/sort_alphabetical_spec.rb
|
43
54
|
- spec/spec_helper.rb
|
44
55
|
has_rdoc: true
|
@@ -46,29 +57,34 @@ homepage: http://github.com/grosser/sort_alphabetical
|
|
46
57
|
licenses: []
|
47
58
|
|
48
59
|
post_install_message:
|
49
|
-
rdoc_options:
|
50
|
-
|
60
|
+
rdoc_options: []
|
61
|
+
|
51
62
|
require_paths:
|
52
63
|
- lib
|
53
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
54
66
|
requirements:
|
55
67
|
- - ">="
|
56
68
|
- !ruby/object:Gem::Version
|
69
|
+
hash: 3
|
70
|
+
segments:
|
71
|
+
- 0
|
57
72
|
version: "0"
|
58
|
-
version:
|
59
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
60
75
|
requirements:
|
61
76
|
- - ">="
|
62
77
|
- !ruby/object:Gem::Version
|
78
|
+
hash: 3
|
79
|
+
segments:
|
80
|
+
- 0
|
63
81
|
version: "0"
|
64
|
-
version:
|
65
82
|
requirements: []
|
66
83
|
|
67
84
|
rubyforge_project:
|
68
|
-
rubygems_version: 1.
|
85
|
+
rubygems_version: 1.6.2
|
69
86
|
signing_key:
|
70
87
|
specification_version: 3
|
71
88
|
summary: Sort UTF8 Strings alphabetical via Enumerable extension
|
72
|
-
test_files:
|
73
|
-
|
74
|
-
- spec/sort_alphabetical_spec.rb
|
89
|
+
test_files: []
|
90
|
+
|
data/spec/README.markdown
DELETED