galaaz 2.1.7 → 2.1.8

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.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/blogs/galaaz_ggplot/galaaz_ggplot.Rmd +63 -58
  4. data/blogs/galaaz_ggplot/galaaz_ggplot.log +59 -68
  5. data/blogs/galaaz_ggplot/galaaz_ggplot.md +91 -84
  6. data/blogs/galaaz_ggplot/galaaz_ggplot.tex +125 -94
  7. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/midwest_rb.png +0 -0
  8. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/scatter_plot_rb.png +0 -0
  9. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/midwest_rb.png +0 -0
  10. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/scatter_plot_rb.png +0 -0
  11. data/blogs/gknit/gknit.Rmd +33 -28
  12. data/blogs/gknit/gknit.md +47 -42
  13. data/blogs/gknit/gknit.tex +1368 -0
  14. data/blogs/gknit/gknit_files/figure-html/bubble-1.png +0 -0
  15. data/blogs/gknit/gknit_files/figure-html/diverging_bar.png +0 -0
  16. data/blogs/gknit/gknit_files/figure-latex/bubble-1.png +0 -0
  17. data/blogs/gknit/gknit_files/gknit_files/figure-latex/bubble-1.png +0 -0
  18. data/blogs/manual/manual.Rmd +129 -60
  19. data/blogs/manual/manual.log +289 -545
  20. data/blogs/manual/manual.md +551 -467
  21. data/blogs/manual/manual.tex +1059 -485
  22. data/blogs/manual/manual_files/figure-html/bubble-1.png +0 -0
  23. data/blogs/manual/manual_files/figure-latex/bubble-1.png +0 -0
  24. data/blogs/manual/manual_files/figure-markdown_github/bubble-1.png +0 -0
  25. data/blogs/manual/manual_files/figure-markdown_github/diverging_bar.png +0 -0
  26. data/blogs/manual/manual_files/manual_files/figure-latex/bubble-1.png +0 -0
  27. data/blogs/nse_dplyr/nse_dplyr.Rmd +28 -7
  28. data/blogs/nse_dplyr/nse_dplyr.log +49 -153
  29. data/blogs/nse_dplyr/nse_dplyr.md +676 -705
  30. data/blogs/nse_dplyr/nse_dplyr.tex +1589 -0
  31. data/blogs/oh_my/oh_my.Rmd +193 -55
  32. data/blogs/oh_my/oh_my.log +265 -95
  33. data/blogs/oh_my/oh_my.md +236 -95
  34. data/blogs/oh_my/oh_my.tex +1976 -68
  35. data/blogs/ruby_plot/ruby_plot.Rmd +42 -34
  36. data/blogs/ruby_plot/ruby_plot.log +101 -99
  37. data/blogs/ruby_plot/ruby_plot.md +52 -46
  38. data/blogs/ruby_plot/ruby_plot.tex +134 -102
  39. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.png +0 -0
  40. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.png +0 -0
  41. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.png +0 -0
  42. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.png +0 -0
  43. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.png +0 -0
  44. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_decorations.png +0 -0
  45. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.png +0 -0
  46. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.png +0 -0
  47. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.png +0 -0
  48. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.png +0 -0
  49. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.png +0 -0
  50. data/blogs/ruby_plot/ruby_plot_files/figure-latex/dose_len.png +0 -0
  51. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_delivery.png +0 -0
  52. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_dose.png +0 -0
  53. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color.png +0 -0
  54. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color2.png +0 -0
  55. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_decorations.png +0 -0
  56. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_jitter.png +0 -0
  57. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_points.png +0 -0
  58. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_box_plot.png +0 -0
  59. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_violin_plot.png +0 -0
  60. data/blogs/ruby_plot/ruby_plot_files/figure-latex/violin_with_jitter.png +0 -0
  61. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/dose_len.png +0 -0
  62. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facet_by_delivery.png +0 -0
  63. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facet_by_dose.png +0 -0
  64. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color.png +0 -0
  65. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color2.png +0 -0
  66. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_decorations.png +0 -0
  67. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_jitter.png +0 -0
  68. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_points.png +0 -0
  69. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/final_box_plot.png +0 -0
  70. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/final_violin_plot.png +0 -0
  71. data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/violin_with_jitter.png +0 -0
  72. data/lib/galaaz/cli.rb +51 -10
  73. data/script/omarchy/README.md +1 -1
  74. data/script/omarchy/galaaz-guide.sh +1 -1
  75. data/sty/galaaz.sty +22 -0
  76. data/version.rb +1 -1
  77. metadata +19 -1
data/lib/galaaz/cli.rb CHANGED
@@ -587,18 +587,26 @@ module Galaaz
587
587
 
588
588
  Dir.chdir(dest) do
589
589
  need_cmd!('bundle')
590
- # Lockfile often still pins path: ../galaaz @ an old version — pull latest RubyGems.
590
+ ensure_ledger_bundler!
591
+ # Fresh clone: install the full lockfile under the app's Ruby (mise .ruby-version).
592
+ # Do not run `bundle update` first — that can mix PATH Ruby with app Ruby and skip install.
593
+ puts 'galaaz add ledger: bundle install'
594
+ abort_unless(ledger_bundle('install'), 'bundle install failed')
591
595
  puts 'galaaz add ledger: bundle update galaaz'
592
- unless system('bundle', 'update', 'galaaz')
593
- abort_unless(system('bundle', 'install'), 'bundle install failed')
594
- end
595
- # Setup the gem Bundler will load (not PATH galaaz, which may differ).
596
+ ledger_bundle('update', 'galaaz') ||
597
+ warn('galaaz add ledger: bundle update galaaz returned non-zero (continuing with installed galaaz)')
596
598
  puts 'galaaz add ledger: bundle exec galaaz setup'
597
- system('bundle', 'exec', 'galaaz', 'setup') ||
598
- warn('galaaz add ledger: bundle exec galaaz setup returned non-zero; check gatekeeper')
599
- abort_unless(system('bin/rails', 'db:prepare'), 'rails db:prepare failed')
600
- abort_unless(system('bin/rails', 'db:migrate'), 'rails db:migrate failed')
601
- abort_unless(system({ 'SEED_PROFILE' => 'fast' }, 'bin/rails', 'db:seed'), 'rails db:seed failed')
599
+ unless ledger_bundle('exec', 'galaaz', 'setup')
600
+ warn('galaaz add ledger: bundle exec galaaz setup failed; trying PATH galaaz setup')
601
+ system('galaaz', 'setup') ||
602
+ warn('galaaz add ledger: galaaz setup returned non-zero; check gatekeeper')
603
+ end
604
+ abort_unless(ledger_bundle('exec', 'rails', 'db:prepare'), 'rails db:prepare failed')
605
+ abort_unless(ledger_bundle('exec', 'rails', 'db:migrate'), 'rails db:migrate failed')
606
+ abort_unless(
607
+ ledger_bundle_env({ 'SEED_PROFILE' => 'fast' }, 'exec', 'rails', 'db:seed'),
608
+ 'rails db:seed failed'
609
+ )
602
610
  end
603
611
 
604
612
  mark_profile!('ledger')
@@ -608,6 +616,39 @@ module Galaaz
608
616
  0
609
617
  end
610
618
 
619
+ # Run bundle under mise so .ruby-version / .tool-versions match Omarchy PATH ruby.
620
+ def ledger_bundle(*args)
621
+ if command_present?('mise')
622
+ system('mise', 'x', '--', 'bundle', *args)
623
+ else
624
+ system('bundle', *args)
625
+ end
626
+ end
627
+
628
+ def ledger_bundle_env(env, *args)
629
+ if command_present?('mise')
630
+ system(env, 'mise', 'x', '--', 'bundle', *args)
631
+ else
632
+ system(env, 'bundle', *args)
633
+ end
634
+ end
635
+
636
+ def ensure_ledger_bundler!
637
+ locked = nil
638
+ if File.file?('Gemfile.lock')
639
+ locked = File.read('Gemfile.lock')[/BUNDLED WITH\s+(\d+\.\d+(?:\.\d+)?)/, 1]
640
+ end
641
+ puts "galaaz add ledger: ensure bundler#{locked ? " #{locked}" : ''}"
642
+ if command_present?('mise')
643
+ cmd = ['mise', 'x', '--', 'gem', 'install', 'bundler', '--no-document']
644
+ cmd.insert(-2, '-v', locked) if locked
645
+ system(*cmd) || warn('galaaz add ledger: gem install bundler returned non-zero')
646
+ elsif locked
647
+ system('gem', 'install', 'bundler', '-v', locked, '--no-document') ||
648
+ warn('galaaz add ledger: gem install bundler returned non-zero')
649
+ end
650
+ end
651
+
611
652
  # Ledger repo may ship `gem "galaaz", path: "..."`. Standalone installs use RubyGems
612
653
  # (CRuby or JRuby), unpinned, so `bundle update galaaz` takes the newest published gem.
613
654
  def ensure_ledger_galaaz_gemfile!(gemfile)
@@ -38,7 +38,7 @@ Docs: https://rbotafogo.github.io/galaaz/ · https://github.com/rbotafogo/galaaz
38
38
 
39
39
  Heavy CRAN installs (`R.install_and_loads`) and long R (`R::Job.eval` / `script`) run in a
40
40
  child `Rscript` so the bridge stays free — see **Background R jobs (`R::Job`)** in the
41
- README / manual (gem **2.1.7+**).
41
+ README / manual (gem **2.1.8+**).
42
42
 
43
43
  ## Manual copy (legacy)
44
44
 
@@ -65,7 +65,7 @@ Other add-ons
65
65
  Check: galaaz doctor
66
66
  Menu: Super+Space → Install → Development → Galaaz
67
67
 
