lib/gzr/commands/plan/cat.rb in gazer-0.3.10 vs lib/gzr/commands/plan/cat.rb in gazer-0.3.11
- old
+ new
@@ -1,8 +1,8 @@
# The MIT License (MIT)
-# Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, Inc.
+# Copyright (c) 2023 Mike DeAngelo Google, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
@@ -39,11 +39,11 @@
def execute(input: $stdin, output: $stdout)
say_warning("options: #{@options.inspect}") if @options[:debug]
with_session do
data = query_scheduled_plan(@plan_id)
- write_file(@options[:dir] ? "Plan_#{data.id}_#{data.name}.json" : nil, @options[:dir], nil, output) do |f|
- f.puts JSON.pretty_generate(data.to_attrs)
+ write_file(@options[:dir] ? "Plan_#{data[:id]}_#{data[:name]}.json" : nil, @options[:dir], nil, output) do |f|
+ f.puts JSON.pretty_generate(data)
end
end
end
end
end