pg_migrate 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +34 -34
  3. data/.gitmodules +3 -3
  4. data/Gemfile +9 -9
  5. data/Gemfile.lock +39 -39
  6. data/LICENSE +21 -21
  7. data/README.md +33 -33
  8. data/Rakefile +2 -2
  9. data/bin/pg_migrate +6 -6
  10. data/lib/pg_migrate/builder.rb +214 -214
  11. data/lib/pg_migrate/command_line.rb +242 -242
  12. data/lib/pg_migrate/config_parser.rb +48 -48
  13. data/lib/pg_migrate/manifest_reader.rb +102 -102
  14. data/lib/pg_migrate/migration.rb +11 -11
  15. data/lib/pg_migrate/migrator.rb +94 -94
  16. data/lib/pg_migrate/package.rb +152 -152
  17. data/lib/pg_migrate/package_templates/Gemfile.erb +3 -3
  18. data/lib/pg_migrate/package_templates/bin/migrate.rb +9 -9
  19. data/lib/pg_migrate/package_templates/gemspec.erb +21 -21
  20. data/lib/pg_migrate/package_templates/lib/gem/version.rb +3 -3
  21. data/lib/pg_migrate/package_templates/lib/gem.rb +12 -12
  22. data/lib/pg_migrate/props.rb +19 -19
  23. data/lib/pg_migrate/sql_reader.rb +51 -51
  24. data/lib/pg_migrate/templates/bootstrap.erb +175 -175
  25. data/lib/pg_migrate/templates/up.erb +30 -30
  26. data/lib/pg_migrate/util.rb +73 -73
  27. data/lib/pg_migrate/version.rb +3 -3
  28. data/lib/pg_migrate.rb +40 -40
  29. data/pg_migrate.gemspec +29 -29
  30. data/spec/database.yml +8 -8
  31. data/spec/pg_migrate/builder_spec.rb +113 -113
  32. data/spec/pg_migrate/command_line_spec.rb +53 -53
  33. data/spec/pg_migrate/config_parser_spec.rb +18 -18
  34. data/spec/pg_migrate/db_utility.rb +73 -73
  35. data/spec/pg_migrate/input_manifests/single_manifest/manifest +3 -3
  36. data/spec/pg_migrate/input_manifests/single_manifest/up/single1.sql +29 -29
  37. data/spec/pg_migrate/manifest_reader_spec.rb +19 -19
  38. data/spec/pg_migrate/migrator_spec.rb +68 -68
  39. data/spec/pg_migrate/package_spec.rb +38 -38
  40. data/spec/pg_migrate/sql_reader_spec.rb +21 -21
  41. data/spec/spec_helper.rb +15 -15
  42. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8d2f48b23765f2f8788a62de09f8558053a71e2
4
- data.tar.gz: 80a6d70926c045d60f7dc6115a176e1407497198
3
+ metadata.gz: e18f8683b4bbec6e06292f1c408bf95441450f22
4
+ data.tar.gz: db8763c0b8d564da03d6587228c235ec4d676b37
5
5
  SHA512:
