routes2spec 0.1.0 → 0.2.0
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/README.md +4 -1
- data/lib/routes2spec/command.rb +2 -1
- data/lib/routes2spec/version.rb +1 -1
- data/routes2spec.gemspec +2 -2
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0fc17061731dc2153d96ef54d172142c910ea6d3c2015573550adc07f480d08b
|
|
4
|
+
data.tar.gz: d3a56701c40d97a9c8408ab1fa8918c869aed151ed8c7fecedf190596f82b9e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a71c32eea1a488faa670cec692ea8c4394fb168a11418c5cd69873a2533dc8914d54f6fc63080ca96aa5418c412689a6035926960ebc84875e2416c59049749f
|
|
7
|
+
data.tar.gz: 1525809ecbb6e2a7f4de27d0f904de0b2ed886f11120a4be8b227ff04e7790ec6cb350d5d19a1b61e9bbca0897d5337d360c3b98c1798cc331454edd9d599f59
|
data/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Routes2spec
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/rb/routes2spec)
|
|
4
|
+
[](https://github.com/shuuuuun/routes2spec/actions/workflows/main.yml)
|
|
5
|
+
|
|
3
6
|
Generate Request specs and Routing specs of RSpec, from your Rails routes config.
|
|
4
7
|
It is useful as a test scaffolding.
|
|
5
8
|
|
|
@@ -53,7 +56,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
53
56
|
|
|
54
57
|
## Contributing
|
|
55
58
|
|
|
56
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
59
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/shuuuuun/routes2spec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/shuuuuun/routes2spec/blob/main/CODE_OF_CONDUCT.md).
|
|
57
60
|
|
|
58
61
|
## License
|
|
59
62
|
|
data/lib/routes2spec/command.rb
CHANGED
|
@@ -18,6 +18,7 @@ module Routes2spec
|
|
|
18
18
|
class_option :overwrite, banner: "", desc: "Overwrite files even if they exist."
|
|
19
19
|
class_option :force_overwrite, banner: "", desc: "Force overwrite files even if they exist."
|
|
20
20
|
class_option :pending, banner: "", desc: "Mark examples as pending."
|
|
21
|
+
class_option :routing, type: :boolean, defalut: false, desc: "Generate routing specs."
|
|
21
22
|
|
|
22
23
|
class << self
|
|
23
24
|
def executable
|
|
@@ -45,7 +46,7 @@ module Routes2spec
|
|
|
45
46
|
writing_file(relative_path, result[:content])
|
|
46
47
|
|
|
47
48
|
relative_path = File.join("spec/routing", *result[:namespaces], "#{result[:name].underscore}_spec.rb")
|
|
48
|
-
writing_file(relative_path, result[:routing_content])
|
|
49
|
+
writing_file(relative_path, result[:routing_content]) if options.routing?
|
|
49
50
|
end
|
|
50
51
|
end
|
|
51
52
|
# https://github.com/rails/rails/blob/v7.0.4/railties/lib/rails/command/base.rb#L144
|
data/lib/routes2spec/version.rb
CHANGED
data/routes2spec.gemspec
CHANGED
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.authors = ["shuuuuuny"]
|
|
9
9
|
spec.email = []
|
|
10
10
|
|
|
11
|
-
spec.summary = "
|
|
12
|
-
spec.description = "
|
|
11
|
+
spec.summary = "Generate Request specs and Routing specs of RSpec, from your Rails routes config."
|
|
12
|
+
spec.description = "Generate Request specs and Routing specs of RSpec, from your Rails routes config. It is useful as a test scaffolding."
|
|
13
13
|
spec.homepage = "https://github.com/shuuuuun/routes2spec"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
spec.required_ruby_version = ">= 2.7.0"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: routes2spec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- shuuuuuny
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-04-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -24,7 +24,8 @@ dependencies:
|
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '6.0'
|
|
27
|
-
description:
|
|
27
|
+
description: Generate Request specs and Routing specs of RSpec, from your Rails routes
|
|
28
|
+
config. It is useful as a test scaffolding.
|
|
28
29
|
email: []
|
|
29
30
|
executables:
|
|
30
31
|
- routes2spec
|
|
@@ -72,8 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
72
73
|
- !ruby/object:Gem::Version
|
|
73
74
|
version: '0'
|
|
74
75
|
requirements: []
|
|
75
|
-
rubygems_version: 3.
|
|
76
|
+
rubygems_version: 3.4.6
|
|
76
77
|
signing_key:
|
|
77
78
|
specification_version: 4
|
|
78
|
-
summary:
|
|
79
|
+
summary: Generate Request specs and Routing specs of RSpec, from your Rails routes
|
|
80
|
+
config.
|
|
79
81
|
test_files: []
|