class RSGem::Context
Attributes
options[R]
Public Class Methods
new(options:)
click to toggle source
# File lib/rsgem/context.rb, line 7 def initialize(options:) @options = options raise Errors::MissingGemName unless options[:gem_name] end
Public Instance Methods
bundler_options()
click to toggle source
# File lib/rsgem/context.rb, line 13 def bundler_options @bundler_options ||= options[:bundler_options] end
ci_provider()
click to toggle source
# File lib/rsgem/context.rb, line 17 def ci_provider @ci_provider ||= begin if (name = options[:ci_provider]) RSGem::Constants::CI_PROVIDERS.detect do |provider| provider.name == name end else RSGem::Constants::DEFAULT_CI_PROVIDER end end end
folder_path()
click to toggle source
# File lib/rsgem/context.rb, line 45 def folder_path `pwd`.sub("\n", '/') + gem_name end
gem_name()
click to toggle source
# File lib/rsgem/context.rb, line 33 def gem_name @gem_name ||= options[:gem_name] end
gemfile_path()
click to toggle source
# File lib/rsgem/context.rb, line 29 def gemfile_path "#{folder_path}/Gemfile" end
gemspec_path()
click to toggle source
# File lib/rsgem/context.rb, line 37 def gemspec_path "#{folder_path}/#{gem_name}.gemspec" end
gitignore_path()
click to toggle source
# File lib/rsgem/context.rb, line 49 def gitignore_path "#{folder_path}/.gitignore" end
license_path()
click to toggle source
# File lib/rsgem/context.rb, line 41 def license_path "#{folder_path}/LICENSE.txt" end
rakefile_path()
click to toggle source
# File lib/rsgem/context.rb, line 53 def rakefile_path "#{folder_path}/Rakefile" end
spec_helper_path()
click to toggle source
# File lib/rsgem/context.rb, line 57 def spec_helper_path "#{folder_path}/spec/spec_helper.rb" end