File: Thorfile

package info (click to toggle)
ruby-rspec-rails 7.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,796 kB
  • sloc: ruby: 11,068; sh: 198; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 358 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Version < Thor
  include Thor::Actions

  desc "use VERSION", "installs the bundle the rails-VERSION"
  def use(version)
    remove_file "Gemfile.lock"
    run "echo '#{version}' > ./.rails-version"
    run "bundle install --binstubs"
  end

  desc "which", "print out the configured rails version"
  def which
    say `cat ./.rails-version`
  end
end