zayef 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.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +47 -0
  3. data/README.md +210 -0
  4. data/Rakefile +161 -0
  5. data/cliff.toml +65 -0
  6. data/demo.rb +26 -0
  7. data/lib/zayef/generator.rb +399 -0
  8. data/lib/zayef/version.rb +5 -0
  9. data/lib/zayef.rb +113 -0
  10. data/sig/zayef.rbs +4 -0
  11. data/vendor/bundle/ruby/3.0.0/bin/rake +29 -0
  12. data/vendor/bundle/ruby/3.0.0/cache/rake-13.3.0.gem +0 -0
  13. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/History.rdoc +2454 -0
  14. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/MIT-LICENSE +21 -0
  15. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/README.rdoc +155 -0
  16. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/command_line_usage.rdoc +158 -0
  17. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/example/Rakefile1 +38 -0
  18. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/example/Rakefile2 +35 -0
  19. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/example/a.c +6 -0
  20. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/example/b.c +6 -0
  21. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/example/main.c +11 -0
  22. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/glossary.rdoc +42 -0
  23. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/jamis.rb +592 -0
  24. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/proto_rake.rdoc +127 -0
  25. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/rake.1 +156 -0
  26. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/rakefile.rdoc +622 -0
  27. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/doc/rational.rdoc +151 -0
  28. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/exe/rake +27 -0
  29. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/application.rb +854 -0
  30. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/backtrace.rb +25 -0
  31. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/clean.rb +78 -0
  32. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/cloneable.rb +17 -0
  33. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/cpu_counter.rb +122 -0
  34. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/default_loader.rb +15 -0
  35. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/dsl_definition.rb +196 -0
  36. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/early_time.rb +22 -0
  37. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/ext/core.rb +26 -0
  38. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/ext/string.rb +176 -0
  39. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/file_creation_task.rb +25 -0
  40. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/file_list.rb +435 -0
  41. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/file_task.rb +58 -0
  42. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/file_utils.rb +132 -0
  43. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/file_utils_ext.rb +134 -0
  44. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/invocation_chain.rb +57 -0
  45. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/invocation_exception_mixin.rb +17 -0
  46. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/late_time.rb +18 -0
  47. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/linked_list.rb +112 -0
  48. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/loaders/makefile.rb +54 -0
  49. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/multi_task.rb +14 -0
  50. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/name_space.rb +38 -0
  51. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/packagetask.rb +222 -0
  52. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/phony.rb +16 -0
  53. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/private_reader.rb +21 -0
  54. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/promise.rb +100 -0
  55. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/pseudo_status.rb +30 -0
  56. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/rake_module.rb +67 -0
  57. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/rake_test_loader.rb +27 -0
  58. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
  59. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/scope.rb +43 -0
  60. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/task.rb +434 -0
  61. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/task_argument_error.rb +8 -0
  62. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/task_arguments.rb +113 -0
  63. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/task_manager.rb +331 -0
  64. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/tasklib.rb +12 -0
  65. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/testtask.rb +189 -0
  66. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/thread_history_display.rb +49 -0
  67. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/thread_pool.rb +163 -0
  68. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/trace_output.rb +23 -0
  69. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/version.rb +10 -0
  70. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake/win32.rb +51 -0
  71. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/lib/rake.rb +68 -0
  72. data/vendor/bundle/ruby/3.0.0/gems/rake-13.3.0/rake.gemspec +101 -0
  73. data/vendor/bundle/ruby/3.0.0/specifications/rake-13.3.0.gemspec +26 -0
  74. data/zayef.gemspec +40 -0
  75. metadata +121 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1a9db0bd834b1eca144fac50af59308ab319c26805d60581c924c6090d359a34
