card 1.94.0 → 1.94.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8108ea9c272fbf1d35f39674c2fabc4f422154b9
4
- data.tar.gz: 1c554ea42be6ddfded470c10d9c32baf1ddd686a
3
+ metadata.gz: f3ca3b7eaa9bd81779580b0bd0af44962626f33f
4
+ data.tar.gz: 00afc9df0235f7fabb5bf9251f5fe5b67cb7d0b7
5
5
  SHA512:
6
- metadata.gz: '019228759816d0c42326e921ecfbd1393328b6e20c7e01fcc5f894593699481b87b604976b5a9ffaf23bbcee9295aa1d2c059089a6db0f6b43b87ff8c0a0cf8d'
7
- data.tar.gz: 0c75e8da55c96f4b98f43e26c23666eeb8d832b434993f60cd55f541f79590ba3cd1bff1ab9e562474b7afc62ab68d2b75e6940fe1bd383fe03555d7b64695a0
6
+ metadata.gz: 9a01438a0367485b3fbecb1fa1e3287b569bb55809057a88ed0b7b33c9db75d9e062bc0d59b6d1a83a1783103730a545ae7eefa105434a10692aaef89306d509
7
+ data.tar.gz: a7c69a3a943ccd49feee5e7772260dee852a9d4d0a6ccc2e669e2f26cc7ed6161c426906cd98a8d59d0b9a4c1ae4f6f5add6024b9ddd121498c1fb73c2261531
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -3,9 +3,7 @@
3
3
  - :name: "*header"
4
4
  :type: HTML
5
5
  :key: "*header"
6
- :merged: 2017-11-28 20:30:36 UTC
7
6
  - :name: "*main menu"
8
7
  :type: HTML
9
8
  :key: "*main_menu"
10
- :merged: 2017-11-28 20:30:36 UTC
11
9
  :remotes: {}
@@ -110,6 +110,19 @@ class Card
110
110
  run_subdirector_stages :integrate_with_delay
111
111
  end
112
112
 
113
+ def rerun_up_to_current_stage
114
+ old_stage = @stage
115
+ reset_stage
116
+ catch_up_to_stage old_stage if old_stage
117
+ end
118
+
119
+ def replace_card card
120
+ card.action = @card.action
121
+ card.director = self
122
+ @card = card
123
+ rerun_up_to_current_stage
124
+ end
125
+
113
126
  def reset_stage
114
127
  @stage = -1
115
128
  end
@@ -19,6 +19,7 @@ class Card
19
19
  card = card.card if card.is_a? StageDirector
20
20
  each { |dir| return dir if dir.card == card }
21
21
  dir = ActManager.fetch card, parent: @parent
22
+ dir.replace_card card if dir.card != card
22
23
  dir.main = false
23
24
  dir.parent = @parent
24
25
  dir.transact_in_stage = opts[:transact_in_stage]
@@ -32,8 +32,10 @@ class Card
32
32
  end
33
33
 
34
34
  def title_in_context title=nil
35
+ keep_safe = title&.html_safe?
35
36
  title = title ? title.to_name.absolute_name(card.name) : card.name
36
- title.from *context_names
37
+ newtitle = title.from *context_names
38
+ keep_safe ? newtitle.html_safe : newtitle
37
39
  end
38
40
  end
39
41
  end
@@ -31,6 +31,9 @@ class Card
31
31
 
32
32
  def write_attributes
33
33
  File.write @path, @data.to_yaml
34
+ rescue SystemCallError
35
+ false
36
+ # card.yml not written
34
37
  end
35
38
 
36
39
  def read_attributes
@@ -5,8 +5,9 @@ format do
5
5
  end
6
6
 
7
7
  # NAME VIEWS
8
+
8
9
  view :name, closed: true, perms: :none do
9
- name_variant card.name
10
+ name_variant safe_name
10
11
  end
11
12
 
12
13
  def safe_name
@@ -23,7 +23,7 @@ end
23
23
 
24
24
  def add_item item
25
25
  return if include_item? item
26
- self.content = "#{content}\n#{name}"
26
+ self.content = "#{content}\n#{item}"
27
27
  end
28
28
 
29
29
  def drop_item item
@@ -1,6 +1,6 @@
1
1
  format :html do
2
2
  view :title do
3
- title = wrapped_title(super())
3
+ title = wrapped_title super()
4
4
  title = link_to_card card.name, title if show_view? :title_link, :hide
5
5
  add_name_context
6
6
  title
@@ -14,22 +14,17 @@ format :html do
14
14
  link_to_card card.name, link_text
15
15
  end
16
16
 
17
- view :name do
18
- h(super())
19
- end
20
-
21
17
  def safe_name
22
18
  h super
23
19
  end
24
20
 
25
- def title_in_context title=nil
21
+ def title_in_context _title=nil
26
22
  h super
27
23
  end
28
24
 
29
25
  def wrapped_title title
30
26
  wrap_with :span, class: classy("card-title") do
31
- escaped_parts = title.to_name.parts.map { |part| h part }
32
- escaped_parts.join wrapped_joint
27
+ title.to_name.parts.join wrapped_joint
33
28
  end
34
29
  end
35
30
 
@@ -48,8 +48,6 @@ def add_items items
48
48
  end
49
49
  end
50
50
 
51
-
52
-
53
51
  def content
54
52
  Card::Cache[Card::Set::Type::ListedBy].fetch(key) do
55
53
  generate_content
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.94.0
4
+ version: 1.94.1
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-03-20 00:00:00.000000000 Z
14
+ date: 2018-03-23 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.4.0
22
+ version: 0.4.1
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.4.0
29
+ version: 0.4.1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: haml
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -251,6 +251,20 @@ dependencies:
251
251
  - - '='
252
252
  - !ruby/object:Gem::Version
253
253
  version: 5.11.2
254
+ - !ruby/object:Gem::Dependency
255
+ name: rake
256
+ requirement: !ruby/object:Gem::Requirement
257
+ requirements:
258
+ - - "<="
259
+ - !ruby/object:Gem::Version
260
+ version: 12.3.0
261
+ type: :runtime
262
+ prerelease: false
263
+ version_requirements: !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - "<="
266
+ - !ruby/object:Gem::Version
267
+ version: 12.3.0
254
268
  description: Cards are wiki-inspired data atoms."Carditects" use links, nests, types,
255
269
  patterned names, queries, views, events, and rules to create rich structures.
256
270
  email: