sort_alphabetical 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source :rubygems
2
+
3
+ gem 'activesupport', ENV['RAILS']
4
+
5
+ group :dev do
6
+ gem 'rake'
7
+ gem 'rspec', '~>2'
8
+ gem 'jeweler'
9
+ end
@@ -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 => :spec
2
- require 'spec/rake/spectask'
3
- Spec::Rake::SpecTask.new {|t| t.spec_opts = ['--color']}
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 = project_name
9
+ gem.name = 'sort_alphabetical'
10
10
  gem.summary = "Sort UTF8 Strings alphabetical via Enumerable extension"
11
- gem.email = "grosser.michael@gmail.com"
12
- gem.homepage = "http://github.com/grosser/#{project_name}"
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: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
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: `script/plugin install git://github.com/grosser/sort_alphabetical.git `
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://pragmatig.wordpress.com)
26
- grosser.michael@gmail.com
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
1
+ 0.1.2
@@ -1,5 +1,14 @@
1
- require 'rubygems'
2
- require 'active_support'
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
- if defined? ActiveSupport::Multibyte::Handlers #pre ActiveSupport 2.3
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
@@ -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 the gemspec command
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.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{2009-11-22}
13
- s.email = %q{grosser.michael@gmail.com}
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
- "README.markdown",
19
- "Rakefile",
20
- "VERSION",
21
- "init.rb",
22
- "lib/sort_alphabetical.rb",
23
- "lib/sort_alphabetical/core_ext.rb",
24
- "sort_alphabetical.gemspec",
25
- "spec/README.markdown",
26
- "spec/sort_alphabetical_spec.rb",
27
- "spec/spec_helper.rb"
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.3.5}
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::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
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"])
@@ -1,2 +1,3 @@
1
1
  $LOAD_PATH << 'lib'
2
- require 'sort_alphabetical'
2
+ require 'sort_alphabetical'
3
+ require 'active_support/core_ext/kernel/reporting' # silence_warnings
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
- version: 0.1.1
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: 2009-11-22 00:00:00 +01:00
18
+ date: 2011-09-08 00:00:00 +02:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
- name: activesupport
17
- type: :runtime
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
- version:
31
+ type: :runtime
32
+ name: activesupport
33
+ version_requirements: *id001
34
+ prerelease: false
25
35
  description:
26
- email: grosser.michael@gmail.com
36
+ email: michael@grosser.it
27
37
  executables: []
28
38
 
29
39
  extensions: []
30
40
 
31
- extra_rdoc_files:
32
- - README.markdown
41
+ extra_rdoc_files: []
42
+
33
43
  files:
34
- - README.markdown
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
- - --charset=UTF-8
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.3.5
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
- - spec/spec_helper.rb
74
- - spec/sort_alphabetical_spec.rb
89
+ test_files: []
90
+
@@ -1,2 +0,0 @@
1
- Autotest will not work here, since both activesupport 2.1.1 and 2.3 are tested for individually.
2
- Simply run `rake`