card 1.109.0 → 1.109.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ae89c5e6253fdbcea6b9ea9e1a5ca94b8f22f0c13c47186d8a2d66d6bfb525b
4
- data.tar.gz: babc949cb5a33a9385369e62136b60591e96ac03b09a06660bce43d30165cfce
3
+ metadata.gz: bbc2d91a4b4e085e2dd391ba227f58cefe096a055354fb5850d5a983db9b389f
4
+ data.tar.gz: 0c8ced971a5730ae8f4898b967fb3063beb0ba4415957ead6c963619eabd7674
5
5
  SHA512:
6
- metadata.gz: f70439a264188fa2f734ddf9ce6cbd8f7ca790bfcddde0c0accf8a2ffa9d2c575c90220d848678c7f1ac965e734ecf4a4d30e33aaed5b41345958210cd24db84
7
- data.tar.gz: 6ff17cfaf5b5a7af5fcca9f95693b083b81aa781de06c244356c8b7e397e4621e7784995613252dae2c2d78406f0347f0977212cf91c79cd77c1b9917813e6ee
6
+ metadata.gz: 8e92113ce1c6777355ba6f4e0d81936c0b2a80ff8718b50acca6782b9f029268e087183fc2a77c179805a4bb7e12a3b54f025acab6acde19df470f2215e51d1d
7
+ data.tar.gz: abba860d2387151ba48e3690fddb88c552e31c7770aa7a37fc75006db47f667a422a8632950e2e162742428f461144330a4d0e2487637c99889312106a07d18c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.19.0
1
+ 0.19.1
@@ -133,7 +133,7 @@ es:
133
133
  type:
134
134
  error_cant_change_errors: "de %{name} no se puede cambiar; creando nuevos errores %{type_id}: %{error_messages}"
135
135
  error_no_such_type: No hay tal tipo
136
- error_hard_templated: no se puede cambiar porque %{name} es una plantilla dificil de %{type_name}
136
+ error_structured: no se puede cambiar porque %{name} es una plantilla dificil de %{type_name}
137
137
  utils:
138
138
  exception_almost_deleted: Se evitó de forma muy estrecha eliminar el archivo actual
139
139
  set_pattern:
@@ -302,8 +302,7 @@ es:
302
302
  unsupported_view: vista (%{view}) no soportado para %{cardname}
303
303
  not_found_named: No pudo encontrar %{cardname}.
304
304
  not_found_no_name: la tarjeta solicitada
305
- server_error: "\nWagn Hitch! Error del Servidor. Yuck, perdon por eso.\nPara decirnos más y seguir la solución,\nagregue un ticket de soporte en %{ticket_link}\n"
306
- se_hitch: 'Wagn Hitch :('
305
+ server_error: "\nError del Servidor. Yuck, perdon por eso.\nPara decirnos más y seguir la solución,\nagregue un ticket de soporte en %{ticket_link}\n"
307
306
  se_sorry: Error del Servidor. Yuck, perdón por eso.
308
307
  se_ticket: <a href="%{ticket_link}">Agregue un ticket de soporte</a> para decirnos más y seguir la solución.
309
308
  denial: Permiso denegado
data/db/seeds.rb CHANGED
@@ -7,7 +7,6 @@ Card::Cache.reset_all
7
7
 
8
8
  # get rid of bad constants
9
9
  Card::Codename.reset_cache
10
- Card::Codename.generate_id_constants
11
10
 
12
11
  # TODO: explain why this is necessary
13
12
  # (card:seed:build breaks without it)
@@ -36,7 +36,7 @@ class Card
36
36
  def signin cardish
37
37
  user_id = Card.id(cardish) || AnonymousID
38
38
  (session[session_user_key] = self.current_id = user_id).tap do
39
- Env.update_cookie_setting !signed_in?
39
+ Env.update_session_options
40
40
  end
41
41
  end
42
42
 
@@ -6,7 +6,7 @@ class Card
6
6
  # @return [true/false]
7
7
  def always_ok?
8
8
  case as_id
