rspec_file_chef 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/Gemfile +4 -4
- data/Gemfile.lock +19 -19
- data/README.md +16 -3
- data/lib/rspec_file_chef/version.rb +1 -1
- data/rspec_file_env.gemspec +2 -3
- metadata +15 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31b0113c944ea1c5a1db988cff3b8acd1ec3bf4db606cb3da83a7912f5261972
|
4
|
+
data.tar.gz: 98e8fe9b04bae2ee3c23f71412ccd3716bee8aa0676933fdb3b32f8abd2b5177
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e909fb40d64d4dfb552aa534585f4cfe2f7ab045a73850114f55cb80aa70e899f31140ac2f3af112b07187a559e6b496d1f8d6568d603fe81fe4d914294e9dee
|
7
|
+
data.tar.gz: ae572f2f851e75df072e090b1eab8593ae60091c012f278e04743fbc8e3d98f0f94b72833346d4fabf074dbe09fdd615f9ac442bc8ea87674f9061c86bce6a73
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -2,10 +2,10 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
4
|
|
5
|
-
gem 'dry-configurable'
|
5
|
+
gem 'dry-configurable', '0.7'
|
6
6
|
|
7
7
|
group :test do
|
8
|
-
gem 'rspec'
|
9
|
-
gem 'simplecov', '~> 0.13
|
10
|
-
gem 'codeclimate-test-reporter'
|
8
|
+
gem 'rspec', '~> 3.9'
|
9
|
+
gem 'simplecov', '~> 0.13'
|
10
|
+
gem 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.9'
|
11
11
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
codeclimate-test-reporter (1.0.
|
4
|
+
codeclimate-test-reporter (1.0.9)
|
5
5
|
simplecov (<= 0.13)
|
6
|
-
concurrent-ruby (1.
|
6
|
+
concurrent-ruby (1.1.6)
|
7
7
|
diff-lcs (1.3)
|
8
8
|
docile (1.1.5)
|
9
9
|
dry-configurable (0.7.0)
|
10
10
|
concurrent-ruby (~> 1.0)
|
11
|
-
json (2.
|
12
|
-
rspec (3.
|
13
|
-
rspec-core (~> 3.
|
14
|
-
rspec-expectations (~> 3.
|
15
|
-
rspec-mocks (~> 3.
|
16
|
-
rspec-core (3.
|
17
|
-
rspec-support (~> 3.
|
18
|
-
rspec-expectations (3.
|
11
|
+
json (2.3.0)
|
12
|
+
rspec (3.9.0)
|
13
|
+
rspec-core (~> 3.9.0)
|
14
|
+
rspec-expectations (~> 3.9.0)
|
15
|
+
rspec-mocks (~> 3.9.0)
|
16
|
+
rspec-core (3.9.1)
|
17
|
+
rspec-support (~> 3.9.1)
|
18
|
+
rspec-expectations (3.9.0)
|
19
19
|
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
-
rspec-support (~> 3.
|
21
|
-
rspec-mocks (3.
|
20
|
+
rspec-support (~> 3.9.0)
|
21
|
+
rspec-mocks (3.9.1)
|
22
22
|
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
-
rspec-support (~> 3.
|
24
|
-
rspec-support (3.
|
23
|
+
rspec-support (~> 3.9.0)
|
24
|
+
rspec-support (3.9.2)
|
25
25
|
simplecov (0.13.0)
|
26
26
|
docile (~> 1.1.0)
|
27
27
|
json (>= 1.8, < 3)
|
@@ -32,10 +32,10 @@ PLATFORMS
|
|
32
32
|
ruby
|
33
33
|
|
34
34
|
DEPENDENCIES
|
35
|
-
codeclimate-test-reporter
|
36
|
-
dry-configurable
|
37
|
-
rspec
|
38
|
-
simplecov (~> 0.13
|
35
|
+
codeclimate-test-reporter (~> 1.0, >= 1.0.9)
|
36
|
+
dry-configurable (= 0.7)
|
37
|
+
rspec (~> 3.9)
|
38
|
+
simplecov (~> 0.13)
|
39
39
|
|
40
40
|
BUNDLED WITH
|
41
|
-
1.16.
|
41
|
+
1.16.6
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# RSpec File Chef
|
2
|
-
<a href="https://codeclimate.com/github/bestwebua/rspec_file_chef/maintainability"><img src="https://api.codeclimate.com/v1/badges/4d21c733276304e2e8e1/maintainability" /></a> <a href="https://codeclimate.com/github/bestwebua/rspec_file_chef/test_coverage"><img src="https://api.codeclimate.com/v1/badges/4d21c733276304e2e8e1/test_coverage" /></a> [![Gem Version](https://badge.fury.io/rb/rspec_file_chef.svg)](https://badge.fury.io/rb/rspec_file_chef)
|
2
|
+
<a href="https://codeclimate.com/github/bestwebua/rspec_file_chef/maintainability"><img src="https://api.codeclimate.com/v1/badges/4d21c733276304e2e8e1/maintainability" /></a> <a href="https://codeclimate.com/github/bestwebua/rspec_file_chef/test_coverage"><img src="https://api.codeclimate.com/v1/badges/4d21c733276304e2e8e1/test_coverage" /></a> [![Gem Version](https://badge.fury.io/rb/rspec_file_chef.svg)](https://badge.fury.io/rb/rspec_file_chef) [![Build Status](https://travis-ci.org/bestwebua/rspec_file_chef.svg?branch=master)](https://travis-ci.org/bestwebua/rspec_file_chef)
|
3
3
|
|
4
4
|
The main idea of this gem is saving previous state of tracking files after running RSpec. It should be helpful when your project is using it's own local files to record some data or a log. And you don't want RSpec to change it. Or you don't want to get a lot of temporary test files in your project root folder after your tests were complete.
|
5
5
|
|
@@ -182,7 +182,20 @@ Returns associative array, where all tracking file-names are represented as keys
|
|
182
182
|
```
|
183
183
|
|
184
184
|
## Examples of using
|
185
|
-
|
185
|
+
|
186
|
+
### Real and virtual files, what does it mean?
|
187
|
+
|
188
|
+
Real file is an existing file which state you want to keep during running tests. Virtual file is a file the state of which you want to control, but this file not exist until you run tests.
|
189
|
+
|
190
|
+
**1. Using as cleaner**
|
191
|
+
|
192
|
+
For example, you know which file your app logged. Before your tests run your log-file not existen. You need to check is your app write the log during your tests. But you don't wont to see this log after your tests. This is case for using virtual files. Just pass the absolute path for this file/files as argument: ```RspecFileChef::FileChef.new(your_virtual_file)```.
|
193
|
+
|
194
|
+
**2. Using as file switcher**
|
195
|
+
|
196
|
+
Your project has use some local data files. You need that this file/files has contain a certain data before you run tests. Just pass the absolute path for this file/files as argument: ```RspecFileChef::FileChef.new(your_file)``` and put file/files with same name(s) into your test_dir. Your file can be either real or virtual. FileChef saves the file state if file is real, and uses example from test_dir during your test run. Otherwise FileChef just uses file from test_dir when your tests running.
|
197
|
+
|
198
|
+
### FileChef config examples
|
186
199
|
|
187
200
|
**1. Using default gem paths**
|
188
201
|
|
@@ -221,7 +234,7 @@ RSpec.describe SomeTestClass do
|
|
221
234
|
config.custom_test_dir = 'your_absolute_path_to_existing_test_dir'
|
222
235
|
end
|
223
236
|
|
224
|
-
file1, file2, file3 = '/path/somefile1', /path/path/somefile2', '/path/path/path/somefile3'
|
237
|
+
file1, file2, file3 = '/path/somefile1', '/path/path/somefile2', '/path/path/path/somefile3'
|
225
238
|
|
226
239
|
@env = RspecFileChef::FileChef.new(file1, file2, file3)
|
227
240
|
@env.make
|
data/rspec_file_env.gemspec
CHANGED
@@ -21,8 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.add_dependency
|
24
|
+
spec.add_dependency "dry-configurable", "0.7"
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.16"
|
26
|
-
spec.add_development_dependency "rake", "~>
|
27
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
26
|
+
spec.add_development_dependency "rake", "~> 13.0", ">= 13.0.1"
|
28
27
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_file_chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Trotsenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '0.7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '0.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +44,20 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '10.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
47
|
+
version: '13.0'
|
48
|
+
- - ">="
|
60
49
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
50
|
+
version: 13.0.1
|
62
51
|
type: :development
|
63
52
|
prerelease: false
|
64
53
|
version_requirements: !ruby/object:Gem::Requirement
|
65
54
|
requirements:
|
66
55
|
- - "~>"
|
67
56
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
57
|
+
version: '13.0'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 13.0.1
|
69
61
|
description: RSpec File Environment control. Keeper of current state of tracked files
|
70
62
|
and temporary files cleaner.
|
71
63
|
email:
|
@@ -77,6 +69,7 @@ files:
|
|
77
69
|
- ".gitignore"
|
78
70
|
- ".rspec"
|
79
71
|
- ".ruby-version"
|
72
|
+
- ".travis.yml"
|
80
73
|
- CODE_OF_CONDUCT.md
|
81
74
|
- Gemfile
|
82
75
|
- Gemfile.lock
|
@@ -112,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
105
|
version: '0'
|
113
106
|
requirements: []
|
114
107
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.7.
|
108
|
+
rubygems_version: 2.7.9
|
116
109
|
signing_key:
|
117
110
|
specification_version: 4
|
118
111
|
summary: RspecFileChef
|