forever_version 1.3.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.

Potentially problematic release.


This version of forever_version might be problematic. Click here for more details.

Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +19 -0
  4. data/LICENSE.txt +21 -0
  5. data/Rakefile +5 -0
  6. data/SETUP.md +126 -0
  7. data/forever_version.gemspec +29 -0
  8. data/lib/forever_version/version.rb +5 -0
  9. data/lib/forever_version.rb +7 -0
  10. data/vendor/bundle/ruby/3.1.0/bin/rake +29 -0
  11. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/History.rdoc +2454 -0
  12. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/MIT-LICENSE +21 -0
  13. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/README.rdoc +155 -0
  14. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/command_line_usage.rdoc +171 -0
  15. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/example/Rakefile1 +38 -0
  16. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/example/Rakefile2 +35 -0
  17. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/example/a.c +6 -0
  18. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/example/b.c +6 -0
  19. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/example/main.c +11 -0
  20. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/glossary.rdoc +42 -0
  21. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/jamis.rb +592 -0
  22. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/proto_rake.rdoc +127 -0
  23. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/rake.1 +156 -0
  24. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/rakefile.rdoc +622 -0
  25. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/doc/rational.rdoc +151 -0
  26. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/exe/rake +27 -0
  27. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/application.rb +854 -0
  28. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/backtrace.rb +25 -0
  29. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/clean.rb +78 -0
  30. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/cloneable.rb +17 -0
  31. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/cpu_counter.rb +122 -0
  32. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/default_loader.rb +15 -0
  33. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/dsl_definition.rb +196 -0
  34. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/early_time.rb +22 -0
  35. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/ext/core.rb +26 -0
  36. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/ext/string.rb +176 -0
  37. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/file_creation_task.rb +25 -0
  38. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/file_list.rb +435 -0
  39. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/file_task.rb +58 -0
  40. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/file_utils.rb +132 -0
  41. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/file_utils_ext.rb +134 -0
  42. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/invocation_chain.rb +57 -0
  43. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/invocation_exception_mixin.rb +17 -0
  44. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/late_time.rb +18 -0
  45. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/linked_list.rb +112 -0
  46. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/loaders/makefile.rb +54 -0
  47. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/multi_task.rb +14 -0
  48. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/name_space.rb +38 -0
  49. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/packagetask.rb +222 -0
  50. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/phony.rb +16 -0
  51. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/private_reader.rb +21 -0
  52. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/promise.rb +100 -0
  53. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/pseudo_status.rb +30 -0
  54. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/rake_module.rb +67 -0
  55. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb +27 -0
  56. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
  57. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/scope.rb +43 -0
  58. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/task.rb +434 -0
  59. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/task_argument_error.rb +8 -0
  60. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/task_arguments.rb +113 -0
  61. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/task_manager.rb +331 -0
  62. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/tasklib.rb +12 -0
  63. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/testtask.rb +189 -0
  64. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/thread_history_display.rb +49 -0
  65. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/thread_pool.rb +157 -0
  66. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/trace_output.rb +23 -0
  67. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/version.rb +10 -0
  68. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake/win32.rb +51 -0
  69. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/lib/rake.rb +68 -0
  70. data/vendor/bundle/ruby/3.1.0/gems/rake-13.3.1/rake.gemspec +101 -0
  71. data/vendor/bundle/ruby/3.1.0/specifications/rake-13.3.1.gemspec +26 -0
  72. metadata +116 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a7d18cbd762bb65c1bf6ff84fb2023ddb4b80f18216e3d15b2e10b843de771e7
4
+ data.tar.gz: 9e1bc6e905c672a3d84e3419c6ccacf5dfc4fd4c8f8e750eb11f1c06db31c091
5
+ SHA512:
6
+ metadata.gz: 4bdcaf333460563e7a09a33c9efb80d2f7ccb5caab49d41374a61494ca8d14a3541731c1e79bb9f3655cd19785e4a68b1f3cfeb3308c4b5389ce303421a39624
7
+ data.tar.gz: 863fe928bf66456d4296c6cc491b0bf819b0739615729e685b5f03fff3896a3c49c67555e1d7fa67b956e5c512fa0a3e3031224dc0340903c9671ea771b0bea9
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in forever_version.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ forever_version (1.3.7)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (13.3.1)
10
+
11
+ PLATFORMS
12
+ x86_64-linux
13
+
14
+ DEPENDENCIES
15
+ forever_version!
16
+ rake (~> 13.0)
17
+
18
+ BUNDLED WITH
19
+ 2.3.27
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Forever Version
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+
5
+ task default: :spec
data/SETUP.md ADDED
@@ -0,0 +1,126 @@
1
+ # Setup Instructions
2
+
3
+ This document explains how to set up the `forever_version` gem for automated releases and publishing to RubyGems.
4
+
5
+ ## Prerequisites
6
+
7
+ 1. A GitHub repository for the gem
8
+ 2. A RubyGems account
9
+ 3. Admin access to the GitHub repository
10
+
11
+ ## GitHub Repository Setup
12
+
13
+ 1. **Create the repository** on GitHub and push your gem code
14
+ 2. **Enable GitHub Actions** (should be enabled by default)
15
+ 3. **Configure repository settings**:
16
+ - Go to Settings → Actions → General
17
+ - Under "Workflow permissions", select "Read and write permissions"
18
+ - Check "Allow GitHub Actions to create and approve pull requests"
19
+
20
+ ## RubyGems API Key Setup
21
+
22
+ 1. **Generate a RubyGems API Key**:
23
+ - Log in to [RubyGems.org](https://rubygems.org)
24
+ - Go to your account settings
25
+ - Click on "API Keys"
26
+ - Create a new API key with "Push rubygems" scope
27
+ - Copy the generated API key
28
+
29
+ 2. **Add the API key to GitHub Secrets**:
30
+ - Go to your GitHub repository
31
+ - Navigate to Settings → Secrets and variables → Actions
32
+ - Click "New repository secret"
33
+ - Name: `RUBYGEMS_API_KEY`
34
+ - Value: Paste the API key from RubyGems
35
+ - Click "Add secret"
36
+
37
+ ## Gem Configuration
38
+
39
+ 1. **Update the gemspec file** (`forever_version.gemspec`):
40
+ - Change the author name and email
41
+ - Update the homepage URL to your repository
42
+ - Update the source_code_uri to your repository
43
+
44
+ 2. **Update the README** if needed:
45
+ - Change any references to your username/repository
46
+
47
+ ## Testing the Setup
48
+
49
+ 1. **Test the workflows**:
50
+ - Go to Actions tab in your GitHub repository
51
+ - You should see the "Test" workflow run automatically on pushes
52
+ - You can manually trigger the "Automated Releases" workflow to test it
53
+
54
+ 2. **Verify permissions**:
55
+ - The automated release workflow needs write access to create releases
56
+ - The publish workflow needs the RubyGems API key to push gems
57
+
58
+ ## How It Works
59
+
60
+ ### Automated Releases (auto-release.yml)
61
+
62
+ - Runs every 4 hours via cron schedule
63
+ - Uses randomized thresholds to determine when to create releases:
64
+ - **Patch**: 8-16 hours since last release (80% probability when threshold met)
65
+ - **Minor**: 18-30 hours since last release (60% probability when threshold met)
66
+ - **Major**: 144-168 hours since last release (60% probability when threshold met)
67
+ - Updates the version in lib/forever_version/version.rb
68
+ - Creates a git commit and pushes it
69
+ - Creates a GitHub release with generated notes
70
+
71
+ ### Publish to RubyGems (publish-gem.yml)
72
+
73
+ - Triggers automatically when a GitHub release is published
74
+ - Builds the gem using the gemspec
75
+ - Publishes it to RubyGems using the API key
76
+ - Cleans up credentials after publishing
77
+
78
+ ## Manual Release
79
+
80
+ You can also create releases manually:
81
+
82
+ 1. Go to Actions → "Automated Releases"
83
+ 2. Click "Run workflow"
84
+ 3. Choose the release type (patch/minor/major)
85
+ 4. Click "Run workflow"
86
+
87
+ ## Troubleshooting
88
+
89
+ ### Common Issues
90
+
91
+ 1. **Permission denied errors**: Check that workflow permissions are set to "Read and write permissions"
92
+
93
+ 2. **RubyGems push fails**:
94
+ - Verify the API key is correct
95
+ - Check that the gem name is not already taken
96
+ - Ensure you have push permissions for the gem
97
+
98
+ 3. **Version conflicts**:
99
+ - Make sure the version in version.rb matches what is expected
100
+ - Check that you have not manually created conflicting releases
101
+
102
+ 4. **Workflow does not run**:
103
+ - Check that the cron syntax is correct
104
+ - Verify that Actions are enabled for the repository
105
+
106
+ ### Logs
107
+
108
+ - All workflow runs are logged in the Actions tab
109
+ - Check individual job logs for detailed error messages
110
+ - The workflows include debug output to help troubleshoot timing decisions
111
+
112
+ ## Security Notes
113
+
114
+ - The RubyGems API key is stored as a GitHub secret and is automatically masked in logs
115
+ - Credentials are cleaned up after each publish job
116
+ - The workflows only run on the main branch by default
117
+
118
+ ## Customization
119
+
120
+ To modify the release frequency:
121
+
122
+ 1. Edit the cron schedule in auto-release.yml
123
+ 2. Adjust the threshold calculations in the "Determine release type" step
124
+ 3. Modify the randomization percentages to change release probability
125
+
126
+ The current settings create a varied mix of releases with randomization for organic patterns.
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/forever_version/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "forever_version"
7
+ spec.version = ForeverVersion::VERSION
8
+ spec.authors = ["kinduff"]
9
+ spec.email = ["kinduff@protonmail.com"]
10
+
11
+ spec.summary = "Minimal implementation of forever versioning"
12
+ spec.description = "Minimal implementation of forever versioning using semantic versioning"
13
+ spec.homepage = "https://github.com/lasagnapizza/forever_version"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = "https://github.com/lasagnapizza/forever_version"
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ spec.files = Dir.glob("**/*").select { |f| File.file?(f) }.reject do |f|
23
+ f.match(%r{\A(?:(?:bin|test|spec|features|\.github)/|\.(?:git|travis|circleci)|appveyor)}) ||
24
+ f.end_with?(".gem")
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ForeverVersion
4
+ VERSION = "1.3.8"
5
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "forever_version/version"
4
+
5
+ module ForeverVersion
6
+ class Error < StandardError; end
7
+ end
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by RubyGems.
4
+ #
5
+ # The application 'rake' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'rubygems'
10
+
11
+ Gem.use_gemdeps
12
+
13
+ version = ">= 0.a"
14
+
15
+ str = ARGV.first
16
+ if str
17
+ str = str.b[/\A_(.*)_\z/, 1]
18
+ if str and Gem::Version.correct?(str)
19
+ version = str
20
+ ARGV.shift
21
+ end
22
+ end
23
+
24
+ if Gem.respond_to?(:activate_bin_path)
25
+ load Gem.activate_bin_path('rake', 'rake', version)
26
+ else
27
+ gem "rake", version
28
+ load Gem.bin_path("rake", "rake", version)
29
+ end