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.
-
#development_dependencies ⇒ Object
Returns the value of attribute development_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.
-
#runtime_dependencies ⇒ Object
Returns the value of attribute runtime_dependencies.
-
#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.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rstack/configuration.rb', line 23 def initialize(gem_name) @gem_name = gem_name @summary = '[ENTER A SUMMARY]' @author = '[ENTER A AUTHOR]' @email = '[ENTER YOUR EMAIL]' @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 = {} @runtime_dependencies = {} @development_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.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def @author end |
#dependencies ⇒ Object
Returns the value of attribute dependencies.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def dependencies @dependencies end |
#development_dependencies ⇒ Object
Returns the value of attribute development_dependencies.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def development_dependencies @development_dependencies end |
#email ⇒ Object
Returns the value of attribute email.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def email @email end |
#executables ⇒ Object
Returns the value of attribute executables.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def executables @executables end |
#gem_name ⇒ Object
Returns the value of attribute gem_name.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def gem_name @gem_name end |
#has_rdoc ⇒ Object
Returns the value of attribute has_rdoc.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def has_rdoc @has_rdoc end |
#outpath ⇒ Object
Returns the value of attribute outpath.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def outpath @outpath end |
#package_filelist ⇒ Object
Returns the value of attribute package_filelist.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def package_filelist @package_filelist end |
#platform ⇒ Object
Returns the value of attribute platform.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def platform @platform end |
#rdoc_files ⇒ Object
Returns the value of attribute rdoc_files.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def rdoc_files @rdoc_files end |
#require_path ⇒ Object
Returns the value of attribute require_path.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def require_path @require_path end |
#runtime_dependencies ⇒ Object
Returns the value of attribute runtime_dependencies.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def runtime_dependencies @runtime_dependencies end |
#spec_filelist ⇒ Object
Returns the value of attribute spec_filelist.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def spec_filelist @spec_filelist end |
#summary ⇒ Object
Returns the value of attribute summary.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def summary @summary end |
#url ⇒ Object
Returns the value of attribute url.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def url @url end |
#version ⇒ Object
Returns the value of attribute version.
16 17 18 |
# File 'lib/rstack/configuration.rb', line 16 def version @version end |
Instance Method Details
#define_tasks ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/rstack/configuration.rb', line 59 def define_tasks RSpec.define_tasks self Gem.define_tasks self RDoc.define_tasks self if @has_rdoc task :default => :spec task :repackage => :spec task :cruise do ::Rake::Task[:repackage].invoke ::Rake::Task[:rdoc].invoke if @has_rdoc end end |
#files ⇒ Object
51 52 53 |
# File 'lib/rstack/configuration.rb', line 51 def files @files ||= filelist_to_cleaned_a @package_filelist end |
#spec_files ⇒ Object
55 56 57 |
# File 'lib/rstack/configuration.rb', line 55 def spec_files @spec_files ||= filelist_to_cleaned_a @spec_filelist end |