branchy 0.5.0 → 0.6.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/branchy +17 -11
  3. data/lib/branchy/version.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 708d94cf9a7312815cb9f02ffbdfa66677d8aab1
4
- data.tar.gz: f19c689a44f991826d6ed41d1b228a752ec87b77
3
+ metadata.gz: 21f5e25e2b54477d39290b696bf7b903a9161923
4
+ data.tar.gz: 424bfdfa04ae55fb3d908df06670aa34b15ca517
5
5
  SHA512:
6
- metadata.gz: e96c3cdee3afdebe75cdcbd26ffdaafd2d7b53178553be3e533bad1c2cde6943a890a554a638174494ce4641343d281d20e671f1fd9a0f08d600030876f2ff4e
7
- data.tar.gz: 9b2869343c0ae5af0129a88b11fce89c8fef35cd450114458a581dbc6898707aeb4652ab37dfeea040b647154120ec11b6ad52ba5c5fb88ecc4344c13eea6dc1
6
+ metadata.gz: 927c2deff29d66c8ab6d3403400cf0319ca3e68d2fb448b6f4a58fd897d3a6e1c541ce223a60742fe6ec2b9d67d8479f48669f86770200b356ac5acb93206501
7
+ data.tar.gz: 45a9b0cb562f1b9dc48d9894ffe2f7cb2b39930e539f1d35ef0933263f9f6a60c696115c844a355659453840f0c6fd9d6048211e18c4c20926125f66c0a9058a
data/bin/branchy CHANGED
@@ -6,8 +6,12 @@ require 'branchy'
6
6
  options = {}
7
7
  o = OptionParser.new do |opts|
8
8
  opts.banner = 'Usage: branchy [options]'
9
- opts.on('--enable', 'Enable a branched database for the current branch') { options[:command] = 'enable' }
10
- opts.on('--disable', 'Disable a branched database for the current branch') { options[:command] = 'disable' }
9
+ opts.on('--dbname DB', 'Print the branch\'d name of the DB') do |db|
10
+ options[:command] = :dbname
11
+ options[:db] = db
12
+ end
13
+ opts.on('--enable', 'Enable a branched database for the current branch') { options[:command] = :enable }
14
+ opts.on('--disable', 'Disable a branched database for the current branch') { options[:command] = :disable }
11
15
  opts.on('--scm SCM', 'Set the SCM (defaults to git). Supported SCMs: git') { |scm| options[:scm] = scm.downcase.strip }
12
16
  end
13
17
  o.parse!
@@ -21,15 +25,17 @@ end
21
25
 
22
26
  begin
23
27
  case options[:command]
24
- when 'enable'
25
- puts "Enabling branched database"
26
- branch.enable!
27
- when 'disable'
28
- puts "Disabling branched database"
29
- branch.disable!
30
- else
31
- puts o.help
32
- exit 1
28
+ when :dbname
29
+ puts branch.database(options[:db])
30
+ when :enable
31
+ puts "Enabling branched database"
32
+ branch.enable!
33
+ when :disable
34
+ puts "Disabling branched database"
35
+ branch.disable!
36
+ else
37
+ puts o.help
38
+ exit 1
33
39
  end
34
40
  rescue Branchy::CommandFailed => e
35
41
  $stderr.puts e.message
@@ -1,4 +1,4 @@
1
1
  module Branchy
2
2
  # The gem version
3
- VERSION = '0.5.0'.freeze
3
+ VERSION = '0.6.0'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: branchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Coleman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-14 00:00:00.000000000 Z
12
+ date: 2016-02-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Use a different database for each of your branches!
15
15
  email: jordan@jordanhollinger.com
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  version: '0'
47
47
  requirements: []
48
48
  rubyforge_project:
49
- rubygems_version: 2.4.5
49
+ rubygems_version: 2.4.5.1
50
50
  signing_key:
51
51
  specification_version: 4
52
52
  summary: Branched database helpers