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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 198ee7dcc7e2ffe311fd27f2d69c8073c57f0d28
4
- data.tar.gz: 460812701e1b25690b48c71fc51fc9b6de67b24d
3
+ metadata.gz: cfbec067ba8183a32d93d968ddbedf8a376b14ec
4
+ data.tar.gz: ec8eeb19ed5ad46b89c6a184746dc6dac131451c
5
5
  SHA512:
6
- metadata.gz: bbca4897dbe208a38ada307dd7e40c4d53263e5e28aa80037ad6ebda3abfd38341989393cbe5657ea037092303bba26bd2e9d0e068fdaf1569e3cf52f90708eb
7
- data.tar.gz: d8d646b04325f58f792a260b28324efede5c705976fbfec45ae9b2606390d2a2d6981a86cbc7115ca661d2c097c4fa5e84e013172f64a2ede7c9b06a6e9dfe36
6
+ metadata.gz: 4a84cadda6d873f648ecf7858c8208ccd01381fd1b93dda6a9e0aa95f59fc1202297084a30273f6eb9f3c031c25714df95e829596ed8b94216795385de8d3aee
7
+ data.tar.gz: f989fc111a1c9d3767573e2fbe7a4ac4f1fe53d169b5f52a344236f679a4cea6a6fc04045e534150a243115587061f8ff969610cba674bdbf671975be3ce3ec2
@@ -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 send
16
- return if content.nil?
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
@@ -1,3 +1,3 @@
1
1
  class Cog
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
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.7
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-06 00:00:00.000000000 Z
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.4.5.1
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: