- GitHub Staff
- @[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'uri' | |
require 'json' | |
require 'net/https' | |
require 'time' | |
require 'cgi' | |
require 'csv' | |
# You need a Spotify API app to have a client ID and client secret. Create | |
# one at https://developer.spotify.com/my-applications/#!/applications/create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'rubygems' | |
# require 'nokogiri' | |
require 'json' | |
require 'rss' | |
require 'open-uri' | |
require 'uri' | |
class RSSFetcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'rubygems' | |
require 'json' | |
require 'open-uri' | |
class SteamAPI | |
attr_reader :api_key, :user_id, :api_url | |
def initialize api_key, user_id, api_url=nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'erb' | |
# lib/missing_spec_generator.rb | |
class MissingSpecGenerator | |
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
def spec_file spec_path, file_name, spec_template, namespace | |
spec_name = file_name.gsub('.rb', '') + '_spec.rb' | |
if File.exist?("#{spec_path}/#{spec_name}") | |
puts "#{spec_path}/#{spec_name} exists" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
module Module1 | |
describe Module2::MyClass do | |
let(:my_instance) { Module1::Module2::MyClass.new('abc', 123) } | |
context 'super cool context' do | |
# Use cassette Module1_Module2_MyClass/super_cool_context/neat_method.yml | |
describe 'neat_method', vcr: relative_cassette('neat_method') do | |
subject { my_instance.neat_method(id) } |
NewerOlder