capy-spec 0.0.0 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +14 -0
- data/Makefile +8 -0
- data/README.md +2 -2
- data/capy-spec.gemspec +37 -2
- data/lib/capy_spec/all.rb +10 -0
- data/lib/capy_spec/capybara.rb +15 -0
- data/lib/capy_spec/database_cleaner.rb +23 -0
- data/lib/capy_spec/factory_bot.rb +5 -0
- data/lib/capy_spec/faker.rb +3 -0
- data/lib/capy_spec/rails_helper.rb +13 -0
- data/lib/capy_spec/rubocop.rb +3 -0
- data/lib/capy_spec/shoulda_matchers.rb +13 -0
- data/lib/capy_spec/simplecov.rb +8 -0
- data/lib/capy_spec/spec_helper.rb +12 -0
- data/lib/capy_spec/version.rb +5 -0
- data/lib/capy_spec/webmock.rb +3 -0
- data/lib/capy_spec.rb +7 -0
- metadata +255 -4
- data/lib/capy/spec/version.rb +0 -7
- data/lib/capy/spec.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76f3813effafc439f3d8a05b51207591b72a99b34f44e52a2e68f2624ba3b308
|
4
|
+
data.tar.gz: 9d4ebd8c6a9f64551ec6142454163ea7ec4c63ccd8b7b79d66ea8a5522978aed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f588ea41824da65e5fda6b4113e4a1f49d0d1402eed09d333e63bb5b0adcacb4d2491f4542d00560b6324847c530e512881c93f4855e6d7d9a2f9eab650ca57
|
7
|
+
data.tar.gz: c78e6599358169e9683334df4fb42f0228b45cc2f04cc7a98333091e5ed80db38f847447e42c8f99fccb48a6d116be78b79c4acf07264576103b5c8ac8b36c87
|
data/.rubocop.yml
ADDED
data/Makefile
ADDED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# CapySpec
|
2
2
|
|
3
3
|
TODO: Delete this and the text below, and describe your gem
|
4
4
|
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/
|
5
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capy_spec`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data/capy-spec.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "lib/
|
3
|
+
require_relative "lib/capy_spec/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capy-spec"
|
7
|
-
spec.version =
|
7
|
+
spec.version = CapySpec::VERSION
|
8
8
|
spec.authors = ["Walmir Neto"]
|
9
9
|
spec.email = ["owalmirneto@gmail.com"]
|
10
10
|
|
@@ -30,4 +30,39 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.bindir = "exe"
|
31
31
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
32
|
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
# https://github.com/presidentbeef/brakeman
|
35
|
+
spec.add_dependency "brakeman", "~> 6.1.2"
|
36
|
+
# https://github.com/standardrb/standard#usage
|
37
|
+
spec.add_dependency "standard", "~> 1.33"
|
38
|
+
# https://github.com/standardrb/standard-rails#usage
|
39
|
+
spec.add_dependency "standard-rails", "~> 1.0"
|
40
|
+
# https://github.com/rubocop/rubocop-rspec#usage
|
41
|
+
spec.add_dependency "rubocop-rspec", "~> 2.26.1"
|
42
|
+
# https://github.com/rubocop/rubocop-capybara#usage
|
43
|
+
spec.add_dependency "rubocop-capybara", "~> 2.20"
|
44
|
+
# https://github.com/rubocop/rubocop-factory_bot#usage
|
45
|
+
spec.add_dependency "rubocop-factory_bot", "~> 2.25.1"
|
46
|
+
# https://github.com/Shopify/erb-lint#installation
|
47
|
+
spec.add_dependency "erb_lint", "~> 0.5.0"
|
48
|
+
# https://github.com/thoughtbot/factory_bot_rails
|
49
|
+
spec.add_dependency "factory_bot_rails", "~> 6.4.3"
|
50
|
+
# https://github.com/stympy/faker
|
51
|
+
spec.add_dependency "faker", "~> 3.2.3"
|
52
|
+
# https://github.com/thoughtbot/shoulda-matchers
|
53
|
+
spec.add_dependency "shoulda-matchers", "~> 6.1"
|
54
|
+
# https://github.com/rspec/rspec-rails#installation
|
55
|
+
spec.add_dependency "rspec-rails", "~> 6.1.1"
|
56
|
+
# https://github.com/DatabaseCleaner/database_cleaner
|
57
|
+
spec.add_dependency "database_cleaner", "~> 2.0.2"
|
58
|
+
# https://github.com/teamcapybara/capybara#setup
|
59
|
+
spec.add_dependency "capybara", "~> 3.40"
|
60
|
+
# https://github.com/SeleniumHQ/selenium/tree/trunk/rb#install
|
61
|
+
spec.add_dependency "selenium-webdriver", "~> 4.17"
|
62
|
+
# https://github.com/simplecov-ruby/simplecov#getting-started
|
63
|
+
spec.add_dependency "simplecov", "~> 0.22.0"
|
64
|
+
# https://github.com/vicentllongo/simplecov-json#usage
|
65
|
+
spec.add_dependency "simplecov-json", "~> 0.2.3"
|
66
|
+
# https://github.com/bblimke/webmock#rspec
|
67
|
+
spec.add_dependency "webmock", "~> 3.19"
|
33
68
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require "capy_spec/spec_helper"
|
2
|
+
|
3
|
+
require "capy_spec/capybara"
|
4
|
+
require "capy_spec/database_cleaner"
|
5
|
+
require "capy_spec/factory_bot"
|
6
|
+
require "capy_spec/faker"
|
7
|
+
require "capy_spec/rubocop"
|
8
|
+
require "capy_spec/shoulda_matchers"
|
9
|
+
|
10
|
+
require "capy_spec/rails_helper"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "capybara/rails"
|
2
|
+
require "capybara/rspec"
|
3
|
+
|
4
|
+
require "selenium-webdriver"
|
5
|
+
|
6
|
+
Capybara.register_driver :chrome do |app|
|
7
|
+
args = ["disable-gpu"]
|
8
|
+
headless = ActiveModel::Type::Boolean.new.cast(ENV.fetch("HEADLESS", true))
|
9
|
+
args << "headless" if headless
|
10
|
+
options = Selenium::WebDriver::Chrome::Options.new(args:)
|
11
|
+
|
12
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options:)
|
13
|
+
end
|
14
|
+
|
15
|
+
Capybara.javascript_driver = :chrome
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "database_cleaner"
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
config.before(:suite) do
|
5
|
+
DatabaseCleaner.clean_with(:truncation)
|
6
|
+
end
|
7
|
+
|
8
|
+
config.before do
|
9
|
+
DatabaseCleaner.strategy = :transaction
|
10
|
+
end
|
11
|
+
|
12
|
+
config.before(:each, :js) do
|
13
|
+
DatabaseCleaner.strategy = :truncation
|
14
|
+
end
|
15
|
+
|
16
|
+
config.before do
|
17
|
+
DatabaseCleaner.start
|
18
|
+
end
|
19
|
+
|
20
|
+
config.after do
|
21
|
+
DatabaseCleaner.clean
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
abort("The Rails environment is running in production mode!") if Rails.env.production?
|
2
|
+
|
3
|
+
require "rspec/rails"
|
4
|
+
|
5
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
config.infer_spec_type_from_file_location!
|
9
|
+
|
10
|
+
config.filter_rails_from_backtrace!
|
11
|
+
|
12
|
+
config.render_views
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require "shoulda-matchers"
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
config.include Shoulda::Matchers::ActiveModel
|
5
|
+
config.include Shoulda::Matchers::ActiveRecord
|
6
|
+
end
|
7
|
+
|
8
|
+
Shoulda::Matchers.configure do |config|
|
9
|
+
config.integrate do |with|
|
10
|
+
with.test_framework :rspec
|
11
|
+
with.library :rails
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
2
|
+
RSpec.configure do |config|
|
3
|
+
config.expect_with :rspec do |expectations|
|
4
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
5
|
+
end
|
6
|
+
|
7
|
+
config.mock_with :rspec do |mocks|
|
8
|
+
mocks.verify_partial_doubles = true
|
9
|
+
end
|
10
|
+
|
11
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
12
|
+
end
|
data/lib/capy_spec.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capy-spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Walmir Neto
|
@@ -9,7 +9,245 @@ autorequire:
|
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2024-02-14 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: brakeman
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.1.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 6.1.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: standard
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.33'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.33'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: standard-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop-rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.26.1
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.26.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-capybara
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.20'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.20'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-factory_bot
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.25.1
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.25.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: erb_lint
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.5.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.5.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: factory_bot_rails
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 6.4.3
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 6.4.3
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: faker
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 3.2.3
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 3.2.3
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: shoulda-matchers
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '6.1'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '6.1'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec-rails
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 6.1.1
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 6.1.1
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: database_cleaner
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 2.0.2
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 2.0.2
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: capybara
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '3.40'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '3.40'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: selenium-webdriver
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '4.17'
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '4.17'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: simplecov
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 0.22.0
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 0.22.0
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: simplecov-json
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 0.2.3
|
230
|
+
type: :runtime
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 0.2.3
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: webmock
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - "~>"
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '3.19'
|
244
|
+
type: :runtime
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - "~>"
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '3.19'
|
13
251
|
description:
|
14
252
|
email:
|
15
253
|
- owalmirneto@gmail.com
|
@@ -18,13 +256,26 @@ extensions: []
|
|
18
256
|
extra_rdoc_files: []
|
19
257
|
files:
|
20
258
|
- ".rspec"
|
259
|
+
- ".rubocop.yml"
|
21
260
|
- ".standard.yml"
|
22
261
|
- LICENSE.txt
|
262
|
+
- Makefile
|
23
263
|
- README.md
|
24
264
|
- Rakefile
|
25
265
|
- capy-spec.gemspec
|
26
|
-
- lib/
|
27
|
-
- lib/
|
266
|
+
- lib/capy_spec.rb
|
267
|
+
- lib/capy_spec/all.rb
|
268
|
+
- lib/capy_spec/capybara.rb
|
269
|
+
- lib/capy_spec/database_cleaner.rb
|
270
|
+
- lib/capy_spec/factory_bot.rb
|
271
|
+
- lib/capy_spec/faker.rb
|
272
|
+
- lib/capy_spec/rails_helper.rb
|
273
|
+
- lib/capy_spec/rubocop.rb
|
274
|
+
- lib/capy_spec/shoulda_matchers.rb
|
275
|
+
- lib/capy_spec/simplecov.rb
|
276
|
+
- lib/capy_spec/spec_helper.rb
|
277
|
+
- lib/capy_spec/version.rb
|
278
|
+
- lib/capy_spec/webmock.rb
|
28
279
|
- sig/capy/spec.rbs
|
29
280
|
homepage: https://github.com/LavendaSoftware/capy-spec
|
30
281
|
licenses:
|
data/lib/capy/spec/version.rb
DELETED