This file contains hidden or 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
| name 'assign_to_courses' | |
| summary 'Assign a new site to multiple courses in db' | |
| usage 'assign_to_courses <provider_code> <site_code<' | |
| param :provider_code, transform: ->(code) { code.upcase } | |
| param :site_code, transform: ->(code) { code.upcase } | |
| run do |opts, args, _cmd| | |
| MCB.init_rails(opts) | |
| provider = Provider.find_by!(provider_code: args[:provider_code]) |
This file contains hidden or 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
| name 'edit_accredited_body' | |
| summary 'Edit accredited bodies on courses directly in the DB' | |
| usage 'edit_accredited_body <provider_code>' | |
| param :provider_code, transform: ->(code) { code.upcase } | |
| class EditAccreditedBody | |
| attr_reader :cli | |
| attr_reader :provider | |
| def initialize(provider) |
This file contains hidden or 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
| Feature: levy balance view | |
| In order to understand trends in levy funds coming in and payments going out | |
| As a senior stakeholder | |
| I can see levy funds and payments rolled up by month and funding source/type of credit | |
| Scenario: levy balances | |
| Given the following employer accounts: | |
| | AccountId | DasAccountId | AccountName | | |
| | 123 | ABC123 | CompanyABC | | |
| And the following PAYE schemes: |
This file contains hidden or 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
| mkdir 1pass-for-wordpress | |
| cd 1pass-for-wordpress | |
| git clone [email protected]:1Pass/1pass-for-wordpress.git git | |
| svn co https://plugins.svn.wordpress.org/1pass svn | |
| git clone --recursive [email protected]:kasparsd/wp-deploy.git | |
| cd git | |
| composer install --no-dev |
This file contains hidden or 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
| 'text.html.ruby': | |
| editor: | |
| showIndentGuide: true | |
| softTabs: false | |
| '.source.ruby': # ruby overrides | |
| editor: | |
| tabLength: 2 |
This file contains hidden or 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 'open-uri' | |
| require 'open_uri_redirections' | |
| require 'timeout' | |
| require 'active_support/core_ext/array' | |
| require 'pp' | |
| def fetch(url) | |
| # puts "Fetching #{url}" | |
| Timeout::timeout(2) { | |
| open(url, allow_redirections: :safe).read rescue nil |
This file contains hidden or 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
| # GET /anonymous_feedback/service_feedback/yesterday | |
| # (last day's data, midnight to midnight) | |
| # GET /anonymous_feedback/service_feedback?from=2013-01-01&to=2013-01-02 | |
| [ | |
| "from": "2013-01-01T00:00:00+00:00", | |
| "to": "2013-01-02T00:00:00+00:00", | |
| "results": [ |
This file contains hidden or 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 'zendesk_api' | |
| require 'yaml' | |
| class ZendeskClientBuilder | |
| def self.build | |
| zendesk_config = YAML.load(File.read('../config/zendesk.yml'))["production"] | |
| ZendeskAPI::Client.new { |config| | |
| config.url = "https://govuk.zendesk.com/api/v2/" | |
| config.username = zendesk_config["username"] |
This file contains hidden or 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 'yaml' | |
| require 'json' | |
| require 'httparty' | |
| class Zendesk | |
| include HTTParty | |
| base_uri "https://zendeskinstance.zendesk.com/api/v2" | |
| headers 'Content-Type' => "application/json" | |
| # debug_output $stderr | |
NewerOlder