semverify 0.3.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,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'semverify/version_file_sources/base'
4
+
5
+ module Semverify
6
+ module VersionFileSources
7
+ # Checks for the gem's version in a file named lib/**/version.rb
8
+ #
9
+ # @api public
10
+ #
11
+ class VersionRb < Base
12
+ # The regexp to find the version and surrounding content within the version.rb file
13
+ VERSION_REGEXP = /
14
+ \A
15
+ (?<content_before>
16
+ .*
17
+ VERSION\s*=\s*(?<quote>['"])
18
+ )
19
+ (?<version>#{Semverify::SEMVER_REGEXP.source})
20
+ (?<content_after>\k<quote>.*)
21
+ \z
22
+ /xm
23
+
24
+ private
25
+
26
+ # The version file regexp
27
+ # @return [Regexp]
28
+ # @api private
29
+ private_class_method def self.content_regexp = VERSION_REGEXP
30
+
31
+ # A glob that matches potential version files
32
+ # @return [String]
33
+ # @api private
34
+ private_class_method def self.glob = 'lib/**/version.rb'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'semverify/version_file_sources/version'
4
+ require 'semverify/version_file_sources/version_rb'
5
+ require 'semverify/version_file_sources/gemspec'
6
+
7
+ module Semverify
8
+ # Module containing version file sources used by Semverify::VersionFileFactory
9
+ module VersionFileSources
10
+ end
11
+ end
data/lib/semverify.rb ADDED
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'semverify/command_line'
4
+ require 'semverify/incrementable_semver'
5
+ require 'semverify/regexp'
6
+ require 'semverify/semver'
7
+ require 'semverify/version_file'
8
+ require 'semverify/version_file_factory'
9
+ require 'semverify/version_file_sources'
10
+ require 'semverify/version'
11
+
12
+ # Parse and compare semver versions AND bump versions for Ruby Gems
13
+ module Semverify
14
+ # Errors reported by the Semverify library
15
+ class Error < StandardError; end
16
+
17
+ # Your code goes here...
18
+ end
data/semverify.gemspec ADDED
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/semverify/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'semverify'
7
+ spec.version = Semverify::VERSION
8
+ spec.authors = ['James Couball']
9
+ spec.email = ['jcouball@yahoo.com']
10
+
11
+ spec.summary = 'A Gem to parse and compare semver versions AND bump versions for Ruby Gems'
12
+ spec.description = spec.summary
13
+ spec.homepage = 'http://github.com/main-branch/semverify'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = '>= 3.0.0'
16
+
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = spec.homepage
21
+ spec.metadata['changelog_uri'] = 'https://rubydoc.info/gems/semverify/file/CHANGELOG.md'
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(__dir__) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
28
+ end
29
+ end
30
+ spec.bindir = 'exe'
31
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ['lib']
33
+
34
+ spec.add_runtime_dependency 'thor', '~> 1.2'
35
+
36
+ spec.add_development_dependency 'bundler-audit', '~> 0.9'
37
+ spec.add_development_dependency 'create_github_release', '~> 1.0'
38
+ spec.add_development_dependency 'rake', '~> 13.0'
39
+ spec.add_development_dependency 'rspec', '~> 3.12'
40
+ spec.add_development_dependency 'rubocop', '~> 1.48'
41
+ spec.add_development_dependency 'simplecov', '~> 0.22'
42
+ spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
43
+
44
+ unless RUBY_PLATFORM == 'java'
45
+ spec.add_development_dependency 'redcarpet', '~> 3.6'
46
+ spec.add_development_dependency 'yard', '~> 0.9', '>= 0.9.28'
47
+ spec.add_development_dependency 'yardstick', '~> 0.9'
48
+ end
49
+
50
+ spec.metadata['rubygems_mfa_required'] = 'true'
51
+ end
@@ -0,0 +1,4 @@
1
+ module Semverify
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,235 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: semverify
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
5
+ platform: ruby
6
+ authors:
7
+ - James Couball
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-03-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler-audit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.9'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: create_github_release
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '13.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '13.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.12'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.12'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.48'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.48'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.22'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.22'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov-lcov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.8'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.8'
125
+ - !ruby/object:Gem::Dependency
126
+ name: redcarpet
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.6'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3.6'
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.9'
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: 0.9.28
149
+ type: :development
150
+ prerelease: false
151
+ version_requirements: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - "~>"
154
+ - !ruby/object:Gem::Version
155
+ version: '0.9'
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: 0.9.28
159
+ - !ruby/object:Gem::Dependency
160
+ name: yardstick
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: '0.9'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '0.9'
173
+ description: A Gem to parse and compare semver versions AND bump versions for Ruby
174
+ Gems
175
+ email:
176
+ - jcouball@yahoo.com
177
+ executables:
178
+ - semverify
179
+ extensions: []
180
+ extra_rdoc_files: []
181
+ files:
182
+ - ".rspec"
183
+ - ".rubocop.yml"
184
+ - ".yardopts"
185
+ - CHANGELOG.md
186
+ - CODE_OF_CONDUCT.md
187
+ - Gemfile
188
+ - LICENSE.txt
189
+ - README.md
190
+ - Rakefile
191
+ - exe/semverify
192
+ - lib/semverify.rb
193
+ - lib/semverify/command_line.rb
194
+ - lib/semverify/incrementable_semver.rb
195
+ - lib/semverify/regexp.rb
196
+ - lib/semverify/semver.rb
197
+ - lib/semverify/version.rb
198
+ - lib/semverify/version_file.rb
199
+ - lib/semverify/version_file_factory.rb
200
+ - lib/semverify/version_file_sources.rb
201
+ - lib/semverify/version_file_sources/base.rb
202
+ - lib/semverify/version_file_sources/gemspec.rb
203
+ - lib/semverify/version_file_sources/version.rb
204
+ - lib/semverify/version_file_sources/version_rb.rb
205
+ - semverify.gemspec
206
+ - sig/semversion.rbs
207
+ homepage: http://github.com/main-branch/semverify
208
+ licenses:
209
+ - MIT
210
+ metadata:
211
+ allowed_push_host: https://rubygems.org
212
+ homepage_uri: http://github.com/main-branch/semverify
213
+ source_code_uri: http://github.com/main-branch/semverify
214
+ changelog_uri: https://rubydoc.info/gems/semverify/file/CHANGELOG.md
215
+ rubygems_mfa_required: 'true'
216
+ post_install_message:
217
+ rdoc_options: []
218
+ require_paths:
219
+ - lib
220
+ required_ruby_version: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - ">="
223
+ - !ruby/object:Gem::Version
224
+ version: 3.0.0
225
+ required_rubygems_version: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ requirements: []
231
+ rubygems_version: 3.4.1
232
+ signing_key:
233
+ specification_version: 4
234
+ summary: A Gem to parse and compare semver versions AND bump versions for Ruby Gems
235
+ test_files: []