blockbuster 0.4.1 → 0.5.0

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: 0bdda5e73f8cf27127f1e0e256f9049ea96d0fd3
4
- data.tar.gz: a5e0150870a52e9e4e559e3f7a151ab29d163cff
3
+ metadata.gz: 22f608be7427bf5330f0c2221b67fb7957895de2
4
+ data.tar.gz: c166cf00c3791e77502bf7d0cf6f074f531a1ffd
5
5
  SHA512:
6
- metadata.gz: a7c390e1556f8bb3a9f0c905c543b01fab2c938e6c6638b4d5a5ec33c307058c1ab07ad8d7ea3183875e62cd276dd8c26756efee4843dd1c1e431c1492b01918
7
- data.tar.gz: 6d7a7349a31718c0a0680d762ba2a5844a34f3bdcd15523bdca57d91f504ac81a5972781a651753c72a0b79a1753bce50087a8cf35bb6941d4e23fc88bff16db
6
+ metadata.gz: 2e0307d93eac4eb8edaa6085afa291c9c94239d4ebcc59d0e4ff559011c3384e83e8733fbd02d15ae675e74eb38ff46f7eb18a09b96be6f3022841c480955e24
7
+ data.tar.gz: 56d22558cf5e7a1617652905225b35dd1fe24b0de14374161d6b55c2cf5ec231fdb1d6b59245ee8dcd73b506198d0952beb114f7094fc15c0c60f1679c3e71ee
data/.rubocop.yml CHANGED
@@ -2,3 +2,7 @@ LineLength:
2
2
  Enabled: false
3
3
  Style/FrozenStringLiteralComment:
4
4
  Enabled: false
5
+ Metrics/BlockLength:
6
+ Enabled: false
7
+ Naming/VariableNumber:
8
+ Enabled: false
data/README.md CHANGED
@@ -7,6 +7,38 @@ Managing your VCR cassettes since 2016.
7
7
  The task of this gem is to take all your VCR cassettes and package them into one `.tar.gz` file
8
8
  for adding to git or other distributed version control system.
9
9
 
10
+ ## Use cases
11
+
12
+ Blockbuster was built to tackle some of the problems with VCR when
13
+ cassettes are checked into a version control system like git. Some of the problems
14
+ were the sheer amount of noise from all the cassette files,
15
+ merge conflicts, lost time, and failing builds due to old cassettes
16
+ overwriting new cassettes. The biggest issue we had was the inability to
17
+ review PR's in github as the enormous diffs generated would cause github
18
+ to hide changes that needed to be reviewed. Github's per-commit view has helped
19
+ mitigate this but that doesn't help in cases where PR's are squashed.
20
+
21
+ If you are checking in large amounts of cassettes to git
22
+ and they are changing regularly, Blockbuster can help
23
+ reduce noise, conflicts, and hopefully make the development
24
+ workflow easier.
25
+
26
+ #### Reduce noise:
27
+
28
+ If your workflow requires that every change is a review pull request, any
29
+ PR with several updated cassettes can make githubs diff comparison almost
30
+ useless. One small change to a client for a 3rd party service can result
31
+ in hundreds of files to diff.
32
+
33
+ #### Reduce merge conflicts
34
+
35
+ VCR cassettes are not always easily merged and dealing with the merge conflicts
36
+ is maddening and a huge time waster. Having a single master cassette file works
37
+ to fix merge conflicts but that introduced a new problem where multiple
38
+ PRs could have different master cassette files and the last file would win.
39
+ The delta feature keeps only new cassettes in a secondardy delta file that
40
+ is checked in.
41
+
10
42
  ## Installation
11
43
 
12
44
  Add this line to your application's Gemfile:
@@ -187,7 +219,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
187
219
 
188
220
  ## Contributing
189
221
 
190
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/blockbuster. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
222
+ Bug reports and pull requests are welcome on GitHub at https://github.com/fastly/blockbuster. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
191
223
 
192
224
 
193
225
  ## License
data/Rakefile CHANGED
@@ -10,8 +10,8 @@ end
10
10
 
11
11
  desc 'Run rubocop'
12
12
  RuboCop::RakeTask.new do |task|
13
- task.options = %w(--display-cop-names)
14
- task.formatters = %w(fuubar)
13
+ task.options = %w[--display-cop-names]
14
+ task.formatters = %w[fuubar]
15
15
  task.fail_on_error = true
16
16
  end
17
17
 
data/blockbuster.gemspec CHANGED
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'blockbuster/version'
5
4
 
@@ -3,6 +3,7 @@ module Blockbuster
3
3
  module Extractor
4
4
  def extract_cassettes
5
5
  return unless File.exist?(file_path)
6
+
6
7
  File.open(file_path, 'rb') do |file|
7
8
  Zlib::GzipReader.wrap(file) do |gz|
8
9
  Gem::Package::TarReader.new(gz) do |tar|
@@ -4,7 +4,7 @@ module Blockbuster
4
4
  include Blockbuster::Extractor
5
5
  include Blockbuster::Packager
6
6
 
7
- attr_reader :current, :file_name, :configuration
7
+ attr_reader :file_name, :configuration
8
8
 
9
9
  # nodoc
10
10
  class NotEnabledError < StandardError
@@ -40,10 +40,10 @@ module Blockbuster
40
40
 
41
41
  # repackages cassettes into a compressed tarball
42
42
  def drop_off(force: false)
43
- if comparator.rewind?(configuration.cassette_files) || force
44
- silent_puts "Recreating cassette file #{@extraction_list.primary.target_path}"
45
- @extraction_list.primary.create_cassette_file
46
- end
43
+ return unless comparator.rewind?(configuration.cassette_files) || force
44
+
45
+ silent_puts "Recreating cassette file #{@extraction_list.primary.target_path}"
46
+ @extraction_list.primary.create_cassette_file
47
47
  end
48
48
 
49
49
  alias setup rent
@@ -57,7 +57,7 @@ module Blockbuster
57
57
  dir = configuration.cassette_dir
58
58
 
59
59
  silent_puts "Wiping cassettes directory: #{dir}"
60
- FileUtils.rm_r(dir) if Dir.exist?(dir)
60
+ FileUtils.rm_rf(dir) if Dir.exist?(dir)
61
61
  end
62
62
  end
63
63
  end
@@ -1,3 +1,3 @@
1
1
  module Blockbuster
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockbuster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Eklund
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2016-08-18 00:00:00.000000000 Z
13
+ date: 2018-10-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler