capistrano-mysql_tables 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '096d81e596cd1a69b983bc28c83cf3c9e5e1f2fdcc7357ed85df14cd24d98ddf'
4
- data.tar.gz: 046b9cd8f59f498df97ae12ee045b9bb96a326595173e40ffc02b65111d32b1b
3
+ metadata.gz: 26150aeda2cf743b14013afb8888a7e1a882f4e9454cc53d42fb4363b72fc754
4
+ data.tar.gz: 1288ae5fa98dc53700f3b02875c544e72b5cf74953aba8db611c2423721a220b
5
5
  SHA512:
6
- metadata.gz: 36a5b35904cae0fd125d45abaec75787813260f5e8c8109c12f206734c5275827c71dd0c8ae0eeffceacfc5d411284e8623f8917f2cd5763e898b1cd57d0f49f
7
- data.tar.gz: 87358266bd3a59bd6a59968da374b78883244969c26498a9a89b523553735b549e3640bb3ef9bd53fa10e693fb7e161019c38948911ef064b3fb90b745531b97
6
+ metadata.gz: 2a5bf4c420b695497da702000cec38ec89e706cebbc714f817ef7e972c4b3b653d3afcb97a52564e9b0669781c670e6e537baa5379d1c2d7bbaf61b72daa42ad
7
+ data.tar.gz: 94bd85d069c8f49a6b8a6d94516a629c173ae3569abbef9d8613f4bf4186ca0375c6cdf0087849c37cab354771e0ae097bc5f58249b82fd5e31bc52f3285789c
data/README.md CHANGED
@@ -1,8 +1,20 @@
1
1
  # Capistrano::MysqlTables
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capistrano/mysql_tables`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Capistrano MysqlTables allows for easy transfer of MySQL tables between development and production
4
+ environments.
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
+ ## Requirements
7
+ This plugin makes a couple of assumptions:
8
+
9
+ * The existence of a `config/database.yml` file, as is used in Ruby on Rails environments.
10
+ * That your production ssh user has their MySQL password setup in a `~/.my.cnf`
11
+ file as shown below. This is for security reasons, we don't want to pull the password out
12
+ of the database.yml file and print to the command line.
13
+
14
+ ```
15
+ [client]
16
+ password="your-super-cool-password"
17
+ ```
6
18
 
7
19
  ## Installation
8
20
 
@@ -20,20 +32,17 @@ Or install it yourself as:
20
32
 
21
33
  $ gem install capistrano-mysql_tables
22
34
 
23
- ## Usage
35
+ Then add to your Capfile with:
24
36
 
25
- TODO: Write usage instructions here
37
+ require "capistrano/mysql_tables"
26
38
 
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
39
+ ## Usage
34
40
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capistrano-mysql_tables.
41
+ The plugin provides two self-explanatory tasks, `db:push_tables` and `db:pull_tables`.
36
42
 
43
+ Run a task without any arguments, eg. `cap production db:push_tables`, and you'll be asked to provide
44
+ one or more table names to move.
45
+ Or you can provide the table names directly: `cap production "db:push_tables[table1 table2]"`.
37
46
 
38
47
  ## License
39
48
 
@@ -4,7 +4,7 @@ require_relative "lib/capistrano/mysql_tables/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "capistrano-mysql_tables"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.3"
8
8
  spec.authors = ["Jason Floyd"]
9
9
  spec.email = ["jason.floyd@camfil.com"]
10
10
 
@@ -1,4 +1,4 @@
1
- requier "yaml"
1
+ require "yaml"
2
2
 
3
3
  def local_db_attributes
4
4
  db_file = YAML.load_file("config/database.yml")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-mysql_tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Floyd