lbyte-budget 0.1.2 → 0.1.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: 4a6ad02fcd5eeaf4c57480338ce17cc34ad57f6fe0715fa965aaa4ccc6bb26d2
4
- data.tar.gz: 85ed5816d1c27158ba2354a7cb7d01145ce7d3a9f366a19805fc66228e675eb7
3
+ metadata.gz: 7be45e876b882bcf493707da8c8ce430a52371658b3ae56718efd7992b14a16d
4
+ data.tar.gz: 3ea1ee8aea9f87d25b511102d25905b67fe609f85de9eb52582b041bd2382385
5
5
  SHA512:
6
- metadata.gz: 96413176042f43d582dc67eceeb58955da51e160ee75a540db5a559b5d4d5f9baf2a4e2ee9fb72872ca79cfdf24934caf6d2586c06b09d83e75bad8bae0726d1
7
- data.tar.gz: '07960eca97f82207c33160926d69a69bd5d7a5ab164d4a174e4ca60d5e47b6815810a16a2d2e380cc09421001fe0db1ba95e023778117fe7caa7c45d5ba45bc7'
6
+ metadata.gz: f86ac7f713ac4f16ce02f58616178d380edf169203ee80e25605dc15d11dbd66d2a134aa751b6c8d41e1cbd5bcabd2824a2bba1edc473bc3d6ac522a53810679
7
+ data.tar.gz: 223a576c042c97e00b483361a14b7fef4d0b38f1b97c309b9c2882adc0f9c3d90826cd7de5e85abdc118411f54ba7e4f8930a5b84563ebeb5b33598218807726
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.3] - 2025-12-28
4
+
5
+ - Fix duplicate constant initialization warnings for CATEGORIES and PAYMENT_METHODS
6
+ - Improve eager loading of models in test environment using require_relative
7
+ - Better Rails test suite integration and model availability
8
+
3
9
  ## [0.1.2] - 2025-12-28
4
10
 
5
11
  - Maintenance release
data/README.md CHANGED
@@ -339,6 +339,30 @@ Run `bin/console` for an interactive prompt that will allow you to experiment.
339
339
 
340
340
  To install this gem onto your local machine, run `bundle exec rake install`.
341
341
 
342
+ ## Releasing a New Version
343
+
344
+ To release a new version of the gem:
345
+
346
+ 1. **Update the version number** in [lib/budget/version.rb](lib/budget/version.rb)
347
+ 2. **Update the CHANGELOG** in [CHANGELOG.md](CHANGELOG.md) with the new version and release notes
348
+ 3. **Build the gem**:
349
+ ```bash
350
+ gem build budget.gemspec
351
+ ```
352
+ 4. **Push to RubyGems** (requires authentication):
353
+ ```bash
354
+ gem push lbyte-budget-X.X.X.gem
355
+ ```
356
+ Note: You'll need to enter your OTP code if MFA is enabled.
357
+ 5. **Commit and tag the release**:
358
+ ```bash
359
+ git add lib/budget/version.rb CHANGELOG.md
360
+ git commit -m "Bump version to X.X.X"
361
+ git tag vX.X.X
362
+ git push origin main
363
+ git push origin vX.X.X
364
+ ```
365
+
342
366
  ## Testing
343
367
 
344
368
  The Budget gem includes comprehensive test coverage:
data/lib/budget/engine.rb CHANGED
@@ -23,7 +23,9 @@ module Budget
23
23
  # Ensure models are loaded for associations in consuming apps
24
24
  initializer 'budget.eager_load_models', before: :set_autoload_paths do
25
25
  if Rails.env.development? || Rails.env.test?
26
- config.eager_load_paths << "#{root}/app/models"
26
+ require_relative '../app/models/budget/quote'
27
+ require_relative '../app/models/budget/line_item'
28
+ require_relative '../app/models/budget/payment'
27
29
  end
28
30
  end
29
31
  end
@@ -6,8 +6,6 @@ module Budget
6
6
  class LineItem
7
7
  attr_accessor :description, :price, :category, :quantity
8
8
 
9
- CATEGORIES = %w[lente montura tratamiento accesorio servicio other].freeze
10
-
11
9
  def initialize(description:, price:, category: 'other', quantity: 1)
12
10
  @description = description
13
11
  @price = price.to_f
@@ -6,8 +6,6 @@ module Budget
6
6
  class Payment
7
7
  attr_accessor :amount, :payment_date, :payment_method, :notes
8
8
 
9
- PAYMENT_METHODS = %w[efectivo tarjeta transferencia cheque other].freeze
10
-
11
9
  def initialize(amount:, payment_date: nil, payment_method: 'efectivo', notes: nil)
12
10
  @amount = amount.to_f
13
11
  @payment_date = payment_date || Time.now
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Budget
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lbyte-budget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruben Paz Chuspe