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.
22 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 |
# File 'lib/rstack/configuration.rb', line 22 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 = {} @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.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def @author end |
#dependencies ⇒ Object
Returns the value of attribute dependencies.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def dependencies @dependencies end |
#development_dependencies ⇒ Object
Returns the value of attribute development_dependencies.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def development_dependencies @development_dependencies end |
#email ⇒ Object
Returns the value of attribute email.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def email @email end |
#executables ⇒ Object
Returns the value of attribute executables.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def executables @executables end |
#gem_name ⇒ Object
Returns the value of attribute gem_name.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def gem_name @gem_name end |
#has_rdoc ⇒ Object
Returns the value of attribute has_rdoc.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def has_rdoc @has_rdoc end |
#outpath ⇒ Object
Returns the value of attribute outpath.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def outpath @outpath end |
#package_filelist ⇒ Object
Returns the value of attribute package_filelist.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def package_filelist @package_filelist end |
#platform ⇒ Object
Returns the value of attribute platform.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def platform @platform end |
#rdoc_files ⇒ Object
Returns the value of attribute rdoc_files.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def rdoc_files @rdoc_files end |
#require_path ⇒ Object
Returns the value of attribute require_path.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def require_path @require_path end |
#runtime_dependencies ⇒ Object
Returns the value of attribute runtime_dependencies.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def runtime_dependencies @runtime_dependencies end |
#spec_filelist ⇒ Object
Returns the value of attribute spec_filelist.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def spec_filelist @spec_filelist end |
#summary ⇒ Object
Returns the value of attribute summary.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def summary @summary end |
#url ⇒ Object
Returns the value of attribute url.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def url @url end |
#version ⇒ Object
Returns the value of attribute version.
15 16 17 |
# File 'lib/rstack/configuration.rb', line 15 def version @version end |
Instance Method Details
#define_tasks ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/rstack/configuration.rb', line 58 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
50 51 52 |
# File 'lib/rstack/configuration.rb', line 50 def files @files ||= filelist_to_cleaned_a @package_filelist end |
#spec_files ⇒ Object
54 55 56 |
# File 'lib/rstack/configuration.rb', line 54 def spec_files @spec_files ||= filelist_to_cleaned_a @spec_filelist end |