card 1.93.11 → 1.93.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/card/env/success.rb +1 -1
- data/mod/account/set/type/user.rb +1 -1
- data/mod/core/set/all/rules.rb +0 -6
- data/mod/core/spec/format/html_format_spec.rb +1 -1
- data/mod/pointer/set/abstract/02_pointer.rb +9 -2
- data/mod/search/set/self/navbox.rb +1 -1
- data/mod/standard/set/all/rich_html/form_elements.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e72652d9310645908db02675e5c91fb124101d7
|
4
|
+
data.tar.gz: 3af5b0c51954f0e16a2d445d1d9b51c845857dc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 203c7f479d04d566c10e8d68b6bc35d8f5e058da6b8e23c52ac68fbee1a3d18c60a314ca444c63a14cfbc95a5d36e8328b8236c159a2cd642d7be52d874f7d9a
|
7
|
+
data.tar.gz: 91ed62e15d4870e8ad7a8edbaf560353038262f15d6692bfc75ba79c3301dbfd1494143a1172e52731cedecfa8d75fa1fb46a08428582977d774672dfe249302
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.12
|
data/lib/card/env/success.rb
CHANGED
@@ -73,7 +73,7 @@ class Card
|
|
73
73
|
when "" then ""
|
74
74
|
when "*previous", :previous then :previous
|
75
75
|
when %r{^(http|/)} then value
|
76
|
-
when /^TEXT:\s*(.+)/ then
|
76
|
+
when /^TEXT:\s*(.+)/ then Regexp.last_match(1)
|
77
77
|
when /^REDIRECT:\s*(.+)/
|
78
78
|
@redirect = true
|
79
79
|
process_target Regexp.last_match(1)
|
data/mod/core/set/all/rules.rb
CHANGED
@@ -146,12 +146,6 @@ module ClassMethods
|
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
|
-
def path_setting name # shouldn't this be in location helper?
|
150
|
-
name ||= "/"
|
151
|
-
return name if name =~ /^(http|mailto)/
|
152
|
-
"#{Card.config.relative_url_root}#{name}"
|
153
|
-
end
|
154
|
-
|
155
149
|
def toggle val
|
156
150
|
val.to_s.strip == "1"
|
157
151
|
end
|
@@ -34,7 +34,7 @@ RSpec.describe Card::Format::HtmlFormat do
|
|
34
34
|
is_expected.to have_tag "header" do
|
35
35
|
with_tag 'a.nav-link.internal-link[href="/"]', text: "Home"
|
36
36
|
with_tag 'a.nav-link.internal-link[href="/:recent"]', text: "Recent"
|
37
|
-
with_tag 'form.navbox-form[action="
|
37
|
+
with_tag 'form.navbox-form[action="/*search"]' do
|
38
38
|
with_tag 'input[name="_keyword"]'
|
39
39
|
end
|
40
40
|
end
|
@@ -179,6 +179,10 @@ def item args={}
|
|
179
179
|
item_names(args).first
|
180
180
|
end
|
181
181
|
|
182
|
+
def count
|
183
|
+
all_raw_items.size
|
184
|
+
end
|
185
|
+
|
182
186
|
def item_names args={}
|
183
187
|
raw_items(args[:content], args[:limit], args[:offset]).map do |item|
|
184
188
|
polish_item item, args[:context]
|
@@ -186,13 +190,16 @@ def item_names args={}
|
|
186
190
|
end
|
187
191
|
|
188
192
|
def raw_items content, limit, offset
|
189
|
-
|
190
|
-
items = content.to_s.split(/\n+/)
|
193
|
+
items = all_raw_items content
|
191
194
|
limit = limit.to_i
|
192
195
|
return items unless limit.positive?
|
193
196
|
items[offset.to_i, limit] || []
|
194
197
|
end
|
195
198
|
|
199
|
+
def all_raw_items content=nil
|
200
|
+
(content || self.content).to_s.split(/\n+/)
|
201
|
+
end
|
202
|
+
|
196
203
|
def polish_item item, context
|
197
204
|
item = strip_item(item).to_name
|
198
205
|
return item if context == :raw
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.93.
|
4
|
+
version: 1.93.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-
|
14
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: cardname
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.3.
|
22
|
+
version: 0.3.12
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.3.
|
29
|
+
version: 0.3.12
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: haml
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|