Class: GemOf::Gems
- Inherits:
-
Object
- Object
- GemOf::Gems
- Defined in:
- lib/gem_of.rb
Overview
produce a list of gems for use in a gems Gemfile
Instance Method Summary collapse
-
#initialize ⇒ Gems
constructor
A new instance of Gems.
-
#to_str ⇒ String
(also: #to_s)
output the gem_code of this class as a string implements both #to_str and #to_s for implicit conversions.
Constructor Details
#initialize ⇒ Gems
Returns a new instance of Gems.
11 12 13 14 15 16 17 18 19 20 21 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 49 50 51 52 53 54 |
# File 'lib/gem_of.rb', line 11 def initialize set_gem_versions @gem_code = <<-HEREDOC source "https://rubygems.org" # place all development, system_test, etc dependencies here # lint/unit tests gem "rake" gem "gem_of" # ensure downstream projects get gem_of for rake tasks gem "rototiller", "~> 1.0" gem "rspec", "~> 3.4.0" gem "rubocop", "~> 0.49.1" # used in tests. pinned gem "simplecov", "~> 0.14.0" # used in tests gem "yardstick", "~> 0.9.0" # used in tests gem "markdown", "~> 0" gem "flay", "~> 2.10.0" # used in tests gem "flog", "~> 4.6.0" # used in tests gem "roodi", "~> 5.0.0" # used in tests gem "rubycritic" gem "coveralls", require: false # used in tests group :system_tests do gem "beaker", GemOf.location_of(ENV["BEAKER_VERSION"] || "#{@beaker_version}") gem "beaker-hostgenerator" gem "beaker-abs", GemOf.location_for(ENV["BEAKER_ABS_VERSION"] || "~> 0.2") gem "nokogiri" ,"#{@nokogiri_version}" gem "public_suffix" ,"#{@public_suffix_version}" #gem "activesupport" ,"#{@activesupport_version}" end local_gemfile = "Gemfile.local" if File.exists? local_gemfile eval(File.read(local_gemfile), binding) end user_gemfile = File.join(Dir.home,".Gemfile") if File.exists? user_gemfile eval(File.read(user_gemfile), binding) end HEREDOC end |
Instance Method Details
#to_str ⇒ String Also known as: to_s
output the gem_code of this class as a string
implements both #to_str and #to_s for implicit conversions
60 61 62 |
# File 'lib/gem_of.rb', line 60 def to_str @gem_code end |