Class: Bruw::Commands::Decidim
- Inherits:
-
Thor
- Object
- Thor
- Bruw::Commands::Decidim
- Defined in:
- lib/bruw/commands/decidim.rb
Instance Method Summary collapse
Instance Method Details
#curl(path) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/bruw/commands/decidim.rb', line 30 def curl(path) [:path] = path [:version] = find_version_for_curl response = Bruw::Decidim.curl() if [:save] path = strip_path(path) create_path(path) save_file(path, response.chop) puts "Curl finished, please see '#{path}'".colorize(:green) else puts response.chop end rescue StandardError => e puts e..colorize(:red) end |
#version ⇒ Object
13 14 15 16 17 |
# File 'lib/bruw/commands/decidim.rb', line 13 def version puts "Current Decidim version is #{Bruw::Decidim.version&.colorize(:green)}" rescue StandardError => e puts e..colorize(:red) end |