source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_stack_flags.rb | Ruby | apache-2.0 | 94 | main | 695 | # frozen_string_literal: true
def get_docker_stack_flags(args)
flags = []
flags << "--bundle-file '#{args['bundle_file']}'" if args['bundle_file'] && args['bundle_file'].to_s != 'undef'
if args['compose_files'] && args['compose_files'].to_s != 'undef'
args['compose_files'].each do |file|
flags << "--... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_plugin_enable_flags.rb | Ruby | apache-2.0 | 94 | main | 390 | # frozen_string_literal: true
def get_docker_plugin_enable_flags(args)
flags = []
flags << '--force' if args['force_remove'] == true
if args['plugin_alias'] && args['plugin_alias'].to_s != 'undef'
flags << "'#{args['plugin_alias']}'"
elsif args['plugin_name'] && args['plugin_name'].to_s != 'undef'
fla... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_run_flags.rb | Ruby | apache-2.0 | 94 | main | 2,337 | # frozen_string_literal: true
require 'shellwords'
def get_docker_run_flags(args)
flags = []
flags << "-u '#{args['username'].shellescape}'" if args['username']
flags << "-h '#{args['hostname'].shellescape}'" if args['hostname']
flags << "--restart '#{args['restart']}'" if args['restart']
flags << "--ne... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_defaults.rb | Ruby | apache-2.0 | 94 | main | 21,308 | # frozen_string_literal: true
def get_defaults(_facts)
bip = :undef
bridge = :undef
curl_ensure = true
default_gateway = :undef
default_gateway_ipv6 = :undef
dm_basesize = :un... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_plugin_install_flags.rb | Ruby | apache-2.0 | 94 | main | 659 | # frozen_string_literal: true
def get_docker_plugin_install_flags(args)
flags = []
flags << "--alias #{args['plugin_alias']}" if args['plugin_alias'] && args['plugin_alias'].to_s != 'undef'
flags << '--disable' if args['disable_on_install'] == true
flags << '--disable-content-trust' if args['disable_content_tr... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_values_init.rb | Ruby | apache-2.0 | 94 | main | 3,154 | # frozen_string_literal: true
def get_values_init(_params, _facts)
if _params['version'] == :undef || _params['version'] !~ %r{^(17[.][0-1][0-9][.][0-1](~|-|\.)ce|1.\d+)}
if _params['docker_ee']
package_location = _params['docker_ee_source_location']
package_key_source = _params['docker... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/windows_facts.rb | Ruby | apache-2.0 | 94 | main | 284 | # frozen_string_literal: true
def windows_facts
{
'docker_program_data_path' => 'C:/ProgramData',
'docker_program_files_path' => 'C:/Program Files',
'docker_systemroot' => 'C:/Windows',
'docker_user_temp_path' => 'C:/Users/Administrator/AppData/Local/Temp'
}
end |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_exec_flags.rb | Ruby | apache-2.0 | 94 | main | 372 | # frozen_string_literal: true
def get_docker_exec_flags(args)
flags = []
flags << '--detach=true' if args['detach']
flags << '--interactive=true' if args['interactive']
flags << '--tty=true' if args['tty']
unless args['env'].empty?
args['env'].each do |namevaluepair|
flags << "--env #{namevalue... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_params_changed.rb | Ruby | apache-2.0 | 94 | main | 6,657 | # frozen_string_literal: true
def get_docker_params_changed(opts)
require 'open3'
require 'json'
return_value = 'No changes detected'
if opts['sanitised_title'] && opts['osfamily']
stdout, _stderr, status = Open3.capture3("docker inspect #{opts['sanitised_title']}")
if status.to_s.include?('exit 0')
... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_secrets_flags.rb | Ruby | apache-2.0 | 94 | main | 690 | # frozen_string_literal: true
require 'shellwords'
def get_docker_secrets_flags(args)
flags = []
flags << 'create' if args['ensure'].to_s == 'present'
flags << "'#{args['secret_name']}'" if args['secret_name'] && args['secret_name'].to_s != 'undef'
flags << "'#{args['secret_path']}'" if args['secret_path']... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_swarm_init_flags.rb | Ruby | apache-2.0 | 94 | main | 1,550 | # frozen_string_literal: true
def get_docker_swarm_init_flags(args)
flags = []
flags << 'init' if args['init'].to_s != 'false'
flags << "--advertise-addr '#{args['advertise_addr']}'" if args['advertise_addr'] && args['advertise_addr'].to_s != 'undef'
flags << '--autolock' if args['autolock'].to_s != 'false'... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/helper/get_docker_service_flags.rb | Ruby | apache-2.0 | 94 | main | 2,075 | # frozen_string_literal: true
require 'shellwords'
def get_docker_service_flags(args)
flags = []
flags << "'#{args['service_name']}'" if args['service_name'] && args['service_name'].to_s != 'undef'
flags << '--detach' if args['detach'].to_s != 'false'
if args['env'].is_a? Array
args['env'].each do |env... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/unit/lib/facter/docker_spec.rb | Ruby | apache-2.0 | 94 | main | 7,854 | # frozen_string_literal: true
require 'spec_helper'
require 'json'
describe 'Facter::Util::Fact' do
let(:docker_command) do
if Facter.value(:kernel) == 'windows'
'powershell -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -c docker'
else
'docker'
end
end
before :each do
F... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/unit/lib/puppet/provider/docker_network_spec.rb | Ruby | apache-2.0 | 94 | main | 1,025 | # frozen_string_literal: true
require 'spec_helper'
describe Puppet::Type.type(:docker_network).provider(:ruby) do
let(:provider) { resource.provider }
let(:instance) { provider.class.instances.first }
let(:resource) do
Puppet::Type.type(:docker_network).new(
ensure: :present,
name: 'test-networ... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/unit/lib/puppet/provider/docker_compose/ruby_spec.rb | Ruby | apache-2.0 | 94 | main | 1,454 | # frozen_string_literal: true
require 'spec_helper'
describe Puppet::Type.type(:docker_compose).provider(:ruby) do
let(:resource) do
Puppet::Type.type(:docker_compose).new(
name: 'test_project',
compose_files: ['/tmp/docker-compose.yml'],
provider: :ruby,
)
end
let(:provider) { resour... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/unit/lib/puppet/parser/functions/docker_run_flags_spec.rb | Ruby | apache-2.0 | 94 | main | 1,093 | # frozen_string_literal: true
require 'spec_helper'
describe 'the "docker_run_flags" parser function' do
before :each do
Puppet[:modulepath] = 'spec/fixtures/modules'
end
let :scope do
node = Puppet::Node.new('localhost')
compiler = Puppet::Parser::Compiler.new(node)
scope = Puppet::Pars... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/unit/lib/puppet/type/docker_stack_spec.rb | Ruby | apache-2.0 | 94 | main | 632 | # frozen_string_literal: true
require 'spec_helper'
stack = Puppet::Type.type(:docker_stack)
describe stack do
let :params do
[
:name,
:provider,
:up_args,
]
end
let :properties do
[
:ensure,
]
end
it 'has expected properties' do
properties.each do |property|
... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/unit/lib/puppet/type/docker_network_spec.rb | Ruby | apache-2.0 | 94 | main | 681 | # frozen_string_literal: true
require 'spec_helper'
network = Puppet::Type.type(:docker_network)
describe network do
let :params do
[
:name,
:provider,
:subnet,
:gateway,
:ip_range,
:aux_address,
:options,
:additional_flags,
]
end
let :properties do
... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/unit/lib/puppet/type/docker_volume_spec.rb | Ruby | apache-2.0 | 94 | main | 556 | # frozen_string_literal: true
require 'spec_helper'
volume = Puppet::Type.type(:docker_volume)
describe volume do
let :params do
[
:name,
:provider,
:options,
]
end
let :properties do
[
:driver,
:mountpoint,
]
end
it 'has expected properties' do
propertie... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | spec/unit/lib/puppet/type/docker_compose_spec.rb | Ruby | apache-2.0 | 94 | main | 969 | # frozen_string_literal: true
require 'spec_helper'
compose = Puppet::Type.type(:docker_compose)
describe compose do
let :params do
[
:name,
:provider,
:scale,
:options,
:up_args,
]
end
let :properties do
[
:ensure,
]
end
it 'has expected properties' do... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/facter/docker.rb | Ruby | apache-2.0 | 94 | main | 4,317 | # frozen_string_literal: true
require 'facter'
require 'json'
Facter.add(:docker_systemroot) do
confine osfamily: :windows
setcode do
Puppet::Util.get_env('SystemRoot')
end
end
Facter.add(:docker_program_files_path) do
confine osfamily: :windows
setcode do
Puppet::Util.get_env('ProgramFiles')
end... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/type/docker_network.rb | Ruby | apache-2.0 | 94 | main | 1,186 | # frozen_string_literal: true
Puppet::Type.newtype(:docker_network) do
@doc = 'Type representing a Docker network'
ensurable
newparam(:name) do
isnamevar
desc 'The name of the network'
end
newproperty(:driver) do
desc 'The network driver used by the network'
end
newparam(:subnet, array_mat... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/type/docker_volume.rb | Ruby | apache-2.0 | 94 | main | 597 | # frozen_string_literal: true
Puppet::Type.newtype(:docker_volume) do
@doc = 'A type representing a Docker volume'
ensurable
newparam(:name) do
isnamevar
desc 'The name of the volume'
end
newproperty(:driver) do
desc 'The volume driver used by the volume'
end
newparam(:options) do
desc... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/type/docker_stack.rb | Ruby | apache-2.0 | 94 | main | 825 | # frozen_string_literal: true
Puppet::Type.newtype(:docker_stack) do
@doc = 'A type representing a Docker Stack'
ensurable
newparam(:bundle_file) do
desc 'Path to a Distributed Application Bundle file.'
validate do |value|
raise _('bundle files should be a string') unless value.is_a? String
e... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/type/docker_compose.rb | Ruby | apache-2.0 | 94 | main | 1,867 | # frozen_string_literal: true
Puppet::Type.newtype(:docker_compose) do
@doc = 'A type representing a Docker Compose file'
ensurable
def refresh
provider.restart
end
newparam(:scale) do
desc 'A hash of compose services and number of containers.'
validate do |value|
raise _('scale should b... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/provider/docker_volume/ruby.rb | Ruby | apache-2.0 | 94 | main | 1,559 | # frozen_string_literal: true
require 'json'
Puppet::Type.type(:docker_volume).provide(:ruby) do
desc 'Support for Docker Volumes'
mk_resource_methods
has_command(:docker, 'docker')
def volume_conf
flags = ['volume', 'create']
multi_flags = ->(values, format) {
filtered = [values].flatten.com... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/provider/docker_network/ruby.rb | Ruby | apache-2.0 | 94 | main | 2,670 | # frozen_string_literal: true
require 'json'
Puppet::Type.type(:docker_network).provide(:ruby) do
desc 'Support for Docker Networking'
mk_resource_methods
has_command(:docker, 'docker')
def network_conf
flags = ['network', 'create']
multi_flags = ->(values, format) {
filtered = [values].flatt... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/provider/docker_compose/ruby.rb | Ruby | apache-2.0 | 94 | main | 4,144 | # frozen_string_literal: true
require 'deep_merge'
Puppet::Type.type(:docker_compose).provide(:ruby) do
desc 'Support for Puppet running Docker Compose'
mk_resource_methods
has_command(:docker, 'docker')
def set_tmpdir
return unless resource[:tmpdir]
# Check if the the tmpdir target exists
Pup... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/provider/docker_stack/ruby.rb | Ruby | apache-2.0 | 94 | main | 2,874 | # frozen_string_literal: true
require 'deep_merge'
Puppet::Type.type(:docker_stack).provide(:ruby) do
desc 'Support for Puppet running Docker Stacks'
mk_resource_methods
has_command(:docker, 'docker')
def exists?
Puppet.info("Checking for stack #{name}")
stack_services = {}
stack_containers = [... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_stack_flags.rb | Ruby | apache-2.0 | 94 | main | 915 | # frozen_string_literal: true
require 'shellwords'
#
# docker_stack_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker stack flags
newfunction(:docker_stack_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << "--bundle-file '#{opts['bundle_file... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_service_flags.rb | Ruby | apache-2.0 | 94 | main | 2,366 | # frozen_string_literal: true
require 'shellwords'
#
# docker_service_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker swarm init flags
newfunction(:docker_service_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << "'#{opts['service_name']}'... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_swarm_join_flags.rb | Ruby | apache-2.0 | 94 | main | 719 | # frozen_string_literal: true
require 'shellwords'
#
# docker_swarm_join_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker swarm init flags
newfunction(:docker_swarm_join_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << 'join' if opts['join... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_secrets_flags.rb | Ruby | apache-2.0 | 94 | main | 905 | # frozen_string_literal: true
require 'shellwords'
#
# docker_secrets_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker swarm init flags
newfunction(:docker_secrets_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << 'create' if opts['ensure']... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_plugin_install_flags.rb | Ruby | apache-2.0 | 94 | main | 897 | # frozen_string_literal: true
require 'shellwords'
#
# docker_plugin_install_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker plugin install flags
newfunction(:docker_plugin_install_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << "--alias ... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_swarm_init_flags.rb | Ruby | apache-2.0 | 94 | main | 1,794 | # frozen_string_literal: true
require 'shellwords'
#
# docker_swarm_init_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker swarm init flags
newfunction(:docker_swarm_init_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << 'init' if opts['init... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_plugin_enable_flags.rb | Ruby | apache-2.0 | 94 | main | 618 | # frozen_string_literal: true
require 'shellwords'
#
# docker_plugin_remove_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker plugin remove flags
newfunction(:docker_plugin_enable_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << '--force' if... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_run_flags.rb | Ruby | apache-2.0 | 94 | main | 3,182 | # frozen_string_literal: true
#
# docker_run_flags.rb
#
module Puppet::Parser::Functions
newfunction(:'docker::escape', type: :rvalue) do |args|
subject = args[0]
escape_function = if self['facts'] && self['facts']['os']['family'] == 'windows'
'stdlib::powershell_escape'
... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_exec_flags.rb | Ruby | apache-2.0 | 94 | main | 545 | # frozen_string_literal: true
require 'shellwords'
#
# docker_exec_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker exec flags
newfunction(:docker_exec_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << '--detach=true' if opts['detach']
... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/parser/functions/docker_plugin_remove_flags.rb | Ruby | apache-2.0 | 94 | main | 490 | # frozen_string_literal: true
require 'shellwords'
#
# docker_plugin_remove_flags.rb
#
module Puppet::Parser::Functions
# Transforms a hash into a string of docker plugin remove flags
newfunction(:docker_plugin_remove_flags, type: :rvalue) do |args|
opts = args[0] || {}
flags = []
flags << '--force' if... |
github | puppetlabs/puppetlabs-docker | https://github.com/puppetlabs/puppetlabs-docker | lib/puppet/functions/docker_params_changed.rb | Ruby | apache-2.0 | 94 | main | 7,035 | # frozen_string_literal: true
Puppet::Functions.create_function(:docker_params_changed) do
dispatch :detect_changes do
param 'Hash', :opts
return_type 'String'
end
def run_with_powershell(cmd)
"powershell.exe -Command \"& {#{cmd}}\" "
end
def remove_cidfile(cidfile, osfamily)
delete_command... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | Rakefile | Ruby | mit | 94 | master | 581 | # encoding: UTF-8
require 'rubygems'
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
load 'rails/tasks/engine.rake'
Bundler::GemHelper.install_tasks
Dir[File.join(Fi... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | rails-settings-ui.gemspec | Ruby | mit | 94 | master | 1,234 | require File.expand_path('../lib/rails-settings-ui/version', __FILE__)
Gem::Specification.new do |s|
s.name = 'rails-settings-ui'
s.author = 'Andrey Morskov'
s.email = 'accessd0@gmail.com'
s.homepage = 'https://github.com/accessd/rails-settings-ui'
s.license = 'MIT'
s.summary = 'User interface for manage ... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/spec_helper.rb | Ruby | mit | 94 | master | 1,242 | ENV['RAILS_ENV'] ||= 'test'
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'rspec/rails'
require 'rails-controller-testing'
require 'capybara/rails'
require 'capybara/rspec'
require 'pry'
require "simplecov"
SimpleCov.start
load "#{Rails.root.to_s}/db/schema.rb" # set up memory db
Rail... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/requests/settings_requests_spec.rb | Ruby | mit | 94 | master | 597 | describe 'Settings requests', type: :request do
describe 'layout' do
it 'use default application layout' do
get '/settings'
expect(response).to be_successful
expect(response).to render_template(layout: 'application')
end
it 'use custom layout' do
change_layout('admin')
get '... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/features/settings_spec.rb | Ruby | mit | 94 | master | 6,003 | describe "Settings interface", type: :feature do
before do
visit_settings_page
end
after do
RailsSettingsUi.settings_displayed_as_select_tag = []
RailsSettingsUi.ignored_settings = []
RailsSettingsUi.defaults_for_settings = {}
end
describe "display settings correctly for" do
it "string" ... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/dummy/config/application.rb | Ruby | mit | 94 | master | 1,181 | require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
# require "active_record/railtie"
# require "action_controller/railtie"
# require "action_mailer/railtie"
# require "sprockets/railtie"
# Workaround for Rails 6 requiring Logger before ActiveSupport modules
require 'logger'
require 'rails/a... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/dummy/config/initializers/secret_token.rb | Ruby | mit | 94 | master | 659 | # Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to diction... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/dummy/config/environments/development.rb | Ruby | mit | 94 | master | 1,115 | Dummy::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 on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web ser... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/dummy/config/environments/test.rb | Ruby | mit | 94 | master | 1,800 | Dummy::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# 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 sui... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/dummy/db/schema.rb | Ruby | mit | 94 | master | 1,205 | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/dummy/db/migrate/20140320182332_create_settings.rb | Ruby | mit | 94 | master | 430 | class CreateSettings < ActiveRecord::Migration
def self.up
create_table :settings do |t|
t.string :var, :null => false
t.text :value, :null => true
t.integer :thing_id, :null => true
t.string :thing_type, :limit => 30, :null => true
t.timestamps
end
add_index :settings... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/dummy/app/models/settings.rb | Ruby | mit | 94 | master | 1,223 | class Settings < RailsSettings::Base
cache_prefix { "v1" }
field :project_name, type: :string, default: "Dummy"
scope :limits do
field :limit, type: :integer, default: 150
end
field :angle, type: :float, default: 0.5
field :style, type: :hash, default: {
border_color: 'e0e0e0',
block_color: 'ff... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/type_converter_spec.rb | Ruby | mit | 94 | master | 1,403 | require 'spec_helper'
describe RailsSettingsUi::TypeConverter do
describe "default setting value type unknown" do
it "should raise exception" do
defined_fields = RailsSettingsUi.settings_klass.public_send(:all).defined_fields
RailsSettingsUi.settings_klass.instance_variable_set(:@defined_fields, [])
... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/array_spec.rb | Ruby | mit | 94 | master | 766 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::Array do
describe "#cast" do
it "should cast hash as array of keys as symbols" do
array_type = RailsSettingsUi::ValueTypes::Array.new({auto: "on", manual: "on"})
expect(array_type.cast).to eq([:auto, :manual])
end
it "if setting pre... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/fixnum_spec.rb | Ruby | mit | 94 | master | 453 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::Fixnum do
describe "#cast" do
it "should cast to integer" do
fixnum_type = RailsSettingsUi::ValueTypes::Fixnum.new("29")
expect(fixnum_type.cast).to eq(29)
end
end
describe "if value not numeric" do
it "should be not valid" do
... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/duration_spec.rb | Ruby | mit | 94 | master | 583 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::Duration do
describe "#cast" do
it "should cast string to duration" do
param = "#{5.hours}"
fixnum_type = RailsSettingsUi::ValueTypes::Duration.new(param)
expect(fixnum_type.cast).to eq(5.hours)
expect(fixnum_type.cast).to be_ins... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/symbol_spec.rb | Ruby | mit | 94 | master | 257 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::Symbol do
describe "#cast" do
it "should cast to symbol" do
boolean_type = RailsSettingsUi::ValueTypes::Symbol.new("foo")
expect(boolean_type.cast).to eq(:foo)
end
end
end |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/base_spec.rb | Ruby | mit | 94 | master | 695 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::Base do
describe "if value have any errors" do
it "should not be valid" do
base_type = RailsSettingsUi::ValueTypes::Base.new("test")
base_type.errors << "Invalid"
expect(base_type.valid?).to be_falsey
end
end
describe "#value_... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/float_spec.rb | Ruby | mit | 94 | master | 454 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::Float do
describe "#cast" do
it "should cast to float" do
fixnum_type = RailsSettingsUi::ValueTypes::Float.new("99.21")
expect(fixnum_type.cast).to eq(99.21)
end
end
describe "if value not numeric" do
it "should be not valid" do... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/string_spec.rb | Ruby | mit | 94 | master | 258 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::String do
describe "#cast" do
it "should cast to string" do
boolean_type = RailsSettingsUi::ValueTypes::String.new("foo")
expect(boolean_type.cast).to eq("foo")
end
end
end |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/boolean_spec.rb | Ruby | mit | 94 | master | 256 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::Boolean do
describe "#cast" do
it "should cast to true" do
boolean_type = RailsSettingsUi::ValueTypes::Boolean.new("on")
expect(boolean_type.cast).to eq(true)
end
end
end |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | spec/lib/rails-settings-ui/value_types/hash_spec.rb | Ruby | mit | 94 | master | 844 | require 'spec_helper'
describe RailsSettingsUi::ValueTypes::Hash do
describe "#cast" do
it "should cast string to hash" do
param = "{\"border_color\"=>\"e0e0e0\", \"block_color\"=>\"ffffff\", \"title\"=>{\"font\"=>\"Tahoma\", \"size\"=>\"12\", \"color\"=>\"107821\"}}"
fixnum_type = RailsSettingsUi::V... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | app/controllers/rails_settings_ui/settings_controller.rb | Ruby | mit | 94 | master | 1,355 | class RailsSettingsUi::SettingsController < RailsSettingsUi::ApplicationController
include RailsSettingsUi::SettingsHelper
before_action :collection
before_action :cast_settings_params, only: :update_all
def index
end
def update_all
if @casted_settings[:errors].any?
@errors = @casted_settings[:e... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | app/helpers/rails_settings_ui/settings_helper.rb | Ruby | mit | 94 | master | 3,815 | module RailsSettingsUi::SettingsHelper
def setting_field(setting_name, setting_value)
if !RailsSettingsUi.default_settings.has_key?(setting_name.to_sym)
message_for_default_value_missing
elsif RailsSettingsUi.settings_displayed_as_select_tag.include?(setting_name.to_sym)
select_tag_field(setting_n... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | config/initializers/rails_settings_ui.rb | Ruby | mit | 94 | master | 613 | require 'rails-settings-ui'
#= Application-specific
#
# # You can specify a controller for RailsSettingsUi::ApplicationController to inherit from:
# RailsSettingsUi.parent_controller = 'Admin::ApplicationController' # default: '::ApplicationController'
#
# # Render RailsSettingsUi inside a custom layout (set to 'appli... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui.rb | Ruby | mit | 94 | master | 2,089 | # encoding: utf-8
require 'rails-settings-ui/engine'
require 'rails-settings-ui/route_delegator'
require 'rails-settings-ui/version'
require "rails-settings-ui/type_converter"
module RailsSettingsUi
mattr_accessor :parent_controller
self.parent_controller = '::ApplicationController'
# Settings not displayed in... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/type_converter.rb | Ruby | mit | 94 | master | 2,945 | require_relative "value_types/string"
require_relative "value_types/symbol"
require_relative "value_types/fixnum"
require_relative "value_types/hash"
require_relative "value_types/duration"
require_relative "value_types/float"
require_relative "value_types/array"
require_relative "value_types/boolean"
module RailsSett... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/settings_form_validator.rb | Ruby | mit | 94 | master | 1,550 | require 'i18n'
require 'dry-validation'
module RailsSettingsUi
module CustomPredicates
include Dry::Logic::Predicates
predicate(:form_hash?) do |value|
begin
JSON.parse(value.gsub(/\=\>/, ':'))
rescue JSON::ParserError
false
end
end
end
class SettingsSchema < Dry::... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/engine.rb | Ruby | mit | 94 | master | 242 | module ::RailsSettingsUi
class Engine < Rails::Engine
isolate_namespace RailsSettingsUi
config.generators do |g|
g.test_framework :rspec, fixture: false
g.assets false
g.helper false
end
end
end |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/route_delegator.rb | Ruby | mit | 94 | master | 481 | module RailsSettingsUi::RouteDelegator
# delegate url helpers to another engine
def method_missing(method, *args, &block)
if engine_route_method?(method)
send(RailsSettingsUi.engine_name).send(method, *args)
else
super
end
end
def respond_to?(method)
super || engine_route_method?(me... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/settings_form_coercible.rb | Ruby | mit | 94 | master | 2,569 | require 'dry-types'
module RailsSettingsUi
module Types
include Dry::Types.module
module CustomCoercions
class Symbol
def self.[](value)
value.to_sym
end
end
class Hash
def self.[](value)
JSON.parse(value.gsub(/\=\>/, ':'))
end
en... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/value_types/array.rb | Ruby | mit | 94 | master | 529 | require_relative "base"
module RailsSettingsUi
module ValueTypes
class Array < RailsSettingsUi::ValueTypes::Base
def cast
# Array presented in checkboxes
if ["Hash", "ActiveSupport::HashWithIndifferentAccess"].include?(value.class.name)
value.keys.map!(&:to_sym)
elsif valu... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/value_types/boolean.rb | Ruby | mit | 94 | master | 285 | require_relative "base"
module RailsSettingsUi
module ValueTypes
class Boolean < RailsSettingsUi::ValueTypes::Base
def cast
case value
when 'off'
self.value = false
else
self.value = true
end
end
end
end
end |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/value_types/duration.rb | Ruby | mit | 94 | master | 343 | require_relative "base"
module RailsSettingsUi
module ValueTypes
class Duration < RailsSettingsUi::ValueTypes::Base
def cast
value.to_f.seconds
end
def validate
unless value_numeric?
self.errors << I18n.t('errors.invalid_numeric', default: 'Invalid')
end
... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/value_types/fixnum.rb | Ruby | mit | 94 | master | 333 | require_relative "base"
module RailsSettingsUi
module ValueTypes
class Fixnum < RailsSettingsUi::ValueTypes::Base
def cast
value.to_i
end
def validate
unless value_numeric?
self.errors << I18n.t('errors.invalid_numeric', default: 'Invalid')
end
end
e... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/value_types/float.rb | Ruby | mit | 94 | master | 332 | require_relative "base"
module RailsSettingsUi
module ValueTypes
class Float < RailsSettingsUi::ValueTypes::Base
def cast
value.to_f
end
def validate
unless value_numeric?
self.errors << I18n.t('errors.invalid_numeric', default: 'Invalid')
end
end
en... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/value_types/hash.rb | Ruby | mit | 94 | master | 404 | require_relative "base"
module RailsSettingsUi
module ValueTypes
class Hash < RailsSettingsUi::ValueTypes::Base
def cast
value
end
def validate
begin
self.value = JSON.parse(value.gsub(/\=\>/, ':'))
rescue JSON::ParserError => e
self.errors << I18n.t... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/rails-settings-ui/value_types/base.rb | Ruby | mit | 94 | master | 468 | module RailsSettingsUi
module ValueTypes
class Base
attr_accessor :value, :errors
def initialize(value)
self.value = value
self.errors = []
validate
end
def cast
raise NotImplementedError
end
def valid?
!errors.any?
end
de... |
github | accessd/rails-settings-ui | https://github.com/accessd/rails-settings-ui | lib/generators/rails_settings_ui/install_generator.rb | Ruby | mit | 94 | master | 645 | module RailsSettingsUi
module Generators
class InstallGenerator < Rails::Generators::Base
desc "creates an initializer file at config/initializers/rails_settings_ui.rb and adds route to config/routes.rb"
source_root File.expand_path('../../../..', __FILE__)
def generate_initialization
c... |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | rspec-rerun.gemspec | Ruby | mit | 94 | master | 606 | require './lib/rspec-rerun/version'
Gem::Specification.new do |s|
s.name = 'rspec-rerun'
s.version = RSpec::Rerun::VERSION
s.authors = ['Daniel Doubrovkine']
s.summary = 'Re-run failed RSpec tests.'
s.email = 'dblock@dblock.org'
s.homepage = 'https://github.com/dblock/rspec-rerun'
s.license = 'MIT'
s.f... |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | Rakefile | Ruby | mit | 94 | master | 229 | require 'bundler/setup'
require 'bundler/gem_tasks'
require 'rspec-rerun/tasks'
require 'bump/tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
RuboCop::RakeTask.new
task default: [:rubocop, 'rspec-rerun:spec'] |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | spec/spec_helper.rb | Ruby | mit | 94 | master | 502 | require 'bundler/setup'
require 'tmpdir'
RSpec.configure do |config|
config.include(Module.new do
def silence_stream(stream)
old_stream = stream.dup
stream.reopen('/dev/null')
stream.sync = true
yield
ensure
stream.reopen(old_stream)
end
def system!(cmd)
fail "fai... |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | spec/rspec-rerun/formatter_spec.rb | Ruby | mit | 94 | master | 1,782 | require 'spec_helper'
require 'stringio'
require 'rspec-rerun/formatter'
describe RSpec::Rerun::Formatter do
let(:output) { StringIO.new }
let(:formatter) { RSpec::Rerun::Formatter.new(output) }
let(:example) { double('example', location: 'some/path.rb') }
let(:examples_notification) { double('examples_notific... |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | spec/rspec-rerun/tasks/rspec_task_spec.rb | Ruby | mit | 94 | master | 4,794 | require 'spec_helper'
describe 'RakeTask' do
let(:root) { Bundler.root }
before :each do
@filename = File.join(root, 'fail_once.state')
File.write @filename, 'fail'
end
around :each do |example|
silence_stream STDOUT do
Dir.mktmpdir do |dir|
ENV['HOME'] = dir
example.run
... |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | lib/rspec-rerun/formatter.rb | Ruby | mit | 94 | master | 820 | require 'rspec/core'
require 'rspec/core/formatters'
module RSpec
module Rerun
class Formatter
::RSpec::Core::Formatters.register self, :dump_failures
FILENAME = 'rspec.failures'
def initialize(_); end
def dump_failures(notification)
if notification.failed_examples.empty?
... |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | lib/rspec-rerun/tasks.rb | Ruby | mit | 94 | master | 3,830 | require 'rspec/core/rake_task'
require 'rspec-rerun/formatter'
module RSpec
module Rerun
module Tasks
class << self
def rspec_options(args, spec_files = nil)
options = [
spec_files,
'--require', 'rspec-rerun/formatter',
'--format', 'RSpec::Rerun::Format... |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | spec-runs/fails_twice_spec.rb | Ruby | mit | 94 | master | 475 | require 'spec_helper'
describe 'Fails' do
it 'twice' do
filename_once = ENV['RSPEC_RERUN_MARKER']
filename_twice = File.join(File.dirname(filename_once), 'fail_twice.state')
if File.exist? filename_once
File.delete filename_once
File.open filename_twice, 'w' do |f|
f.write 'fail'
... |
github | dblock/rspec-rerun | https://github.com/dblock/rspec-rerun | spec-runs/fails_once_spec.rb | Ruby | mit | 94 | master | 222 | require 'spec_helper'
describe 'Fails' do
it 'once' do
filename = ENV['RSPEC_RERUN_MARKER']
if File.exist? filename
File.delete filename
fail
else
expect(true).to eq true
end
end
end |
github | tdi/vagrant-docker-swarm | https://github.com/tdi/vagrant-docker-swarm | Vagrantfile | Ruby | mit | 94 | master | 3,486 | # -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
auto = ENV['AUTO_START_SWARM'] || false
# Increas... |
github | lmmendes/game-boy-opcodes | https://github.com/lmmendes/game-boy-opcodes | bin/json2html.rb | Ruby | mit | 93 | master | 5,468 | #!/usr/bin/env ruby
# encoding: utf-8
require 'bundler'
Bundler.require(:default)
require 'json'
COLOR_GROUP_TABLE = {
"#ccccff" => { short: "x8/lsm", description: '8-bit Load/Store/Move'},
"#ccffcc" => { short: "x16/lsm", description: '16-bit Load/Store/Move' },
"#ffff99" => { short: "x8/alu", description: '8... |
github | lmmendes/game-boy-opcodes | https://github.com/lmmendes/game-boy-opcodes | bin/opcodes.rb | Ruby | mit | 93 | master | 2,438 | #!/usr/bin/env ruby
require 'bundler'
Bundler.require(:default)
require 'open-uri'
require 'json'
require 'ostruct'
unless File.exist?('opcodes.html')
html = URI.open('https://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html')
File.open('opcodes.html', 'w') do |f|
f.write html.read.force_encoding('UTF-8')... |
github | benignware/schedulable | https://github.com/benignware/schedulable | Gemfile | Ruby | mit | 93 | master | 871 | source "https://rubygems.org"
# Declare your gem's dependencies in schedulable.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec
# Declare any dependencies that are still in development here instead of ... |
github | benignware/schedulable | https://github.com/benignware/schedulable | schedulable.gemspec | Ruby | mit | 93 | master | 666 | $:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "schedulable/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "schedulable"
s.version = Schedulable::VERSION
s.authors = ["Rafael Nowrotek"]
s.email = ["mai... |
github | benignware/schedulable | https://github.com/benignware/schedulable | Rakefile | Ruby | mit | 93 | master | 677 | begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
require 'rdoc/task'
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Schedulable'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
... |
github | benignware/schedulable | https://github.com/benignware/schedulable | test/schedulable_test.rb | Ruby | mit | 93 | master | 307 | require 'test_helper'
require 'database_cleaner'
class SchedulableTest < ActiveSupport::TestCase
puts "HELLO"
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.start
event = FactoryGirl.create(:event)
puts event.name
test "truth" do
assert_kind_of Module, Schedulable
end
end |
github | benignware/schedulable | https://github.com/benignware/schedulable | test/factories.rb | Ruby | mit | 93 | master | 235 | FactoryGirl.define do
factory :schedule do
rule 'weekly'
day ['monday']
time Time.now + 1.hour
count 10
self.until DateTime.now + 3.months
end
factory :event do
name "My Event"
schedule
end
end |
github | benignware/schedulable | https://github.com/benignware/schedulable | test/test_helper.rb | Ruby | mit | 93 | master | 605 | # Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'factory_girl'
require "rails/test_help"
FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
FactoryGirl.find_definitions
Rails.backtrace_cleaner.remov... |
github | benignware/schedulable | https://github.com/benignware/schedulable | test/dummy/db/schema.rb | Ruby | mit | 93 | master | 1,722 | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... |
github | benignware/schedulable | https://github.com/benignware/schedulable | test/dummy/db/migrate/20150408191241_create_event_occurrences.rb | Ruby | mit | 93 | master | 248 | class CreateEventOccurrences < ActiveRecord::Migration
def change
create_table :event_occurrences do |t|
t.datetime :date
t.references :schedulable, polymorphic: true, index: true
t.timestamps null: false
end
end
end |
github | benignware/schedulable | https://github.com/benignware/schedulable | test/dummy/db/migrate/20150402115511_create_schedules.rb | Ruby | mit | 93 | master | 443 | class CreateSchedules < ActiveRecord::Migration
def self.up
create_table :schedules do |t|
t.references :schedulable, polymorphic: true
t.date :date
t.time :time
t.string :rule
t.string :interval
t.text :day
t.text :day_of_week
t.datetime... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.