feedx 0.12.1 → 0.12.2

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
  SHA256:
3
- metadata.gz: 71dca5fd53dd7fe5f8a9db7222e0cd50deaa161247fb1648055f8c1475097f37
4
- data.tar.gz: bd5d2840072c36370b2125f8decaccb2eb25fde22af4844641aff21ba6a1d265
3
+ metadata.gz: 898f80c359182952ab192f95fb05dc1e6ae806f0d661d71244813b779595d0f8
4
+ data.tar.gz: 43778c6084131e8ffa9ba59b7836fe198f7595e5dc07af1c4e11a9b03ac49419
5
5
  SHA512:
6
- metadata.gz: b41727d4151602a97112c32874084b2486c72329cb4eee74f4dd6736176e0b925dac9071fe427d04f4ed657eac5748e42102cb05d558b5bf6c1ffc465709b7e1
7
- data.tar.gz: ae9d45a9a91f5438a1ccf39f1f1470042955af79399d9cceec60192b033ebcf617aa30b7d19e1db24aba9f697d82234390404f7540c64e3116e57bc6fd4d39e0
6
+ metadata.gz: fa8f2e4e26c140bb4c2732655ac73c39ef20055f215ac39c8c62bd77e7cf27d7d8140287ed6c90a4c4da6bf461d491123f76784ce5d770189a45da7fea897965
7
+ data.tar.gz: a35d5296c5aec452b450e95985535c98b6b99f1a872624b3ad3974cbb0f56b0e6d0ae8395edd849c97242ae0a77ee77537404cb3dce22882a3a310a6e0f04a04
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- feedx (0.12.1)
4
+ feedx (0.12.2)
5
5
  bfs (>= 0.5.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  ast (2.4.1)
11
- bfs (0.7.1)
11
+ bfs (0.7.2)
12
12
  diff-lcs (1.4.4)
13
13
  extpp (0.0.8)
14
14
  gio2 (3.4.3)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'feedx'
3
- s.version = '0.12.1'
3
+ s.version = '0.12.2'
4
4
  s.authors = ['Black Square Media Ltd']
5
5
  s.email = ['info@blacksquaremedia.com']
6
6
  s.summary = %(Exchange data between components via feeds)
@@ -10,12 +10,13 @@ module Feedx
10
10
  # If a block is given, streams are automatically closed after the block is yielded.
11
11
  def self.open(url, **opts)
12
12
  stream = new(url, **opts)
13
+ return stream unless block_given?
14
+
13
15
  begin
14
16
  yield stream
15
17
  ensure
16
18
  stream.close
17
- end if block_given?
18
- stream
19
+ end
19
20
  end
20
21
 
21
22
  # @param [String] url the blob URL.
@@ -27,9 +27,11 @@ RSpec.describe Feedx::Stream do
27
27
  end
28
28
  end
29
29
 
30
- described_class.open('mock:///dir/file.txt', format: format.new) do |stream|
30
+ result = described_class.open('mock:///dir/file.txt', format: format.new) do |stream|
31
31
  stream.create {|s| s.encode Feedx::TestCase::Model.new('X') }
32
+ 21
32
33
  end
34
+ expect(result).to eq(21)
33
35
 
34
36
  expect(bucket.read('dir/file.txt')).to eq(
35
37
  %({"title":"X","updated_at":"2018-01-05 11:25:15 UTC"}\n),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Black Square Media Ltd