diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/has_vcards.gemspec b/has_vcards.gemspec
index abc1234..def5678 100644
--- a/has_vcards.gemspec
+++ b/has_vcards.gemspec
@@ -14,7 +14,7 @@ s.description = "vCard like contact and address models and helpers for Rails."
s.license = "MIT"
- s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICEN... | Fix gemspec to use README.md, not .rdoc.
|
diff --git a/lib/extensions/ar_number_of.rb b/lib/extensions/ar_number_of.rb
index abc1234..def5678 100644
--- a/lib/extensions/ar_number_of.rb
+++ b/lib/extensions/ar_number_of.rb
@@ -2,7 +2,7 @@ class Base
def number_of(assoc)
@number_of ||= {}
- @number_of[assoc.to_sym] ||= send(assoc).size
+ ... | Handle gracefully missing number_of nil
Handle gracefully missing number_of nil, which can occur when
we delegate association and the receiving object is nil.4
Fixes BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1364458
|
diff --git a/lib/parker/server/user_data.rb b/lib/parker/server/user_data.rb
index abc1234..def5678 100644
--- a/lib/parker/server/user_data.rb
+++ b/lib/parker/server/user_data.rb
@@ -1,7 +1,7 @@ module Parker
def self._load(name)
- load File.join(File.expand_path("../../../../user_data", __FILE__), "#{name}.rb"... | Fix relative path for the userdata
|
diff --git a/lib/second_base/databases.rake b/lib/second_base/databases.rake
index abc1234..def5678 100644
--- a/lib/second_base/databases.rake
+++ b/lib/second_base/databases.rake
@@ -11,17 +11,15 @@ SecondBase.on_base { Rake::Task['db:drop'].execute }
end
+ namespace :schema do
+ task :load do
+ Sec... | Fix schema dump/load for test
|
diff --git a/recipes/cli.rb b/recipes/cli.rb
index abc1234..def5678 100644
--- a/recipes/cli.rb
+++ b/recipes/cli.rb
@@ -17,6 +17,11 @@ # limitations under the License.
#
+# Install Java, unless skip_prerequisites
+unless node['cdap'].key?('skip_prerequisites') && node['cdap']['skip_prerequisites'].to_s == 'true'
+ ... | Include Java in CLI recipe, unless skip is requested
|
diff --git a/app/controllers/spree/admin/subscriptions/customer_details_controller.rb b/app/controllers/spree/admin/subscriptions/customer_details_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/spree/admin/subscriptions/customer_details_controller.rb
+++ b/app/controllers/spree/admin/subscriptions/cu... | Add strong params to CustomerdetailsController
|
diff --git a/app/models/auto_deployment.rb b/app/models/auto_deployment.rb
index abc1234..def5678 100644
--- a/app/models/auto_deployment.rb
+++ b/app/models/auto_deployment.rb
@@ -32,7 +32,7 @@ end
def create_deployment
- description = :description => "Heaven auto deploy triggered by a commit status change"
... | Fix issue with description for deployment
|
diff --git a/db/data_migration/20191115150548_update_sarah_albon_role.rb b/db/data_migration/20191115150548_update_sarah_albon_role.rb
index abc1234..def5678 100644
--- a/db/data_migration/20191115150548_update_sarah_albon_role.rb
+++ b/db/data_migration/20191115150548_update_sarah_albon_role.rb
@@ -0,0 +1,16 @@+Active... | Update previous role appointment for Sarah Albon
It seems the Person Sarah Albon was assigned an incorrect role appointment. The
correct role appointment has now been created, however we also need to update
all content tagged to Sarah and the incorrect role appointment.
|
diff --git a/jbuilder.gemspec b/jbuilder.gemspec
index abc1234..def5678 100644
--- a/jbuilder.gemspec
+++ b/jbuilder.gemspec
@@ -1,8 +1,8 @@ Gem::Specification.new do |s|
s.name = 'jbuilder'
s.version = '2.0.6'
- s.author = 'David Heinemeier Hansson'
- s.email = 'david@37signals.com'
+ s.authors = [... | Add Pavel to gemspec as an author
|
diff --git a/app/services/periodic_task.rb b/app/services/periodic_task.rb
index abc1234..def5678 100644
--- a/app/services/periodic_task.rb
+++ b/app/services/periodic_task.rb
@@ -7,7 +7,7 @@ @thread = Thread.new do
Thread.stop unless run_immediately
- while true
+ loop do
block.call
... | Use loop for infinite loops
|
diff --git a/app/services/route_service.rb b/app/services/route_service.rb
index abc1234..def5678 100644
--- a/app/services/route_service.rb
+++ b/app/services/route_service.rb
@@ -21,8 +21,8 @@ find_shortest
end
- def load_paths(place, path = Path)
- Distance.where(origin: place).each do |distance|
+ def... | Change place to point in RouteService
|
diff --git a/db/migrate/20150712194411_change_task_end_date_from_date_to_date_time.rb b/db/migrate/20150712194411_change_task_end_date_from_date_to_date_time.rb
index abc1234..def5678 100644
--- a/db/migrate/20150712194411_change_task_end_date_from_date_to_date_time.rb
+++ b/db/migrate/20150712194411_change_task_end_da... | Change task end_date field from date to datetime
|
diff --git a/frontend/app/controllers/spree/admin/overview_controller.rb b/frontend/app/controllers/spree/admin/overview_controller.rb
index abc1234..def5678 100644
--- a/frontend/app/controllers/spree/admin/overview_controller.rb
+++ b/frontend/app/controllers/spree/admin/overview_controller.rb
@@ -6,12 +6,8 @@
... | [frontend] Remove useless comments in Admin::OverviewController
|
diff --git a/lib/action_view/form_helper.rb b/lib/action_view/form_helper.rb
index abc1234..def5678 100644
--- a/lib/action_view/form_helper.rb
+++ b/lib/action_view/form_helper.rb
@@ -15,5 +15,20 @@ end
end
+
+ module Tags
+ class TextField < Base # :nodoc:
+ def render
+ options =... | Implement the aria-labelledby attribute in the text_field helper method. ooverride the render method to waiable gem.
|
diff --git a/lib/amazing/widgets/battery.rb b/lib/amazing/widgets/battery.rb
index abc1234..def5678 100644
--- a/lib/amazing/widgets/battery.rb
+++ b/lib/amazing/widgets/battery.rb
@@ -9,6 +9,7 @@ class Battery < Widget
description "Remaining battery power in percentage"
option :battery, "Battery numb... | Add @state field to Battery widget
|
diff --git a/test/support/mongrel_helper.rb b/test/support/mongrel_helper.rb
index abc1234..def5678 100644
--- a/test/support/mongrel_helper.rb
+++ b/test/support/mongrel_helper.rb
@@ -5,12 +5,13 @@
def setup
check_mongrel
- Process.spawn("bundle exec foreman start --procfile=example/Procfile", pgroup: true... | Kill proper process parent and wait after tests to shutdown.
|
diff --git a/app/models/spree/stock/quantifier_decorator.rb b/app/models/spree/stock/quantifier_decorator.rb
index abc1234..def5678 100644
--- a/app/models/spree/stock/quantifier_decorator.rb
+++ b/app/models/spree/stock/quantifier_decorator.rb
@@ -2,7 +2,7 @@ module Stock
Quantifier.class_eval do
durably... | Update .find to work with rails 4.2
|
diff --git a/reagan.gemspec b/reagan.gemspec
index abc1234..def5678 100644
--- a/reagan.gemspec
+++ b/reagan.gemspec
@@ -16,6 +16,7 @@ s.add_dependency 'chef', '>= 11.0'
s.add_dependency 'ridley', '~> 4.0'
s.add_development_dependency 'rake', '~> 10.0'
+ s.add_development_dependency 'rubocop', '~> 0.28.0'
... | Add rubocop as a dev dependency
|
diff --git a/recipes/deb.rb b/recipes/deb.rb
index abc1234..def5678 100644
--- a/recipes/deb.rb
+++ b/recipes/deb.rb
@@ -11,3 +11,12 @@ dpkg_package "#{Chef::Config[:file_cache_path]}/#{filename}" do
action :install
end
+
+ruby_block "Set heap size in /etc/default/elasticsearch" do
+ block do
+ fe = Chef::Util:... | Use the heap size set in Chef via /etc/default/elasticsearch
Closes: #170
|
diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/posts_controller.rb
+++ b/app/controllers/posts_controller.rb
@@ -1,5 +1,5 @@ class PostsController < ApplicationController
- before_action :set_post, only: [:show, :edit, :update,... | Remove unneeded code in controller
|
diff --git a/app/controllers/offers_controller.rb b/app/controllers/offers_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/offers_controller.rb
+++ b/app/controllers/offers_controller.rb
@@ -20,9 +20,20 @@ end
def create
- @offer = Offer.new
+ @offer = Offer.new(offer_params)
+ @offer.... | Allow offers to be posted to database.
|
diff --git a/app/controllers/tagger_controller.rb b/app/controllers/tagger_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/tagger_controller.rb
+++ b/app/controllers/tagger_controller.rb
@@ -4,7 +4,6 @@
# Saves a string to a file named filename on a user's machine
def save_local
- Tag.new(... | Remove save from export needs to be on push to lri |
diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/traces_controller.rb
+++ b/app/controllers/traces_controller.rb
@@ -3,7 +3,7 @@ @traces = Trace
.joins(:spans)
.includes(:spans)
- .where(name: 'app.rack.re... | Fix name filter in web traces
|
diff --git a/lib/capybara/angular/waiter.rb b/lib/capybara/angular/waiter.rb
index abc1234..def5678 100644
--- a/lib/capybara/angular/waiter.rb
+++ b/lib/capybara/angular/waiter.rb
@@ -34,7 +34,7 @@ end
def angular_app?
- page.evaluate_script "(typeof $ != 'undefined') && $('[ng-app]')"
+ p... | Check if ng-app exists without returning large object
In my app, returning the hash slowed down the tests caused a lot of timeout errors
|
diff --git a/lib/ci_in_a_can/test_result.rb b/lib/ci_in_a_can/test_result.rb
index abc1234..def5678 100644
--- a/lib/ci_in_a_can/test_result.rb
+++ b/lib/ci_in_a_can/test_result.rb
@@ -18,6 +18,10 @@ CiInACan::Persistence.find PERSISTENCE_TYPE, id
end
+ def to_json
+ { id: id, passed: passed, outpu... | Add a to_json that returns real data. |
diff --git a/app/presenters/courses_presenter.rb b/app/presenters/courses_presenter.rb
index abc1234..def5678 100644
--- a/app/presenters/courses_presenter.rb
+++ b/app/presenters/courses_presenter.rb
@@ -30,7 +30,7 @@ end
def courses_by_recent_edits
- courses.sort_by(&:recent_edit_count)
+ courses.sort_by... | Sort courses from high to low recent edits
|
diff --git a/lib/filters/post/admonition.rb b/lib/filters/post/admonition.rb
index abc1234..def5678 100644
--- a/lib/filters/post/admonition.rb
+++ b/lib/filters/post/admonition.rb
@@ -4,8 +4,8 @@ html.gsub!(/<p>#{Filters.front_wrap}\s*#tip\s*#{Filters.end_wrap}<\/p>/, '<div class="alert tip">')
html.g... | Rename 'error' to 'danger', take it or leave it |
diff --git a/app/serializers/event_serializer.rb b/app/serializers/event_serializer.rb
index abc1234..def5678 100644
--- a/app/serializers/event_serializer.rb
+++ b/app/serializers/event_serializer.rb
@@ -4,6 +4,6 @@ has_many :performances, embed: :ids, include: true
def performances
- object.performances.sel... | Load performances having artist with image |
diff --git a/app/services/create_subscription.rb b/app/services/create_subscription.rb
index abc1234..def5678 100644
--- a/app/services/create_subscription.rb
+++ b/app/services/create_subscription.rb
@@ -3,7 +3,7 @@ def self.call(params)
# plan is object with data relative to plan, stated in seed.
plan_id ... | Modify access to instance in params
|
diff --git a/lib/phil_columns/seed_utils.rb b/lib/phil_columns/seed_utils.rb
index abc1234..def5678 100644
--- a/lib/phil_columns/seed_utils.rb
+++ b/lib/phil_columns/seed_utils.rb
@@ -22,7 +22,7 @@ end
def seed_filepaths
- seeds = Dir.glob( "#{seeds_path}/*" )
+ seeds = Dir.glob( "#{seeds_path}/**... | Change glob to return only ruby files so that other assets may be pu under db/seeds without causing problems.
|
diff --git a/app/controllers/choices_controller.rb b/app/controllers/choices_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/choices_controller.rb
+++ b/app/controllers/choices_controller.rb
@@ -7,8 +7,11 @@
post '/choices' do
@survey = Survey.find_by(id: params[:survey_id])
+ @question = Questi... | Update choices controller to create new potential reply
|
diff --git a/app/controllers/resumes_controller.rb b/app/controllers/resumes_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/resumes_controller.rb
+++ b/app/controllers/resumes_controller.rb
@@ -44,6 +44,6 @@ end
def resume_params
- params.require(:resume).permit(:name, :description, :... | Fix typo in resume_params. Should be skill_ids, not skills_ids
Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>
|
diff --git a/app/controllers/scripts_controller.rb b/app/controllers/scripts_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/scripts_controller.rb
+++ b/app/controllers/scripts_controller.rb
@@ -8,11 +8,11 @@ end
cmd = "#{Rails.root}/lib/scripts/#{ params[:script] }"
- cmd = "#{Rails.roo... | Update scripts controller to work with Rails 3.
|
diff --git a/spec/controllers/apidocs_controller_spec.rb b/spec/controllers/apidocs_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/apidocs_controller_spec.rb
+++ b/spec/controllers/apidocs_controller_spec.rb
@@ -39,5 +39,12 @@ Project.count.should == 1
Person.count.should == 1
end
+... | Add spec for viewing the apidocs models
|
diff --git a/app/controllers/sitemap_controller.rb b/app/controllers/sitemap_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/sitemap_controller.rb
+++ b/app/controllers/sitemap_controller.rb
@@ -1,11 +1,16 @@ class SitemapController < ApplicationController
def index
- @static_pages = [root_... | Move the static pages array to the private method, remove the @frequently_updated_pages
|
diff --git a/lib/tablexi/logger/standard.rb b/lib/tablexi/logger/standard.rb
index abc1234..def5678 100644
--- a/lib/tablexi/logger/standard.rb
+++ b/lib/tablexi/logger/standard.rb
@@ -8,7 +8,9 @@ attr_reader :logger
attr_reader :severity
- def initialize(logger, options = { severity: :unknown })
+ ... | Rework options hash to potentially handle multiples
|
diff --git a/app/views/api/v1/sessions/base.rabl b/app/views/api/v1/sessions/base.rabl
index abc1234..def5678 100644
--- a/app/views/api/v1/sessions/base.rabl
+++ b/app/views/api/v1/sessions/base.rabl
@@ -2,9 +2,13 @@ node(:client_id) { SecureRandom.hex(16) }
child(current_user) do
extends 'api/v1/users/private'
- ... | Return an array of bans on the session user.
|
diff --git a/app/presenters/tree_node/menu/item.rb b/app/presenters/tree_node/menu/item.rb
index abc1234..def5678 100644
--- a/app/presenters/tree_node/menu/item.rb
+++ b/app/presenters/tree_node/menu/item.rb
@@ -3,7 +3,7 @@ class Item < TreeNode::Menu::Node
set_attribute(:key) { "#{@tree.node_id_prefix}__#{... | Fix the title/tooltip attribute setting for TreeNode::Menu::Item
|
diff --git a/app/models/manageiq/providers/container_manager/metrics_capture.rb b/app/models/manageiq/providers/container_manager/metrics_capture.rb
index abc1234..def5678 100644
--- a/app/models/manageiq/providers/container_manager/metrics_capture.rb
+++ b/app/models/manageiq/providers/container_manager/metrics_captur... | Fix targets_archived_from after refactoring to MetricsCapture
When we moved the capture_ems_targets out of Metrics::Capture and into
provider subclasses we didn't catch that this method being called is
still in Metric::Capture
|
diff --git a/test/integration/smoke_test.rb b/test/integration/smoke_test.rb
index abc1234..def5678 100644
--- a/test/integration/smoke_test.rb
+++ b/test/integration/smoke_test.rb
@@ -8,15 +8,17 @@
def test_simple_zip_code_search
result = Geocoder.search "27701"
- assert_equal "Durham", result.first.city
-... | Add separate assertion for getting a result at all.
|
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/home_controller.rb
+++ b/app/controllers/home_controller.rb
@@ -10,7 +10,6 @@ @events = meetup_api.open_events(params) ## Currently events just gets
end ## dumped straight i... | Fix breaky function by changing nothing
|
diff --git a/lib/bowery/executable.rb b/lib/bowery/executable.rb
index abc1234..def5678 100644
--- a/lib/bowery/executable.rb
+++ b/lib/bowery/executable.rb
@@ -24,12 +24,7 @@ eval assetfile
%w(stylesheets javascripts).each do |type|
manifest = Manifest.new type, components, options
-
- if ... | Create manifest file in init
|
diff --git a/library/openssl/cipher_spec.rb b/library/openssl/cipher_spec.rb
index abc1234..def5678 100644
--- a/library/openssl/cipher_spec.rb
+++ b/library/openssl/cipher_spec.rb
@@ -0,0 +1,17 @@+require File.dirname(__FILE__) + '/../../spec_helper'
+require File.dirname(__FILE__) + '/shared/constants'
+require 'open... | Add a trivial spec for the location of CipherError in OpenSSL (JRUBY-3163)
|
diff --git a/app/controllers/gms_by_scenario_controller.rb b/app/controllers/gms_by_scenario_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/gms_by_scenario_controller.rb
+++ b/app/controllers/gms_by_scenario_controller.rb
@@ -7,7 +7,7 @@ # have to put things in a hash, so that we can deal with it... | Remove HQ from list of tables for scenarios
Will need to add back later
|
diff --git a/lib/braingasm/tokenizer.rb b/lib/braingasm/tokenizer.rb
index abc1234..def5678 100644
--- a/lib/braingasm/tokenizer.rb
+++ b/lib/braingasm/tokenizer.rb
@@ -35,7 +35,11 @@
private
def read_token(scanner)
- simple_tokens = { '+' => :plus,
+ return scanner.matched.to_i if scanner.scan(/\d... | Initialize tokens hash outside method
|
diff --git a/spec/github_cli/commands/references_spec.rb b/spec/github_cli/commands/references_spec.rb
index abc1234..def5678 100644
--- a/spec/github_cli/commands/references_spec.rb
+++ b/spec/github_cli/commands/references_spec.rb
@@ -0,0 +1,42 @@+# encoding: utf-8
+
+require 'spec_helper'
+
+describe GithubCLI::Comm... | Add specs for references commands.
|
diff --git a/spec/lib/generators/admin_generator_spec.rb b/spec/lib/generators/admin_generator_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/generators/admin_generator_spec.rb
+++ b/spec/lib/generators/admin_generator_spec.rb
@@ -37,4 +37,31 @@ expect(User.count).to eq(0)
end
end
+
+ context "with... | Test admin generator with fake stdin
|
diff --git a/lib/specjour/db_scrub.rb b/lib/specjour/db_scrub.rb
index abc1234..def5678 100644
--- a/lib/specjour/db_scrub.rb
+++ b/lib/specjour/db_scrub.rb
@@ -9,6 +9,7 @@ load 'tasks/misc.rake'
load 'tasks/databases.rake'
Rake::Task["db:structure:dump"].clear
+ Rake::Task["environment"].clear... | Fix load exceptions by not reloading environment
|
diff --git a/lib/state_machine_job.rb b/lib/state_machine_job.rb
index abc1234..def5678 100644
--- a/lib/state_machine_job.rb
+++ b/lib/state_machine_job.rb
@@ -19,6 +19,7 @@ perform_with_result(record, payload)
rescue Exception => e
logger.error "#{self.name} - exception for #{model_name}... | Add backtrace info to exception logging
|
diff --git a/lib/string_extensions.rb b/lib/string_extensions.rb
index abc1234..def5678 100644
--- a/lib/string_extensions.rb
+++ b/lib/string_extensions.rb
@@ -1,3 +1,5 @@+# Here are some test comments...
+
class String
# Duplicates the current string by count and returns that as a new string.
| Test change commit with tortoise.
|
diff --git a/lib/workers/scheduler.rb b/lib/workers/scheduler.rb
index abc1234..def5678 100644
--- a/lib/workers/scheduler.rb
+++ b/lib/workers/scheduler.rb
@@ -1,6 +1,7 @@ module Workers
class Scheduler
def initialize(options = {})
+ @logger = options[:logger]
@pool = options[:pool] || Workers::Poo... | Add missing logger option to Scheduler.
|
diff --git a/services/libratometrics.rb b/services/libratometrics.rb
index abc1234..def5678 100644
--- a/services/libratometrics.rb
+++ b/services/libratometrics.rb
@@ -1,7 +1,8 @@ # encoding: utf-8
class Service::LibratoMetrics < Service
def receive_logs
- name = settings[:name].gsub(/ +/, '_')
+ name = sett... | Use saved search name as default value for Librato Metrics gauge name
|
diff --git a/services/libratometrics.rb b/services/libratometrics.rb
index abc1234..def5678 100644
--- a/services/libratometrics.rb
+++ b/services/libratometrics.rb
@@ -0,0 +1,30 @@+# encoding: utf-8
+class Service::LibratoMetrics < Service
+ def receive_logs
+ values = Hash.new { |h,k| h[k] = 0 }
+
+ payload[:e... | Rename Silverline service to LibratoMetrics
|
diff --git a/db/migrate/20170210192526_bigbluebutton_rails200_recording_size.rb b/db/migrate/20170210192526_bigbluebutton_rails200_recording_size.rb
index abc1234..def5678 100644
--- a/db/migrate/20170210192526_bigbluebutton_rails200_recording_size.rb
+++ b/db/migrate/20170210192526_bigbluebutton_rails200_recording_siz... | Add missing migration from BigbluebuttonRails 2.0.0
The column size was ok in most of the servers but not in others, where the
migration to BigbluebuttonRails was done in several steps.
|
diff --git a/lib/icsfilter.rb b/lib/icsfilter.rb
index abc1234..def5678 100644
--- a/lib/icsfilter.rb
+++ b/lib/icsfilter.rb
@@ -10,12 +10,14 @@ @output = output ? output : calendar
end
- def filter#(filters, replacements)
- filters = Regexp.union(/\AKSA \/ fri\z/, /\AKSA \/ Lukket\z/)
- replacements = ... | Split filter into two functions: filter and replace
The new filter function rejects whole events.
The replace function replaces regular expression matches with the
provided substitute.
|
diff --git a/db/migrations/015_add_amount_paid_to_orders.rb b/db/migrations/015_add_amount_paid_to_orders.rb
index abc1234..def5678 100644
--- a/db/migrations/015_add_amount_paid_to_orders.rb
+++ b/db/migrations/015_add_amount_paid_to_orders.rb
@@ -1,7 +1,7 @@ Sequel.migration do
up do
- add_column :orders, :am... | Revert "Fix bug 'Unsupported ruby class used as database type: Bignum'"
This reverts commit dd345e564912d0892dd79b15fe815c7169293284.
|
diff --git a/lib/nifty-report/report.rb b/lib/nifty-report/report.rb
index abc1234..def5678 100644
--- a/lib/nifty-report/report.rb
+++ b/lib/nifty-report/report.rb
@@ -9,7 +9,7 @@ end
def filename
- @name.downcase.gsub(' ', '.') + ".#{Time.now.strftime('%F')}.csv"
+ @name.downcase.gsub(' ', '.') +... | Include hours and minutes in filename
|
diff --git a/lib/rack-canonical-host.rb b/lib/rack-canonical-host.rb
index abc1234..def5678 100644
--- a/lib/rack-canonical-host.rb
+++ b/lib/rack-canonical-host.rb
@@ -2,7 +2,8 @@ class CanonicalHost
def initialize(app, host=nil, &block)
@app = app
- @host = (block_given? && block.call) || host
+ ... | Allow env to be passed to the optional block.
|
diff --git a/lib/resume/file_fetcher.rb b/lib/resume/file_fetcher.rb
index abc1234..def5678 100644
--- a/lib/resume/file_fetcher.rb
+++ b/lib/resume/file_fetcher.rb
@@ -17,6 +17,9 @@ end
def fetch
+ # Specifically uses Kernel here in order to allow it to determine
+ # the return file type: for this... | Add comment about using Kernel in file fetcher
|
diff --git a/lib/tasks/import_sic_codes.rake b/lib/tasks/import_sic_codes.rake
index abc1234..def5678 100644
--- a/lib/tasks/import_sic_codes.rake
+++ b/lib/tasks/import_sic_codes.rake
@@ -0,0 +1,14 @@+require 'csv'
+desc "Import SIC Codes from /app/assets/csv/sic_codes.csv"
+namespace :import do
+ task :sic_codes => ... | Create import SicCode rake task
|
diff --git a/lib/stash_engine/engine.rb b/lib/stash_engine/engine.rb
index abc1234..def5678 100644
--- a/lib/stash_engine/engine.rb
+++ b/lib/stash_engine/engine.rb
@@ -5,7 +5,11 @@
# Initializer to combine this engines static assets with the static assets of the hosting site.
initializer 'static assets' do ... | Check serve_static_files before trying to load ActionDispatch::Static
|
diff --git a/lib/syoboemon/connector.rb b/lib/syoboemon/connector.rb
index abc1234..def5678 100644
--- a/lib/syoboemon/connector.rb
+++ b/lib/syoboemon/connector.rb
@@ -5,45 +5,43 @@ DB_PATH = "/db.php"
JSON_PATH = "/json.php"
- class << self
- def rss2_get(query)
- connection.get(rss2_path, query)
+ def... | Change to class from module(Syoboemon::Connector)
|
diff --git a/lib/trlo/list_presenter.rb b/lib/trlo/list_presenter.rb
index abc1234..def5678 100644
--- a/lib/trlo/list_presenter.rb
+++ b/lib/trlo/list_presenter.rb
@@ -1,6 +1,7 @@ module Trlo
class ListPresenter
def initialize(board_id)
+ raise BoardNotFound, "No board specified, no lists found." if board... | Raise exception if a board_id is not provided.
We ought to validate board_ids. |
diff --git a/lib/wulin_master/engine.rb b/lib/wulin_master/engine.rb
index abc1234..def5678 100644
--- a/lib/wulin_master/engine.rb
+++ b/lib/wulin_master/engine.rb
@@ -4,5 +4,8 @@
class Engine < Rails::Engine
engine_name :wulin_master
+ initializer "add assets to precompile" do |app|
+ app.config.as... | Configure wulin_master to precompile master.js and master.css
|
diff --git a/lib/xclisten/shell_task.rb b/lib/xclisten/shell_task.rb
index abc1234..def5678 100644
--- a/lib/xclisten/shell_task.rb
+++ b/lib/xclisten/shell_task.rb
@@ -4,7 +4,7 @@
def self.run(args)
puts args + "\n\n"
- `#{args}`
+ fork { exec args }
end
end
| Use fork and exec instead of backticks for subprocesses
|
diff --git a/lib/rack/spec.rb b/lib/rack/spec.rb
index abc1234..def5678 100644
--- a/lib/rack/spec.rb
+++ b/lib/rack/spec.rb
@@ -2,8 +2,8 @@ require "json_schema"
require "multi_json"
+require "rack/spec/error"
require "rack/spec/error_handler"
-require "rack/spec/error"
require "rack/spec/request_validation"
req... | Sort loaded files in ABC-order
|
diff --git a/app.rb b/app.rb
index abc1234..def5678 100644
--- a/app.rb
+++ b/app.rb
@@ -28,6 +28,13 @@ # ...
end
+ configure do
+ Braintree::Configuration.environment = :sandbox
+ Braintree::Configuration.merchant_id = ENV['BRAINTREE_MERCHANT']
+ Braintree::Configuration.public_key = ENV['BRAINTREE_... | Add global config for braintree
|
diff --git a/app.rb b/app.rb
index abc1234..def5678 100644
--- a/app.rb
+++ b/app.rb
@@ -22,14 +22,14 @@ "https://img.shields.io/badge/#{badge}.svg"
end
-def redirect_to_badge
+def redirect_to_badge(query)
begin
status_code = open(heroku_url).status.first
rescue OpenURI::HTTPError => error
response =... | Support querystrings in badge URL
This allows the use of the other shields.io badge styles. |
diff --git a/config/environments/development.rb b/config/environments/development.rb
index abc1234..def5678 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -14,7 +14,8 @@ config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
- config.... | Add Dev Config To Deliver Emails For Testing
|
diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb
index abc1234..def5678 100644
--- a/config/initializers/carrierwave.rb
+++ b/config/initializers/carrierwave.rb
@@ -6,7 +6,7 @@ :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'],
:region => 'us-east-1... | Change the aws bucket name to a env variable
|
diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb
index abc1234..def5678 100644
--- a/config/initializers/carrierwave.rb
+++ b/config/initializers/carrierwave.rb
@@ -1,7 +1,6 @@ CarrierWave.configure do |config|
- if ENV.fetch('S3_BUCKET').present?
- IMAGE_UPLOAD = true
-
+ IMAGE... | Use rescue as conditional on environment variable
|
diff --git a/roles/grisu.rb b/roles/grisu.rb
index abc1234..def5678 100644
--- a/roles/grisu.rb
+++ b/roles/grisu.rb
@@ -30,6 +30,9 @@ :squid => {
:cache_mem => "9000 MB",
:cache_dir => "coss /store/squid/coss-01 128000 block-size=8192 max-size=262144 membufs=80"
+ },
+ :tilecache => {
+ :tile_parent =... | Switch beauharnois cache to use render.openstreetmap.org
|
diff --git a/lsd.rb b/lsd.rb
index abc1234..def5678 100644
--- a/lsd.rb
+++ b/lsd.rb
@@ -5,7 +5,7 @@ MUSIC_DIRECTORY = File.expand_path '~/test_music/'
get '/songs' do
- Dir[MUSIC_DIRECTORY + '/*'].join ' '
+ @songs = Dir[MUSIC_DIRECTORY + '/*']
end
get '/' do
| Put contents of music dir in @songs
|
diff --git a/benchmark-ips/bm_is_number.rb b/benchmark-ips/bm_is_number.rb
index abc1234..def5678 100644
--- a/benchmark-ips/bm_is_number.rb
+++ b/benchmark-ips/bm_is_number.rb
@@ -0,0 +1,29 @@+# Why .$$is_number is better than isNaN:
+#
+#
+# Warming up --------------------------------------
+# .$$is_number ... | Add a bm-ips that compares .$$is_number to isNaN() |
diff --git a/spec/features/likeable_spec.rb b/spec/features/likeable_spec.rb
index abc1234..def5678 100644
--- a/spec/features/likeable_spec.rb
+++ b/spec/features/likeable_spec.rb
@@ -6,35 +6,35 @@ let(:post) { FactoryBot.create(:post) }
context 'logged in member' do
- before do
- log... | Update posts liking spec to find where the count moved to
|
diff --git a/spec/lib/staging/model_spec.rb b/spec/lib/staging/model_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/staging/model_spec.rb
+++ b/spec/lib/staging/model_spec.rb
@@ -1,7 +1,10 @@ require 'rails_helper'
describe Stagehand::Staging::Model do
- let(:klass) { Klass = Class.new(SourceRecord) }
+ let(... | Fix const redefinition warning in model spec
|
diff --git a/spec/models/user_model_spec.rb b/spec/models/user_model_spec.rb
index abc1234..def5678 100644
--- a/spec/models/user_model_spec.rb
+++ b/spec/models/user_model_spec.rb
@@ -7,7 +7,10 @@ end
it "is invalid without an email address" do
- user = User.new(email: nil)
+ user = User.new(
+ usern... | Edit test to make sure it passes because email was missing.
|
diff --git a/spec/support/authentication.rb b/spec/support/authentication.rb
index abc1234..def5678 100644
--- a/spec/support/authentication.rb
+++ b/spec/support/authentication.rb
@@ -21,12 +21,8 @@ @stub_user ||= FactoryBot.create(:user)
end
- def login_as_user(user)
+ def login_as_user(user = stub_user)
... | Replace two login_as methods with a single method
The default behaviour of login_as_user will login as the stub user,
else it will use the defined user.
|
diff --git a/cookbooks/role-monitoring/metadata.rb b/cookbooks/role-monitoring/metadata.rb
index abc1234..def5678 100644
--- a/cookbooks/role-monitoring/metadata.rb
+++ b/cookbooks/role-monitoring/metadata.rb
@@ -1,4 +1,4 @@-name 'role_monitoring'
+name 'role-monitoring'
maintainer 'Tim S... | Fix name of monitoring role
|
diff --git a/db/post_migrate/20190102152410_delete_inconsistent_internal_id_records2.rb b/db/post_migrate/20190102152410_delete_inconsistent_internal_id_records2.rb
index abc1234..def5678 100644
--- a/db/post_migrate/20190102152410_delete_inconsistent_internal_id_records2.rb
+++ b/db/post_migrate/20190102152410_delete_... | Add migration to cleanup iid records
|
diff --git a/app/helpers/devise_helper.rb b/app/helpers/devise_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/devise_helper.rb
+++ b/app/helpers/devise_helper.rb
@@ -8,8 +8,8 @@ resource: resource.class.model_name.human.downcase)
html = <<-HTML
- <div class="alert alert-danger">
- <butto... | Fix Devise flash alert classes
|
diff --git a/samples/ec2.rb b/samples/ec2.rb
index abc1234..def5678 100644
--- a/samples/ec2.rb
+++ b/samples/ec2.rb
@@ -11,13 +11,31 @@
ec2 = AWS::EC2.new ENV["AWS_KEY"], ENV["AWS_SECRET"]
-ec2.describe_addresses.addresses_set.each do |address|
+puts "", "Standard Only Addresses", ""
+
+ec2.describe_addresses("Fil... | Update sample to show parameter usage
|
diff --git a/routes/test.rb b/routes/test.rb
index abc1234..def5678 100644
--- a/routes/test.rb
+++ b/routes/test.rb
@@ -1,7 +1,7 @@ # The main class for the TravisWebhook
class KWApi < Sinatra::Base
get '/test' do
- title = 'Haml Test'
+ @title = 'Haml Test'
haml :test
end
end
| Change variable to instance variable
|
diff --git a/test/models/car_test.rb b/test/models/car_test.rb
index abc1234..def5678 100644
--- a/test/models/car_test.rb
+++ b/test/models/car_test.rb
@@ -3,9 +3,7 @@ class CarTest < ActiveSupport::TestCase
test "at least one field is filled" do
refute Car.new().valid?
- assert Car.new({description: 'A shi... | Update validation test with assoc. constraint
|
diff --git a/week-6/nested_data_solution.rb b/week-6/nested_data_solution.rb
index abc1234..def5678 100644
--- a/week-6/nested_data_solution.rb
+++ b/week-6/nested_data_solution.rb
@@ -0,0 +1,47 @@+# RELEASE 2: NESTED STRUCTURE GOLF
+# Hole 1
+# Target element: "FORE"
+
+array = [[1,2], ["inner", ["eagle", "par", ["FOR... | Create file for pairing session
|
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index abc1234..def5678 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -12,10 +12,6 @@ end
def file_remote_url=(url)
- unless self[:file_remote_url] == url
- self.file = URI.parse(url)
- en... | Fix for media attachments remote URL download
|
diff --git a/config/initializers/rails_config.rb b/config/initializers/rails_config.rb
index abc1234..def5678 100644
--- a/config/initializers/rails_config.rb
+++ b/config/initializers/rails_config.rb
@@ -3,7 +3,7 @@ end
ActiveSupport.on_load(:before_initialize) do
# Add other global settings files
- other_files =... | Add newrelic.yml to load order
|
diff --git a/spec/lib/from_yaml_spec.rb b/spec/lib/from_yaml_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/from_yaml_spec.rb
+++ b/spec/lib/from_yaml_spec.rb
@@ -8,7 +8,8 @@ FromYaml.load(path_to_yaml: "#{Rails.root}/spec/support/bad_yaml_file.yml",
cache_key: 'test')
end
- it ... | Test the intended error handling of FromYaml more precisely
|
diff --git a/spec/support/connect_db.rb b/spec/support/connect_db.rb
index abc1234..def5678 100644
--- a/spec/support/connect_db.rb
+++ b/spec/support/connect_db.rb
@@ -3,6 +3,10 @@ DB = Sequel.connect(ENV['DATABASE_URL'] || 'postgres:///prelay-test')
DB.extension :pg_json
+
+# Check that we don't request the same c... | Raise if the specs accidentally request the same column twice.
|
diff --git a/app/uploaders/base_uploader.rb b/app/uploaders/base_uploader.rb
index abc1234..def5678 100644
--- a/app/uploaders/base_uploader.rb
+++ b/app/uploaders/base_uploader.rb
@@ -34,9 +34,4 @@ def extension_white_list
%w(jpg jpeg png)
end
-
- # Override the filename of the uploaded files
- def filenam... | Remove useless default filename definition.
|
diff --git a/app/values/renalware/gender.rb b/app/values/renalware/gender.rb
index abc1234..def5678 100644
--- a/app/values/renalware/gender.rb
+++ b/app/values/renalware/gender.rb
@@ -13,7 +13,7 @@ SALUTATIONS = {
"NK" => "",
"M" => "Mr",
- "F" => "Mme",
+ "F" => "Ms",
"NS" => ""
... | Use Ms for default F salutation
|
diff --git a/lib/dry/view/part.rb b/lib/dry/view/part.rb
index abc1234..def5678 100644
--- a/lib/dry/view/part.rb
+++ b/lib/dry/view/part.rb
@@ -3,18 +3,18 @@ module Dry
module View
class Part
- include Dry::Equalizer(:_object, :_renderer, :_context, :_locals)
+ include Dry::Equalizer(:_object, :_loca... | Tidy order of attrs in Part |
diff --git a/lib/labor/helpers.rb b/lib/labor/helpers.rb
index abc1234..def5678 100644
--- a/lib/labor/helpers.rb
+++ b/lib/labor/helpers.rb
@@ -1,7 +1,7 @@ module Labor
module Helpers
- def classify(dashed_word)
- dashed_word.split('-').each { |part| part[0] = part[0].chr.upcase }.join
+ def classify(wor... | Split on hyphen and underscores for job names
|
diff --git a/lib/resume/output.rb b/lib/resume/output.rb
index abc1234..def5678 100644
--- a/lib/resume/output.rb
+++ b/lib/resume/output.rb
@@ -5,7 +5,7 @@ extend Colours
def self.messages(messages)
- messages.each { |type, key| public_send(key, type) }
+ messages.each { |type, key| public_send(ty... | Fix bug with parameters in the wrong order
|
diff --git a/lib/shopify_theme.rb b/lib/shopify_theme.rb
index abc1234..def5678 100644
--- a/lib/shopify_theme.rb
+++ b/lib/shopify_theme.rb
@@ -2,15 +2,19 @@ module ShopifyTheme
include HTTParty
+ NOOPParser = Proc.new {|data, format| {} }
+
def self.asset_list
- response = shopify.get("/admin/assets.json"... | Fix HTTParty json parsing choking in 1.9
|
diff --git a/lib/tasks/morph.rake b/lib/tasks/morph.rake
index abc1234..def5678 100644
--- a/lib/tasks/morph.rake
+++ b/lib/tasks/morph.rake
@@ -6,6 +6,20 @@ url = "https://api.morph.io/equivalentideas/westconnex_contracts/data.json?key=#{ENV['MORPH_SECRET_KEY']}&query=select%20*%20from%20'contractors'"
contra... | Load in the new contractors
|
diff --git a/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb b/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb
index abc1234..def5678 100644
--- a/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb
+++ b/lib/sastrawi/morphology/disambiguator/disambiguator_pref... | Add implementation of thirtieth-second rule of disambiguator prefix
|
diff --git a/db/migrate/20170106112835_add_funding_request_amount_to_funding_request.rb b/db/migrate/20170106112835_add_funding_request_amount_to_funding_request.rb
index abc1234..def5678 100644
--- a/db/migrate/20170106112835_add_funding_request_amount_to_funding_request.rb
+++ b/db/migrate/20170106112835_add_funding_... | Migrate for Fixing up the javascript to populate the amounts & percents properly when a bucket is selected or if the Funding Line Item's line amount changes.
|
diff --git a/pen_and_paper/binary_search.rb b/pen_and_paper/binary_search.rb
index abc1234..def5678 100644
--- a/pen_and_paper/binary_search.rb
+++ b/pen_and_paper/binary_search.rb
@@ -4,18 +4,22 @@ def bin_search(a, k)
offset = 0
length = a.size
- while length > 0 && offset < a.size
+ c = 0
+ while ... | Improve binary search by actually paying attention to the invariant
|
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/appcast.rb b/Library/Homebrew/cask/lib/hbc/dsl/appcast.rb
index abc1234..def5678 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/appcast.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/appcast.rb
@@ -15,11 +15,7 @@ result = SystemCommand.run("/usr/bin/curl", args: ["--co... | Change regex to catch multi-line `pubDate` tags.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.