4
+ data.tar.gz: 760c63144ff6461b4d53877ddde502f69aae45e73679651d329133028f204f01
5
+ SHA512:
6
+ metadata.gz: 768176f603f08df8337c2a18e0b82155590f74f928b2db8ced5e1146c19c9d59720eebdb79d1eed2f539ed7d073bbaf1109243e3fc2a2cd6ba28587c92fdfc1d
7
+ data.tar.gz: e3ee2d91968c2170ab6a9ea13f3a32493ccd133faa53ae2ce0344a99907a480d2ef220e0234070cd8f0812b46546fedb6b832d5722f42eae4223c2f8dd778937
data/CHANGELOG.md ADDED
@@ -0,0 +1,47 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2025-09-17
9
+
10
+ ### Features
11
+ - **feat**: Initial release of Zayef - Moroccan data generator
12
+ - **feat**: Add comprehensive Moroccan names (40+ first names, 50+ family names)
13
+ - **feat**: Add 50+ authentic Moroccan cities and towns
14
+ - **feat**: Add Moroccan phone number generation (06/07 prefixes)
15
+ - **feat**: Add authentic Moroccan email domains (menara.ma, iam.ma, orange.ma)
16
+ - **feat**: Add Moroccan CNI number generation (2 letters + 6 digits)
17
+ - **feat**: Add Moroccan bank account generation with MA prefix
18
+ - **feat**: Add 5-digit Moroccan postal codes
19
+ - **feat**: Add Moroccan company name generation with authentic patterns
20
+ - **feat**: Add all 12 Moroccan administrative regions
21
+ - **feat**: Add 12 major Moroccan universities with full names
22
+ - **feat**: Add 20+ famous Moroccan neighborhoods and districts
23
+ - **feat**: Add 25+ Moroccan medical specialties (perfect for DabaDoc)
24
+ - **feat**: Add common Moroccan professions
25
+ - **feat**: Add 15+ traditional Moroccan dishes (couscous, tagine, pastilla, etc.)
26
+ - **feat**: Add 20+ Moroccan spices and ingredients (ras-el-hanout, safran, etc.)
27
+ - **feat**: Add 15+ famous Moroccan souks and markets
28
+ - **feat**: Add all major Moroccan banks (Attijariwafa, BCP, BMCI, etc.)
29
+ - **feat**: Add famous Moroccan restaurants and cafรฉs
30
+ - **feat**: Add Moroccan hotels and traditional riads
31
+ - **feat**: Add famous Moroccan mosques (Hassan II, Koutoubia, etc.)
32
+ - **feat**: Add Moroccan schools and educational institutions
33
+ - **feat**: Add Moroccan newspapers and media outlets
34
+ - **feat**: Add major Moroccan festivals and cultural events
35
+ - **feat**: Add automated changelog generation with git-cliff
36
+ - **feat**: Add comprehensive Rake tasks for development and release
37
+ - **feat**: Add conventional commit support
38
+ - **feat**: Add MIT license
39
+ - **feat**: Add extensive documentation and examples
40
+
41
+ ### Miscellaneous Tasks
42
+ - **chore**: Set up project structure with proper Ruby gem conventions
43
+ - **chore**: Configure git-cliff for automated changelog generation
44
+ - **chore**: Add comprehensive Rakefile with development and release tasks
45
+ - **chore**: Create executable changelog generation script
46
+ - **chore**: Add demo script showcasing gem capabilities
47
+ - **chore**: Configure git repository with proper .gitignore
data/README.md ADDED
@@ -0,0 +1,210 @@
1
+ # Zayef ๐Ÿ”ฅ
2
+
3
+ A Ruby gem for generating fake data with a Moroccan touch. Perfect for testing and development!
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'zayef'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install zayef
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ require 'zayef'
25
+
26
+ # Generate a full name
27
+ Zayef.name # => "Youssef Alaoui"
28
+
29
+ # Generate individual components
30
+ Zayef.first_name # => "Fatima"
31
+ Zayef.last_name # => "Bennani"
32
+
33
+ # Generate email
34
+ Zayef.email # => "ayoub.kabbaj@gmail.com"
35
+ Zayef.email(first_name: "Ahmed", last_name: "El Fassi") # => "ahmed.el_fassi@yahoo.fr"
36
+
37
+ # Generate phone number (Moroccan format)
38
+ Zayef.phone # => "0612345678"
39
+
40
+ # Generate address
41
+ Zayef.city # => "Casablanca"
42
+ Zayef.address # => "123, Av. Hassan II, Rabat"
43
+
44
+ # Generate Moroccan-specific data
45
+ Zayef.cni_number # => "AB123456"
46
+ Zayef.bank_account # => "MA123456789012345678"
47
+ Zayef.postal_code # => "20000"
48
+ Zayef.company_name # => "Groupe Maroc"
49
+ Zayef.region # => "Casablanca-Settat"
50
+ Zayef.university # => "Universitรฉ Mohammed V de Rabat"
51
+ Zayef.neighborhood # => "Medina"
52
+ Zayef.medical_specialty # => "Mรฉdecine gรฉnรฉrale"
53
+ Zayef.profession # => "Mรฉdecin"
54
+ Zayef.traditional_dish # => "Couscous"
55
+ Zayef.spice # => "Ras-el-hanout"
56
+ Zayef.souk # => "Souk Semmarine"
57
+ Zayef.bank # => "Attijariwafa Bank"
58
+ Zayef.restaurant # => "Cafรฉ Clock"
59
+ Zayef.hotel # => "Riad Kniza"
60
+ Zayef.mosque # => "Mosquรฉe Hassan II"
61
+ Zayef.school # => "Lycรฉe Descartes"
62
+ Zayef.newspaper # => "Le Matin"
63
+ Zayef.festival # => "Festival de Marrakech"
64
+ ```
65
+
66
+ ## Features
67
+
68
+ ### ๐ŸŽฏ **Personal Information**
69
+ - ๐Ÿ  **Moroccan Names**: 40+ authentic first names + 50+ family names
70
+ - ๐Ÿ“ง **Email Generation**: Realistic emails with Moroccan domains (menara.ma, iam.ma, orange.ma)
71
+ - ๐Ÿ“ฑ **Phone Numbers**: Moroccan mobile format (06/07 prefixes)
72
+ - ๐Ÿ™๏ธ **Cities & Addresses**: 50+ real Moroccan cities + authentic street names
73
+ - ๐Ÿก **Neighborhoods**: Famous districts (Medina, Gueliz, Maarif, etc.)
74
+ - ๐Ÿ†” **CNI Numbers**: Moroccan ID format (2 letters + 6 digits)
75
+ - ๐Ÿฆ **Bank Accounts**: Moroccan format with MA prefix
76
+ - ๐Ÿ“ฎ **Postal Codes**: 5-digit Moroccan postal codes
77
+
78
+ ### ๐Ÿข **Professional & Business**
79
+ - ๐Ÿ‘จโ€โš•๏ธ **Medical Specialties**: 25+ Moroccan medical specialties (DabaDoc integration)
80
+ - ๐Ÿ‘” **Professions**: Common Moroccan professions (mรฉdecin, ingรฉnieur, etc.)
81
+ - ๐Ÿข **Company Names**: Authentic Moroccan business naming patterns
82
+ - ๐Ÿฆ **Banks**: All major Moroccan banks (Attijariwafa, BCP, BMCI, etc.)
83
+ - ๐Ÿ“ฐ **Newspapers**: Moroccan media outlets (Le Matin, L'ร‰conomiste, etc.)
84
+
85
+ ### ๐ŸŽ“ **Education & Culture**
86
+ - ๐Ÿ—บ๏ธ **Regions**: All 12 Moroccan administrative regions
87
+ - ๐ŸŽ“ **Universities**: 12+ major Moroccan universities with full names
88
+ - ๐Ÿซ **Schools**: Famous Moroccan schools and lycรฉes
89
+ - ๐ŸŽญ **Festivals**: Major Moroccan cultural festivals
90
+ - ๐Ÿ•Œ **Mosques**: Famous Moroccan mosques (Hassan II, Koutoubia, etc.)
91
+
92
+ ### ๐Ÿฝ๏ธ **Culture & Lifestyle**
93
+ - ๐Ÿฒ **Traditional Dishes**: Famous Moroccan cuisine (couscous, tagine, pastilla, etc.)
94
+ - ๐ŸŒถ๏ธ **Spices**: Moroccan spices and ingredients (ras-el-hanout, safran, etc.)
95
+ - ๐Ÿช **Souks**: Traditional Moroccan markets (Souk Semmarine, Bahia, etc.)
96
+ - โ˜• **Cafรฉs/Restaurants**: Famous Moroccan cafรฉs and restaurants
97
+ - ๐Ÿจ **Hotels/Riads**: Moroccan hotels and traditional riads
98
+
99
+ ### ๐Ÿ“Š **Statistics**
100
+ - **Total Data Points**: 300+ authentic Moroccan entries
101
+ - **Categories**: 18 different data types
102
+ - **100% Moroccan**: Everything is authentically Moroccan
103
+ - **No Duplicates**: All data is unique and varied
104
+
105
+ ## Development
106
+
107
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
108
+
109
+ ### ๐Ÿ“ Automated Changelog
110
+
111
+ Zayef uses [git-cliff](https://github.com/orhun/git-cliff) for automated changelog generation based on conventional commits.
112
+
113
+ #### Installation
114
+
115
+ Install git-cliff:
116
+ ```bash
117
+ # Using cargo (recommended)
118
+ cargo install git-cliff
119
+
120
+ # Or using homebrew (macOS)
121
+ brew install git-cliff
122
+
123
+ # Or download from GitHub releases
124
+ ```
125
+
126
+ #### Usage
127
+
128
+ ```bash
129
+ # Generate full changelog
130
+ ./bin/generate-changelog
131
+
132
+ # Generate changelog for unreleased changes only
133
+ ./bin/generate-changelog --unreleased
134
+
135
+ # Generate changelog for latest version
136
+ ./bin/generate-changelog --latest
137
+
138
+ # Generate changelog up to specific tag
139
+ ./bin/generate-changelog --tag v1.0.0
140
+
141
+ # Check if git-cliff is available
142
+ rake changelog:check
143
+ ```
144
+
145
+ #### Conventional Commits
146
+
147
+ Use conventional commit format for better changelog organization:
148
+
149
+ ```bash
150
+ # Features
151
+ git commit -m "feat: add Moroccan phone number generation"
152
+
153
+ # Bug fixes
154
+ git commit -m "fix: correct CNI number format"
155
+
156
+ # Documentation
157
+ git commit -m "docs: update README with new examples"
158
+
159
+ # Breaking changes
160
+ git commit -m "feat!: change API interface (breaking change)"
161
+
162
+ # With scope
163
+ git commit -m "feat(generator): add support for traditional dishes"
164
+ ```
165
+
166
+ ### ๐Ÿš€ Release Process
167
+
168
+ Zayef includes automated release tasks:
169
+
170
+ ```bash
171
+ # Prepare release (generate changelog, bump version)
172
+ rake release:prepare
173
+
174
+ # Publish to RubyGems.org
175
+ rake release:publish
176
+
177
+ # Full release process
178
+ rake release:full
179
+ ```
180
+
181
+ ### ๐Ÿ“‹ Development Tasks
182
+
183
+ ```bash
184
+ # Run all quality checks
185
+ rake
186
+
187
+ # Generate documentation
188
+ rake dev:docs
189
+
190
+ # Create conventional commit interactively
191
+ rake git:commit
192
+
193
+ # Check changelog generation
194
+ rake changelog:check
195
+ ```
196
+
197
+ ## Contributing
198
+
199
+ Bug reports and pull requests are welcome on GitHub at https://github.com/amqor/zayef.
200
+
201
+ ### ๐Ÿ“ Contributing Guidelines
202
+
203
+ 1. **Use Conventional Commits**: Follow the conventional commit format for automatic changelog generation
204
+ 2. **Add Tests**: Include tests for new features
205
+ 3. **Update Documentation**: Keep README and inline documentation up to date
206
+ 4. **Follow Ruby Style**: Use consistent Ruby coding style
207
+
208
+ ## License
209
+
210
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,161 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/clean"
5
+
6
+ # Changelog tasks
7
+ namespace :changelog do
8
+ desc "Generate changelog for unreleased changes"
9
+ task :unreleased do
10
+ sh "./bin/generate-changelog --unreleased"
11
+ end
12
+
13
+ desc "Generate changelog for latest version"
14
+ task :latest do
15
+ sh "./bin/generate-changelog --latest"
16
+ end
17
+
18
+ desc "Generate full changelog"
19
+ task :full do
20
+ sh "./bin/generate-changelog"
21
+ end
22
+
23
+ desc "Check if git-cliff is available"
24
+ task :check do
25
+ if system("git-cliff --version > /dev/null 2>&1")
26
+ puts "โœ… git-cliff is available"
27
+ else
28
+ puts "โŒ git-cliff is not installed"
29
+ puts "Run: cargo install git-cliff"
30
+ end
31
+ end
32
+ end
33
+
34
+ # Release tasks
35
+ namespace :release do
36
+ desc "Prepare for release (generate changelog, bump version, commit)"
37
+ task :prepare do
38
+ puts "๐Ÿš€ Preparing release..."
39
+
40
+ # Check git status
41
+ unless system("git diff --quiet")
42
+ puts "โŒ Working directory is not clean. Commit or stash changes first."
43
+ exit 1
44
+ end
45
+
46
+ # Generate changelog
47
+ puts "๐Ÿ“ Generating changelog..."
48
+ sh "./bin/generate-changelog --unreleased"
49
+
50
+ # Ask for version bump type
51
+ puts "๐Ÿ“‹ Choose version bump:"
52
+ puts " 1. patch (0.1.0 -> 0.1.1)"
53
+ puts " 2. minor (0.1.0 -> 0.2.0)"
54
+ puts " 3. major (0.1.0 -> 1.0.0)"
55
+ print "Enter choice (1-3): "
56
+
57
+ choice = STDIN.gets.chomp
58
+ bump_type = case choice
59
+ when "1" then "patch"
60
+ when "2" then "minor"
61
+ when "3" then "major"
62
+ else
63
+ puts "โŒ Invalid choice"
64
+ exit 1
65
+ end
66
+
67
+ puts "๐Ÿ”„ Bumping version (#{bump_type})..."
68
+ sh "gem bump --version #{bump_type}"
69
+
70
+ puts "โœ… Release preparation complete!"
71
+ puts "๐Ÿ“‹ Next steps:"
72
+ puts " 1. Review the generated CHANGELOG.md"
73
+ puts " 2. Run: rake release:publish"
74
+ end
75
+
76
+ desc "Publish gem to RubyGems.org"
77
+ task :publish do
78
+ puts "๐Ÿ“ฆ Publishing gem to RubyGems.org..."
79
+
80
+ # Build the gem
81
+ sh "gem build zayef.gemspec"
82
+
83
+ # Get the gem filename
84
+ version = File.read("lib/zayef/version.rb").match(/VERSION = "(.+)"/)[1]
85
+ gem_file = "zayef-#{version}.gem"
86
+
87
+ unless File.exist?(gem_file)
88
+ puts "โŒ Gem file #{gem_file} not found"
89
+ exit 1
90
+ end
91
+
92
+ # Push to RubyGems
93
+ sh "gem push #{gem_file}"
94
+
95
+ puts "โœ… Gem published successfully!"
96
+ puts "๐ŸŽ‰ Zayef v#{version} is now live on RubyGems.org!"
97
+ end
98
+
99
+ desc "Full release process (prepare + publish)"
100
+ task full: [:prepare, :publish]
101
+ end
102
+
103
+ # Development tasks
104
+ namespace :dev do
105
+ desc "Run tests and linting"
106
+ task :test do
107
+ puts "๐Ÿงช Running tests..."
108
+ # Add test commands here when tests are added
109
+ puts "โœ… Tests complete"
110
+ end
111
+
112
+ desc "Generate documentation"
113
+ task :docs do
114
+ puts "๐Ÿ“š Generating documentation..."
115
+ sh "yardoc lib/**/*.rb"
116
+ end
117
+
118
+ desc "Check code quality"
119
+ task quality: [:test, :docs] do
120
+ puts "โœ… Code quality checks complete"
121
+ end
122
+ end
123
+
124
+ # Git tasks
125
+ namespace :git do
126
+ desc "Create conventional commit"
127
+ task :commit do
128
+ puts "๐Ÿ“ Creating conventional commit..."
129
+ puts "Available commit types:"
130
+ puts " feat: A new feature"
131
+ puts " fix: A bug fix"
132
+ puts " docs: Documentation only changes"
133
+ puts " style: Changes that do not affect the meaning of the code"
134
+ puts " refactor: A code change that neither fixes a bug nor adds a feature"
135
+ puts " perf: A code change that improves performance"
136
+ puts " test: Adding missing tests or correcting existing tests"
137
+ puts " chore: Changes to the build process or auxiliary tools"
138
+
139
+ print "Enter commit type: "
140
+ type = STDIN.gets.chomp
141
+
142
+ print "Enter scope (optional): "
143
+ scope = STDIN.gets.chomp
144
+ scope = "(#{scope})" unless scope.empty?
145
+
146
+ print "Enter commit message: "
147
+ message = STDIN.gets.chomp
148
+
149
+ full_message = "#{type}#{scope}: #{message}"
150
+ sh "git add ."
151
+ sh "git commit -m '#{full_message}'"
152
+
153
+ puts "โœ… Commit created: #{full_message}"
154
+ end
155
+ end
156
+
157
+ # Default task
158
+ task default: ["changelog:check", "dev:quality"]
159
+
160
+ # Clean up generated files
161
+ CLEAN.include("*.gem", "CHANGELOG.md", "doc/")
data/cliff.toml ADDED
@@ -0,0 +1,65 @@
1
+ # git-cliff configuration file
2
+ [changelog]
3
+ # changelog header
4
+ header = """
5
+ # Changelog\n
6
+ All notable changes to this project will be documented in this file.\n
7
+ """
8
+ # template for the changelog body
9
+ body = """
10
+ {%- if version %}\
11
+ ## [{{ version | trim_start(matches="(v|V)") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
12
+ {%- else -%}
13
+ ## [unreleased]
14
+ {%- endif %}\
15
+
16
+ {% for group, commits in commits | group_by(attribute="group") %}
17
+ ### {{ group | upper_first }}
18
+ {% for commit in commits %}
19
+ - {% if commit.scope %}**{{commit.scope}}**: {% endif %}\
20
+ {% if commit.breaking %}[**breaking**] {% endif %}\
21
+ {{ commit.message | upper_first }}
22
+ {%- endfor -%}
23
+ {% endfor %}\n
24
+ """
25
+ # remove the leading and trailing whitespace from the template
26
+ trim = true
27
+
28
+ [git]
29
+ # parse the commits based on https://www.conventionalcommits.org
30
+ conventional_commits = true
31
+ # filter out the commits that are not conventional
32
+ filter_unconventional = true
33
+ # process each line of a commit as an individual commit
34
+ split_commits = false
35
+ # regex for preprocessing the commit messages
36
+ commit_preprocessors = [
37
+ { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/amqor/zayef/pull/${2}))"},
38
+ ]
39
+ # regex for parsing and grouping commits
40
+ commit_parsers = [
41
+ { message = "^feat", group = "Features"},
42
+ { message = "^fix", group = "Bug Fixes"},
43
+ { message = "^doc", group = "Documentation"},
44
+ { message = "^perf", group = "Performance"},
45
+ { message = "^refactor", group = "Refactoring"},
46
+ { message = "^style", group = "Styling"},
47
+ { message = "^test", group = "Testing"},
48
+ { message = "^chore\\(release\\): prepare for", skip = true},
49
+ { message = "^chore", group = "Miscellaneous Tasks"},
50
+ { body = ".*security", group = "Security"},
51
+ ]
52
+ # protect breaking changes from being skipped due to matching a skipping commit_parser
53
+ protect_breaking_commits = false
54
+ # filter out the commits that are not matched by commit parsers
55
+ filter_commits = false
56
+ # glob pattern for matching git tags
57
+ tag_pattern = "v[0-9]*"
58
+ # regex for skipping tags
59
+ skip_tags = "v0.1.0-beta.1"
60
+ # regex for ignoring tags
61
+ ignore_tags = ""
62
+ # sort the tags topologically
63
+ topo_order = false
64
+ # sort the commits inside sections by oldest/newest order
65
+ sort_commits = "oldest"
data/demo.rb ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require './lib/zayef'
5
+
6
+ puts '๐Ÿš€ ZAYEF - Moroccan Data Generator Demo ๐Ÿš€'
7
+ puts '=' * 60
8
+
9
+ # Show that quotes work correctly
10
+ puts '๐Ÿ“‹ Sample Data with Quoted Names & Cities:'
11
+ puts ''
12
+
13
+ 3.times do |i|
14
+ puts "Sample #{i+1}:"
15
+ puts " Name: #{Zayef.name}"
16
+ puts " City: #{Zayef.city}"
17
+ puts " Email: #{Zayef.email}"
18
+ puts " Specialty: #{Zayef.medical_specialty}"
19
+ puts " Dish: #{Zayef.traditional_dish}"
20
+ puts " Bank: #{Zayef.bank}"
21
+ puts ''
22
+ end
23
+
24
+ puts 'โœ… MOROCCAN_LAST_NAMES and MOROCCAN_CITIES now have quotes!'
25
+ puts 'โœ… All 300+ Moroccan data entries working perfectly!'
26
+ puts '=' * 60