cog-rb 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cog/response.rb +8 -3
- data/lib/cog/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfbec067ba8183a32d93d968ddbedf8a376b14ec
|
4
|
+
data.tar.gz: ec8eeb19ed5ad46b89c6a184746dc6dac131451c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a84cadda6d873f648ecf7858c8208ccd01381fd1b93dda6a9e0aa95f59fc1202297084a30273f6eb9f3c031c25714df95e829596ed8b94216795385de8d3aee
|
7
|
+
data.tar.gz: f989fc111a1c9d3767573e2fbe7a4ac4f1fe53d169b5f52a344236f679a4cea6a6fc04045e534150a243115587061f8ff969610cba674bdbf671975be3ce3ec2
|
data/lib/cog/response.rb
CHANGED
@@ -5,18 +5,23 @@ class Cog
|
|
5
5
|
class Response
|
6
6
|
LOG_LEVELS = [ :debug, :info, :warn, :err, :error ]
|
7
7
|
|
8
|
-
attr_accessor :template, :content
|
8
|
+
attr_accessor :template, :content, :aborted
|
9
9
|
|
10
10
|
def []=(key, value)
|
11
11
|
@content ||= {}
|
12
12
|
@content[key] = value
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
16
|
-
|
15
|
+
def abort
|
16
|
+
@aborted = true
|
17
|
+
end
|
17
18
|
|
19
|
+
def send
|
20
|
+
write "COGCMD_ACTION: abort" unless @aborted.nil?
|
18
21
|
write "COG_TEMPLATE: #{@template}" unless @template.nil?
|
19
22
|
|
23
|
+
return if content.nil?
|
24
|
+
|
20
25
|
case content.class
|
21
26
|
when String
|
22
27
|
write @content.join('').to_json
|
data/lib/cog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cog-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Imbriaco
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -77,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.5.1
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Cog command helper library
|
84
84
|
test_files: []
|
85
|
-
has_rdoc:
|