rails_architect_analyzer 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3daee9a73f1985066be97b4fdc48933a4891aab1087695b2c0e8b108cbb18bf
4
- data.tar.gz: a18938b51ff289e99cfe707e97a2ee89d8e15f271dbe677d90f68bd45dadd349
3
+ metadata.gz: 456101e97998188339efbd403e99116debf7d2672b7ba0cb47ae1397e4b9f964
4
+ data.tar.gz: '09efd2a24100d606b05c084c661d903c3fe46246b0b127e3e261de7634f52316'
5
5
  SHA512:
6
- metadata.gz: 9cb395f7696debbf94f875e8024eeb0a87a842cd676411eb92dc3ee4d7c5ba876e41f2244ee42a6ed41023850d099598cb563c97386c53d7c1fa752056a0a842
7
- data.tar.gz: f7f0223c8eee0a3cead24e38642d3a4588a6fa42d03e0c045e5e6417e8c2ebf602644244f74b104b0cd860e345ffc844b7d34cb0bca8608fcdc925bbcef7a96a
6
+ metadata.gz: 1fe8ec5b36e32d997ccc70a656bd55b06cb23ccd5097c039463d0988c3e82226203ad29499a69d3b27a3e49decbf95730361dd2cf9388eb5f80f09eb82ef2b55
7
+ data.tar.gz: f1bd72d57be9873cbf38923bd4f1808f4ae5b258fb18ae9e64fbc40ff89b8060386ea55403c854053dacd7dc64f44e8a9d682a8dcd6d2a38ad78b367cebdcdf2
@@ -28,25 +28,25 @@ jobs:
28
28
  - name: Run RuboCop
29
29
  run: bundle exec rubocop --display-cop-names
30
30
 
31
- build:
32
- needs: test
33
- runs-on: ubuntu-latest
34
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
35
-
36
- steps:
37
- - uses: actions/checkout@v3
38
-
39
- - name: Set up Ruby
40
- uses: ruby/setup-ruby@v1
41
- with:
42
- ruby-version: '3.3'
43
- bundler-cache: true
44
-
45
- - name: Build gem
46
- run: bundle exec rake build
47
-
48
- - name: Upload artifact
49
- uses: actions/upload-artifact@v3
50
- with:
51
- name: rails_architect-gem
52
- path: pkg/
31
+ # build:
32
+ # needs: test
33
+ # runs-on: ubuntu-latest
34
+ # if: github.event_name == 'push' && github.ref == 'refs/heads/main'
35
+ #
36
+ # steps:
37
+ # - uses: actions/checkout@v3
38
+ #
39
+ # - name: Set up Ruby
40
+ # uses: ruby/setup-ruby@v1
41
+ # with:
42
+ # ruby-version: '3.3'
43
+ # bundler-cache: true
44
+ #
45
+ # - name: Build gem
46
+ # run: bundle exec rake build
47
+ #
48
+ # - name: Upload artifact
49
+ # uses: actions/upload-artifact@v3
50
+ # with:
51
+ # name: rails_architect_analyzer-gem
52
+ # path: pkg/
data/.gitignore CHANGED
@@ -36,4 +36,5 @@ SETUP_SUMMARY.md
36
36
  PUBLISH_INSTRUCTIONS.md
37
37
  publish_gem.sh
38
38
  PUBLISH_MANUAL.md