9
- when WagnBotID then true # cannot disable
9
+ when DeckoBotID then true # cannot disable
10
10
  when nil then false
11
11
  else
12
12
  always_ok_cached?
@@ -23,9 +23,9 @@ class Card
23
23
  end
24
24
  end
25
25
 
26
- # operate with the permissions of WagnBot (administrator)
26
+ # operate with the permissions of DeckoBot (administrator)
27
27
  def as_bot &block
28
- as Card::WagnBotID, &block
28
+ as Card::DeckoBotID, &block
29
29
  end
30
30
 
31
31
  # id of proxy user
@@ -41,8 +41,8 @@ class Card
41
41
  end
42
42
 
43
43
  def user_account_cql
44
- # every deck starts with two accounts: WagnBot and Anonymous
45
- { right: :account, creator_id: ["ne", Card::WagnBotID] }
44
+ # every deck starts with two accounts: DeckoBot and Anonymous
45
+ { right: :account, creator_id: ["ne", Card::DeckoBotID] }
46
46
  end
47
47
 
48
48
  def user_account_count
@@ -92,7 +92,7 @@ class Card
92
92
  def expire_id cache
93
93
  return unless id.present?
94
94
 
95
- cache.delete "~#{id}"
95
+ cache.delete id_string
96
96
  end
97
97
 
98
98
  def expire_view_cache_keys view_keys
data/lib/card/codename.rb CHANGED
@@ -81,6 +81,7 @@ class Card
81
81
  def reset_cache
82
82
  @codehash = nil
83
83
  ::Card.cache.delete "CODENAMES"
84
+ generate_id_constants
84
85
  end
85
86
 
86
87
  # @param codename [Symbol, String]
@@ -10,10 +10,10 @@ class Card
10
10
  end
11
11
 
12
12
  def save_location card
13
- return unless save_location?(card)
13
+ return unless save_location? card
14
14
 
15
- discard_locations_for card
16
- location_history.push location_for_history(card)
15
+ location = request ? request.original_url : location_for_history(card)
16
+ location_history.push(location).uniq!
17
17
  end
18
18
 
19
19
  def previous_location
@@ -21,11 +21,8 @@ class Card
21
21
  end
22
22
 
23
23
  def discard_locations_for card
24
- # quoting necessary because cards have things like "+*" in the names..
25
- session[:history] = location_history.reject do |loc|
26
- if (url_key = url_key_for_location(loc))
27
- url_key.to_name.key == card.key
28
- end
24
+ session[:history] = location_history.reject do |l|
25
+ location_cardname(l) == card.name
29
26
  end.compact
30
27
  end
31
28
 
@@ -43,11 +40,13 @@ class Card
43
40
  Env::Location.card_path card.name.url_key
44
41
  end
45
42
 
46
- def url_key_for_location location
47
- %r{/([^/]*$)} =~ location ? Regexp.last_match[1] : nil
43
+ def location_cardname location
44
+ URI.parse(location).path.sub(/^\//, "").sub(/\/.*$/, "")&.cardname
48
45
  end
49
46
 
50
47
  def save_location? card
48
+ # return false unless Auth.signed_in? || Cardio.config.allow_anonymous_cookies
49
+
51
50
  !Env.ajax? && Env.html? && card.known? && (card.codename != :signin)
52
51
  end
53
52
  end
@@ -22,16 +22,17 @@ class Card
22
22
  if session.is_a? Hash
23
23
  @session = {}
24
24
  elsif request
25
- update_cookie_setting false
25
+ update_session_options drop: false
26
26
  controller.reset_session
27
- # destroy_cookie unless Cardio.config.anonymous_cookies
27
+ # destroy_cookie unless Cardio.config.allow_anonymous_cookies
28
28
  end
29
29
  end
30
30
 
31
- def update_cookie_setting is_anonymous=true
32
- return unless request && !Cardio.config.anonymous_cookies
31
+ def update_session_options drop: nil
32
+ return unless request
33
+ return if Cardio.config.allow_anonymous_cookies
33
34
 
34
- request.session_options[:drop] = is_anonymous
35
+ request.session_options[:drop] = drop.nil? ? !Auth.signed_in? : drop
35
36
  end
36
37
 
37
38
  # private
@@ -17,8 +17,8 @@ class Card
17
17
 
18
18
  def view_for_unknown setting_view
19
19
  if main? && voo.root?
20
- root.error_status = 404
21
- :not_found
20
+ root.error_status = page_status_for_unknown
21
+ page_view_for_unknown
22
22
  else
23
23
  setting_view || :unknown
24
24
  end
@@ -39,11 +39,21 @@ class Card
39
39
  yield
40
40
  end
41
41
 
42
+ private
43
+
42
44
  def rescue_view e, view
43
45
  method = loud_error? ? :loud_error : :quiet_error
44
46
  send method, e, view
45
47
  end
46
48
 
49
+ def page_status_for_unknown
50
+ 404
51
+ end
52
+
53
+ def page_view_for_unknown
54
+ :not_found
55
+ end
56
+
47
57
  def error_cardname _exception
48
58
  if card&.name.present?
49
59
  safe_name
@@ -41,6 +41,57 @@ class Card
41
41
  add_debug_info view, method, rendered
42
42
  end
43
43
 
44
+ def pretty_path source_location
45
+ "#{source_location.first.gsub(%r{^.+mod\d+-([^/]+)},
46
+ '\1: ')}:#{source_location.second}"
47
+ end
48
+
49
+ # see {Abstract::Format}
50
+ # (:default), :yes, :deep, :always, :never
51
+ def view_cache_setting view
52
+ voo&.cache || view_setting(:cache, view) || :default
53
+ end
54
+
55
+ def view_setting setting_name, view
56
+ try Card::Set::Format.view_setting_method_name(view, setting_name)
57
+ end
58
+
59
+ def stub_render cached_content
60
+ return cached_content if Cardio.config.view_cache == :debug
61
+
62
+ # stub_debugging do
63
+ expand_stubs cached_content
64
+ # end
65
+ end
66
+
67
+ def view_method view
68
+ unless supports_view? view
69
+ raise Card::Error::UserError, unsupported_view_error_message(view)
70
+ end
71
+
72
+ method Card::Set::Format.view_method_name(view)
73
+ end
74
+
75
+ def supports_view? view
76
+ respond_to? Card::Set::Format.view_method_name(view)
77
+ end
78
+
79
+ def current_view view
80
+ old_view = @current_view
81
+ @current_view = view
82
+ yield
83
+ ensure
84
+ @current_view = old_view
85
+ end
86
+
87
+ def stub_nest stub_hash
88
+ prepare_stub_nest(stub_hash) do |stub_card, view_opts|
89
+ nest stub_card, view_opts, stub_hash[:format_opts]
90
+ end
91
+ end
92
+
93
+ private
94
+
44
95
  def wrap_and_render view
45
96
  current_view(view) { with_wrapper { final_render view } }
46
97
  rescue StandardError => e
@@ -64,27 +115,6 @@ class Card
64
115
  Env.params[:debug] == "view"
65
116
  end
66
117
 
67
- def pretty_path source_location
68
- "#{source_location.first.gsub(%r{^.+mod\d+-([^/]+)},
69
- '\1: ')}:#{source_location.second}"
70
- end
71
-
72
- # see {Abstract::Format}
73
- # (:default), :yes, :deep, :always, :never
74
- def view_cache_setting view
75
- voo&.cache || view_setting(:cache, view) || :default
76
- end
77
-
78
- def view_setting setting_name, view
79
- try Card::Set::Format.view_setting_method_name(view, setting_name)
80
- end
81
-
82
- def stub_render cached_content
83
- # stub_debugging do
84
- expand_stubs cached_content
85
- # end
86
- end
87
-
88
118
  # def stub_debugging
89
119
  # result = yield
90
120
  # if Rails.env.development? && result.is_a?(String) && result =~ /StUb/
@@ -118,32 +148,6 @@ class Card
118
148
  conto.to_s
119
149
  end
