semver2 3.4.0 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.semver +1 -1
  3. data/README.md +3 -1
  4. data/lib/xsemver.rb +8 -8
  5. metadata +13 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c28524c4819de26e6ef57047028c223bfea23c6d
4
- data.tar.gz: bfe233cbd6a4c2668c293640a42aebd050195d8f
3
+ metadata.gz: f248590a7f6575c4c28a8547f98b8548fcd9a019
4
+ data.tar.gz: 2b483383617d749c3945e1de18bc0dac15000ae5
5
5
  SHA512:
6
- metadata.gz: 6178a04c20663f0fe8ad349cc6e3cb23b383626326d9f8aa6418bfe91948a0fc28c05f53d918d46b20500ed48f4e25a64a19d83838c825c9e952a65399bf39ba
7
- data.tar.gz: 290c1bfefbb25d594d804f1a2c919cea1b0b4a687fcf603334525d34d4bec58688a65911bbe659b60ae26e063a3e1696a7e2efbcf65b984d826bad4c603de8c2
6
+ metadata.gz: 907e9bdc75037edfb8e83a0910bea4ce75099cec451ff4a0dc8c61d891ab0c4490daf148b223c49db577fa6276d36651ad3d3931e80e5bbf1060262f4ca9b157
7
+ data.tar.gz: 142607de6ab36a3cd029bd96676838bb67cc7aad144dfd09924c91c0753ebed6be81c6e6f5419190ff4d18949351459c087f4092ebef1f5be235129439573e73
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 3
3
3
  :minor: 4
4
- :patch: 0
4
+ :patch: 1
5
5
  :special: ''
6
6
  :metadata: ''
data/README.md CHANGED
@@ -43,7 +43,9 @@ parsing in ruby
43
43
  ---------------
44
44
 
45
45
  require 'semver'
46
- v = SemVer.parse 'v1.2.3-rc56
46
+ v = SemVer.parse 'v1.2.3-rc.56'
47
+
48
+ v = SemVer.parse_rubygems '2.0.3.rc.2'
47
49
 
48
50
  git integration
49
51
  ---------------
data/lib/xsemver.rb CHANGED
@@ -8,7 +8,7 @@ module XSemVer
8
8
  class SemVer
9
9
  FILE_NAME = '.semver'
10
10
  TAG_FORMAT = 'v%M.%m.%p%s%d'
11
-
11
+
12
12
  def SemVer.file_name
13
13
  FILE_NAME
14
14
  end
@@ -115,7 +115,7 @@ module XSemVer
115
115
  gsub('%m', '(?<minor>\d+)').
116
116
  gsub('%p', '(?<patch>\d+)').
117
117
  gsub('%s', '(?:-(?<special>[A-Za-z][0-9A-Za-z\.]+))?').
118
- gsub('%d', '(?:\x2B(?<metadata>[0-9A-Za-z][0-9A-Za-z\.]*))?')
118
+ gsub('%d', '(?:\\\+(?<metadata>[0-9A-Za-z][0-9A-Za-z\.]*))?')
119
119
 
120
120
  regex = Regexp.new(regex_str)
121
121
  match = regex.match version_string
@@ -164,30 +164,30 @@ module XSemVer
164
164
  SemVer.new
165
165
  end
166
166
  end
167
-
167
+
168
168
  # SemVer specification 2.0.0-rc2 states that anything after the '-' character is prerelease data.
169
169
  # To be consistent with the specification verbage, #prerelease returns the same value as #special.
170
170
  # TODO: Deprecate #special in favor of #prerelease?
171
171
  def prerelease
172
172
  special
173
173
  end
174
-
174
+
175
175
  # SemVer specification 2.0.0-rc2 states that anything after the '-' character is prerelease data.
176
176
  # To be consistent with the specification verbage, #prerelease= sets the same value as #special.
177
177
  # TODO: Deprecate #special= in favor of #prerelease=?
178
178
  def prerelease=(pre)
179
179
  self.special = pre
180
180
  end
181
-
181
+
182
182
  # Return true if the SemVer has a non-empty #prerelease value. Otherwise, false.
183
183
  def prerelease?
184
184
  !special.nil? && special.length > 0
185
185
  end
186
-
186
+
187
187
  # Return true if the SemVer has a non-empty #metadata value. Otherwise, false.
188
188
  def metadata?
189
189
  !metadata.nil? && metadata.length > 0
190
- end
191
-
190
+ end
191
+
192
192
  end
193
193
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semver2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Lazzarino
@@ -10,34 +10,34 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-07-31 00:00:00.000000000 Z
13
+ date: 2015-01-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ~>
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
21
  version: '10'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ~>
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
28
  version: '10'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rspec
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ~>
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
35
  version: 2.12.0
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ~>
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.12.0
43
43
  description: maintain versions as per http://semver.org
@@ -47,16 +47,16 @@ executables:
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
- - .semver
51
- - semver2.gemspec
50
+ - ".semver"
52
51
  - README.md
52
+ - bin/semver
53
53
  - lib/dsl.rb
54
54
  - lib/pre_release.rb
55
55
  - lib/runner.rb
56
- - lib/semver/semvermissingerror.rb
57
56
  - lib/semver.rb
57
+ - lib/semver/semvermissingerror.rb
58
58
  - lib/xsemver.rb
59
- - bin/semver
59
+ - semver2.gemspec
60
60
  homepage: https://github.com/haf/semver
61
61
  licenses: []
62
62
  metadata: {}
@@ -66,17 +66,17 @@ require_paths:
66
66
  - lib
67
67
  required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - '>='
69
+ - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.0.14
79
+ rubygems_version: 2.2.2
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Semantic Versioning