timewizard 0.3.0.pre.alpha.pre.53 → 0.3.0.pre.alpha.pre.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.yardopts +1 -1
- data/Rakefile +0 -18
- data/gemspec.yml +0 -1
- data/lib/timewizard/utils/wizardry.rb +11 -22
- data/lib/timewizard/version.rb +3 -20
- data/lib/timewizard/versioner/android.rb +0 -20
- data/lib/timewizard/versioner/apple.rb +0 -20
- data/lib/timewizard/versioner.rb +33 -28
- data/lib/timewizard.rb +0 -20
- data/spec/versioner_spec.rb +8 -24
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTY5NWMwOTczMjFhNjc5NTQ4ZjFjZGY0MjhhYWM5NmQ4ZGMyYzNjNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGIxZmI5ZGM0ZjRkYTYxMTJkNTBlZjIyZjA2NzYxYTBmZTExODVhNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjM4ZGRiZmFiNTQxNGU5NGY5NjUyNGFjNDA5MzVhZmI2YWEyOWVlNWZmMTY5
|
10
|
+
MTViMzVmNWZhNDJlNDJhNjkxYzA0YzUxNGUyYjk0NWE4MjNhODUxZWVlMzll
|
11
|
+
NjRjNTdjZjk5YTBiYjcxYWVmYjU4ZDA4ZGZiYmIwY2Q2M2JjZmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzkxZDk1NDNkYjU5NzMyZTQ3ZDYzMWM0NWE5NmQwMGMxMGQwYWZmYmFlNmYz
|
14
|
+
ZWJjZDA4ZGI4ODBiN2FjODFhOGQ5NDRjZmZjYjRkY2Q1OGQ2MTA5YTc2NzE4
|
15
|
+
ZmE4MjllMDMxZjc5MGY1MTEwMjgzZGUxZGQ3YTEwNzM5MjhlZjQ=
|
data/.yardopts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--markup
|
1
|
+
--markup markdown --title "timewizard Documentation" --protected
|
data/Rakefile
CHANGED
@@ -46,24 +46,6 @@ require 'yard'
|
|
46
46
|
YARD::Rake::YardocTask.new
|
47
47
|
task :doc => :yard
|
48
48
|
|
49
|
-
desc "Adds copyright headers to source/spec files."
|
50
|
-
task :headers do
|
51
|
-
require 'copyright_header'
|
52
|
-
|
53
|
-
args = {
|
54
|
-
:license => 'MIT',
|
55
|
-
:copyright_software => 'timewizard',
|
56
|
-
:copyright_software_description => 'A Ruby library for manipulating iOS and Android version numbers.',
|
57
|
-
:copyright_holders => ['Richard Harrah <topplethenunnery@gmail.com>'],
|
58
|
-
:copyright_years => ['2015'],
|
59
|
-
:add_path => 'lib/:spec/',
|
60
|
-
:output_dir => '.'
|
61
|
-
}
|
62
|
-
|
63
|
-
command_line = CopyrightHeader::CommandLine.new args
|
64
|
-
command_line.execute
|
65
|
-
end
|
66
|
-
|
67
49
|
task :abide => :build do
|
68
50
|
require 'abide'
|
69
51
|
|
data/gemspec.yml
CHANGED
@@ -1,34 +1,23 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (C) 2015 Richard Harrah <topplethenunnery@gmail.com>
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
-
# this software and associated documentation files (the "Software"), to deal in
|
6
|
-
# the Software without restriction, including without limitation the rights to
|
7
|
-
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
-
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
-
# subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in all
|
12
|
-
# copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
-
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
-
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
-
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
-
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
-
#
|
21
1
|
module Timewizard
|
2
|
+
# Contains all utility modules and classes.
|
3
|
+
# @since 0.2.4
|
22
4
|
module Utils
|
5
|
+
# Contains utility functions in a cleverly named module.
|
6
|
+
# @author Richard Harrah
|
7
|
+
# @since 0.2.4
|
23
8
|
module Wizardry
|
24
9
|
|
25
10
|
VERSION_REGEX = /((\d+\.)?(\d+\.)?(\*|\d+))(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/
|
26
11
|
|
12
|
+
# Returns a substring of the passed-in value that matches {Timewizard::Utils::Wizardry::VERSION_REGEX the version regex}.
|
13
|
+
# @param [String] stringy string from which to extract version string
|
14
|
+
# @return [String] substring that matches {Timewizard::Utils::Wizardry::VERSION_REGEX the version regex}
|
15
|
+
# @raise [ArgumentError] if stringy is null
|
27
16
|
def self.only_version(stringy)
|
28
17
|
if stringy.nil?
|
29
|
-
raise "stringy cannot be null"
|
18
|
+
raise ArgumentError, "stringy cannot be null"
|
30
19
|
end
|
31
|
-
VERSION_REGEX.match(stringy).to_s
|
20
|
+
VERSION_REGEX.match(stringy.to_s).to_s
|
32
21
|
end
|
33
22
|
|
34
23
|
end
|
data/lib/timewizard/version.rb
CHANGED
@@ -1,23 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
-
# this software and associated documentation files (the "Software"), to deal in
|
6
|
-
# the Software without restriction, including without limitation the rights to
|
7
|
-
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
-
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
-
# subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in all
|
12
|
-
# copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
-
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
-
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
-
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
-
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
-
#
|
1
|
+
# It's time-y wime-y and wibbly wobbley. Abracadabra.
|
2
|
+
# @author Richard Harrah
|
3
|
+
# @since 0.0.1
|
21
4
|
module Timewizard
|
22
5
|
VERSION = "0.3.0"
|
23
6
|
end
|
@@ -1,23 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (C) 2015 Richard Harrah <topplethenunnery@gmail.com>
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
-
# this software and associated documentation files (the "Software"), to deal in
|
6
|
-
# the Software without restriction, including without limitation the rights to
|
7
|
-
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
-
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
-
# subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in all
|
12
|
-
# copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
-
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
-
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
-
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
-
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
-
#
|
21
1
|
require 'timewizard/versioner'
|
22
2
|
require 'timewizard/utils/wizardry'
|
23
3
|
|
@@ -1,23 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (C) 2015 Richard Harrah <topplethenunnery@gmail.com>
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
-
# this software and associated documentation files (the "Software"), to deal in
|
6
|
-
# the Software without restriction, including without limitation the rights to
|
7
|
-
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
-
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
-
# subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in all
|
12
|
-
# copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
-
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
-
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
-
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
-
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
-
#
|
21
1
|
require 'xcodeproj'
|
22
2
|
require 'versionomy'
|
23
3
|
require 'timewizard/versioner'
|
data/lib/timewizard/versioner.rb
CHANGED
@@ -1,30 +1,27 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (C) 2015 Richard Harrah <topplethenunnery@gmail.com>
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
-
# this software and associated documentation files (the "Software"), to deal in
|
6
|
-
# the Software without restriction, including without limitation the rights to
|
7
|
-
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
-
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
-
# subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in all
|
12
|
-
# copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
-
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
-
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
-
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
-
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
-
#
|
21
1
|
module Timewizard
|
2
|
+
# Contains the various OS implementations of the RubyGem version spec.
|
3
|
+
# @author Richard Harrah
|
4
|
+
# @since 0.1.0
|
22
5
|
module Versioner
|
6
|
+
# Represents the most basic of versioners. Raises errors if attempted to be used.
|
7
|
+
# @abstract
|
8
|
+
# @author Richard Harrah
|
9
|
+
# @since 0.2.4
|
23
10
|
class Base
|
11
|
+
|
12
|
+
# File that is going to be parsed.
|
24
13
|
attr_reader :file
|
14
|
+
|
15
|
+
# Build number currently contained in the parsed file.
|
25
16
|
attr_reader :old_build_number
|
17
|
+
|
18
|
+
# Version number currently contained in the parsed file.
|
26
19
|
attr_reader :old_version_number
|
20
|
+
|
21
|
+
# Build number to write to the parsed file.
|
27
22
|
attr_accessor :new_build_number
|
23
|
+
|
24
|
+
# Version number to write to the parsed file.
|
28
25
|
attr_accessor :new_version_number
|
29
26
|
|
30
27
|
def initialize(path_to_file)
|
@@ -34,20 +31,28 @@ module Timewizard
|
|
34
31
|
@file = path_to_file
|
35
32
|
end
|
36
33
|
|
37
|
-
|
38
|
-
|
34
|
+
# Reads the build numbers from {file}.
|
35
|
+
# @raise NotImplementedError, method is not implemented in this class
|
36
|
+
def read_build_numbers
|
37
|
+
raise NotImplementedError
|
39
38
|
end
|
40
39
|
|
41
|
-
|
42
|
-
|
40
|
+
# Reads the version numbers from {file}.
|
41
|
+
# @raise NotImplementedError, method is not implemented in this class
|
42
|
+
def read_version_numbers
|
43
|
+
raise NotImplementedError
|
43
44
|
end
|
44
45
|
|
45
|
-
|
46
|
-
|
46
|
+
# Writes the build numbers to {file}.
|
47
|
+
# @raise NotImplementedError, method is not implemented in this class
|
48
|
+
def write_build_numbers
|
49
|
+
raise NotImplementedError
|
47
50
|
end
|
48
51
|
|
49
|
-
|
50
|
-
|
52
|
+
# Writes the build numbers to {file}.
|
53
|
+
# @raise NotImplementedError, method is not implemented in this class
|
54
|
+
def write_version_numbers
|
55
|
+
raise NotImplementedError
|
51
56
|
end
|
52
57
|
|
53
58
|
end
|
data/lib/timewizard.rb
CHANGED
@@ -1,21 +1 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (C) 2015 Richard Harrah <topplethenunnery@gmail.com>
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
-
# this software and associated documentation files (the "Software"), to deal in
|
6
|
-
# the Software without restriction, including without limitation the rights to
|
7
|
-
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
-
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
-
# subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in all
|
12
|
-
# copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
-
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
-
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
-
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
-
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
-
#
|
21
1
|
require 'timewizard/version'
|
data/spec/versioner_spec.rb
CHANGED
@@ -65,42 +65,26 @@ RSpec.describe 'Timewizard::Versioner::Base' do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
context '#read_build_numbers' do
|
68
|
-
it 'should not
|
69
|
-
expect
|
70
|
-
expect(@versioner.new_build_number).to be_nil
|
71
|
-
@versioner.read_build_numbers
|
72
|
-
expect(@versioner.old_build_number).to be_nil
|
73
|
-
expect(@versioner.new_build_number).to be_nil
|
68
|
+
it 'should not be implemented' do
|
69
|
+
expect { @versioner.read_build_numbers }.to raise_error(NotImplementedError)
|
74
70
|
end
|
75
71
|
end
|
76
72
|
|
77
73
|
context '#read_version_numbers' do
|
78
|
-
it 'should not
|
79
|
-
expect
|
80
|
-
expect(@versioner.new_version_number).to be_nil
|
81
|
-
@versioner.read_version_numbers
|
82
|
-
expect(@versioner.old_version_number).to be_nil
|
83
|
-
expect(@versioner.new_version_number).to be_nil
|
74
|
+
it 'should not be implemented' do
|
75
|
+
expect { @versioner.read_version_numbers }.to raise_error(NotImplementedError)
|
84
76
|
end
|
85
77
|
end
|
86
78
|
|
87
79
|
context '#write_build_numbers' do
|
88
|
-
it 'should not
|
89
|
-
expect
|
90
|
-
expect(@versioner.new_build_number).to be_nil
|
91
|
-
@versioner.write_build_numbers
|
92
|
-
expect(@versioner.old_build_number).to be_nil
|
93
|
-
expect(@versioner.new_build_number).to be_nil
|
80
|
+
it 'should not be implemented' do
|
81
|
+
expect { @versioner.write_build_numbers }.to raise_error(NotImplementedError)
|
94
82
|
end
|
95
83
|
end
|
96
84
|
|
97
85
|
context '#write_version_numbers' do
|
98
|
-
it 'should not
|
99
|
-
expect
|
100
|
-
expect(@versioner.new_version_number).to be_nil
|
101
|
-
@versioner.write_version_numbers
|
102
|
-
expect(@versioner.old_version_number).to be_nil
|
103
|
-
expect(@versioner.new_version_number).to be_nil
|
86
|
+
it 'should not be implemented' do
|
87
|
+
expect { @versioner.write_version_numbers }.to raise_error(NotImplementedError)
|
104
88
|
end
|
105
89
|
end
|
106
90
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timewizard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0.pre.alpha.pre.
|
4
|
+
version: 0.3.0.pre.alpha.pre.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Harrah
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.0.3
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: copyright-header
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ~>
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '1.0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ~>
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '1.0'
|
139
125
|
description: Uses the RubyGems style of versioning in order to ease updates.
|
140
126
|
email: topplethenunnery@gmail.com
|
141
127
|
executables: []
|