120
150
  end
121
-
122
- def view_method view
123
- unless supports_view? view
124
- raise Card::Error::UserError, unsupported_view_error_message(view)
125
- end
126
-
127
- method Card::Set::Format.view_method_name(view)
128
- end
129
-
130
- def supports_view? view
131
- respond_to? Card::Set::Format.view_method_name(view)
132
- end
133
-
134
- def current_view view
135
- old_view = @current_view
136
- @current_view = view
137
- yield
138
- ensure
139
- @current_view = old_view
140
- end
141
-
142
- def stub_nest stub_hash
143
- prepare_stub_nest(stub_hash) do |stub_card, view_opts|
144
- nest stub_card, view_opts, stub_hash[:format_opts]
145
- end
146
- end
147
151
  end
148
152
  end
149
153
  end
data/lib/card/lexicon.rb CHANGED
@@ -18,9 +18,12 @@ class Card
18
18
  # param name [String]
19
19
  # @return [Integer]
20
20
  def id name
21
- return unless name.present?
21
+ return if name.blank?
22
22
 
23
- (lex = name_to_lex name.to_name) && lex_to_id(lex)
23
+ name = name.to_name
24
+ return if name.relative_fragment?
25
+
26
+ (lex = name_to_lex name) && lex_to_id(lex)
24
27
  end
25
28
 
26
29
  def cache
data/lib/card/name/all.rb CHANGED
@@ -58,6 +58,10 @@ class Card
58
58
  end
59
59
  end
60
60
 
61
+ def id_string
62
+ "~#{id}"
63
+ end
64
+
61
65
  def key= newkey
62
66
  return if newkey == key
63
67
 
@@ -4,7 +4,7 @@ class Card
4
4
  # interpret CQL attributes that relate multiple cards
5
5
  # each method below corresponds to a relational CQL term
6
6
  #
7
- # NOTE: methods using "restrict" can be executed without
7
+ # NOTE: methods using "restrict" can be executed without
8
8
  # tying in an additional query if the val in question can be
9
9
  # reduced to an id.
10
10
  module RelationalAttributes
@@ -38,7 +38,7 @@ class Card
38
38
  case
39
39
  when respond_to?(:"#{retrn}_result") then :"#{retrn}_result"
40
40
  when retrn.match?(/id$/) then :id_result
41
- when retrn.match?(/_\w+/) then :name_result
41
+ when retrn.match?(/^_\w+/) then :name_result
42
42
  when retrn == "key" then :key_result
43
43
  else :default_result
44
44
  end
@@ -52,6 +52,10 @@ class Card
52
52
  record[field]
53
53
  end
54
54
 
55
+ def content_result record, _pattern
56
+ record["db_content"]
57
+ end
58
+
55
59
  def id_result record, field
56
60
  record[field].to_i
57
61
  end
@@ -24,6 +24,7 @@ class Card
24
24
  @fields = fields
25
25
  @tables = tables
26
26
  @joins = joins
27
+ @indexes = indexes
27
28
  @where = where
28
29
  @group = group
29
30
  @order = order
@@ -33,7 +34,8 @@ class Card
33
34
 
34
35
  def to_s
35
36
  [
36
- comment, select, from, @joins, @where, @group, @order, @limit_and_offset
37
+ comment, select, from,
38
+ @joins, @indexes, @where, @group, @order, @limit_and_offset
37
39
  ].compact.join " "
38
40
  end
39
41
 
@@ -103,6 +105,10 @@ class Card
103
105
  end
104
106
  end
105
107
 
108
+ def indexes
109
+ "USE INDEX (#{Array.wrap(@mods[:index]).join ', '})" if @mods[:index]
110
+ end
111
+
106
112
  def full_syntax
107
113
  @query.full? ? yield : return
108
114
  end
data/lib/card/query.rb CHANGED
@@ -83,7 +83,7 @@ class Card
83
83
  # "dir" is DEPRECATED in favor of sort_dir
84
84
  # "sort" is DEPRECATED in favor of sort_by, except in cases where sort's value
85
85
  # is a hash
86
- MODIFIERS = %i[conj return sort_by sort_as sort_dir sort dir group limit offset]
86
+ MODIFIERS = %i[conj return index sort_by sort_as sort_dir sort dir group limit offset]
87
87
  .each_with_object({}) { |v, h| h[v] = nil }
88
88
 
89
89
  OPERATORS =
@@ -74,7 +74,13 @@ class Card
74
74
 
75
75
  # @return [Symbol]
76
76
  def active_cache_action
77
- active_cache_ok? ? active_cache_action_from_setting : :stub
77
+ if caching == :deep && cache_setting != :never
78
+ :yield
79
+ elsif active_cache_ok?
80
+ active_cache_action_from_setting
81
+ else
82
+ :stub
83
+ end
78
84
  end
79
85
 
80
86
  # @return [True/False]
@@ -120,7 +126,7 @@ class Card
120
126
  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
127
  # SHARED METHODS
122
128
 
123
- # @return [Symbol] :standard, :always, or :never
129
+ # @return [Symbol] :always, :deep, or :never
124
130
  def cache_setting
125
131
  @cache_setting ||= format.view_cache_setting requested_view
126
132
  end
@@ -215,15 +215,20 @@ class Card
215
215
  # If view is cached, retrieve it. Otherwise render and store it.
216
216
  # Uses the primary cache API.
217
217
  def cache_fetch &block
218
- caching do
218
+ with_caching do
219
219
  ensure_cache_key
220
+ # Rails.logger.debug "Fetching::: #{cache_key}"
220
221
  self.class.cache.fetch cache_key, &block
221
222
  end
222
223
  end
223
224
 
224
225
  # keep track of nested cache fetching
225
- def caching &block
226
- self.class.caching(cache_setting, &block)
226
+ def with_caching &block
227
+ self.class.with_caching(cache_setting, &block)
228
+ end
229
+
230
+ def caching
231
+ self.class.caching
227
232
  end
228
233
 
229
234
  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -293,24 +298,20 @@ class Card
293
298
  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
294
299
  # cache-related Card::View class methods
295
300
  module ClassMethods
301
+ def caching
302
+ @caching
303
+ end
304
+
296
305
  def cache
297
306
  Card::Cache[Card::View]
298
307
  end
299
308
 
300
309
  def caching?
301
- !@caching.nil?
310
+ !caching.nil?
302
311
  end
303
312
 
304
- def caching setting, &block
305
- return @caching unless block_given?
306
-
307
- caching_mode setting, &block
308
- end
309
-
310
- private
311
-
312
- def caching_mode setting
313
- old_caching = @caching
313
+ def with_caching setting
314
+ old_caching = caching
314
315
  # puts "OPEN CACHING from #{old_caching} to #{setting}" unless @caching == :deep
315
316
  @caching = setting unless @caching == :deep
316
317
  yield
@@ -318,6 +319,7 @@ class Card
318
319
  # puts "CLOSE CACHING from #{@caching} to #{old_caching}"
319
320
  @caching = old_caching
320
321
  end
322
+
321
323
  end
322
324
  end
323
325
  end
@@ -165,7 +165,7 @@ class Card
165
165
 
166
166
  # adds the wrappers assigned to ok_view in view definition
167
167
  def process_view_wrappers
168
- view_wrappers = format.view_setting(:wrap, ok_view)
168
+ view_wrappers = format.view_setting(:wrap, ok_view) if requested_view
169
169
  return unless view_wrappers.present?
170
170
 
171
171
  @live_options[:wrap] = Array.wrap(@live_options[:wrap])
@@ -52,6 +52,7 @@ class Card
52
52
  :structure, # overrides the content of the card
53
53
  :title, # overrides the name of the card
54
54
  :variant, # override the standard name with a different variant
55
+ :joint, # what joins the parts of a compound name ("+" by default)
55
56
  :input_type, # inline_nests makes a form within standard content (Symbol)
56
57
  :type, # set the default type of new cards
57
58
  :size, # set an image size
data/lib/card/view.rb CHANGED
@@ -76,7 +76,7 @@ class Card
76
76
  # be overridden, eg for the main view (top view of the main card on a page)
77
77
  # @return [Symbol] view name
78
78
  def requested_view
79
- @requested_view ||= View.normalize live_options[:view]
79
+ @requested_view ||= View.normalize(live_options[:view] || @raw_view)
80
80
  end
81
81
 
82
82
  # the final view. can be different from @requested_view when there are
@@ -46,9 +46,6 @@ module Cardio
46
46
 
47
47
  def track edible
48
48
  rescuing edible do
49
- # n = edible[:name]
50
- # binding.pry if (n.is_a? Array) && n.first.to_s == "main_menu"
51
- # puts "eating: #{edible}" if @verbose
52
49
  card = yield
53
50
  puts "eaten: #{card.name}".cyan if @verbose
54
51
  end
@@ -63,7 +60,7 @@ module Cardio
63
60
  end
64
61
 
65
62
  def current_user item_user
66
- Card::Auth.current_id = item_user&.card_id || @user_id || Card::WagnBotID
63
+ Card::Auth.current_id = item_user&.card_id || @user_id || Card::DeckoBotID
67
64
  end
68
65
 
69
66
  def time_machine value, &block
data/lib/cardio/seed.rb CHANGED
@@ -104,7 +104,7 @@ module Cardio
104
104
  end
105
105
 
106
106
  def author_id
107
- Card::WagnBotID
107
+ Card::DeckoBotID
108
108
  end
109
109
  end
110
110
  end
@@ -8,7 +8,7 @@ de:
8
8
  core_error_cant_alter: Typ kann nicht geändert werden; es gibt noch %{name} Karten
9
9
  core_error_cant_change_errors: "von %{name} kann nicht geändert werden; Fehler beim Erstellen von neuen %{type_id}: %{error_messages}"
10
10
  core_error_code_in_use: Codename %{codename} ist bereits vergeben
11
- core_error_hard_templated: kann nicht geändert werden, weil %{name} ist eine Vorlage für %{type_name}
11
+ core_error_structured: kann nicht geändert werden, weil %{name} ist eine Vorlage für %{type_name}
12
12
  core_error_indestructible: "%{name} ist eine unzerstörbare Regel"
13
13
  core_error_invalid_character_in_cardtype: "folgende Zeichen sind nicht erlaubt: %{banned}"
14
14
  core_error_name_exists: muss eindeutig sein; '%{name}' gibt es bereits.
@@ -9,7 +9,7 @@ en:
9
9
  core_error_cant_change_errors: "of %{name} can't be changed; errors creating new %{type_id}: %{error_messages}"
10
10
  core_error_code_in_use: codename %{codename} already in use
11
11
  core_codename_must_be_simple: only simple cards can have codenames
12
- core_error_hard_templated: can't be changed because %{name} is hard templated to %{type_name}
12
+ core_error_structured: can't be changed because %{name} is structured as a %{type_name}
13
13
  core_error_indestructible: "%{name} is an indestructible rule"
14
14
  core_error_invalid_character_in_cardtype: "may not contain any of the following characters: %{banned}"
15
15
  core_error_name_exists: must be unique; '%{name}' already exists.
@@ -3,7 +3,7 @@ cards_001:
3
3
  id: 1
4
4
  name: Decko Bot
5
5
  key: decko_bot
6
- codename: wagn_bot
6
+ codename: decko_bot
7
7
  creator_id: 1
8
8
  updater_id: 1
9
9
  read_rule_class: "*all"
@@ -16,7 +16,7 @@
16
16
  [[http://decko.org/card_types|more]]
17
17
  </p>
18
18
  - :name: Decko Bot
19
- :codename: wagn_bot
19
+ :codename: decko_bot
20
20
  :content: |-
21
21
  <p>
22
22
  This is the account that makes any automated updates &mdash; cards
@@ -5,3 +5,4 @@ input: input_type
5
5
  options: content_options
6
6
  options_label: content_option_view
7
7
  token: api_key
8
+ wagn_bot: decko_bot
@@ -30,7 +30,7 @@ namespace :card do
30
30
  desc "install all mods"
31
31
  task install: :environment do
32
32
  puts "installing mods"
33
- Card::Auth.signin :wagn_bot.card
33
+ Card::Auth.signin :decko_bot.card
34
34
  # Cardio.config.compress_assets = true # should not be here, imo #efm
35
35
  Cardio::Mod.ensure_installed
36
36
  end
@@ -13,7 +13,8 @@ namespace :card do
13
13
  ENV["NO_RAILS_CACHE"] = "true"
14
14
  run_tasks ["migrate:port", "migrate:schema", "migrate:recode",
15
15
  :eat, "migrate:transform",
16
- "mod:uninstall", "mod:install", "mod:symlink", :reset] # , true
16
+ "mod:uninstall", "mod:install", "mod:symlink", :reset]
17
+ # , with_benchmark: true
17
18
  end
18
19
  end
19
20
 
@@ -8,7 +8,6 @@ event :reset_codename_cache, :integrate, changed: :codename do
8
8
  return if action == :create && codename.nil?
9
9
 
10
10
  Card::Codename.reset_cache
11
- Card::Codename.generate_id_constants
12
11
  end
13
12
 
14
13
  private
@@ -85,15 +85,11 @@ end
85
85
 
86
86
  # has not been edited directly by human users. bleep blorp.
87
87
  def pristine?
88
- if new_card?
89
- true
90
- elsif subcards? && subcards.cards.find(&:altered?)
91
- false
92
- elsif (created_at == updated_at) && (creator_id == WagnBotID)
93
- true
94
- else
95
- !user_changes?
96
- end
88
+ return true if new_card?
89
+ return false if subcards? && subcards.cards.find(&:altered?)
90
+ return true if (created_at == updated_at) && (creator_id == DeckoBotID)
91
+
92
+ !user_changes?
97
93
  end
98
94
 
99
95
  def altered?
@@ -101,5 +97,5 @@ def altered?
101
97
  end
102
98
 
103
99
  def user_changes?
104
- actions.joins(:act).where("card_acts.actor_id != ?", WagnBotID).exists?
100
+ actions.joins(:act).where("card_acts.actor_id != ?", DeckoBotID).exists?
105
101
  end
@@ -19,7 +19,7 @@ event :validate_type, :validate, changed: :type_id, on: :save do
19
19
 
20
20
  if structure&.assigns_type? && type_id != structure.type_id
21
21
  errors.add :type,
22
- t(:core_error_hard_templated, name: name, type_name: structure.type_name)
22
+ t(:core_error_structured, name: name, type_name: structure.type_name)
23
23
  end
24
24
  end
25
25
 
@@ -26,7 +26,7 @@ RSpec.describe Card::Set::All::Admin do
26
26
  "link_list",
27
27
  "local_script_folder_group", "local_script_manifest_group",
28
28
  "local_style_folder_group",
29
- "nest_list", "remote_manifest_group", "role",
29
+ "nest_list", "role",
30
30
  "local_style_manifest_group", "bootswatch_skin",
31
31
  "date", "notification_template", "session", "basic",
32
32
  "search_type", "signup")
@@ -178,9 +178,9 @@ end
178
178
  # NOT WORKING, BUT IT SHOULD
179
179
  # describe Card, "a part of an unremovable card" do
180
180
  # before do
181
- # Card::Auth.as(Card::WagnBotID)
181
+ # Card::Auth.as(Card::DeckoBotID)
182
182
  # # this ugly setup makes it so A+Admin is the actual user with edits..
183
- # Card["Wagn Bot"].update! name: "A+Wagn Bot"
183
+ # Card["Decko Bot"].update! name: "A+Decko Bot"
184
184
  # end
185
185
  # it "does not be removable" do
186
186
  # @a = Card['A']
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.109.0
4
+ version: 1.109.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 0.19.0
20
+ version: 0.19.1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 0.19.0
27
+ version: 0.19.1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement