teleporter 0.0.13 → 0.0.14
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/lib/generators/initial/rspec_base.rb +7 -6
- data/lib/generators/initial/templates/rspec_base/{capybara.rb → configs/capybara.rb} +0 -0
- data/lib/generators/initial/templates/rspec_base/{database_cleaner.rb → configs/database_cleaner.rb} +0 -0
- data/lib/generators/initial/templates/rspec_base/{devise.rb → configs/devise.rb} +0 -0
- data/lib/generators/initial/templates/rspec_base/{factory_girl.rb → configs/factory_girl.rb} +0 -0
- data/lib/generators/initial/templates/rspec_base/configs/vcr.rb +16 -0
- data/lib/generators/initial/templates/rspec_base/shared_examples/sample_shared.rb +10 -0
- data/lib/teleporter/version.rb +1 -1
- metadata +7 -7
- data/lib/generators/initial/templates/rspec_base/spec_helpers.rb +0 -9
- data/lib/generators/initial/templates/rspec_base/vcr.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e43ccced988cf7d5a53d281defd103e6c739b272
|
4
|
+
data.tar.gz: 56384346fae0756f1ba1e5bff9a40b70173b7a1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12756dfbb76e86582bc1f0847e4eb9b77df1085b3017a5526aa38ae788ccf086156091a94c248420acd14c79a87b9e2bbee88ea1f437cd628b58b7cd792ac1c2
|
7
|
+
data.tar.gz: 7e1c39cf47c4173c5b4da13a90448d456244f293629c84fbc2e7ffba8ec9bf0320e1c083d183b66fa21a02f12eb9b0e43b50d1068b1207983f5ea1c7cf466431
|
@@ -22,12 +22,13 @@ module Initial
|
|
22
22
|
|
23
23
|
generate 'rspec:install'
|
24
24
|
|
25
|
-
template 'rspec_base/capybara.rb', 'spec/support/capybara.rb'
|
26
|
-
template 'rspec_base/database_cleaner.rb', 'spec/support/database_cleaner.rb'
|
27
|
-
template 'rspec_base/factory_girl.rb', 'spec/support/factory_girl.rb'
|
28
|
-
template 'rspec_base/
|
29
|
-
template 'rspec_base/
|
30
|
-
|
25
|
+
template 'rspec_base/configs/capybara.rb', 'spec/support/configs/capybara.rb'
|
26
|
+
template 'rspec_base/configs/database_cleaner.rb', 'spec/support/configs/database_cleaner.rb'
|
27
|
+
template 'rspec_base/configs/factory_girl.rb', 'spec/support/configs/factory_girl.rb'
|
28
|
+
template 'rspec_base/configs/devise.rb', 'spec/support/configs/devise.rb'
|
29
|
+
template 'rspec_base/configs/vcr.rb', 'spec/support/configs/vcr.rb'
|
30
|
+
|
31
|
+
template 'rspec_base/shared_examples/sample_shared.rb', 'spec/support/shared_examples/sample_shared.rb'
|
31
32
|
|
32
33
|
run 'bundle exec spring binstub rspec'
|
33
34
|
|
File without changes
|
data/lib/generators/initial/templates/rspec_base/{database_cleaner.rb → configs/database_cleaner.rb}
RENAMED
File without changes
|
File without changes
|
data/lib/generators/initial/templates/rspec_base/{factory_girl.rb → configs/factory_girl.rb}
RENAMED
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'vcr'
|
2
|
+
require 'webmock/rspec'
|
3
|
+
|
4
|
+
VCR.configure do |c|
|
5
|
+
c.cassette_library_dir = "spec/cassettes"
|
6
|
+
c.hook_into :webmock
|
7
|
+
c.configure_rspec_metadata!
|
8
|
+
c.before_record do |i|
|
9
|
+
i.response.body.force_encoding('UTF-8')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# Usage:
|
14
|
+
# it 'sends request', :vcr do
|
15
|
+
# . . .
|
16
|
+
# end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# https://www.relishapp.com/rspec/rspec-core/docs/example-groups/shared-examples
|
2
|
+
# include_examples "name" # include the examples in the current context
|
3
|
+
# include_content "name" # include the examples in the current context
|
4
|
+
# it_behaves_like "name" # include the examples in a nested context
|
5
|
+
# it_should_behave_like "name" # include the examples in a nested context
|
6
|
+
# matching metadata # include the examples in the current context
|
7
|
+
#
|
8
|
+
shared_examples "name" do
|
9
|
+
|
10
|
+
end
|
data/lib/teleporter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teleporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ponomarev Nikolay
|
@@ -87,12 +87,12 @@ files:
|
|
87
87
|
- lib/generators/initial/templates/capistrano/tasks/logs.cap
|
88
88
|
- lib/generators/initial/templates/capistrano/tasks/restart.cap
|
89
89
|
- lib/generators/initial/templates/capistrano/tasks/setup_config.cap
|
90
|
-
- lib/generators/initial/templates/rspec_base/capybara.rb
|
91
|
-
- lib/generators/initial/templates/rspec_base/database_cleaner.rb
|
92
|
-
- lib/generators/initial/templates/rspec_base/devise.rb
|
93
|
-
- lib/generators/initial/templates/rspec_base/factory_girl.rb
|
94
|
-
- lib/generators/initial/templates/rspec_base/
|
95
|
-
- lib/generators/initial/templates/rspec_base/
|
90
|
+
- lib/generators/initial/templates/rspec_base/configs/capybara.rb
|
91
|
+
- lib/generators/initial/templates/rspec_base/configs/database_cleaner.rb
|
92
|
+
- lib/generators/initial/templates/rspec_base/configs/devise.rb
|
93
|
+
- lib/generators/initial/templates/rspec_base/configs/factory_girl.rb
|
94
|
+
- lib/generators/initial/templates/rspec_base/configs/vcr.rb
|
95
|
+
- lib/generators/initial/templates/rspec_base/shared_examples/sample_shared.rb
|
96
96
|
- lib/generators/initial/templates/welcome/index.haml
|
97
97
|
- lib/generators/initial/templates/welcome/welcome_controller.rb
|
98
98
|
- lib/generators/initial/welcome.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'vcr'
|
2
|
-
require 'webmock/rspec'
|
3
|
-
|
4
|
-
VCR.configure do |c|
|
5
|
-
c.cassette_library_dir = "spec/cassettes"
|
6
|
-
c.hook_into :webmock
|
7
|
-
end
|
8
|
-
|
9
|
-
RSpec.configure do |config|
|
10
|
-
config.around(:each, :vcr) do |example|
|
11
|
-
name = example.metadata[:full_description].split(/\s+/, 2).join("/").underscore.gsub(/[^\w\/]+/, "_")
|
12
|
-
options = example.metadata.slice(:record, :match_requests_on).except(:example_group)
|
13
|
-
VCR.use_cassette(name, options) { example.call }
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# Usage:
|
18
|
-
# it 'sends request', :vcr, record: :new_episodes do
|
19
|
-
# . . .
|
20
|
-
# end
|