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
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler.rb
Ruby
apache-2.0
88
main
82,523
# -*- coding: utf-8 -*- require 'intertwingler/version' # basic stuff require 'stringio' require 'pathname' require 'tempfile' require 'yaml' # apparently no longer stock require 'mimemagic' # rdf stuff require 'uri' require 'uri/urn' require 'cgi/util' require 'rdf' require 'rdf/turtle' require 'rdf/vocab' require '...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/util.rb
Ruby
apache-2.0
88
main
2,333
# bring in the namespace require 'intertwingler/version' require 'mimemagic' # XXX this is not strictly correct but good enough for now, also # application/x-www-form-urlencoded is not in the mime types (and thus # has no `canonical)`, so that was fun to debug (oh look turns out # multipart/form-data isn't in there ei...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/engine.rb
Ruby
apache-2.0
88
main
28,293
require 'intertwingler/handler' require 'intertwingler/params' require 'intertwingler/transform' require 'intertwingler/util/clean' require 'intertwingler/error' require 'intertwingler/loggable' require 'params/registry' require 'rack/mock_request' # for env_for # This is the engine. This is the thing that is run. c...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/rubyurn.rb
Ruby
apache-2.0
88
main
7,854
require 'intertwingler/version' # for the namespace require 'uri/urn' # This is a class for representing Ruby modules as URIs. It is # probably more appropriate for this to be a URI rather than a URN, # and it was not my first choice to do so, but changes to the URI # module that ships with Ruby has made it impossible...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/console.rb
Ruby
apache-2.0
88
main
6,747
# rack? sure require 'intertwingler/util' require 'rack' require 'rack/request' require 'rack/response' require 'http/negotiate' require 'uuidtools' require 'pathname' class Intertwingler::Console class Request < Rack::Request # this should be in vanilla Rack::Request def full_uri URI(base_url) + en...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/transform.rb
Ruby
apache-2.0
88
main
38,996
require 'rdf' require 'rdf/vocab' require 'intertwingler/vocab/tfo' require 'intertwingler/graphops' require 'intertwingler/util' require 'set' require 'mimemagic' require 'http/negotiate' require 'time' require 'intertwingler/handler' require 'http/negotiate' # This class represents the metadata about an individual ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab.rb
Ruby
apache-2.0
88
main
299
# ensure this is loaded require 'rdf' module Intertwingler module Vocab %i[ADMS CI CGTO IBIS ITCV PAV PM QB SCOVO TFO].each do |sym| autoload sym, "intertwingler/vocab/#{sym.to_s.downcase}.rb" end def self.load_vocabs constants.each { |c| const_get c } end end end
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/loggable.rb
Ruby
apache-2.0
88
main
433
require 'intertwingler/version' # This module implements a snap-on #log method which will load and # initialize {::Logger} in the instance variable `@log` if one is not # found. # module Intertwingler::Loggable # Return a {::Logger} instance or otherwise load one with defaults. # # @return [Logger] the logger. ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/surface.rb
Ruby
apache-2.0
88
main
4,586
require 'intertwingler/version' # A _surface_ is where {Intertwingler::Representation representations} of # _information resources_ are _projected_. The behaviour of a surface # is intentionally opaque, and as such its main functionality is # accessed through the `call` method. Whatever is on the other side of # that ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/nlp.rb
Ruby
apache-2.0
88
main
8,462
# -*- coding: utf-8 -*- require 'intertwingler/version' # initialize the symbols require 'lemmatizer' require 'engtagger' private XHTMLNS = { html: 'http://www.w3.org/1999/xhtml'.freeze }.freeze # XXX why does this feel super familiar POS_MAP = { noun: %i[xnn nnp nnps nns], verb: %i[vb vbd vbg vbn vbp vbz], a...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/types.rb
Ruby
apache-2.0
88
main
5,568
require 'dry-schema' require 'uri' require 'pathname' require 'mimemagic' require_relative 'util/clean' require_relative 'rubyurn' module Intertwingler # XXX pop this out into its own module when we're ready module Types include Dry::Types() Dry::Types.define_builder :hash_default do |type| reqd = ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/cli.rb
Ruby
apache-2.0
88
main
25,279
1# frozen_string_literal: true require 'intertwingler/types' require 'rdf/repository' require 'thor' require 'pathname' require 'psych' require 'tty-prompt' require 'tty-markdown' require 'tty-progressbar' # The Intertwingler command line tool. class Intertwingler::CLI < Thor class Prompt < TTY::Prompt THEME...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/docstats.rb
Ruby
apache-2.0
88
main
5,016
require 'intertwingler/version' require 'set' require 'descriptive_statistics' require 'nokogiri' class Intertwingler::DocStats < Nokogiri::XML::SAX::Document private MAYBE = %i[dt dd li td th caption figcaption] SKIP = %i[html head title base link meta script] BLOCKS = Set.new(%i[body p h1 h2 h3 h4 h5 h6 ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/params.rb
Ruby
apache-2.0
88
main
12,018
require 'intertwingler/engine' require 'intertwingler/graphops' require 'intertwingler/types' require 'intertwingler/vocab/ci' require 'intertwingler/vocab/tfo' require 'intertwingler/vocab/itcv' require 'params/registry' # This is an {Intertwingler}-specific adaptation of the more generic # {Params::Registry}. In par...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/resource.rb
Ruby
apache-2.0
88
main
4,327
require 'intertwingler/handler' require 'intertwingler/graphops' # This class encapsulates an individual (presumably generated) HTTP # resource. It sits between an {Intertwingler::Handler} and whatever # code generates the response's representation, and handles any # preprocessing e.g. of query parameters or the reque...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/handler.rb
Ruby
apache-2.0
88
main
5,560
require 'intertwingler/error' require 'rack/request' require 'rack/response' # Everything in {Intertwingler} is a handler. # class Intertwingler::Handler # do this to declare the symbol class ::Intertwingler::Engine < self end # This is the abstract parent {::Exception} class that acts as an escape # hatch...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/graphops.rb
Ruby
apache-2.0
88
main
94,147
require 'intertwingler/version' require 'mimemagic' require 'set' require 'rdf' require 'rdf/vocab' require 'rdf/reasoner' require 'sparql' require 'intertwingler/resolver' require 'intertwingler/util' # load up my vocabs before reasoner is applied require 'intertwingler/vocab' module Intertwingler # gotta make s...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/document.rb
Ruby
apache-2.0
88
main
102,899
require 'rdf' require 'rdf/vocab' require 'intertwingler/util/clean' require 'intertwingler/nlp' require 'intertwingler/vocab/ci' require 'intertwingler/vocab/qb' require 'time' require 'stringio' require 'nokogiri' require 'md-noko' require 'uuid-ncname' require 'xml-mixup' require 'mimemagic' # This is the base clas...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/urlrunner.rb
Ruby
apache-2.0
88
main
19,643
require 'net/http' require 'concurrent' require 'concurrent-edge' require 'uri' require 'uri/urn/uuid' require 'time' require 'rdf' require 'rdf/rdfa' #require 'rdf/vocab' require 'rdf/vocab/dc' require 'rdf/vocab/prov' require 'sparql' require 'intertwingler/vocab' require 'intertwingler/vocab/ci' require 'intertwin...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/harness.rb
Ruby
apache-2.0
88
main
3,184
require 'intertwingler/handler' require 'intertwingler/resolver' require 'intertwingler/engine' require 'intertwingler/loggable' require 'pathname' # This is the multiplexing harness introduced to partition the # bootstrapping configuration class Intertwingler::Harness < Intertwingler::Handler include Intertwingler:...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/representation.rb
Ruby
apache-2.0
88
main
8,605
require 'intertwingler/version' # for the symbol require 'forwardable' require 'mimemagic' require 'tempfile' # This class is a cheap knockoff of a # {https://en.wikipedia.org/wiki/Monad_(functional_programming) monad} # for handling successive transformations to a given resource # representation within the same proc...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/resolver.rb
Ruby
apache-2.0
88
main
45,950
require 'intertwingler/error' require 'intertwingler/graphops' require 'intertwingler/vocab' require 'intertwingler/loggable' require 'intertwingler/util/clean' require 'uri' require 'uuidtools' require 'uuid/ncname' require 'digest' require 'base64' # apparently we need to greedy load these cause otherwise `find` wo...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/source.rb
Ruby
apache-2.0
88
main
6,823
require 'intertwingler/version' # for the symbol require 'mimemagic' require 'http-negotiate' require 'store-digest' # A _source_ is where (opaque) representations of information # resources originate, either in whole or in part (from the point of # view of this system). The most familiar kind of source is the file #...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/representation/nokogiri.rb
Ruby
apache-2.0
88
main
729
require 'intertwingler/representation' require 'intertwingler/document' # this will also import nokogiri require 'stringio' class Intertwingler::Representation::Nokogiri < Intertwingler::Representation private OBJECT_CLASS = ::Nokogiri::XML::Node DEFAULT_TYPE = 'application/xml'.freeze VALID_TYPES = %w[tex...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/representation/vips.rb
Ruby
apache-2.0
88
main
1,771
require 'intertwingler/representation' require 'vips' require 'vips/sourcecustom' require 'vips/targetcustom' require 'stringio' class Intertwingler::Representation::Vips < Intertwingler::Representation private OBJECT_CLASS = ::Vips::Image DEFAULT_TYPE = 'image/png'.freeze VALID_TYPES = %w[application/pdf...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/handler/cas.rb
Ruby
apache-2.0
88
main
536
require 'intertwingler/handler' require 'store/digest' require 'store/digest/http' class Intertwingler::Handler::CAS < Intertwingler::Handler def initialize engine, **options super @store = Store::Digest.new(**options) @proxy = Store::Digest::HTTP.new(@store, base: @engine.resolver.base) end def ha...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/handler/kv.rb
Ruby
apache-2.0
88
main
3,139
require 'intertwingler/handler' require 'rdf/kv' # This is a `POST` handler for {RDF::KV}, which will likely be # supplanted by a request transform that converts RDF-KV protocol data # to an LD-Patch request, and a concomitant `PATCH` handler. So don't # get too comfy with it. # class Intertwingler::Handler::KV < Inte...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/handler/generated.rb
Ruby
apache-2.0
88
main
2,232
require 'intertwingler/handler' # for generated require 'intertwingler/document' require 'stringio' require 'uri' class Intertwingler::Handler::Generated < Intertwingler::Handler private public def handle req # yaww if repo.respond_to?(:mtime) and ims = req.get_header('HTTP_IF_MODIFIED_SINCE...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/handler/catalogue.rb
Ruby
apache-2.0
88
main
54,568
require 'intertwingler/vocab' require 'intertwingler/handler' require 'intertwingler/resource' require 'intertwingler/document' require 'intertwingler/representation/nokogiri' require 'xml/mixup' require 'rdf/rdfxml' require 'http/negotiate' # This is a `GET` handler for what I'm calling "_catalogue_ resources" # (sor...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/handler/filesystem.rb
Ruby
apache-2.0
88
main
8,259
require 'intertwingler/handler' require 'mimemagic' require 'http-negotiate' # This is a toy content handler for serving content-negotiated files # directly from the file system. It is intended to be for residual # interoperability with long-standing expectations about how a # website ought to work, eventually to be ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/util/messy.rb
Ruby
apache-2.0
88
main
104,460
# -*- coding: utf-8 -*- require 'intertwingler/version' require 'uri' require 'uri/urn' require 'set' require 'uuidtools' require 'uuid-ncname' require 'xml-mixup' require 'mimemagic' require 'rdf' require 'rdf/vocab' require 'rdf/reasoner' require 'rdf/vocab/skos' require 'rdf/vocab/foaf' require 'rdf/vocab/bibo' re...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/util/clean.rb
Ruby
apache-2.0
88
main
12,290
# bring in the namespace require 'intertwingler/version' require 'rdf' require 'uri' # do this so we don't have to indent all to hell module Intertwingler::Util; end module Intertwingler::Util::Clean private URI_COERCIONS = { nil => -> t { t.to_s.strip }, false => -> t { t.to_s.strip }, uri: -...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/transform/raster.rb
Ruby
apache-2.0
88
main
3,909
require 'intertwingler/transform' # the representation require 'intertwingler/representation/vips' class Intertwingler::Transform::Raster < Intertwingler::Transform::Handler private REPRESENTATION = Intertwingler::Representation::Vips # these are all the formats that vips will write OUT = %w[avif gif heic h...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/transform/text.rb
Ruby
apache-2.0
88
main
361
require 'intertwingler/transform' # load this anyway cause we'll return it require 'intertwingler/representation/nokogiri' # this is gonna be mainly stuff like markdown->html and tidy since # they both ingest only text, but we could consider other fun # plain-text transforms too. class Intertwingler::Transform::Text ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/transform/sass.rb
Ruby
apache-2.0
88
main
368
require 'intertwingler/transform' # all this is gonna do is run the sass thinger. this one will need # access to the engine to run subrequests. actually since active sass # development has moved to dart this could be an early candidate for # reverse-proxying to a handler written in dart. class Intertwingler::Transform...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/transform/markup.rb
Ruby
apache-2.0
88
main
32,865
require 'intertwingler/transform' # most of the actual substantive code lives in this require 'intertwingler/document' # the representation require 'intertwingler/representation/nokogiri' # these are also handy require 'xml-mixup' require 'md-noko' require 'tidy_ffi' require 'rdf/rdfa' # This class will probably be...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/pm.rb
Ruby
apache-2.0
88
main
31,979
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from https://vocab.methodandstructure.com/process-model# require 'rdf' module Intertwingler::Vocab # @!parse # # Vocabulary for <https://vocab.methodandstructure.com/process-model#> # # # ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/pav.rb
Ruby
apache-2.0
88
main
41,916
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from http://purl.org/pav/ require 'intertwingler/vocab' module Intertwingler::Vocab # @!parse # # Vocabulary for <http://purl.org/pav/> # class PAV < RDF::StrictVocabulary # end class ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/adms.rb
Ruby
apache-2.0
88
main
19,159
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from http://www.w3.org/ns/adms# require 'intertwingler/vocab' module Intertwingler::Vocab # @!parse # # Vocabulary for <http://www.w3.org/ns/adms#> # # # # Asset Description Metadata Sch...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/ci.rb
Ruby
apache-2.0
88
main
66,544
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from https://vocab.methodandstructure.com/content-inventory# require 'rdf' module Intertwingler::Vocab # @!parse # # Vocabulary for <https://vocab.methodandstructure.com/content-inventory#> # ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/tfo.rb
Ruby
apache-2.0
88
main
38,692
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from https://vocab.methodandstructure.com/transformation# require 'rdf' module Intertwingler::Vocab # @!parse # # Vocabulary for <https://vocab.methodandstructure.com/transformation#> # # ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/ibis.rb
Ruby
apache-2.0
88
main
23,714
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from https://vocab.methodandstructure.com/ibis# require 'rdf' module Intertwingler::Vocab # @!parse # # Vocabulary for <https://vocab.methodandstructure.com/ibis#> # # # # IBIS (bis) Voc...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/itcv.rb
Ruby
apache-2.0
88
main
22,946
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from https://vocab.methodandstructure.com/intertwingler# require 'rdf' module Intertwingler::Vocab # @!parse # # Vocabulary for <https://vocab.methodandstructure.com/intertwingler#> # # # ...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/cgto.rb
Ruby
apache-2.0
88
main
27,766
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from https://vocab.methodandstructure.com/graph-tool# require 'rdf' module Intertwingler::Vocab # @!parse # # Vocabulary for <https://vocab.methodandstructure.com/graph-tool#> # # # # Co...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/qb.rb
Ruby
apache-2.0
88
main
15,728
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from http://purl.org/linked-data/cube# require 'intertwingler/vocab' module Intertwingler::Vocab # @!parse # # Vocabulary for <http://purl.org/linked-data/cube#> # class QB < RDF::StrictVoca...
github
doriantaylor/rb-intertwingler
https://github.com/doriantaylor/rb-intertwingler
lib/intertwingler/vocab/scovo.rb
Ruby
apache-2.0
88
main
2,542
# -*- encoding: utf-8 -*- # frozen_string_literal: true # This file generated automatically using rdf vocabulary format from http://purl.org/NET/scovo# require 'intertwingler/vocab' module Intertwingler::Vocab # @!parse # # Vocabulary for <http://purl.org/NET/scovo#> # # # class SCOVO < RDF::StrictVocabul...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
Rakefile
Ruby
mit
87
master
1,238
require 'rake' begin require 'jeweler' Jeweler::Tasks.new do |s| s.name = "ffmpeg" s.summary = %Q{A dsl for building and executing ffmpeg commands} s.email = "patrik@moresale.se" s.homepage = "http://github.com/polly/ffmpeg" s.description = "A dsl for building and executing ffmpeg commands" ...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
ffmpeg.gemspec
Ruby
mit
87
master
2,806
# -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{ffmpeg} s.version = "0.2.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Patrik Hedman"] s.date = %q{2009-08-16} s.description = %q{A DSL for building and executing ...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg.rb
Ruby
mit
87
master
2,647
require 'ffmpeg/class_methods' require 'ffmpeg/main_options' require 'ffmpeg/file_extensions' require 'ffmpeg/video_options' require 'ffmpeg/video_advanced_options' require 'ffmpeg/audio_options' require 'ffmpeg/ffmpeg_command' require 'ffmpeg/helper_methods' require 'ffmpeg/meta_data' module FFMpeg include HelperMe...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg/video_advanced_options.rb
Ruby
mit
87
master
8,218
module FFMpeg module VideoAdvancedOptions # Set pixel format. Use 'list' as parameter to show all the supported pixel formats. def pixel_format(format) FFMpegCommand << "-pix_fmt #{format}" end # Set SwScaler flags (only available when compiled with swscale support). def swscaler_flags(flag...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg/audio_options.rb
Ruby
mit
87
master
1,551
module FFMpeg module AudioOptions # Set the number of audio frames to record. def audio_frames(number) FFMpegCommand << "-aframes #{number}" end # Set the audio sampling frequency (default = 44100 Hz). def audio_sampling(frequency) FFMpegCommand << "-ar #{frequency}" end # Se...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg/video_options.rb
Ruby
mit
87
master
5,682
module FFMpeg module VideoOptions # # Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg default = same as source). # The following abbreviations are recognized: # # 'sqcif' # 128x96 # 'qcif' # 176x144 # 'cif' # 352x288 # '4cif...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg/class_methods.rb
Ruby
mit
87
master
547
module FFMpeg module ClassMethods def check_method(name) print_error_message_for name if method_defined? name end def method_defined?(name) FFMpeg.instance_methods.include?(name.to_s) || FFMpeg.instance_methods.include?(name.to_sym) end private :method_defined? def print_...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg/meta_data.rb
Ruby
mit
87
master
644
module FFMpeg module MetaData EXIF_UTILITY = 'exiftool' # # Retrieves meta data from the file using exiftool, and returned in a hash # allowing for complex conversion rules. # # video_bitrate "300k" if meta[:video_bitrate].to_f > 300 # def meta if `which #{EXIF_UTILITY}`.e...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg/ffmpeg_command.rb
Ruby
mit
87
master
362
module FFMpegCommand extend self @commands = [] def <<(cmd) @commands << cmd end def add_at(cmd, pos) @commands.insert(pos, cmd) end def clear @commands.clear end def command(prefix="") returning prefix.to_s do |prefix| @commands.each do |command| prefix <<...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg/main_options.rb
Ruby
mit
87
master
3,325
module FFMpeg module MainOptions def source(*filename) FFMpegCommand << "-i #{filename}" end def target(target) FFMpegCommand << "#{target}" end # # Overwrite output file if it already exists # def overwrite_existing_file FFMpegCommand.add_at("-y", 0) ...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
lib/ffmpeg/file_extensions.rb
Ruby
mit
87
master
1,840
module FileExtensions EXT = [ "3g2", "3gp", "4xm", "IFF", "ISS", "MTV", "RoQ", "aac", "ac3", "adts", "aiff", "alaw", "amr", "apc", "ape", "asf", "asf_stream", "ass", "au", "avi", "avm2", "avs", "bethsoftvid", "bfi", "c...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
spec/spec_helper.rb
Ruby
mit
87
master
221
require 'rubygems' require 'spec' $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'ffmpeg' include FFMpeg Spec::Runner.configure do |config| end
github
polly/ffmpeg
https://github.com/polly/ffmpeg
spec/meta_spec.rb
Ruby
mit
87
master
309
require File.dirname(__FILE__) + '/spec_helper' describe "Video Meta Data" do before(:each) do @from_file = File.join(Dir.pwd, 'spec/files/terminal.mpg') end it "should get meta data" do convert @from_file, :to => :mp4 do meta[:file_name].should eql("terminal.mpg") end end end
github
polly/ffmpeg
https://github.com/polly/ffmpeg
spec/video_options_spec.rb
Ruby
mit
87
master
5,693
require File.dirname(__FILE__) + '/spec_helper' describe "FFMpeg Video Options" do before(:each) do @from_file, @to_file = "~/Desktop/test.avi", "~/Desktop/test2.avi" FFMpegCommand.clear end it "should set the resolution" do convert @from_file, :to => @to_file do resolution "vga" end ...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
spec/video_advanced_options_spec.rb
Ruby
mit
87
master
8,986
require File.dirname(__FILE__) + '/spec_helper' describe "FFMpeg Video Advanced Options" do before(:each) do @from_file, @to_file = "~/Desktop/test.avi", "~/Desktop/test2.avi" FFMpegCommand.clear end it "should set the pixel format" do convert @from_file, :to => @to_file do pixel_format 'lis...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
spec/audio_options_spec.rb
Ruby
mit
87
master
2,033
require File.dirname(__FILE__) + '/spec_helper' describe "FFMpeg Audio Options" do before(:each) do @from_file, @to_file = "~/Desktop/test.avi", "~/Desktop/test2.avi" FFMpegCommand.clear end it "should set number of frames to record" do convert @from_file, :to => @to_file do audio_frames 200...
github
polly/ffmpeg
https://github.com/polly/ffmpeg
spec/ffmpeg_spec.rb
Ruby
mit
87
master
4,613
require File.dirname(__FILE__) + '/spec_helper' describe "FFMpeg" do before(:each) do @from_file, @to_file = "~/Desktop/avi/test.avi", "~/Desktop/avi/test2.avi" @to_file_from_mp4_shortcut = "~/Desktop/avi/test.mp4" FFMpegCommand.clear end it "should generate a valid command" do convert @from_f...
github
laradji/zabbix
https://github.com/laradji/zabbix
Gemfile
Ruby
apache-2.0
87
master
270
source 'https://rubygems.org' gem 'rake' group :test do gem 'foodcritic', '~> 3.0' gem 'rubocop', '~> 0.24.0' gem 'chefspec', '~> 3.4.0' end group :integration do gem 'berkshelf', '~> 3.1' gem 'test-kitchen', '~> 1.1' gem 'kitchen-vagrant', '~> 0.14' end
github
laradji/zabbix
https://github.com/laradji/zabbix
Vagrantfile
Ruby
apache-2.0
87
master
1,777
# -*- mode: ruby -*- # vi: set ft=ruby : # This Vagrantfile needs the vagrant-omnbius plugin installed # To install this, run "vagrant plugin install vagrant-omnibus" Vagrant.configure("2") do |config| config.vm.provider :virtualbox do |vbox| vbox.customize ['modifyvm', :id, '--memory', 1024...
github
laradji/zabbix
https://github.com/laradji/zabbix
Rakefile
Ruby
apache-2.0
87
master
1,270
#!/usr/bin/env rake # Style tests. Rubocop and Foodcritic namespace :style do begin require 'rubocop/rake_task' desc 'Run Ruby style checks' RuboCop::RakeTask.new(:ruby) rescue LoadError puts '>>>>> Rubocop gem not loaded, omitting tasks' unless ENV['CI'] end begin require 'foodcritic' ...
github
laradji/zabbix
https://github.com/laradji/zabbix
metadata.rb
Ruby
apache-2.0
87
master
732
name 'zabbix' maintainer 'Nacer Laradji' maintainer_email 'nacer.laradji@gmail.com' license 'Apache 2.0' description 'Installs/Configures Zabbix Agent/Server' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.8.0' supports 'ubuntu', '>= 10.04' supports 'debian', '>= 6.0' supports 'redh...
github
laradji/zabbix
https://github.com/laradji/zabbix
test/kitchen/cookbooks/zabbix_test/recipes/server_source.rb
Ruby
apache-2.0
87
master
243
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix-test # Recipe:: server_source # # Copyright 2011, Efactures # # Apache 2.0 node.normal['zabbix']['server']['install'] = true include_recipe 'zabbix::server_source'
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/server_source.rb
Ruby
apache-2.0
87
master
5,401
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix # Recipe:: server_source # # Copyright 2011, Efactures # # Apache 2.0 # include_recipe 'zabbix::common' include_recipe 'zabbix::server_common' packages = [] case node['platform'] when 'ubuntu', 'debian' packages = %w(fping libcurl4-openss...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/agent.rb
Ruby
apache-2.0
87
master
998
include_recipe "zabbix::agent_#{node['zabbix']['agent']['install_method']}" include_recipe 'zabbix::agent_common' # Install configuration template 'zabbix_agentd.conf' do path node['zabbix']['agent']['config_file'] source 'zabbix_agentd.conf.erb' unless node['platform_family'] == 'windows' owner 'root' g...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/common.rb
Ruby
apache-2.0
87
master
1,464
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix # Recipe:: common # # Copyright 2011, Efactures # # Apache 2.0 # # Define root owned folders root_dirs = [ node['zabbix']['etc_dir'], ] # Create root folders case node['platform_family'] when 'windows' root_dirs.each do |dir| direct...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/agent_source.rb
Ruby
apache-2.0
87
master
1,362
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix # Recipe:: agent_source # # Copyright 2011, Efactures # # Apache 2.0 # include_recipe 'zabbix::agent_common' case node['platform'] when 'ubuntu', 'debian' # install some dependencies %w(fping libcurl3 libiksemel-dev libiksemel3 libsnmp-...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/web_nginx.rb
Ruby
apache-2.0
87
master
2,119
include_recipe 'zabbix::common' # Install nginx and disable default site node.override['nginx']['default_site_enabled'] = false # node.override['php-fpm']['pool']['www']['listen'] = node['zabbix']['web']['php']['fastcgi_listen'] include_recipe 'nginx' # Install php-fpm to execute PHP code from nginx include_recipe 'p...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/database.rb
Ruby
apache-2.0
87
master
2,634
include_recipe 'zabbix::common' ::Chef::Recipe.send(:include, Opscode::OpenSSL::Password) include_recipe 'database::mysql' include_recipe 'mysql::client' # Generates passwords if they aren't already set # This is INSECURE because node.normal persists the passwords to the chef # server, making them visible to anybody...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/agent_chocolatey.rb
Ruby
apache-2.0
87
master
759
# # Cookbook Name:: zabbix # Author:: Guilhem Lettron <guilhem.lettron@youscribe.com> # # Copyright 2013, Youscribe # # 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.o...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/server.rb
Ruby
apache-2.0
87
master
222
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix # Recipe:: server # # Copyright 2011, Efactures # # Apache 2.0 # include_recipe "zabbix::server_#{node['zabbix']['server']['install_method']}"
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/web_apache.rb
Ruby
apache-2.0
87
master
2,060
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix # Recipe:: web # # Copyright 2011, Efactures # # Apache 2.0 # include_recipe 'zabbix::common' directory node['zabbix']['install_dir'] do mode '0755' end unless node['zabbix']['web']['user'] node.normal['zabbix']['web']['user'] = 'apach...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/_agent_common_service.rb
Ruby
apache-2.0
87
master
645
# Manage Agent service case node['zabbix']['agent']['init_style'] when 'sysvinit' template '/etc/init.d/zabbix_agentd' do source value_for_platform_family(['rhel'] => 'zabbix_agentd.init-rh.erb', 'default' => 'zabbix_agentd.init.erb') owner 'root' group 'root' mode '754' end # Define zabbix_agent...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/_agent_common_directories.rb
Ruby
apache-2.0
87
master
304
root_dirs = [ node['zabbix']['agent']['include_dir'] ] # Create root folders root_dirs.each do |dir| directory dir do unless node['platform'] == 'windows' owner 'root' group 'root' mode '755' end recursive true notifies :restart, 'service[zabbix_agentd]' end end
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/server_common.rb
Ruby
apache-2.0
87
master
862
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix # Recipe:: server_common # # Copyright 2011, Efactures # # Apache 2.0 # if node['zabbix']['login'] # Create zabbix group group node['zabbix']['group'] do gid node['zabbix']['gid'] if node['zabbix']['gid'].nil? action :nothi...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/agent_prebuild.rb
Ruby
apache-2.0
87
master
689
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix # Recipe:: agent_prebuild # # Copyright 2011, Efactures # # Apache 2.0 # include_recipe 'zabbix::agent_common' # Install prerequisite RPM package 'redhat-lsb' if node['platform_family'] == 'rhel' ark 'zabbix_agent' do name 'zabbix' url...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/firewall.rb
Ruby
apache-2.0
87
master
1,463
# Author:: Nacer Laradji (<nacer.laradji@gmail.com>) # Cookbook Name:: zabbix # Recipe:: firewall # # Copyright 2011, Efactures # # Apache 2.0 # # This is the firewall part of zabbix installation. # include_recipe 'ufw' # enable platform default firewall firewall 'ufw' do action :enable end if node['zabbix']['serve...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/_agent_common_user.rb
Ruby
apache-2.0
87
master
544
# Manage user and group if node['zabbix']['agent']['user'] # Create zabbix group group node['zabbix']['agent']['group'] do gid node['zabbix']['agent']['gid'] if node['zabbix']['agent']['gid'] system true end # Create zabbix User user node['zabbix']['agent']['user'] do home node['zabbix']['install...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/java_gateway.rb
Ruby
apache-2.0
87
master
1,623
# Author:: Friedrich Clausen (<ftclausen@gmail.com>) # Cookbook Name:: zabbix # Recipe:: java_gateway # # Apache 2.0 # include_recipe 'java' template '/etc/zabbix/zabbix_java_gateway.conf' do source 'zabbix-java-gateway/zabbix_java_gateway.conf.erb' variables( :java_gateway_listen_ip => node['zabbix']['server...
github
laradji/zabbix
https://github.com/laradji/zabbix
recipes/agent_registration.rb
Ruby
apache-2.0
87
master
2,622
# Author:: Guilhem Lettron (<guilhem.lettron@youscribe.com>) # Cookbook Name:: zabbix # Recipe:: agent_registration # # Apache 2.0 # if !Chef::Config[:solo] zabbix_server = search(:node, 'recipe:zabbix\\:\\:server').first else if node['zabbix']['web']['fqdn'] zabbix_server = node else Chef::Log.warn('Thi...
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/source.rb
Ruby
apache-2.0
87
master
508
actions :extract_only, :install_server, :install_agent default_action :extract_only attribute :source_url, :kind_of => String, :required => true attribute :branch, :kind_of => String, :required => true attribute :version, :kind_of => String, :required => true attribute :code_dir, :kind_of => String, :required => tru...
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/application.rb
Ruby
apache-2.0
87
master
226
actions :create default_action :create attribute :name, :kind_of => String, :name_attribute => true attribute :server_connection, :kind_of => Hash, :required => true attribute :template, :kind_of => String, :required => true
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/trigger_dependency.rb
Ruby
apache-2.0
87
master
242
actions :create default_action :create attribute :trigger_name, :kind_of => String, :name_attribute => true attribute :dependency_name, :kind_of => String, :required => true attribute :server_connection, :kind_of => Hash, :required => true
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/api_call.rb
Ruby
apache-2.0
87
master
228
actions :call default_action :call attribute :server_connection, :kind_of => Hash, :required => true attribute :method, :kind_of => [String, Symbol], :required => true attribute :parameters, :kind_of => Hash, :required => true
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/trigger.rb
Ruby
apache-2.0
87
master
634
actions :create default_action :create attribute :name, :kind_of => String, :name_attribute => true attribute :expression, :kind_of => String, :required => true attribute :priority, :kind_of => Zabbix::API::TriggerPriority, :required => true attribute :description, :kind_of => String attribute :status, :kind_of => Zab...
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/graph.rb
Ruby
apache-2.0
87
master
1,551
actions :create default_action :create attribute :name, :kind_of => String, :required => true attribute :width, :kind_of => Fixnum, :default => 900 attribute :height, :kind_of => Fixnum, :default => 200 attribute :yaxismin, :kind_of => Float, :default => 0.000 attribute :yaxismax, :kind_of => Float, :default => 100....
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/item.rb
Ruby
apache-2.0
87
master
2,361
actions :create default_action :create attribute :name, :kind_of => String, :name_attribute => true attribute :template, :kind_of => String, :required => true attribute :applications, :kind_of => Array, :required => true attribute :key, :kind_of => String, :required => true attribute :type, :kind_of => Chef::Zabbix::A...
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/discovery_rule.rb
Ruby
apache-2.0
87
master
1,584
actions :create default_action :create attribute :name, :kind_of => String, :name_attribute => true attribute :key, :kind_of => String, :required => true attribute :type, :kind_of => Chef::Zabbix::API::ItemType, :required => true attribute :template, :kind_of => String, :required => true attribute :server_connection, ...
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/user.rb
Ruby
apache-2.0
87
master
1,242
actions :create_or_update, :create, :update, :delete default_action :create_or_update attribute :alias, :kind_of => String, :name_attribute => true, :required => true attribute :password, :kind_of => String attribute :first_name, :kind_of => String attribute :surname, :kind_of => String attribute :type, :kind_of => ...
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/template.rb
Ruby
apache-2.0
87
master
241
actions :create # , :delete default_action :create attribute :name, :kind_of => String, :name_attribute => true attribute :server_connection, :kind_of => Hash, :required => true attribute :group, :kind_of => String, :default => 'Templates'
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/database.rb
Ruby
apache-2.0
87
master
1,021
actions :create default_action :create attr_accessor :exists def initialize(name, run_context = nil) super @provider ||= Chef::Provider::ZabbixDatabaseMySql end attribute :dbname, :kind_of => String, :name_attribute => true attribute :host, :kind_of => String, :required => true attribute :port, :kind_of => Integ...
github
laradji/zabbix
https://github.com/laradji/zabbix
resources/host.rb
Ruby
apache-2.0
87
master
1,207
actions :create_or_update, :create, :update, :link default_action :create_or_update attribute :hostname, :kind_of => String, :name_attribute => true attribute :ipmi_auth_type, :kind_of => Chef::Zabbix::API::IPMIAuthType, :default => Chef::Zabbix::API::IPMIAuthType.default attribute :ipmi_privilege, :kind_of => Chef::...
github
laradji/zabbix
https://github.com/laradji/zabbix
spec/zabbix_web_apache_spec.rb
Ruby
apache-2.0
87
master
1,116
require 'spec_helper' describe 'zabbix::web_apache' do context 'on Ubuntu 12.04' do let(:chef_run) do ChefSpec::Runner.new(platform: 'ubuntu', version: '12.04') .converge(described_recipe) end it 'installs required packages' do %w(php5-mysql php5-gd libapache2-mod-php5).each do |pack...
github
laradji/zabbix
https://github.com/laradji/zabbix
attributes/database.rb
Ruby
apache-2.0
87
master
654
default['zabbix']['database']['install_method'] = 'mysql' default['zabbix']['database']['dbname'] = 'zabbix' default['zabbix']['database']['dbuser'] = 'zabbix' default['zabbix']['database']['dbhost'] = 'localhost' default['zabbix']['database']['dbpassword'] = nil default[...
github
laradji/zabbix
https://github.com/laradji/zabbix
attributes/server.rb
Ruby
apache-2.0
87
master
1,407
include_attribute 'zabbix' default['zabbix']['server']['version'] = '2.0.3' default['zabbix']['server']['branch'] = 'ZABBIX%20Latest%20Stable' default['zabbix']['server']['source_url'] = nil default['zabbix']['server']['install_method'] = 'source' default['zabbix']['s...