6
- metadata.gz: 4b6fbd8fa54338def32e5b98e1603ff74b1d2e7701a32ecca879fb4f269a80d141b948c4d443084fa2e1d6804589d0613e8fa505198f167d218df43a14b18322
7
- data.tar.gz: 18d523510e9f8db864b83a882813aaf3e414fb729ee8fd6f3157e52969633c8727ef6e48093310900139eb80a6469b4b288123da3f03b2123389424276ffacce
6
+ metadata.gz: 29b1b343cabda7c2d27a9254cd5d421c8aac3794232882e2dbb797efcf71a7c95eff1eb9ec45fc9b238a2ab0ee3327bc5b79c6bca6ab123ac1f81785591e4c66
7
+ data.tar.gz: 2212a4e06d69abe4f5d547bbcf213cb5ee4acf5fcbc9317ddb50347fe8d9791582d8c7e6a89aba2364ee6f590e85fc7845ebf407a5dabe60ebe8f0c0b676b199
data/.gitignore CHANGED
@@ -1,34 +1,34 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- coverage
6
- InstalledFiles
7
- lib/bundler/man
8
- pkg
9
- rdoc
10
- spec/reports
11
- test/tmp
12
- test/version_tmp
13
- tmp
14
-
15
- # YARD artifacts
16
- .yardoc
17
- _yardoc
18
- doc/
19
-
20
- # Intellij artifacts
21
- .idea
22
- *.iml
23
-
24
- # RVM
25
- .rvmrc
26
-
27
- # VIM
28
- *~
29
-
30
- # rspec output directory
31
- target
32
-
33
- # local ruby symbolic link to fool IDE
34
- ruby
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
19
+
20
+ # Intellij artifacts
21
+ .idea
22
+ *.iml
23
+
24
+ # RVM
25
+ .rvmrc
26
+
27
+ # VIM
28
+ *~
29
+
30
+ # rspec output directory
31
+ target
32
+
33
+ # local ruby symbolic link to fool IDE
34
+ ruby
data/.gitmodules CHANGED
@@ -1,3 +1,3 @@
1
- [submodule "lib/pg_migrate/templates"]
2
- path = lib/pg_migrate/templates
3
- url = git@github.com:sethcall/pg_migrate_templates.git
1
+ [submodule "lib/pg_migrate/templates"]
2
+ path = lib/pg_migrate/templates
3
+ url = git@github.com:sethcall/pg_migrate_templates.git
data/Gemfile CHANGED
@@ -1,9 +1,9 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in pg_migrate.gemspec
4
- gemspec
5
-
6
- group :development do
7
- gem 'rspec', '2.11.0'
8
- gem 'files', :git => 'git@github.com:sethcall/files.git'
9
- end
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pg_migrate.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'rspec', '2.11.0'
8
+ gem 'files', :git => 'git@github.com:sethcall/files.git'
9
+ end
data/Gemfile.lock CHANGED
@@ -1,39 +1,39 @@
1
- GIT
2
- remote: git@github.com:sethcall/files.git
3
- revision: 9107f3ae6e24dbe67d8b1d27be6d122d72436382
4
- specs:
5
- files (0.2.1)
6
-
7
- PATH
8
- remote: .
9
- specs:
10
- pg_migrate (0.1.6)
11
- logging (= 1.7.2)
12
- pg (= 0.14.0)
13
- thor (= 0.15.4)
14
-
15
- GEM
16
- remote: https://rubygems.org/
17
- specs:
18
- diff-lcs (1.1.3)
19
- little-plugger (1.1.3)
20
- logging (1.7.2)
21
- little-plugger (>= 1.1.3)
22
- pg (0.14.0)
23
- rspec (2.11.0)
24
- rspec-core (~> 2.11.0)
25
- rspec-expectations (~> 2.11.0)
26
- rspec-mocks (~> 2.11.0)
27
- rspec-core (2.11.0)
28
- rspec-expectations (2.11.1)
29
- diff-lcs (~> 1.1.3)
30
- rspec-mocks (2.11.0)
31
- thor (0.15.4)
32
-
33
- PLATFORMS
34
- ruby
35
-
36
- DEPENDENCIES
37
- files!
38
- pg_migrate!
39
- rspec (= 2.11.0)
1
+ GIT
2
+ remote: git@github.com:sethcall/files.git
3
+ revision: 9107f3ae6e24dbe67d8b1d27be6d122d72436382
4
+ specs:
5
+ files (0.2.1)
6
+
7
+ PATH
8
+ remote: .
9
+ specs:
10
+ pg_migrate (0.1.12)
11
+ logging (= 1.7.2)
12
+ pg (= 0.17.1)
13
+ thor (= 0.15.4)
14
+
15
+ GEM
16
+ remote: https://rubygems.org/
17
+ specs:
18
+ diff-lcs (1.1.3)
19
+ little-plugger (1.1.3)
20
+ logging (1.7.2)
21
+ little-plugger (>= 1.1.3)
22
+ pg (0.17.1)
23
+ rspec (2.11.0)
24
+ rspec-core (~> 2.11.0)
25
+ rspec-expectations (~> 2.11.0)
26
+ rspec-mocks (~> 2.11.0)
27
+ rspec-core (2.11.1)
28
+ rspec-expectations (2.11.3)
29
+ diff-lcs (~> 1.1.3)
30
+ rspec-mocks (2.11.3)
31
+ thor (0.15.4)
32
+
33
+ PLATFORMS
34
+ ruby
35
+
36
+ DEPENDENCIES
37
+ files!
38
+ pg_migrate!
39
+ rspec (= 2.11.0)
data/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2012 TODO: Write your name
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ Copyright (c) 2012 TODO: Write your name
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,33 +1,33 @@
1
- # PgMigrate
2
-
3
- The ruby implementation of pg_migrate. *Works with Ruby 2.0!*
4
-
5
- With this gem, there are two primary features:
6
- * Manifest Builder - process a user's pg_migrate manifest into a stable set of SQL migration scripts
7
- * Migrator - migrate a database, using a built pg_migrate manifest
8
-
9
- ## Installation
10
-
11
- Add this line to your application's Gemfile:
12
-
13
- gem 'pg_migrate'
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install pg_migrate
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Contributing
28
-
29
- 1. Fork it
30
- 2. Create your feature branch (`git checkout -b my-new-feature`)
31
- 3. Commit your changes (`git commit -am 'Added some feature'`)
32
- 4. Push to the branch (`git push origin my-new-feature`)
33
- 5. Create new Pull Request
1
+ # PgMigrate
2
+
3
+ The ruby implementation of pg_migrate. *Works with Ruby 2.0!*
4
+
5
+ With this gem, there are two primary features:
6
+ * Manifest Builder - process a user's pg_migrate manifest into a stable set of SQL migration scripts
7
+ * Migrator - migrate a database, using a built pg_migrate manifest
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'pg_migrate'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install pg_migrate
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create new Pull Request
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
data/bin/pg_migrate CHANGED
@@ -1,7 +1,7 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'pg_migrate'
4
-
5
- include PgMigrate
6
-
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pg_migrate'
4
+
5
+ include PgMigrate
6
+
7
7
  CommandLine.start