capy-spec 0.0.0 → 0.0.1

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
  SHA256:
3
- metadata.gz: 87979b96c8cd4ee56783f2435295e5fb15fa7934a0b6765504ff09e5a1c906a1
4
- data.tar.gz: a3f3e1794dae24d4b67ff1fccd99dd95093decdac15ffe3ab15b210055767f17
3
+ metadata.gz: 14e47ef1df6209dfeaed4a479d6c3a1bc924262547db85cd4d02cab2fbd6fcf7
4
+ data.tar.gz: c79e91903c67a2341e1e44d141a15b073d1f1120fc122b7b1e9446c67ce8935d
5
5
  SHA512:
6
- metadata.gz: 36c9fd78b9a0ab6c2b333482431caa71fe5452dd9cbf9ea94eb08613879f598a218d8962b570b34322389b04923e7bc1f5cead70be1e108db95823b5082df95a
7
- data.tar.gz: 34772b8e9c21feff2816dbbf71ddb7f445d08b453d60dc7ac024c8d36afc92d6955951ac930e34283ee3dc9d14a4aee63ef524e4899f2ad7d15146ea9b2c8b40
6
+ metadata.gz: cd5e6f235fcc1cd8ad8bd22543c91f150a4a1b60a0834d688f1cda1ebfc6ef9fa2df7a314987127af49c3309d0a71ba6fd0b454428d60a29ac3df7eefb0f3009
7
+ data.tar.gz: 44165ed7f6ecb58b838c55a785af5bc4e30c413c153b693cca62620c079c1ba374df40aeddf6793a2b14134bbfa4e92a9d0766a1cefbb693920e59ae29aa2a93
data/.rubocop.yml ADDED
@@ -0,0 +1,14 @@
1
+ require:
2
+ - rubocop-rails
3
+ - rubocop-factory_bot
4
+ - rubocop-capybara
5
+ - rubocop-rspec
6
+ - rubocop-rake
7
+
8
+ inherit_gem:
9
+ standard: config/base.yml
10
+
11
+ AllCops:
12
+ NewCops: enable
13
+ TargetRubyVersion: 3.3
14
+ TargetRailsVersion: 7.1
data/Makefile ADDED
@@ -0,0 +1,8 @@
1
+ GEM_TO_PUSH = `ls capy-spec*.gem | tail -n 1`
2
+
3
+ build:
4
+ gem build capy-spec.gemspec
5
+
6
+ publish:
7
+ @echo "gem push ${GEM_TO_PUSH}"
8
+ @gem push ${GEM_TO_PUSH}
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Capy::Spec
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/capy/spec`. To experiment with that code, run `bin/console` for an interactive prompt.
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/capy/spec/version"
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 = Capy::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,37 @@ 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"
33
66
  end
@@ -0,0 +1,11 @@
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
+ require "capy_spec/simplecov"
10
+
11
+ 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,5 @@
1
+ require "factory_bot_rails"
2
+
3
+ RSpec.configure do |config|
4
+ config.include FactoryBot::Syntax::Methods
5
+ end
@@ -0,0 +1,3 @@
1
+ require "faker"
2
+
3
+ Faker::Config.locale = I18n.locale
@@ -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,3 @@
1
+ require "rubocop-rspec"
2
+ require "rubocop-capybara"
3
+ require "rubocop-factory_bot"
@@ -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,8 @@
1
+ require "simplecov"
2
+ require "simplecov-json"
3
+
4
+ SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
5
+ [SimpleCov::Formatter::HTMLFormatter, SimpleCov::Formatter::JSONFormatter]
6
+ )
7
+
8
+ SimpleCov.start "rails"
@@ -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
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CapySpec
4
+ VERSION = "0.0.1"
5
+ end
data/lib/capy_spec.rb ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "capy_spec/version"
4
+
5
+ module CapySpec
6
+ class Error < StandardError; end
7
+ end
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.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Walmir Neto
@@ -9,7 +9,231 @@ 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
13
237
  description:
14
238
  email:
15
239
  - owalmirneto@gmail.com
@@ -18,13 +242,25 @@ extensions: []
18
242
  extra_rdoc_files: []
19
243
  files:
20
244
  - ".rspec"
245
+ - ".rubocop.yml"
21
246
  - ".standard.yml"
22
247
  - LICENSE.txt
248
+ - Makefile
23
249
  - README.md
24
250
  - Rakefile
25
251
  - capy-spec.gemspec
26
- - lib/capy/spec.rb
27
- - lib/capy/spec/version.rb
252
+ - lib/capy_spec.rb
253
+ - lib/capy_spec/all.rb
254
+ - lib/capy_spec/capybara.rb
255
+ - lib/capy_spec/database_cleaner.rb
256
+ - lib/capy_spec/factory_bot.rb
257
+ - lib/capy_spec/faker.rb
258
+ - lib/capy_spec/rails_helper.rb
259
+ - lib/capy_spec/rubocop.rb
260
+ - lib/capy_spec/shoulda_matchers.rb
261
+ - lib/capy_spec/simplecov.rb
262
+ - lib/capy_spec/spec_helper.rb
263
+ - lib/capy_spec/version.rb
28
264
  - sig/capy/spec.rbs
29
265
  homepage: https://github.com/LavendaSoftware/capy-spec
30
266
  licenses:
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Capy
4
- module Spec
5
- VERSION = "0.0.0"
6
- end
7
- end
data/lib/capy/spec.rb DELETED
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "spec/version"
4
-
5
- module Capy
6
- module Spec
7
- class Error < StandardError; end
8
- # Your code goes here...
9
- end
10
- end