rbcsv 0.1.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.
@@ -0,0 +1,14 @@
1
+ [package]
2
+ name = "rbcsv"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ authors = ["fujitani sora <fujitanisora0414@gmail.com>"]
6
+ license = "MIT"
7
+ publish = false
8
+
9
+ [lib]
10
+ crate-type = ["cdylib"]
11
+
12
+ [dependencies]
13
+ csv = "1.3.1"
14
+ magnus = { version = "0.6.2" }
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "mkmf"
4
+ require "rb_sys/mkmf"
5
+
6
+ create_rust_makefile("r_csv/r_csv")
@@ -0,0 +1,52 @@
1
+ #[cfg(not(test))]
2
+ use magnus::{Error, exception, function, prelude::*, Ruby};
3
+
4
+ #[cfg(test)]
5
+ type Error = Box<dyn std::error::Error>;
6
+
7
+ fn parse(s: String) -> Result<Vec<Vec<String>>, Error> {
8
+ let mut reader = csv::Reader::from_reader(s.as_bytes());
9
+ let mut records = Vec::new();
10
+
11
+ for result in reader.records() {
12
+ match result {
13
+ Ok(record) => {
14
+ let row: Vec<String> = record.iter().map(|field| field.to_string()).collect();
15
+ records.push(row);
16
+ }
17
+ #[cfg(not(test))]
18
+ Err(e) => return Err(Error::new(exception::runtime_error(), format!("CSV parse error: {}", e))),
19
+ #[cfg(test)]
20
+ Err(e) => return Err(Box::new(e)),
21
+ }
22
+ }
23
+
24
+ Ok(records)
25
+ }
26
+
27
+ #[cfg(not(test))]
28
+ #[magnus::init]
29
+ fn init(ruby: &Ruby) -> Result<(), Error> {
30
+ let module = ruby.define_module("RbCsv")?;
31
+ module.define_singleton_method("parse", function!(parse, 1))?;
32
+ Ok(())
33
+ }
34
+
35
+ #[cfg(test)]
36
+ mod tests {
37
+
38
+ use super::*;
39
+
40
+ #[test]
41
+ fn test_parse() {
42
+ let csv_data = "name,age,city\nAlice,25,Tokyo\nBob,30,Osaka";
43
+ let result = parse(csv_data.to_string());
44
+
45
+ assert!(result.is_ok());
46
+
47
+ let records = result.unwrap();
48
+ assert_eq!(records.len(), 2);
49
+ assert_eq!(records[0], vec!["Alice", "25", "Tokyo"]);
50
+ assert_eq!(records[1], vec!["Bob", "30", "Osaka"]);
51
+ }
52
+ }
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RbCsv
4
+ VERSION = "0.1.0"
5
+ end
data/lib/rbcsv.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rbcsv/version"
4
+ require_relative "rbcsv/rbcsv"
5
+
6
+ module RbCsv
7
+ class Error < StandardError; end
8
+ end
@@ -0,0 +1,139 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ require 'csv'
5
+ require_relative 'lib/r_csv'
6
+
7
+ CSV_FILE = 'sample.csv'
8
+ csv_content = File.read(CSV_FILE)
9
+
10
+ puts "=== CSV Output Format Comparison ==="
11
+ puts
12
+
13
+ # Test with a small sample
14
+ small_csv = <<~CSV
15
+ id,name,age,city
16
+ 1,Alice,30,Tokyo
17
+ 2,Bob,25,Osaka
18
+ CSV
19
+
20
+ puts "Small CSV data:"
21
+ puts small_csv
22
+ puts
23
+
24
+ puts "=== 1. CSV.parse (default - raw arrays) ==="
25
+ csv_parse_raw = CSV.parse(small_csv)
26
+ puts "Type: #{csv_parse_raw.class}"
27
+ puts "Rows: #{csv_parse_raw.length}"
28
+ puts "Data:"
29
+ csv_parse_raw.each_with_index { |row, i| puts " [#{i}] #{row.inspect}" }
30
+ puts
31
+
32
+ puts "=== 2. CSV.parse (headers: true - CSV::Row objects) ==="
33
+ csv_parse_headers = CSV.parse(small_csv, headers: true)
34
+ puts "Type: #{csv_parse_headers.class}"
35
+ puts "Rows: #{csv_parse_headers.length}"
36
+ puts "First row type: #{csv_parse_headers.first.class}"
37
+ puts "Headers: #{csv_parse_headers.first.headers}"
38
+ puts "Data:"
39
+ csv_parse_headers.each_with_index { |row, i| puts " [#{i}] #{row.to_h}" }
40
+ puts
41
+
42
+ puts "=== 3. CSV.table (CSV::Table object) ==="
43
+ csv_table = CSV.parse(small_csv, headers: true, header_converters: :symbol)
44
+ puts "Type: #{csv_table.class}"
45
+ puts "Rows: #{csv_table.length}"
46
+ puts "Headers: #{csv_table.first.headers}"
47
+ puts "Data:"
48
+ csv_table.each_with_index { |row, i| puts " [#{i}] #{row.to_h}" }
49
+ puts
50
+
51
+ puts "=== 4. RCsv.parse (current - raw arrays) ==="
52
+ rcv_parse = RCsv.parse(small_csv)
53
+ puts "Type: #{rcv_parse.class}"
54
+ puts "Rows: #{rcv_parse.length}"
55
+ puts "Data:"
56
+ rcv_parse.each_with_index { |row, i| puts " [#{i}] #{row.inspect}" }
57
+ puts
58
+
59
+ puts "=== Output Format Analysis ==="
60
+ puts
61
+
62
+ puts "1. CSV.parse (default):"
63
+ puts " - Returns: Array<Array<String>>"
64
+ puts " - Includes header row as first element"
65
+ puts " - Raw string arrays"
66
+ puts " - Example: [[\"id\", \"name\", \"age\"], [\"1\", \"Alice\", \"30\"]]"
67
+ puts
68
+
69
+ puts "2. CSV.parse (headers: true):"
70
+ puts " - Returns: CSV::Table (Array of CSV::Row)"
71
+ puts " - Header-indexed access: row['name']"
72
+ puts " - Excludes header from data rows"
73
+ puts " - Example: #<CSV::Row id:\"1\" name:\"Alice\" age:\"30\">"
74
+ puts
75
+
76
+ puts "3. RCsv.parse (current):"
77
+ puts " - Returns: Array<Array<String>>"
78
+ puts " - Excludes header row (data only)"
79
+ puts " - Raw string arrays"
80
+ puts " - Example: [[\"1\", \"Alice\", \"30\"], [\"2\", \"Bob\", \"25\"]]"
81
+ puts
82
+
83
+ puts "=== Key Differences ==="
84
+ puts
85
+
86
+ puts "Header handling:"
87
+ puts " CSV.parse (default): Includes header as row[0]"
88
+ puts " CSV.parse (headers=true): Excludes header, provides row['column'] access"
89
+ puts " RCsv.parse: Excludes header, raw arrays only"
90
+ puts
91
+
92
+ puts "Data structure:"
93
+ puts " CSV.parse: Can return CSV::Row objects with named access"
94
+ puts " RCsv.parse: Always returns raw Array<String>"
95
+ puts
96
+
97
+ puts "Row count difference:"
98
+ csv_default = CSV.parse(small_csv)
99
+ csv_headers = CSV.parse(small_csv, headers: true)
100
+ rcv_data = RCsv.parse(small_csv)
101
+
102
+ puts " CSV.parse (default): #{csv_default.length} rows (includes header)"
103
+ puts " CSV.parse (headers=true): #{csv_headers.length} rows (data only)"
104
+ puts " RCsv.parse: #{rcv_data.length} rows (data only)"
105
+ puts
106
+
107
+ puts "=== Compatibility Recommendations ==="
108
+ puts
109
+
110
+ puts "To match CSV.parse (default behavior):"
111
+ puts " - RCsv should include header row as first element"
112
+ puts " - Return format: [[\"id\", \"name\"], [\"1\", \"Alice\"], [\"2\", \"Bob\"]]"
113
+ puts
114
+
115
+ puts "To match CSV.parse (headers: true):"
116
+ puts " - More complex: need CSV::Row-like objects"
117
+ puts " - Alternative: return {headers: [...], data: [[...], [...]]} structure"
118
+ puts
119
+
120
+ puts "Current RCsv matches:"
121
+ puts " - CSV.parse(content, headers: true) # data rows only"
122
+ puts " - But returns raw arrays instead of CSV::Row objects"
123
+ puts
124
+
125
+ puts "=== Specific Implementation Suggestions ==="
126
+ puts
127
+
128
+ puts "Option 1: Match CSV.parse default (simplest):"
129
+ puts " RCsv.parse(content) → includes header row"
130
+ puts
131
+
132
+ puts "Option 2: Add options parameter:"
133
+ puts " RCsv.parse(content, headers: false) → includes header"
134
+ puts " RCsv.parse(content, headers: true) → excludes header"
135
+ puts
136
+
137
+ puts "Option 3: Multiple methods:"
138
+ puts " RCsv.parse_raw(content) → raw arrays with header"
139
+ puts " RCsv.parse(content) → structured data"
data/sample.csv ADDED
@@ -0,0 +1,101 @@
1
+ id,title,description,category,status,location,start_date,end_date,max_participants,created_at,updated_at
2
+ 1,Ruby on Rails Study Group,Learn about Rails 8.0 new features,tech,published,Shibuya,2025-01-15 19:00:00,2025-01-15 21:00:00,30,2025-01-01 10:00:00,2025-01-01 10:00:00
3
+ 2,Jazz Night in Tokyo,Wonderful jazz performance,music,published,Shinjuku,2025-01-20 20:00:00,2025-01-20 23:00:00,50,2025-01-02 11:00:00,2025-01-02 11:00:00
4
+ 3,Marathon Race,Tokyo Bay Marathon,sports,published,Odaiba,2025-02-01 08:00:00,2025-02-01 12:00:00,100,2025-01-03 12:00:00,2025-01-03 12:00:00
5
+ 4,Kyoto Day Trip,Visit historical Kyoto landmarks,travel,published,Kyoto City,2025-02-10 09:00:00,2025-02-10 18:00:00,25,2025-01-04 13:00:00,2025-01-04 13:00:00
6
+ 5,Sushi Making Experience,Learn sushi making from professionals,food,published,Ginza,2025-01-25 18:00:00,2025-01-25 21:00:00,15,2025-01-05 14:00:00,2025-01-05 14:00:00
7
+ 6,React.js Workshop,Modern React development,tech,draft,Ikebukuro,2025-03-01 14:00:00,2025-03-01 17:00:00,20,2025-01-06 15:00:00,2025-01-06 15:00:00
8
+ 7,Classical Music Concert,Beethoven Symphony No.9,music,published,Ueno,2025-02-14 19:30:00,2025-02-14 21:30:00,200,2025-01-07 16:00:00,2025-01-07 16:00:00
9
+ 8,Soccer Match Viewing,J-League match viewing,sports,published,Ajinomoto Stadium,2025-02-22 15:00:00,2025-02-22 17:00:00,80,2025-01-08 17:00:00,2025-01-08 17:00:00
10
+ 9,Hakone Hot Spring Trip,Relaxing hot spring trip,travel,published,Hakone,2025-03-15 10:00:00,2025-03-16 15:00:00,40,2025-01-09 18:00:00,2025-01-09 18:00:00
11
+ 10,Ramen Food Tour,Tokyo delicious ramen shop tour,food,published,Tokyo Station area,2025-02-05 12:00:00,2025-02-05 15:00:00,12,2025-01-10 19:00:00,2025-01-10 19:00:00
12
+ 11,Python Machine Learning Seminar,ML from basics to applications,tech,published,Akihabara,2025-02-28 10:00:00,2025-02-28 17:00:00,35,2025-01-11 09:00:00,2025-01-11 09:00:00
13
+ 12,Piano Recital,Chopin masterpieces performance,music,published,Ginza Yamaha Hall,2025-03-05 19:00:00,2025-03-05 21:00:00,100,2025-01-12 10:00:00,2025-01-12 10:00:00
14
+ 13,Tennis Tournament,Beginner to intermediate level,sports,published,Ariake Tennis Forest,2025-03-10 09:00:00,2025-03-10 17:00:00,32,2025-01-13 11:00:00,2025-01-13 11:00:00
15
+ 14,Okinawa Diving Tour,Beautiful sea diving experience,travel,draft,Okinawa,2025-04-01 08:00:00,2025-04-03 18:00:00,16,2025-01-14 12:00:00,2025-01-14 12:00:00
16
+ 15,French Cooking Class,Learn authentic French cuisine,food,published,Ebisu,2025-03-20 17:00:00,2025-03-20 21:00:00,18,2025-01-15 13:00:00,2025-01-15 13:00:00
17
+ 16,JavaScript ES2024 Study Group,Latest JavaScript features,tech,published,Shibuya,2025-03-12 19:00:00,2025-03-12 21:30:00,25,2025-01-16 14:00:00,2025-01-16 14:00:00
18
+ 17,Rock Concert,Emerging rock band performance,music,published,Zepp Tokyo,2025-03-25 19:00:00,2025-03-25 22:00:00,150,2025-01-17 15:00:00,2025-01-17 15:00:00
19
+ 18,Badminton Tournament,Working adults badminton tournament,sports,published,Yoyogi Gymnasium,2025-04-05 09:00:00,2025-04-05 17:00:00,48,2025-01-18 16:00:00,2025-01-18 16:00:00
20
+ 19,Mount Fuji Climbing,From 5th station to summit,travel,published,Mount Fuji,2025-05-01 06:00:00,2025-05-02 15:00:00,20,2025-01-19 17:00:00,2025-01-19 17:00:00
21
+ 20,Italian Cooking Workshop,Pasta and pizza making experience,food,published,Nakameguro,2025-04-10 16:00:00,2025-04-10 20:00:00,22,2025-01-20 18:00:00,2025-01-20 18:00:00
22
+ 21,Docker Introduction Seminar,Container technology basics,tech,draft,Shinjuku,2025-04-15 14:00:00,2025-04-15 18:00:00,30,2025-01-21 19:00:00,2025-01-21 19:00:00
23
+ 22,Opera Appreciation,La Traviata performance viewing,music,published,New National Theatre,2025-04-20 18:30:00,2025-04-20 21:30:00,80,2025-01-22 20:00:00,2025-01-22 20:00:00
24
+ 23,Table Tennis Tournament,Table tennis enthusiast exchange,sports,published,Tokyo Gymnasium,2025-04-25 10:00:00,2025-04-25 16:00:00,64,2025-01-23 21:00:00,2025-01-23 21:00:00
25
+ 24,Hokkaido Gourmet Tour,Enjoy seafood and ramen,travel,published,Sapporo,2025-05-10 12:00:00,2025-05-12 18:00:00,35,2025-01-24 22:00:00,2025-01-24 22:00:00
26
+ 25,Japanese Cooking Class,Learn seasonal Japanese cuisine,food,published,Tsukiji,2025-05-05 15:00:00,2025-05-05 19:00:00,16,2025-01-25 08:00:00,2025-01-25 08:00:00
27
+ 26,AWS Cloud Study Group,Cloud infrastructure basics,tech,published,Shinagawa,2025-05-15 13:00:00,2025-05-15 17:00:00,40,2025-01-26 09:00:00,2025-01-26 09:00:00
28
+ 27,Acoustic Live,Singer-songwriter live performance,music,published,Shimokitazawa,2025-05-20 20:00:00,2025-05-20 22:30:00,60,2025-01-27 10:00:00,2025-01-27 10:00:00
29
+ 28,Golf Competition,Beginner-friendly golf tournament,sports,published,Chiba Golf Course,2025-05-25 08:00:00,2025-05-25 17:00:00,24,2025-01-28 11:00:00,2025-01-28 11:00:00
30
+ 29,Kyushu Hot Spring Tour,Beppu and Yufuin hot spring tour,travel,draft,Oita Prefecture,2025-06-01 10:00:00,2025-06-03 16:00:00,28,2025-01-29 12:00:00,2025-01-29 12:00:00
31
+ 30,Thai Cooking Class,Make authentic Thai cuisine,food,published,Omotesando,2025-06-05 17:30:00,2025-06-05 20:30:00,20,2025-01-30 13:00:00,2025-01-30 13:00:00
32
+ 31,Vue.js Hands-on,Vue 3 practical development,tech,published,Akihabara,2025-06-10 10:00:00,2025-06-10 17:00:00,25,2025-01-31 14:00:00,2025-01-31 14:00:00
33
+ 32,Jazz Session,Amateur musician exchange,music,published,Roppongi,2025-06-15 19:30:00,2025-06-15 23:00:00,30,2025-02-01 15:00:00,2025-02-01 15:00:00
34
+ 33,Swimming Competition,Citizen pool tournament,sports,published,Tatsumi International Swimming Center,2025-06-20 09:00:00,2025-06-20 15:00:00,50,2025-02-02 16:00:00,2025-02-02 16:00:00
35
+ 34,Kanazawa Tourism Tour,Kenrokuen and Kanazawa Castle visit,travel,published,Kanazawa City,2025-06-25 09:00:00,2025-06-26 17:00:00,32,2025-02-03 17:00:00,2025-02-03 17:00:00
36
+ 35,Indian Cooking Class,Authentic curry from spices,food,published,Kanda,2025-07-01 18:00:00,2025-07-01 21:00:00,18,2025-02-04 18:00:00,2025-02-04 18:00:00
37
+ 36,Kubernetes Study Group,Container orchestration,tech,draft,Shibuya,2025-07-05 14:00:00,2025-07-05 18:00:00,35,2025-02-05 19:00:00,2025-02-05 19:00:00
38
+ 37,Chamber Music Concert,String quartet performance,music,published,Suntory Hall,2025-07-10 19:00:00,2025-07-10 21:00:00,120,2025-02-06 20:00:00,2025-02-06 20:00:00
39
+ 38,Basketball Tournament,3-on-3 tournament,sports,published,Odaiba,2025-07-15 10:00:00,2025-07-15 18:00:00,48,2025-02-07 21:00:00,2025-02-07 21:00:00
40
+ 39,Hiroshima Peace Memorial Park Visit,Historical learning tour,travel,published,Hiroshima City,2025-07-20 09:00:00,2025-07-21 17:00:00,40,2025-02-08 22:00:00,2025-02-08 22:00:00
41
+ 40,Korean Cooking Class,Kimchi and bulgogi making,food,published,Shin-Okubo,2025-07-25 16:00:00,2025-07-25 19:00:00,24,2025-02-09 08:00:00,2025-02-09 08:00:00
42
+ 41,GraphQL API Development,Modern API design,tech,published,Ikebukuro,2025-08-01 13:00:00,2025-08-01 17:00:00,30,2025-02-10 09:00:00,2025-02-10 09:00:00
43
+ 42,EDM Party,Electronic dance music event,music,published,WOMB,2025-08-05 22:00:00,2025-08-06 04:00:00,200,2025-02-11 10:00:00,2025-02-11 10:00:00
44
+ 43,Baseball Game Viewing,Tokyo Dome game viewing,sports,published,Tokyo Dome,2025-08-10 18:00:00,2025-08-10 21:00:00,100,2025-02-12 11:00:00,2025-02-12 11:00:00
45
+ 44,Mount Koya Pilgrimage,Spiritual journey,travel,published,Wakayama Prefecture,2025-08-15 08:00:00,2025-08-16 17:00:00,20,2025-02-13 12:00:00,2025-02-13 12:00:00
46
+ 45,French Dessert Class,Macaron and eclair making,food,published,Jiyugaoka,2025-08-20 14:00:00,2025-08-20 17:00:00,16,2025-02-14 13:00:00,2025-02-14 13:00:00
47
+ 46,Machine Learning MLOps Study,ML for production,tech,published,Shinagawa,2025-08-25 10:00:00,2025-08-25 17:00:00,40,2025-02-15 14:00:00,2025-02-15 14:00:00
48
+ 47,Folk Song Live,Nostalgic folk songs,music,published,Shibuya,2025-08-30 19:00:00,2025-08-30 21:30:00,80,2025-02-16 15:00:00,2025-02-16 15:00:00
49
+ 48,Mountain Hiking,Mount Takao trekking,sports,published,Mount Takao,2025-09-01 08:00:00,2025-09-01 16:00:00,30,2025-02-17 16:00:00,2025-02-17 16:00:00
50
+ 49,Nara Ancient Capital Walk,Todaiji and Kasuga Taisha visit,travel,draft,Nara City,2025-09-05 10:00:00,2025-09-05 17:00:00,25,2025-02-18 17:00:00,2025-02-18 17:00:00
51
+ 50,Chinese Cooking Class,Dim sum and stir-fry making,food,published,Yokohama Chinatown,2025-09-10 17:00:00,2025-09-10 20:00:00,22,2025-02-19 18:00:00,2025-02-19 18:00:00
52
+ 51,TypeScript Practical Course,Type-safe web development,tech,published,Shinjuku,2025-09-15 13:00:00,2025-09-15 18:00:00,28,2025-02-20 19:00:00,2025-02-20 19:00:00
53
+ 52,Symphony Concert,Berlin Philharmonic Japan tour,music,published,NHK Hall,2025-09-20 19:30:00,2025-09-20 21:30:00,300,2025-02-21 20:00:00,2025-02-21 20:00:00
54
+ 53,Futsal Tournament,Indoor soccer tournament,sports,published,Futsal Court,2025-09-25 09:00:00,2025-09-25 17:00:00,32,2025-02-22 21:00:00,2025-02-22 21:00:00
55
+ 54,Ise Grand Shrine Visit,Power spot pilgrimage,travel,published,Ise City Mie Prefecture,2025-09-30 07:00:00,2025-10-01 18:00:00,35,2025-02-23 22:00:00,2025-02-23 22:00:00
56
+ 55,Spanish Cooking Class,Paella and tapas making,food,published,Daikanyama,2025-10-05 16:30:00,2025-10-05 20:00:00,20,2025-02-24 08:00:00,2025-02-24 08:00:00
57
+ 56,Next.js App Router Study,Latest React development,tech,draft,Shibuya,2025-10-10 14:00:00,2025-10-10 18:00:00,32,2025-02-25 09:00:00,2025-02-25 09:00:00
58
+ 57,Karaoke Competition,Sing and have fun together,music,published,Shinjuku Kabukicho,2025-10-15 19:00:00,2025-10-15 23:00:00,50,2025-02-26 10:00:00,2025-02-26 10:00:00
59
+ 58,Bowling Tournament,Aim for strikes!,sports,published,Bowling Alley,2025-10-20 14:00:00,2025-10-20 18:00:00,40,2025-02-27 11:00:00,2025-02-27 11:00:00
60
+ 59,Kamakura Temple Tour,Historic ancient capital walk,travel,published,Kamakura City,2025-10-25 09:30:00,2025-10-25 17:30:00,30,2025-02-28 12:00:00,2025-02-28 12:00:00
61
+ 60,Italian Dessert Class,Tiramisu and gelato making,food,published,Kichijoji,2025-10-30 15:00:00,2025-10-30 18:00:00,18,2025-03-01 13:00:00,2025-03-01 13:00:00
62
+ 61,Rust Programming Introduction,Systems programming language,tech,published,Akihabara,2025-11-01 10:00:00,2025-11-01 17:00:00,25,2025-03-02 14:00:00,2025-03-02 14:00:00
63
+ 62,Hip Hop Live,Emerging artist performance,music,published,LIQUIDROOM,2025-11-05 20:00:00,2025-11-05 23:00:00,150,2025-03-03 15:00:00,2025-03-03 15:00:00
64
+ 63,Archery Experience,Kyudo experience class,sports,published,Budokan,2025-11-10 10:00:00,2025-11-10 16:00:00,20,2025-03-04 16:00:00,2025-03-04 16:00:00
65
+ 64,Kumano Kodo Walking,Walk the World Heritage trail,travel,published,Wakayama Prefecture,2025-11-15 08:00:00,2025-11-16 17:00:00,25,2025-03-05 17:00:00,2025-03-05 17:00:00
66
+ 65,Mexican Cooking Class,Tacos and guacamole making,food,published,Harajuku,2025-11-20 17:00:00,2025-11-20 20:00:00,24,2025-03-06 18:00:00,2025-03-06 18:00:00
67
+ 66,AI ChatGPT Utilization Seminar,AI for business efficiency,tech,published,Otemachi,2025-11-25 13:00:00,2025-11-25 17:00:00,50,2025-03-07 19:00:00,2025-03-07 19:00:00
68
+ 67,Blues Live,Authentic blues session,music,published,Shinjuku Pit Inn,2025-11-30 20:30:00,2025-11-30 23:30:00,70,2025-03-08 20:00:00,2025-03-08 20:00:00
69
+ 68,Ski Snowboard,Enjoy winter sports,sports,published,Karuizawa,2025-12-05 07:00:00,2025-12-06 18:00:00,40,2025-03-09 21:00:00,2025-03-09 21:00:00
70
+ 69,Shirakawa-go Gassho-zukuri Visit,Visit World Heritage village,travel,draft,Shirakawa Village Gifu,2025-12-10 09:00:00,2025-12-11 16:00:00,30,2025-03-10 22:00:00,2025-03-10 22:00:00
71
+ 70,Christmas Cake Class,Handmade Christmas cake,food,published,Futakotamagawa,2025-12-15 14:00:00,2025-12-15 18:00:00,20,2025-03-11 08:00:00,2025-03-11 08:00:00
72
+ 71,Blockchain Development Introduction,Distributed ledger technology basics,tech,published,Roppongi,2025-12-20 10:00:00,2025-12-20 17:00:00,30,2025-03-12 09:00:00,2025-03-12 09:00:00
73
+ 72,Christmas Concert,Holy night music concert,music,published,Tokyo International Forum,2025-12-24 19:00:00,2025-12-24 21:30:00,500,2025-03-13 10:00:00,2025-03-13 10:00:00
74
+ 73,Year-end Bowling Tournament,Last bowling of the year,sports,published,Shinagawa Bowl,2025-12-28 15:00:00,2025-12-28 19:00:00,36,2025-03-14 11:00:00,2025-03-14 11:00:00
75
+ 74,New Year Shrine Visit Tour,New Year worship at Meiji Shrine,travel,published,Meiji Shrine,2026-01-01 10:00:00,2026-01-01 14:00:00,100,2025-03-15 12:00:00,2025-03-15 12:00:00
76
+ 75,New Year Party Cooking Class,Osechi cuisine making experience,food,published,Ginza,2026-01-05 16:00:00,2026-01-05 20:00:00,16,2025-03-16 13:00:00,2025-03-16 13:00:00
77
+ 76,Go Language Introduction,Concurrent programming,tech,draft,Shibuya,2026-01-10 13:00:00,2026-01-10 18:00:00,28,2025-03-17 14:00:00,2025-03-17 14:00:00
78
+ 77,New Year Concert,Music concert celebrating new year,music,published,Suntory Hall,2026-01-12 15:00:00,2026-01-12 17:30:00,200,2025-03-18 15:00:00,2025-03-18 15:00:00
79
+ 78,New Year Marathon,New year health building,sports,published,Imperial Palace area,2026-01-15 09:00:00,2026-01-15 12:00:00,150,2025-03-19 16:00:00,2025-03-19 16:00:00
80
+ 79,Hakone Ekiden Viewing Tour,Watch New Year tradition,travel,published,Hakone,2026-01-02 08:00:00,2026-01-03 17:00:00,45,2025-03-20 17:00:00,2025-03-20 17:00:00
81
+ 80,Valentine Chocolate Class,Handmade chocolate making,food,published,Omotesando,2026-02-10 15:00:00,2026-02-10 18:00:00,22,2025-03-21 18:00:00,2025-03-21 18:00:00
82
+ 81,Flutter Mobile Development,Cross-platform development,tech,published,Shinjuku,2026-02-15 10:00:00,2026-02-15 17:00:00,35,2025-03-22 19:00:00,2025-03-22 19:00:00
83
+ 82,Valentine Concert,Love-themed music concert,music,published,Orchard Hall,2026-02-14 19:30:00,2026-02-14 21:30:00,150,2025-03-23 20:00:00,2025-03-23 20:00:00
84
+ 83,Ice Skating Experience,Ice skating class,sports,published,Ice Skating Rink,2026-02-20 14:00:00,2026-02-20 17:00:00,30,2025-03-24 21:00:00,2025-03-24 21:00:00
85
+ 84,Kawazu Cherry Blossom Festival,See early blooming cherry blossoms,travel,published,Kawazu Town Shizuoka,2026-02-25 10:00:00,2026-02-25 16:00:00,35,2025-03-25 22:00:00,2025-03-25 22:00:00
86
+ 85,Girls Day Cooking Class,Make spring Japanese cuisine,food,published,Asakusa,2026-03-01 16:30:00,2026-03-01 19:30:00,18,2025-03-26 08:00:00,2025-03-26 08:00:00
87
+ 86,Svelte Workshop,Lightweight frontend framework,tech,published,Ikebukuro,2026-03-05 13:00:00,2026-03-05 18:00:00,25,2025-03-27 09:00:00,2025-03-27 09:00:00
88
+ 87,Spring Concert,Cherry blossom themed music concert,music,published,Kioi Hall,2026-03-10 19:00:00,2026-03-10 21:00:00,120,2025-03-28 10:00:00,2025-03-28 10:00:00
89
+ 88,Spring Sports Day,Exercise together happily,sports,published,Yoyogi Park,2026-03-15 10:00:00,2026-03-15 16:00:00,60,2025-03-29 11:00:00,2025-03-29 11:00:00
90
+ 89,Cherry Blossom Picnic,Hanami under cherry blossoms,travel,draft,Ueno Park,2026-03-30 11:00:00,2026-03-30 16:00:00,50,2025-03-30 12:00:00,2025-03-30 12:00:00
91
+ 90,Spring Vegetable Cooking Class,Cuisine using seasonal vegetables,food,published,Tsukiji,2026-04-05 17:00:00,2026-04-05 20:00:00,20,2025-03-31 13:00:00,2025-03-31 13:00:00
92
+ 91,Deno Runtime Study Group,Next-generation JavaScript runtime,tech,published,Akihabara,2026-04-10 14:00:00,2026-04-10 18:00:00,30,2025-04-01 14:00:00,2025-04-01 14:00:00
93
+ 92,Spring Festival Live,Music festival with falling cherry blossoms,music,published,Hibiya Open-Air Concert Hall,2026-04-12 17:00:00,2026-04-12 21:00:00,300,2025-04-02 15:00:00,2025-04-02 15:00:00
94
+ 93,Spring Hiking,Walk in fresh green mountains,sports,published,Okutama,2026-04-15 08:00:00,2026-04-15 17:00:00,25,2025-04-03 16:00:00,2025-04-03 16:00:00
95
+ 94,Cherry Blossom Spot Tour,Kanto cherry blossom spots tour,travel,published,Kanto Region,2026-04-01 09:00:00,2026-04-02 18:00:00,40,2025-04-04 17:00:00,2025-04-04 17:00:00
96
+ 95,Bento Making Class,Spring picnic bento,food,published,Ebisu,2026-04-20 15:00:00,2026-04-20 18:00:00,24,2025-04-05 18:00:00,2025-04-05 18:00:00
97
+ 96,WebAssembly Introduction,Native performance in browser,tech,draft,Shinagawa,2026-04-25 10:00:00,2026-04-25 17:00:00,32,2025-04-06 19:00:00,2025-04-06 19:00:00
98
+ 97,Golden Week Live,Enjoy holidays with music,music,published,Tokyo Dome City,2026-05-03 18:00:00,2026-05-03 22:00:00,400,2025-04-07 20:00:00,2025-04-07 20:00:00
99
+ 98,Children Day Sports Festival,Family sports day,sports,published,Tamagawa Riverbank,2026-05-05 10:00:00,2026-05-05 15:00:00,80,2025-04-08 21:00:00,2025-04-08 21:00:00
100
+ 99,Golden Week Travel,Domestic travel during holidays,travel,published,Izu Peninsula,2026-05-01 09:00:00,2026-05-05 17:00:00,30,2025-04-09 22:00:00,2025-04-09 22:00:00
101
+ 100,BBQ Party,Enjoy BBQ together,food,published,Odaiba Seaside Park,2026-05-10 11:00:00,2026-05-10 16:00:00,50,2025-04-10 08:00:00,2025-04-10 08:00:00
data/sig/r_csv.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module RCsv
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
data/test.rb ADDED
@@ -0,0 +1,19 @@
1
+ require_relative 'lib/rbcsv'
2
+
3
+ # バージョン確認
4
+ # puts RCsv.version_info
5
+
6
+ # CSVデータの準備
7
+ csv_data = <<~CSV
8
+ name,age,city
9
+ Alice,30,New York
10
+ Bob,25,Los Angeles
11
+ Charlie,35,Chicago
12
+ CSV
13
+
14
+ puts "\n=== CSV Parse Test ==="
15
+ parsed_data = RbCsv.parse(csv_data)
16
+ puts "Parsed data:"
17
+ parsed_data.each { |row| puts row.inspect }
18
+
19
+ puts "csv parse done."
data/test_fixed.rb ADDED
@@ -0,0 +1,17 @@
1
+ require_relative 'lib/r_csv'
2
+
3
+ # バージョン確認
4
+ # puts RCsv.version_info
5
+
6
+ # CSVデータの準備
7
+ csv_data = <<~CSV
8
+ name,age,city
9
+ Alice,30,New York
10
+ Bob,25,Los Angeles
11
+ Charlie,35,Chicago
12
+ CSV
13
+
14
+ puts "\n=== CSV Parse Test ==="
15
+ parsed_data = RCsv.parse(csv_data)
16
+ puts "Parsed data:"
17
+ parsed_data.each { |row| puts row.inspect }
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rbcsv
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - fujitani sora
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rb_sys
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: 0.9.91
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: 0.9.91
26
+ description: A Ruby gem that provides fast CSV processing capabilities using Rust
27
+ extensions for performance-critical operations
28
+ email:
29
+ - fujitanisora0414@gmail.com
30
+ executables: []
31
+ extensions:
32
+ - ext/rbcsv/extconf.rb
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".ruby-version"
36
+ - ".serena/.gitignore"
37
+ - ".serena/memories/code_style_conventions.md"
38
+ - ".serena/memories/project_overview.md"
39
+ - ".serena/memories/suggested_commands.md"
40
+ - ".serena/memories/task_completion_checklist.md"
41
+ - ".serena/project.yml"
42
+ - CHANGELOG.md
43
+ - CODE_OF_CONDUCT.md
44
+ - Cargo.lock
45
+ - Cargo.toml
46
+ - LICENSE.txt
47
+ - README.md
48
+ - Rakefile
49
+ - benchmark.rb
50
+ - ext/rbcsv/Cargo.toml
51
+ - ext/rbcsv/extconf.rb
52
+ - ext/rbcsv/src/lib.rs
53
+ - lib/rbcsv.rb
54
+ - lib/rbcsv/version.rb
55
+ - output_comparison.rb
56
+ - sample.csv
57
+ - sig/r_csv.rbs
58
+ - test.rb
59
+ - test_fixed.rb
60
+ homepage: https://github.com/fs0414/rbcsv
61
+ licenses:
62
+ - MIT
63
+ metadata:
64
+ allowed_push_host: https://rubygems.org
65
+ homepage_uri: https://github.com/fs0414/rbcsv
66
+ source_code_uri: https://github.com/fs0414/rbcsv
67
+ changelog_uri: https://github.com/fs0414/rbcsv/blob/master/CHANGELOG.md
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 3.2.0
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 3.3.11
81
+ requirements: []
82
+ rubygems_version: 3.6.9
83
+ specification_version: 4
84
+ summary: High-performance CSV processing library with Rust extensions
85
+ test_files: []