flamerb 0.1.2 → 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/CHANGELOG.md +13 -0
- data/README.md +6 -0
- data/lib/flame/generators/app.rb +2 -1
- data/lib/flame/generators/base.rb +6 -2
- data/lib/flame/generators/testing_generator.rb +12 -1
- data/lib/flame/generators/vite_generator.rb +0 -2
- data/lib/flame/version.rb +1 -1
- data/templates/Gemfile.erb +4 -1
- data/templates/spec/support/database_cleaner.rb +12 -0
- data/templates/spec/support/factory_bot.rb +3 -0
- data/templates/spec/support/shoulda_matchers.rb +6 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21cf2de29fdc8d873003895b2c56cf75f7812471ba481f297ca86fcd28a344a2
|
4
|
+
data.tar.gz: 909ef801c9df9d4668165824959595af2d3eebae808d90858756ea4655efa16c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b9839c63e4f8ab236d46c777fe183fc738b607dd20fc9fc648eae4e592b7ba6405164b9e59d97c18545dce030a7e18cbc5423f850343a8a301a771e6c22e53c
|
7
|
+
data.tar.gz: db0ef98dc5a90c962d2dac400f89d2c3ad49289debb5d81384e4821871b64de4c87631696f526505a1c6f11e1e4a2c1d8f2595da20fc2ac7e296a8dcb239c677
|
data/CHANGELOG.md
CHANGED
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.
|
data/lib/flame/generators/app.rb
CHANGED
@@ -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
|
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
|
data/lib/flame/version.rb
CHANGED
data/templates/Gemfile.erb
CHANGED
@@ -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
|
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.
|
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-
|
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:
|
121
|
+
version: '0'
|
119
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
123
|
requirements:
|
121
124
|
- - ">="
|