prick 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -5
  3. data/Gemfile +4 -1
  4. data/TODO +3 -0
  5. data/doc/prick.txt +114 -0
  6. data/exe/prick +224 -370
  7. data/lib/ext/fileutils.rb +11 -0
  8. data/lib/ext/forward_method.rb +18 -0
  9. data/lib/ext/shortest_path.rb +44 -0
  10. data/lib/prick.rb +17 -9
  11. data/lib/prick/branch.rb +254 -0
  12. data/lib/prick/builder.rb +141 -0
  13. data/lib/prick/command.rb +19 -11
  14. data/lib/prick/constants.rb +42 -20
  15. data/lib/prick/database.rb +5 -3
  16. data/lib/prick/diff.rb +47 -0
  17. data/lib/prick/exceptions.rb +15 -3
  18. data/lib/prick/git.rb +46 -21
  19. data/lib/prick/migration.rb +165 -185
  20. data/lib/prick/program.rb +238 -0
  21. data/lib/prick/project.rb +266 -358
  22. data/lib/prick/rdbms.rb +2 -2
  23. data/lib/prick/schema.rb +19 -88
  24. data/lib/prick/share.rb +64 -0
  25. data/lib/prick/state.rb +137 -0
  26. data/lib/prick/version.rb +34 -14
  27. data/libexec/strip-comments +33 -0
  28. data/make_releases +48 -345
  29. data/make_schema +10 -0
  30. data/prick.gemspec +11 -22
  31. data/share/feature_migration/diff.sql +2 -0
  32. data/share/feature_migration/migrate.sql +2 -0
  33. data/share/release_migration/diff.sql +3 -0
  34. data/share/release_migration/features.yml +6 -0
  35. data/share/release_migration/migrate.sql +5 -0
  36. data/share/release_migration/migrate.yml +5 -0
  37. data/share/schema/build.yml +14 -0
  38. data/share/schema/schema.sql +5 -0
  39. data/share/schemas/build.yml +3 -0
  40. data/share/schemas/prick/build.yml +14 -0
  41. data/share/schemas/prick/data.sql +1 -2
  42. data/share/schemas/prick/schema.sql +0 -15
  43. data/share/schemas/prick/tables.sql +17 -0
  44. data/share/schemas/public/.keep +0 -0
  45. data/share/schemas/public/build.yml +14 -0
  46. data/share/schemas/public/schema.sql +3 -0
  47. data/test_assorted +192 -0
  48. data/test_feature +112 -0
  49. data/test_single_dev +83 -0
  50. metadata +34 -61
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/bash
2
+
3
+ function add_table() {
4
+ local name=$1
5
+ echo "create table $name (id integer);" >>schemas/public/tables.sql
6
+ git add schemas/public/tables.sql
7
+ git commit -m "Added table $name" >/dev/null
8
+ }
9
+
10
+ set -e
11
+ clear
12
+
13
+ rm -rf dir
14
+ prick --name prj init dir
15
+ echo
16
+ (
17
+ echo "*** DEVELOP ON UNNAMED RELEASES"
18
+ echo "***"
19
+
20
+ cd dir
21
+ echo "Prepare an unnamed release"
22
+ prick prepare release
23
+ echo
24
+
25
+ echo "Add table a"
26
+ add_table a
27
+ echo
28
+
29
+ echo "Bring current database up to date"
30
+ prick build
31
+ echo
32
+
33
+ echo "Prepare diff"
34
+ prick prepare diff
35
+ echo
36
+
37
+ echo "Commit diff"
38
+ git commit -am "Committed diff"
39
+ echo
40
+
41
+ echo "Update migrations"
42
+ echo "\\i diff.sql" >>releases/0.0.0/migrate.sql
43
+ git commit -am "Updated migrations.sql"
44
+ echo
45
+
46
+ echo "Create release 0.1.0"
47
+ prick create release 0.1.0
48
+ echo
49
+
50
+ echo "Prepare an unnamed release"
51
+ prick prepare release
52
+ echo
53
+
54
+ echo "Add table b"
55
+ add_table b
56
+ echo
57
+
58
+ echo "Bring current database up to date"
59
+ prick build
60
+ echo
61
+
62
+ echo "Prepare diff"
63
+ prick prepare diff
64
+ echo
65
+
66
+ echo "Commit diff"
67
+ git commit -am "Committed diff"
68
+ echo
69
+
70
+ echo "Update migrations"
71
+ echo "\\i diff.sql" >>releases/0.1.0/migrate.sql
72
+ git commit -am "Updated migrations.sql"
73
+ echo
74
+
75
+ echo "Create release 0.2.0"
76
+ prick create release 0.2.0
77
+ echo
78
+
79
+
80
+ tree -a -I .git
81
+ )
82
+
83
+
metadata CHANGED
@@ -1,71 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-23 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.1'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.1'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.0'
55
- - !ruby/object:Gem::Dependency
56
- name: pg
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
13
  - !ruby/object:Gem::Dependency