39
- PROJECT_SUMMARY.md
39
+ PROJECT_SUMMARY.md
40
+ NEXT_STEP.md
data/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ Todas as mudanças notáveis neste projeto serão documentadas neste arquivo.
5
5
  O formato é baseado em [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  e este projeto segue [Semantic Versioning](https://semver.org/lang/pt_BR/).
7
7
 
8
+ ## [0.1.1] - 2025-12-08
9
+
10
+ ### Added
11
+ - ✨ Cobertura completa de testes com 53 exemplos
12
+ - ✨ Testes para todos os 4 analyzers (Architecture, TDD, BDD, SOLID)
13
+ - ✨ Testes para CLI e ReportGenerator
14
+ - ✨ Testes para Core module
15
+
16
+ ### Fixed
17
+ - 🐛 Corrigidas violações RuboCop (whitespace, imports)
18
+ - 🐛 Suprimido aviso de false positive do RSpec
19
+
20
+ ### Changed
21
+ - 📝 Configuração de testes aprimorada com exclude_pattern
22
+
8
23
  ## [0.1.0] - 2025-12-08
9
24
 
10
25
  ### Added
data/CONTRIBUTING.md CHANGED
@@ -46,7 +46,7 @@ A Rails Architect analisa automaticamente a estrutura do seu projeto Rails e for
46
46
  Adicione à seu `Gemfile`:
47
47
 
48
48
  ```ruby
49
- gem 'rails_architect'
49
+ gem 'rails_architect_analyzer'
50
50
  ```
51
51
 
52
52
  Execute:
@@ -58,7 +58,7 @@ bundle install
58
58
  ### 2. Via Gem Manual
59
59
 
60
60
  ```bash
61
- gem install rails_architect
61
+ gem install rails_architect_analyzer
62
62
  ```
63
63
 
64
64
  ## 📖 Uso
data/GUIDE.md ADDED
@@ -0,0 +1,154 @@
1
+ # 🚀 Testando Rails Architect - Guia Prático
2
+
3
+ ## Passo 1: Instalar Dependências
4
+
5
+ ```bash
6
+ cd rails_architect
7
+ bundle install
8
+ ```
9
+
10
+ **Esperado:** Instala todas as gems do Gemfile.
11
+
12
+ ## Passo 2: Verificar Executável
13
+
14
+ ```bash
15
+ # Ver se o executável funciona
16
+ bundle exec exe/rails_architect version
17
+ ```
18
+
19
+ **Esperado Output:**
20
+ ```
21
+ Rails Architect 0.1.0
22
+ ```
23
+
24
+ ## Passo 3: Testar em um Projeto Rails Real
25
+
26
+ ### Opção A: Usar um projeto Rails existente
27
+
28
+ ```bash
29
+ # Se você tiver um projeto Rails
30
+ cd /seu/projeto/rails
31
+ bundle exec rails_architect analyze .
32
+ ```
33
+
34
+ ### Opção B: Criar um projeto Rails de teste
35
+
36
+ ```bash
37
+ # Criar projeto Rails temporário
38
+ cd /tmp
39
+ rails new test_rails_app
40
+ cd test_rails_app
41
+
42
+ # Testar a gem
43
+ /Users/danielmatos-pro/www/created_ruby_gem/rails_architect/exe/rails_architect analyze .
44
+ ```
45
+
46
+ ## Passo 4: Testar Comandos
47
+
48
+ ```bash
49
+ cd rails_architect
50
+
51
+ # 1. Análise completa
52
+ bundle exec exe/rails_architect analyze /seu/projeto/rails
53
+
54
+ # 2. Ver apenas sugestões
55
+ bundle exec exe/rails_architect suggest /seu/projeto/rails
56
+
57
+ # 3. Exportar JSON
58
+ bundle exec exe/rails_architect analyze /seu/projeto/rails --json --output report.json
59
+
60
+ # 4. Ver versão
61
+ bundle exec exe/rails_architect version
62
+ ```
63
+
64
+ ## Passo 5: Testar em Ruby Interativo
65
+
66
+ ```bash
67
+ cd rails_architect
68
+
69
+ bundle exec irb -Ilib -rrails_architect
70
+
71
+ # No console IRB:
72
+ project_path = '/seu/projeto/rails'
73
+ results = RailsArchitect.analyze(project_path)
74
+ puts results[:architecture][:score]
75
+ ```
76
+
77
+ ## Passo 6: Executar Testes (RSpec)
78
+
79
+ ```bash
80
+ cd rails_architect
81
+
82
+ # Todos os testes
83
+ bundle exec rake spec
84
+
85
+ # Um arquivo específico
86
+ bundle exec rspec spec/rails_architect_spec.rb
87
+
88
+ # Com saída detalhada
89
+ bundle exec rspec -v
90
+ ```
91
+
92
+ ## Passo 7: Verificar Código (RuboCop)
93
+
94
+ ```bash
95
+ cd rails_architect
96
+
97
+ # Verificar
98
+ bundle exec rubocop
99
+
100
+ # Auto-corrigir
101
+ bundle exec rubocop -a
102
+ ```
103
+
104
+ ## ✅ Checklist Completo
105
+
106
+ ```bash
107
+ # 1. Dependências
108
+ cd rails_architect && bundle install
109
+
110
+ # 2. Versão
111
+ bundle exec exe/rails_architect version
112
+
113
+ # 3. Testes
114
+ bundle exec rake spec
115
+
116
+ # 4. RuboCop
117
+ bundle exec rubocop
118
+
119
+ # 5. Analisar projeto de teste
120
+ bundle exec exe/rails_architect analyze /seu/projeto/rails
121
+
122
+ # 6. Sugestões
123
+ bundle exec exe/rails_architect suggest /seu/projeto/rails
124
+ ```
125
+
126
+ ## 🐛 Se Encontrar Erros
127
+
128
+ ### Erro: "Could not find gem 'rails_architect'"
129
+
130
+ ```bash
131
+ cd rails_architect
132
+ bundle install
133
+ ```
134
+
135
+ ### Erro: "No such file or directory"
136
+
137
+ ```bash
138
+ # Certifique-se de estar no diretório correto
139
+ cd rails_architect
140
+ pwd # Deve mostrar o path correto
141
+ ```
142
+
143
+ ### Erro: "Gem not found"
144
+
145
+ ```bash
146
+ # Instale localmente
147
+ cd rails_architect
148
+ bundle exec rake build
149
+ gem install pkg/rails_architect-0.1.0.gem
150
+ ```
151
+
152
+ ---
153
+
154
+ **Comece pelo Passo 1 e vá seguindo em ordem!** 🎯
data/INDEX.md CHANGED
@@ -60,7 +60,7 @@
60
60
 
61
61
  ### Instalação
62
62
  ```bash
63
- gem 'rails_architect'
63
+ gem 'rails_architect_analyzer'
64
64
  bundle install
65
65
  ```
66
66
 
@@ -173,7 +173,7 @@ Sim! A gem é compatível com Rails 6.0+.
173
173
  ## 🔗 Links Úteis
174
174
 
175
175
  - **GitHub**: https://github.com/daniel8486/rails_architect
176
- - **RubyGems**: https://rubygems.org/gems/rails_architect
176
+ - **RubyGems**: https://rubygems.org/gems/rails_architect_analyzer
177
177
  - **Issues**: https://github.com/daniel8486/rails_architect/issues
178
178
  - **Discussions**: https://github.com/daniel8486/rails_architect/discussions
179
179
 
data/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
  Adicione à seu Gemfile:
17
17
 
18
18
  ```ruby
19
- gem 'rails_architect'
19
+ gem 'rails_architect_analyzer'
20
20
  ```
21
21
 
22
22
  Depois execute:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsArchitect
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = "Analyze Rails projects for architecture, TDD, BDD, and SOLID principles"
14
14
  spec.description = "A gem that analyzes your Rails project structure and suggests improvements " \
15
15
  "based on architecture best practices, TDD, BDD, and SOLID principles."
16
- spec.homepage = "https://github.com/8486/rails_architect"
16
+ spec.homepage = "https://github.com/daniel8486/rails_architect"
17
17
  spec.license = "MIT"
18
18
  spec.required_ruby_version = ">= 3.3.0"
19
19
 
data/run_tests.sh ADDED
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+ cd /Users/danielmatos-pro/www/created_ruby_gem/rails_architect
3
+ bundle exec rspec --version
4
+ echo "---"
5
+ bundle exec rspec --format progress
6
+ echo "---"
7
+ bundle exec rspec --format json > /tmp/rspec_output.json
8
+ echo "Resultado salvo em /tmp/rspec_output.json"
9
+ cat /tmp/rspec_output.json | grep -o '"example_count":[0-9]*'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_architect_analyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Matos
@@ -96,6 +96,7 @@ files:
96
96
  - CODE_OF_CONDUCT.md
97
97
  - CONTRIBUTING.md
98
98
  - EXAMPLE_GEMFILE
99
+ - GUIDE.md
99
100
  - Gemfile
100
101
  - INDEX.md
101
102
  - LICENSE.md
@@ -111,7 +112,8 @@ files:
111
112
  - lib/rails_architect/reporters/report_generator.rb
112
113
  - lib/rails_architect/version.rb
113
114
  - rails_architect.gemspec
114
- homepage: https://github.com/8486/rails_architect
115
+ - run_tests.sh
116
+ homepage: https://github.com/daniel8486/rails_architect
115
117
  licenses:
116
118
  - MIT
117
119
  metadata: