bard 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bard.gemspec +1 -1
  3. data/lib/bard.rb +13 -5
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bard}
8
- s.version = "0.6.0"
8
+ s.version = "0.6.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Micah Geisel", "Nick Hogle"]
@@ -14,8 +14,6 @@ class Bard < Thor
14
14
 
15
15
  desc "check [PROJECT]", "check PROJECT or environment for missing dependencies"
16
16
  def check(project = nil)
17
- return check_project(project) if project
18
-
19
17
  required = {
20
18
  'bard' => Net::HTTP.get(URI.parse("http://gemcutter.org/gems/bard.json")).match(/"version":"([0-9.]+)"/)[1],
21
19
  'git' => '1.6.4',
@@ -23,10 +21,10 @@ class Bard < Thor
23
21
  'ruby' => '1.8.6'
24
22
  }
25
23
  actual = {
26
- 'bard' => `gem list bard`[/[0-9]+\.[0-9]+\.[0-9]+/],
24
+ 'bard' => File.read(File.expand_path(File.dirname(__FILE__) + "../../VERSION")).chomp,
27
25
  'git' => `git --version`[/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/],
28
- 'rubygems' => `gem --version`.chomp,
29
- 'ruby' => `ruby --version`[/[0-9]+\.[0-9]+\.[0-9]+/]
26
+ 'rubygems' => Gem::VERSION,
27
+ 'ruby' => RUBY_VERSION
30
28
  }
31
29
  help = {
32
30
  'bard' => 'please type `gem install bard` to update',
@@ -43,10 +41,14 @@ class Bard < Thor
43
41
  puts green("#{pkg.ljust(9)} (#{actual[pkg]})")
44
42
  end
45
43
  end
44
+
45
+ check_project(project) if project
46
46
  end
47
47
 
48
48
  desc "pull", "pull changes to your local machine"
49
49
  def pull
50
+ invoke :check
51
+
50
52
  ensure_integration_branch!
51
53
  ensure_clean_working_directory!
52
54
 
@@ -78,6 +80,8 @@ class Bard < Thor
78
80
 
79
81
  desc "push", "push local changes out to the remote"
80
82
  def push
83
+ invoke :check
84
+
81
85
  ensure_integration_branch!
82
86
  ensure_clean_working_directory!
83
87
 
@@ -100,7 +104,9 @@ class Bard < Thor
100
104
 
101
105
  desc "deploy", "pushes, merges integration branch into master and deploys it to production"
102
106
  def deploy
107
+ invoke :check
103
108
  invoke :push
109
+
104
110
  run_crucial "git fetch origin"
105
111
  run_crucial "git checkout master"
106
112
  run_crucial "git pull --rebase origin master"
@@ -115,6 +121,8 @@ class Bard < Thor
115
121
  if ENV['RAILS_ENV'] == "staging"
116
122
  desc "stage", "!!! INTERNAL USE ONLY !!! reset HEAD to integration, update submodules, run migrations, install gems, restart server"
117
123
  def stage
124
+ invoke :check
125
+
118
126
  if ENV['GIT_DIR'] == '.'
119
127
  # this means the script has been called as a hook, not manually.
120
128
  # get the proper GIT_DIR so we can descend into the working copy dir;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel