stringex 1.0.3 → 1.1.0

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.
@@ -35,7 +35,8 @@ module LuckySneaks
35
35
  if options[:sync_url]
36
36
  before_validation :ensure_unique_url
37
37
  else
38
- before_validation_on_create :ensure_unique_url
38
+ # defined?(ActiveSupport::Callbacks) ? before_validation(:ensure_unique_url, :on => :create) :
39
+ before_validation_on_create(:ensure_unique_url)
39
40
  end
40
41
 
41
42
  self.attribute_to_urlify = attribute
@@ -13,8 +13,8 @@ module LuckySneaks
13
13
  # You're probably better off just using the added String#to_ascii
14
14
  def decode(string)
15
15
  string.gsub(/[^\x00-\x7f]/u) do |codepoint|
16
- unpacked = codepoint.unpack("U")[0]
17
16
  begin
17
+ unpacked = codepoint.unpack("U")[0]
18
18
  CODEPOINTS[code_group(unpacked)][grouped_point(unpacked)]
19
19
  rescue
20
20
  # Hopefully this won't come up much
@@ -170,7 +170,7 @@
170
170
  - '"'
171
171
  - (c)
172
172
  - a
173
- - <<
173
+ - '<<'
174
174
  - '!'
175
175
  - ''
176
176
  - (r)
@@ -220,7 +220,7 @@
220
220
  - U
221
221
  - U
222
222
  - U
223
- - U
223
+ - Y
224
224
  - Th
225
225
  - ss
226
226
  - a
@@ -18,8 +18,8 @@
18
18
  - '-'
19
19
  - '-'
20
20
  - '-'
21
- - '-'
22
- - --
21
+ - '--'
22
+ - ---
23
23
  - --
24
24
  - '||'
25
25
  - _
@@ -9,7 +9,7 @@
9
9
  - 0
10
10
  - <
11
11
  - '>'
12
- - <<
12
+ - '<<'
13
13
  - '>> '
14
14
  - '['
15
15
  - '] '
@@ -65,7 +65,7 @@
65
65
  - '(Xie) '
66
66
  - '(Ji) '
67
67
  - '(Xiu) '
68
- - <<
68
+ - '<<'
69
69
  - '>>'
70
70
  - '[?]'
71
71
  - '[?]'
@@ -60,7 +60,7 @@
60
60
  - '] '
61
61
  - '[('
62
62
  - ')] '
63
- - <<
63
+ - '<<'
64
64
  - '>> '
65
65
  - <
66
66
  - '> '
data/stringex.gemspec CHANGED
@@ -1,12 +1,15 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{stringex}
5
- s.version = "1.0.3"
8
+ s.version = "1.1.0"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
11
  s.authors = ["Russell Norris"]
9
- s.date = %q{2009-08-20}
12
+ s.date = %q{2009-10-12}
10
13
  s.description = %q{Some [hopefully] useful extensions to Ruby’s String class. Stringex is made up of three libraries: ActsAsUrl [permalink solution with better character translation], Unidecoder [Unicode to Ascii transliteration], and StringExtensions [miscellaneous helper methods for the String class].}
11
14
  s.email = %q{rsl@luckysneaks.com}
12
15
  s.extra_rdoc_files = [
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  require File.join(File.dirname(__FILE__), '../init')
15
15
 
16
- ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :dbfile => "acts_as_url.sqlite3")
16
+ ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => "acts_as_url.sqlite3")
17
17
 
18
18
  ActiveRecord::Migration.verbose = false
19
19
  ActiveRecord::Schema.define(:version => 1) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stringex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Norris
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-20 00:00:00 -04:00
12
+ date: 2009-10-12 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15