sape 0.1.3 → 0.1.4
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/lib/app/helpers/sape_helper.rb +1 -1
- data/lib/generators/sape/templates/migration.rb +2 -2
- data/lib/sape/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fa574ed4c40af1747da53671206439a965f58d62
|
|
4
|
+
data.tar.gz: cccb9aa17fdffe735d12459d4324f1a31ebb1da4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9161b2e93cd973d729cdeeaf9f7085b97ef6fc0f19f801dc1ae82b960ae50c300c5812ea06f90d01d793462d1975b089dbf2f28d07490af185bd77d17e881016
|
|
7
|
+
data.tar.gz: f2dedcc6c60a0a9e426579af34ed640190dd5095fe8fab3d7d23a23f83ef917375a133c1c9add04138c9bb5e16de36cfb583ab8624042b8f66c342805a56f452
|
|
@@ -25,7 +25,7 @@ module SapeHelper
|
|
|
25
25
|
def sape_context_links(text)
|
|
26
26
|
request.original_fullpath.chomp!("/") if request.original_fullpath.last == "/" && request.original_fullpath != '/'
|
|
27
27
|
SapeLink.where(page: request.original_fullpath, link_type: "context").each do |link|
|
|
28
|
-
text.
|
|
28
|
+
text.sub!(link.anchor, link.raw_link)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
if SapeConfig.bot_ips.include?(request.remote_addr)
|
|
@@ -2,7 +2,7 @@ class CreateSapeStorage < ActiveRecord::Migration
|
|
|
2
2
|
def change
|
|
3
3
|
create_table :sape_configs do |t|
|
|
4
4
|
t.string :name
|
|
5
|
-
t.
|
|
5
|
+
t.text :value, limit: 500
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
create_table :sape_links do |t|
|
|
@@ -10,7 +10,7 @@ class CreateSapeStorage < ActiveRecord::Migration
|
|
|
10
10
|
t.string :anchor
|
|
11
11
|
t.string :url
|
|
12
12
|
t.string :host
|
|
13
|
-
t.
|
|
13
|
+
t.text :raw_link, limit: 500
|
|
14
14
|
t.string :link_type
|
|
15
15
|
end
|
|
16
16
|
add_index :sape_links, [:link_type, :page]
|
data/lib/sape/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sape
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Rodionov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-08-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|