acts_more_seo 1.1.0 → 1.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 +4 -4
- data/CHANGELOG.rdoc +2 -0
- data/Gemfile.lock +51 -0
- data/Manifest +2 -0
- data/Rakefile +1 -1
- data/acts_more_seo.gemspec +3 -3
- data/lib/string_ext.rb +30 -0
- metadata +4 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 365d06cf5584eccbaa8135d3a47d89dd23a96c46
|
|
4
|
+
data.tar.gz: 9508153ac3d970b90f7a088da4157beca63d7f48
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1181b99930d7903d6d4d341eac641f66a2d1486a2edba3b4189455185b41e704ff79d3750cf1a2731eb46a48418dc53450183141667dfae8416eaa810f922e96
|
|
7
|
+
data.tar.gz: 7f1f38c4e24de749273be153105212c0328eaa5e04b894844bbd602f45f8c3145c50d2cca2ae08fd242bdd3ce7da509d179e690024119579990bde64f118fa3b
|
data/CHANGELOG.rdoc
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
acts_more_seo (1.1.1)
|
|
5
|
+
babosa
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: http://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
activemodel (4.0.0)
|
|
11
|
+
activesupport (= 4.0.0)
|
|
12
|
+
builder (~> 3.1.0)
|
|
13
|
+
activerecord (4.0.0)
|
|
14
|
+
activemodel (= 4.0.0)
|
|
15
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
|
16
|
+
activesupport (= 4.0.0)
|
|
17
|
+
arel (~> 4.0.0)
|
|
18
|
+
activerecord-deprecated_finders (1.0.3)
|
|
19
|
+
activesupport (4.0.0)
|
|
20
|
+
i18n (~> 0.6, >= 0.6.4)
|
|
21
|
+
minitest (~> 4.2)
|
|
22
|
+
multi_json (~> 1.3)
|
|
23
|
+
thread_safe (~> 0.1)
|
|
24
|
+
tzinfo (~> 0.3.37)
|
|
25
|
+
arel (4.0.0)
|
|
26
|
+
atomic (1.1.10)
|
|
27
|
+
babosa (0.3.11)
|
|
28
|
+
builder (3.1.4)
|
|
29
|
+
diff-lcs (1.2.4)
|
|
30
|
+
i18n (0.6.4)
|
|
31
|
+
minitest (4.7.5)
|
|
32
|
+
multi_json (1.7.7)
|
|
33
|
+
rspec (2.13.0)
|
|
34
|
+
rspec-core (~> 2.13.0)
|
|
35
|
+
rspec-expectations (~> 2.13.0)
|
|
36
|
+
rspec-mocks (~> 2.13.0)
|
|
37
|
+
rspec-core (2.13.1)
|
|
38
|
+
rspec-expectations (2.13.0)
|
|
39
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
|
40
|
+
rspec-mocks (2.13.1)
|
|
41
|
+
thread_safe (0.1.0)
|
|
42
|
+
atomic
|
|
43
|
+
tzinfo (0.3.37)
|
|
44
|
+
|
|
45
|
+
PLATFORMS
|
|
46
|
+
ruby
|
|
47
|
+
|
|
48
|
+
DEPENDENCIES
|
|
49
|
+
activerecord (>= 4.0.0, < 4.1)
|
|
50
|
+
acts_more_seo!
|
|
51
|
+
rspec (>= 2.0.0)
|
data/Manifest
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
CHANGELOG.rdoc
|
|
2
2
|
Gemfile
|
|
3
|
+
Gemfile.lock
|
|
3
4
|
MIT-LICENSE
|
|
4
5
|
Manifest
|
|
5
6
|
README.md
|
|
@@ -12,5 +13,6 @@ lib/generators/acts_more_seo/templates/create_seo_history_migration.rb
|
|
|
12
13
|
lib/seo_finder.rb
|
|
13
14
|
lib/seo_formatter.rb
|
|
14
15
|
lib/seo_history.rb
|
|
16
|
+
lib/string_ext.rb
|
|
15
17
|
spec/acts_more_seo_spec.rb
|
|
16
18
|
spec/spec_helper.rb
|
data/Rakefile
CHANGED
|
@@ -3,7 +3,7 @@ require 'rubygems'
|
|
|
3
3
|
require 'rake'
|
|
4
4
|
require 'echoe'
|
|
5
5
|
|
|
6
|
-
Echoe.new('acts_more_seo', '1.1.
|
|
6
|
+
Echoe.new('acts_more_seo', '1.1.1') do |p|
|
|
7
7
|
p.description = "Gem makes your ActiveRecord models more SEO friendly. Changes URL to look way better"
|
|
8
8
|
p.url = "https://github.com/mensfeld/Acts-more-SEO"
|
|
9
9
|
p.author = "Maciej Mensfeld"
|
data/acts_more_seo.gemspec
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = "acts_more_seo"
|
|
5
|
-
s.version = "1.1.
|
|
5
|
+
s.version = "1.1.1"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Maciej Mensfeld"]
|
|
9
9
|
s.date = "2013-11-06"
|
|
10
10
|
s.description = "Gem makes your ActiveRecord models more SEO friendly. Changes URL to look way better"
|
|
11
11
|
s.email = "maciej@mensfeld.pl"
|
|
12
|
-
s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.md", "lib/acts_more_seo.rb", "lib/generators/acts_more_seo/install_generator.rb", "lib/generators/acts_more_seo/templates/create_seo_history_migration.rb", "lib/seo_finder.rb", "lib/seo_formatter.rb", "lib/seo_history.rb"]
|
|
13
|
-
s.files = ["CHANGELOG.rdoc", "Gemfile", "MIT-LICENSE", "Manifest", "README.md", "Rakefile", "acts_more_seo.gemspec", "init.rb", "lib/acts_more_seo.rb", "lib/generators/acts_more_seo/install_generator.rb", "lib/generators/acts_more_seo/templates/create_seo_history_migration.rb", "lib/seo_finder.rb", "lib/seo_formatter.rb", "lib/seo_history.rb", "spec/acts_more_seo_spec.rb", "spec/spec_helper.rb"]
|
|
12
|
+
s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.md", "lib/acts_more_seo.rb", "lib/generators/acts_more_seo/install_generator.rb", "lib/generators/acts_more_seo/templates/create_seo_history_migration.rb", "lib/seo_finder.rb", "lib/seo_formatter.rb", "lib/seo_history.rb", "lib/string_ext.rb"]
|
|
13
|
+
s.files = ["CHANGELOG.rdoc", "Gemfile", "Gemfile.lock", "MIT-LICENSE", "Manifest", "README.md", "Rakefile", "acts_more_seo.gemspec", "init.rb", "lib/acts_more_seo.rb", "lib/generators/acts_more_seo/install_generator.rb", "lib/generators/acts_more_seo/templates/create_seo_history_migration.rb", "lib/seo_finder.rb", "lib/seo_formatter.rb", "lib/seo_history.rb", "lib/string_ext.rb", "spec/acts_more_seo_spec.rb", "spec/spec_helper.rb"]
|
|
14
14
|
s.homepage = "https://github.com/mensfeld/Acts-more-SEO"
|
|
15
15
|
s.rdoc_options = ["--line-numbers", "--title", "Acts_more_seo", "--main", "README.md"]
|
|
16
16
|
s.require_paths = ["lib"]
|
data/lib/string_ext.rb
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# Required string extensions
|
|
4
|
+
|
|
5
|
+
class String
|
|
6
|
+
# Removes any "not url friendly" stuff and returns "pure" url
|
|
7
|
+
def to_url
|
|
8
|
+
temp = self.to_slug.transliterate.to_s.downcase
|
|
9
|
+
temp.gsub!(/[^a-zA-Z 0-9]/, "")
|
|
10
|
+
temp.gsub!(/\s/,'-')
|
|
11
|
+
temp.gsub!(/\-+$/,'')
|
|
12
|
+
temp.gsub!(/^\-+/,'')
|
|
13
|
+
temp.gsub!(/\-{2,}/, '-')
|
|
14
|
+
temp
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def to_url!
|
|
18
|
+
self.replace self.to_url
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Change new line to html <br/>
|
|
22
|
+
def nl2br
|
|
23
|
+
self.gsub("\n\r","<br>").gsub("\r", "").gsub("\n", "<br />")
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def nl2br!
|
|
27
|
+
self.replace self.nl2br
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acts_more_seo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maciej Mensfeld
|
|
@@ -66,9 +66,11 @@ extra_rdoc_files:
|
|
|
66
66
|
- lib/seo_finder.rb
|
|
67
67
|
- lib/seo_formatter.rb
|
|
68
68
|
- lib/seo_history.rb
|
|
69
|
+
- lib/string_ext.rb
|
|
69
70
|
files:
|
|
70
71
|
- CHANGELOG.rdoc
|
|
71
72
|
- Gemfile
|
|
73
|
+
- Gemfile.lock
|
|
72
74
|
- MIT-LICENSE
|
|
73
75
|
- Manifest
|
|
74
76
|
- README.md
|
|
@@ -81,6 +83,7 @@ files:
|
|
|
81
83
|
- lib/seo_finder.rb
|
|
82
84
|
- lib/seo_formatter.rb
|
|
83
85
|
- lib/seo_history.rb
|
|
86
|
+
- lib/string_ext.rb
|
|
84
87
|
- spec/acts_more_seo_spec.rb
|
|
85
88
|
- spec/spec_helper.rb
|
|
86
89
|
homepage: https://github.com/mensfeld/Acts-more-SEO
|