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 | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/lab.rb | Ruby | mit | 85 | main | 2,370 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/lab.dart
class Lab
include Space
def bounded?
false
end
def initialize
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/xyz_d50.rb | Ruby | mit | 85 | main | 3,058 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/xyz_d50.dart
class XyzD50
include Space
def bounded?
false
end
def initialize
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/utils.rb | Ruby | mit | 85 | main | 3,174 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/utils.dart
module Utils
module_function
# A constant used to convert Lab to/from XYZ.
LAB_KAPPA = Ratio... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/oklab.rb | Ruby | mit | 85 | main | 2,063 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/oklab.dart
class Oklab
include Space
def bounded?
false
end
def initialize
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/srgb_linear.rb | Ruby | mit | 85 | main | 1,883 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/srgb_linear.dart
class SrgbLinear
include Space
def bounded?
true
end
def initia... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/display_p3.rb | Ruby | mit | 85 | main | 1,955 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/display_p3.dart
class DisplayP3
include Space
def bounded?
true
end
def initiali... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/oklch.rb | Ruby | mit | 85 | main | 1,340 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/oklch.dart
class Oklch
include Space
def bounded?
false
end
def polar?
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/a98_rgb.rb | Ruby | mit | 85 | main | 1,465 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/a98_rgb.dart
class A98Rgb
include Space
def bounded?
true
end
def initialize
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/lch.rb | Ruby | mit | 85 | main | 1,266 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/lch.dart
class Lch
include Space
def bounded?
false
end
def polar?
t... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/xyz_d65.rb | Ruby | mit | 85 | main | 1,342 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/xyz_d65.dart
class XyzD65
include Space
def bounded?
false
end
def initialize
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/prophoto_rgb.rb | Ruby | mit | 85 | main | 1,621 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/prophoto_rgb.dart
class ProphotoRgb
include Space
def bounded?
true
end
def init... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/srgb.rb | Ruby | mit | 85 | main | 4,260 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/srgb.dart
class Srgb
include Space
def bounded?
true
end
def initialize
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/hsl.rb | Ruby | mit | 85 | main | 1,645 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/hsl.dart
class Hsl
include Space
def bounded?
true
end
def legacy?
t... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/rec2020.rb | Ruby | mit | 85 | main | 1,911 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/rec2020.dart
class Rec2020
include Space
# A constant used in the rec2020 gamma encoding/decoding functions.
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/display_p3_linear.rb | Ruby | mit | 85 | main | 1,955 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/display_p3_linear.dart
class DisplayP3Linear
include Space
def bounded?
true
end
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/lms.rb | Ruby | mit | 85 | main | 4,300 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/lms.dart
class Lms
include Space
def bounded?
false
end
def initialize
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/hwb.rb | Ruby | mit | 85 | main | 1,885 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/hwb.dart
class Hwb
include Space
def bounded?
true
end
def legacy?
t... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | lib/sass/value/color/space/rgb.rb | Ruby | mit | 85 | main | 1,328 | # frozen_string_literal: true
module Sass
module Value
class Color
module Space
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/space/rgb.dart
class Rgb
include Space
def bounded?
true
end
def legacy?
t... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | ext/sass/platform.rb | Ruby | mit | 85 | main | 899 | # frozen_string_literal: true
# The {Platform} module.
module Platform
HOST_CPU = RbConfig::CONFIG['host_cpu'].downcase
CPU = case HOST_CPU
when /amd64|x86_64|x64/
'x86_64'
when /i\d86|x86|i86pc/
'i386'
when /arm64|aarch64/
'aarch64'
when /arm/
... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | ext/sass/Rakefile | Ruby | mit | 85 | main | 5,560 | # frozen_string_literal: true
require 'rake/clean'
require_relative '../../lib/sass/elf'
require_relative 'sass_config'
require_relative 'file_utils'
require_relative 'utils'
ARCHDIR = File.absolute_path('sass', ENV.fetch('RUBYARCHDIR', File.absolute_path('../../lib', __dir__)))
LIBDIR = File.absolute_path('sass', E... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | ext/sass/utils.rb | Ruby | mit | 85 | main | 836 | # frozen_string_literal: true
# The {Utils} module.
module Utils
module_function
def capture(...)
require 'open3'
stdout, stderr, status = Open3.capture3(...)
raise stderr unless status.success?
stdout
end
def fetch_https(source_uri)
require 'rubygems/remote_fetcher'
source_uri = ... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | ext/sass/file_utils.rb | Ruby | mit | 85 | main | 2,342 | # frozen_string_literal: true
# This is a FileUtils extension that defines several additional commands to be
# added to the FileUtils utility functions.
module FileUtils
def unarchive(archive, chdir: '.')
if Gem.win_platform?
sh File.absolute_path('tar.exe', Utils.windows_system_directory), '-vxf', archive... |
github | sass-contrib/sass-embedded-host-ruby | https://github.com/sass-contrib/sass-embedded-host-ruby | ext/sass/sass_config.rb | Ruby | mit | 85 | main | 4,640 | # frozen_string_literal: true
require_relative 'platform'
# The {SassConfig} module.
module SassConfig
module_function
def package_json(path = '.')
require 'json'
JSON.parse(File.read(File.absolute_path('package.json', path)))
end
def dart_sass_version
package_json(__dir__)['dependencies']['sas... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | Gemfile | Ruby | bsd-3-clause | 85 | master | 877 | source 'https://rubygems.org'
# Install omnibus
gem 'omnibus', github: 'chef/omnibus'
gem 'pry-byebug'
# Use Chef's software definitions. It is recommended that you write your own
# software definitions, but you can clone/fork Chef's to get you started.
gem 'omnibus-software', github: 'chef/omnibus-software'
# This... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | patched-omnibus-compressor-dmg.rb | Ruby | bsd-3-clause | 85 | master | 8,633 | #
# Copyright 2014 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | omnibus.rb | Ruby | bsd-3-clause | 85 | master | 1,880 | #
# This file is used to configure the ansibledk project. It contains
# some minimal configuration examples for working with Omnibus. For a full list
# of configurable options, please see the documentation for +omnibus/config.rb+.
#
# Build internally
# ------------------------------
# By default, Omnibus uses system ... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | Berksfile | Ruby | bsd-3-clause | 85 | master | 323 | source 'https://supermarket.chef.io'
cookbook 'omnibus'
metadata
# Uncomment to use the latest version of the Omnibus cookbook from GitHub
# cookbook 'omnibus', github: 'opscode-cookbooks/omnibus'
group :integration do
cookbook 'apt', '~> 2.8'
cookbook 'freebsd', '~> 0.3'
cookbook 'yum-epel', '~> 0.6'
e... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | recipes/default.rb | Ruby | bsd-3-clause | 85 | master | 605 | # Use the omnibus-build resource to build the project
directory node[:omnibus][:project_repo] do
owner node[:omnibus][:build_user]
end
git node[:omnibus][:project_repo] do
repository 'https://github.com/omniti-labs/ansible-dk.git'
action :sync
user node[:omnibus][:build_user]
end
link "#{node[:omnibus][:proj... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/kitchen-vagrant.rb | Ruby | bsd-3-clause | 85 | master | 1,136 | #
# Copyright 2015 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/kitchen-ansible.rb | Ruby | bsd-3-clause | 85 | master | 547 | name "kitchen-ansible"
default_version "master"
relative_path "kitchen-ansible"
source git: "git://github.com/neillturner/kitchen-ansible.git"
if windows?
dependency "ruby-windows"
dependency "ruby-windows-devkit"
else
dependency "ruby"
end
dependency "rubygems"
dependency "bundler"
dependency "test-kitchen"
... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/boto.rb | Ruby | bsd-3-clause | 85 | master | 312 | # From https://github.com/DataDog/omnibus-software - apparent Apache 2.0 license
name "boto"
default_version "2.36.0"
dependency "python"
dependency "pip"
build do
command "#{install_dir}/embedded/bin/pip install -I --install-option=\"--install-scripts=#{install_dir}/embedded/bin\" #{name}==#{version}"
end |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/ansible-dk-cli.rb | Ruby | bsd-3-clause | 85 | master | 432 | name "ansible-dk-cli"
default_version "0.1.0" # This is just to silence a warning
description "One day this might be a generic CLI tool; today it is a hack to make shell-init work"
# This isn't used yet (as we're a shell script, derp) but will be soon!
dependency 'click'
build do
copy Dir.pwd + "/ansible-dk-cli/ans... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/test-kitchen.rb | Ruby | bsd-3-clause | 85 | master | 1,306 | #
# Copyright 2012-2014 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/awscli.rb | Ruby | bsd-3-clause | 85 | master | 353 | name "awscli"
default_version "1.9.5"
dependency "python"
dependency "pip"
dependency "boto"
build do
command "#{install_dir}/embedded/bin/pip install -I --install-option=\"--install-scripts=#{install_dir}/embedded/bin\" #{name}==#{version}"
# This is an Officially Exposed Tool
link "#{install_dir}/embedded/bin... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/bats.rb | Ruby | bsd-3-clause | 85 | master | 392 | name "bats"
default_version "v0.4.0"
relative_path "bats"
source git: "git://github.com/sstephenson/bats.git"
build do
env = with_standard_compiler_flags(with_embedded_path)
command "./install.sh #{install_dir}", env: env
# This is an Officially Exposed Tool
[
'bats',
].each do |tool|
lin... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/liblzma.rb | Ruby | bsd-3-clause | 85 | master | 1,247 | #
# Copyright 2014 Chef Software, Inc.
# Copyright 2015 OmniTI Computer Consulting, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/jq.rb | Ruby | bsd-3-clause | 85 | master | 552 | name "jq"
default_version "master"
relative_path "jq"
source git: "git://github.com/stedolan/jq.git"
dependency "libtool"
dependency "make"
dependency "autoconf"
dependency "automake"
build do
env = with_standard_compiler_flags(with_embedded_path)
command "autoreconf -i", env: env
command "./configure --disab... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/click.rb | Ruby | bsd-3-clause | 85 | master | 228 | name "click"
default_version "5.1"
dependency "python"
dependency "pip"
build do
command "#{install_dir}/embedded/bin/pip install -I --install-option=\"--install-scripts=#{install_dir}/embedded/bin\" #{name}==#{version}"
end |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/setuptools.rb | Ruby | bsd-3-clause | 85 | master | 363 | name "setuptools"
default_version "18.5"
dependency "python"
source :url => "https://pypi.python.org/packages/source/s/setuptools/setuptools-#{version}.tar.gz",
:md5 => '533c868f01169a3085177dffe5e768bb'
relative_path "setuptools-#{version}"
build do
command "#{install_dir}/embedded/bin/python setup.py ins... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/kitchen-ec2.rb | Ruby | bsd-3-clause | 85 | master | 543 | name "kitchen-ec2"
default_version "master"
relative_path "kitchen-ec2"
source git: "git://github.com/test-kitchen/kitchen-ec2.git"
if windows?
dependency "ruby-windows"
dependency "ruby-windows-devkit"
else
dependency "ruby"
end
dependency "rubygems"
dependency "bundler"
dependency "test-kitchen"
build do
... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/python.rb | Ruby | bsd-3-clause | 85 | master | 1,807 | #
# Copyright 2013-2014 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/paramiko.rb | Ruby | bsd-3-clause | 85 | master | 257 | name "paramiko"
default_version "1.15.2"
dependency "python"
dependency "pip"
dependency "pycrypto"
build do
command "#{install_dir}/embedded/bin/pip install -I --install-option=\"--install-scripts=#{install_dir}/embedded/bin\" #{name}==#{version}"
end |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/ansible-lint.rb | Ruby | bsd-3-clause | 85 | master | 402 | name "ansible-lint"
default_version "2.1.3"
dependency "python"
dependency "pip"
build do
command "#{install_dir}/embedded/bin/pip install -I --install-option=\"--install-scripts=#{install_dir}/embedded/bin\" #{name}==#{version}"
# This is an Officially Exposed Tool
[
'ansible-lint',
].each do |tool| ... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/molecule.rb | Ruby | bsd-3-clause | 85 | master | 388 | name "molecule"
default_version "1.0.6"
dependency "python"
dependency "pip"
build do
command "#{install_dir}/embedded/bin/pip install -I --install-option=\"--install-scripts=#{install_dir}/embedded/bin\" #{name}==#{version}"
# This is an Officially Exposed Tool
[
'molecule',
].each do |tool|
link "#... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/ansible-toolkit.rb | Ruby | bsd-3-clause | 85 | master | 493 | name "ansible-toolkit"
default_version "1.3.2"
dependency "python"
dependency "pip"
dependency "ansible"
build do
command "#{install_dir}/embedded/bin/pip install -I --install-option=\"--install-scripts=#{install_dir}/embedded/bin\" #{name}==#{version}"
# This is an Officially Exposed Tool
[
'atk-show-vars... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/pip.rb | Ruby | bsd-3-clause | 85 | master | 426 | name "pip"
default_version "7.1.2"
dependency "setuptools"
version('7.1.2') { source md5: '3823d2343d9f3aaab21cf9c917710196' }
version('8.0.3') { source md5: '8f000fc101e47f4f199fa29df1e0b0df' }
source :url => "https://pypi.python.org/packages/source/p/pip/pip-#{version}.tar.gz"
relative_path "pip-#{version}"
buil... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/serverspec.rb | Ruby | bsd-3-clause | 85 | master | 762 | name "serverspec"
default_version "master"
relative_path "serverspec"
source git: "git://github.com/mizzy/serverspec.git"
if windows?
dependency "ruby-windows"
dependency "ruby-windows-devkit"
else
dependency "ruby"
end
dependency "rubygems"
dependency "bundler"
dependency "test-kitchen"
build do
env = wit... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/bzip2.rb | Ruby | bsd-3-clause | 85 | master | 1,533 | #
# Copyright 2013-2014 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/software/ansible.rb | Ruby | bsd-3-clause | 85 | master | 538 | name "ansible"
default_version "1.9.4"
dependency "python"
dependency "pip"
dependency "paramiko"
dependency "boto"
build do
command "#{install_dir}/embedded/bin/pip install -I --install-option=\"--install-scripts=#{install_dir}/embedded/bin\" #{name}==#{version}"
# This is an Officially Exposed Tool
[
'an... |
github | omniti-labs/ansible-dk | https://github.com/omniti-labs/ansible-dk | config/projects/ansible-dk.rb | Ruby | bsd-3-clause | 85 | master | 2,006 | name "ansible-dk"
maintainer "OmniTI"
homepage "https://github.com/omniti-labs/ansible-dk"
# Defaults to C:/ansible-dk on Windows
# and /opt/ansible-dk on all other platforms
install_dir "#{default_root}/#{name}"
build_version Omnibus::BuildVersion.semver
build_iteration 1
# Version pinning. Most of the software de... |
github | rubysamurai/purecss-sass | https://github.com/rubysamurai/purecss-sass | purecss-sass.gemspec | Ruby | mit | 85 | main | 1,208 | lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'purecss/sass/version'
Gem::Specification.new do |spec|
spec.name = 'purecss-sass'
spec.version = Purecss::Sass::VERSION
spec.authors = ['Dmitriy Tarasov']
spec.email = ['info@rub... |
github | rubysamurai/purecss-sass | https://github.com/rubysamurai/purecss-sass | Gemfile | Ruby | mit | 85 | main | 248 | source 'https://rubygems.org'
# Specify your gem's dependencies in purecss-sass.gemspec
gemspec
gem 'loofah', '<= 2.20.0' if RUBY_VERSION <= '2.5.0'
gem 'railties'
gem 'rspec'
gem 'rubocop', require: false
gem 'sassc-rails'
gem 'sprockets-rails' |
github | rubysamurai/purecss-sass | https://github.com/rubysamurai/purecss-sass | spec/spec_helper.rb | Ruby | mit | 85 | main | 732 | ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('support/dummy_rails_app/config/environment.rb', __dir__)
require 'bundler/setup'
require 'purecss-sass'
RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = '.rspec_status'
# Disabl... |
github | rubysamurai/purecss-sass | https://github.com/rubysamurai/purecss-sass | spec/support/dummy_rails_app/config/application.rb | Ruby | mit | 85 | main | 271 | require File.expand_path('boot', __dir__)
require 'rails'
require 'action_controller/railtie'
require 'action_view/railtie'
require 'sassc-rails'
require 'sprockets/railtie'
require 'purecss-sass'
module DummyRailsApp
class Application < Rails::Application
end
end |
github | rubysamurai/purecss-sass | https://github.com/rubysamurai/purecss-sass | spec/support/dummy_rails_app/config/environments/test.rb | Ruby | mit | 85 | main | 1,796 | Rails.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 suit... |
github | rubysamurai/purecss-sass | https://github.com/rubysamurai/purecss-sass | spec/purecss/sassc_compilation_spec.rb | Ruby | mit | 85 | main | 440 | RSpec.describe 'Sass C compilation' do
it 'compiles scss to css' do
path = '../../vendor/assets/stylesheets'
file = '_purecss'
sass_engine = SassC::Engine.new(
File.read(File.expand_path("#{path}/#{file}.scss", __dir__)),
cache_location: 'tmp/.sassc-cache',
load_paths: [path],
synt... |
github | rubysamurai/purecss-sass | https://github.com/rubysamurai/purecss-sass | lib/purecss-sass.rb | Ruby | mit | 85 | main | 780 | module Purecss
module Sass
class << self
def load!
if defined?(::Rails)
register_rails_engine
elsif defined?(::Sprockets)
register_sprockets
end
configure_sass
end
def gem_path
@gem_path ||= File.expand_path('..', File.dirname(__FILE_... |
github | rubysamurai/purecss-sass | https://github.com/rubysamurai/purecss-sass | lib/purecss/sass/engine.rb | Ruby | mit | 85 | main | 266 | module Purecss
module Sass
module Rails
class Engine < ::Rails::Engine
initializer 'purecss-sass.assets.precompile' do |app|
app.config.assets.paths << root.join('vendor/assets/stylesheets').to_s
end
end
end
end
end |
github | goshrine/whole_history_rating | https://github.com/goshrine/whole_history_rating | whole_history_rating.gemspec | Ruby | mit | 85 | master | 1,110 | DIR = File.dirname(__FILE__)
LIB = File.join(DIR, *%w[lib whole_history_rating.rb])
VERSION = open(LIB) { |lib|
lib.each { |line|
if v = line[/^\s*VERSION\s*=\s*(['"])(\d+\.\d+\.\d+)\1/, 2]
break v
end
}
}
SPEC = Gem::Specification.new do |s|
s.name = "whole_history_rating"
s.version = VERSION
... |
github | goshrine/whole_history_rating | https://github.com/goshrine/whole_history_rating | Rakefile | Ruby | mit | 85 | master | 206 | require 'rake'
require 'rake/testtask'
task :default => [:test_units]
desc "Run basic tests"
Rake::TestTask.new("test_units") { |t|
t.pattern = 'test/*_test.rb'
#t.verbose = true
t.warning = true
} |
github | goshrine/whole_history_rating | https://github.com/goshrine/whole_history_rating | lib/whole_history_rating.rb | Ruby | mit | 85 | master | 279 | require 'rubygems'
module WholeHistoryRating
VERSION = "0.1.2"
STDOUT.sync = true
ROOT = File.expand_path(File.dirname(__FILE__))
%w[ base
player
game
player_day
].each do |lib|
require File.join(ROOT, 'whole_history_rating', lib)
end
end |
github | goshrine/whole_history_rating | https://github.com/goshrine/whole_history_rating | lib/whole_history_rating/base.rb | Ruby | mit | 85 | master | 2,195 | #!/usr/bin/env ruby
module WholeHistoryRating
class UnstableRatingException < RuntimeError; end
class Base
attr_accessor :players, :games
def initialize(config = {})
@config = config
@config[:w2] ||= 300.0 # elo^2
@games = []
@players = {}
end
def print_ordered... |
github | goshrine/whole_history_rating | https://github.com/goshrine/whole_history_rating | lib/whole_history_rating/game.rb | Ruby | mit | 85 | master | 2,047 | module WholeHistoryRating
class Game
attr_accessor :day, :white_player, :black_player, :handicap, :winner, :wpd, :bpd, :extras
def initialize(black, white, winner, time_step, handicap, extras)
@day = time_step
@white_player = white
@black_player = black
@winner = winner
@extra... |
github | goshrine/whole_history_rating | https://github.com/goshrine/whole_history_rating | lib/whole_history_rating/player_day.rb | Ruby | mit | 85 | master | 3,264 | module WholeHistoryRating
class PlayerDay
attr_accessor :won_games, :lost_games, :name, :day, :player, :r, :is_first_day, :uncertainty
def initialize(player, day)
@day = day
@player = player
@is_first_day = false
@won_games = []
@lost_games = []
end
def gamma=(gamma)
... |
github | goshrine/whole_history_rating | https://github.com/goshrine/whole_history_rating | lib/whole_history_rating/player.rb | Ruby | mit | 85 | master | 6,230 | require 'matrix'
module WholeHistoryRating
class Player
attr_accessor :name, :anchor_gamma, :days, :w2, :debug, :id
def initialize(name, config)
@name = name
@debug = config[:debug]
@w2 = (Math.sqrt(config[:w2])*Math.log(10)/400)**2 # Convert from elo^2 to r^2
@days = []
end
... |
github | goshrine/whole_history_rating | https://github.com/goshrine/whole_history_rating | test/whr_test.rb | Ruby | mit | 85 | master | 2,682 | require 'test/unit'
require 'whole_history_rating'
class WholeHistoryRatingTest < Test::Unit::TestCase
def setup
@whr = WholeHistoryRating::Base.new
end
def setup_game_with_elo(white_elo, black_elo, handicap)
game = @whr.create_game("black", "white", "W", 1, handicap)
game.black_player.days[0... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | Rakefile | Ruby | mit | 84 | master | 851 | require 'rdoc/task'
require 'rspec/core'
require 'rspec/core/rake_task'
# Temporary hack from https://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11
module TempFixForRakeLastComment
def last_comment
last_description
end
end
Rake::Application.send :in... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | csv_builder.gemspec | Ruby | mit | 84 | master | 1,240 | Gem::Specification.new do |s|
s.name = %q{csv_builder}
s.version = "2.1.3"
s.authors = [%q{Econsultancy}, %q{Vidmantas Kabosis}, %q{Gabe da Silveira}]
s.email = %q{gabe@websaviour.com}
s.homepage = %q{https://github.com/gtd/csv_builder}
s.summary = %q{CSV template handler for Rails}
s.description = %q{CS... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | lib/csv_builder.rb | Ruby | mit | 84 | master | 325 | # encoding: utf-8
module CsvBuilder
if RUBY_VERSION.to_f >= 1.9
require 'csv'
CSV_LIB = CSV
else
require 'iconv'
require 'fastercsv'
CSV_LIB = FasterCSV
end
end
require 'action_view'
require 'csv_builder/transliterating_filter'
require 'csv_builder/template_handler'
require 'csv_builder/rail... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | lib/csv_builder/template_handler.rb | Ruby | mit | 84 | master | 4,712 | # encoding: utf-8
module CsvBuilder # :nodoc:
# Template handler for csv templates
#
# Add rows to your CSV file in the template by pushing arrays of columns into csv
#
# # First row
# csv << [ 'cell 1', 'cell 2' ]
# # Second row
# csv << [ 'another cell value', 'and another' ]
# # etc...
... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | lib/csv_builder/transliterating_filter.rb | Ruby | mit | 84 | master | 1,736 | #encoding: utf-8
# Transliterate into the required encoding if necessary
#
# We can't rely on the encoding option in the Ruby 1.9 version CSV because this
# is ignored when it is 'compatible' (see <tt>Encoding.compatible?</tt>with the
# input for example:
#
# CSV.generate(:encoding => 'ASCII') { |csv| '£12.34'.enco... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | lib/csv_builder/railtie.rb | Ruby | mit | 84 | master | 215 | class CsvBuilder::Railtie < Rails::Railtie
initializer "csv_builder.register_template_handler.action_view" do
ActionView::Template.register_template_handler 'csvbuilder', CsvBuilder::TemplateHandler
end
end |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/spec_helper.rb | Ruby | mit | 84 | master | 590 | # encoding: utf-8
ENV["RAILS_ENV"] ||= 'test'
rails_root = File.expand_path('../rails_app_6_1', __FILE__)
require rails_root + '/config/environment.rb'
require 'rspec/rails'
TEST_DATA = [
['Lorem', 'ipsum'],
['Lorem ipsum dolor sit amet,' 'consectetur adipiscing elit. Sed id '],
['augue! "3" !@#$^&*()_+_', 'se... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_5_2/config/application.rb | Ruby | mit | 84 | master | 661 | require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module RailsApp52
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rail... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_5_2/config/environments/production.rb | Ruby | mit | 84 | master | 3,943 | 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 serve... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_6_1/config/application.rb | Ruby | mit | 84 | master | 707 | require_relative "boot"
require "rails/all"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module RailsApp61
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rail... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_6_1/config/environments/production.rb | Ruby | mit | 84 | master | 5,340 | 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 applica... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/controllers/csv_builder_spec.rb | Ruby | mit | 84 | master | 3,178 | #encoding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
class CsvBuilderReportsController < ApplicationController
before_action {|c| c.prepend_view_path(File.expand_path(File.dirname(__FILE__) + '/../templates')) }
def simple
# dummy
respond_to do |format|
format.html
... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_old/config/routes.rb | Ruby | mit | 84 | master | 1,791 | RailsApp::Application.routes.draw do
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'prod... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_old/config/application.rb | Ruby | mit | 84 | master | 1,957 | require File.expand_path('../boot', __FILE__)
require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
module RailsApp
class Application < Rails::Application
... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_old/config/environments/production.rb | Ruby | mit | 84 | master | 1,757 | RailsApp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned o... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_old/config/environments/test.rb | Ruby | mit | 84 | master | 1,512 | RailsApp::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... |
github | gtd/csv_builder | https://github.com/gtd/csv_builder | spec/rails_app_old/config/environments/development.rb | Ruby | mit | 84 | master | 938 | RailsApp::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 webs... |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | Rakefile | Ruby | mit | 84 | main | 381 | # frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/testtask"
require "rubocop/rake_task"
require "yard"
Rake::TestTask.new do |t|
t.pattern = "spec/**/*_spec.rb"
t.verbose = true
t.warning = true
end
RuboCop::RakeTask.new
YARD::Rake::YardocTask.new
Dir["tasks/**/*.rake"].each { |t| load ... |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | Gemfile | Ruby | mit | 84 | main | 243 | # frozen_string_literal: true
source "https://rubygems.org"
gemspec
gem "bundler"
gem "rake"
gem "r_spec"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "rubocop-thread_safety"
gem "simplecov"
gem "yard" |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | accept_language.gemspec | Ruby | mit | 84 | main | 1,160 | # frozen_string_literal: true
Gem::Specification.new do |spec|
spec.name = "accept_language"
spec.version = File.read("VERSION.semver").chomp
spec.author = "Cyril Kato"
spec.email = "contact@cyril.email"
spec.summary = "Parser for Accept-Language request HTTP header"
spe... |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | lib/accept_language.rb | Ruby | mit | 84 | main | 9,478 | # frozen_string_literal: true
# = Accept-Language Header Parser
#
# AcceptLanguage is a lightweight, thread-safe Ruby library for parsing the
# +Accept-Language+ HTTP header field as defined in RFC 7231 Section 5.3.5,
# with full support for BCP 47 language tags.
#
# == Purpose
#
# The +Accept-Language+ request header... |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | lib/accept_language/matcher.rb | Ruby | mit | 84 | main | 15,286 | # frozen_string_literal: true
module AcceptLanguage
# = Language Preference Matcher
#
# Matcher implements the Basic Filtering matching scheme defined in
# RFC 4647 Section 3.3.1. It takes parsed language preferences (from {Parser})
# and determines the optimal language choice from a set of available languag... |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | lib/accept_language/parser.rb | Ruby | mit | 84 | main | 17,226 | # frozen_string_literal: true
module AcceptLanguage
# = Accept-Language Header Parser
#
# Parser handles the parsing of +Accept-Language+ HTTP header field values
# as defined in RFC 7231 Section 5.3.5. It extracts language ranges and their
# associated quality values (q-values), validates them according to ... |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | spec/accept_language_spec.rb | Ruby | mit | 84 | main | 6,988 | #!/usr/bin/env ruby
# frozen_string_literal: true
require_relative "spec_helper"
require_relative File.join("..", "lib", "accept_language")
# Integration tests for the AcceptLanguage module.
#
# These tests verify the complete parsing and matching flow as defined in:
# - RFC 7231 Section 5.3.5 (Accept-Language header... |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | spec/accept_language/parser_spec.rb | Ruby | mit | 84 | main | 15,526 | #!/usr/bin/env ruby
# frozen_string_literal: true
require_relative File.join("..", "spec_helper")
require_relative File.join("..", "..", "lib", "accept_language", "parser")
# Tests for the Accept-Language header parser.
#
# @see https://www.rfc-editor.org/rfc/rfc7231#section-5.3.5
# @see https://www.rfc-editor.org/rf... |
github | cyril/accept_language.rb | https://github.com/cyril/accept_language.rb | spec/accept_language/matcher_spec.rb | Ruby | mit | 84 | main | 23,420 | #!/usr/bin/env ruby
# frozen_string_literal: true
require_relative File.join("..", "spec_helper")
require_relative File.join("..", "..", "lib", "accept_language", "matcher")
# Tests for the Basic Filtering matching scheme defined in RFC 4647 Section 3.3.1.
#
# Note: The Matcher class expects a hash where:
# - Keys ar... |
github | cjbottaro/param_protected | https://github.com/cjbottaro/param_protected | Rakefile | Ruby | mit | 84 | master | 1,357 | require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "param_protected"
gemspec.summary = "Filter unwanted parameters in your controllers and actions."
gemspec.description = "Provides two class methods on Act... |
github | cjbottaro/param_protected | https://github.com/cjbottaro/param_protected | param_protected.gemspec | Ruby | mit | 84 | master | 2,798 | # Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{param_protected}
s.version = "3.0.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :require... |
github | cjbottaro/param_protected | https://github.com/cjbottaro/param_protected | test/inherited_users_controller_test.rb | Ruby | mit | 84 | master | 704 | require "test_helper"
class InheritedUsersControllerTest < ActionController::TestCase
PARAMS = { :user => { :id => 123,
:name => { :first => "chris", :middle => "james", :last => "bottaro"},
:email => "cjbottaro@blah.com",
:password => ... |
github | cjbottaro/param_protected | https://github.com/cjbottaro/param_protected | test/protector_test.rb | Ruby | mit | 84 | master | 7,786 | require "test_helper"
class HelpersTest < Test::Unit::TestCase
def setup
@protector = ParamProtected::Protector.new
end
def test_normalize_params
params = @protector.send(:normalize_params, :something)
assert_equal({"something" => nil}, params)
params = @protector.send(:normalize_param... |
github | cjbottaro/param_protected | https://github.com/cjbottaro/param_protected | test/users_controller_test.rb | Ruby | mit | 84 | master | 889 | require "test_helper"
class UsersControllerTest < ActionController::TestCase
PARAMS = { :user => { :id => 123,
'33' => { :ok => 'yes', :not_ok => 'no' },
'123' => 'ok',
:x21 => 'ok',
:name => { :first => "chris", :middle ... |
github | cjbottaro/param_protected | https://github.com/cjbottaro/param_protected | test/accessible_only_test.rb | Ruby | mit | 84 | master | 222 | require "test_helper"
class AccessibleOnlyControllerTest < ActionController::TestCase
test_action :first do
assert_params %w[a]
end
test_action :second do
assert_params %w[a b c d e f g h]
end
end |
github | cjbottaro/param_protected | https://github.com/cjbottaro/param_protected | test/merge_controller_test.rb | Ruby | mit | 84 | master | 306 | require "test_helper"
class MergeControllerTest < ActionController::TestCase
test_action :first do
assert_params %w[a b h]
assert_equal({"b" => "b"}, params["h"])
end
test_action :second do
assert_params %w[b h]
assert_equal({"b" => "b", "c" => "c"}, params["h"])
end
end |
github | cjbottaro/param_protected | https://github.com/cjbottaro/param_protected | test/protected_controller_test.rb | Ruby | mit | 84 | master | 960 | require "test_helper"
class ProtectedControllerTest < ActionController::TestCase
test_action :an_action do
assert_params %w[b d e f h]
end
test_action :only_one_action do
assert_params %w[d e f h]
end
test_action :except_one_action do
assert_params %w[c b d e f h]
end
test_action ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.