flamerb 0.1.2 → 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: fef2ae9622e02fdcd6c84cb58db406dbb9b3ec4cb72a001150795b66282b8a88
4
- data.tar.gz: cf76e462eae220699cddb2707b5431177df1946fac410c822db21ac5413bce90
3
+ metadata.gz: 21cf2de29fdc8d873003895b2c56cf75f7812471ba481f297ca86fcd28a344a2
4
+ data.tar.gz: 909ef801c9df9d4668165824959595af2d3eebae808d90858756ea4655efa16c
5
5
  SHA512:
6
- metadata.gz: d680b856bcebfb8ef7e80bfeb6af0ab00bc508d5afc218dbf4f2cd3ebb31cf361496502364430aaab2ca20a72557a07320e40f0378c682ac88f9c8c9c3da6e24
7
- data.tar.gz: e38c9aaf8a1912650c5cb4bae992804f4cedb8fffcf6b1a7e20a64cb4afa34f2f3d42ceedae54b8a979a2a77248714b66a83655edc7289c99567d24f30040f5c
6
+ metadata.gz: 5b9839c63e4f8ab236d46c777fe183fc738b607dd20fc9fc648eae4e592b7ba6405164b9e59d97c18545dce030a7e18cbc5423f850343a8a301a771e6c22e53c
7
+ data.tar.gz: db0ef98dc5a90c962d2dac400f89d2c3ad49289debb5d81384e4821871b64de4c87631696f526505a1c6f11e1e4a2c1d8f2595da20fc2ac7e296a8dcb239c677
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## v0.2.0 (2023-07-13)
2
+
3
+ ### Feat
4
+
5
+ - Add rubocop-rspec and solargraph-rails
6
+ - update codeowner file
7
+
8
+ ## v0.1.3 (2023-07-12)
9
+
10
+ ### Fix
11
+
12
+ - add missing templates for testing_generator
13
+
1
14
  ## v0.1.2 (2023-07-10)
2
15
 
3
16
  ### Fix
data/README.md CHANGED
@@ -48,6 +48,12 @@ for dev dependencies
48
48
 
49
49
  Projects created with Flame come with [Standard](https://github.com/standardrb/standard)
50
50
 
51
+ ## To Do
52
+ - [x] Add [rubocop-rspec](https://github.com/rubocop/rubocop-rspec)
53
+ - [ ] Add [strong_migrations](https://github.com/ankane/strong_migrations)
54
+ - [ ] Add [bullet](https://github.com/flyerhzm/bullet)
55
+ - [ ] Add [vite-eslint-plugin](https://github.com/gxmari007/vite-plugin-eslint)
56
+
51
57
  ## Contributing
52
58
 
53
59
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/Flame.
@@ -27,8 +27,9 @@ module Flame
27
27
  invoke "flame:vite"
28
28
 
29
29
  generate("annotate:install")
30
+ template ".rubocop.yml", ".rubocop.yml"
31
+ template ".solargraph.yml", ".solargraph.yml"
30
32
  run("bundle exec standardrb --fix-unsafely")
31
- run("bundle exec haml-lint app/views -A -a")
32
33
  rails_command("db:migrate") if yes?("\nDo you want to run migrations? [y/n]")
33
34
  rails_command("db:seed") if yes?("\nDo you want to run seed? [y/n]")
34
35
  welcome_message
@@ -4,8 +4,6 @@ require "rails/generators/base"
4
4
  module Flame
5
5
  module Generators
6
6
  class Base < Rails::Generators::Base
7
- source_root File.expand_path("../../../templates", __dir__)
8
-
9
7
  private
10
8
 
11
9
  # @param [Array] packages
@@ -23,6 +21,12 @@ module Flame
23
21
  def yarn_install_dev(packages)
24
22
  run("yarn add -D #{packages.join(" ")} --silent")
25
23
  end
24
+
25
+ class << self
26
+ def source_root
27
+ File.expand_path("../../../templates", __dir__)
28
+ end
29
+ end
26
30
  end
27
31
  end
28
32
  end
@@ -6,7 +6,18 @@ module Flame
6
6
  generate("rspec:install")
7
7
  end
8
8
 
9
- def install_gems
9
+ def import_spec_support
10
+ inject_into_file(
11
+ "spec/rails_helper.rb",
12
+ "Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }\n",
13
+ before: "RSpec.configure do |config|\n"
14
+ )
15
+ end
16
+
17
+ def support_template
18
+ template("spec/support/shoulda_matchers.rb")
19
+ template("spec/support/factory_bot.rb")
20
+ template("spec/support/database_cleaner.rb")
10
21
  end
11
22
  end
12
23
  end
@@ -2,8 +2,6 @@ require_relative "base"
2
2
 
3
3
  module Flame
4
4
  class ViteGenerator < Generators::Base
5
- source_root File.expand_path("../../../templates", __dir__)
6
-
7
5
  def install
8
6
  run("rm -rf ./package.lock")
9
7
  run("yarn init -y")
data/lib/flame/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Flame
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  RUBY_VERSION = "3.2.2"
4
4
  RAILS_VERSION = "6.1.7"
5
5
  end
@@ -21,7 +21,10 @@ group :development do
21
21
  gem "annotate"
22
22
  gem "listen"
23
23
  gem "spring"
24
- gem "standard"
24
+ gem "standard", "~> 1.30.1"
25
+ gem "rubocop-rspec", "~> 2.22", require: false
26
+ gem "rubocop-rails", "~> 2.20", require: false
27
+ gem "solargraph-rails", "~> 1.1", require: false
25
28
  gem "html2haml" # Remove this gem!
26
29
  gem "haml_lint", require: false
27
30
  end
@@ -0,0 +1,12 @@
1
+ RSpec.configure do |config|
2
+ config.before(:suite) do
3
+ DatabaseCleaner.strategy = :transaction
4
+ DatabaseCleaner.clean_with(:truncation)
5
+ end
6
+
7
+ config.around(:each) do |example|
8
+ DatabaseCleaner.cleaning do
9
+ example.run
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ config.include FactoryBot::Syntax::Methods
3
+ end
@@ -0,0 +1,6 @@
1
+ Shoulda::Matchers.configure do |config|
2
+ config.integrate do |with|
3
+ with.test_framework :rspec
4
+ with.library :rails
5
+ end
6
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flamerb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - n0tbot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-10 00:00:00.000000000 Z
11
+ date: 2023-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -102,6 +102,9 @@ files:
102
102
  - templates/frontend/store/slices/userSlice.js
103
103
  - templates/frontend/theme/index.js
104
104
  - templates/jsconfig.json
105
+ - templates/spec/support/database_cleaner.rb
106
+ - templates/spec/support/factory_bot.rb
107
+ - templates/spec/support/shoulda_matchers.rb
105
108
  - templates/vite.config.js
106
109
  homepage: https://github.com/notb0t/flame
107
110
  licenses:
@@ -115,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
118
  requirements:
116
119
  - - ">="
117
120
  - !ruby/object:Gem::Version
118
- version: 3.2.2
121
+ version: '0'
119
122
  required_rubygems_version: !ruby/object:Gem::Requirement
120
123
  requirements:
121
124
  - - ">="