70
14
  name: shellopts
71
15
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +52,7 @@ dependencies:
108
52
  - - ">="
109
53
  - !ruby/object:Gem::Version
110
54
  version: '0'
111
- description: prick gem
55
+ description: A release control and management system for postgresql
112
56
  email:
113
57
  - claus.l.rasmussen@gmail.com
114
58
  executables:
@@ -123,6 +67,7 @@ files:
123
67
  - Gemfile
124
68
  - README.md
125
69
  - Rakefile
70
+ - TODO
126
71
  - bin/console
127
72
  - bin/setup
128
73
  - doc/create_release.txt
@@ -130,30 +75,43 @@ files:
130
75
  - doc/migra
131
76
  - doc/migrations.txt
132
77
  - doc/notes.txt
78
+ - doc/prick.txt
133
79
  - doc/sh.prick
134
80
  - exe/prick
135
81
  - file
136
82
  - lib/ext/algorithm.rb
137
83
  - lib/ext/fileutils.rb
84
+ - lib/ext/forward_method.rb
138
85
  - lib/ext/pg.rb
86
+ - lib/ext/shortest_path.rb
139
87
  - lib/prick.rb
140
88
  - lib/prick/archive.rb
89
+ - lib/prick/branch.rb
141
90
  - lib/prick/build.rb
91
+ - lib/prick/builder.rb
142
92
  - lib/prick/command.rb
143
93
  - lib/prick/constants.rb
144
94
  - lib/prick/database.rb
95
+ - lib/prick/diff.rb
145
96
  - lib/prick/dsort.rb
146
97
  - lib/prick/ensure.rb
147
98
  - lib/prick/exceptions.rb
148
99
  - lib/prick/git.rb
149
100
  - lib/prick/migra.rb
150
101
  - lib/prick/migration.rb
102
+ - lib/prick/program.rb
151
103
  - lib/prick/project.rb
152
104
  - lib/prick/rdbms.rb
153
105
  - lib/prick/schema.rb
106
+ - lib/prick/share.rb
107
+ - lib/prick/state.rb
154
108
  - lib/prick/version.rb
109
+ - libexec/strip-comments
155
110
  - make_releases
111
+ - make_schema
156
112
  - prick.gemspec
113
+ - share/feature_migration/diff.sql
114
+ - share/feature_migration/migrate.sql
157
115
  - share/features/diff.sql
158
116
  - share/features/feature/diff.sql
159
117
  - share/features/feature/migrate.sql
@@ -161,8 +119,23 @@ files:
161
119
  - share/features/features.yml
162
120
  - share/features/migrations.sql
163
121
  - share/gitignore
122
+ - share/release_migration/diff.sql
123
+ - share/release_migration/features.yml
124
+ - share/release_migration/migrate.sql
125
+ - share/release_migration/migrate.yml
126
+ - share/schema/build.yml
127
+ - share/schema/schema.sql
128
+ - share/schemas/build.yml
129
+ - share/schemas/prick/build.yml
164
130
  - share/schemas/prick/data.sql
165
131
  - share/schemas/prick/schema.sql
132
+ - share/schemas/prick/tables.sql
133
+ - share/schemas/public/.keep
134
+ - share/schemas/public/build.yml
135
+ - share/schemas/public/schema.sql
136
+ - test_assorted
137
+ - test_feature
138
+ - test_single_dev
166
139
  homepage: http://www.nowhere.com/
167
140
  licenses: []
168
141
  metadata: {}
@@ -174,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
147
  requirements:
175
148
  - - ">="
176
149
  - !ruby/object:Gem::Version
177
- version: '0'
150
+ version: 2.7.1
178
151
  required_rubygems_version: !ruby/object:Gem::Requirement
179
152
  requirements:
180
153
  - - ">="
@@ -184,5 +157,5 @@ requirements: []
184
157
  rubygems_version: 3.1.4
185
158
  signing_key:
186
159
  specification_version: 4
187
- summary: prick gem
160
+ summary: A release control and management system for postgresql
188
161
  test_files: []