smdev 1.2.1 → 1.2.3

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: f7cac5467108208cbfc6bb8222de4812bc7add3e1d754fa42adeadc6aeff8b9b
4
- data.tar.gz: 5eff861b8d3abe262479fc5c7359a87f7e37cc6a2604fef2432a99ed7df9629b
3
+ metadata.gz: e21d8eb42f80e6005ce00244fe18ce79f8a5fad1b75c83d5d578d1927b9ff867
4
+ data.tar.gz: 8772f52b12dacf7f1577f9881107f9bef50f6e9fd91b7aa7a33f6b007414451b
5
5
  SHA512:
6
- metadata.gz: 242145f0fb4353bc5a0258f5b806284d7a59ff9567e12c4333a155801cbd617f74d72590762386091938425cdb9ad76ae580ca0454ceefeed05d690479028ef6
7
- data.tar.gz: ac154eb5afc942887d1bbd7270092f946da4f5175c3ca67c2256c45b02a1766f25c3329a9ee0023d2bf95da275d31932e262f7256cb0799c499c9c0dce9ba5d6
6
+ metadata.gz: 502d04e0a73a55d646991c9861babcbe07e3ec46c43af8bef5139ca154aec6004c4e3a995123f0ec828e6834a2920a23cb588b1e588fa909723ed5deeec014ad
7
+ data.tar.gz: d7e5d1806307af35536a1d4aa90a56fc12b562331237632cc611bb2a05e15e802a2f7fe6f651b266b65581378ae201e6f9b497d1771d4bac8a8a9c932cc3c606
@@ -11,16 +11,19 @@ alwaysApply: false
11
11
  - Maintains code quality and readability
12
12
  - Guides architectural decisions
13
13
 
14
+
14
15
  ## Critical Rules
15
16
  - Follow current Rails version conventions
16
17
  - Use Rails generators for database changes
17
18
  - Use Ruby 3.x syntax
18
19
  - Use string interpolation over concatenation
19
20
  - Use double quotes only for interpolation
20
- - Follow "skinny controller, fat model" pattern
21
21
  - Use concerns for shared functionality
22
22
  - Use service objects for complex business logic
23
23
  - Prefer server-side solutions using Turbo over client-side JS
24
+ - Follow "skinny controller, fat model" pattern
25
+ - When refactoring controllers move logic to models before jumping to concerns or service objects
26
+ - When refactoring models move logic to concerns before jumping to service objects
24
27
 
25
28
  ## Examples
26
29
 
@@ -24,6 +24,16 @@ alwaysApply: false
24
24
  4. Typography
25
25
  5. Colors and visual effects
26
26
  - Use semantic HTML elements as base components when possible
27
+ - When using Tailwind or traditional CSS...
28
+ - Only use "flex" and flex properties when laying out a page
29
+ - Avoid "w-full" on block elements, use "flex-1" instead
30
+ - Avoid "width: 100%" on block elements, use "flex-1" instead
31
+ - Avoid "h-full" on block elements, use "flex-1" instead
32
+ - Avoid "height: 100%" on block elements, use "flex-1" instead
33
+ - Minimize the use of margins or its Tailwind equivalents "m-*" or "mb-*", use "gap" instead
34
+ - When an element has "position: absolute;", its parent container should have "position: relative;"
35
+ - When using z-index, it should be increments of 10, starting at 0 to prevent runaway values and overlapping elements.
36
+ - When applying breakpoints, it should have a mobile-first approach
27
37
 
28
38
  ## Examples
29
39
 
data/lib/smdev.rb CHANGED
@@ -29,6 +29,8 @@ module Smdev
29
29
  execute_console(options)
30
30
  when 'ssh'
31
31
  execute_ssh(options)
32
+ when 'pr_critic'
33
+ handle_pr_critic(options)
32
34
  when 'update'
33
35
  handle_update_command(subcommand)
34
36
  when 'help'
@@ -77,21 +79,43 @@ module Smdev
77
79
 
78
80
  def display_help
79
81
  puts "Usage: smdev COMMAND [options]"
80
- puts "\nCommands:"
81
- puts " local_app_setup - Set up local development environment"
82
- puts " system_install - Install system dependencies"
83
- puts " clone_repos - Clone repositories"
84
- puts " update_repos - Update repositories"
85
- puts " console - Open Rails console"
86
- puts " ssh - SSH into ECS container"
87
- puts " update cursor - Install or update cursor rules"
88
- puts " help - Show this help message"
89
- puts "\nOptions:"
90
- puts " -h, --help - Show this help message"
91
- puts " -s, --https - Use HTTPS instead of SSH for git operations"
92
- puts " -t, --team - Specify team name for repository operations"
93
- puts " --cluster - Specify ECS cluster for console/ssh commands"
94
- puts " --service - Specify ECS service for console/ssh commands"
82
+ puts ""
83
+ puts "DEVELOPMENT ENVIRONMENT COMMANDS:"
84
+ puts " local_app_setup - Set up local development environment (bundle install, copy .env, create/migrate DB)"
85
+ puts " system_install - Install system dependencies (Homebrew, PostgreSQL, AWS CLI, RBenv, Ruby, Rails)"
86
+ puts ""
87
+ puts "REPOSITORY MANAGEMENT COMMANDS:"
88
+ puts " clone_repos - Clone repositories from StrongMind organization"
89
+ puts " update_repos - Update existing local repositories (git pull)"
90
+ puts ""
91
+ puts "AWS/ECS COMMANDS:"
92
+ puts " console - Open Rails console in ECS container"
93
+ puts " ssh - SSH into ECS container"
94
+ puts ""
95
+ puts "DEVELOPMENT TOOLS:"
96
+ puts " pr_critic - Analyze pull requests and copy details to clipboard for review"
97
+ puts ""
98
+ puts "UPDATE COMMANDS:"
99
+ puts " update cursor - Install or update cursor rules"
100
+ puts ""
101
+ puts "HELP:"
102
+ puts " help - Show this help message"
103
+ puts ""
104
+ puts "OPTIONS:"
105
+ puts " -h, --help - Show this help message"
106
+ puts " -s, --https - Use HTTPS instead of SSH for git operations"
107
+ puts " -t, --team TEAM - Specify team name for repository operations"
108
+ puts " --cluster CLUSTER - Specify ECS cluster for console/ssh commands"
109
+ puts " --service SERVICE - Specify ECS service for console/ssh commands (default: prod-worker)"
110
+ puts ""
111
+ puts "EXAMPLES:"
112
+ puts " smdev local_app_setup # Set up local development environment"
113
+ puts " smdev clone_repos --team \"Backend Team\" # Clone repos for specific team"
114
+ puts " smdev update_repos --https # Update repos using HTTPS"
115
+ puts " smdev console --cluster my-cluster # Open Rails console in specific cluster"
116
+ puts " smdev ssh --service worker --cluster prod # SSH into worker service in prod cluster"
117
+ puts " smdev pr_critic # Analyze pull requests"
118
+ puts " smdev update cursor # Update cursor rules"
95
119
  end
96
120
 
97
121
  def handle_pr_critic(options)
@@ -107,6 +131,7 @@ module Smdev
107
131
  when "update_repos" then update_repos(options)
108
132
  when "console" then execute_console(options)
109
133
  when "ssh" then execute_ssh(options)
134
+ when "pr_critic" then handle_pr_critic(options)
110
135
  when "update" then handle_update(subcommand)
111
136
  else
112
137
  puts "Invalid command: #{command}. Use --help for a list of commands."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smdev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Neighbors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-01 00:00:00.000000000 Z
11
+ date: 2025-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize