sprout 0.7.205-x86-linux → 0.7.206-x86-linux

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprout might be problematic. Click here for more details.

@@ -22,8 +22,6 @@ module Sprout
22
22
  # Path to a plain text file that contains a three-part version number.
23
23
  # @see VersionFile
24
24
  attr_accessor :version_file
25
- # Accessor for mocking the git gem.
26
- attr_accessor :scm
27
25
  # The remote branch to use, defaults to 'origin'.
28
26
  attr_accessor :remote
29
27
  # The local branch to send, defaults to 'master'.
@@ -66,6 +64,22 @@ module Sprout
66
64
  return t
67
65
  end
68
66
 
67
+ # Accessor for mocking the git gem.
68
+ def scm=(scm)
69
+ @scm = scm
70
+ end
71
+
72
+ # Will open on path if no SCM exists yet.
73
+ def scm
74
+ if(@scm.nil?)
75
+ path = path_to_git
76
+ raise GitTaskError.new("We don't appear to be inside of a git repository") if path.nil?
77
+ @scm = Git.open(path)
78
+ end
79
+
80
+ @scm
81
+ end
82
+
69
83
  private
70
84
 
71
85
  def push
@@ -92,23 +106,17 @@ module Sprout
92
106
  end
93
107
 
94
108
  def get_tags
95
- return @scm.tags.collect do |t|
109
+ return scm.tags.collect do |t|
96
110
  t.name
97
111
  end
98
112
  end
99
113
 
100
114
  def create_tag(name)
101
- @scm.add_tag name
115
+ scm.add_tag name
102
116
  end
103
117
 
104
118
  def validate
105
- raise GitTaskError.new('version_file is a required configuration for GitTask') if version_file.nil?
106
- if(@scm.nil?)
107
- path = path_to_git
108
- raise GitTaskError.new("We don't appear to be inside of a git repository") if path.nil?
109
- @scm = Git.open(path)
110
- @scm.pull
111
- end
119
+ raise GitTaskError.new("task.version_file is a required configuration for GitTask") if version_file.nil?
112
120
  end
113
121
 
114
122
  end
@@ -118,4 +126,4 @@ end
118
126
  # Helper method for definining the git task in a rakefile
119
127
  def git(args, &block)
120
128
  Sprout::GitTask.define_task(args, &block)
121
- end
129
+ end
@@ -1,10 +1,12 @@
1
1
  module Sprout
2
- module VERSION #:nodoc:
3
- MAJOR = 0
4
- MINOR = 7
5
- TINY = 205
2
+ if(!defined? Sprout::VERSION)
3
+ module VERSION #:nodoc:
4
+ MAJOR = 0
5
+ MINOR = 7
6
+ TINY = 206
6
7
 
7
- STRING = [MAJOR, MINOR, TINY].join('.')
8
- MAJOR_MINOR = [MAJOR, MINOR].join('.')
8
+ STRING = [MAJOR, MINOR, TINY].join('.')
9
+ MAJOR_MINOR = [MAJOR, MINOR].join('.')
10
+ end
9
11
  end
10
12
  end
data/lib/sprout.rb CHANGED
@@ -36,7 +36,9 @@ require 'sprout/general_tasks'
36
36
  require 'sprout/generator'
37
37
 
38
38
  module Sprout
39
- SUDO_INSTALL_GEMS = 'false' == ENV['SUDO_INSTALL_GEMS'] ? false : true
39
+ if(!defined? SUDO_INSTALL_GEMS)
40
+ SUDO_INSTALL_GEMS = 'false' == ENV['SUDO_INSTALL_GEMS'] ? false : true
41
+ end
40
42
 
41
43
  class SproutError < StandardError #:nodoc:
42
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.205
4
+ version: 0.7.206
5
5
  platform: x86-linux
6
6
  authors:
7
7
  - Luke Bayes
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-26 00:00:00 -08:00
12
+ date: 2009-01-28 00:00:00 -08:00
13
13
  default_executable: sprout
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency