billy_the_tool 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +7 -4
  2. data/lib/billy/util/scm/git.rb +5 -1
  3. metadata +4 -4
data/README.md CHANGED
@@ -4,8 +4,6 @@
4
4
 
5
5
  Billy is very simple deploy application built on top of [capistrano](https://github.com/capistrano/capistrano). This tool may be useful for designers and html programmers to simplify roll out process on staging server.
6
6
 
7
- Deploy model undermeans single staging server and deploying from `master` branch only.
8
-
9
7
  ## Install
10
8
 
11
9
  Billy distributes as [ruby gem](http://rubygems.org/gems/billy_the_tool), requires ruby 1.8.7+ and superuser privileges in case of global system installation (not [rvm](https://rvm.io/)).
@@ -23,7 +21,7 @@ If everything is ok this command will ask you to provide superuser password and
23
21
 
24
22
  `billy hello` will check all the system requirements and will give some helpful info. Billy will great you if all the requirements are satisfied And prompt to install otherwise.
25
23
 
26
- `billy eat {url_to_billy_config_or_local_file}` will parse config file with specified path and save it to current folder. `url_to_billy_config_or_local_file` could be local file path or remote file url. Spaeking of deploy process billy will check both current and home folders while looking for config file. Billy stores it's settings in file named `.billyrc`.
24
+ `billy eat {url_to_billy_config_or_local_file}` will parse config file with specified path and save it to current folder. `url_to_billy_config_or_local_file` could be local file path or remote file url. During deploy process billy will check both current and home folders while looking for config file. Billy stores it's settings in file named `.billyrc`.
27
25
 
28
26
  ### Sample config file
29
27
 
@@ -42,10 +40,15 @@ billy my config
42
40
  This command will return config settings from current folder if there wis .billyrc file, home settings from ~/.billyrc otherwise.
43
41
 
44
42
  ### GIT dependency
43
+
45
44
  Billy hopes to find git repository inside your project with existing remote. You haven't say billy where your remote is. It checks for `.git/config` file and grabs all the remotes inside.
46
45
 
47
46
  After config file is set up and you have pushed all the changes you've done Billy is ready to deploy.
48
47
 
48
+ #### Current branch instead of master since v0.2.4
49
+
50
+ Version 0.2.4 brings new feature about git usage: not it'll get your current branch if no one is specified in config with `branch:` key.
51
+
49
52
  ## Usage
50
53
 
51
54
  Here I will show how to download remote config file to my local folder and then deploy some project_name to staging server:
@@ -73,4 +76,4 @@ This scheme requires deployer publick key to be placed on staging server and sta
73
76
  billy my key
74
77
  ```
75
78
 
76
- This command will return one of your ssh keys, id_rsa.pub by default
79
+ This command will return one of your ssh keys, id_rsa.pub by default
@@ -9,9 +9,13 @@ module Billy
9
9
  def configure!( cap, config )
10
10
  cap.set :scm, :git
11
11
  cap.set :repository, config.repository || get_repository_path
12
- cap.set :branch, config.branch || 'master'
12
+ cap.set :branch, config.branch || current_branch
13
13
  end
14
14
 
15
+ def current_branch
16
+ `git symbolic-ref HEAD 2> /dev/null`.strip.gsub(/^refs\/heads\//, '')
17
+ end
18
+
15
19
  def get_config
16
20
  File.read( File.expand_path( GIT_PATH + "/config" ) )
17
21
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billy_the_tool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - 4pcbr
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-12-03 00:00:00 +04:00
18
+ date: 2013-04-10 00:00:00 +04:00
19
19
  default_executable: billy
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency