Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Set file header in documentation root
Drudge, for symbolic noncommutative and tensor algebra ====================================================== .. toctree:: :maxdepth: 2 :caption: Contents: intro tutorial api Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search`
====================================================== Drudge, for symbolic noncommutative and tensor algebra ====================================================== .. toctree:: :maxdepth: 2 :caption: Contents: intro tutorial api Indices and tables ================== * :ref:`genindex` * :ref:`modind...
Add intro text to main documentation page
.. Ember documentation master file, created by sphinx-quickstart on Tue Jun 5 17:49:07 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to Ember's documentation! ================================= Contents: .. toctree:: :maxdept...
.. Ember documentation master file, created by sphinx-quickstart on Tue Jun 5 17:49:07 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. ***** Ember ***** Ember is a quasi-one-dimensional, unsteady reacting flow solver. It can be used to si...
Change author name to pgcli core team.
vcli: A REPL for Vertica ======================== A Vertica client that does auto-completion and syntax highlighting, forked from Amjith Ramanujam's `pgcli <http://pgcli.com>`_. Quick Start ----------- vcli is not officially released yet, but you can install the latest development version with pip:: $ pip inst...
vcli: A REPL for Vertica ======================== A Vertica client that does auto-completion and syntax highlighting, forked from `pgcli <http://pgcli.com>`_. Quick Start ----------- vcli is not officially released yet, but you can install the latest development version with pip:: $ pip install https://github....
Use syntax highlighting (maybe non-standard reST directive)
================== ゲストブックアプリ ================== 目的 ==== Webブラウザでコメントを投稿するWebアプリケーションの練習。 (参考:Pythonプロフェッショナルプログラミング第2版) ツールのバージョン ================== :Python: 2.7.9 :pip: 7.1.2 :pyenv: 20141211 インストールと起動方法 ====================== リポジトリからコードを取得し、その下にvirtualenv環境を用意します:: $ git clone git@github.com:...
================== ゲストブックアプリ ================== 目的 ==== Webブラウザでコメントを投稿するWebアプリケーションの練習。 (参考:Pythonプロフェッショナルプログラミング第2版) ツールのバージョン ================== :Python: 2.7.9 :pip: 7.1.2 :pyenv: 20141211 インストールと起動方法 ====================== リポジトリからコードを取得し、その下にvirtualenv環境を用意します。 .. code-block:: bash $ git ...
Use PyPI instead of github for pip install
PyMetabiosis ============ A bridge between PyPy and CPython that works by embedding CPython, its main purpose it to allow you to use any CPython module on PyPy (including C extensions). * PyMetabiosis tries to link with the python command available on $PATH, however you can override this (if you want to use a virtual...
PyMetabiosis ============ A bridge between PyPy and CPython that works by embedding CPython, its main purpose it to allow you to use any CPython module on PyPy (including C extensions). * PyMetabiosis tries to link with the python command available on $PATH, however you can override this (if you want to use a virtual...
Update documentation for NFV profile support
.. tosca-parser documentation master file, created by sphinx-quickstart on Tue Jul 9 22:26:36 2013. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to tosca-parser's documentation! =========================================== The TOSCA P...
.. tosca-parser documentation master file, created by sphinx-quickstart on Tue Jul 9 22:26:36 2013. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to tosca-parser's documentation! =========================================== The TOSCA P...
Add bump to API doc
Commands ======== .. automodule:: workspace.commands.checkout :members: .. automodule:: workspace.commands.clean :members: .. automodule:: workspace.commands.commit :members: .. automodule:: workspace.commands.develop :members: .. automodule:: workspace.commands.diff :members: .. automodule:: works...
Commands ======== .. automodule:: workspace.commands.bump :members: .. automodule:: workspace.commands.checkout :members: .. automodule:: workspace.commands.clean :members: .. automodule:: workspace.commands.commit :members: .. automodule:: workspace.commands.develop :members: .. automodule:: works...
Set the width of the conceptual architecture image
:orphan: .. _get_started_conceptual_architecture: ======================= Conceptual architecture ======================= The following diagram shows the relationships among the OpenStack services: .. image:: figures/openstack_kilo_conceptual_arch.png :alt: OpenStack conceptual architecture
:orphan: .. _get_started_conceptual_architecture: ======================= Conceptual architecture ======================= The following diagram shows the relationships among the OpenStack services: .. image:: figures/openstack_kilo_conceptual_arch.png :alt: OpenStack conceptual architecture :width: 100%
Update FAQ to clarify Python2/3 differences
Frequently Asked Questions ========================== How can I extract a public / private key from a x509 certificate? ----------------------------------------------------------------- The ``load_pem_x509_certificate()`` function from ``cryptography`` can be used to extract the public or private keys from a x509 cer...
Frequently Asked Questions ========================== How can I extract a public / private key from a x509 certificate? ----------------------------------------------------------------- The ``load_pem_x509_certificate()`` function from ``cryptography`` can be used to extract the public or private keys from a x509 cer...
Simplify TOC that doesn't need to be so deep
.. _content-projects: ================ Jupyter Projects ================ The Jupyter community is composed of several sub-communities and projects. These are organized around particular use-cases, users, or other aspects of the Jupyter community. This section contains information to help navigate these projects both ...
.. _content-projects: ================ Jupyter Projects ================ The Jupyter community is composed of several sub-communities and projects. These are organized around particular use-cases, users, or other aspects of the Jupyter community. This section contains information to help navigate these projects both ...
Fix spelling mistake and redudant text per review
Developer Documentation ======================= This section aims to provide developers to the OpenSpending platform with instuctions on how to do tasks that are commonly performed. Creating a DB Migration ''''''''''''''''''''''' 1. Make sure you're in the virtualenv for openspending and run ``migrate script "<de...
Developer Documentation ======================= Creating a DB Migration ''''''''''''''''''''''' 1. Make sure you're in the virtualenv for OpenSpending and run ``migrate script "<description>" migration``. Replace ``<description>`` with a description for your change. For instance, "Add terms column". 2. A new fi...
Add migrate link in french documentation
Documentation de wallabag ========================= .. image:: ../img/wallabag.png :alt: wallabag logo :align: center **wallabag** est une application de lecture différée : elle permet simplement d’archiver une page web en ne conservant que le contenu. Les éléments superflus (menu, publicité, etc.) sont supprim...
Documentation de wallabag ========================= .. image:: ../img/wallabag.png :alt: wallabag logo :align: center **wallabag** est une application de lecture différée : elle permet simplement d’archiver une page web en ne conservant que le contenu. Les éléments superflus (menu, publicité, etc.) sont supprim...
Add a note about the auto-generated belongsTo relationship links
Fetching Resources ================== Fetching a single JSON API Resource is done by calling the ``view`` action of your API with: - the ``HTTP GET`` request type - an ``Accept`` header set to ``application/vnd.api+json`` A successful request will respond with HTTP response code ``200`` and response body similar to...
Fetching Resources ================== Fetch a single JSON API Resource by calling the ``view`` action of your API with: - the ``HTTP GET`` request type - an ``Accept`` header set to ``application/vnd.api+json`` A successful request will respond with HTTP response code ``200`` and response body similar to this outpu...
Add output for the example
===================== Single file templater ===================== sftmpl takes a single file as input and uses the built-in string format method to replace the occurence of brace-enclosed variables by values given on the command-line. The aim of sftmpl is to simplify the generation of configuration file in computing ...
===================== Single file templater ===================== sftmpl takes a single file as input and uses the built-in string format method to replace the occurence of brace-enclosed variables by values given on the command-line. The aim of sftmpl is to simplify the generation of configuration file in computing ...
Correct line endings in installation instructions.
.. _installation: ************ Installation ************ .. NOTE:: RMG has been tested on the Python 2.5, 2.6, and 2.7 releases; dependency issues render it incompatible with Python 3.x releases Briefly, RMG depends on the following packages: * **NumPy:** fast matrix operations * **SciPy:** fast mathematical ...
.. _installation: ************ Installation ************ .. NOTE:: RMG has been tested on the Python 2.5, 2.6, and 2.7 releases; dependency issues render it incompatible with Python 3.x releases Briefly, RMG depends on the following packages: * **NumPy:** fast matrix operations * **SciPy:** fast mathematical t...
Fix python version in readme
######## Overview ######## This is a command line interface (cli) for `Kytos SDN Platform <https://kytos.io/>`_. With these utilities you can interact with Kytos daemon and manage Network Applications (NApps) on your controller. QuickStart ********** Installing ========== We are doing a huge effort to make Kytos an...
######## Overview ######## This is a command line interface (cli) for `Kytos SDN Platform <https://kytos.io/>`_. With these utilities you can interact with Kytos daemon and manage Network Applications (NApps) on your controller. QuickStart ********** Installing ========== We are doing a huge effort to make Kytos an...
Add request logging info to changelog
0.7.0 (2014-11-26) ------------------ - headers are no longer cached and required as part of async and http client setup. 0.6.0 (2014-10-30) ------------------ - format='date' params are now represented and passed as datetime.date objects instead of datetime.datetimes. 0.5.7 (2014-10-23) ------------------ - Succ...
0.7.3 (2014-12-11) ------------------ - request logging is now done on the debug level instead of info level. 0.7.0 (2014-11-26) ------------------ - headers are no longer cached and required as part of async and http client setup. 0.6.0 (2014-10-30) ------------------ - format='date' params are now represented ...
Remove outdated text from Data Observatory reference
Data Observatory ---------------- With CARTOframes it is possible to enrich your data by using our `Data Observatory <#data-observatory>`__ Catalog through the enrichment methods. **Important:** The new Data Observatory 2.0 is accessible to selected CARTO Enterprise users in a private beta. We're still open to more b...
Data Observatory ---------------- With CARTOframes it is possible to enrich your data by using our `Data Observatory <#data-observatory>`__ Catalog through the enrichment methods. .. automodule:: cartoframes.data.observatory :noindex: :members: :member-order: bysource :exclude-members: get_datasets_sp...
Add the utils doc to the front page
libnacl: Python bindings to NaCl ================================ Contents: .. toctree:: :maxdepth: 2 topics/public topics/secret topics/sign topics/dual topics/raw_public topics/raw_secret topics/raw_sign topics/raw_hash topics/releases/index Indices and tables ================== * ...
libnacl: Python bindings to NaCl ================================ Contents: .. toctree:: :maxdepth: 2 topics/public topics/secret topics/sign topics/dual topics/utils topics/raw_public topics/raw_secret topics/raw_sign topics/raw_hash topics/releases/index Indices and tables ======...
Reorganize plugin docs, add junitxml
=============== Builtin Plugins =============== .. toctree:: :maxdepth: 2 plugins/discovery plugins/functions plugins/generators plugins/parameters plugins/testcases plugins/doctests plugins/result plugins/buffer plugins/debugger plugins/failfast plugins/logcapture plugins/outco...
=============== Builtin Plugins =============== Loaded by Default ================= These plugins are loaded by default. To exclude one of these plugins from loading, add the plugin's module name to the ``exclude-plugins`` list in a config file's ``[unittest]`` section, or pass the plugin module with the ``--exclude-...
Fix rst in lxc readme
Worker ====== Install lxc:: sudo apt-get update sudo apt-get install lxc Install and configure btrfs:: sudo apt-get install btrfs-tools # assume we have /dev/vdb volume dedicated to btrfs filesystem sudo mkfs.btrfs /dev/vdb # Be careful! sudo sh -c 'echo "/dev/vdb /var/lib/lxc btrfs noatime 0 ...
RCI and LXC on single node mini howto ===================================== Install lxc:: sudo apt-get update sudo apt-get install lxc Install and configure btrfs:: sudo apt-get install btrfs-tools # assume we have /dev/vdb volume dedicated to btrfs filesystem sudo mkfs.btrfs /dev/vdb # Be caref...
Add nil rescues around helper functions not available to account controller (need a better way for this though)
<!DOCTYPE html PUBLIC "-//w3c//dtd XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Typo admin: <%= controller.controller_name %></title> <%= stylesheet_link_tag "admin.css" %> </head> <body> <div id="container"> <div id="header"> <h1><%...
<!DOCTYPE html PUBLIC "-//w3c//dtd XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Typo admin: <%= controller.controller_name %></title> <%= stylesheet_link_tag "admin.css" %> </head> <body> <div id="container"> <div id="header"> <h1><%...
Add more actions button for the rest of the stats
<script> SourcesCharts = { chart: null, date: "<%= @date.strftime('%F') %>", next: function() { $j.getJSON("<%= url_for :action => 'referrer_sources' %>", {date: SourcesCharts.date, direction: 'next'}, function(res) {SourcesCharts.load(res);}); }, prev: function() { $j.getJSON("<%= url_for :action =...
<script> SourcesCharts = { chart: null, date: "<%= @date.strftime('%F') %>", next: function() { $j.getJSON("<%= url_for :action => 'referrer_sources' %>", {date: SourcesCharts.date, direction: 'next'}, function(res) {SourcesCharts.load(res);}); }, prev: function() { $j.getJSON("<%= url_for :action =...
Sort the tags for the databrowser output.
<% unless tag_details.tags_as_hash.empty? %> <tr valign="top"> <th>Tags:</th> <td> <table cellpadding="0"> <%= render :partial => "tag", :collection => tag_details.tags_as_hash %> </table> </td> </tr> <% end %>
<% unless tag_details.tags.empty? %> <tr valign="top"> <th>Tags:</th> <td> <table cellpadding="0"> <%= render :partial => "tag", :collection => tag_details.tags.sort %> </table> </td> </tr> <% end %>
Make tag links work again.
<% content_for "optionals" do %> <div class="optionalbox"> <span class="oboxheader">Tags</span> <br /> <br /> <% if @all_tags %> <% @all_tags.each do |tag| %> <%= link_to tag, :controller => 'trace', :action => @paging_action, :tag => tag %><br /> <% end %> <% end %> </div> <...
<% content_for "optionals" do %> <div class="optionalbox"> <span class="oboxheader">Tags</span> <br /> <br /> <% if @all_tags %> <% @all_tags.each do |tag| %> <%= link_to tag, :tag => tag %><br /> <% end %> <% end %> </div> <% end %>
Fix user pagination on cases and collages.
<aside class="pagination"> <div class="all_playlists_pagination" data-type="playlists"> <%= will_paginate @playlists, :container => false, :previous_label => 'Prev', :next_label => 'Next', :params => { :ajax_region => 'playlists' } %> </div> <div class="all_collages_pagination" style="display:none;" data-type="coll...
<aside class="pagination"> <div class="all_playlists_pagination" data-type="playlists"> <%= will_paginate @playlists, :container => false, :previous_label => 'Prev', :next_label => 'Next', :params => { :ajax_region => 'playlists' } %> </div> <div class="all_collages_pagination" style="display:none;" data-type="coll...
Fix for "flag after width" exception notifier fail
<% max = @request.env.keys.max { |a,b| a.length <=> b.length } -%> <% @request.env.keys.sort.each do |key| -%> * <%= "%*-s: %s" % [max.length, key, @request.env[key].to_s.strip] %> <% end -%> * Process: <%= $$ %> * Server : <%= `hostname -s`.chomp %>
<% max = @request.env.keys.max { |a,b| a.length <=> b.length } -%> <% @request.env.keys.sort.each do |key| -%> * <%= "%-s: %s" % [max.length, key, @request.env[key].to_s.strip] %> <% end -%> * Process: <%= $$ %> * Server : <%= `hostname -s`.chomp %>
Fix form link on front page to use new controller layout.
<div id="frontpage"> <div id="make_requests"> <h1>Make requests for information from the UK Government</h1> <% form_for(:info_request, @info_request, :url => { :controller => :new, :action => :index }, :html => { :id => 'public_body_form', :class => 'plaque' } ) do |f| %> <p>Choose whi...
<div id="frontpage"> <div id="make_requests"> <h1>Make requests for information from the UK Government</h1> <% form_for(:info_request, @info_request, :url => { :controller => :request, :action => :new }, :html => { :id => 'public_body_form', :class => 'plaque' } ) do |f| %> <p>Choose w...
Support :has_many :through nested scaffolds.
<h4>&nbsp;</h4> <% # This assumes that the association is included as a column in the active_scaffold_config.columns collection associated_columns = [] associated_columns = params[:associations].split(" ") unless params[:associations].nil? unless associated_columns.empty? parent_id = params[:id] associated_colu...
<h4>&nbsp;</h4> <% # This assumes that the association is included as a column in the active_scaffold_config.columns collection associated_columns = [] associated_columns = params[:associations].split(" ") unless params[:associations].nil? unless associated_columns.empty? parent_id = params[:id] associated_colu...
Fix display of empty lines
Diff is <%= @diff.inspect %> <% @diff.chunks.each do |chunk| %> <!-- Chunk header --> <table> <tr> <td>Src file:</td> <td><%=h chunk.src_files.join(", ") %></td> </tr> <tr> <td>Dst file:</td> <td><%=h chunk.dst_file %></td> </tr> </table> <table border="1" cellspacing...
Diff is <%= @diff.inspect %> <% @diff.chunks.each do |chunk| %> <!-- Chunk header --> <table> <tr> <td>Src file:</td> <td><%=h chunk.src_files.join(", ") %></td> </tr> <tr> <td>Dst file:</td> <td><%=h chunk.dst_file %></td> </tr> </table> <table border="1" cellspacing...
Add pagination to old unclassified requests.
<% @title = "Unclassified responses" %> <h1><%=@title%></h1> <p>Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response:</p> <ul> <% for @request in @info_requests %> <li> <%= request_both_links(@request) %> &ndash; <%=simple_date(@request.get_last...
<% @title = "Unclassified responses" %> <h1><%=@title%></h1> <p>Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response:</p> <ul> <% for @request in @info_requests %> <li> <%= request_both_links(@request) %> &ndash; <%=simple_date(@request.get_last_...
Hide search button when always_show_search is true
<% if active_scaffold_config.action_links.any? { |link| link.type == :table } -%> <div class="actions"> <% new_params = params_for(:action => :table) %> <% active_scaffold_config.action_links.each :table do |link| -%> <% next if controller.respond_to? link.security_method and !controller.send(link.s...
<% if active_scaffold_config.action_links.any? { |link| link.type == :table } -%> <div class="actions"> <% new_params = params_for(:action => :table) %> <% active_scaffold_config.action_links.each :table do |link| -%> <% next if link.action == 'show_search' && active_scaffold_config.list.always_show_se...
Fix text to make it clear the status update is on the website not in the email.
You have a new response to the <%= @info_request.law_used_full %> request '<%= @info_request.title %>' that you made to <%= @info_request.public_body.name %>. To view the response, click on the link below. <%=@url%> When you get there, let us know if the response contains any useful information. Although all re...
You have a new response to the <%= @info_request.law_used_full %> request '<%= @info_request.title %>' that you made to <%= @info_request.public_body.name %>. To view the response, click on the link below. <%=@url%> When you get there, please update the status to say if the response contains any useful informati...
Handle nodes which are in the same way multiple times.
<table> <%= render :partial => "common_details", :object => way_details %> <tr valign="top"> <th><%= t'browse.way_details.nodes' %></th> <td> <table cellpadding="0"> <% way_details.way_nodes.each do |wn| %> <tr><td> <%= link_to h(printable_name(wn.node)), :action => "no...
<table> <%= render :partial => "common_details", :object => way_details %> <tr valign="top"> <th><%= t'browse.way_details.nodes' %></th> <td> <table cellpadding="0"> <% way_details.way_nodes.each do |wn| %> <tr><td> <%= link_to h(printable_name(wn.node)), :action => "no...
Fix text to make it clear the status update is on the website not in the email.
You have a new response to the <%= @info_request.law_used_full %> request '<%= @info_request.title %>' that you made to <%= @info_request.public_body.name %>. To view the response, click on the link below. <%=@url%> When you get there, let us know if the response contains any useful information. Although all re...
You have a new response to the <%= @info_request.law_used_full %> request '<%= @info_request.title %>' that you made to <%= @info_request.public_body.name %>. To view the response, click on the link below. <%=@url%> When you get there, please update the status to say if the response contains any useful informati...
Fix "follow" toolbox HTML to be valid 4.01 transitional
<% form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %> <% if @user.receive_email_alerts %> <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %> <%= hidden_field_tag 'receive_email_alerts', 'false' %> <%= submit_tag _("T...
<% form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %> <div> <% if @user.receive_email_alerts %> <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %> <%= hidden_field_tag 'receive_email_alerts', 'false' %> <%= submit_t...
Add bold version of Maven Pro
<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %> <link href='http://fonts.googleapis.com/css?family=Maven+Pro|Actor' rel='stylesheet' type='text/css'>
<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %> <link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700|Actor' rel='stylesheet' type='text/css'>
Change text "Created at" on organization's page
<table> <tr> <th colspan='2'><%= _('Basic information')%></th> </tr> <tr> <td class='field-name'><%= _('Members') %></td> <td> <%= link_to profile.members_count, :controller => 'profile', :action => 'members' %> </td> </tr> <%= display_field(_('Type:'), profile, :privacy_setting, true)...
<table> <tr> <th colspan='2'><%= _('Basic information')%></th> </tr> <tr> <td class='field-name'><%= _('Members') %></td> <td> <%= link_to profile.members_count, :controller => 'profile', :action => 'members' %> </td> </tr> <%= display_field(_('Type:'), profile, :privacy_setting, true)...
Copy view partial from main alaveteli project
<div id="topnav"> <ul id="navigation"> <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] != 'blog' and params[:action] != 'search' %>"><%= link_to _("Home"), frontpage_url %></li> <li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_author...
Add nil rescues around helper functions not available to account controller (need a better way for this though)
<!DOCTYPE html PUBLIC "-//w3c//dtd XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Typo admin: <%= controller.controller_name %></title> <%= stylesheet_link_tag "admin.css" %> </head> <body> <div id="container"> <div id="header"> <h1><%...
<!DOCTYPE html PUBLIC "-//w3c//dtd XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Typo admin: <%= controller.controller_name %></title> <%= stylesheet_link_tag "admin.css" %> </head> <body> <div id="container"> <div id="header"> <h1><%...
Add test for bikalisting show_more button
*** Settings *** Library BuiltIn Library Selenium2Library timeout=5 implicit_wait=0.2 Library String Resource keywords.txt Resource plone/app/robotframework/selenium.robot Library Remote ${PLONEURL}/RobotRemote Variables plone/app/testing/interfaces.py Variables ...
Add test case for testing st2 execution tail command.
*** Variables *** ${EXECUTION RUN} st2 run ${EXECUTION TAIL} st2 execution tail ${CHILD EXECUTION 3 STARTED} (?ims).*Child execution \\(task=task3\\) .*? has started\..* ${CHILD EXECUTION 3 FINISHED} (?ims).*Child execution \\(task=task3\\) .*? has finished \\(status=succeeded\\)\. ${CHILD EXECUTION 10 START...
Increase implicit wait to 7 seconds to be more conservative
*** Settings *** Library Collections Library String Library SeleniumLibrary implicit_wait=${IMPLICIT_WAIT} timeout=${TIMEOUT} Library cumulusci.robotframework.CumulusCI ${ORG} Library cumulusci.robotframework.Salesforce debug=${DEBUG} *** Variables *** ${BROWSER} chrom...
*** Settings *** Library Collections Library String Library SeleniumLibrary implicit_wait=${IMPLICIT_WAIT} timeout=${TIMEOUT} Library cumulusci.robotframework.CumulusCI ${ORG} Library cumulusci.robotframework.Salesforce debug=${DEBUG} *** Variables *** ${BROWSER} chrom...
Correct number for test again.
*** Settings *** Resource cumulusci/robotframework/CumulusCI.robot Resource robot/Cumulus/resources/NPSP.robot Suite Setup Run Task Class tasks.generate_bdi_data.GenerateBDIData ... num_records=20 mapping_yaml=testdata/bdi_benchmark/mapping.yml *** Test Cases *** Import a data batch via t...
*** Settings *** Resource cumulusci/robotframework/CumulusCI.robot Resource robot/Cumulus/resources/NPSP.robot Suite Setup Run Task Class tasks.generate_bdi_data.GenerateBDIData ... num_records=5000 mapping_yaml=testdata/bdi_benchmark/mapping.yml *** Test Cases *** Import a data batch via...
Fix the competition submission time reset
*** Settings *** Documentation INFUND-5432 As an assessor I want to receive an alert to complete my profile when I log into my dashboard so that I can ensure that it is complete. Suite Setup Log in as user email=paul.plum@gmail.com password=Passw0rd Force Tags Assessor Resource ../../../...
*** Settings *** Documentation INFUND-5432 As an assessor I want to receive an alert to complete my profile when I log into my dashboard so that I can ensure that it is complete. Suite Setup Log in as user email=paul.plum@gmail.com password=Passw0rd Force Tags Assessor Resource ../../../...
Add "SSHLibrary." qualifier to "Open Connection" invocation.
*** Settings *** Documentation synaccess PDU library Resource ../../lib/pdu/pdu.robot Library RequestsLibrary.RequestsKeywords *** Keywords *** Connect and Login Validate Prereq Open Connection ${PDU_IP} ${auth}= Create List ${PDU_USERNAME} ${PDU_PASSWORD} Create...
*** Settings *** Documentation synaccess PDU library Resource ../../lib/pdu/pdu.robot Library RequestsLibrary.RequestsKeywords *** Keywords *** Connect and Login Validate Prereq SSHLibrary.Open Connection ${PDU_IP} ${auth}= Create List ${PDU_USERNAME} ${PDU_PASSWORD} ...
Update AUTH_URI variable in connections as global
*** Settings *** Documentation This module is for SSH connection override to QEMU ... based openbmc systems. Library SSHLibrary Library OperatingSystem *** Variables *** *** Keywords *** Open Connection And Log In Run Keyword If '${SSH_PORT}' != '${EMPTY}' and '${HTTPS_POR...
*** Settings *** Documentation This module is for SSH connection override to QEMU ... based openbmc systems. Library SSHLibrary Library OperatingSystem *** Variables *** *** Keywords *** Open Connection And Log In Run Keyword If '${SSH_PORT}' != '${EMPTY}' and '${HTTPS_POR...
Add test for absoluate path check
# Copyright 2019 Nathan Sommer and Ben Coleman # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is dis...
Add initial rest test cases Support to test Null properties
*** Settings *** Documentation This suite will verifiy all OpenBMC rest interfaces ... Details of valid interfaces can be found here... ... https://github.com/openbmc/docs/blob/master/rest-api.md Resource ../lib/rest_client.robot *** Variables *** *** Test Cases *** Good connection for testing ${resp} =...
Add failure messages for clarity in test suite setup
*** Settings *** Documentation To Verify KCS interface. Resource ../lib/ipmi_client.robot Resource ../lib/ipmi_utils.robot Variables ../data/ipmi_raw_cmd_table.py Library ../lib/ipmi_utils.py Suite Setup Test Setup Execution *** Variables *** ${...
*** Settings *** Documentation To Verify KCS interface. Resource ../lib/ipmi_client.robot Resource ../lib/ipmi_utils.robot Variables ../data/ipmi_raw_cmd_table.py Library ../lib/ipmi_utils.py Suite Setup Test Setup Execution *** Variables *** ${...
Update test to avoid global side effects.
-- Copyright 2016 Stanford University -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
-- Copyright 2016 Stanford University -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
Call the given block before, the site is spidered.
require 'wordlist/builder' require 'spidr' module Wordlist module Builders class Website < Builder # Host to spider attr_accessor :host # # Creates a new Website builder object with the specified _path_ # and the given _options_. If a _block_ is given, it will be passed # t...
require 'wordlist/builder' require 'spidr' module Wordlist module Builders class Website < Builder # Host to spider attr_accessor :host # # Creates a new Website builder object with the specified _path_ # and the given _options_. If a _block_ is given, it will be passed # t...
Change the wording the i18n spec
require 'i18n' RSpec.describe I18n::Backend::Base do # Since #load_erb is a protected method, this spec tests the # interface that calls it: #load_translations describe '#load_translations' do let(:translations) do I18n.backend.instance_variable_get(:@translations) end before do I18n.bac...
require 'i18n' RSpec.describe I18n::Backend::Base do # Since #load_erb is a protected method, this spec tests the # interface that calls it: #load_translations describe '#load_translations' do let(:translations) do I18n.backend.instance_variable_get(:@translations) end before do I18n.bac...
Add basic class for building objects to pass for the message queue for storing user actions.
require 'browser' class AkUserParams def self.create(params) # I'm assuming that the form params will come in with names that correspond to the AK API: # akid # email # name # name gets split to prefix, first name, middle name, last name and suffix automagically by AK ... # address1 # add...
require 'browser' class AkUserParams def self.create(params, browser) # I'm assuming that the form params will come with a field called signature # that will contain the petition form data with names that correspond to the AK API: # USER: # akid # email # prefix # suffix # name # addr...
Include project clone and pull script.
# go through projects and clean and update require 'yaml' $basedir = Dir.pwd config = YAML.load_file("_config.yml") config["projects"].each do |repo| name = repo.split('/').drop(1).join('') Dir.chdir($basedir + "/projects") if !Dir.exists?(name) # clone project repo `git clone https://github.c...
Install php for macOS Monterey
brew 'awscli' brew 'circleci' brew 'colordiff' brew 'coreutils' brew 'direnv' brew 'exa' brew 'fd' brew 'fish' brew 'fzf' brew 'gh' brew 'ghq' brew 'git' brew 'git-secrets' brew 'github-nippou' brew 'glow' brew 'gnupg' brew 'go' brew 'helm' brew 'heroku' brew 'hub' brew 'ipcalc' brew 'jq' brew 'krew' brew 'kubectl' { d...
brew 'awscli' brew 'circleci' brew 'colordiff' brew 'coreutils' brew 'direnv' brew 'exa' brew 'fd' brew 'fish' brew 'fzf' brew 'gh' brew 'ghq' brew 'git' brew 'git-secrets' brew 'github-nippou' brew 'glow' brew 'gnupg' brew 'go' brew 'helm' brew 'heroku' brew 'hub' brew 'ipcalc' brew 'jq' brew 'krew' brew 'kubectl' { d...
Clarify the test plan a litte
require_relative '../game' RSpec.describe 'Completing challenges' do let(:new_balance) { 50 } let(:new_config) { { initial_balance: new_balance, payroll: { wage_bill: 35 } } } let(:id) { '1234' } # TODO: random guids subject { Game.new } before do subj...
require_relative '../game' RSpec.describe 'Completing challenges' do let(:new_balance) { 50 } let(:new_config) { { initial_balance: new_balance, payroll: { wage_bill: 35 } } } let(:id) { '1234' } # TODO: random guids subject { Game.new } before do subj...
Fix install generator commit failure
class ExpressAdmin::InstallGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) desc "mount express_admin engine; migrate database" def install route_code = %Q{ mount ExpressAdmin::Engine, at: ExpressAdmin::Engine.config.admin_mount_point\n} inject_into_file "#{Rai...
class ExpressAdmin::InstallGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) desc "mount express_admin engine; migrate database" def install route_code = %Q{ mount ExpressAdmin::Engine, at: ExpressAdmin::Engine.config.admin_mount_point\n} inject_into_file "#{Rai...
Allow res to be nil in InstallGenerator's run_migrations
module SpreeGateway module Generators class InstallGenerator < Rails::Generators::Base def add_migrations run 'bundle exec rake railties:install:migrations FROM=spree_gateway' end def run_migrations res = ask "Would you like to run the migrations now? [Y/n]" if res ==...
module SpreeGateway module Generators class InstallGenerator < Rails::Generators::Base def add_migrations run 'bundle exec rake railties:install:migrations FROM=spree_gateway' end def run_migrations res = ask "Would you like to run the migrations now? [Y/n]" if res.ni...
Fix response when code is not present
module GobiertoBudgets class FeaturedBudgetLinesController < GobiertoBudgets::ApplicationController def show @year = params[:id].to_i @area_name = GobiertoBudgets::FunctionalArea.area_name @kind = GobiertoBudgets::BudgetLine::EXPENSE results = GobiertoBudgets::BudgetLine.search({ ...
module GobiertoBudgets class FeaturedBudgetLinesController < GobiertoBudgets::ApplicationController def show @year = params[:id].to_i @area_name = GobiertoBudgets::FunctionalArea.area_name @kind = GobiertoBudgets::BudgetLine::EXPENSE results = GobiertoBudgets::BudgetLine.search({ ...
Remove hardcoding view from create_zone method
module InfobloxClient class Client module Zones def zones get('zone_auth') end def zone(ref) get(ref) end def delete_zone(ref) delete(ref) end def create_zone(attrs={}) body = attrs.merge({'view' => 'default'}) body_json = JSON....
module InfobloxClient class Client module Zones def zones get('zone_auth') end def zone(ref) get(ref) end def delete_zone(ref) delete(ref) end def create_zone(attrs={}) body_json = JSON.dump(attrs) post_request = -> { post('zone...
Set the index to be actually unique
class AddUniqueIndexToTradePermits < ActiveRecord::Migration def change add_index "trade_permits", :number, :name => "trade_permits_number_idx" end end
class AddUniqueIndexToTradePermits < ActiveRecord::Migration def change add_index "trade_permits", :number, :name => "trade_permits_number_idx", :unique => true end end
Clean up gemspec a bit
require File.expand_path("../lib/authem/version.rb", __FILE__) Gem::Specification.new do |spec| spec.name = "authem" spec.version = Authem::VERSION spec.authors = ["Paul Elliott", "Pavel Pravosud"] spec.email = ["paul@codingfrontier.com", "pavel@prav...
require File.expand_path("../lib/authem/version.rb", __FILE__) Gem::Specification.new do |spec| spec.name = "authem" spec.version = Authem::VERSION spec.authors = ["Paul Elliott", "Pavel Pravosud"] spec.email = ["paul@codingfrontier.com", "pavel@prav...
Update subject line to reveal environment. In Heroku, RAILS_ENV is defined as production, even in dev environment, so use the S3_Bucket_Name which reveals the actual environment.
class LoadMailer < ApplicationMailer def self.send_notifications(load_event) emails = ['sheri.tibbs@duke.edu'] emails.each do |email| send_notification(email, load_event).deliver_now end end def send_notification(email, load_event) subject_line="AACT #{ENV['RAILS_ENV']} #{load_event.event_...
class LoadMailer < ApplicationMailer def self.send_notifications(load_event) emails = ['sheri.tibbs@duke.edu'] emails.each do |email| send_notification(email, load_event).deliver_now end end def send_notification(email, load_event) subject_line="AACT #{ENV['S3_BUCKET_NAME']} #{load_event.e...
Add the live MS registration specs
# encoding: utf-8 require 'spec_helper' describe Sonar::Registration do let(:client) { Sonar::Client.new } context 'POSTing a valid product key' do let (:resp) do VCR.use_cassette("valid_ms_registration") do client.register_metasploit("SOME-VALID-KEY") end end it 'responds that th...
# encoding: utf-8 require 'spec_helper' describe Sonar::Registration do let(:client) { Sonar::Client.new } context 'POSTing a valid product key' do let (:resp) do VCR.use_cassette("valid_ms_registration") do client.register_metasploit("SOME-VALID-KEY") end end it 'responds that th...
Update podspec homepage and description
# # Be sure to run `pod lib lint Clappr.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = "Clappr" s.v...
Pod::Spec.new do |s| s.name = "Clappr" s.version = "0.1.0" s.summary = "An extensible media player for iOS" s.homepage = "http://clappr.io" s.license = 'MIT' s.author = { "Diego Marcon" => "diego.marcon@corp.globo.com" } s.source = { :git ...
Support back to macOS 10.11
Pod::Spec.new do |spec| spec.name = 'Cassette' spec.version = '1.0.0-beta2' spec.license = { :type => 'BSD-2-Clause' } spec.homepage = 'https://github.com/linkedin/cassette' spec.authors = 'LinkedIn' spec.summary = 'A lightning fast file-based FIFO ...
Pod::Spec.new do |spec| spec.name = 'Cassette' spec.version = '1.0.0-beta2' spec.license = { :type => 'BSD-2-Clause' } spec.homepage = 'https://github.com/linkedin/cassette' spec.authors = 'LinkedIn' spec.summary = 'A lightning fast file-based FIFO ...
Fix db migration to v0.8 for Postgres
class AddFingerprintToGitolitePublicKeys < ActiveRecord::Migration def self.up add_column :gitolite_public_keys, :fingerprint, :string, :null => false, :after => 'key' end def self.down remove_column :gitolite_public_keys, :fingerprint end end
class AddFingerprintToGitolitePublicKeys < ActiveRecord::Migration def self.up add_column :gitolite_public_keys, :fingerprint, :string, :after => 'key' GitolitePublicKey.update_all("fingerprint = ''") change_column :gitolite_public_keys, :fingerprint, :string, :null => false end def self.down r...
Remove oraclejdk9 from list of java alternate versions
override['maven']['install_java'] = false default['travis_ci_cookiecat']['prerequisite_packages'] = %w( cron curl git sudo wget ) override['travis_system_info']['commands_file'] = \ '/var/tmp/cookiecat-system-info-commands.yml' override['java']['jdk_version'] = '8' override['java']['install_flavor'] = 'o...
override['maven']['install_java'] = false default['travis_ci_cookiecat']['prerequisite_packages'] = %w( cron curl git sudo wget ) override['travis_system_info']['commands_file'] = \ '/var/tmp/cookiecat-system-info-commands.yml' override['java']['jdk_version'] = '8' override['java']['install_flavor'] = 'o...
Remove bundler dependency from gemspec
# frozen_string_literal: true require "./lib/gemdiff/version" Gem::Specification.new do |spec| spec.name = "gemdiff" spec.version = Gemdiff::VERSION spec.authors = ["Tee Parham"] spec.email = ["tee@neighborland.com"] spec.summary = "Find source repositories for ruby gems. ...
# frozen_string_literal: true require "./lib/gemdiff/version" Gem::Specification.new do |spec| spec.name = "gemdiff" spec.version = Gemdiff::VERSION spec.authors = ["Tee Parham"] spec.email = ["tee@neighborland.com"] spec.summary = "Find source repositories for ruby gems. ...
Fix TaxRate.zone mass-assignment in TaxCategory factory
FactoryGirl.define do factory :tax_category, :class => Spree::TaxCategory do name { "TaxCategory - #{rand(999999)}" } description { Faker::Lorem.sentence } end factory :tax_category_with_rates, :parent => :tax_category do after_create do |tax_category| tax_category.tax_rates.create!(:amount => ...
FactoryGirl.define do factory :tax_category, :class => Spree::TaxCategory do name { "TaxCategory - #{rand(999999)}" } description { Faker::Lorem.sentence } end factory :tax_category_with_rates, :parent => :tax_category do after_create do |tax_category| tax_category.tax_rates.create!({ :...
Make Calfresh module and add FORM_FIELDS mapping constant
require 'pdf_forms' class CalfreshApplicationWriter def initialize @pdftk = PdfForms.new('/usr/bin/pdftk') end def fill_out_form(args) validated_field_values = args.select { |key| ['name','address'].include?(key.to_s) } # Need to replace keys with keys from form @pdftk.fill_form './calfresh_appl...
require 'pdf_forms' module Calfresh FORM_FIELDS = { name: 'Text1 PG 1', \ home_address: 'Text4 PG 1', \ home_city: 'Text5 PG 1', \ home_state: 'Text6 PG 1', \ home_zip_code: 'Text7 PG 1' \ } class ApplicationWriter def initialize @pdftk = PdfForms.new('/usr/bin/pdftk') end def...
Add base error class for all specific error classes to inherit from
require "active_support/notifications" require "stripe" require "stripe_event/engine" if defined?(Rails) module StripeEvent class << self attr_accessor :backend, :event_retriever, :namespace def setup(&block) instance_eval(&block) end def instrument(params) begin event = event_r...
require "active_support/notifications" require "stripe" require "stripe_event/engine" if defined?(Rails) module StripeEvent class << self attr_accessor :backend, :event_retriever, :namespace def setup(&block) instance_eval(&block) end def instrument(params) begin event = event_r...
Fix undefined method 'destroy' for user session
# encoding: utf-8 class <%= session_plural_class_name %>Controller < ApplicationController skip_before_filter :login_required layout 'login' def new @<%= session_singular_name %> = <%= session_class_name %>.new end def create @<%= session_singular_name %> = <%= session_class_name %>.new(para...
# encoding: utf-8 class <%= session_plural_class_name %>Controller < ApplicationController skip_before_filter :login_required layout 'login' def new @<%= session_singular_name %> = <%= session_class_name %>.new end def create @<%= session_singular_name %> = <%= session_class_name %>.new(para...
Use new route definition style
Rails.application.routes.draw do root to: 'organizations#index' resources :organizations do resources :events do member do post :activate post :deactivate end end end resource :user # Authentication get 'login' => 'sessions#new' post 'login' => 'sessions#create' po...
Rails.application.routes.draw do root to: 'organizations#index' resources :organizations do resources :events do member do post :activate post :deactivate end end end resource :user # Authentication get 'login', to: 'sessions#new' post 'login', to: 'sessions#create' ...
Delete CTS group and redirect to new location
slug = "common-technology-services-cts" redirect_path = "/government/publications/technology-code-of-practice/technology-code-of-practice" group = PolicyGroup.find_by(slug: slug) exit unless group content_id = group.content_id group.delete PublishingApiRedirectWorker.new.perform(content_id, redirect_path, "en") put...
Add missing fields to Pretransaction Object
module Ravelin class PreTransaction < RavelinObject attr_accessor :transaction_id, :email, :currency, :debit, :credit, :gateway, :custom attr_required :transaction_id, :currency, :debit, :credit, :gateway end end
module Ravelin class PreTransaction < RavelinObject attr_accessor :transaction_id, :email, :currency, :debit, :credit, :gateway, :type, :time, :custom attr_required :transaction_id, :currency, :debit, :credit, :gateway end end
Resolve rubocop warnings in comparision.rb.
require_relative 'error' module SyncIssues # Comparison represents differences between Issues (local and GitHub) class Comparison attr_reader :assignee, :changed, :content, :title def initialize(issue, github_issue, sync_assignee) @changed = [] @assignee = github_issue.assignee && github_issue...
require_relative 'error' module SyncIssues # Comparison represents differences between Issues (local and GitHub) class Comparison attr_reader :assignee, :changed, :content, :title def initialize(issue, github_issue, sync_assignee) @changed = [] @assignee = github_issue.assignee && github_issue...
Add StudentSchoolYears to data integrity check
class IntegrityCheck def check! begin has_data? has_valid_data? puts 'All good!' rescue => error puts 'Uh oh! Data check failed:' puts error.message end end private def has_data? raise "no students" unless Student.count > 0 raise "no schools" unless School.co...
class IntegrityCheck def check! begin has_data? has_valid_data? puts 'All good!' rescue => error puts 'Uh oh! Data check failed:' puts error.message end end private def has_data? raise "no students" unless Student.count > 0 raise "no schools" unless School.co...
Fix for activesupport < 4.0
module Goodyear class Railtie < Rails::Railtie ActiveSupport::Notifications.subscribe 'query.elasticsearch' do |name, start, finish, id, payload| Rails.logger.debug(["#{payload[:name]}".bright, "(#{((finish.to_time - start.to_time) * 1000).to_s(:rounded, precision: 5, strip_insignificant_zeros: true)}ms)",p...
module Goodyear class Railtie < Rails::Railtie include ActionView::Helpers::NumberHelper def time_diff(start, finish) begin ((finish.to_time - start.to_time) * 1000).to_s(:rounded, precision: 5, strip_insignificant_zeros: true) rescue number_with_precision((finish.to_time - start.t...
Add podspec file with valid details
Pod::Spec.new do |s| s.name = "NSData+ImageMIMEDetection" s.version = "0.1.0" s.summary = "Category on NSData to check if it represents PNG or JPEG." s.homepage = "https://github.com/talk-to/NSData-ImageMIMEDetection" s.license = { :type => 'COMMERCIAL', :text =>...
Prepare to CI Capybara.default_wait_time = 15
require 'sinatra' require 'vxod' require 'slim' require 'sass' require 'config_env' require 'mongoid' require 'omniauth' require 'omniauth-twitter' require 'omniauth-vkontakte' require 'omniauth-facebook' require 'omniauth-google-oauth2' require 'omniauth-github' require_relative 'config_env' require_relative 'config_...
require 'sinatra' require 'vxod' require 'slim' require 'sass' require 'config_env' require 'mongoid' require 'omniauth' require 'omniauth-twitter' require 'omniauth-vkontakte' require 'omniauth-facebook' require 'omniauth-google-oauth2' require 'omniauth-github' load "#{__dir__}/config_env" require_relative 'config_a...
Put an upper bound on compatible versions of ActiveRecord.
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "dagnabit/version" Gem::Specification.new do |s| s.name = "dagnabit" s.version = Dagnabit::VERSION s.platform = Gem::Platform::RUBY s.authors = ["David Yip"] s.email = ["yipdw@member.fsf.org"] s...
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "dagnabit/version" Gem::Specification.new do |s| s.name = "dagnabit" s.version = Dagnabit::VERSION s.platform = Gem::Platform::RUBY s.authors = ["David Yip"] s.email = ["yipdw@member.fsf.org"] s...
Store the stats instead of a test string
require "dalli" module Memdash DEFAULT_TTL = 60 def self.included(base) base.class_eval do class << base attr_accessor :memdash_ttl end self.memdash_ttl = DEFAULT_TTL alias_method :perform_without_stats, :perform alias_method :perform, :perform_with_stats end end ...
require "dalli" module Memdash DEFAULT_TTL = 60 def self.included(base) base.class_eval do class << base attr_accessor :memdash_ttl end self.memdash_ttl = DEFAULT_TTL alias_method :perform_without_stats, :perform alias_method :perform, :perform_with_stats end end ...
Add controller specs for filtering logic
require 'rails_helper' RSpec.describe AnalyticsController, type: :controller do describe 'GET system_activity_logs' do it 'renders the correct template' do get :system_activity_logs expect(response).to render_template(:system_activity_logs) end context 'when no filters have been provided' do...
Add acceptance test to check for package install and uninstall.
require 'spec_helper_acceptance' describe 'git class' do context 'default parameters' do # Using puppet_apply as a helper it 'should work with no errors' do pp = <<-EOS class { 'git': } EOS # Run it twice and test for idempotency apply_manifest(pp, :catch_failures => true) ...
require 'spec_helper_acceptance' describe 'git class:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do it 'should run successfully' do pp = "class { 'git': }" # Apply twice to ensure no errors the second time. apply_manifest(pp, :catch_failures => true) do |r| expect(r.stderr).not_...
Change gemspec homepage to GitHub
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'libpixel/version' Gem::Specification.new do |spec| spec.name = "libpixel" spec.version = LibPixel::VERSION spec.authors = ["Joao Carlos"] spec.email = ["joao@...
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'libpixel/version' Gem::Specification.new do |spec| spec.name = "libpixel" spec.version = LibPixel::VERSION spec.authors = ["Joao Carlos"] spec.email = ["joao@...
Remove post install message from 0.5.0
$LOAD_PATH.push File.expand_path('../lib', __FILE__) require 'griddler/version' Gem::Specification.new do |s| s.name = 'griddler' s.version = Griddler::VERSION s.authors = ['Caleb Thompson', 'Joel Oliveira', 'thoughtbot', 'Swift'] s.email = ['cjaysson@gmail.com', 'joel@thoughtbot.com', 't...
$LOAD_PATH.push File.expand_path('../lib', __FILE__) require 'griddler/version' Gem::Specification.new do |s| s.name = 'griddler' s.version = Griddler::VERSION s.authors = ['Caleb Thompson', 'Joel Oliveira', 'thoughtbot', 'Swift'] s.email = ['cjaysson@gmail.com', 'joel@thoughtbot.com', 't...
Add DB cleaner to model tests
# frozen_string_literal: true require 'spec_helper' RSpec.describe Collection, type: :model do describe '#is_public' do it 'returns true if a collection is not restricted' do user = build_stubbed(:user) collection = build_stubbed(:collection, owner_user_id: user.id, restricted: false) expect(...
# frozen_string_literal: true require 'spec_helper' RSpec.describe Collection, type: :model do describe '#is_public' do it 'returns true if a collection is not restricted' do user = build_stubbed(:user) collection = build_stubbed(:collection, owner_user_id: user.id, restricted: false) expect(...
Remove other deployment_target than iOS
Pod::Spec.new do |s| s.name = 'BothamUI' s.version = '0.0.1' s.license = 'Apache V2' s.summary = 'Model View Presenter Framework written in Swift' s.homepage = 'https://github.com/Karumi/BothamUI' s.social_media_url = 'http://twitter.com/goKarumi' s.authors = {'Karumi' => 'hello@karumi.com' ...
Pod::Spec.new do |s| s.name = 'BothamUI' s.version = '0.0.1' s.license = 'Apache V2' s.summary = 'Model View Presenter Framework written in Swift' s.homepage = 'https://github.com/Karumi/BothamUI' s.social_media_url = 'http://twitter.com/goKarumi' s.authors = {'Karumi' => 'hello@karumi.com' ...
Add reflection for exercise 4.3.
puts "Hello! What is your first name?" first = gets.chomp puts "And your middle name?" middle = gets.chomp puts "How about your last name?" last = gets.chomp puts "Greetings, #{first} #{middle} #{last}!" puts "What is your favorite number?" fav_number = gets.chomp puts "How about #{fav_number.to_i + 1}? Isn't that a bi...
puts "Hello! What is your first name?" first = gets.chomp puts "And your middle name?" middle = gets.chomp puts "How about your last name?" last = gets.chomp puts "Greetings, #{first} #{middle} #{last}!" puts "What is your favorite number?" fav_number = gets.chomp puts "How about #{fav_number.to_i + 1}? Isn't that a bi...
Revert "rewrite save_top_ten to pull from top_ten"
class Subscriber < ActiveRecord::Base # Pulls top ten posts from reddit front page def self.top_ten @front = RedditKit.front_page(options = {:limit => 10}) end # Saves top ten title, score, subreddit to db def self.save_top_ten top_ten.each do |f| @new_sub = Subscriber.new @new_sub[:title]...
class Subscriber < ActiveRecord::Base # Pulls top ten posts from reddit front page def self.top_ten @front = RedditKit.front_page(options = {:limit => 10}) end def self.save_top_ten @subscriber = Subscriber.title_score_hash @subscriber.each_pair do |x,y| new_sub = Subscriber.new new_sub...
Fix links in preview that point at the old staging server.
Document.record_timestamps = false documents = Document.where("body like '%whitehall.staging%'") documents.each do |document| fixed_body = document.body.gsub(/whitehall\.staging/, "whitehall.preview") document.update_attribute(:body, fixed_body) puts "Updated document #{document.id}" end
Revert "Lock Octokit to v4.3.0"
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'jekyll-github-metadata/version' Gem::Specification.new do |spec| spec.name = "jekyll-github-metadata" spec.version = Jekyll::GitHubMetadata::VERSION spec.authors = ["Pa...
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'jekyll-github-metadata/version' Gem::Specification.new do |spec| spec.name = "jekyll-github-metadata" spec.version = Jekyll::GitHubMetadata::VERSION spec.authors = ["Pa...
Remove unneeded code in controller
class PostsController < ApplicationController before_action :set_post, only: [:show, :edit, :update, :destroy] # GET /posts # GET /posts.json def index @posts = Post.all end # GET /posts/1 # GET /posts/1.json def show end # GET /posts/new def new @post = Post.new end # GET /posts/1...
class PostsController < ApplicationController before_action :set_post, only: [:show] # GET /posts # GET /posts.json def index @posts = Post.all end # GET /posts/1 # GET /posts/1.json def show end private # Use callbacks to share common setup or constraints between actions. def set_pos...
Remove save from export needs to be on push to lri
class TaggerController < ApplicationController def index end # Saves a string to a file named filename on a user's machine def save_local Tag.new(:session_id => request.session_options[:id], :data => params[:data]).save send_data("#{params[:data]}", :filename => "#{params[:filename]}", :type => "text...
class TaggerController < ApplicationController def index end # Saves a string to a file named filename on a user's machine def save_local send_data("#{params[:data]}", :filename => "#{params[:filename]}", :type => "text/plain") end # Saves a json formatted string to the db, then formats and sends ...
Rename Silverline service to LibratoMetrics
# encoding: utf-8 class Service::LibratoMetrics < Service def receive_logs values = Hash.new { |h,k| h[k] = 0 } payload[:events].each do |event| time = Time.parse(event[:received_at]) time = time.to_i - (time.to_i % 60) values[time] += 1 end gauges = values.collect do |time, count|...
Revert "Fix bug 'Unsupported ruby class used as database type: Bignum'"
Sequel.migration do up do add_column :orders, :amount_paid, :Bignum end down do drop_column :orders, :amount_paid end end
Sequel.migration do up do add_column :orders, :amount_paid, Bignum end down do drop_column :orders, :amount_paid end end
Use fork and exec instead of backticks for subprocesses
module XCListen class ShellTask def self.run(args) puts args + "\n\n" `#{args}` end end end
module XCListen class ShellTask def self.run(args) puts args + "\n\n" fork { exec args } end end end
Add global config for braintree
require 'sinatra/base' require 'tilt/haml' require 'json' require 'digest/sha2' require 'open-uri' require 'bcrypt' require 'net/smtp' require 'sendgrid-ruby' require 'data_mapper' require 'dm-serializer' require 'dm-types' require 'typhoeus' require 'fog' require 'mime-types' require 'uuidtools' require 'braintree' #...
require 'sinatra/base' require 'tilt/haml' require 'json' require 'digest/sha2' require 'open-uri' require 'bcrypt' require 'net/smtp' require 'sendgrid-ruby' require 'data_mapper' require 'dm-serializer' require 'dm-types' require 'typhoeus' require 'fog' require 'mime-types' require 'uuidtools' require 'braintree' #...