repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/ignored_table_factory.rb
spec/factories/ignored_table_factory.rb
FactoryBot.define do factory :ignored_table do data_source pattern { ".+_(?:old|wk|l)" } end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/user_factory.rb
spec/factories/user_factory.rb
FactoryBot.define do factory :user do provider { "google_oauth2" } sequence(:uid) { |n| (n * 100).to_s } name { "name_#{uid}" } email { "#{name}@gmail.com" } image_url { "https://lh3.googleusercontent.com/-l5MDH3jtWXc/AAAAAAAAAAI/AAAAAAAAAAA/2wjfVaIkYNY/photo.jpg" } trait :admin do admin { true } end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/schema_memo_log_factory.rb
spec/factories/schema_memo_log_factory.rb
FactoryBot.define do factory :schema_memo_log do schema_memo sequence(:revision) { |n| n } user description { "# schema memo" } description_diff { "+# schema memo" } end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/column_memo_factory.rb
spec/factories/column_memo_factory.rb
FactoryBot.define do factory :column_memo do table_memo sequence(:name) { |n| "column#{n}" } description { "# column memo" } end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/schema_memo_factory.rb
spec/factories/schema_memo_factory.rb
FactoryBot.define do factory :schema_memo do database_memo sequence(:name) { |n| "schema#{n}" } description { "# schema memo" } end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/database_memo_log_factory.rb
spec/factories/database_memo_log_factory.rb
FactoryBot.define do factory :database_memo_log do database_memo sequence(:revision) { |n| n } user description { "# database memo" } description_diff { "+# database memo" } end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/database_memo_factory.rb
spec/factories/database_memo_factory.rb
FactoryBot.define do factory :database_memo do sequence(:name) { |n| "database#{n}" } description { "# database memo" } end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/keyword_factory.rb
spec/factories/keyword_factory.rb
FactoryBot.define do factory :keyword do name { "keyword" } description { "# keyword description" } end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/favorite_table_factory.rb
spec/factories/favorite_table_factory.rb
FactoryBot.define do factory :favorite_table do user table_memo end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/factories/data_source_factory.rb
spec/factories/data_source_factory.rb
FactoryBot.define do factory :data_source do name { "dmemo" } description { "# dmemo test db\nDB for test." } adapter { ActiveRecord::Base.establish_connection.db_config.configuration_hash[:adapter] } host { "localhost" } port { 5432 } dbname { ActiveRecord::Base.establish_connection.db_config.configuration_hash[:database] } user { ActiveRecord::Base.establish_connection.db_config.configuration_hash[:username] } password { ActiveRecord::Base.establish_connection.db_config.configuration_hash[:password] } encoding { nil } pool { 1 } trait :bigquery_adapter do adapter { "bigquery" } after(:create) do |data_source| FactoryBot.create(:bigquery_config, data_source:) end end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/models/data_source_spec.rb
spec/models/data_source_spec.rb
require "rails_helper" describe DataSource, type: :model do let(:data_source) { FactoryBot.create(:data_source) } describe "#data_source_table" do it "return data source table" do table_names = data_source.source_table_names ds_table = data_source.data_source_table("public", "data_sources", table_names) expect(ds_table).to be_present expect(ds_table.columns.map(&:name)).to match_array(%w( id name description adapter host port dbname user password encoding pool created_at updated_at )) end end describe "#data_source_tables" do it "returns table_names" do expect(data_source.data_source_tables.map(&:table_name)).to include("data_sources") end context "with invalid connection param" do before do data_source.update!(port: 5439) end it "raises error" do expect { data_source.data_source_tables }.to raise_error(DataSource::ConnectionBad) end end context "with ignored pattern" do it "ignores specified table" do FactoryBot.create(:ignored_table, data_source:, pattern: "data_sources") expect(data_source.data_source_tables.map(&:table_name)).not_to include("data_sources") end it "ignores specified schema" do FactoryBot.create(:ignored_table, data_source:, pattern: "public") expect(data_source.data_source_tables.map(&:table_name)).to eq [] end end end describe "#data_source_tables" do it "returns data source tables" do expect(data_source.data_source_tables.size).to be > 0 end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/models/autolink_keyword_spec.rb
spec/models/autolink_keyword_spec.rb
require "rails_helper" describe AutolinkKeyword, type: :model do describe ".links" do let(:database_memo) { FactoryBot.create(:database_memo, name: "db") } let(:schema_memo) { FactoryBot.create(:schema_memo, database_memo:, name: "myapp") } before do FactoryBot.create(:table_memo, schema_memo:, name: "books") FactoryBot.create(:keyword, name: "difficult-word", description: "Difficult!") end it "returns links to table" do expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "difficult-word" => "/keywords/difficult-word", ) end context "after table_memos created" do it "clears links" do expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "difficult-word" => "/keywords/difficult-word", ) memo = FactoryBot.create(:table_memo, schema_memo:, name: "blogs") expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "blogs" => "/databases/db/myapp/blogs", "myapp.blogs" => "/databases/db/myapp/blogs", "difficult-word" => "/keywords/difficult-word", ) memo.update!(name: "alphabets") expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "alphabets" => "/databases/db/myapp/alphabets", "myapp.alphabets" => "/databases/db/myapp/alphabets", "difficult-word" => "/keywords/difficult-word", ) memo.destroy! expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "difficult-word" => "/keywords/difficult-word", ) end end context "after keyword created" do it "clears links" do expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "difficult-word" => "/keywords/difficult-word", ) keyword = FactoryBot.create(:keyword, name: "easy-word", description: "Easy!") expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "difficult-word" => "/keywords/difficult-word", "easy-word" => "/keywords/easy-word", ) keyword.update!(name: "easy") expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "difficult-word" => "/keywords/difficult-word", "easy" => "/keywords/easy", ) keyword.destroy! expect(AutolinkKeyword.links).to eq( "books" => "/databases/db/myapp/books", "myapp.books" => "/databases/db/myapp/books", "difficult-word" => "/keywords/difficult-word", ) end end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/models/data_source_adapters/mysql2_adapter_spec.rb
spec/models/data_source_adapters/mysql2_adapter_spec.rb
require "rails_helper" describe DataSourceAdapters::Mysql2Adapter, type: :model do let(:data_source) do FactoryBot.create( :data_source, adapter: 'mysql2', port: 3306, dbname: 'dmemo_test', user: 'root', password: '', host: '127.0.0.1', ) end let(:adapter) { DataSourceAdapters::Mysql2Adapter.new(data_source) } let(:table) { DataSourceTable.new(data_source, 'dmemo_test', 'keywords') } def execute_sql(sql) sql.split(';').select(&:present?).each do |s| adapter.source_base_class.connection.execute(s) end end before do execute_sql(<<~SQL) CREATE TABLE IF NOT EXISTS #{table.table_name} (id INT PRIMARY KEY); TRUNCATE TABLE #{table.table_name}; INSERT INTO #{table.table_name} VALUES (1); ANALYZE TABLE #{table.table_name}; SQL end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/models/data_source_adapters/bigquery_adapter_spec.rb
spec/models/data_source_adapters/bigquery_adapter_spec.rb
require "rails_helper" describe DataSourceAdapters::BigqueryAdapter, type: :model do let(:data_source) { FactoryBot.create(:data_source, :bigquery_adapter) } let(:adapter) { DataSourceAdapters::BigqueryAdapter.new(data_source) } let(:table) { DataSourceTable.new(data_source, 'public', 'keywords') } describe "fetch_table_names" do it "return table names" do allow(adapter).to receive(:fetch_all_table_ids) .and_return(%w(partitioned_table20180801 partitioned_table20180802)) allow(adapter).to receive_message_chain(:bq_dataset, :dataset_id) .and_return('sample') expect(adapter.fetch_table_names).to eq [%w[sample partitioned_table]] end end let(:dummy_fields) { field = Struct.new(:name, :mode, :type, :fields) [ field.new('col1', 'NULLABLE', 'INTEGER', []), field.new('col2', 'REPEATED', 'RECORD', [ field.new('subcol1', 'NULLABLE', 'INTEGER', []), field.new('subcol2', 'NULLABLE', 'INTEGER', []), ]), ] } describe "#fetch_columns" do it "return columns" do moc = double('bq_table_moc') allow(adapter).to receive(:bq_table).and_return(moc) allow(moc).to receive(:fields).and_return(dummy_fields) expect(adapter.fetch_columns(table).map(&:name)).to eq %w(col1 col2 col2.subcol1 col2.subcol2) expect(adapter.fetch_columns(table).map(&:sql_type)).to eq %w(INTEGER RECORD[] INTEGER INTEGER) end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/models/data_source_adapters/standard_adapter_spec.rb
spec/models/data_source_adapters/standard_adapter_spec.rb
require "rails_helper" describe DataSourceAdapters::StandardAdapter, type: :model do let(:data_source) { FactoryBot.create(:data_source) } let(:adapter) { DataSourceAdapters::StandardAdapter.new(data_source) } let(:table) { DataSourceTable.new(data_source, 'public', 'keywords') } describe "#source_base_class" do it "return source base class" do expect(adapter.source_base_class).to eq(DataSourceAdapters::DynamicTable::Dmemo_Base) end end describe "#fetch_columns" do it "return columns" do expect(adapter.fetch_columns(table).first).to be_a DataSourceAdapters::Column end context "with invalid connection param" do before do data_source.update!(port: 5439) end it "raises error" do expect { adapter.fetch_columns(table) }.to raise_error(DataSource::ConnectionBad) end end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/batches/synchronize_data_sources_spec.rb
spec/batches/synchronize_data_sources_spec.rb
require "rails_helper" describe SynchronizeDataSources do let(:batch) { SynchronizeDataSources } describe ".run" do let!(:data_source) { FactoryBot.create(:data_source, name: "dmemo", description: "") } it "synchronize data_source" do expect(DatabaseMemo.count).to eq(0) batch.run database_memo = data_source.database_memo expect(database_memo.name).to eq("dmemo") schema_memo = database_memo.schema_memos.take! expect(schema_memo.name).to eq("public") table_memos = schema_memo.table_memos expect(table_memos.find_by!(name: "data_sources")).to be_present column_memos = table_memos.find_by!(name: "data_sources").column_memos expect(column_memos).to be_present end context "with invalid connection param" do before do data_source.update!(port: 5439) end it "fails data_sources sync" do expect { batch.run }.to raise_error(DataSource::ConnectionBad) expect(data_source.database_memo).to be_present expect(SchemaMemo.count).to eq(0) end end end describe ".import_data_source" do let(:data_source) { FactoryBot.create(:data_source) } describe ".import_data_source!" do it "synchronize data source" do FactoryBot.create(:keyword, name: "tempura") expect(DatabaseMemo.count).to eq(0) batch.import_data_source!(data_source) database_memo = DatabaseMemo.take expect(database_memo.name).to eq(data_source.name) end end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/lib/autoload/return_to_validator_spec.rb
spec/lib/autoload/return_to_validator_spec.rb
require 'rails_helper' RSpec.describe ReturnToValidator do let(:validator) { described_class } describe '.valid?' do it 'accepts a valid path' do expect(validator).to be_valid('/users/1') end it 'rejects absolute URI' do expect(validator).to_not be_valid('http://example.net') end it 'rejects protocol-relative URI' do expect(validator).to_not be_valid('//example.net') end it 'rejects non-URI' do expect(validator).to_not be_valid(nil) expect(validator).to_not be_valid('http:') end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/lib/autoload/html/pipeline/autolink_keyword_filter_spec.rb
spec/lib/autoload/html/pipeline/autolink_keyword_filter_spec.rb
require "rails_helper" describe HTML::Pipeline::AutolinkKeywordFilter do describe "#call" do let(:filter) { HTML::Pipeline::AutolinkKeywordFilter.new(doc, autolink_keywords:) } let(:doc) { Nokogiri::HTML::DocumentFragment.parse(html) } let(:autolink_keywords) { { "ruby" => "https://www.ruby-lang.org/", "uby" => "https://example.com/", } } context "with plain text" do let(:html) { "This is ruby." } it { expect(filter.call).to eq('This is <a href="https://www.ruby-lang.org/">ruby</a>.') } end context "with anchored html" do let(:html) { '<a href="https://example.com/">This is ruby</a>.' } it { expect(filter.call).to eq('<a href="https://example.com/">This is ruby</a>.') } end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/spec/spec_helpers/request_spec_helper.rb
spec/spec_helpers/request_spec_helper.rb
module RequestSpecHelper def self.last_response @response end def self.last_response=(response) @response = response end def set_rack_session(hash) data = ::RackSessionAccess.encode(hash) put RackSessionAccess.path, params: { data: } end def login!(user: nil, admin: false) user ||= FactoryBot.create(:user, admin:) set_rack_session(user_id: user.id) end def page Capybara.string(response.body) end def save_and_open_page RequestSpecHelper.last_response = response current_session = Capybara.current_session def current_session.body RequestSpecHelper.last_response.body end current_session.save_and_open_page end end RSpec.configure do |c| c.include RequestSpecHelper, type: :request c.before(:each) do Capybara.asset_host = "http://localhost:3000" end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/lib/autoload/return_to_validator.rb
lib/autoload/return_to_validator.rb
module ReturnToValidator def self.valid?(return_to) if return_to.nil? return false end uri = Addressable::URI.parse(return_to) !uri.nil? && uri.host.nil? && uri.scheme.nil? rescue Addressable::URI::InvalidURIError false end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/lib/autoload/html/pipeline/inner_text_filter.rb
lib/autoload/html/pipeline/inner_text_filter.rb
module HTML class Pipeline class InnerTextFilter < HTML::Pipeline::Filter def call doc.text end end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/lib/autoload/html/pipeline/autolink_keyword_filter.rb
lib/autoload/html/pipeline/autolink_keyword_filter.rb
module HTML class Pipeline class AutolinkKeywordFilter < Filter IGNORED_ANCESTOR_TAGS = %w(pre code a) def call return doc unless context[:autolink_keywords] doc.search('.//text()').each do |node| next if has_ancestor?(node, IGNORED_ANCESTOR_TAGS) content = node.to_html html = content.gsub(patterns) { |matched| %{<a href="#{context[:autolink_keywords][matched]}">#{matched}</a>} } next if html == content node.replace(html) end doc.to_html end def patterns @patterns ||= Regexp.union(context[:autolink_keywords].keys.sort_by { |k| -k.size }) end end end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/application.rb
config/application.rb
require_relative "boot" require "rails" require "active_model/railtie" require "active_record/railtie" require "action_controller/railtie" require "action_view/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Dmemo VERSION = "2.0.0" class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" config.eager_load_paths << "#{Rails.root}/lib/autoload" # Don't generate system test files. config.generators.system_tests = nil end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/environment.rb
config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/puma.rb
config/puma.rb
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum, this matches the default thread size of Active Record. # threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i threads threads_count, threads_count # Specifies the `port` that Puma will listen on to receive requests, default is 3000. # port ENV.fetch("PORT") { 3000 } # Specifies the `environment` that Puma will run in. # environment ENV.fetch("RAILS_ENV") { "development" } # Specifies the number of `workers` to boot in clustered mode. # Workers are forked webserver processes. If using threads and workers together # the concurrency of the application would be max `threads` * `workers`. # Workers do not work on JRuby or Windows (both of which do not support # processes). # # workers ENV.fetch("WEB_CONCURRENCY") { 2 } # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write # process behavior so workers use less memory. If you use this option # you need to make sure to reconnect any threads in the `on_worker_boot` # block. # # preload_app! # The code in the `on_worker_boot` will be called if you are using # clustered mode by specifying a number of `workers`. After each worker # process is booted this block will be run, if you are using `preload_app!` # option you will want to use this block to reconnect to any threads # or connections that may have been created at application boot, Ruby # cannot share connections between processes. # # on_worker_boot do # ActiveRecord::Base.establish_connection if defined?(ActiveRecord) # end # Allow puma to be restarted by `rails restart` command. plugin :tmp_restart
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/routes.rb
config/routes.rb
Rails.application.routes.draw do root "top#show" resource :setting, only: %w(show) resources :data_sources patch "/data_sources/:id/import_schema/:schema_name" => "data_sources#import_schema", as: "import_schema" patch "/data_sources/:id/unlink_schema/:schema_name" => "data_sources#unlink_schema", as: "unlink_schema" resources :ignored_tables, except: %w(edit update) resources :users, except: %w(show destroy) resource :search, controller: :search_results, as: :search_results, only: %w(show) resources :databases, controller: :database_memos, as: :database_memos do resources :schemas, controller: :schema_memos, as: :schema_memos, shallow: true, except: %w(index) do resources :tables, controller: :table_memos, as: :table_memos, shallow: true, except: %w(index) do resources :columns, controller: :column_memos, as: :column_memos, shallow: true, only: %w(show edit update destroy) do resources :logs, controller: :column_memo_logs, as: :logs, only: "index" end resources :logs, controller: :table_memo_logs, as: :logs, only: "index" resource :favorite_table, only: %w(create destroy) end resources :logs, controller: :schema_memo_logs, as: :logs, only: "index" end resources :logs, controller: :database_memo_logs, as: :logs, only: "index" end get "/databases/:database_name/:name" => "schema_memos#show", as: "database_schema" get "/databases/:database_name/:schema_name/:name" => "table_memos#show", as: "database_schema_table" resource :markdown_preview, only: %w(create) resources :keywords, except: %w(show) do resources :logs, controller: :keyword_logs, as: :logs, only: "index" end get "/keywords/*id", to: "keywords#show", format: false get "sign_in", to: "sessions#new" post "auth/google_oauth2", as: :google_oauth2, to: lambda { |_env| [500, {}, 'Never called'] } get "auth/google_oauth2/callback", to: "sessions#callback" delete "logout", to: "sessions#destroy" end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/spring.rb
config/spring.rb
%w( .ruby-version .rbenv-vars tmp/restart.txt tmp/caching-dev.txt ).each { |path| Spring.watch(path) }
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/boot.rb
config/boot.rb
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations.
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/content_security_policy.rb
config/initializers/content_security_policy.rb
# Be sure to restart your server when you modify this file. # Define an application-wide content security policy. # See the Securing Rails Applications Guide for more information: # https://guides.rubyonrails.org/security.html#content-security-policy-header # Rails.application.configure do # config.content_security_policy do |policy| # policy.default_src :self, :https # policy.font_src :self, :https, :data # policy.img_src :self, :https, :data # policy.object_src :none # policy.script_src :self, :https # policy.style_src :self, :https # # Specify URI for violation reports # # policy.report_uri "/csp-violation-report-endpoint" # end # # # Generate session nonces for permitted importmap and inline scripts # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } # config.content_security_policy_nonce_directives = %w(script-src) # # # Report violations without enforcing the policy. # # config.content_security_policy_report_only = true # end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/filter_parameter_logging.rb
config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure parameters to be filtered from the log file. Use this to limit dissemination of # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported # notations and behaviors. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, ]
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/application_controller_renderer.rb
config/initializers/application_controller_renderer.rb
# Be sure to restart your server when you modify this file. # ActiveSupport::Reloader.to_prepare do # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # ) # end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/logger.rb
config/initializers/logger.rb
Rails.application.configure do config.middleware.swap( Rails::Rack::Logger, Silencer::Logger, config.log_tags, silence: ["/site/sha"] ) end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/session_store.rb
config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: '_dmemo_session'
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/data_source_adapters.rb
config/initializers/data_source_adapters.rb
Rails.application.config.to_prepare do ActiveSupport.on_load(:active_record) do DataSourceAdapters.register_adapter(DataSourceAdapters::PostgresqlAdapter, 'postgresql') DataSourceAdapters.register_adapter(DataSourceAdapters::Mysql2Adapter, 'mysql2') DataSourceAdapters.register_adapter(DataSourceAdapters::RedshiftAdapter, 'redshift') DataSourceAdapters.register_adapter(DataSourceAdapters::BigqueryAdapter, 'bigquery') DataSourceAdapters.register_adapter(DataSourceAdapters::PrestoAdapter, 'presto') end end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/wrap_parameters.rb
config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end # To enable root element in JSON for ActiveRecord objects. # ActiveSupport.on_load(:active_record) do # self.include_root_in_json = true # end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/omniauth.rb
config/initializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do provider :google_oauth2, ENV["GOOGLE_CLIENT_ID"], ENV["GOOGLE_CLIENT_SECRET"], { hd: ENV["GOOGLE_HOSTED_DOMAIN"].present? ? ENV["GOOGLE_HOSTED_DOMAIN"] : nil, } end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/inflections.rb
config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, "\\1en" # inflect.singular /^(ox)en/i, "\\1" # inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: ActiveSupport::Inflector.inflections(:en) do |inflect| inflect.acronym "HTML" end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/active_record_connection_adapters.rb
config/initializers/active_record_connection_adapters.rb
# This file explicitly requires the connection adapter for mysql2 to ensure that every adapter is loaded before the app launch. # This helps database_rewinder's monkey patch, which assumes that basic adapters are loaded before the patch is applied. # https://github.com/amatsuda/database_rewinder/blob/v1.0.1/lib/database_rewinder/active_record_monkey.rb#L35-L36 # # Without this, database_rewinder prepends its monkey-patch module to AbstractMysqlAdapter instead of Mysql2Adapter # when testing, and that causes ArgumentError (wrong number of arguments) because parameters of AbstractMysqlAdapter#execute # are different from those of Mysql2Adapter#execute (at least with activerecord 7.0). require "active_record/connection_adapters/mysql2_adapter"
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/cookies_serializer.rb
config/initializers/cookies_serializer.rb
# Be sure to restart your server when you modify this file. # Specify a serializer for the signed and encrypted cookie jars. # Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/permissions_policy.rb
config/initializers/permissions_policy.rb
# Define an application-wide HTTP permissions policy. For further # information see https://developers.google.com/web/updates/2018/06/feature-policy # # Rails.application.config.permissions_policy do |f| # f.camera :none # f.gyroscope :none # f.microphone :none # f.usb :none # f.fullscreen :self # f.payment :self, "https://secure.example.com" # end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/html_pipeline.rb
config/initializers/html_pipeline.rb
require 'html/pipeline' require 'html/pipeline/autolink_filter' require 'html/pipeline/autolink_keyword_filter' require 'html/pipeline/inner_text_filter' require 'html/pipeline/markdown_filter' require 'html/pipeline/syntax_highlight_filter' Rails.application.reloader.to_prepare do Rails.application.config.markdown_to_html_pipeline = HTML::Pipeline.new [ HTML::Pipeline::MarkdownFilter, HTML::Pipeline::SyntaxHighlightFilter, HTML::Pipeline::AutolinkFilter, HTML::Pipeline::AutolinkKeywordFilter, ] Rails.application.config.markdown_to_text_pipeline = HTML::Pipeline.new [ HTML::Pipeline::MarkdownFilter, HTML::Pipeline::InnerTextFilter, ] end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/backtrace_silencers.rb
config/initializers/backtrace_silencers.rb
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers!
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/mime_types.rb
config/initializers/mime_types.rb
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/initializers/disable_ar_logger_ignore_payload.rb
config/initializers/disable_ar_logger_ignore_payload.rb
ActiveSupport.on_load(:active_record) do ActiveRecord::LogSubscriber::IGNORE_PAYLOAD_NAMES.reject! { true } end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/environments/test.rb
config/environments/test.rb
require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Turn false under Spring and add config.action_view.cache_template_loading = true. config.cache_classes = true # Eager loading loads your whole application. When running a single test locally, # this probably isn't necessary. It's a good idea to do in a continuous integration # system, or in some way before deploying your code. config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}", } # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false config.cache_store = :null_store # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true config.middleware.use RackSessionAccess::Middleware end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/environments/development.rb
config/environments/development.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports. config.consider_all_requests_local = true # Enable server timing config.server_timing = true # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}", } else config.action_controller.perform_caching = false config.cache_store = :null_store end # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) config.log_level = :debug end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
cookpad/dmemo
https://github.com/cookpad/dmemo/blob/9cf312044a85c02280853d6ab95b82404dbfdeb5/config/environments/production.rb
config/environments/production.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.asset_host = "http://assets.example.com" # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # Include generic and useful information about system operation, but avoid logging too much # information to avoid inadvertent exposure of personally identifiable information (PII). config.log_level = :info # Prepend all log lines with the following tags. config.log_tags = [ :request_id ] # Use a different cache store in production. # config.cache_store = :mem_cache_store # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true # Don't log any deprecations. config.active_support.report_deprecations = false # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. # require "syslog/logger" # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false end
ruby
MIT
9cf312044a85c02280853d6ab95b82404dbfdeb5
2026-01-04T17:49:09.929348Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/gzr_spec.rb
spec/gzr_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe Gzr do it "has a version number" do expect(Gzr::VERSION).not_to be nil end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/spec_helper.rb
spec/spec_helper.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. require "bundler/setup" require "gzr" module Gzr class CLI Error = Class.new(StandardError) end end class HashResponse def initialize(doc) @doc = doc end def to_attrs @doc end def respond_to?(m, include_private = false) m = m.to_sym if m.instance_of? String @doc.respond_to?(m) || @doc.has_key?(m) end def method_missing(m, *args, &block) m = m.to_sym if m.instance_of? String if @doc.respond_to?(m) @doc.send(m, *args, &block) else @doc.fetch(m,nil) end end end RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! config.expect_with :rspec do |c| c.syntax = :expect end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/group_spec.rb
spec/integration/group_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr group` command", type: :cli do it "executes `group --help` command successfully" do output = `gzr group --help` expect(output).to eq <<-OUT Commands: gzr group help [COMMAND] # Describe subcommands or one specific subcommand gzr group ls # List the groups that are defined on this server gzr group member_groups GROUP_ID # List the groups that are members of the given group gzr group member_users GROUP_ID # List the users that are members of the given group OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/query_spec.rb
spec/integration/query_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr query` command", type: :cli do it "executes `gzr help query` command successfully" do output = `gzr help query` expected_output = <<-OUT Commands: gzr query help [COMMAND] # Describe subcommands or one specific subcommand gzr query runquery QUERY_DEF # Run query_id, query_slug, or json_query_desc OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan_spec.rb
spec/integration/plan_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan` command", type: :cli do it "executes `gzr help plan` command successfully" do output = `gzr help plan` expected_output = <<-OUT Commands: gzr plan cat PLAN_ID # Output the JSON representation of a scheduled plan to the screen or a file gzr plan disable PLAN_ID # Disable the specified plan gzr plan enable PLAN_ID # Enable the specified plan gzr plan failures # Report all plans that failed in their most recent run attempt gzr plan help [COMMAND] # Describe subcommands or one specific subcommand gzr plan import PLAN_FILE OBJ_TYPE OBJ_ID # Import a plan from a file gzr plan ls # List the scheduled plans on a server gzr plan randomize [PLAN_ID] # Randomize the scheduled plans on a server gzr plan rm PLAN_ID # Delete a scheduled plan gzr plan runit PLAN_ID # Execute a saved plan immediately OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/alert_spec.rb
spec/integration/alert_spec.rb
# The MIT License (MIT) # Copyright (c) 2024 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr alert` command", type: :cli do it "executes `gzr help alert` command successfully" do output = `gzr help alert` expected_output = <<-OUT Commands: gzr alert cat ALERT_ID # Output json information about an alert to screen or file gzr alert chown ALERT_ID OWNER_ID # Change the owner of the alert given by ALERT_ID to OWNER_ID gzr alert disable ALERT_ID REASON # Disable the alert given by ALERT_ID gzr alert enable ALERT_ID # Enable the alert given by ALERT_ID gzr alert follow ALERT_ID # Start following the alert given by ALERT_ID gzr alert help [COMMAND] # Describe subcommands or one specific subcommand gzr alert import FILE [DASHBOARD_ELEMENT_ID] # Import an alert from a file gzr alert ls # list alerts gzr alert notifications # Get notifications gzr alert randomize [ALERT_ID] # Randomize the scheduled alerts on a server gzr alert read NOTIFICATION_ID # Read notification id gzr alert rm ALERT_ID # Delete the alert given by ALERT_ID gzr alert threshold ALERT_ID THRESHOLD # Change the threshold of the alert given by ALERT_ID gzr alert unfollow ALERT_ID # Stop following the alert given by ALERT_ID OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/model_spec.rb
spec/integration/model_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr model` command", type: :cli do it "executes `model --help` command successfully" do output = `gzr model --help` expect(output).to match <<-OUT Commands: OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/role_spec.rb
spec/integration/role_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr role` command", type: :cli do it "executes `gzr help role` command successfully" do output = `gzr help role` expected_output = <<-OUT Commands: gzr role cat ROLE_ID # Output the JSON representation of a role to screen/file gzr role create ROLE_NAME PERMISSION_SET_ID MODEL_SET_ID # Create new role with the given permission and model sets gzr role group_add ROLE_ID GROUP_ID GROUP_ID GROUP_ID ... # Add indicated groups to role gzr role group_ls ROLE_ID # List the groups assigned to a role gzr role group_rm ROLE_ID GROUP_ID GROUP_ID GROUP_ID ... # Remove indicated groups from role gzr role help [COMMAND] # Describe subcommands or one specific subcommand gzr role ls # Display all roles gzr role rm ROLE_ID # Delete a role gzr role user_add ROLE_ID USER_ID USER_ID USER_ID ... # Add indicated users to role gzr role user_ls ROLE_ID # List the users assigned to a role gzr role user_rm ROLE_ID USER_ID USER_ID USER_ID ... # Remove indicated users from role OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/connection_spec.rb
spec/integration/connection_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr connection` command", type: :cli do it "executes `connection --help` command successfully" do output = `gzr connection --help` expect(output).to match <<-OUT Commands: OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/attribute_spec.rb
spec/integration/attribute_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr attribute` command", type: :cli do it "executes `gzr help attribute` command successfully" do output = `gzr help attribute` expected_output = <<-OUT Commands: gzr attribute cat ATTR_ID|ATTR_NAME # Output json information about an attribute to screen or file gzr attribute create ATTR_NAME [ATTR_LABEL] [OPTIONS] # Create or modify an attribute gzr attribute get_group_value GROUP_ID|GROUP_NAME ATTR_ID|ATTR_NAME # Retrieve a user attribute value for a group gzr attribute help [COMMAND] # Describe subcommands or one specific subcommand gzr attribute import FILE # Import a user attribute from a file gzr attribute ls # List all the defined user attributes gzr attribute rm ATTR_ID|ATTR_NAME # Delete a user attribute gzr attribute set_group_value GROUP_ID|GROUP_NAME ATTR_ID|ATTR_NAME VALUE # Set a user attribute value for a group OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/folder_spec.rb
spec/integration/folder_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr folder` command", type: :cli do it "executes `folder --help` command successfully" do output = `gzr folder --help` expect(output).to match <<-OUT Commands: OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/dashboard_spec.rb
spec/integration/dashboard_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr dashboard` command", type: :cli do it "executes `dashboard --help` command successfully" do output = `gzr dashboard --help` expect(output).to match <<-OUT Commands: OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/look_spec.rb
spec/integration/look_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr look` command", type: :cli do it "executes `look --help` command successfully" do output = `gzr look --help` expect(output).to match <<-OUT Commands: OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/permission_spec.rb
spec/integration/permission_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr permission` command", type: :cli do it "executes `gzr help permission` command successfully" do output = `gzr help permission` expected_output = <<-OUT Commands: gzr permission help [COMMAND] # Describe subcommands or one specific subcommand gzr permission ls # List all available permissions gzr permission set [SUBCOMMAND] # Commands pertaining to permission sets gzr permission set cat PERMISSION_SET_ID # Output json information about a permission set to screen or file gzr permission set help [COMMAND] # Describe subcommands or one specific subcommand gzr permission set import FILE # Import a permission set from a file gzr permission set ls # List the permission sets in this server. gzr permission set rm PERMISSION_SET_ID # Delete the permission_set given by PERMISSION_SET_ID gzr permission tree # List all available permissions in a tree OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/user_spec.rb
spec/integration/user_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr user` command", type: :cli do it "executes `user --help` command successfully" do output = `gzr user --help` expect(output).to match <<-OUT Commands: OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/query/runquery_spec.rb
spec/integration/query/runquery_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr query runquery` command", type: :cli do it "executes `gzr query help runquery` command successfully" do output = `gzr query help runquery` expected_output = <<-OUT Usage: gzr query runquery QUERY_DEF Options: -h, [--help], [--no-help] # Display usage information [--file=FILE] # Filename for saved data [--format=FORMAT] # One of json,json_detail,csv,txt,html,md,xlsx,sql,png,jpg # Default: json Run query_id, query_slug, or json_query_desc OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/user/delete_spec.rb
spec/integration/user/delete_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr user delete` command", type: :cli do it "executes `gzr user help delete` command successfully" do output = `gzr user help delete` expected_output = <<-OUT Usage: gzr user delete USER_ID Options: -h, [--help], [--no-help] # Display usage information Delete the user given by user_id OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/user/ls_spec.rb
spec/integration/user/ls_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr user ls` command", type: :cli do it "executes `user ls --help` command successfully" do output = `gzr user ls --help` expect(output).to eq <<-OUT Usage: gzr user ls Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: id,email,last_name,first_name,personal_folder_id,home_folder_id [--last-login], [--no-last-login] # Include the time of the most recent login [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 list all users OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/user/enable_spec.rb
spec/integration/user/enable_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr user enable` command", type: :cli do it "executes `gzr user help enable` command successfully" do output = `gzr user help enable` expected_output = <<-OUT Usage: gzr user enable USER_ID Options: -h, [--help], [--no-help] # Display usage information Enable the user given by user_id OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/user/disable_spec.rb
spec/integration/user/disable_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr user disable` command", type: :cli do it "executes `gzr user help disable` command successfully" do output = `gzr user help disable` expected_output = <<-OUT Usage: gzr user disable USER_ID Options: -h, [--help], [--no-help] # Display usage information Disable the user given by user_id OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/user/cat_spec.rb
spec/integration/user/cat_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr user cat` command", type: :cli do it "executes `gzr user help cat` command successfully" do output = `gzr user help cat` expected_output = <<-OUT Usage: gzr user cat USER_ID Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display [--dir=DIR] # Directory to store output file [--trim], [--no-trim] # Trim output to minimal set of fields for later import Output json information about a user to screen or file OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/user/me_spec.rb
spec/integration/user/me_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr user me` command", type: :cli do it "executes `user me --help` command successfully" do output = `gzr user me --help` expect(output).to eq <<-OUT Usage: gzr user me Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: id,email,last_name,first_name,personal_folder_id,home_folder_id [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 Show information for the current user OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/model/ls_spec.rb
spec/integration/model/ls_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr model ls` command", type: :cli do it "executes `model ls --help` command successfully" do output = `gzr model ls --help` expect(output).to eq <<-OUT Usage: gzr model ls Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: name,label,project_name [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 List the models in this server. OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/randomize_spec.rb
spec/integration/plan/randomize_spec.rb
# The MIT License (MIT) # Copyright (c) 2024 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan randomize` command", type: :cli do it "executes `gzr plan help randomize` command successfully" do output = `gzr plan help randomize` expected_output = <<-OUT Usage: gzr plan randomize [PLAN_ID] Options: -h, [--help], [--no-help] # Display usage information [--window=N] # Length of window # Default: 60 [--all], [--no-all] # Randomize all plans regardless of owner Randomize the scheduled plans on a server OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/import_spec.rb
spec/integration/plan/import_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan import` command", type: :cli do it "executes `gzr plan help import` command successfully" do output = `gzr plan help import` expected_output = <<-OUT Usage: gzr plan import PLAN_FILE OBJ_TYPE OBJ_ID Options: -h, [--help], [--no-help] # Display usage information [--plain], [--no-plain] # Provide minimal response information [--enable], [--no-enable] # Enable the plan on import [--disable], [--no-disable] # Disable the plan on import Import a plan from a file OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/ls_spec.rb
spec/integration/plan/ls_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan ls` command", type: :cli do it "executes `gzr plan help ls` command successfully" do output = `gzr plan help ls` expected_output = <<-OUT Usage: gzr plan ls Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: id,enabled,name,user(id,display_name),look_id,dashboard_id,lookml_dashboard_id,crontab [--disabled], [--no-disabled] # Retrieve disable plans [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 List the scheduled plans on a server OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/failures_spec.rb
spec/integration/plan/failures_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan failures` command", type: :cli do it "executes `gzr plan help failures` command successfully" do output = `gzr plan help failures` expected_output = <<-OUT Usage: gzr plan failures Options: -h, [--help], [--no-help] # Display usage information [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 Report all plans that failed in their most recent run attempt OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/run_spec.rb
spec/integration/plan/run_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan runit` command", type: :cli do it "executes `gzr plan help runit` command successfully" do output = `gzr plan help runit` expected_output = <<-OUT Usage: gzr plan runit PLAN_ID Options: -h, [--help], [--no-help] # Display usage information Execute a saved plan immediately OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/enable_spec.rb
spec/integration/plan/enable_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan enable` command", type: :cli do it "executes `gzr plan help enable` command successfully" do output = `gzr plan help enable` expected_output = <<-OUT Usage: gzr plan enable PLAN_ID Options: -h, [--help], [--no-help] # Display usage information Enable the specified plan OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/disable_spec.rb
spec/integration/plan/disable_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan disable` command", type: :cli do it "executes `gzr plan help disable` command successfully" do output = `gzr plan help disable` expected_output = <<-OUT Usage: gzr plan disable PLAN_ID Options: -h, [--help], [--no-help] # Display usage information Disable the specified plan OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/rm_spec.rb
spec/integration/plan/rm_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan rm` command", type: :cli do it "executes `gzr plan help rm` command successfully" do output = `gzr plan help rm` expected_output = <<-OUT Usage: gzr plan rm PLAN_ID Options: -h, [--help], [--no-help] # Display usage information Delete a scheduled plan OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/plan/cat_spec.rb
spec/integration/plan/cat_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr plan cat` command", type: :cli do it "executes `gzr plan help cat` command successfully" do output = `gzr plan help cat` expected_output = <<-OUT Usage: gzr plan cat PLAN_ID Options: -h, [--help], [--no-help] # Display usage information [--dir=DIR] # Directory to get output file Output the JSON representation of a scheduled plan to the screen or a file OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/connection/ls_spec.rb
spec/integration/connection/ls_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr connection ls` command", type: :cli do it "executes `connection ls --help` command successfully" do output = `gzr connection ls --help` expect(output).to eq <<-OUT Usage: gzr connection ls Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: name,dialect(name),host,port,database,schema [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 List all available connections OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/connection/dialects_spec.rb
spec/integration/connection/dialects_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr connection dialects` command", type: :cli do it "executes `connection dialects --help` command successfully" do output = `gzr connection dialects --help` expect(output).to eq <<-OUT Usage: gzr connection dialects Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: name,label [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 List all available dialects OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/group/member_users_spec.rb
spec/integration/group/member_users_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr group member_users` command", type: :cli do it "executes `group member_users --help` command successfully" do output = `gzr group member_users --help` expect(output).to eq <<-OUT Usage: gzr group member_users GROUP_ID Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: id,email,last_name,first_name,personal_folder_id,home_folder_id [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 List the users that are members of the given group OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/group/ls_spec.rb
spec/integration/group/ls_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr group ls` command", type: :cli do it "executes `group ls --help` command successfully" do output = `gzr group ls --help` expect(output).to eq <<-OUT Usage: gzr group ls Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: id,name,user_count,contains_current_user,externally_managed,external_group_id [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 List the groups that are defined on this server OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/group/member_groups_spec.rb
spec/integration/group/member_groups_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr group member_groups` command", type: :cli do it "executes `group member_groups --help` command successfully" do output = `gzr group member_groups --help` expect(output).to eq <<-OUT Usage: gzr group member_groups GROUP_ID Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: id,name,user_count,contains_current_user,externally_managed,external_group_id [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 List the groups that are members of the given group OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/alert/randomize_spec.rb
spec/integration/alert/randomize_spec.rb
# The MIT License (MIT) # Copyright (c) 2024 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr alert randomize` command", type: :cli do it "executes `gzr alert help randomize` command successfully" do output = `gzr alert help randomize` expected_output = <<-OUT Usage: gzr alert randomize [ALERT_ID] Options: -h, [--help], [--no-help] # Display usage information [--window=N] # Length of window # Default: 60 [--all], [--no-all] # Randomize all alerts regardless of owner Randomize the scheduled alerts on a server OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/dashboard/import_spec.rb
spec/integration/dashboard/import_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr dashboard import` command", type: :cli do it "executes `dashboard import --help` command successfully" do output = `gzr dashboard import --help` expect(output).to eq <<-OUT Usage: gzr dashboard import FILE DEST_FOLDER_ID Options: -h, [--help], [--no-help] # Display usage information [--plain], [--no-plain] # Provide minimal response information [--force] # Overwrite a dashboard with the same name/slug in the target folder Import a dashboard from a file OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/dashboard/mv_spec.rb
spec/integration/dashboard/mv_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr dashboard mv` command", type: :cli do it "executes `gzr dashboard help mv` command successfully" do output = `gzr dashboard help mv` expected_output = <<-OUT Usage: gzr dashboard mv DASHBOARD_ID TARGET_FOLDER_ID Options: -h, [--help], [--no-help] # Display usage information [--force] # Overwrite a dashboard with the same name in the target folder Move a dashboard to the given folder OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/dashboard/rm_spec.rb
spec/integration/dashboard/rm_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr dashboard rm` command", type: :cli do it "executes `dashboard rm --help` command successfully" do output = `gzr dashboard rm --help` expect(output).to eq <<-OUT Usage: gzr dashboard rm DASHBOARD_ID Options: -h, [--help], [--no-help] # Display usage information [--soft], [--no-soft] # Soft delete the dashboard [--restore], [--no-restore] # Restore a soft deleted dashboard Remove or delete the given dashboard OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/dashboard/cat_spec.rb
spec/integration/dashboard/cat_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr dashboard cat` command", type: :cli do it "executes `dashboard cat --help` command successfully" do output = `gzr dashboard cat --help` expect(output).to eq <<-OUT Usage: gzr dashboard cat DASHBOARD_ID Options: -h, [--help], [--no-help] # Display usage information [--dir=DIR] # Directory to store output file [--plans], [--no-plans] # Include scheduled plans [--transform=TRANSFORM] # Fully-qualified path to a JSON file describing the transformations to apply [--simple-filename], [--no-simple-filename] # Use simple filename for output (Dashboard_<id>.json) [--trim], [--no-trim] # Trim output to minimal set of fields for later import Output the JSON representation of a dashboard to the screen or a file OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/folder/export_spec.rb
spec/integration/folder/export_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr folder export` command", type: :cli do it "executes `folder export --help` command successfully" do output = `gzr folder export --help` expect(output).to eq <<-OUT Usage: gzr folder export FOLDER_ID Options: -h, [--help], [--no-help] # Display usage information [--plans], [--no-plans] # Include scheduled plans [--trim], [--no-trim] # Trim output to minimal set of fields for later import [--dir=DIR] # Directory to store output tree # Default: . [--tar=TAR] # Tar file to store output [--tgz=TGZ] # TarGZ file to store output [--zip=ZIP] # Zip file to store output Export a folder, including all child looks, dashboards, and folders. OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/folder/ls_spec.rb
spec/integration/folder/ls_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr folder ls` command", type: :cli do it "executes `folder ls --help` command successfully" do output = `gzr folder ls --help` expect(output).to eq <<-OUT Usage: gzr folder ls FILTER_SPEC Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: parent_id,id,name,looks(id,title),dashboards(id,title) [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 list the contents of a folder given by folder name, folder_id, ~ for the current user's default folder, or ~name / ~number for the home folder of a user OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/folder/top_spec.rb
spec/integration/folder/top_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr folder top` command", type: :cli do it "executes `folder top --help` command successfully" do output = `gzr folder top --help` expect(output).to eq <<-OUT Usage: gzr folder top Options: -h, [--help], [--no-help] # Display usage information [--fields=FIELDS] # Fields to display # Default: id,name,is_shared_root,is_users_root,is_embed_shared_root,is_embed_users_root [--plain], [--no-plain] # print without any extra formatting [--csv], [--no-csv] # output in csv format per RFC4180 Retrieve the top level (or root) folders OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/folder/create_spec.rb
spec/integration/folder/create_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr folder create` command", type: :cli do it "executes `folder create --help` command successfully" do output = `gzr folder create --help` expect(output).to eq <<-OUT Usage: gzr folder create NAME PARENT_FOLDER Options: -h, [--help], [--no-help] # Display usage information [--plain], [--no-plain] # Provide minimal response information Command description... OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/folder/tree_spec.rb
spec/integration/folder/tree_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr folder tree` command", type: :cli do it "executes `folder tree --help` command successfully" do output = `gzr folder tree --help` expect(output).to eq <<-OUT Usage: gzr folder tree STARTING_FOLDER Options: -h, [--help], [--no-help] # Display usage information Display the dashboards, looks, and subfolders of a folder in a tree format OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/folder/rm_spec.rb
spec/integration/folder/rm_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr folder rm` command", type: :cli do it "executes `folder rm --help` command successfully" do output = `gzr folder rm --help` expect(output).to eq <<-OUT Usage: gzr folder rm FOLDER_ID Options: -h, [--help], [--no-help] # Display usage information Delete a folder. The folder must be empty or the --force flag specified to deleted subfolders, dashboards, and looks. OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/folder/cat_spec.rb
spec/integration/folder/cat_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr folder cat` command", type: :cli do it "executes `folder cat --help` command successfully" do output = `gzr folder cat --help` expect(output).to eq <<-OUT Usage: gzr folder cat FOLDER_ID Options: -h, [--help], [--no-help] # Display usage information [--dir=DIR] # Directory to get output file Output the JSON representation of a folder to the screen or a file OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/look/import_spec.rb
spec/integration/look/import_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr look import` command", type: :cli do it "executes `look import --help` command successfully" do output = `gzr look import --help` expect(output).to eq <<-OUT Usage: gzr look import FILE DEST_FOLDER_ID Options: -h, [--help], [--no-help] # Display usage information [--plain], [--no-plain] # Provide minimal response information [--force] # Overwrite a look with the same name/slug in the target folder Import a look from a file OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/look/mv_spec.rb
spec/integration/look/mv_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr look mv` command", type: :cli do it "executes `gzr look help mv` command successfully" do output = `gzr look help mv` expected_output = <<-OUT Usage: gzr look mv LOOK_ID TARGET_FOLDER_ID Options: -h, [--help], [--no-help] # Display usage information [--force] # Overwrite a look with the same name in the target folder Move a look to the given folder OUT expect(output).to eq(expected_output) end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/look/rm_spec.rb
spec/integration/look/rm_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr look rm` command", type: :cli do it "executes `look rm --help` command successfully" do output = `gzr look rm --help` expect(output).to eq <<-OUT Usage: gzr look rm LOOK_ID Options: -h, [--help], [--no-help] # Display usage information [--soft], [--no-soft] # Soft delete the look [--restore], [--no-restore] # Restore a soft deleted look Delete look given by LOOK_ID OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/spec/integration/look/cat_spec.rb
spec/integration/look/cat_spec.rb
# The MIT License (MIT) # Copyright (c) 2018 Mike DeAngelo Looker Data Sciences, 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 # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. RSpec.describe "`gzr look cat` command", type: :cli do it "executes `look cat --help` command successfully" do output = `gzr look cat --help` expect(output).to eq <<-OUT Usage: gzr look cat LOOK_ID Options: -h, [--help], [--no-help] # Display usage information [--dir=DIR] # Directory to store output file [--plans], [--no-plans] # Include scheduled plans [--simple-filename], [--no-simple-filename] # Use simple filename for output (Look_<id>.json) [--trim], [--no-trim] # Trim output to minimal set of fields for later import Output the JSON representation of a look to the screen or a file OUT end end
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false