Skip to content

Commit b8e6e87

Browse files
committed
Uses Thor actions where possible
1 parent cb66589 commit b8e6e87

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Diff for: Thorfile

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
class Version < Thor
2+
include Thor::Actions
3+
24
desc "use VERSION", "installs the bundle the rails-VERSION"
35
def use(version)
4-
`rm Gemfile.lock`
5-
`echo #{version} > ./.rails-version`
6-
"bundle install --binstubs".tap do |m|
7-
say m
8-
system m
9-
end
6+
remove_file "Gemfile.lock"
7+
run "echo '#{version}' > ./.rails-version"
8+
run "bundle install --binstubs"
109
end
1110

1211
desc "which", "print out the configured rails version"

0 commit comments

Comments
 (0)