mh_extensions 0.1.5.9 → 0.1.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,5 @@
1
+ = Version 0.1.6.0
2
+ * Moved to Babosa when trimming for to_url method
1
3
  = Version 0.1.5.9
2
4
  * Fix for undefined method `length' for 0:Fixnum
3
5
  = Version 0.1.5.8
data/Rakefile CHANGED
@@ -3,11 +3,12 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('mh_extensions', '0.1.5.9') do |p|
6
+ Echoe.new('mh_extensions', '0.1.6.0') do |p|
7
7
  p.description = "Package of usefull ruby basic classes (and not only) extensions"
8
8
  p.url = "https://github.com/mensfeld/MH-Extensions"
9
9
  p.author = "Maciej Mensfeld"
10
10
  p.email = "maciej@mensfeld.pl"
11
+ p.dependencies = ["babosa"]
11
12
  p.ignore_pattern = ["tmp/*", "script/*"]
12
13
  end
13
14
 
data/lib/string.rb CHANGED
@@ -9,22 +9,7 @@ class String
9
9
  # Zwraca strina bez polskich literek, z małej litery, z usuniętymi innymi
10
10
  # znakami oraz z zamienioną spacją na pauze (-)
11
11
  def to_url
12
- temp = self.downcase
13
- temp
14
- temp.gsub!(/[âäàãáäå�?ăąǎǟǡǻ�?ȃȧẵặ]/,'a')
15
- temp.gsub!(/[ëêéèẽēĕėẻȅȇẹȩęḙḛ�?ếễểḕḗệ�?]/,'e')
16
- temp.gsub!(/[�?iìíîĩīĭïỉ�?ịįȉȋḭɨḯ]/,'i')
17
- temp.gsub!(/[òóôõ�?�?ȯö�?őǒ�?�?ơǫ�?ɵøồốỗổȱȫȭ�?�?ṑṓ�?ớỡởợǭộǿ]/,'o')
18
- temp.gsub!(/[ùúûũūŭüủůűǔȕȗưụṳųṷṵṹṻǖǜǘǖǚừứữửự]/,'u')
19
- temp.gsub!(/[ỳýŷỹȳ�?ÿỷẙƴỵ]/,'y')
20
- temp.gsub!(/[ñǹń]/,'n')
21
- temp.gsub!(/[çć]/,'c')
22
- temp.gsub!(/[ß]/,'ss')
23
- temp.gsub!(/[œ]/,'oe')
24
- temp.gsub!(/[ij]/,'ij')
25
- temp.gsub!(/[�?ł]/,'l')
26
- temp.gsub!(/[ś]/,'s')
27
- temp.gsub!(/[źż]/,'z')
12
+ temp = self.downcase.to_slug.transliterate.to_s
28
13
  temp.gsub!(/[^a-zA-Z 0-9]/, "")
29
14
  temp.gsub!(/\s/,'-')
30
15
  temp.gsub!(/\-+$/,'')
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mh_extensions}
5
- s.version = "0.1.5.9"
5
+ s.version = "0.1.6.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = [%q{Maciej Mensfeld}]
9
- s.date = %q{2011-08-22}
9
+ s.date = %q{2011-12-07}
10
10
  s.description = %q{Package of usefull ruby basic classes (and not only) extensions}
11
11
  s.email = %q{maciej@mensfeld.pl}
12
12
  s.extra_rdoc_files = [%q{CHANGELOG.rdoc}, %q{README.md}, %q{lib/activerecord_ext.rb}, %q{lib/acts_as_tree_ext.rb}, %q{lib/array.rb}, %q{lib/browser_detector.rb}, %q{lib/date_ext.rb}, %q{lib/hash.rb}, %q{lib/mh_extensions.rb}, %q{lib/rand.rb}, %q{lib/range.rb}, %q{lib/string.rb}, %q{lib/txt_file_handler.rb}]
@@ -22,8 +22,11 @@ Gem::Specification.new do |s|
22
22
  s.specification_version = 3
23
23
 
24
24
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
25
+ s.add_runtime_dependency(%q<babosa>, [">= 0"])
25
26
  else
27
+ s.add_dependency(%q<babosa>, [">= 0"])
26
28
  end
27
29
  else
30
+ s.add_dependency(%q<babosa>, [">= 0"])
28
31
  end
29
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mh_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5.9
4
+ version: 0.1.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,19 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-22 00:00:00.000000000Z
13
- dependencies: []
12
+ date: 2011-12-07 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: babosa
16
+ requirement: &22053160 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *22053160
14
25
  description: Package of usefull ruby basic classes (and not only) extensions
15
26
  email: maciej@mensfeld.pl
16
27
  executables: []