68
- Heavy CRAN installs / long R (gem 2.1.7+): R::Job keeps the bridge free.
68
+ Heavy CRAN installs / long R (gem 2.1.8+): R::Job keeps the bridge free.
69
69
  See README → “Background R jobs (R::Job)” (${DOCS_README})
70
70
 
71
71
  EOF
data/sty/galaaz.sty CHANGED
@@ -67,5 +67,27 @@
67
67
  % Command to import an R variable to latex
68
68
  \newcommand{\RtoLatex}[2]{\newcommand{#1}{#2}}
69
69
 
70
+ % Soft-wrap Pandoc highlighted code/output boxes (Shaded + Highlighting).
71
+ % This runs after Pandoc's default \DefineVerbatimEnvironment{Highlighting}
72
+ % (header includes come later in the generated .tex). Prefer manual line
73
+ % breaks in Rmd sources; breaklines is a safety net for leftovers/output.
74
+ % Requires TinyTeX/TeX Live package: tlmgr install fvextra
75
+ \IfFileExists{fvextra.sty}{%
76
+ \usepackage{fvextra}%
77
+ \DefineVerbatimEnvironment{Highlighting}{Verbatim}{%
78
+ breaklines=true,
79
+ breakanywhere=true,
80
+ breakindent=1.5em,
81
+ fontsize=\small,
82
+ commandchars=\\\{\}%
83
+ }%
84
+ }{%
85
+ % fancyvrb is already loaded by Pandoc; shrink code so more fits per line.
86
+ \DefineVerbatimEnvironment{Highlighting}{Verbatim}{%
87
+ fontsize=\small,
88
+ commandchars=\\\{\}%
89
+ }%
90
+ }
91
+
70
92
  %
71
93
  %\newcommand{\atraso}[1]{\color{red} \textbf {Tempo desde a Assinatura do Contrato: #1 dias}}
data/version.rb CHANGED
@@ -1,2 +1,2 @@
1
1
  $gem_name = "galaaz"
2
- $version="2.1.7"
2
+ $version="2.1.8"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galaaz
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.7
4
+ version: 2.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Botafogo
@@ -136,10 +136,13 @@ files:
136
136
  - blogs/galaaz_ggplot/midwest_external_png
137
137
  - blogs/gknit/gknit.Rmd
138
138
  - blogs/gknit/gknit.md
139
+ - blogs/gknit/gknit.tex
139
140
  - blogs/gknit/gknit_files/figure-gfm/bubble-1.png
140
141
  - blogs/gknit/gknit_files/figure-gfm/diverging_bar.png
141
142
  - blogs/gknit/gknit_files/figure-html/bubble-1.png
142
143
  - blogs/gknit/gknit_files/figure-html/diverging_bar.png
144
+ - blogs/gknit/gknit_files/figure-latex/bubble-1.png
145
+ - blogs/gknit/gknit_files/gknit_files/figure-latex/bubble-1.png
143
146
  - blogs/gknit/lst.rds
144
147
  - blogs/gknit/model.rb
145
148
  - blogs/gknit/stats.bib
@@ -153,10 +156,14 @@ files:
153
156
  - blogs/manual/manual_files/figure-html/bubble-1.png
154
157
  - blogs/manual/manual_files/figure-html/diverging_bar.png
155
158
  - blogs/manual/manual_files/figure-latex/bubble-1.png
159
+ - blogs/manual/manual_files/figure-markdown_github/bubble-1.png
160
+ - blogs/manual/manual_files/figure-markdown_github/diverging_bar.png
161
+ - blogs/manual/manual_files/manual_files/figure-latex/bubble-1.png
156
162
  - blogs/manual/model.rb
157
163
  - blogs/nse_dplyr/nse_dplyr.Rmd
158
164
  - blogs/nse_dplyr/nse_dplyr.log
159
165
  - blogs/nse_dplyr/nse_dplyr.md
166
+ - blogs/nse_dplyr/nse_dplyr.tex
160
167
  - blogs/oh_my/not_so.rb
161
168
  - blogs/oh_my/oh_my.Rmd
162
169
  - blogs/oh_my/oh_my.log
@@ -200,6 +207,17 @@ files:
200
207
  - blogs/ruby_plot/ruby_plot_files/figure-latex/final_box_plot.png
201
208
  - blogs/ruby_plot/ruby_plot_files/figure-latex/final_violin_plot.png
202
209
  - blogs/ruby_plot/ruby_plot_files/figure-latex/violin_with_jitter.png
210
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/dose_len.png
211
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facet_by_delivery.png
212
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facet_by_dose.png
213
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color.png
214
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color2.png
215
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_decorations.png
216
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_jitter.png
217
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_points.png
218
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/final_box_plot.png
219
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/final_violin_plot.png
220
+ - blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/violin_with_jitter.png
203
221
  - blogs/test/test.Rmd
204
222
  - blogs/test/test.md
205
223
  - examples/50Plots_MasterList/Images/midwest-scatterplot.PNG