Class: SocialStream::Release::Global
- Inherits:
-
Object
- Object
- SocialStream::Release::Global
- Includes:
- Thor::Actions
- Defined in:
- lib/social_stream/release/global.rb,
lib/social_stream/release/global/version_file.rb
Direct Known Subclasses
Defined Under Namespace
Classes: VersionFile
Constant Summary collapse
- DEPENDENCY_REGEXP =
/dependency.*social_stream-(\w*)/
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #bump ⇒ Object
- #commit_files ⇒ Object
- #dependencies ⇒ Object
-
#initialize(target = nil) ⇒ Global
constructor
A new instance of Global.
- #last_tag ⇒ Object
- #publish ⇒ Object
Constructor Details
#initialize(target = nil) ⇒ Global
Returns a new instance of Global.
14 15 16 |
# File 'lib/social_stream/release/global.rb', line 14 def initialize(target = nil) @target = target end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/social_stream/release/global.rb', line 12 def name @name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
12 13 14 |
# File 'lib/social_stream/release/global.rb', line 12 def version @version end |
Instance Method Details
#bump ⇒ Object
18 19 20 21 22 |
# File 'lib/social_stream/release/global.rb', line 18 def bump bump_version update_dependencies end |
#commit_files ⇒ Object
33 34 35 |
# File 'lib/social_stream/release/global.rb', line 33 def commit_files "#{ @version_file.filename } #{ gemspec }" end |
#dependencies ⇒ Object
28 29 30 31 |
# File 'lib/social_stream/release/global.rb', line 28 def dependencies @dependencies ||= File.read(gemspec).scan(DEPENDENCY_REGEXP).flatten end |
#last_tag ⇒ Object
37 38 39 |
# File 'lib/social_stream/release/global.rb', line 37 def last_tag `git describe`.split('-').first end |
#publish ⇒ Object
24 25 26 |
# File 'lib/social_stream/release/global.rb', line 24 def publish release_cmd rake_release_command end |