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
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/permute/cardinality_spec.rb
Ruby
mit
47
main
4,106
require 'spec_helper' require 'combinatorics/permute' describe Combinatorics::Permute do describe "cardinality" do it "should raise RangeError if n is negative without passing r" do expect { subject.cardinality(-1) }.to raise_error(RangeError) end it "should raise RangeError if n is negative when ...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/permute/mixin_examples.rb
Ruby
mit
47
main
1,028
require 'spec_helper' require 'combinatorics/permute' shared_examples_for "Permute::Mixin" do describe "#permute" do it "should return [[]] for [].permute(0).to_a" do set = subject[] results = set.permute(0).to_a expect(results).to eq([[]]) end it "should return [[]] for [1...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/cartesian_product/set_spec.rb
Ruby
mit
47
main
213
require 'spec_helper' require 'cartesian_product/mixin_examples' require 'combinatorics/cartesian_product/extensions/set' describe Set do subject { Set } it_should_behave_like "CartesianProduct::Mixin" end
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/cartesian_product/array_spec.rb
Ruby
mit
47
main
219
require 'spec_helper' require 'cartesian_product/mixin_examples' require 'combinatorics/cartesian_product/extensions/array' describe Array do subject { Array } it_should_behave_like "CartesianProduct::Mixin" end
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/cartesian_product/mixin_examples.rb
Ruby
mit
47
main
2,633
require 'spec_helper' require 'combinatorics/cartesian_product/mixin' shared_examples_for "CartesianProduct::Mixin" do it "the cartprod of any two Set's should return an Enumerator" do set = subject[1] results = set.cartprod(set) expect(results).to be_kind_of(Enumerator) end it "the cartprod o...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/cartesian_product/cardinality_spec.rb
Ruby
mit
47
main
1,740
require 'spec_helper' require 'combinatorics/cartesian_product' describe Combinatorics::CartesianProduct do describe "cardinality" do it "should return 1 for cardinality(1, 1)" do expect(subject.cardinality(1, 1)).to eq(1) end it "should return 2 for cardinality(1, 2)" do expect(subject.car...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/power_set/cardinality_spec.rb
Ruby
mit
47
main
666
require 'spec_helper' require 'combinatorics/power_set' describe Combinatorics::PowerSet do describe "cardinality" do it "should return 1 for cardinality(0)" do subject.cardinality(0) == 1 end it "should return 1 for cardinality(1)" do subject.cardinality(1) == 1 end it "should ret...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/power_set/mixin_examples.rb
Ruby
mit
47
main
747
require 'spec_helper' require 'combinatorics/power_set' shared_examples_for "PowerSet::Mixin" do let(:empty_set) { Set[] } it "the powerset of an empty Set should only contain the empty Set" do set = subject[] expect(set.powerset.to_a).to eq([empty_set]) end it "the powerset of a single Set should ...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/derange/mixin_examples.rb
Ruby
mit
47
main
1,249
require 'spec_helper' require 'combinatorics/derange' shared_examples_for "Derange::Mixin" do it "the derange of an empty Set should only contain an empty Array" do set = subject[] results = set.derange.to_a expect(results).to eq([[]]) end it "should return [[]] for [1].derange.to_a" do ...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/derange/cardinality_spec.rb
Ruby
mit
47
main
282
require 'spec_helper' require 'combinatorics/derange/cardinality' describe Combinatorics::Derange do it "should alias cardinality to subfactorial" do should respond_to(:cardinality) end it "should wrap subfactorial with Derange.D" do should respond_to(:D) end end
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/choose/mixin_examples.rb
Ruby
mit
47
main
1,125
require 'spec_helper' require 'combinatorics/choose' shared_examples_for "Choose::Mixin" do let(:empty_set) { Set[] } it "should return [[]] for [].choose(0).to_a" do set = subject[] results = set.choose(0).to_a expect(results).to eq([empty_set]) end it "should return [[]] for [1].choose(0)....
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/choose/cardinality_spec.rb
Ruby
mit
47
main
3,816
require 'spec_helper' require 'combinatorics/choose' describe Combinatorics::Choose do describe "cardinality" do it "should raise RangeError if n is negative" do expect { subject.cardinality(-1) }.to raise_error(RangeError) end it "should raise RangeError if n is negative" do expect { subjec...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/extensions/range_spec.rb
Ruby
mit
47
main
1,530
require 'spec_helper' require 'combinatorics/extensions/range' describe Range do describe "&" do it "should pick the maximum beginning value" do expect(((100..200) & (150..200)).first).to eq(150) end it "should pick the minimum ending value" do expect(((100..150) & (100..200)).last).to eq(15...
github
postmodern/combinatorics.rb
https://github.com/postmodern/combinatorics.rb
spec/extensions/math_spec.rb
Ruby
mit
47
main
2,469
require 'spec_helper' require 'combinatorics/extensions/math' describe Math do it "should alias Sigma to sigma" do should respond_to(:Sigma) end it "should alias Pi to pi" do should respond_to(:Pi) end describe "sigma" do it "should return 6 for sigma(1..3)" do expect(subject.sigma(1..3))...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
actionview_attribute_builders.gemspec
Ruby
mit
47
main
933
require_relative "lib/actionview_attribute_builders/version" Gem::Specification.new do |spec| spec.name = "actionview_attribute_builders" spec.version = ActionviewAttributeBuilders::VERSION spec.authors = ["Julián Pinzón Eslava"] spec.email = ["dev@julianpinzon.com"] spec.homepage = "...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
Gemfile
Ruby
mit
47
main
320
source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } # Specify your gem's dependencies in actionview_attribute_builders.gemspec. gemspec gem "puma" gem "sqlite3" gem "sprockets-rails" # Start debugger with binding.b [https://github.com/ruby/debug] # gem "debug", ">= 1.0.0"
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
examples/shoelace/shoelace_form_builder.rb
Ruby
mit
47
main
2,794
class ShoelaceFormBuilder < ApplicationFormBuilder def text_field(method, options = {}) attribute_builder = text_field_attribute_builder(method, options) html_attributes = attribute_builder.html_attributes @template.content_tag("sl-input", nil, html_attributes.merge!(options)) end def number_field(m...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
examples/material_design/material_form_builder.rb
Ruby
mit
47
main
2,947
class MaterialFormBuilder < ApplicationFormBuilder def text_field(method, options = {}) attribute_builder = text_field_attribute_builder(method, options) html_attributes = attribute_builder.html_attributes @template.content_tag("md-outlined-text-field", nil, html_attributes.merge!(options)) end def ...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/engine.rb
Ruby
mit
47
main
418
module ActionviewAttributeBuilders class Engine < ::Rails::Engine isolate_namespace ActionviewAttributeBuilders ActiveSupport.on_load(:action_view) do require "actionview_attribute_builders/attribute_builders" require "actionview_attribute_builders/attribute_builders_helper" ActionView::Hel...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders.rb
Ruby
mit
47
main
1,463
# frozen_string_literal: true # require_relative "attribute_builders/base" require_relative "attribute_builders/checkable" require_relative "attribute_builders/text_field" require_relative "attribute_builders/datetime_field" require_relative "attribute_builders/check_box" require_relative "attribute_builders/color_fie...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders_helper.rb
Ruby
mit
47
main
4,815
module ActionviewAttributeBuilders module AttributeBuildersHelper def checkbox_attribute_builder(method, options, checked_value) ActionView::Helpers::AttributeBuilders::CheckBox.new(object_name, method, @template, checked_value, options) end def collection_check_boxes_attribute_builder raise...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/text_field.rb
Ruby
mit
47
main
891
# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView module Helpers module AttributeBuilders # :nodoc: class TextField < Base # :nodoc: include Tags::Placeholderable def html_attributes options = @options.stringify_keys opt...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/button.rb
Ruby
mit
47
main
1,198
# frozen_string_literal: true # require "action_view/helpers/attribute_builders/submittable" module ActionView module Helpers module AttributeBuilders # :nodoc: class Button # :nodoc: include Submittable attr_reader :value def initialize(value = nil, options = {}, object, object_n...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/checkable.rb
Ruby
mit
47
main
411
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: module Checkable # :nodoc: def input_checked?(options) if options.has_key?("checked") checked = options.delete "checked" checked == true || checked == "checked" ...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/datetime_field.rb
Ruby
mit
47
main
999
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class DatetimeField < TextField # :nodoc: def html_attributes options = @options.stringify_keys options["value"] = datetime_value(options["value"] || value) options["min"]...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/date_field.rb
Ruby
mit
47
main
288
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class DateField < DatetimeField # :nodoc: private def format_datetime(value) value&.strftime("%Y-%m-%d") end end end end end
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/base.rb
Ruby
mit
47
main
6,984
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class Base # :nodoc: include Helpers::ActiveModelInstanceTag, Helpers::FormTagHelper include FormOptionsHelper attr_reader :object def initialize(object_name, method_name, tem...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/radio_button.rb
Ruby
mit
47
main
892
# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView module Helpers module AttributeBuilders # :nodoc: class RadioButton < Base # :nodoc: include Tags::Checkable def initialize(object_name, method_name, template_object, tag_value, options) ...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/check_box.rb
Ruby
mit
47
main
1,454
# frozen_string_literal: true # require "action_view/helpers/attribute_builders/checkable" module ActionView module Helpers module AttributeBuilders # :nodoc: class CheckBox < Base # :nodoc: include Checkable def initialize(object_name, method_name, template_object, checked_value, options...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/week_field.rb
Ruby
mit
47
main
286
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class WeekField < DatetimeField # :nodoc: private def format_datetime(value) value&.strftime("%Y-W%V") end end end end end
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/hidden_field.rb
Ruby
mit
47
main
277
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class HiddenField < TextField # :nodoc: def html_attributes @options[:autocomplete] = "off" super end end end end end
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/number_field.rb
Ruby
mit
47
main
461
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class NumberField < TextField # :nodoc: def html_attributes options = @options.stringify_keys if range = options.delete("in") || options.delete("within") options.update...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/time_field.rb
Ruby
mit
47
main
571
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class TimeField < DatetimeField # :nodoc: def initialize(object_name, method_name, template_object, options = {}) @include_seconds = options.delete(:include_seconds) { true } super ...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/datetime_local_field.rb
Ruby
mit
47
main
714
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class DatetimeLocalField < DatetimeField # :nodoc: def initialize(object_name, method_name, template_object, options = {}) @include_seconds = options.delete(:include_seconds) { true } ...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/search_field.rb
Ruby
mit
47
main
661
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class SearchField < TextField # :nodoc: def html_attributes options = @options.stringify_keys if options["autosave"] if options["autosave"] == true option...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/month_field.rb
Ruby
mit
47
main
286
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class MonthField < DatetimeField # :nodoc: private def format_datetime(value) value&.strftime("%Y-%m") end end end end end
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/color_field.rb
Ruby
mit
47
main
603
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class ColorField < TextField # :nodoc: def html_attributes options = @options.stringify_keys options["value"] ||= validate_color_string(value) @options = options ...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/submittable.rb
Ruby
mit
47
main
1,107
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: module Submittable # :nodoc: include ModelNaming private def submit_default_value object = convert_to_model(@object) key = object ? (object.persisted? ? :u...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/select.rb
Ruby
mit
47
main
1,403
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class Select < Base # :nodoc: def initialize(object_name, method_name, template_object, options, html_options) @html_options = html_options super(object_name, method_name, template...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/label.rb
Ruby
mit
47
main
1,083
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class Label < Base # :nodoc: def initialize(object_name, method_name, template_object, content_or_options, options = nil) options ||= {} if content_or_options.is_a?(Hash) ...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/submit.rb
Ruby
mit
47
main
649
# frozen_string_literal: true # require "action_view/helpers/attribute_builders/submittable" module ActionView module Helpers module AttributeBuilders # :nodoc: class Submit # :nodoc: include Submittable attr_reader :value def initialize(value = nil, options = {}, object, object_n...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/text_area.rb
Ruby
mit
47
main
673
# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView module Helpers module AttributeBuilders # :nodoc: class TextArea < Base # :nodoc: include Tags::Placeholderable def html_attributes options = @options.stringify_keys ...
github
pinzonjulian/actionview_attribute_builders
https://github.com/pinzonjulian/actionview_attribute_builders
lib/actionview_attribute_builders/attribute_builders/password_field.rb
Ruby
mit
47
main
290
# frozen_string_literal: true module ActionView module Helpers module AttributeBuilders # :nodoc: class PasswordField < TextField # :nodoc: def html_attributes @options = { value: nil }.merge!(@options) super end end end end end
github
condor/ltsv
https://github.com/condor/ltsv
ltsv.gemspec
Ruby
mit
47
master
744
# -*- encoding: utf-8 -*- lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'ltsv' Gem::Specification.new do |gem| gem.name = "ltsv" gem.version = LTSV::VERSION gem.authors = ["condor"] gem.email = ["condor1226@gmail.com"] ...
github
condor/ltsv
https://github.com/condor/ltsv
spec/ltsv_spec.rb
Ruby
mit
47
master
4,085
require 'spec_helper' describe LTSV do describe :parse do context 'String argument' do it 'can parse labeled tab separated values into a hash in an array' do line = "label1:value1\tlabel2:value2" LTSV.parse(line).should == [{:label1 => 'value1', :label2 => 'value2'}] end it 'c...
github
condor/ltsv
https://github.com/condor/ltsv
lib/ltsv.rb
Ruby
mit
47
master
4,324
# = ltsv - A parser / dumper for Labelled Tab-Separated Values(LTSV) # # Copyright (C) 2013 TOYODA Naoto. # # module LTSV VERSION = "0.1.2" # Parsing given stream or string. # If you specified a stream as the first argument, # this method behaves as same as #load. # # == Arguments: # * _io_or_string_: a ...
github
sensepost/go-derper
https://github.com/sensepost/go-derper
go-derper.rb
Ruby
bsd-3-clause
47
master
28,656
#!/usr/bin/env ruby require 'digest/sha1' require "getoptlong" #require 'rubygems' require 'memcacheex' require 'zlib' #while true do # key=(rand*100).to_i.to_s # value=(rand*10000).to_i.to_s # CACHE.set(key,value) #end class Console def Console.clear $stdout.write "#{27.chr}[2J" if @@minl >= INFO end e...
github
sensepost/go-derper
https://github.com/sensepost/go-derper
memcache.rb
Ruby
bsd-3-clause
47
master
35,293
# encoding: utf-8 $TESTING = defined?($TESTING) && $TESTING require 'socket' require 'thread' require 'zlib' require 'digest/sha1' require 'net/protocol' require 'memcache/version' begin # Try to use the SystemTimer gem instead of Ruby's timeout library # when running on Ruby 1.8.x. See: # http://ph7spot.com/...
github
sensepost/go-derper
https://github.com/sensepost/go-derper
memcacheex.rb
Ruby
bsd-3-clause
47
master
6,500
require 'rubygems' require 'memcache' module Debug DEBUG=1 VERBOSE=2 INFO=3 WARNING=4 ERROR=5 NONE=6 @@minl = INFO def dbgprint(level, msg) if level >= @@minl then case level when DEBUG print "[d] " when VERBOSE print "[v] " when INFO prin...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
Rakefile
Ruby
mit
47
master
233
require 'bundler/gem_tasks' 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
didww/activeresource-response
https://github.com/didww/activeresource-response
activeresource-response.gemspec
Ruby
mit
47
master
1,146
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "active_resource_response/version" Gem::Specification.new do |s| s.name = "activeresource-response" s.version = ActiveResourceResponse::Version::VERSION s.authors = ["Igor Fedoronchuk"] s.email = ["fedoronchu...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
test/active_resource_response_test.rb
Ruby
mit
47
master
6,772
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
test/lint_test.rb
Ruby
mit
47
master
1,727
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
test/test_helper.rb
Ruby
mit
47
master
460
require 'minitest/autorun' require 'i18n' lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") unit_tests = File.expand_path("#{File.dirname(__FILE__)}/../test") $:.unshift(lib) $:.unshift(unit_tests) I18n.config.enforce_available_locales = true require 'active_resource_response' require "fixtures/country" requir...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/activeresource-response.rb
Ruby
mit
47
master
1,140
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/active_resource_response.rb
Ruby
mit
47
master
1,610
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/active_resource_response/http_mock.rb
Ruby
mit
47
master
1,679
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/active_resource_response/lint.rb
Ruby
mit
47
master
1,237
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/active_resource_response/connection.rb
Ruby
mit
47
master
2,026
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/active_resource_response/custom_methods.rb
Ruby
mit
47
master
1,782
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/active_resource_response/http_response.rb
Ruby
mit
47
master
1,971
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/active_resource_response/version.rb
Ruby
mit
47
master
1,185
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
didww/activeresource-response
https://github.com/didww/activeresource-response
lib/active_resource_response/response_method.rb
Ruby
mit
47
master
2,392
#-- # Copyright (c) 2012 Igor Fedoronchuk # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
campaigning.gemspec
Ruby
mit
47
master
2,303
# Generated by jeweler # DO NOT EDIT THIS FILE # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec` # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{campaigning} s.version = "0.15.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_v...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
Rakefile
Ruby
mit
47
master
1,545
require 'rubygems' require 'rake' begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "campaigning" gem.summary = %Q{TODO} gem.email = "gnumarcelo@gmail.com" gem.homepage = "http://github.com/gnumarcelo/campaigning" gem.authors = ["Marcelo Menezes"] gem.add_dependency('soap4r', '...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/campaign.rb
Ruby
mit
47
master
10,799
# Campaign is defined in soap/default.rb which is automatically generated. # In this file we add additional methods to the Campaign class. require File.expand_path(File.dirname(__FILE__)) + '/module_mixin' module Campaigning class Campaign include ModuleMixin attr_accessor :campaignID attr_accessor :...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/campaigning.rb
Ruby
mit
47
master
2,267
gem "soap4r", "~> 1.5.0" require File.expand_path(File.dirname(__FILE__)) + '/template.rb' require File.expand_path(File.dirname(__FILE__)) + '/client.rb' require File.expand_path(File.dirname(__FILE__)) + '/campaign.rb' require File.expand_path(File.dirname(__FILE__)) + '/subscriber.rb' require File.expand_path(File.d...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/list.rb
Ruby
mit
47
master
12,715
# Campaign is defined in soap/default.rb which is automatically generated. # In this file we add additional methods to the Campaign class. require File.expand_path(File.dirname(__FILE__)) + '/module_mixin' module Campaigning class List include ModuleMixin attr_accessor :listID attr_accessor :name ...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/module_mixin.rb
Ruby
mit
47
master
983
require File.expand_path(File.dirname(__FILE__)) + '/soap/generated/defaultDriver.rb' module Campaigning module ModuleMixin #:nodoc: #DefaultEndpointUrl = "http://api.createsend.com/api/api.asmx" @@soap = Campaigning::ApiSoap.new def self.included(base) base.extend(ClassMethods) # Make all ClassMet...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/client.rb
Ruby
mit
47
master
16,661
# Client is defined in default.rb which is automatically generated. # In this file we add additional methods to the Client class. require File.expand_path(File.dirname(__FILE__)) + '/module_mixin' module Campaigning class Client include ModuleMixin attr_accessor :clientID attr_accessor :name def...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/subscriber.rb
Ruby
mit
47
master
6,233
# Subscriber is defined in default.rb which is automatically generated. # In this file we add additional methods to the Subscriber class. require File.expand_path(File.dirname(__FILE__)) + '/module_mixin' module Campaigning class Subscriber include ModuleMixin attr_accessor :emailAddress attr_accessor...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/template.rb
Ruby
mit
47
master
5,465
# Template is defined in soap/default.rb which is automatically generated. # In this file we add additional methods to the Template class. require File.expand_path(File.dirname(__FILE__)) + '/module_mixin' module Campaigning class Template include ModuleMixin attr_accessor :templateID attr_accessor :nam...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/soap/generated/defaultDriver.rb
Ruby
mit
47
master
23,285
require File.expand_path(File.dirname(__FILE__)) + '/default.rb' require File.expand_path(File.dirname(__FILE__)) + '/defaultMappingRegistry.rb' require 'soap/rpc/driver' module Campaigning class ApiSoap < ::SOAP::RPC::Driver DefaultEndpointUrl = "http://api.createsend.com/api/api.asmx" Methods = [ [ "http:/...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/soap/generated/defaultMappingRegistry.rb
Ruby
mit
47
master
65,654
require File.expand_path(File.dirname(__FILE__)) + '/default.rb' require 'soap/mapping' module Campaigning module DefaultMappingRegistry EncodedRegistry = ::SOAP::Mapping::EncodedRegistry.new LiteralRegistry = ::SOAP::Mapping::LiteralRegistry.new NsApi = "http://api.createsend.com/api/" EncodedRegistry.regis...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
lib/campaigning/soap/generated/default.rb
Ruby
mit
47
master
48,321
require 'xsd/qname' module Campaigning # {http://api.createsend.com/api/}Result # code - SOAP::SOAPInt # message - SOAP::SOAPString class Result attr_accessor :code attr_accessor :message def initialize(code = nil, message = nil) @code = code @message = message end end # {http://api.createsend....
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
test/client_test.rb
Ruby
mit
47
master
4,113
require 'test_helper' # Replace this API key with your own (http://www.campaignmonitor.com/api/) CAMPAIGN_MONITOR_API_KEY = '__PUT_YOUR_API_KEY_HERE__' class ClientTest < Test::Unit::TestCase def setup #Campaigning.set_endpoint_url "http://127.0.0.1:8088/mockapiSoap" #Campaigning.set_debug_mode(:on) ...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
test/campaign_test.rb
Ruby
mit
47
master
3,403
require 'test_helper' # Replace this API key with your own (http://www.campaignmonitor.com/api/) CAMPAIGN_MONITOR_API_KEY = '__PUT_YOUR_API_KEY_HERE__' class CampaignTest < Test::Unit::TestCase def setup #Campaigning.set_endpoint_url "http://127.0.0.1:8088/mockapiSoap" Campaigning.set_debug_mode(:on) e...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
test/template_test.rb
Ruby
mit
47
master
1,976
require 'test_helper' # Replace this API key with your own (http://www.campaignmonitor.com/api/) CAMPAIGN_MONITOR_API_KEY = '__PUT_YOUR_API_KEY_HERE__' HTML_PAGE_URL = "http://s4ve.as:80/pages/download/17767/template-with-editor-tags.html" ZIP_FILE_URL = "http://s4ve.as:80/pages/download/17766/Archive.zip" SCREENSHOT...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
test/campaigning_test.rb
Ruby
mit
47
master
740
require 'test_helper' # Replace this API key with your own (http://www.campaignmonitor.com/api/) CAMPAIGN_MONITOR_API_KEY = '__PUT_YOUR_API_KEY_HERE__' class CampaigningTest < Test::Unit::TestCase def setup #Campaigning.set_endpoint_url "http://127.0.0.1:8088/mockapiSoap" end def test_campaigning_system...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
test/subscriber_test.rb
Ruby
mit
47
master
2,023
require 'test_helper' # Replace this API key with your own (http://www.campaignmonitor.com/api/) CAMPAIGN_MONITOR_API_KEY = '__PUT_YOUR_API_KEY_HERE__' class SubscriberTest < Test::Unit::TestCase def setup #Campaigning.set_endpoint_url "http://127.0.0.1:8088/mockapiSoap" Campaigning.set_debug_mode(:on) ...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
test/list_test.rb
Ruby
mit
47
master
3,796
require 'test_helper' # Replace this API key with your own (http://www.campaignmonitor.com/api/) CAMPAIGN_MONITOR_API_KEY = '__PUT_YOUR_API_KEY_HERE__' class ListTest < Test::Unit::TestCase def setup #Campaigning.set_endpoint_url "http://127.0.0.1:8088/mockapiSoap" Campaigning.set_debug_mode(:on) end ...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
test/test_helper.rb
Ruby
mit
47
master
225
require 'rubygems' require 'test/unit' $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') require File.expand_path(File.dirname(__FILE__)) + '/../lib/campaigning' require 'campaigning' class Test::Unit::TestCase end
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
sample/campaign_sample.rb
Ruby
mit
47
master
4,773
require 'rubygems' require 'campaigning' CAMPAIGN_MONITOR_API_KEY = '__PUT__YOUR__API__KEY__HERE__' # SETUP FOR THIS SAMPLE --------------------------------------------------------------------- #Creating a Client for this sample execution client = Campaigning::Client.create!( :companyName => "Client to Sample", ...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
sample/subscriber_sample.rb
Ruby
mit
47
master
3,652
require 'rubygems' require 'campaigning' CAMPAIGN_MONITOR_API_KEY = '__PUT__YOUR__API__KEY__HERE__' # SETUP FOR THIS SAMPLE --------------------------------------------------------------------- #Creating a list for sample execution client = Campaigning::Client.find_by_name("Client One Company") list = Campaigning::...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
sample/campaigning_sample.rb
Ruby
mit
47
master
672
require 'rubygems' require 'campaigning' CAMPAIGN_MONITOR_API_KEY = '__PUT__YOUR__API__KEY__HERE__' #How to get a system Date from the API server date_time = Campaigning.system_date puts "API get the system date from the API server: #{date_time.inspect}" #Here is how to set the debug mode for the SOAP requests t...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
sample/list_sample.rb
Ruby
mit
47
master
6,602
require 'rubygems' require 'campaigning' CAMPAIGN_MONITOR_API_KEY = '__PUT__YOUR__API__KEY__HERE__' #Here is how to create a brand new subscriber list client = Campaigning::Client.find_by_name("Client One Company") list = Campaigning::List.create!( :clientID => client.clientID, :title => "List from Sample Exec"...
github
gnumarcelo/campaigning
https://github.com/gnumarcelo/campaigning
sample/client_sample.rb
Ruby
mit
47
master
5,474
require 'rubygems' require 'campaigning' CAMPAIGN_MONITOR_API_KEY = '__PUT__YOUR__API__KEY__HERE__' # Here is how to get a list of all clients... clients = Campaigning::Client.get_all_clients puts "All my clients: #{clients.inspect}" # Here is how to create a new client client = Campaigning::Client.create!( :co...
github
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
hashie-forbidden_attributes.gemspec
Ruby
mit
47
master
1,186
$LOAD_PATH.push File.expand_path('lib', __dir__) require 'hashie-forbidden_attributes/version' Gem::Specification.new do |s| s.name = 'hashie-forbidden_attributes' s.version = HashieForbiddenAttributes::VERSION s.authors = ['Maxim-Filimonov', 'Daniel Doubrovkine'] s.email = ['tpaktopsp@gm...
github
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
Rakefile
Ruby
mit
47
master
547
begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end Bundler::GemHelper.install_tasks require 'rake/testtask' Rake::TestTask.new(:test) do |t| t.libs << 'lib' t.libs << 'test' t.pattern = 'test/**/*_test.rb' t.verbose = false end ...
github
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
test/test_helper.rb
Ruby
mit
47
master
460
# Configure Rails Environment ENV['RAILS_ENV'] = 'test' require File.expand_path('dummy/config/environment.rb', __dir__) require 'rails/test_help' Rails.backtrace_cleaner.remove_silencers! # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } # Load fixtures from the engine if...
github
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
test/hashie_forbidden_attributes_test.rb
Ruby
mit
47
master
358
require 'test_helper' class HashieForbiddenAttributesTest < ActiveSupport::TestCase def setup @mash = Hashie::Mash.new end test 'mash does not respond to permitted?' do assert_equal false, @mash.respond_to?(:permitted?) end test 'mash does not handle permitted? method' do assert_raises(Argument...
github
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
test/dummy/config/application.rb
Ruby
mit
47
master
335
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require(*Rails.groups) module Dummy class Application < Rails::Application # Auto load grape api config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb') config.autoload_paths += Dir[Rails.root.join('app', 'api', '...
github
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
test/dummy/config/environments/test.rb
Ruby
mit
47
master
1,706
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
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
test/dummy/db/schema.rb
Ruby
mit
47
master
934
# 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
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
test/integration/hashie_mash_with_active_record_test.rb
Ruby
mit
47
master
233
require 'test_helper' class HashieMashWithActiveRecordTest < ActionDispatch::IntegrationTest test 'bird can be created with mash' do assert_difference('Bird.count', +1) do post '/birds', name: 'Birdie' end end end
github
Maxim-Filimonov/hashie-forbidden_attributes
https://github.com/Maxim-Filimonov/hashie-forbidden_attributes
lib/hashie-forbidden_attributes/hashie/mash.rb
Ruby
mit
47
master
297
require 'hashie/mash' module Hashie class Mash def respond_to_missing?(method_name, *args) return false if method_name == :permitted? super end def method_missing(method_name, *args) raise ArgumentError if method_name == :permitted? super end end end
github
nov/openid_connect_sample
https://github.com/nov/openid_connect_sample
Gemfile
Ruby
mit
47
master
509
source 'http://rubygems.org' gem 'rails', '~>3.2' gem 'jquery-rails' gem 'squeel' gem 'constant_cache' gem 'html5_validators' gem 'validate_url' gem 'validate_email' gem 'fb_graph' gem 'rack-oauth2' gem 'openid_connect' gem 'public_suffix', '< 3.0' gem 'json-jwt', '<= 1.9.2' group :development, :test do gem 'sqlite...
github
nov/openid_connect_sample
https://github.com/nov/openid_connect_sample
Rakefile
Ruby
mit
47
master
269
# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) require 'rake' ConnectOp::Application.load_tasks
github
nov/openid_connect_sample
https://github.com/nov/openid_connect_sample
config/application.rb
Ruby
mit
47
master
2,740
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 ConnectOp class Application < Rails::Application ...
github
nov/openid_connect_sample
https://github.com/nov/openid_connect_sample
config/routes.rb
Ruby
mit
47
master
732
ConnectOp::Application.routes.draw do resource :session, only: :destroy resource :dashboard, only: :show resources :clients, except: :show resources :authorizations, only: [:new, :create] namespace :connect do resource :fake, only: :create resource :facebook, only: :show resource :google, ...