schema-evolution-manager 0.9.34 → 0.9.35
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad5281c665510fb4b70436913115976cbfed8283
|
4
|
+
data.tar.gz: bd60c97b577ab7ab42cbe78c3db47edfdc9ffd63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 750db19a860d18d71f37cd07fda648abc4e77e41fd571b4f228ec8744a8e86c92e5a88b0c514b3c7b4e33197fc8b8e979b887c04f668aaa26c2c8a1c9c7a46a2
|
7
|
+
data.tar.gz: bdd0c7722a67bb1e598ff2ccd2e0bcdd2cb88c099e8a80bb9ab18b8f421f4dc28fc4b594bc53b2a99532a22343eb53be44a10a12d17f6f73c191b60fa415eee5
|
data/README.md
CHANGED
@@ -129,7 +129,7 @@ There are two ways to install schema evolution manager:
|
|
129
129
|
|
130
130
|
git clone git://github.com/mbryzek/schema-evolution-manager.git
|
131
131
|
cd schema-evolution-manager
|
132
|
-
git checkout 0.9.
|
132
|
+
git checkout 0.9.35
|
133
133
|
ruby ./configure.rb
|
134
134
|
sudo ./install.rb
|
135
135
|
|
@@ -54,7 +54,7 @@ module SchemaEvolutionManager
|
|
54
54
|
# no tags, otherwise returns an instance of Version. Only searches for
|
55
55
|
# tags matching x.x.x (e.g. 1.0.2)
|
56
56
|
def Library.latest_tag
|
57
|
-
`git tag -l`.strip.split.select { |tag| Version.is_valid?(tag) }.map { |tag| Version.
|
57
|
+
`git tag -l`.strip.split.select { |tag| Version.is_valid?(tag) }.map { |tag| Version.parse(tag) }.sort.last
|
58
58
|
end
|
59
59
|
|
60
60
|
def Library.tag_exists?(tag)
|
@@ -45,7 +45,7 @@ module SchemaEvolutionManager
|
|
45
45
|
module Tag
|
46
46
|
|
47
47
|
def Tag.latest
|
48
|
-
Library.latest_tag || Version.
|
48
|
+
Library.latest_tag || Version.parse("0.0.0")
|
49
49
|
end
|
50
50
|
|
51
51
|
# @param component: One of major|minor|micro. Defaults to micro. Currently passed in as an array
|
@@ -6,32 +6,43 @@ module SchemaEvolutionManager
|
|
6
6
|
|
7
7
|
attr_reader :major, :minor, :micro
|
8
8
|
|
9
|
-
def initialize(
|
9
|
+
def initialize(major, minor, micro, opts={})
|
10
|
+
@major = major.to_i
|
11
|
+
@minor = minor.to_i
|
12
|
+
@micro = micro.to_i
|
13
|
+
@prefix = opts.delete(:prefix) || nil
|
14
|
+
if !opts.empty?
|
15
|
+
raise "Invalid keys: " + opts.keys
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def Version.parse(version_string)
|
10
20
|
Preconditions.check_not_blank(version_string, "version_string cannot be blank")
|
11
21
|
Library.assert_valid_tag(version_string)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
22
|
+
if md = version_string.match(/^(\w*)(\d+)\.(\d+)\.(\d+)$/)
|
23
|
+
Version.new(md[2], md[3], md[4], :prefix => md[1])
|
24
|
+
else
|
25
|
+
raise "ERROR: Bug in version string parser for version[%s]" % version_string
|
26
|
+
end
|
16
27
|
end
|
17
28
|
|
18
29
|
def to_version_string
|
19
|
-
"%s.%s.%s" % [major, minor, micro]
|
30
|
+
"%s%s.%s.%s" % [@prefix, major, minor, micro]
|
20
31
|
end
|
21
32
|
|
22
33
|
# Returns the next major version
|
23
34
|
def next_major
|
24
|
-
Version.new(
|
35
|
+
Version.new(major+1, 0, 0, :prefix => @prefix)
|
25
36
|
end
|
26
37
|
|
27
38
|
# Returns the next minor version
|
28
39
|
def next_minor
|
29
|
-
Version.new(
|
40
|
+
Version.new(major, minor+1, 0, :prefix => @prefix)
|
30
41
|
end
|
31
42
|
|
32
43
|
# Returns the next micro version
|
33
44
|
def next_micro
|
34
|
-
Version.new(
|
45
|
+
Version.new(major, minor, micro+1, :prefix => @prefix)
|
35
46
|
end
|
36
47
|
|
37
48
|
def <=>(other)
|
@@ -51,7 +62,7 @@ module SchemaEvolutionManager
|
|
51
62
|
def Version.read
|
52
63
|
Preconditions.check_state(File.exists?(VERSION_FILE), "Version file at path[%s] not found" % VERSION_FILE)
|
53
64
|
version = IO.read(VERSION_FILE).strip
|
54
|
-
Version.
|
65
|
+
Version.parse(version)
|
55
66
|
end
|
56
67
|
|
57
68
|
def Version.write(version)
|
@@ -63,7 +74,7 @@ module SchemaEvolutionManager
|
|
63
74
|
|
64
75
|
def Version.is_valid?(version_string)
|
65
76
|
Preconditions.check_not_blank(version_string, "version_string cannot be blank")
|
66
|
-
version_string.match(/^\d+\.\d+\.\d+$/)
|
77
|
+
version_string.match(/^\w*\d+\.\d+\.\d+$/)
|
67
78
|
end
|
68
79
|
|
69
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema-evolution-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bryzek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: '["Michael Bryzek"]'
|
14
14
|
email: mbryzek@alum.mit.edu
|
@@ -31,7 +31,6 @@ files:
|
|
31
31
|
- bin/sem-dist
|
32
32
|
- bin/sem-info
|
33
33
|
- bin/sem-init
|
34
|
-
- lib/schema-evolution-manager.rb
|
35
34
|
- lib/schema-evolution-manager/apply_util.rb
|
36
35
|
- lib/schema-evolution-manager/args.rb
|
37
36
|
- lib/schema-evolution-manager/ask.rb
|
@@ -49,10 +48,11 @@ files:
|
|
49
48
|
- lib/schema-evolution-manager/sem_version.rb
|
50
49
|
- lib/schema-evolution-manager/template.rb
|
51
50
|
- lib/schema-evolution-manager/version.rb
|
51
|
+
- lib/schema-evolution-manager.rb
|
52
52
|
- scripts/20130318-105434.sql
|
53
53
|
- scripts/20130318-105456.sql
|
54
|
-
- template/README.md
|
55
54
|
- template/dev.rb
|
55
|
+
- template/README.md
|
56
56
|
homepage: https://github.com/gilt/schema-evolution-manager
|
57
57
|
licenses:
|
58
58
|
- Apache 2.0
|
@@ -63,17 +63,17 @@ require_paths:
|
|
63
63
|
- lib
|
64
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - '>='
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
75
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.
|
76
|
+
rubygems_version: 2.0.14.1
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: Schema evolution manager is a simple schema migration tool for postgresql
|