context_spook 1.5.0 → 1.5.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: 5cca218e18443bf3698be556f93b822253a9f0dd4c93322d1ee9c826d1a26dc3
4
- data.tar.gz: d8c48e20203cbc5c1c0741e93805480aa7fbe9987821fe2b9839447902879149
3
+ metadata.gz: 2bb51df13e01f4262026aea154cc901997a0b5cec6566f4bc71e42467ec3dfed
4
+ data.tar.gz: b26ead5c765e99a931026d267e6de374dc0c93f8a5c64e46bfe09c28d892dd99
5
5
  SHA512:
6
- metadata.gz: a7f1fb4f2b26f9c59dc6a48be8db0a2ffc4381250334a401c6ad2944fe398cb18bcc0154df6111d26ceac1a9bcad7ac4386626aeb681bbe20f1286310fbe58f0
7
- data.tar.gz: 990b7df25449551007c8e986ec479bdf5656195e47ef6d7243603849179a5fac6edaa6e245bbfaa99768115b3b46eeffc5baf6f37e542c8a4b729dc443ba8b13
6
+ metadata.gz: 4f8995fb526a7f6fd8be4c15c2a869775fdc5a826571bd84723689e695ca3b982325d56bf971da3982afc6cecdb2575d20d0319ea073d505d85e19a6415fdffc
7
+ data.tar.gz: 56bc054c3fe75f245ed97a7d92c0c91cb31dcfb1e7b101b2ee3a2092324a7290b7ec0449c5dba310b809a102e64d2bd40a656d126feef5a3d03ec588eaead314
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: context_spook 1.5.0 ruby lib
2
+ # stub: context_spook 1.5.1 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "context_spook".freeze
6
- s.version = "1.5.0".freeze
6
+ s.version = "1.5.1".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
@@ -272,7 +272,9 @@ module ContextSpook
272
272
  # The commands method sets up a DSL accessor for provided command outputs.
273
273
  #
274
274
  # @param value [ Hash ] the hash of commands to be set
275
- dsl_accessor :commands, {}
275
+ dsl_accessor :commands do
276
+ {}
277
+ end
276
278
 
277
279
  # The command method executes a shell command and stores its result.
278
280
  #
@@ -1,6 +1,6 @@
1
1
  module ContextSpook
2
2
  # ContextSpook version
3
- VERSION = '1.5.0'
3
+ VERSION = '1.5.1'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ContextSpook::TOON do
4
- let(:context) do
4
+ let(:my_context) do
5
5
  ContextSpook.generate_context do
6
6
  context do
7
7
  variable foo: 'bar'
@@ -13,13 +13,13 @@ describe ContextSpook::TOON do
13
13
 
14
14
  describe '#to_toon' do
15
15
  it 'converts context to TOON format' do
16
- toon_output = context.to_toon
16
+ toon_output = my_context.to_toon
17
17
  expect(toon_output).to be_a(String)
18
18
  expect(toon_output).to_not be_empty
19
19
  end
20
20
 
21
21
  it 'produces valid TOON output' do
22
- toon_output = context.to_toon
22
+ toon_output = my_context.to_toon
23
23
  expect(toon_output).to match(
24
24
  %r{
25
25
  \Afiles:\n
@@ -41,26 +41,26 @@ describe ContextSpook::TOON do
41
41
 
42
42
  describe '#toon_size' do
43
43
  it 'returns the size of TOON representation in bytes' do
44
- size = context.toon_size
44
+ size = my_context.toon_size
45
45
  expect(size).to be_a(Integer)
46
46
  expect(size).to be > 0
47
47
  end
48
48
 
49
49
  it 'matches the size of the TOON output' do
50
- size = context.toon_size
51
- toon_output = context.to_toon
50
+ size = my_context.toon_size
51
+ toon_output = my_context.to_toon
52
52
  expect(size).to eq(toon_output.size)
53
53
  end
54
54
  end
55
55
 
56
56
  describe 'integration with ContextSpook::Generator::Context' do
57
57
  it 'is included in Context class' do
58
- expect(context).to respond_to(:to_toon)
59
- expect(context).to respond_to(:toon_size)
58
+ expect(my_context).to respond_to(:to_toon)
59
+ expect(my_context).to respond_to(:toon_size)
60
60
  end
61
61
 
62
62
  it 'works with context data' do
63
- toon_output = context.to_toon
63
+ toon_output = my_context.to_toon
64
64
  expect(toon_output).to include('variables:')
65
65
  expect(toon_output).to include('metadata:')
66
66
  expect(toon_output).to include('files:')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: context_spook
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank