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
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/mutations/condition/delete_spec.rb
Ruby
mit
19
master
776
# frozen_string_literal: true require 'rails_helper' describe Mutations::Condition::Delete, type: :request do let(:condition) { create(:condition) } let(:rule_id) { condition.rule.uuid } let(:query) do <<~GQL mutation { deleteCondition ( input: { ruleId: "#{rule_id}" ...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/mutations/condition/create_spec.rb
Ruby
mit
19
master
1,434
# frozen_string_literal: true require 'rails_helper' describe Mutations::Condition::Create, type: :request do let(:result_info) do <<~RESULT { rule { id } event { id } operation expression value } RESULT end let(:que...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/mutations/receiver/update_spec.rb
Ruby
mit
19
master
795
# frozen_string_literal: true require 'rails_helper' describe Mutations::Receiver::Update, type: :request do let(:receiver) { create(:receiver) } let(:query) do <<~GQL mutation { updateReceiver ( input: { id: "#{receiver.uuid}" externalId: "DarkTranquility" ...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/mutations/receiver/delete_spec.rb
Ruby
mit
19
master
661
# frozen_string_literal: true require 'rails_helper' describe Mutations::Receiver::Delete, type: :request do let(:receiver) { create(:receiver) } let(:query) do <<~GQL mutation { deleteReceiver ( input: { id: "#{receiver.uuid}" } ) { message ...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/mutations/receiver/create_spec.rb
Ruby
mit
19
master
996
# frozen_string_literal: true require 'rails_helper' describe Mutations::Receiver::Create, type: :request do let(:result_info) do <<~RESULT { externalId points } RESULT end let(:query) do <<~GQL mutation { createReceiver ( #{input_params} )...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/resolvers/achievements_spec.rb
Ruby
mit
19
master
3,058
require 'rails_helper' describe Resolvers::Achievements, type: :request do let(:find_all) do <<~GQL query { achievements { receiver { externalId points } reward { name } } } GQL end let(:find_by_receiv...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/resolvers/rewards_spec.rb
Ruby
mit
19
master
2,273
# frozen_string_literal: true require 'rails_helper' describe Resolvers::Rewards, type: :request do let(:find_all) do <<~GQL query { rewards { name imageUrl rules { id } achievements{ id } } } GQL...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/resolvers/rules_spec.rb
Ruby
mit
19
master
1,458
require 'rails_helper' describe Resolvers::Rules, type: :request do let(:find_all) do <<~GQL query { rules { reward { name } conditions { id } } } GQL end let(:find_by_id) do <<~GQL query { rules...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/resolvers/activities_spec.rb
Ruby
mit
19
master
1,837
require 'rails_helper' describe Resolvers::Activities, type: :request do let(:find_all) do <<~GQL query { activities { event { name } receiver { points } } } GQL end let(:find_by_date_range) do <<~GQL qu...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/resolvers/events_spec.rb
Ruby
mit
19
master
1,460
require 'rails_helper' describe Resolvers::Events, type: :request do let(:find_all) do <<~GQL query { events { name value activities { id } } } GQL end let(:find_by_name) do <<~GQL query { events(name: "#{qu...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/graphql/resolvers/receivers_spec.rb
Ruby
mit
19
master
1,682
require 'rails_helper' describe Resolvers::Receivers, type: :request do let(:find_all) do <<~GQL query { receivers { externalId points achievements { id } activities { id } } } GQL end let(:fin...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/jobs/achievements_job_spec.rb
Ruby
mit
19
master
383
require 'rails_helper' describe AchievementsJob do let(:activity) { create(:activity) } let(:checker) { double(Achievements::Checker, new_rewards: true) } it { is_expected.to be_processed_in :default } it 'checks for new rewards' do expect(Achievements::Checker).to receive(:new).with(activity).and_return...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/controllers/activities_controller_spec.rb
Ruby
mit
19
master
201
# frozen_string_literal: true require 'rails_helper' describe ActivitiesController do describe '#index' do subject { get :index } it { is_expected.to have_http_status :success } end end
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/controllers/achievements_controller_spec.rb
Ruby
mit
19
master
203
# frozen_string_literal: true require 'rails_helper' describe AchievementsController do describe '#index' do subject { get :index } it { is_expected.to have_http_status :success } end end
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/controllers/rewards_controller_spec.rb
Ruby
mit
19
master
1,910
# frozen_string_literal: true require 'rails_helper' describe RewardsController do let(:name) { 'Toundra' } let(:category) { :badge } let(:params) do { reward: { name: name, category: category } } end describe '#show' do let(:reward) { create(:reward) } subject ...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/controllers/rules_controller_spec.rb
Ruby
mit
19
master
2,106
# frozen_string_literal: true require 'rails_helper' describe RulesController do let(:name) { 'Toundra' } let(:reward) { create(:reward) } let(:rule) { create(:rule) } let(:params) do { rule: { name: name, reward_id: reward.uuid } } end describe '#index' do subject...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/controllers/conditions_controller_spec.rb
Ruby
mit
19
master
2,204
# frozen_string_literal: true require 'rails_helper' describe ConditionsController do let(:operation) { :points } let(:rule) { create(:rule) } let(:params) do { rule_id: rule.uuid, operation: operation, expression: :gte, value: 1 } end describe '#new' do let(:params) { {...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/controllers/receivers_controller_spec.rb
Ruby
mit
19
master
381
# frozen_string_literal: true require 'rails_helper' describe ReceiversController do describe '#index' do subject { get :index } it { is_expected.to have_http_status :success } end describe '#show' do let(:receiver) { create(:receiver) } subject { get :show, params: { id: receiver.uuid } } ...
github
jorgegorka/siete-valles
https://github.com/jorgegorka/siete-valles
spec/controllers/events_controller_spec.rb
Ruby
mit
19
master
1,817
# frozen_string_literal: true require 'rails_helper' describe EventsController do let(:name) { 'download pdf' } let(:category) { :badge } let(:params) do { event: { name: name, description: 'PDF downloaded from the docs area', value: 4 } } end describe '#new' do ...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
cf-uaa-lib.gemspec
Ruby
apache-2.0
19
master
2,356
# -*- encoding: utf-8 -*- #-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of sub...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
Gemfile
Ruby
apache-2.0
19
master
587
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
Rakefile
Ruby
apache-2.0
19
master
1,331
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
spec/info_spec.rb
Ruby
apache-2.0
19
master
5,043
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
spec/integration_spec.rb
Ruby
apache-2.0
19
master
8,771
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
spec/token_issuer_spec.rb
Ruby
apache-2.0
19
master
24,098
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
spec/http_spec.rb
Ruby
apache-2.0
19
master
4,868
#-- # Cloud Foundry 2012.02.03 Beta # Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # se...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
spec/spec_helper.rb
Ruby
apache-2.0
19
master
1,062
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
spec/scim_spec.rb
Ruby
apache-2.0
19
master
13,264
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
spec/token_coder_spec.rb
Ruby
apache-2.0
19
master
8,383
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
lib/uaa.rb
Ruby
apache-2.0
19
master
618
#-- # Cloud Foundry 2012.02.03 Beta # Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # se...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
lib/uaa/info.rb
Ruby
apache-2.0
19
master
5,989
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
lib/uaa/scim.rb
Ruby
apache-2.0
19
master
16,756
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
lib/uaa/http.rb
Ruby
apache-2.0
19
master
7,979
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
lib/uaa/util.rb
Ruby
apache-2.0
19
master
8,599
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
lib/uaa/token_coder.rb
Ruby
apache-2.0
19
master
11,255
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
lib/uaa/version.rb
Ruby
apache-2.0
19
master
581
#-- # Cloud Foundry # Copyright (c) [2009-2016] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
lib/uaa/token_issuer.rb
Ruby
apache-2.0
19
master
15,535
#-- # Cloud Foundry # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved. # # This product is licensed to you under the Apache License, Version 2.0 (the "License"). # You may not use this product except in compliance with the License. # # This product includes a number of subcomponents with # separate...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
examples/authorization_grant_public_pkce.rb
Ruby
apache-2.0
19
master
1,371
#!/usr/bin/env ruby # Start a develop UAA with default profile or add client with allowpublic=true # uaac client add login -s loginsecret \ # --authorized_grant_types authorization_code,refresh_token \ # --scope "openid" \ # --authorities uaa.none \ # --allowpublic true \ # --redirect_uri=http://localhost:7...
github
cloudfoundry/cf-uaa-lib
https://github.com/cloudfoundry/cf-uaa-lib
examples/password_grant_and_decode_token.rb
Ruby
apache-2.0
19
master
1,551
#!/usr/bin/env ruby # uaa create-client decode-token-demo -s decode-token-demo -v \ # --authorized_grant_types password,refresh_token \ # --scope "openid" \ # --authorities uaa.none require 'uaa' url = ENV["UAA_URL"] client, secret = "decode-token-demo", "decode-token-demo" username, password = ENV["UAA_USERN...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
nextcloud.gemspec
Ruby
mit
19
master
1,996
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "nextcloud/version/nextcloud" Gem::Specification.new do |spec| spec.name = "nextcloud" spec.version = Nextcloud::Version::VERSION spec.authors = ["Dachi Natsvlishvili"] spec.email ...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
Gemfile
Ruby
mit
19
master
225
source "https://rubygems.org" git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } # Specify your gem's dependencies in nextcloud.gemspec gemspec gem "coveralls", require: false gem "pry" gem "pry-byebug"
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud.rb
Ruby
mit
19
master
1,497
require "net/https" require "nokogiri" require "nextcloud/version/nextcloud" require "nextcloud/errors/nextcloud" require "nextcloud/helpers/nextcloud" require "nextcloud/helpers/properties" require "nextcloud/api" require "nextcloud/ocs_api" require "nextcloud/ocs/user" require "nextcloud/ocs/group" require "nextc...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/api.rb
Ruby
mit
19
master
2,112
module Nextcloud class Api attr_reader :url, :username, :password protected :url protected :username protected :password # Gathers credentials for communicating with Nextcloud instance # # @param [Hash] args authentication credentials. # @option args [String] :url Nextcloud instance U...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/ocs_api.rb
Ruby
mit
19
master
1,041
module Nextcloud class OcsApi < Api # Initiates User class # # @param userid [Ingteger,nil] Nextcloud user userid # @return [Object] User instance def user(userid = nil) Ocs::User.new(self, userid) end # Initiates Group class # # @param groupid [Ingteger,nil] Nextcloud group...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/webdav_api.rb
Ruby
mit
19
master
487
module Nextcloud class WebdavApi < Api # Remote end of WebDAV API DAV_URL = "remote.php/dav".freeze # Initializes a WebDAV API # # @params args [Hash] Hash with url, username and password def initialize(args) super @url = URI(@url.scheme + "://" + @url.host + "/" + DAV_URL) en...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/helpers/properties.rb
Ruby
mit
19
master
2,311
module Nextcloud module Helpers module Properties # Body to send to receive item properties RESOURCE = '<?xml version="1.0"?> <d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"> <d:prop> <d:getlastmodified /> <d:ge...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/helpers/nextcloud.rb
Ruby
mit
19
master
2,862
require "active_support" require "active_support/core_ext/hash" require "json" module Nextcloud # Helper methods that are used through lib module Helpers # Makes an array out of repeated elements # # @param doc [Object] Nokogiri::XML::Document # @param xpath [String] Path to element that is being r...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/models/directory.rb
Ruby
mit
19
master
2,513
module Nextcloud module Models # Directory model # # @!attribute [rw] href # @return [String] File/directory location # @!attribute [rw] lastmodified # @return [String] Last modification time of file/directory # @!attribute [rw] tag # @return [Hash] Etag # @!attribute [rw] re...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/models/user.rb
Ruby
mit
19
master
1,536
module Nextcloud module Models # User model # # @!attribute [rw] enabled # @return [String] Is an user enabled or not # @!attribute [rw] id # @return [String] Identifier of an user # @!attribute [rw] quota # @return [Hash] Quota of user # @!attribute [rw] email # @retur...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/ocs/group_folder.rb
Ruby
mit
19
master
5,338
module Nextcloud module Ocs # Group Folder class used for interfering with group folders # # @!attribute [rw] meta # @return [Hash] Information about API response class GroupFolder < OcsApi include Helpers attr_accessor :meta # Application initializer # # @param [...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/ocs/user.rb
Ruby
mit
19
master
7,309
module Nextcloud module Ocs # Class includes User provisioning fetures, including User group operations # # @!attribute [rw] meta # @return [Hash] Information about API response # @!attribute [rw] userid # @return [String,nil] User identifier class User < OcsApi include Helpers ...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/ocs/file_sharing_api.rb
Ruby
mit
19
master
8,352
module Nextcloud module Ocs # File sharing base class used for interfering with sharing, included federated # # @!attribute [rw] meta # @return [Hash] Information about API response # @!attribute [rw] shareid # @return [Integer] Share identifier class FileSharingApi < OcsApi incl...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/ocs/app.rb
Ruby
mit
19
master
2,412
module Nextcloud module Ocs # Application class used for interfering with app specific actions # # @!attribute [rw] meta # @return [Hash] Information about API response # @!attribute [rw] appid # @return [Integer] Application identifier class App < OcsApi include Helpers a...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/ocs/group.rb
Ruby
mit
19
master
2,363
module Nextcloud module Ocs # Class with Nextcloud group operation features # # @!attribute [rw] meta # @return [Hash] Information about API response # @!attribute [rw] groupid # @return [String,nil] Group identifier class Group < OcsApi include Helpers attr_accessor :meta...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
lib/nextcloud/webdav/directory.rb
Ruby
mit
19
master
6,098
require "net-http-report" module Nextcloud module Webdav # WebDAV class for communicating with File/directory mgmt. service # # @!attribute [rw] directory # @return [Array] Used to store model instances when querying with find or favorites class Directory < WebdavApi include Helpers ...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
spec/spec_helper.rb
Ruby
mit
19
master
755
require "coveralls" require "pry-byebug" Coveralls.wear! require "bundler/setup" require "nextcloud" require "webmock/rspec" require "vcr" WebMock.disable_net_connect!(allow_localhost: true) RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
spec/webdav_directory_spec.rb
Ruby
mit
19
master
3,485
RSpec.describe Nextcloud::Webdav::Directory do before(:each) do @subject = Nextcloud::WebdavApi.new( url: "https://cloud.testdomain.com", username: "testuser", password: "rn!rmEM1rm" ).directory end it ".find retrieves everything in /" do VCR.use_cassette("webdav_directory/find") do...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
spec/app_spec.rb
Ruby
mit
19
master
1,163
RSpec.describe Nextcloud do it ".enabled retrieves all enabled applications" do VCR.use_cassette("app/enabled") do expect(@subject.app.enabled).to include("files", "activity") end end it ".disabled retrieves all disabled applications" do VCR.use_cassette("app/disabled") do expect(@subject...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
spec/group_spec.rb
Ruby
mit
19
master
1,132
RSpec.describe Nextcloud do it ".all retrieves all groups" do VCR.use_cassette("group/all") do expect(@subject.group.all.count).to be > 0 end end it ".search finds a group" do VCR.use_cassette("group/search") do expect(@subject.group.search("2")).to include("group2") end end it "...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
spec/file_sharing_api_spec.rb
Ruby
mit
19
master
4,708
require "nokogiri" require "open-uri" RSpec.describe Nextcloud::Ocs::FileSharingApi do before(:each) do @subject = described_class.new(url: "https://cloud.testdomain.com", username: "testuser", password: "rn!rmEM1rm") end it ".all retrieves all shares" do VCR.use_cassette("file_sharing_api/all") do ...
github
dachinat/nextcloud
https://github.com/dachinat/nextcloud
spec/user_spec.rb
Ruby
mit
19
master
3,047
RSpec.describe Nextcloud do it ".all retrieves all users" do VCR.use_cassette("user/all") do expect(@subject.user.all.count).to be > 0 end end it ".find finds an user" do VCR.use_cassette("user/find") do expect(@subject.user.find("test1").enabled).to eq("true") end end it ".creat...
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/facter/has_brew.rb
Ruby
apache-2.0
19
master
369
# Fact: has_brew # # Purpose: check if brew is installed # # Resolution: # Tests for presence of brew, returns boolean # No value set if not on Darwin Facter.add(:has_brew) do confine kernel: 'Darwin' setcode do File.exist?('/usr/local/bin/brew') || File.exist?('/opt/homebrew/bin/brew') || sys...
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/facter/has_compiler.rb
Ruby
apache-2.0
19
master
498
# Fact: has_compiler # # Purpose: check if Xcode Command Line Tools is installed # # Resolution: # Tests for presence of cc, returns boolean # No value set if not on Darwin Facter.add(:has_compiler) do confine kernel: 'Darwin' setcode do has_xcode = File.exist?('/Applications/Xcode.app') || File.exi...
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/facter/is_arm64.rb
Ruby
apache-2.0
19
master
312
# Fact: is_arm64 # # Purpose: check if we are running under arm64 architecture # # Resolution: # Executes `arch -arm64 true` and returns boolean result # No value set if not on Darwin Facter.add(:is_arm64) do confine kernel: 'Darwin' setcode do system('arch -arm64 true >/dev/null 2>&1') end end
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/puppet/provider/package/brewcask.rb
Ruby
apache-2.0
19
master
2,649
require 'puppet/provider/package' require 'puppet/provider/package/homebrew_common' Puppet::Type.type(:package).provide(:brewcask, parent: Puppet::Provider::Package) do desc 'Package management using HomeBrew casks on OSX' confine operatingsystem: :darwin include Puppet::Provider::Package::HomebrewCommon ha...
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/puppet/provider/package/homebrew_common.rb
Ruby
apache-2.0
19
master
4,283
require 'etc' require 'tmpdir' module Puppet class Provider class Package module HomebrewCommon BREW_PATHS = ['/opt/homebrew/bin/brew', '/usr/local/bin/brew'].freeze unless defined?(BREW_PATHS) def self.included(base) base.extend(ClassMethods) end module ClassMet...
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/puppet/provider/package/tap.rb
Ruby
apache-2.0
19
master
1,812
require 'puppet/provider/package' require 'puppet/provider/package/homebrew_common' Puppet::Type.type(:package).provide(:tap, parent: Puppet::Provider::Package) do desc 'Tap management using HomeBrew on OSX' confine operatingsystem: :darwin include Puppet::Provider::Package::HomebrewCommon has_feature :inst...
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/puppet/provider/package/brew.rb
Ruby
apache-2.0
19
master
3,048
require 'puppet/provider/package' require 'puppet/provider/package/homebrew_common' Puppet::Type.type(:package).provide(:brew, parent: Puppet::Provider::Package) do desc 'Package management using HomeBrew on OSX' confine operatingsystem: :darwin include Puppet::Provider::Package::HomebrewCommon has_feature ...
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/puppet/provider/package/homebrew.rb
Ruby
apache-2.0
19
master
3,597
require 'puppet/provider/package' require 'puppet/provider/package/homebrew_common' Puppet::Type.type(:package).provide(:homebrew, parent: Puppet::Provider::Package) do desc 'Package management using HomeBrew (+ casks!) on OSX' confine operatingsystem: :darwin include Puppet::Provider::Package::HomebrewCommon ...
github
TheKevJames/puppet-homebrew
https://github.com/TheKevJames/puppet-homebrew
lib/puppet/feature/bundled_environment.rb
Ruby
apache-2.0
19
master
202
require 'puppet/util/feature' Puppet.features.add(:bundled_environment) do next false unless defined?(Bundler) Bundler.respond_to?(:with_unbundled_env) || Bundler.respond_to?(:with_clean_env) end
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
business-central.gemspec
Ruby
mit
19
master
1,406
lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'business_central/version' Gem::Specification.new do |spec| spec.name = 'business-central' spec.version = BusinessCentral::VERSION spec.authors = ['Jarrad Muir'] spec.email = ['ja...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/test_helper.rb
Ruby
mit
19
master
409
# frozen_string_literal: true require 'simplecov' SimpleCov.start do add_filter '/test/' end $LOAD_PATH.unshift File.expand_path('../lib', __dir__) require 'business_central' require 'minitest/autorun' require 'minitest/focus' require 'minitest/mock' require 'minitest/reporters' require 'byebug' require 'webmock/...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/exceptions_test.rb
Ruby
mit
19
master
1,378
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/exceptions_test.rb class BusinessCentral::ExceptionsTest < Minitest::Test def test_invalid_client_exception exception = BusinessCentral::InvalidClientException.new assert_equal('Invalid client setup', exception.messag...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/web_service_test.rb
Ruby
mit
19
master
2,588
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/web_service_test.rb class BusinessCentral::WebServiceTest < Minitest::Test def setup @client = BusinessCentral::Client.new @web_service = BusinessCentral::WebService.new(client: @client) end def test_build_object...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/client_test.rb
Ruby
mit
19
master
4,196
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/client_test.rb class BusinessCentral::ClientTest < Minitest::Test def setup @client = BusinessCentral::Client.new end def test_authorize_client test_redirect_url = 'www.example.com' response = @client.authori...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/object/base_test.rb
Ruby
mit
19
master
1,992
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/object/base_test.rb class BusinessCentral::Object::BaseTest < Minitest::Test def setup @company_id = '123456' @client = BusinessCentral::Client.new( default_company_id: @company_id ) end def test_client...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/object/picture_test.rb
Ruby
mit
19
master
1,662
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/object/picture_test.rb class BusinessCentral::Object::PictureTest < Minitest::Test def setup @company_id = '123456' @client = BusinessCentral::Client.new @picture = @client.items(id: 123, company_id: @company_id)....
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/object/companies_test.rb
Ruby
mit
19
master
953
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/object/companies_test.rb class BusinessCentral::Object::CompaniesTest < Minitest::Test def setup @client = BusinessCentral::Client.new @company = @client.companies end def test_find_all stub_request(:get, /co...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/object/filter_query_test.rb
Ruby
mit
19
master
1,238
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/object/filter_query_test.rb class BusinessCentral::Object::FilterQueryTest < Minitest::Test def setup @filter_query = BusinessCentral::Object::FilterQuery end def test_no_template_values test_filter = "displayNam...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/object/attachments_test.rb
Ruby
mit
19
master
2,786
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/object/attachments_test.rb class BusinessCentral::Object::AttachmentsTest < Minitest::Test def setup @company_id = '123456' @client = BusinessCentral::Client.new @attachment = @client.attachments(company_id: @comp...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/object/response_test.rb
Ruby
mit
19
master
1,428
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/object/response_test.rb class BusinessCentral::Object::ResponseTest < Minitest::Test def test_success assert BusinessCentral::Object::Response.success?(200) end def test_created_success assert BusinessCentral::Ob...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
test/business_central/object/request_test.rb
Ruby
mit
19
master
3,284
# frozen_string_literal: true require 'test_helper' # rake test TEST=test/business_central/object/request_test.rb class BusinessCentral::Object::RequestTest < Minitest::Test def setup @url = BusinessCentral::Client::DEFAULT_URL @client = BusinessCentral::Client.new end def test_get_request stub_req...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central.rb
Ruby
mit
19
master
694
require 'oauth2' require 'oauth2/error' require 'net/http' require 'json' require 'refinements/strings' require 'business_central/object/url_helper' require 'business_central/object/object_helper' require 'business_central/object/response' require 'business_central/object/request' require 'business_central/object/fil...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/exceptions.rb
Ruby
mit
19
master
1,192
# frozen_string_literal: true module BusinessCentral class BusinessCentralError < StandardError; end class ApiException < BusinessCentralError def initialize(message) @message = message super end attr_reader :message end class CompanyNotFoundException < BusinessCentralError def m...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/web_service.rb
Ruby
mit
19
master
1,638
# frozen_string_literal: true module BusinessCentral class WebService using Refinements::Strings DEFAULT_URL = 'https://api.businesscentral.dynamics.com/v2.0/production/ODataV4' attr_reader :url, :object_url def initialize(client:, **options) @client = client opts = options.dup @...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/client.rb
Ruby
mit
19
master
2,784
# frozen_string_literal: true module BusinessCentral class Client using Refinements::Strings include BusinessCentral::Object::ObjectHelper DEFAULT_LOGIN_URL = 'https://login.microsoftonline.com/common' DEFAULT_URL = 'https://api.businesscentral.dynamics.com/v2.0/production/api/v1.0' attr_read...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/url_helper.rb
Ruby
mit
19
master
1,190
# frozen_string_literal: true module BusinessCentral module Object module URLHelper using Refinements::Strings def encode_url_object(object) URI::RFC2396_Parser.new.escape(object) end def encode_url_params(query) CGI.escape(query) end def odata_encode(value)...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/companies.rb
Ruby
mit
19
master
365
# frozen_string_literal: true module BusinessCentral module Object class Companies < Base using Refinements::Strings OBJECT = 'companies' def initialize(client, **args) super(client, **args.merge!({ object_name: OBJECT })) @object_path = [{ path: OBJECT, id...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/object_helper.rb
Ruby
mit
19
master
608
# frozen_string_literal: true module BusinessCentral module Object module ObjectHelper using Refinements::Strings def method_missing(object_name, **params) if BusinessCentral::Object.const_defined?(object_name.to_s.to_class_sym) klass = BusinessCentral::Object.const_get(object_name...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/base.rb
Ruby
mit
19
master
2,138
# frozen_string_literal: true module BusinessCentral module Object class Base using Refinements::Strings attr_reader :client def initialize(client, **args) @client = client @object_path = args.fetch( :object_path, [ { path: 'compan...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/request.rb
Ruby
mit
19
master
2,761
# frozen_string_literal: true module BusinessCentral module Object class Request using Refinements::Strings class << self def get(client, url) request(:get, client, url) end def post(client, url, params) request(:post, client, url, params: params) ...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/url_builder.rb
Ruby
mit
19
master
1,471
# frozen_string_literal: true module BusinessCentral module Object class URLBuilder using Refinements::Strings extend URLHelper class << self def sanitize(query = '', values = []) return encode_url_params(query) if values.length.zero? query = replace_template_with...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/response.rb
Ruby
mit
19
master
1,503
# frozen_string_literal: true module BusinessCentral module Object class Response using Refinements::Strings class << self def success?(status) [200, 201].include?(status) end def success_no_content?(status) status == 204 end def unauthor...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/filter_query.rb
Ruby
mit
19
master
418
# frozen_string_literal: true module BusinessCentral module Object class FilterQuery using Refinements::Strings extend URLHelper class << self def sanitize(query = '', values = []) return encode_url_params(query) if values.length.zero? query = replace_template_wit...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/picture.rb
Ruby
mit
19
master
438
# frozen_string_literal: true module BusinessCentral module Object class Picture < Base using Refinements::Strings def update(id, data) object = find_all Request.call(:patch, @client, "#{build_url(object_id: id)}/content", etag: object[:etag], params: {}) do |request| reque...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/business_central/object/attachments.rb
Ruby
mit
19
master
789
# frozen_string_literal: true module BusinessCentral module Object class Attachments < Base using Refinements::Strings OBJECT = 'attachments' def initialize(client, **args) super(client, **args.merge!({ object_name: OBJECT })) end def update(parent_id:, attachment_id:, **...
github
JDrizzy/business-central
https://github.com/JDrizzy/business-central
lib/refinements/strings.rb
Ruby
mit
19
master
1,050
# frozen_string_literal: true module Refinements module Strings refine String do def blank? empty? || /\A[[:space:]]*\z/.match?(self) end def present? !blank? end # Convert string to CamelCase def to_camel_case(uppercase_first_letter = false) string =...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
Gemfile
Ruby
mit
19
main
3,591
source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby file: ".ruby-version" gem "aasm", "~> 5.5.2" gem "active_model_serializers", "~> 0.10.16" gem "csv" gem "discard", "~> 1.4" gem "faraday" gem "govuk_notify_rails", "~> 3.0.0" gem "net-imap" gem "net-pop" gem "net-smtp" ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
Guardfile
Ruby
mit
19
main
1,169
guard "livereload" do watch(%r{app/views/.+\.(erb|haml|slim)}) watch(%r{app/helpers/.+\.rb}) watch(%r{public/.+\.(css|js|html)}) watch(%r{config/locales/.+\.yml}) # Rails Assets Pipeline watch(%r{(app|vendor)(/assets/\w+/(.+\.(scss|js|html|haml))).*}) { |m| "/assets/#{m[3]}" } end guard :rspec, cmd: "bundl...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
Rakefile
Ruby
mit
19
main
328
# 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_relative "config/application" Rails.application.load_tasks unless Rails.env.production? task default: %i[rubocop erblint javascript_tests cucumber sp...