smart_csv_import 0.1.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f663c2506a13b2fd5f495969fe22337c6a5a6408ecf8dc5c9f12805e73c15c65
4
- data.tar.gz: fe62bc86016e471136c30362659fc28aecdaa8d690a5a772cfcf0c880021efe0
3
+ metadata.gz: 87c6acce723a52e407a3af9d27aec76b1e3afc4367631d353e10521307216f04
4
+ data.tar.gz: e2355037684212d67b602638f145844465bed7e45e22cdf539a76afb76831c08
5
5
  SHA512:
6
- metadata.gz: 013d1838ac0a41c353c4f63423a2e891e99509eb71197f956250dafff745ff0e91d6a00402b161acb547c1ed13c87e2e35e236d97fae0fd4b8a3cc30001ff722
7
- data.tar.gz: 62f20e4e4fe40ebff5f43af35e528fda2e6d8197183521072c95aa3de491248f1d0fbbd5c44a3beb716776d8ec8bf2f95391c9ddba4e49e4d29a5a091713b181
6
+ metadata.gz: bf6f29a71bffeb2fce2dc7609a0b94394d35a0de51e39c3a6aac0adc31b4e0eac839d6dfb1dc8a7efb49b68383d57f4031a10ae0c4c1e9721c04987894990d97
7
+ data.tar.gz: a9622bda510998deed07bb8f74688b09680b25fe4ee3e315dcbc1a03f2e8adfa092c3d276fa50a96d4185741db6e501e0e21d3b809614d6ac151f99df72c3330
data/README.md CHANGED
@@ -47,15 +47,28 @@ end
47
47
 
48
48
  ### 2. Install the gem
49
49
 
50
+ Add to your Gemfile:
51
+
50
52
  ```ruby
51
- # Gemfile
52
- gem "smart_csv_import"
53
+ gem "smart_csv_import", "~> 0.1"
53
54
  ```
54
55
 
56
+ Then:
57
+
55
58
  ```bash
56
59
  bundle install
57
60
  ```
58
61
 
62
+ Or install directly:
63
+
64
+ ```bash
65
+ gem install smart_csv_import
66
+ ```
67
+
68
+ ```ruby
69
+ require "smart_csv_import"
70
+ ```
71
+
59
72
  ### 3. Run the install generator
60
73
 
61
74
  ```bash
@@ -66,7 +79,8 @@ This creates:
66
79
 
67
80
  - `config/initializers/smart_csv_import.rb` — configuration with all options commented out at their defaults
68
81
  - `db/migrate/YYYYMMDDHHMMSS_create_smart_csv_import_imports.rb` — import tracking table
69
- - `tmp/smart_csv_import/` and `tmp/smart_csv_import/embeddings_cache/`storage directories
82
+ - `db/migrate/YYYYMMDDHHMMSS_create_smart_csv_import_import_row_errors.rb` — per-row failure tracking table (referenced by `Import#row_errors`)
83
+ - `tmp/smart_csv_import/imports/` and `tmp/smart_csv_import/embeddings_cache/` — storage directories
70
84
 
71
85
  ```bash
72
86
  rails db:migrate
@@ -529,6 +543,19 @@ Before sending a PR that touches the matching strategies, read [`ROADMAP.md`](RO
529
543
 
530
544
  ---
531
545
 
546
+ ## Releasing
547
+
548
+ This gem follows the [Gemsmith](https://www.alchemists.io/projects/gemsmith) and [Milestoner](https://www.alchemists.io/projects/milestoner) conventions.
549
+
550
+ 1. Tests pass: `bundle exec rake`
551
+ 2. Bump `lib/smart_csv_import/version.rb` and `CITATION.cff`
552
+ 3. Add a new `== X.Y.Z (YYYY-MM-DD)` section to `VERSIONS.adoc` summarising the changes
553
+ 4. Commit using a [Git Lint](https://www.alchemists.io/projects/git-lint) subject (e.g. `Added Foo`) with a `Milestone:` trailer (`major`, `minor`, or `patch`) — Milestoner reads these trailers to compute the next version
554
+ 5. `milestoner --publish X.Y.Z` (creates and pushes the annotated tag built from commit history)
555
+ 6. `gemsmith --publish` (builds the gem, pushes to RubyGems — will prompt for MFA OTP)
556
+
557
+ ---
558
+
532
559
  ## License
533
560
 
534
561
  [MIT](LICENSE.adoc)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class <%= form_class_name %>
4
- include ActiveModel::API
4
+ include ActiveModel::Model
5
5
  include ActiveModel::Attributes
6
6
  include SmartCsvImport::Matchable
7
7
 
@@ -13,6 +13,8 @@ class CreateSmartCsvImportImportRowErrors < ActiveRecord::Migration[<%= ActiveRe
13
13
  t.datetime :created_at, null: false
14
14
  end
15
15
 
16
- add_index :smart_csv_import_import_row_errors, [:import_id, :error_type, :row_number]
16
+ add_index :smart_csv_import_import_row_errors,
17
+ [:import_id, :error_type, :row_number],
18
+ name: "idx_scsi_row_errors_lookup"
17
19
  end
18
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmartCsvImport
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.required_ruby_version = ">= 3.1"
24
24
 
25
- spec.add_dependency "activemodel", ">= 7.0", "< 9"
26
- spec.add_dependency "activerecord", ">= 7.0", "< 9"
27
- spec.add_dependency "activejob", ">= 7.0", "< 9"
28
- spec.add_dependency "activesupport", ">= 7.0", "< 9"
25
+ spec.add_dependency "activemodel", ">= 6.1", "< 9"
26
+ spec.add_dependency "activerecord", ">= 6.1", "< 9"
27
+ spec.add_dependency "activejob", ">= 6.1", "< 9"
28
+ spec.add_dependency "activesupport", ">= 6.1", "< 9"
29
29
  spec.add_dependency "csv", "~> 3.0"
30
30
  spec.add_dependency "smarter_csv", "~> 1.10"
31
31
  spec.add_dependency "ruby_llm", "~> 1.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_csv_import
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Roulston
@@ -15,7 +15,7 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '7.0'
18
+ version: '6.1'
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
21
  version: '9'
@@ -25,7 +25,7 @@ dependencies:
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: '7.0'
28
+ version: '6.1'
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
31
  version: '9'
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - ">="
37
37
  - !ruby/object:Gem::Version
38
- version: '7.0'
38
+ version: '6.1'
39
39
  - - "<"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '9'
@@ -45,7 +45,7 @@ dependencies:
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '7.0'
48
+ version: '6.1'
49
49
  - - "<"
50
50
  - !ruby/object:Gem::Version
51
51
  version: '9'
@@ -55,7 +55,7 @@ dependencies:
55
55
  requirements:
56
56
  - - ">="
57
57
  - !ruby/object:Gem::Version
58
- version: '7.0'
58
+ version: '6.1'
59
59
  - - "<"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '9'
@@ -65,7 +65,7 @@ dependencies:
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '7.0'
68
+ version: '6.1'
69
69
  - - "<"
70
70
  - !ruby/object:Gem::Version
71
71
  version: '9'
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: '7.0'
78
+ version: '6.1'
79
79
  - - "<"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '9'
@@ -85,7 +85,7 @@ dependencies:
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '7.0'
88
+ version: '6.1'
89
89
  - - "<"
90
90
  - !ruby/object:Gem::Version
91
91
  version: '9'