scraped_page_archive 0.1.0 → 0.2.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: dad81b1b381a56c2e975f9b25216b68865e30a05
4
- data.tar.gz: 558e3bb764ff15b5af3581f46b2a9b65448f01a0
3
+ metadata.gz: 24965af2437ca68ffc7cb19c06bee6e99023bcf4
4
+ data.tar.gz: 1c9c9475ce0476db1d750bbdfca142e608725747
5
5
  SHA512:
6
- metadata.gz: ac28d6306e7cdbb3aa5763f947bb78a22f065900cf90de24dbdb6bb802c9ce6644017d176c5ce6111517e62221bbcab75221aa863b23b5321c868dd2746e897d
7
- data.tar.gz: 3fa19422cbc4c41217b167e54a3deed64254bf4ab9a0ea215501dbf06bed28b72a0d50aa1314ba9edc66be09d98eb174b60d718dbcb139c635d07409f15dbd91
6
+ metadata.gz: bec11cc4fb6edda0b740117e9c7b3f2bf6c5393c816ca77942ca9bcb46ad15690e04cb3809eaf10052d85f0d248a9186dfedeeda7090a9de0399a5e2461b0199
7
+ data.tar.gz: 2fdf42dc05d95f5514a8e7c84013db93e64fd14075289eb0273d8efba228d518e0a435ed93971a969d8cc00311fc8d2e4a7876600bd0d9c869144359b8d4a088
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## 0.2.0 - 2016-07-29
9
+
10
+ ### Fixed
11
+
12
+ - Fix issue where no having a VCR cassette in use caused an error [#11](https://github.com/everypolitician/scraped_page_archive/issues/11).
13
+ - Fix issue where `git_remote_get_url_origin` was causing an error when no in a git repo.
14
+
8
15
  ## 0.1.0 - 2016-07-28
9
16
 
10
17
  ### Features
@@ -13,3 +20,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
13
20
  - Save the interaction to a git repository
14
21
 
15
22
  [Unreleased]: https://github.com/everypolitician/scraped_page_archive/compare/v0.1.0...HEAD
23
+ [0.2.0]: https://github.com/everypolitician/scraped_page_archive/compare/v0.1.0...v0.2.0
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ScrapedPageArchive
1
+ # ScrapedPageArchive [![Build Status](https://travis-ci.org/everypolitician/scraped_page_archive.svg?branch=master)](https://travis-ci.org/everypolitician/scraped_page_archive) [![Gem Version](https://badge.fury.io/rb/scraped_page_archive.svg)](https://badge.fury.io/rb/scraped_page_archive)
2
2
 
3
3
  Add this gem to your Ruby scraper and it will automatically capture http requests
4
4
  and cache the response in a branch within your git repository.
@@ -1,3 +1,3 @@
1
1
  module ScrapedPageArchive
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
@@ -8,6 +8,7 @@ VCR.configure do |config|
8
8
  config.cassette_serializers[:vcr_archive] = VCR::Archive::Serializer
9
9
  config.cassette_persisters[:vcr_archive] = VCR::Archive::Persister
10
10
  config.default_cassette_options = { serialize_with: :vcr_archive, persist_with: :vcr_archive, record: :all }
11
+ config.allow_http_connections_when_no_cassette = true
11
12
  end
12
13
 
13
14
  module ScrapedPageArchive
@@ -79,9 +80,8 @@ module ScrapedPageArchive
79
80
  end
80
81
 
81
82
  def git_remote_get_url_origin
82
- @git_remote_get_url_origin ||= begin
83
- remote_url = `git remote get-url origin`.chomp
84
- remote_url.empty? ? nil : remote_url
85
- end
83
+ remote_url = `git config remote.origin.url`.chomp
84
+ return nil unless $?.success?
85
+ remote_url
86
86
  end
87
87
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scraped_page_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Mytton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-28 00:00:00.000000000 Z
11
+ date: 2016-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vcr-archive