card-mod-machines 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ include_set Abstract::VirtualCache
2
+
3
+ def clean_html?
4
+ false
5
+ end
@@ -0,0 +1,7 @@
1
+ def followable?
2
+ false
3
+ end
4
+
5
+ def history?
6
+ false
7
+ end
@@ -0,0 +1,44 @@
1
+ def followable?
2
+ false
3
+ end
4
+
5
+ def ok_to_read
6
+ left.ok_to_read
7
+ end
8
+
9
+ def history?
10
+ false
11
+ end
12
+
13
+ event :remove_codename, :prepare_to_validate,
14
+ on: :delete,
15
+ when: proc { |c| c.codename.present? } do
16
+ # load file before deleting codename otherwise it will fail later
17
+ attachment
18
+ self.codename = nil
19
+ end
20
+
21
+ format do
22
+ view :not_found do
23
+ if update_machine_output_live?
24
+ Card::Cache.reset_all # FIXME: wow, this is overkill, no?
25
+ root.error_status = 302
26
+ card.left.update_machine_output
27
+ card_path card.left.machine_output_url
28
+ else
29
+ super()
30
+ end
31
+ end
32
+
33
+ def update_machine_output_live?
34
+ case
35
+ when !card.left.is_a?(Abstract::Machine) then false # must be a machine
36
+ when card.left.locked? then false # machine must not be running
37
+ when card.new_card? then true # always update if new
38
+ else
39
+ # must want current output (won't re-output old stuff)
40
+ (selected_id = card.selected_action_id) &&
41
+ selected_id == card.last_action_id
42
+ end
43
+ end
44
+ end
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: card-mod-machines
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.11.0
5
+ platform: ruby
6
+ authors:
7
+ - Ethan McCutchen
8
+ - Philipp Kühl
9
+ - Gerry Gleason
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2020-12-24 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: card
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - '='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.101.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - '='
27
+ - !ruby/object:Gem::Version
28
+ version: 1.101.0
29
+ - !ruby/object:Gem::Dependency
30
+ name: card-mod-virtual
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - '='
34
+ - !ruby/object:Gem::Version
35
+ version: 0.11.0
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - '='
41
+ - !ruby/object:Gem::Version
42
+ version: 0.11.0
43
+ - !ruby/object:Gem::Dependency
44
+ name: card-mod-format
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - '='
48
+ - !ruby/object:Gem::Version
49
+ version: 0.11.0
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - '='
55
+ - !ruby/object:Gem::Version
56
+ version: 0.11.0
57
+ - !ruby/object:Gem::Dependency
58
+ name: card-mod-list
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '='
62
+ - !ruby/object:Gem::Version
63
+ version: 0.11.0
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '='
69
+ - !ruby/object:Gem::Version
70
+ version: 0.11.0
71
+ - !ruby/object:Gem::Dependency
72
+ name: card-mod-carrierwave
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - '='
76
+ - !ruby/object:Gem::Version
77
+ version: 0.11.0
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - '='
83
+ - !ruby/object:Gem::Version
84
+ version: 0.11.0
85
+ description: ''
86
+ email:
87
+ - info@decko.org
88
+ executables: []
89
+ extensions: []
90
+ extra_rdoc_files: []
91
+ files:
92
+ - file/all_script_machine_output/file.js
93
+ - file/all_style_machine_output/file.css
94
+ - file/script_html5shiv_printshiv_machine_output/file.js
95
+ - lib/card/machine.rb
96
+ - set/abstract/machine.rb
97
+ - set/abstract/machine/output_cache.rb
98
+ - set/abstract/machine/output_update.rb
99
+ - set/abstract/machine_input.rb
100
+ - set/all/reset_machines.rb
101
+ - set/right/machine_cache.rb
102
+ - set/right/machine_input.rb
103
+ - set/right/machine_output.rb
104
+ homepage: http://decko.org
105
+ licenses:
106
+ - GPL-3.0
107
+ metadata:
108
+ card-mod: machines
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '2.5'
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ requirements: []
124
+ rubygems_version: 3.0.3
125
+ signing_key:
126
+ specification_version: 4
127
+ summary: decko machines
128
+ test_files: []