repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_sqldb.rb | <filename>lib/puppet/face/azure_sqldb.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'puppet... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_servicebus/delete_topic.rb | <filename>lib/puppet/face/azure_servicebus/delete_topic.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#-------------------------------------------------------------------------... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_vm/add_disk.rb | <filename>lib/puppet/face/azure_vm/add_disk.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encodin... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_affinitygroup/create.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
Puppet::Face.define :azure_affinitygr... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/application/azure_servicebus.rb | require 'puppet/application/face_base'
class Puppet::Application::AzureServicebus < Puppet::Application::FaceBase
end
|
Bhaskers-Blu-Org2/azure-puppet | spec/unit/puppet/face/azure_vm/update_endpoint_spec.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'spec_helper'
describe Puppet... |
Bhaskers-Blu-Org2/azure-puppet | spec/unit/puppet/face/azure_storage/list_spec.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'spec_helper'
describe Puppet... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_vnet/list.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'tilt'
Puppet::Face.define :a... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_sqldb/delete_firewall.rb | <filename>lib/puppet/face/azure_sqldb/delete_firewall.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
... |
Bhaskers-Blu-Org2/azure-puppet | spec/unit/puppet/face/azure_vm/servers_spec.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'spec_helper'
describe Puppet... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_cloudservice/delete_deployment.rb | <reponame>Bhaskers-Blu-Org2/azure-puppet
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF... |
Bhaskers-Blu-Org2/azure-puppet | spec/unit/puppet/face/azure_vm/bootstrap_spec.rb | <gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'spec_helper'
... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_servicebus/create_topic.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
Puppet::Face.define :azure_servicebus,... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/application/azure_queue.rb | <reponame>Bhaskers-Blu-Org2/azure-puppet
require 'puppet/application/face_base'
class Puppet::Application::AzureQueue < Puppet::Application::FaceBase
end
|
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_vm/bootstrap.rb | <reponame>Bhaskers-Blu-Org2/azure-puppet<filename>lib/puppet/face/azure_vm/bootstrap.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_sqldb/list.rb | <gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'tilt'
Puppet:... |
Bhaskers-Blu-Org2/azure-puppet | spec/support/credential_validation.rb | <gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
shared_examples 'valid... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_cloudservice/create.rb | <filename>lib/puppet/face/azure_cloudservice/create.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
#... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_sqldb/create_firewall.rb | <gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
Puppet::Face.define :a... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_servicebus/list_topics.rb | <reponame>Bhaskers-Blu-Org2/azure-puppet
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'tilt'
... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_cloudservice/list.rb | <filename>lib/puppet/face/azure_cloudservice/list.rb<gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#-----------------------------------------------------------------... |
Bhaskers-Blu-Org2/azure-puppet | spec/unit/puppet/face/azure_cloudservice/list_spec.rb | <reponame>Bhaskers-Blu-Org2/azure-puppet
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF... |
Bhaskers-Blu-Org2/azure-puppet | spec/unit/puppet/face/azure_vnet/set_xml_schema_spec.rb | <gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'spec_helper'
... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_affinitygroup/list.rb | <filename>lib/puppet/face/azure_affinitygroup/list.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# ... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_cloudservice/upload_certificate.rb | <reponame>Bhaskers-Blu-Org2/azure-puppet
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_vm/locations.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
Puppet::Face.define :azure_vm, '1.0.0... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/virtual_network.rb | <reponame>Bhaskers-Blu-Org2/azure-puppet
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'puppet... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_sqldb/list_firewall.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
Puppet::Face.define :azure_sqldb, '1.... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_servicebus/list_queues.rb | <reponame>Bhaskers-Blu-Org2/azure-puppet
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'tilt'
... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_vm/update_endpoint.rb | <filename>lib/puppet/face/azure_vm/update_endpoint.rb<gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#----------------------------------------------------------------... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_storage/list.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'tilt'
Puppet::Face.define :a... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_vm/servers.rb | <filename>lib/puppet/face/azure_vm/servers.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding... |
Bhaskers-Blu-Org2/azure-puppet | spec/spec_helper.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'puppet'
require 'puppet/face... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_sqldb/create.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
Puppet::Face.define :azure_sqldb, '1.... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_queue.rb | <filename>lib/puppet/face/azure_queue.rb
require 'puppet/service_bus'
Puppet::Face.define(:azure_queue, '1.0.0') do
summary 'View and manage Window Azure database servers.'
description <<-'EOT'
This subcommand provides a command line interface to work with Windows Azure
machine instances. The goal of thes... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/sql_database.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'puppet/core/utility'
require 'puppet/applicatio... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/option_validation.rb | <gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
module Puppet
module ... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_vnet/set_xml_schema.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
Puppet::Face.define :azure_vnet, '1.0.0' do
action :se... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/application_config.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'puppet/core/utility'
include Puppet::Core::Util... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/virtual_machine.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'puppet/application_config'
require 'puppet/opti... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/affinity_group.rb | <filename>lib/puppet/affinity_group.rb
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'puppet/a... |
Bhaskers-Blu-Org2/azure-puppet | spec/unit/puppet/face/azure_vnet/list_spec.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
require 'spec_helper'
describe Puppet... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_queue/create.rb | <gh_stars>1-10
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
Puppet::Face.define :az... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/face/azure_queue/create_message.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
# encoding: UTF-8
Puppet::Face.define :azure_queue, '1.0... |
Bhaskers-Blu-Org2/azure-puppet | lib/puppet/application/azure_storage.rb | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies, Inc.
# All Rights Reserved. Licensed under the Apache 2.0 License.
#--------------------------------------------------------------------------
require 'puppet/application/face_base'
class Puppet::Ap... |
ged/pluginfactory | lib/pluginfactory.rb | #!/usr/bin/env ruby -w
require 'logger'
### An exception class for PluginFactory specific errors.
class FactoryError < RuntimeError; end
# This module contains the PluginFactory mixin. Including PluginFactory in your
# class turns it into a factory for its derivatives, capable of searching for
# and loading them by ... |
ged/pluginfactory | spec/pluginfactory_spec.rb | <gh_stars>1-10
#!/usr/bin/env ruby
BEGIN {
require 'pathname'
basedir = Pathname.new( __FILE__ ).dirname.parent
libdir = basedir + "lib"
$LOAD_PATH.unshift( basedir ) unless $LOAD_PATH.include?( basedir )
$LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
}
require 'rspec'
require 'logger'
requi... |
ged/pluginfactory | spec/lib/helpers.rb | #!/usr/bin/ruby
# coding: utf-8
BEGIN {
require 'pathname'
basedir = Pathname.new( __FILE__ ).dirname.parent
libdir = basedir + "lib"
$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
}
require 'rspec'
require 'pluginfactory'
### RSpec helper functions.
module PluginFactory
# An al... |
ged/pluginfactory | experiments/logger_output.rb | <filename>experiments/logger_output.rb
#!/usr/bin/env ruby
# This is a short demo of the logging output generated by PluginFactory's logger_callback.
BEGIN {
require 'pathname'
basedir = Pathname.new( __FILE__ ).dirname.parent
libdir = basedir + 'lib'
$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?... |
jianyuan/wallgig-discourse-integration-plugin | config/routes.rb | <gh_stars>1-10
Wallgig::Engine.routes.draw do
resources :users, only: [:show, :create, :update] do
member do
get 'auth_token'
end
end
end |
jianyuan/wallgig-discourse-integration-plugin | app/controllers/wallgig/users_controller.rb | module Wallgig
class UsersController < Wallgig::ApplicationController
before_filter :set_user, only: [:show, :update, :auth_token]
def show
respond_with @user.to_json
end
def create
@user = User.new(user_params)
@user.save!
respond_with @user.to_json
end
def update
... |
jianyuan/wallgig-discourse-integration-plugin | app/controllers/wallgig/application_controller.rb | module Wallgig
class ApplicationController < ::ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :exclude_user_root_in_json
respond_to :json
private
def exclude_user_root_in_json
User.include_root_in_json = false
end
end
end |
jianyuan/wallgig-discourse-integration-plugin | plugin.rb | # name: wallgig integration
# about: user integration with main app
# version: 0.1
# author: <NAME>
module ::Wallgig
class Engine < ::Rails::Engine
engine_name 'wallgig'
isolate_namespace Wallgig
end
end
after_initialize do
# # require File.expand_path('../api/users_controller', __FILE__)
load File.e... |
jianyuan/wallgig-discourse-integration-plugin | lib/auth/wallgig_current_user_provider.rb | require_dependency 'auth/current_user_provider'
class Auth::WallgigCurrentUserProvider < Auth::DefaultCurrentUserProvider
TOKEN_COOKIE = ' _forums_auth_token'
end |
OpenSource-THG/logstash-filter-json | spec/filters/thgjson_spec.rb | # encoding: utf-8
require "logstash/devutils/rspec/spec_helper"
require "insist"
require "logstash/filters/json"
require "logstash/timestamp"
require 'rubygems'
describe LogStash::Filters::ThgJson do
describe "parse message into the event" do
config <<-CONFIG
filter {
thgjson {
# Parse ... |
icleversoft/marc_json | lib/marc_json/field_breaker.rb | <gh_stars>1-10
module MARCJson
class FieldBreaker
def initialize(marc)
@marc = marc
@files = []
end
def execute!(path=nil)
@marc.each do |record|
record.each_part_in_djson do |tag, value|
fname = path ? File.join(path, "#{tag}.json") : "#{tag}.json"
unless Fi... |
icleversoft/marc_json | lib/marc_json/reader.rb | <gh_stars>1-10
module MARCJson
class Reader
def initialize( json_data = {} )
@marc = MARC::Record.new
to_hash( json_data )
build_record
end
def to_marc
@marc
end
private
def build_record
unless @json.empty?
@marc.leader = @json.delete("000")
@js... |
icleversoft/marc_json | lib/marc_json.rb | <filename>lib/marc_json.rb
require "marc_json/version"
require 'marc_json/marc_ext'
require 'marc_json/renderer'
require 'marc_json/reader'
require 'marc_json/field_breaker'
require 'json'
|
icleversoft/marc_json | spec/support/assets.rb | <reponame>icleversoft/marc_json
require 'spec_helper'
require 'json'
shared_context "shared_data" do
let(:marc){MARC::Reader.new(File.join(File.dirname(__FILE__), 'data/1.mrc')).first}
let(:json){JSON.parse(File.open(File.join(File.dirname(__FILE__), 'data/1.json')).read)}
end
|
icleversoft/marc_json | spec/spec_helper.rb | <reponame>icleversoft/marc_json
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'marc_json'
require_relative 'support/assets.rb'
|
icleversoft/marc_json | spec/marc_json_spec.rb | <reponame>icleversoft/marc_json
require 'spec_helper'
require 'marc'
describe MARCJson do
include_context 'shared_data'
it 'has a version number' do
expect(MARCJson::VERSION).not_to be nil
end
it 'converts a marc record to hash' do
m = MARCJson::Renderer.new( marc )
expect(m.to_hash).to eq(json)
... |
icleversoft/marc_json | lib/marc_json/marc_ext.rb | <reponame>icleversoft/marc_json
require 'marc'
module MARCJson
class MARC::DataField
def to_fjson
[indicators_as_string].concat(subfields_as_arrays)
end
def indicators_as_string
[indicator1, indicator2].join
end
def subfields_as_arrays
subfields.map{|s| s.to_fjson}.delete_if{... |
icleversoft/marc_json | spec/field_breaker_spec.rb | <reponame>icleversoft/marc_json
require 'spec_helper'
describe 'FieldBreaker' do
let(:marc) { MARC::Reader.new(File.join(File.dirname(__FILE__), 'support/data/1.mrc')) }
it 'breaks a record to fields in json files' do
MARCJson::FieldBreaker.new(marc).execute!
end
end
|
icleversoft/marc_json | lib/marc_json/renderer.rb | module MARCJson
class Renderer
include MARC
def initialize( marc )
throw ArgumentError.new("Record should be a MARC::Record instance") unless marc.is_a? MARC::Record
@data = {}
@data["000"] = marc.leader
process_fields( marc.fields )
end
def to_hash
@data
end
d... |
icleversoft/marc_json | spec/marc_ext_spec.rb | require 'spec_helper'
describe 'marc_ext' do
include_context 'shared_data'
context 'subfield' do
it 'returns an array' do
subfield = MARC::Subfield.new('a', 'value')
expect(subfield.to_fjson).to eq ['a', 'value']
end
it 'returns nil if value is empty' do
subfield = MARC::Subfield.new(... |
iBolom/TestPodFramework | TestPodFramework.podspec | Pod::Spec.new do |s|
s.platform = :ios
s.name = 'TestPodFramework'
s.version = '1.0.1'
s.summary = 'TestPodFramework'
s.homepage = 'https://github.com/iBolom/TestPodFramework.git'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { '<NAME>' => '<EMAIL>' }
s.source = { :git => 'https://github... |
ofri-switzerland/auto_complete | auto_complete.gemspec | <reponame>ofri-switzerland/auto_complete
# 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 = "auto_complete"
s.version = "0.0.1"
s.required_rubygems_version = Gem::Requirement.... |
ofri-switzerland/auto_complete | test/test_helper.rb | $LOAD_PATH << "." unless $LOAD_PATH.include?(".")
begin
require "rubygems"
require "bundler"
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.5")
raise RuntimeError, "Your bundler version is too old." +
"Run `gem install bundler` to upgrade."
end
# Set up load paths for all bundled g... |
ofri-switzerland/auto_complete | init.rb | require 'auto_complete'
require 'auto_complete_macros_helper'
|
azanar/converge | test/unit/converge/db/table/merger_test.rb | <filename>test/unit/converge/db/table/merger_test.rb<gh_stars>0
require File.expand_path('../../../../test_helper', __FILE__)
require 'converge/db/table/merger'
class Converge::DB::Table::MergerTest < Test::Unit::TestCase
setup do
@connection = mock
end
test '#merger' do
mock_date_range = mock
mock... |
azanar/converge | lib/converge.rb | require 'logger'
require "hydrogen"
require "converge/db"
require "converge/model"
require "converge/version"
module Converge
module_function
def logger
return @logger if @logger
@logger = Logger.new(STDOUT)
@logger.formatter = proc { |severity, datetime, progname, msg|
"[#{datetime}, #{sever... |
azanar/converge | lib/converge/db/table/partitioner/bookend.rb | <gh_stars>0
require 'converge/db/table/partitioner'
module Converge
module DB
class Table
module Partitioner
class Bookend
include Partitioner
def initialize(source)
@source = source
end
def matches?
true
end
def p... |
azanar/converge | lib/converge/db/table/loader.rb | <gh_stars>0
module Converge
module DB
class Table
class Loader
def initialize(table, conn)
@table = table
@conn = conn
@truncated = false #assume we aren't truncated.
end
def load(object_collection)
@table.truncate
@table.copy(object... |
azanar/converge | lib/converge/db/table.rb | require "converge/db/connection"
require "converge/db/table/target"
require "converge/db/table/staging"
|
azanar/converge | lib/converge/db/table/target.rb | require 'converge/db/table/base'
module Converge
module DB
class Table
class Target
include Converge::DB::Table::Base
def name
@model.name
end
end
end
end
end
|
azanar/converge | test/unit/converge/db/table/base_test.rb | <filename>test/unit/converge/db/table/base_test.rb
require File.expand_path('../../../../test_helper', __FILE__)
require 'converge/db/table/target'
class Converge::DB::Table::BaseTest < Test::Unit::TestCase
setup do
@mock_model = mock
@base = Class.new do
include Converge::DB::Table::Base
end
... |
azanar/converge | lib/converge/db.rb | <gh_stars>0
require "converge/db/table"
module Converge
module DB
end
end
|
azanar/converge | test/unit/converge/db/table/target_test.rb | require File.expand_path('../../../../test_helper', __FILE__)
require 'converge/db/table/target'
class Converge::DB::Table::TargetTest < Test::Unit::TestCase
setup do
@mock_model = mock
@target = Converge::DB::Table::Target.new(@mock_model)
end
end
|
azanar/converge | lib/converge/db/table/staging.rb | <reponame>azanar/converge
require 'converge/db/table/base'
require 'converge/db/table/loader'
require 'converge/db/table/merger'
module Converge
module DB
class Table
class Staging
include Converge::DB::Table::Base
def name
"#{@model.name}_staging"
end
def merge... |
azanar/converge | lib/converge/db/connection/table.rb | <filename>lib/converge/db/connection/table.rb
module Converge
module DB
class Connection
class Table
def initialize(conn, table, opts = {})
@conn = conn
@table = table
@stale = false
end
def name
@table.name
end
def columns
... |
azanar/converge | test/integration/mock/table.rb | module Converge
module Mock
class Table
def initialize(conn, dest)
@conn = conn
@dest = dest
end
def copy(objects)
@conn.run_command(cmd: "copy", objects: objects)
end
def update(table)
@conn.run_command(cmd: "update", source: table.name, destination: ... |
azanar/converge | lib/converge/db/table/merger.rb | module Converge
module DB
class Table
class Merger
def initialize(source, conn)
@conn = conn
@conn_source = @conn.table(source)
end
def merge(destination)
conn_destination = @conn.table(destination)
conn_destination.update(@conn_source)
... |
azanar/converge | test/unit/converge/db/table/loader_test.rb | <gh_stars>0
require File.expand_path('../../../../test_helper', __FILE__)
require 'converge/db/table/loader'
class Converge::DB::Table::LoaderTest < Test::Unit::TestCase
setup do
@test_host = "redshift-test.sjc.carrel.org"
@test_table = "mock_table"
@test_staging_table = "#{@test_table}_staging"
@m... |
azanar/converge | test/unit/converge/db/table/staging_test.rb | require File.expand_path('../../../../test_helper', __FILE__)
require 'converge/db/table/staging'
class Converge::DB::Table::StagingTest < Test::Unit::TestCase
end
|
azanar/converge | test/integration/mock_adapter.rb | <reponame>azanar/converge<filename>test/integration/mock_adapter.rb
$LOAD_PATH.unshift(File.expand_path('../', __FILE__))
require 'mock/connection'
require 'mock/table'
|
azanar/converge | lib/converge/db/connection.rb | require 'converge/db/connection/table'
module Converge
module DB
class Connection
def initialize(conn)
@conn = conn
end
def table(table)
Connection::Table.new(@conn, table)
end
end
end
end
|
azanar/converge | test/integration/converge_test.rb | <filename>test/integration/converge_test.rb
require File.expand_path('../test_helper', __FILE__)
require File.expand_path('../db_test_helper', __FILE__)
require File.expand_path('../mock_adapter', __FILE__)
require 'converge'
require 'active_support'
require 'active_support/core_ext/integer/time'
require 'active_s... |
azanar/converge | lib/converge/model.rb | <gh_stars>0
module Converge
class Model
def initialize(config, model)
@config = config
@model = model
end
def name
@model.table_name
end
def columns
@config.columns || @model.columns
end
def remove_quotes?
@config.remove_quotes?
end
end
end
|
azanar/converge | test/integration/mock/connection.rb | <gh_stars>0
module Converge
module Mock
class Connection
def initialize(conn)
@conn = conn
end
def run_command(cmd)
@conn.run_command(cmd)
end
def table(name)
Table.new(self, name)
end
attr_reader :conn
end
end
end
|
azanar/converge | lib/converge/db/table/base.rb | <reponame>azanar/converge<gh_stars>0
module Converge
module DB
class Table
module Base
def initialize(model)
@model = model
@stale = false
end
def columns
@model.columns
end
def key
@model.key
end
def loader(c... |
MaximShirokov/amorail | lib/amorail/entities/task_type.rb | <filename>lib/amorail/entities/task_type.rb
require 'amorail/entities/leadable'
module Amorail
class TaskType < Amorail::Entity
amo_names 'task_types'
amo_field :name, :code, :id
validates :name, presence: true
def self.remote_url(name = '')
'/private/api/v2/json/accounts/current/task_types'... |
MaximShirokov/amorail | lib/amorail/entities/lead_status.rb | require 'amorail/entities/leadable'
module Amorail
class LeadStatus < Amorail::Entity
amo_names 'leads_statuses'
amo_field :name, :pipeline_id, :id
validates :name, presence: true
def self.remote_url(name = '')
'/private/api/v2/json/accounts/current/leads_statuses'
end
def self.body... |
MaximShirokov/amorail | lib/amorail/entities/contact.rb | require 'amorail/entities/leadable'
module Amorail
# AmoCRM contact entity
class Contact < Amorail::Entity
include Leadable
amo_names 'contacts'
amo_field :name, :company_name, :linked_company_id, :created_user_id
amo_property :email, enum: 'WORK'
amo_property :phone, enum: 'MOB'
amo_prop... |
MaximShirokov/amorail | lib/amorail/entities/pipeline.rb | <reponame>MaximShirokov/amorail
module Amorail
class Pipeline < Amorail::Entity
amo_names 'pipelines'
amo_field :id, :label, :sort, :name
validates :name, presence: true
def merge_params(attrs)
attrs.last.each do |k, v|
action = "#{k}="
next unless respond_to?(action)
... |
MaximShirokov/amorail | spec/user_spec.rb | <reponame>MaximShirokov/amorail
require "spec_helper"
describe Amorail::User do
before { mock_api }
describe "validations" do
it { should validate_presence_of(:name) }
end
describe ".attributes" do
subject { described_class.attributes }
it_behaves_like 'entity_class'
specify do
is_exp... |
drnic/errbit | app/models/notification_service.rb | class NotificationService
include Mongoid::Document
include Rails.application.routes.url_helpers
default_url_options[:host] = ActionMailer::Base.default_url_options[:host]
field :room_id, :type => String
field :api_token, :type => String
field :subdomain, :type => String
embedded_in :app, :inverse_of =... |
daniel-sim/common | db/migrate/20190122124356_common_change_plan_name_to_shopify_plan_on_shops.rb | class CommonChangePlanNameToShopifyPlanOnShops < ActiveRecord::Migration[5.0]
def change
rename_column :shops, :plan_name, :shopify_plan
end
end
|
daniel-sim/common | config/routes.rb | <reponame>daniel-sim/common<gh_stars>0
require 'sidekiq/web'
Rails.application.routes.draw do
devise_for :users, only: :none # see https://github.com/plataformatec/devise/issues/4580
devise_for :admins,
class_name: "PR::Common::Models::Admin",
controllers: { sessions: "admins/sessions" }
... |
daniel-sim/common | spec/lib/pr/common/models/admin_spec.rb | require "rails_helper"
describe PR::Common::Models::Admin do
it { is_expected.to have_many(:promo_codes).with_foreign_key(:created_by_id) }
end
|
daniel-sim/common | config/initializers/assets.rb | Rails.application.config.assets.precompile += %w[admin/style.css]
Rails.application.config.assets.precompile += %w[sessions/script.js]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.