routes2spec 0.1.0 → 0.2.0

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: fe60dcfbe04e4fb8eab34486d415fc35f96b4087d7cc3d526b2764b85e84c22b
4
- data.tar.gz: 91d6bbbb4e835fddf3ee82b66e2c58e0607cc75c468d013fb430ebb61f8027a7
3
+ metadata.gz: 0fc17061731dc2153d96ef54d172142c910ea6d3c2015573550adc07f480d08b
4
+ data.tar.gz: d3a56701c40d97a9c8408ab1fa8918c869aed151ed8c7fecedf190596f82b9e9
5
5
  SHA512:
6
- metadata.gz: 6a6ee2e33e390e4d70f70c50388e071381a56f96623ddfd47c1d0bb76749a9ce739ef048ad914bb65a96da3b05c7ac7a227f1b77e4363a5e85fda3c270db4960
7
- data.tar.gz: f306579044aba45f60890ab6093d5cf807bb0648f154dc3091b7b64c778e1a0f7c270c7319b3078da94f5163874e9fd8954c2c38faeb75487e95bd180029635f
6
+ metadata.gz: a71c32eea1a488faa670cec692ea8c4394fb168a11418c5cd69873a2533dc8914d54f6fc63080ca96aa5418c412689a6035926960ebc84875e2416c59049749f
7
+ data.tar.gz: 1525809ecbb6e2a7f4de27d0f904de0b2ed886f11120a4be8b227ff04e7790ec6cb350d5d19a1b61e9bbca0897d5337d360c3b98c1798cc331454edd9d599f59
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Routes2spec
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/routes2spec.svg)](https://badge.fury.io/rb/routes2spec)
4
+ [![Ruby](https://github.com/shuuuuun/routes2spec/actions/workflows/main.yml/badge.svg)](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/[USERNAME]/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/[USERNAME]/routes2spec/blob/main/CODE_OF_CONDUCT.md).
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
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Routes2spec
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
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 = "routes2spec"
12
- spec.description = "routes2spec"
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.1.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: 2022-12-06 00:00:00.000000000 Z
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: routes2spec
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.3.26
76
+ rubygems_version: 3.4.6
76
77
  signing_key:
77
78
  specification_version: 4
78
- summary: routes2spec
79
+ summary: Generate Request specs and Routing specs of RSpec, from your Rails routes
80
+ config.
79
81
  test_files: []