sape 0.1.0 → 0.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/README.md +3 -0
- data/lib/app/helpers/sape_helper.rb +3 -3
- data/lib/sape/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de0b6325493783f031e9d6a9a248917eda5a7af5
|
4
|
+
data.tar.gz: d9de9812d104864e8c9bb8ec9d538ab14be46c84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 399aa172b2b637fe0665fd5011c6b570f97923ad897a2ccd2558a0f767bd169abbd60dfe7a5230ec92c166e6def8a842032fd523eb5dcca222d9de61e2d002cf
|
7
|
+
data.tar.gz: 9289073db8e00ddaf2fb34c142cbb350ed356c98f1f51277ec3981c5fc27439483c3678e73378293ef12e5c5cae7573cca9f358423009354cb8aae9cf165a0e1
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module SapeHelper
|
2
2
|
def sape_links_block
|
3
|
-
options = { links: SapeLink.where(page: request.original_fullpath, link_type: "simple") }
|
3
|
+
options = { links: SapeLink.where(page: request.original_fullpath.chomp("/"), link_type: "simple") }
|
4
4
|
if SapeConfig.bot_ips.include?(request.remote_addr)
|
5
5
|
options.merge!(check_code: SapeConfig.check_code)
|
6
6
|
end
|
@@ -11,7 +11,7 @@ module SapeHelper
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def sape_links
|
14
|
-
links = SapeLink.where(page: request.original_fullpath, link_type: "simple").
|
14
|
+
links = SapeLink.where(page: request.original_fullpath.chomp("/"), link_type: "simple").
|
15
15
|
pluck(:raw_link).
|
16
16
|
join(SapeConfig.delimiter)
|
17
17
|
|
@@ -21,7 +21,7 @@ module SapeHelper
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def sape_context_links(text)
|
24
|
-
SapeLink.where(page: request.original_fullpath, link_type: "context").each do |link|
|
24
|
+
SapeLink.where(page: request.original_fullpath.chomp("/"), link_type: "context").each do |link|
|
25
25
|
text.gsub!(link.anchor, link.raw_link)
|
26
26
|
end
|
27
27
|
|
data/lib/sape/version.rb
CHANGED