repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/transactional_timeline_test.rb
test/transactional_timeline_test.rb
require File.dirname(__FILE__) + '/helper' class TransactionalTimelineTest < Test::Unit::TestCase multiple_contexts "authenticated_using_oauth_context", "authenticated_using_api_key_context" do setup do @client_id = "87y8d7qyw8d7yq8w7ydwqwd" @message_id = "ddc697c7-0788-4df3-a71a-a7cb935f00bd" ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/transactional_classic_email_test.rb
test/transactional_classic_email_test.rb
require File.dirname(__FILE__) + '/helper' class TransactionalClassicEmailTest < Test::Unit::TestCase multiple_contexts "authenticated_using_oauth_context", "authenticated_using_api_key_context" do setup do @client_id = "87y8d7qyw8d7yq8w7ydwqwd" @email = CreateSend::Transactional::ClassicEmail.new @a...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/subscriber_test.rb
test/subscriber_test.rb
require File.dirname(__FILE__) + '/helper' class SubscriberTest < Test::Unit::TestCase multiple_contexts "authenticated_using_oauth_context", "authenticated_using_api_key_context" do setup do @list_id = "d98h2938d9283d982u3d98u88" @subscriber = CreateSend::Subscriber.new @auth, @list_id, "subscriber@...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/client_test.rb
test/client_test.rb
require File.dirname(__FILE__) + '/helper' class ClientTest < Test::Unit::TestCase multiple_contexts "authenticated_using_oauth_context", "authenticated_using_api_key_context" do setup do @client = CreateSend::Client.new(@auth, '321iuhiuhi1u23hi2u3') @client.client_id.should be == '321iuhiuhi1u23hi2u...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/segment_test.rb
test/segment_test.rb
require File.dirname(__FILE__) + '/helper' class SegmentTest < Test::Unit::TestCase multiple_contexts "authenticated_using_oauth_context", "authenticated_using_api_key_context" do setup do @segment = CreateSend::Segment.new @auth, '98y2e98y289dh89h938389' end should "create a new segment" do ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/campaign_test.rb
test/campaign_test.rb
require File.dirname(__FILE__) + '/helper' class CampaignTest < Test::Unit::TestCase multiple_contexts "authenticated_using_oauth_context", "authenticated_using_api_key_context" do setup do @campaign = CreateSend::Campaign.new @auth, '787y87y87y87y87y87y87' end should "create a campaign" do ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/helper.rb
test/helper.rb
require 'simplecov' require 'coveralls' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ]) SimpleCov.start require 'test/unit' require 'pathname' require 'shoulda/context' require 'matchy' require 'fakeweb' $LOAD_PATH.unshift(...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/transactional_smart_email_test.rb
test/transactional_smart_email_test.rb
require File.dirname(__FILE__) + '/helper' class TransactionalSmartEmailTest < Test::Unit::TestCase multiple_contexts "authenticated_using_oauth_context", "authenticated_using_api_key_context" do setup do @client_id = "87y8d7qyw8d7yq8w7ydwqwd" @smart_email_id = "bcf40510-f968-11e4-ab73-bf67677cc1f4" ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/test/list_test.rb
test/list_test.rb
require File.dirname(__FILE__) + '/helper' class ListTest < Test::Unit::TestCase multiple_contexts "authenticated_using_oauth_context", "authenticated_using_api_key_context" do setup do @client_id = "87y8d7qyw8d7yq8w7ydwqwd" @list_id = "e3c5f034d68744f7881fdccf13c2daee" @list = CreateSend::List...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend.rb
lib/createsend.rb
libdir = File.dirname(__FILE__) $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir) require 'createsend/version' require 'createsend/createsend' require 'createsend/client' require 'createsend/campaign' require 'createsend/list' require 'createsend/segment' require 'createsend/subscriber' require 'createsend...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/version.rb
lib/createsend/version.rb
module CreateSend VERSION = "6.1.2" unless defined?(CreateSend::VERSION) end
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/transactional_timeline.rb
lib/createsend/transactional_timeline.rb
module CreateSend module Transactional class Timeline < CreateSend attr_reader :client_id def initialize(auth, client_id = nil) @auth = auth @client_id = client_id super end def messages(options = {}) options = add_client_id(options) response ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/createsend.rb
lib/createsend/createsend.rb
require 'cgi' require 'uri' require 'httparty' require 'hashie' require 'json' module CreateSend USER_AGENT_STRING = "createsend-ruby-#{VERSION}-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}-#{RUBY_PLATFORM}" # Represents a CreateSend API error. Contains specific data about the error. class CreateSendError < StandardErr...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/segment.rb
lib/createsend/segment.rb
module CreateSend # Represents a subscriber list segment and associated functionality. class Segment < CreateSend attr_reader :segment_id def initialize(auth, segment_id) @segment_id = segment_id super end # Creates a new segment. def self.create(auth, list_id, title, rule_groups) ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/subscriber.rb
lib/createsend/subscriber.rb
module CreateSend # Represents a subscriber and associated functionality. class Subscriber < CreateSend attr_reader :list_id attr_reader :email_address def initialize(auth, list_id, email_address) @list_id = list_id @email_address = email_address super end # Gets a subscriber...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/template.rb
lib/createsend/template.rb
module CreateSend # Represents an email template and associated functionality. class Template < CreateSend attr_reader :template_id def initialize(auth, template_id) @template_id = template_id super end # Creates a new email template. def self.create(auth, client_id, name, html_url...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/list.rb
lib/createsend/list.rb
module CreateSend # Represents a subscriber list and associated functionality. class List < CreateSend attr_reader :list_id def initialize(auth, list_id) @list_id = list_id super end # Creates a new list for a client. # client_id - String representing the ID of the client for whom ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/client.rb
lib/createsend/client.rb
module CreateSend # Represents a client and associated functionality. class Client < CreateSend attr_reader :client_id def initialize(auth, client_id) @client_id = client_id super end # Creates a client. def self.create(auth, company, timezone, country) options = { :body => {...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/transactional_smart_email.rb
lib/createsend/transactional_smart_email.rb
module CreateSend module Transactional class SmartEmail < CreateSend attr_reader :smart_email_id def self.list(auth, options = nil) cs = CreateSend.new auth response = cs.get "/transactional/smartemail", :query => options response.map{|item| Hashie::Mash.new(item)} end ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/administrator.rb
lib/createsend/administrator.rb
module CreateSend # Represents an administrator and associated functionality. class Administrator < CreateSend attr_reader :email_address def initialize(auth, email_address) @email_address = email_address super end # Gets an administrator by email address. def self.get(auth, email_...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/journey.rb
lib/createsend/journey.rb
module CreateSend # Represents a journey and provides associated functionality class Journey < CreateSend attr_reader :journey_id def initialize(auth, journey_id) @journey_id = journey_id super end # Get a full summary of a journey def summary response = get "/journeys/#{@jou...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/person.rb
lib/createsend/person.rb
module CreateSend # Represents a person and associated functionality. class Person < CreateSend attr_reader :client_id attr_reader :email_address def initialize(auth, client_id, email_address) @client_id = client_id @email_address = email_address super end # Gets a person by ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/transactional_classic_email.rb
lib/createsend/transactional_classic_email.rb
module CreateSend module Transactional class ClassicEmail < CreateSend attr_accessor :options def initialize(auth, client_id = nil) @auth = auth @client_id = client_id super end def send(options) response = post "/transactional/classicemail/send", { :body ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
campaignmonitor/createsend-ruby
https://github.com/campaignmonitor/createsend-ruby/blob/a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47/lib/createsend/campaign.rb
lib/createsend/campaign.rb
module CreateSend # Represents a campaign and provides associated functionality. class Campaign < CreateSend attr_reader :campaign_id def initialize(auth, campaign_id) @campaign_id = campaign_id super end # Creates a new campaign for a client. # client_id - String representing the ...
ruby
MIT
a2f2ddbbd0845c6cbf1d20443000f0d319e9cc47
2026-01-04T17:53:12.263443Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/samples/tail-with-block.rb
samples/tail-with-block.rb
#!/usr/bin/env ruby # # Simple 'tail -f' example. This one uses a block instead of a separate handler # class # Usage example: # tail-with-block.rb /var/log/messages require "rubygems" require "eventmachine" require "eventmachine-tail" def main(args) if args.length == 0 puts "Usage: #{$0} <path> [path2] [...]...
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/samples/globwatch.rb
samples/globwatch.rb
#!/usr/bin/env ruby require "rubygems" require "eventmachine" require "eventmachine-tail" class Watcher < EventMachine::FileGlobWatch def initialize(pathglob, interval=5) super(pathglob, interval) end def file_deleted(path) puts "Removed: #{path}" end def file_found(path) puts "Found: #{path}"...
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/samples/glob-tail.rb
samples/glob-tail.rb
#!/usr/bin/env ruby # # Sample that uses eventmachine-tail to watch a file or set of files. # Basically, this example implements 'tail -f' but can accept globs # that are also watched. # # For example, '/var/log/*.log' will be periodically watched for new # matching files which will additionally be watched. # # Usage e...
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/samples/tail.rb
samples/tail.rb
#!/usr/bin/env ruby # # Simple 'tail -f' example. # Usage example: # tail.rb /var/log/messages require "rubygems" require "eventmachine" require "eventmachine-tail" class Reader < EventMachine::FileTail def initialize(path, startpos=-1) super(path, startpos) puts "Tailing #{path}" @buffer = BufferedTo...
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/test/alltests.rb
test/alltests.rb
$: << File.expand_path('..', __FILE__) require 'test_filetail' require 'test_glob'
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/test/test_glob.rb
test/test_glob.rb
#!/usr/bin/env ruby require 'rubygems' $:.unshift "#{File.dirname(__FILE__)}/../lib" require 'eventmachine-tail' require 'tempfile' require 'test/unit' require 'timeout' require 'tmpdir' require 'testcase_helpers' class Watcher < EventMachine::FileGlobWatch def initialize(path, interval, data, testobj) super(p...
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/test/test_filetail.rb
test/test_filetail.rb
#!/usr/bin/env ruby require 'rubygems' $:.unshift "#{File.dirname(__FILE__)}/../lib" require 'eventmachine-tail' require 'tempfile' require 'test/unit' require 'timeout' require 'testcase_helpers.rb' # Generate some data DATA = (1..10).collect { |i| rand.to_s } SLEEPMAX = 1 class Reader < EventMachine::FileTail d...
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/test/testcase_helpers.rb
test/testcase_helpers.rb
module EventMachineTailTestHelpers def abort_after_timeout(seconds) EM::Timer.new(seconds) do EM.stop_event_loop flunk("Timeout (#{seconds} seconds) while running tests. Failing.") end end def finish EventMachine.stop_event_loop end end # module EventMachineTailTestHelpers
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/lib/eventmachine-tail.rb
lib/eventmachine-tail.rb
require 'em/filetail' require 'em/globwatcher'
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/lib/em/filetail.rb
lib/em/filetail.rb
#!/usr/bin/env ruby require "eventmachine" require "logger" EventMachine.epoll if EventMachine.epoll? EventMachine.kqueue = true if EventMachine.kqueue? # Tail a file. # # Example # class Tailer < EventMachine::FileTail # def receive_data(data) # puts "Got #{data.length} bytes" # end # # # Option...
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jordansissel/eventmachine-tail
https://github.com/jordansissel/eventmachine-tail/blob/aeebe12e641a0384100145558cd6449e9a69d3c0/lib/em/globwatcher.rb
lib/em/globwatcher.rb
#!/usr/bin/env ruby require "em/filetail" require "eventmachine" require "logger" require "set" EventMachine.epoll if EventMachine.epoll? EventMachine.kqueue = true if EventMachine.kqueue? # A file glob pattern watcher for EventMachine. # # If you are unfamiliar with globs, see Wikipedia: # http://en.wikipedia.org/w...
ruby
BSD-3-Clause
aeebe12e641a0384100145558cd6449e9a69d3c0
2026-01-04T17:53:34.880532Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/candy_check_spec.rb
spec/candy_check_spec.rb
require "spec_helper" describe CandyCheck do subject { CandyCheck } it "has a version" do _(subject::VERSION).wont_be_nil end end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/spec_helper.rb
spec/spec_helper.rb
require "candy_check" require "candy_check/cli" def in_continuous_integration_environment? ENV["CI"] || ENV["TRAVIS"] || ENV["CONTINUOUS_INTEGRATION"] end require "simplecov" SimpleCov.start do if in_continuous_integration_environment? require "simplecov-lcov" SimpleCov::Formatter::LcovFormatter.config ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/app_store/verification_spec.rb
spec/app_store/verification_spec.rb
require "spec_helper" describe CandyCheck::AppStore::Verification do subject { CandyCheck::AppStore::Verification.new(endpoint, data, secret) } let(:endpoint) { "https://some.endpoint" } let(:data) { "some_data" } let(:secret) { "some_secret" } it "returns a verification failure for status != 0" do ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/app_store/client_spec.rb
spec/app_store/client_spec.rb
require "spec_helper" describe CandyCheck::AppStore::Client do let(:endpoint_url) { "https://some.endpoint.com/verify" } let(:receipt_data) do "some_very_long_receipt_information_which_is_normaly_base64_encoded" end let(:password) do "some_secret_password" end let(:response) do '{ "receipt"...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/app_store/receipt_spec.rb
spec/app_store/receipt_spec.rb
require "spec_helper" describe CandyCheck::AppStore::Receipt do subject { CandyCheck::AppStore::Receipt.new(attributes) } let(:attributes) do { "original_purchase_date_pst" => "2015-01-08 03:40:46" \ " America/Los_Angeles", "purchase_date_ms" => "1420803646868...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/app_store/subscription_verification_spec.rb
spec/app_store/subscription_verification_spec.rb
require "spec_helper" describe CandyCheck::AppStore::SubscriptionVerification do subject do CandyCheck::AppStore::SubscriptionVerification.new(endpoint, data, secret) end let(:endpoint) { "https://some.endpoint" } let(:data) { "some_data" } let(:secret) { "some_secret" } it "returns a verifica...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/app_store/verifcation_failure_spec.rb
spec/app_store/verifcation_failure_spec.rb
require "spec_helper" describe CandyCheck::AppStore::VerificationFailure do subject { CandyCheck::AppStore::VerificationFailure } let(:known) do [21_000, 21_002, 21_003, 21_004, 21_005, 21_006, 21_007, 21_008] end it "fetched an failure with message for every known code" do known.each do |code| ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/app_store/config_spec.rb
spec/app_store/config_spec.rb
require "spec_helper" describe CandyCheck::AppStore::Config do subject { CandyCheck::AppStore::Config.new(attributes) } describe "valid" do let(:attributes) do { environment: :sandbox, } end it "returns environment" do _(subject.environment).must_equal :sandbox end ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/app_store/verifier_spec.rb
spec/app_store/verifier_spec.rb
require "spec_helper" describe CandyCheck::AppStore::Verifier do subject { CandyCheck::AppStore::Verifier.new(config) } let(:config) do CandyCheck::AppStore::Config.new(environment: environment) end let(:environment) { :production } let(:data) { "some_data" } let(:secret) { "some_secret" } le...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/app_store/receipt_collection_spec.rb
spec/app_store/receipt_collection_spec.rb
require "spec_helper" describe CandyCheck::AppStore::ReceiptCollection do subject { CandyCheck::AppStore::ReceiptCollection.new(attributes) } describe "overdue subscription" do let(:attributes) do [{ "expires_date" => "2014-04-15 12:52:40 Etc/GMT", "expires_date_pst" => "2014-04-15 05:52...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/support/with_fixtures.rb
spec/support/with_fixtures.rb
module WithFixtures def fixture_path(*args) File.join(File.expand_path('../../fixtures', __FILE__), *args) end def fixture_content(*args) File.read(fixture_path(*args)) end end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/support/with_temp_file.rb
spec/support/with_temp_file.rb
require 'tempfile' module WithTempFile def self.included(target) target.instance_eval do def self.with_temp_file(name) random_name = "#{name}-#{rand(100_000..200_000)}" full_path = File.join(Dir.tmpdir, random_name) define_method "#{name}_path" do full_path end ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/support/with_command.rb
spec/support/with_command.rb
module WithCommand def out @out ||= OutRecorder.new end def run_command! CandyCheck::CLI::Out.stub :new, out do subject.run(*arguments) end end def arguments [] end class OutRecorder def lines @lines ||= [] end def print(text = '') lines << text end ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/acknowledger_spec.rb
spec/play_store/acknowledger_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::Acknowledger do let(:json_key_file) { File.expand_path("../fixtures/play_store/random_dummy_key.json", __dir__) } subject { CandyCheck::PlayStore::Acknowledger.new(authorization: authorization) } let(:package_name) { "fake_package_name" } let(:product_id) ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/verification_failure_spec.rb
spec/play_store/verification_failure_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::VerificationFailure do subject { CandyCheck::PlayStore::VerificationFailure.new(fake_error) } let(:fake_error_class) do Struct.new(:status_code, :message) end describe "denied" do let(:fake_error) do fake_error_class.new("401", "The current ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/verifier_spec.rb
spec/play_store/verifier_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::Verifier do subject { CandyCheck::PlayStore::Verifier.new(authorization: authorization) } let(:package_name) { "my_package_name" } let(:product_id) { "my_product_id" } let(:subscription_id) { "my_subscription_id" } let(:token) { "my_token" } let(:json...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/subscription_purchases/subscription_purchase_spec.rb
spec/play_store/subscription_purchases/subscription_purchase_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::SubscriptionPurchases::SubscriptionPurchase do subject { CandyCheck::PlayStore::SubscriptionPurchases::SubscriptionPurchase.new(fake_subscription_purchase) } describe "expired and canceled subscription" do let(:fake_subscription_purchase) do OpenStru...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/subscription_purchases/subscription_verification_spec.rb
spec/play_store/subscription_purchases/subscription_verification_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::SubscriptionPurchases::SubscriptionVerification do subject do CandyCheck::PlayStore::SubscriptionPurchases::SubscriptionVerification.new( package_name: package_name, subscription_id: subscription_id, token: token, authorization: author...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/product_purchases/product_purchase_spec.rb
spec/play_store/product_purchases/product_purchase_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::ProductPurchases::ProductPurchase do subject { CandyCheck::PlayStore::ProductPurchases::ProductPurchase.new(fake_product_purchase) } describe "valid and non-consumed product" do let(:fake_product_purchase) do OpenStruct.new( consumption_state...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/product_purchases/product_verification_spec.rb
spec/play_store/product_purchases/product_verification_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::ProductPurchases::ProductVerification do subject do CandyCheck::PlayStore::ProductPurchases::ProductVerification.new( package_name: package_name, product_id: product_id, token: token, authorization: authorization, ) end let(:pa...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/product_acknowledgements/response_spec.rb
spec/play_store/product_acknowledgements/response_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::ProductAcknowledgements::Response do subject do CandyCheck::PlayStore::ProductAcknowledgements::Response.new(result: result, error_data: error_data) end describe "#acknowledged?" do describe "when result present" do let(:result) { "" } le...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/play_store/product_acknowledgements/acknowledgement_spec.rb
spec/play_store/product_acknowledgements/acknowledgement_spec.rb
require "spec_helper" describe CandyCheck::PlayStore::ProductAcknowledgements::Acknowledgement do subject do CandyCheck::PlayStore::ProductAcknowledgements::Acknowledgement.new( package_name: package_name, product_id: product_id, token: token, authorization: authorization, ) end ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/cli/app_spec.rb
spec/cli/app_spec.rb
require "spec_helper" describe CandyCheck::CLI::App do subject { CandyCheck::CLI::App.new } it "supports the version command" do stub_command(CandyCheck::CLI::Commands::Version) do _(subject.version).must_equal :stubbed _(@arguments).must_be_empty end end it "supports the app_store comman...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/cli/out_spec.rb
spec/cli/out_spec.rb
require "spec_helper" describe CandyCheck::CLI::Out do subject { CandyCheck::CLI::Out.new(out) } let(:out) { StringIO.new } it "defaults to use STDOUT" do _(CandyCheck::CLI::Out.new.out).must_be_same_as $stdout end it "holds the outlet" do _(subject.out).must_be_same_as out end it "prints to o...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/cli/commands/version_spec.rb
spec/cli/commands/version_spec.rb
require "spec_helper" describe CandyCheck::CLI::Commands::Version do include WithCommand subject { CandyCheck::CLI::Commands::Version } it "prints the gem's version" do run_command! _(out.lines).must_equal [CandyCheck::VERSION] end end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/cli/commands/app_store_spec.rb
spec/cli/commands/app_store_spec.rb
require "spec_helper" describe CandyCheck::CLI::Commands::AppStore do include WithCommand subject { CandyCheck::CLI::Commands::AppStore } let(:arguments) { [receipt, options] } let(:receipt) { "data" } let(:options) do { environment: :sandbox, } end let(:dummy_verifier_class) do Struct....
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/spec/cli/commands/play_store_spec.rb
spec/cli/commands/play_store_spec.rb
require "spec_helper" describe CandyCheck::CLI::Commands::PlayStore do include WithCommand subject do CandyCheck::CLI::Commands::PlayStore.new(package_name, product_id, token, "json_key_file" => json_key_file) end let(:package_name) { "my_package_name" } let(:product_id) { "my_product_id" } let(:token)...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check.rb
lib/candy_check.rb
require "candy_check/version" require "candy_check/utils" require "candy_check/app_store" require "candy_check/play_store" # Module to check and verify in-app receipts module CandyCheck end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/version.rb
lib/candy_check/version.rb
module CandyCheck # The current gem's version VERSION = "0.6.0".freeze end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/utils.rb
lib/candy_check/utils.rb
require "candy_check/utils/attribute_reader" require "candy_check/utils/config"
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store.rb
lib/candy_check/play_store.rb
require "google-apis-androidpublisher_v3" require "googleauth" require "candy_check/play_store/android_publisher_service" require "candy_check/play_store/product_purchases/product_purchase" require "candy_check/play_store/subscription_purchases/subscription_purchase" require "candy_check/play_store/product_purchases/p...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/cli.rb
lib/candy_check/cli.rb
require "candy_check/cli/app" require "candy_check/cli/commands" require "candy_check/cli/out" module CandyCheck # Namespace holding the implementation of the CLI to # verify in-app purchases module CLI end end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store.rb
lib/candy_check/app_store.rb
require "candy_check/app_store/client" require "candy_check/app_store/config" require "candy_check/app_store/receipt" require "candy_check/app_store/receipt_collection" require "candy_check/app_store/verification" require "candy_check/app_store/subscription_verification" require "candy_check/app_store/verification_fail...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store/subscription_verification.rb
lib/candy_check/app_store/subscription_verification.rb
module CandyCheck module AppStore # Verifies a latest_receipt_info block against a verification server. # The call return either an {ReceiptCollection} or a {VerificationFailure} class SubscriptionVerification < CandyCheck::AppStore::Verification # Builds a fresh verification run # @param endp...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store/verification_failure.rb
lib/candy_check/app_store/verification_failure.rb
module CandyCheck module AppStore # Represents a failing call against the verification server class VerificationFailure # @return [Integer] the code of the failure attr_reader :code # @return [String] the message of the failure attr_reader :message # Initializes a new instance ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store/verifier.rb
lib/candy_check/app_store/verifier.rb
module CandyCheck module AppStore # Verifies receipts against the verification servers. # The call return either an {Receipt} or a {VerificationFailure} class Verifier # HTTPS endpoint for production receipts PRODUCTION_ENDPOINT = "https://buy.itunes.apple.com/verifyReceipt".freeze # HTT...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store/verification.rb
lib/candy_check/app_store/verification.rb
module CandyCheck module AppStore # Verifies a receipt block against a verification server. # The call return either an {Receipt} or a {VerificationFailure} class Verification # @return [String] the verification URL to use attr_reader :endpoint_url # @return [String] the raw data to be v...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store/receipt.rb
lib/candy_check/app_store/receipt.rb
module CandyCheck module AppStore # Describes a successful response from the AppStore verification server class Receipt include Utils::AttributeReader # @return [Hash] the raw attributes returned from the server attr_reader :attributes # Initializes a new instance which bases on a JS...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store/client.rb
lib/candy_check/app_store/client.rb
require "multi_json" require "net/http" module CandyCheck module AppStore # Simple HTTP client to load the receipt's data from Apple's verification # servers (either sandbox or production). class Client # Mimetype for JSON objects JSON_MIME_TYPE = "application/json".freeze # Initialize...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store/receipt_collection.rb
lib/candy_check/app_store/receipt_collection.rb
module CandyCheck module AppStore # Store multiple {Receipt}s in order to perform collective operation on them class ReceiptCollection # Multiple receipts as in verfication response # @return [Array<Receipt>] attr_reader :receipts # Initializes a new instance which bases on a JSON res...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/app_store/config.rb
lib/candy_check/app_store/config.rb
module CandyCheck module AppStore # Configure the verifier class Config < Utils::Config # @return [Symbol] the used environment attr_reader :environment # @!method initialize(attributes) # Initializes a new configuration from a hash # @param attributes [Hash] # @exam...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/verification_failure.rb
lib/candy_check/play_store/verification_failure.rb
module CandyCheck module PlayStore # Represents a failing call against the Google API server class VerificationFailure include Utils::AttributeReader # @return [Hash] the raw attributes returned from the server attr_reader :error # Initializes a new instance which bases on a JSON res...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/verifier.rb
lib/candy_check/play_store/verifier.rb
module CandyCheck module PlayStore # Verifies purchase tokens against the Google API. # The call return either a {SubscriptionPurchases::SubscriptionPurchase} or a {VerificationFailure} class Verifier # Initializes a new verifier which is bound to an authorization # @param authorization [Googl...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/android_publisher_service.rb
lib/candy_check/play_store/android_publisher_service.rb
module CandyCheck module PlayStore class AndroidPublisherService < Google::Apis::AndroidpublisherV3::AndroidPublisherService end end end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/acknowledger.rb
lib/candy_check/play_store/acknowledger.rb
module CandyCheck module PlayStore class Acknowledger def initialize(authorization:) @authorization = authorization end def acknowledge_product_purchase(package_name:, product_id:, token:) acknowledger = CandyCheck::PlayStore::ProductAcknowledgements::Acknowledgement.new( ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/subscription_purchases/subscription_verification.rb
lib/candy_check/play_store/subscription_purchases/subscription_verification.rb
module CandyCheck module PlayStore module SubscriptionPurchases # Verifies a purchase token against the Google API # The call return either an {SubscriptionPurchase} or an {VerificationFailure} class SubscriptionVerification # @return [String] the package which will be queried at...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/subscription_purchases/subscription_purchase.rb
lib/candy_check/play_store/subscription_purchases/subscription_purchase.rb
module CandyCheck module PlayStore module SubscriptionPurchases # Describes a successfully validated subscription class SubscriptionPurchase include Utils::AttributeReader # @return [Google::Apis::AndroidpublisherV3::SubscriptionPurchase] the raw subscription purchase # from...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/product_purchases/product_purchase.rb
lib/candy_check/play_store/product_purchases/product_purchase.rb
module CandyCheck module PlayStore module ProductPurchases # Describes a successful response from the PlayStore verification server class ProductPurchase include Utils::AttributeReader # Returns the raw ProductPurchase from google-api-client gem # @return [Google::Apis::Androi...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/product_purchases/product_verification.rb
lib/candy_check/play_store/product_purchases/product_verification.rb
module CandyCheck module PlayStore module ProductPurchases # Verifies a purchase token against the PlayStore API # The call return either a {ProductPurchase} or a {VerificationFailure} class ProductVerification # @return [String] the package_name which will be queried attr_reader...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/product_acknowledgements/response.rb
lib/candy_check/play_store/product_acknowledgements/response.rb
module CandyCheck module PlayStore module ProductAcknowledgements class Response def initialize(result:, error_data:) @result = result @error_data = error_data end def acknowledged? !!result end def error return unless error_d...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/play_store/product_acknowledgements/acknowledgement.rb
lib/candy_check/play_store/product_acknowledgements/acknowledgement.rb
module CandyCheck module PlayStore module ProductAcknowledgements # Verifies a purchase token against the PlayStore API class Acknowledgement # @return [String] the package_name which will be queried attr_reader :package_name # @return [String] the item id which will be querie...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/utils/attribute_reader.rb
lib/candy_check/utils/attribute_reader.rb
require "date" module CandyCheck module Utils # @private module AttributeReader protected def read(field) attributes[field] end def has?(field) attributes.key?(field) end def read_integer(field) (val = read(field)) && val.to_i end # ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/utils/config.rb
lib/candy_check/utils/config.rb
module CandyCheck module Utils # Very basic base implementation to store and validate a configuration class Config # Initializes a new configuration from a hash # @param attributes [Hash] def initialize(attributes) if attributes.is_a?(Hash) attributes.each do |k, v| ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/cli/app.rb
lib/candy_check/cli/app.rb
require "thor" module CandyCheck module CLI # Main class for the executable 'candy_check' # @example # $> candy_check help class App < Thor package_name "CandyCheck" desc "app_store RECEIPT_DATA", "Verify a base64 encoded AppStore receipt" method_option :environment, ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/cli/commands.rb
lib/candy_check/cli/commands.rb
require "candy_check/cli/commands/base" require "candy_check/cli/commands/app_store" require "candy_check/cli/commands/play_store" require "candy_check/cli/commands/version" module CandyCheck module CLI # Module for actual commands which can be invoked from the terminal module Commands end end end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/cli/out.rb
lib/candy_check/cli/out.rb
module CandyCheck module CLI # A wrapper to output text information to any kind of buffer # @example # out = Out.new(std_buffer) # out.print('something') # => appends 'something' to std_buffer class Out # @return [Object] buffer used as default outlet attr_reader :out # Bind...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/cli/commands/version.rb
lib/candy_check/cli/commands/version.rb
module CandyCheck module CLI module Commands # Command to show the gem's version class Version < Base # Prints the current gem's version to the command line def run out.print CandyCheck::VERSION end end end end end
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/cli/commands/play_store.rb
lib/candy_check/cli/commands/play_store.rb
module CandyCheck module CLI module Commands # Command to verify an PlayStore purchase class PlayStore < Base # Prepare a verification run from the terminal # @param package_name [String] # @param product_id [String] # @param token [String] # @param options [Has...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/cli/commands/base.rb
lib/candy_check/cli/commands/base.rb
module CandyCheck module CLI module Commands # Base for all commands providing simple support for running a single # command and printing to an {Out} instance class Base # Initialize a new command and prepare options for the run # @param options [Object] def initialize(op...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
jnbt/candy_check
https://github.com/jnbt/candy_check/blob/a4f2e80810c62f8e8bff88632a3b866de8eb59d1/lib/candy_check/cli/commands/app_store.rb
lib/candy_check/cli/commands/app_store.rb
module CandyCheck module CLI module Commands # Command to verify an AppStore receipt token class AppStore < Base # Prepare a verification run from the terminal # @param receipt [String] # @param options [Hash] # @option options [String] :secret A shared secret to use ...
ruby
MIT
a4f2e80810c62f8e8bff88632a3b866de8eb59d1
2026-01-04T17:53:38.935512Z
false
giuse/DNE
https://github.com/giuse/DNE/blob/c5e0acdfe3be89897049b622ded5fc94348a1b0d/tools.rb
tools.rb
module DNE # Tools to support debug and implementation. # I just want to be able to call `show_image` anywhere in the code and # be presented with something sensible. module Tools def self.show_image img shape = nil to_disp = case img when NArray, NImage img = img.cast_to NArray #...
ruby
MIT
c5e0acdfe3be89897049b622ded5fc94348a1b0d
2026-01-04T17:53:51.078468Z
false
giuse/DNE
https://github.com/giuse/DNE/blob/c5e0acdfe3be89897049b622ded5fc94348a1b0d/observation_compressor.rb
observation_compressor.rb
require 'forwardable' require 'machine_learning_workbench' module DNE # Wrap a WB compressor for usage on observations in a UL-ERL + PyCall context class ObservationCompressor extend Forwardable def_delegators :@compr, :ncentrs, :centrs, :ntrains, :ntrains_skip, :encoding, :code_size attr_reader :dow...
ruby
MIT
c5e0acdfe3be89897049b622ded5fc94348a1b0d
2026-01-04T17:53:51.078468Z
false
giuse/DNE
https://github.com/giuse/DNE/blob/c5e0acdfe3be89897049b622ded5fc94348a1b0d/gym_test.rb
gym_test.rb
def test_pycall_gym ENV["PYTHON"] = `which python3`.strip # set python3 path for PyCall require 'pycall/import' # https://github.com/mrkn/pycall.rb/ include PyCall::Import pyimport :gym env = gym.make('CartPole-v1') nsteps = 100 env.reset env.render nsteps.times do |i| selecte...
ruby
MIT
c5e0acdfe3be89897049b622ded5fc94348a1b0d
2026-01-04T17:53:51.078468Z
false
giuse/DNE
https://github.com/giuse/DNE/blob/c5e0acdfe3be89897049b622ded5fc94348a1b0d/atari_ulerl_experiment.rb
atari_ulerl_experiment.rb
require 'forwardable' require_relative 'gym_experiment' require_relative 'observation_compressor' require_relative 'atari_wrapper' require_relative 'tools' module DNE # TODO: why doesn't it work when I use UInt8? We're in [0,255]! NImage = Xumo::UInt32 # set a single data type for images # Specialized GymExperi...
ruby
MIT
c5e0acdfe3be89897049b622ded5fc94348a1b0d
2026-01-04T17:53:51.078468Z
false
giuse/DNE
https://github.com/giuse/DNE/blob/c5e0acdfe3be89897049b622ded5fc94348a1b0d/atari_wrapper.rb
atari_wrapper.rb
require 'numo/narray' module DNE # Convenience wrapper for the Atari OpenAI Gym environments class AtariWrapper attr_reader :gym_env, :reset_obs, :reset_obs_py, :act_type, :act_size, :obs_size, :skip_type, :downsample, :preproc, :row_div, :col_div extend Forwardable def_delegator :@gym_env, :re...
ruby
MIT
c5e0acdfe3be89897049b622ded5fc94348a1b0d
2026-01-04T17:53:51.078468Z
false