railg 0.3.1 → 0.4.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: 9506f87d0c30e07b64cb6c4b2d5378be39f22e34e2e78a833f36fce7938da5b8
4
- data.tar.gz: 462bd6ec9f45d52b417c60d11b3f568ff62b4d168532baa0e252af26d4ca1da2
3
+ metadata.gz: d0dd1287cbb8f73a5ba200900716057d62457c22f771e1655bbf1a669a02cf3f
4
+ data.tar.gz: 6498273be07e05ff8e59ff0c1df52e5d62491c6dd8ea91f336e410efdcaad9be
5
5
  SHA512:
6
- metadata.gz: 2bab0340c22376cd942d1f768b3254a16f7aa960433279e4ffe487c57ac8e868d8514bb3422a01e3a5e00cf58fa0c571a596cf19e9e482838ae01a9dfe0dbea9
7
- data.tar.gz: 6d0a8c5331602f298379899b44c4ac2d014186f0bf37c92d59da996c5095fabbdd0bc598c71762d34522a4f135e45c44f075a7c6600c61aea6d51157df4e3715
6
+ metadata.gz: 1a13155c03559a89dd28f52899f4233aeda70b10f9538c99e5f605fc78f9fa0cc35384a31abb44b1b8b47a9f15863df0133b01cbdee57df602c2ddfd530fdc7c
7
+ data.tar.gz: 4e7cc1cf641dc479f384bab67f1263baeff333efdc1b34d9a0c17f5a90a868da49dde1a1dba4de1cce67162d4bea6e2c3f448d523b594bf74f7bd99e531d8656
@@ -0,0 +1,24 @@
1
+ module Railg
2
+ class FbotGenerator < ::Rails::Generators::Base
3
+ def gem_add
4
+ gem 'factory_bot_rails', group: %i[development test]
5
+ end
6
+
7
+ def exec_bundle
8
+ run 'bundle'
9
+ end
10
+
11
+ def after_bundle_do
12
+ insert_into_file 'spec/support/factory_bot.rb', <<~CODE
13
+ # frozen_string_literal: true
14
+ RSpec.configure do |config|
15
+ config.include FactoryBot::Syntax::Methods
16
+ end
17
+ CODE
18
+
19
+ insert_into_file 'spec/rails_helper.rb', <<~EOT, after: "# Add additional requires below this line. Rails is not loaded until this point!\n"
20
+ require_relative 'support/factory_bot.rb'
21
+ EOT
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,15 @@
1
+ module Railg
2
+ class RspecGenerator < ::Rails::Generators::Base
3
+ def gem_add
4
+ gem 'rspec-rails', group: %i[development test]
5
+ end
6
+
7
+ def exec_bundle
8
+ run 'bundle'
9
+ end
10
+
11
+ def after_bundle_do
12
+ generate('rspec:install')
13
+ end
14
+ end
15
+ end
data/lib/railg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Railg
2
- VERSION = '0.3.1'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nishisuke
@@ -71,10 +71,11 @@ files:
71
71
  - bin/setup
72
72
  - lib/generators/railg/bulma/bulma_generator.rb
73
73
  - lib/generators/railg/default/default_generator.rb
74
+ - lib/generators/railg/fbot/fbot_generator.rb
74
75
  - lib/generators/railg/login/login_generator.rb
75
76
  - lib/generators/railg/pry/pry_generator.rb
77
+ - lib/generators/railg/rspec/rspec_generator.rb
76
78
  - lib/generators/railg/slim/slim_generator.rb
77
- - lib/generators/railg/test_gen.txt
78
79
  - lib/railg.rb
79
80
  - lib/railg/version.rb
80
81
  - railg.gemspec
@@ -1,17 +0,0 @@
1
- gem_group :development, :test do
2
- gem 'rspec-rails'
3
- gem 'factory_bot_rails'
4
- end
5
-
6
- after_bundle do
7
- generate(:'rspec:install')
8
- file 'spec/support/factory_bot.rb', <<~CODE
9
- # frozen_string_literal: true
10
- RSpec.configure do |config|
11
- config.include FactoryBot::Syntax::Methods
12
- end
13
- CODE
14
- insert_into_file 'spec/rails_helper.rb', <<~EOT, after: "# Add additional requires below this line. Rails is not loaded until this point!\n"
15
- require_relative 'support/factory_bot.rb'
16
- EOT
17
- end