rspec-file_fixtures 0.1.7 → 0.1.8
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 +4 -4
- data/.rubocop.yml +3 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +7 -5
- data/Makefile +1 -1
- data/lib/rspec_file_fixtures/fixture.rb +5 -0
- data/lib/rspec_file_fixtures/version.rb +1 -1
- data/rspec-documentation/pages/010-Usage/040-Copy_to.md +16 -0
- data/rspec-documentation/spec_helper.rb +2 -0
- metadata +4 -3
- /data/rspec-documentation/pages/010-Usage/{040-Pathname.md → 050-Pathname.md} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d978a8476e823c5ce576c9c394496825de1c415fe257e18190f8ab8568649c29
|
|
4
|
+
data.tar.gz: a1ef7422015b6d6be00907361d72b24c6587d8c078a0e344d81109bbcad0aa6e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56a1fedb093df9f1729cda4d71477ed59e9016b72569bbc8a350b5e8c3008c448ecd18af9b7d17ab32a317f6d9bab5ecb0e26216875c4cfad3d7027177717b21
|
|
7
|
+
data.tar.gz: 8ed1023046adbf09ab8a613bc4b43985fe0534e1c7df2487235426e11251c66c19225d1e3ccc2a044f07c07496948808b797511ae51ac3d3a5c7571b5fdb6f5d
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rspec-file_fixtures (0.1.
|
|
4
|
+
rspec-file_fixtures (0.1.8)
|
|
5
5
|
rspec (~> 3.12)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -31,7 +31,6 @@ GEM
|
|
|
31
31
|
racc (1.6.2)
|
|
32
32
|
rainbow (3.1.1)
|
|
33
33
|
rake (13.0.6)
|
|
34
|
-
redcarpet (3.6.0)
|
|
35
34
|
regexp_parser (2.8.0)
|
|
36
35
|
rexml (3.2.5)
|
|
37
36
|
rouge (4.1.2)
|
|
@@ -41,13 +40,12 @@ GEM
|
|
|
41
40
|
rspec-mocks (~> 3.12.0)
|
|
42
41
|
rspec-core (3.12.2)
|
|
43
42
|
rspec-support (~> 3.12.0)
|
|
44
|
-
rspec-documentation (0.0.
|
|
43
|
+
rspec-documentation (0.0.11)
|
|
45
44
|
htmlbeautifier (~> 1.4)
|
|
46
45
|
kramdown (~> 2.4)
|
|
47
46
|
kramdown-parser-gfm (~> 1.1)
|
|
48
47
|
nokogiri (~> 1.15)
|
|
49
48
|
paintbrush (~> 0.1.3)
|
|
50
|
-
redcarpet (~> 3.6)
|
|
51
49
|
rouge (~> 4.1)
|
|
52
50
|
rspec (~> 3.12)
|
|
53
51
|
rspec-expectations (3.12.3)
|
|
@@ -82,6 +80,9 @@ GEM
|
|
|
82
80
|
rubocop (~> 1.33)
|
|
83
81
|
rubocop-capybara (~> 2.17)
|
|
84
82
|
rubocop-factory_bot (~> 2.22)
|
|
83
|
+
rubocop-rspec-documentation (0.0.2)
|
|
84
|
+
rspec-documentation (~> 0.0.7)
|
|
85
|
+
rubocop (~> 1.52)
|
|
85
86
|
ruby-progressbar (1.13.0)
|
|
86
87
|
strong_versions (0.4.5)
|
|
87
88
|
i18n (>= 0.5)
|
|
@@ -102,7 +103,8 @@ DEPENDENCIES
|
|
|
102
103
|
rubocop (~> 1.52)
|
|
103
104
|
rubocop-rake (~> 0.6.0)
|
|
104
105
|
rubocop-rspec (~> 2.22)
|
|
106
|
+
rubocop-rspec-documentation (~> 0.0.2)
|
|
105
107
|
strong_versions (~> 0.4.5)
|
|
106
108
|
|
|
107
109
|
BUNDLED WITH
|
|
108
|
-
2.4.
|
|
110
|
+
2.4.14
|
data/Makefile
CHANGED
|
@@ -13,5 +13,5 @@ test:
|
|
|
13
13
|
.PHONY: publish
|
|
14
14
|
publish:
|
|
15
15
|
@RSPEC_DOCUMENTATION_URL_ROOT='/$(project)' bundle exec rspec-documentation
|
|
16
|
-
@rsync --delete -r rspec-documentation/bundle/
|
|
16
|
+
@rsync --delete -r rspec-documentation/bundle/ docs.bob.frl:/var/www/html/$(project)/
|
|
17
17
|
@echo 'Published.'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copy_to
|
|
2
|
+
|
|
3
|
+
You can use the `#copy_to(destination)` method to copy the fixture file to the destination path. The `#copy_to` method expects a path or string. See examples at [FileUtils#cp](https://rubyapi.org/3.3/o/fileutils#method-i-cp) method, which this method basically wraps. By using `#copy_to`, you can achieve faster file copying compared to the `File#read` then `File#write` approach, as it avoids loading the entire file into memory.
|
|
4
|
+
|
|
5
|
+
```rspec:json
|
|
6
|
+
subject { File.read(destination_path).chomp }
|
|
7
|
+
|
|
8
|
+
let(:example_fixture) { fixture('example.json') }
|
|
9
|
+
let(:destination_path) { File.join(Dir.mktmpdir, 'path/to/destination/copied.json') }
|
|
10
|
+
|
|
11
|
+
before { example_fixture.copy_to(destination_path) }
|
|
12
|
+
|
|
13
|
+
after { File.unlink(destination_path) }
|
|
14
|
+
|
|
15
|
+
it { is_expected.to eql '{"key":"value"}' }
|
|
16
|
+
```
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec-file_fixtures
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bob Farrell
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-07-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -52,7 +52,8 @@ files:
|
|
|
52
52
|
- rspec-documentation/pages/010-Usage/010-JSON.md
|
|
53
53
|
- rspec-documentation/pages/010-Usage/020-YAML.md
|
|
54
54
|
- rspec-documentation/pages/010-Usage/030-XML.md
|
|
55
|
-
- rspec-documentation/pages/010-Usage/040-
|
|
55
|
+
- rspec-documentation/pages/010-Usage/040-Copy_to.md
|
|
56
|
+
- rspec-documentation/pages/010-Usage/050-Pathname.md
|
|
56
57
|
- rspec-documentation/pages/500-License.md
|
|
57
58
|
- rspec-documentation/spec_helper.rb
|
|
58
59
|
- rspec-file_fixtures.gemspec
|
|
File without changes
|