Class: RStack::Configuration
- Inherits:
-
Object
- Object
- RStack::Configuration
- Defined in:
- lib/rstack/configuration.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#email ⇒ Object
Returns the value of attribute email.
-
#executables ⇒ Object
Returns the value of attribute executables.
-
#gem_name ⇒ Object
Returns the value of attribute gem_name.
-
#has_rdoc ⇒ Object
Returns the value of attribute has_rdoc.
-
#outpath ⇒ Object
Returns the value of attribute outpath.
-
#package_filelist ⇒ Object
Returns the value of attribute package_filelist.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#rdoc_files ⇒ Object
Returns the value of attribute rdoc_files.
-
#require_path ⇒ Object
Returns the value of attribute require_path.
-
#spec_filelist ⇒ Object
Returns the value of attribute spec_filelist.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#url ⇒ Object
Returns the value of attribute url.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #define_tasks ⇒ Object
- #files ⇒ Object
-
#initialize(gem_name) {|_self| ... } ⇒ Configuration
constructor
A new instance of Configuration.
- #spec_files ⇒ Object
Constructor Details
#initialize(gem_name) {|_self| ... } ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rstack/configuration.rb', line 9 def initialize(gem_name) @gem_name = gem_name @summary = '[ENTER A SUMMARY]' @author = '[ENTER A AUTHOR]' @email = '[ENTER YOUR EMAIL]' @url = '[ENTER A PROJECT URL]' @require_path = 'lib' @version = "0.1.0" @platform = ::Gem::Platform::RUBY @package_filelist = FileList['[a-zA-Z]*', 'bin/**/*', 'lib/**/*', 'spec/**/*'] @spec_filelist = FileList['spec/**/*_spec.rb'] @rdoc_files = ['README.txt', 'CHANGELOG.txt', "LICENSE.txt", 'lib/**/*.rb'] @has_rdoc = false @executables = [] @dependencies = {} @outpath = ENV["CC_BUILD_ARTIFACTS"] || default_outpath unless File.exist?(@outpath) FileUtils.mkdir(@outpath) end yield self if block_given? define_tasks end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def @author end |
#dependencies ⇒ Object
Returns the value of attribute dependencies.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def dependencies @dependencies end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def email @email end |
#executables ⇒ Object
Returns the value of attribute executables.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def executables @executables end |
#gem_name ⇒ Object
Returns the value of attribute gem_name.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def gem_name @gem_name end |
#has_rdoc ⇒ Object
Returns the value of attribute has_rdoc.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def has_rdoc @has_rdoc end |
#outpath ⇒ Object
Returns the value of attribute outpath.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def outpath @outpath end |
#package_filelist ⇒ Object
Returns the value of attribute package_filelist.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def package_filelist @package_filelist end |
#platform ⇒ Object
Returns the value of attribute platform.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def platform @platform end |
#rdoc_files ⇒ Object
Returns the value of attribute rdoc_files.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def rdoc_files @rdoc_files end |
#require_path ⇒ Object
Returns the value of attribute require_path.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def require_path @require_path end |
#spec_filelist ⇒ Object
Returns the value of attribute spec_filelist.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def spec_filelist @spec_filelist end |
#summary ⇒ Object
Returns the value of attribute summary.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def summary @summary end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def url @url end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/rstack/configuration.rb', line 3 def version @version end |
Instance Method Details
#define_tasks ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rstack/configuration.rb', line 44 def define_tasks RSpec.define_tasks self Gem.define_tasks self RDoc.define_tasks self if @has_rdoc task :default => :spec task :repackage => "spec:with_coverage" task :cruise do ::Rake::Task[:repackage].invoke ::Rake::Task[:rdoc].invoke if @has_rdoc end end |
#files ⇒ Object
36 37 38 |
# File 'lib/rstack/configuration.rb', line 36 def files @files ||= filelist_to_cleaned_a @package_filelist end |
#spec_files ⇒ Object
40 41 42 |
# File 'lib/rstack/configuration.rb', line 40 def spec_files @spec_files ||= filelist_to_cleaned_a @spec_filelist end |