diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/features/support/env.rb b/features/support/env.rb index abc1234..def5678 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -9,6 +9,7 @@ require 'rspec' Capybara.app = Sinatra::Application +Capybara.default_wait_time = 5 class RechargeWorld include Capybara::DSL
Increase Capybara default wait time in hope to make Travis happy
diff --git a/spec/input_spec.rb b/spec/input_spec.rb index abc1234..def5678 100644 --- a/spec/input_spec.rb +++ b/spec/input_spec.rb @@ -0,0 +1,49 @@+require File.expand_path 'watirspec/spec_helper', File.dirname(__FILE__) + +describe Watir::Input do + + before do + browser.goto(WatirSpec.files + "/forms_with_input...
Add pending specs for our custom Input methods.
diff --git a/lib/import_resources.rb b/lib/import_resources.rb index abc1234..def5678 100644 --- a/lib/import_resources.rb +++ b/lib/import_resources.rb @@ -17,12 +17,14 @@ resource.touch end - last_updated = DateTime.parse(Resource.order("updated_at desc").limit(1).first.updated_at.to_s) + if ...
Fix for ImportResources if there are no Resources in Google Apps Edge case, but this breaks the tests sometimes
diff --git a/lib/tasks/uploader.rake b/lib/tasks/uploader.rake index abc1234..def5678 100644 --- a/lib/tasks/uploader.rake +++ b/lib/tasks/uploader.rake @@ -21,7 +21,7 @@ graph = GraphGenerator.generate_graph(domain) domain_hash.merge!({ 'graph' => graph }) - HTTParty.post("#{args[:host]}/api/projects_dom...
Add v1 to api path
diff --git a/app/helpers/sidebar_helper.rb b/app/helpers/sidebar_helper.rb index abc1234..def5678 100644 --- a/app/helpers/sidebar_helper.rb +++ b/app/helpers/sidebar_helper.rb @@ -10,7 +10,17 @@ def render_sidebar(sidebar) if sidebar.view_root - render_to_string(:file => "#{sidebar.view_root}/content.rht...
Allow themes to once again override views for sidebars. Note that the themes need to be updated. Instead of views/plugins/sidebars/archives/content.rhtml, use views/plugins/archives_sidebar/content.rhtml. The contents of the views may also need updating for sidebars git-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710...
diff --git a/app/mailers/message_mailer.rb b/app/mailers/message_mailer.rb index abc1234..def5678 100644 --- a/app/mailers/message_mailer.rb +++ b/app/mailers/message_mailer.rb @@ -8,6 +8,7 @@ # # Returns nothing. def created(message_id, recipient_id) + @message = Message.find(message_id) @recipient =...
Enumerate and attach files to email
diff --git a/app/models/item/data_store.rb b/app/models/item/data_store.rb index abc1234..def5678 100644 --- a/app/models/item/data_store.rb +++ b/app/models/item/data_store.rb @@ -0,0 +1,83 @@+# Defines how an Item's data is stored in its JSON data column. The format +# varies depending on whether the data is localize...
Define storage format for various data types
diff --git a/app/models/news_edition.rb b/app/models/news_edition.rb index abc1234..def5678 100644 --- a/app/models/news_edition.rb +++ b/app/models/news_edition.rb @@ -1,16 +1,17 @@ require "edition" class NewsEdition < Edition + include Attachable field :subtitle, type: String field :body, t...
Add image attachment to news item
diff --git a/spec/bitbucket_rest_api/request/oauth_spec.rb b/spec/bitbucket_rest_api/request/oauth_spec.rb index abc1234..def5678 100644 --- a/spec/bitbucket_rest_api/request/oauth_spec.rb +++ b/spec/bitbucket_rest_api/request/oauth_spec.rb @@ -0,0 +1,27 @@+require 'spec_helper' +require 'rack/test' + +describe BitBuck...
Add rspec for BitBucket::Request::OAuth middleware
diff --git a/spec/electric_sheep/shell/directories_spec.rb b/spec/electric_sheep/shell/directories_spec.rb index abc1234..def5678 100644 --- a/spec/electric_sheep/shell/directories_spec.rb +++ b/spec/electric_sheep/shell/directories_spec.rb @@ -0,0 +1,34 @@+require 'spec_helper' + +describe ElectricSheep::Shell::Direct...
Add missing spec of shell/directories module
diff --git a/core/dir/exists_spec.rb b/core/dir/exists_spec.rb index abc1234..def5678 100644 --- a/core/dir/exists_spec.rb +++ b/core/dir/exists_spec.rb @@ -2,7 +2,7 @@ require File.expand_path('../fixtures/common', __FILE__) require File.expand_path('../shared/exist', __FILE__) -describe "Dir.exist?" do +describe "...
Fix name in the describe block of Dir.exists?.
diff --git a/spec/generators/clearance/specs/specs_generator_spec.rb b/spec/generators/clearance/specs/specs_generator_spec.rb index abc1234..def5678 100644 --- a/spec/generators/clearance/specs/specs_generator_spec.rb +++ b/spec/generators/clearance/specs/specs_generator_spec.rb @@ -0,0 +1,26 @@+require "spec_helper" ...
Add tests for the specs generator
diff --git a/test/oauth_util_test.rb b/test/oauth_util_test.rb index abc1234..def5678 100644 --- a/test/oauth_util_test.rb +++ b/test/oauth_util_test.rb @@ -5,7 +5,7 @@ class OauthUtilTest < Test::Unit::TestCase def test_query_string_escapes_single_quote - base_url = "http://example.com?location=d%27iberville" ...
Replace URL with unescaped version.
diff --git a/scripts/add_framework_script.rb b/scripts/add_framework_script.rb index abc1234..def5678 100644 --- a/scripts/add_framework_script.rb +++ b/scripts/add_framework_script.rb @@ -0,0 +1,41 @@+#!/usr/bin/env ruby + +# Copyright 2019 Google +# +# Licensed under the Apache License, Version 2.0 (the "License"); +...
Add a tool to add framework automatically to a project.
diff --git a/test/translator_test.rb b/test/translator_test.rb index abc1234..def5678 100644 --- a/test/translator_test.rb +++ b/test/translator_test.rb @@ -3,9 +3,13 @@ class Chelsy::TranslatorTest < Minitest::Test include Chelsy + attr_reader :translator + + def setup + @translator = Translator.new + end +...
Initialize translator instance in setup hook.
diff --git a/attr_enum_accessor.gemspec b/attr_enum_accessor.gemspec index abc1234..def5678 100644 --- a/attr_enum_accessor.gemspec +++ b/attr_enum_accessor.gemspec @@ -19,7 +19,7 @@ spec.required_ruby_version = ">= 1.9" - spec.add_dependency "activesupport", "~> 3.2" + spec.add_dependency "activesupport", ">= ...
Add support for activesupport > 3
diff --git a/db/data_migration/20170822095423_convert_unknown_news_articles.rb b/db/data_migration/20170822095423_convert_unknown_news_articles.rb index abc1234..def5678 100644 --- a/db/data_migration/20170822095423_convert_unknown_news_articles.rb +++ b/db/data_migration/20170822095423_convert_unknown_news_articles.rb...
Add data migration to convert NewsArticles The NewsArticleType Unknown is a legacy concept. These are NewsArticles that were never categorised into one of the other NewsArticleTypes. These are surfaced on the frontend via the [Announcements page](www.gov.uk/government/announcements) and do get shown when filtering by ...
diff --git a/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb b/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb index abc1234..def5678 100644 --- a/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb +++ b/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb...
Rename all forbidden paths again
diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/projects/graphs_controller_spec.rb +++ b/spec/controllers/projects/graphs_controller_spec.rb @@ -12,10 +12,10 @@ describe 'GET #languages' do ...
Fix indentation and change inner matcher
diff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb index abc1234..def5678 100644 --- a/spec/models/article_spec.rb +++ b/spec/models/article_spec.rb @@ -17,10 +17,10 @@ it { should belong_to(:category) } it { should have_many(:edits) } - describe '#with_unapproved_edits' do - it 'should return...
Remove article test for unapproved_edits
diff --git a/spec/ubuntu/lx_boot_spec.rb b/spec/ubuntu/lx_boot_spec.rb index abc1234..def5678 100644 --- a/spec/ubuntu/lx_boot_spec.rb +++ b/spec/ubuntu/lx_boot_spec.rb @@ -0,0 +1,36 @@+require 'spec_helper' + +# Testing for override files created by lx_boot + +# See https://github.com/joyent/illumos-joyent/blob/master...
Test for files created by lx_boot_zone_ubuntu.ksh
diff --git a/extra_extra.gemspec b/extra_extra.gemspec index abc1234..def5678 100644 --- a/extra_extra.gemspec +++ b/extra_extra.gemspec @@ -8,7 +8,7 @@ s.name = "extra_extra" s.version = ExtraExtra::VERSION s.authors = ["Stitch Fix Engineering"] - s.email = ["eng@stitchfix.com"] + s.emai...
Use Stitch Fix open source email
diff --git a/bencodr.gemspec b/bencodr.gemspec index abc1234..def5678 100644 --- a/bencodr.gemspec +++ b/bencodr.gemspec @@ -13,6 +13,7 @@ s.description = "This gem provides a way to encode and decode bencode used by the Bit Torrent protocol. Normal ruby objects can be marshalled as bencode and demarshalled back to r...
Add rake to dev dependencies so travis will work
diff --git a/fpm-cookery.gemspec b/fpm-cookery.gemspec index abc1234..def5678 100644 --- a/fpm-cookery.gemspec +++ b/fpm-cookery.gemspec @@ -18,10 +18,8 @@ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_development_dependency "fpm", "~> 0.4" ...
Remove puppet and fpm from development dependencies. They are already in runtime dependencies.
diff --git a/react-native-instabug-sdk.podspec b/react-native-instabug-sdk.podspec index abc1234..def5678 100644 --- a/react-native-instabug-sdk.podspec +++ b/react-native-instabug-sdk.podspec @@ -13,7 +13,6 @@ s.source = { git: package.dig(:repository, :url) } s.source_files = "ios/*.{h,m}" s.platform = :ios, ...
Remove Instabug as a framework from the podspec
diff --git a/gollum-auth.gemspec b/gollum-auth.gemspec index abc1234..def5678 100644 --- a/gollum-auth.gemspec +++ b/gollum-auth.gemspec @@ -21,6 +21,8 @@ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] + spec.add_dependency 'rack', '~> 1.6' + spec.add_de...
Add missing gem dependency for rack. Gollum depends on sinatra which depends on rack ~> 1.4. The latest version 1 of rack is 1.6.5 so we stick to 1.6.
diff --git a/api-versions.gemspec b/api-versions.gemspec index abc1234..def5678 100644 --- a/api-versions.gemspec +++ b/api-versions.gemspec @@ -10,8 +10,6 @@ s.homepage = "https://github.com/EDMC/api-versions" s.summary = "api-versions helps manage your Rails app API endpoints." s.description = "api-ver...
Remove rubyforge link from gemspec Rubyforge is sunsetted, see: https://twitter.com/evanphx/status/399552820380053505
diff --git a/lib/icims/job.rb b/lib/icims/job.rb index abc1234..def5678 100644 --- a/lib/icims/job.rb +++ b/lib/icims/job.rb @@ -4,9 +4,9 @@ class Job < OpenStruct + DEFAULT_FIELDS = %w(id folder jobtitle positioncategory positiontype joblocation additionallocations overview) + class << self - - DEFA...
Move DEFAULT_FIELDS out of class << self
diff --git a/app/models/tag.rb b/app/models/tag.rb index abc1234..def5678 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -1,4 +1,7 @@ class Tag < ActiveRecord::Base has_many :taggings, dependent: :destroy has_many :posts, through: :taggings + + has_many :interests, dependent: :destroy + has_many :fol...
Add followers query method for Tag model
diff --git a/search/binary_search/ruby/binary_search.rb b/search/binary_search/ruby/binary_search.rb index abc1234..def5678 100644 --- a/search/binary_search/ruby/binary_search.rb +++ b/search/binary_search/ruby/binary_search.rb @@ -0,0 +1,21 @@+def binary_search(array, num) + low = 0 + high = array.size - 1 + + while ...
Add binary search in ruby
diff --git a/lib/fog/aws/requests/sts/get_federation_token.rb b/lib/fog/aws/requests/sts/get_federation_token.rb index abc1234..def5678 100644 --- a/lib/fog/aws/requests/sts/get_federation_token.rb +++ b/lib/fog/aws/requests/sts/get_federation_token.rb @@ -4,6 +4,31 @@ class Real require 'fog/aws/parse...
Add minimal documentation in GetFederationToken request
diff --git a/spec/models/institution_spec.rb b/spec/models/institution_spec.rb index abc1234..def5678 100644 --- a/spec/models/institution_spec.rb +++ b/spec/models/institution_spec.rb @@ -0,0 +1,37 @@+require "rails_helper" + +describe Institution do + describe ".top" do + let(:petition){ FactoryGirl.create(:local...
Create spec for Institution.top scope
diff --git a/spec/rspec/expectations_spec.rb b/spec/rspec/expectations_spec.rb index abc1234..def5678 100644 --- a/spec/rspec/expectations_spec.rb +++ b/spec/rspec/expectations_spec.rb @@ -1,11 +1,19 @@-require 'rspec/support/spec/prevent_load_time_warnings' +require 'rspec/support/spec/library_wide_checks' RSpec.de...
Update to new rspec-support library-wide checks.
diff --git a/spec/ruby/core/main/def_spec.rb b/spec/ruby/core/main/def_spec.rb index abc1234..def5678 100644 --- a/spec/ruby/core/main/def_spec.rb +++ b/spec/ruby/core/main/def_spec.rb @@ -1,14 +1,27 @@ require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../fixtures/classes', __FILE__)...
Add specs for visibility of top level methods and script binding
diff --git a/spec/views/html_example_spec.rb b/spec/views/html_example_spec.rb index abc1234..def5678 100644 --- a/spec/views/html_example_spec.rb +++ b/spec/views/html_example_spec.rb @@ -19,7 +19,7 @@ expect(html_example.filename).to eq("ordering_a_cup_of_coffee.html") end - describe "multi charctor example...
Fix spelling in HtmlExample spec
diff --git a/lib/middleman-alias/alias-resource.rb b/lib/middleman-alias/alias-resource.rb index abc1234..def5678 100644 --- a/lib/middleman-alias/alias-resource.rb +++ b/lib/middleman-alias/alias-resource.rb @@ -7,6 +7,10 @@ def initialize(store, path, alias_path) @alias_path = alias_path super...
Add the source_file method so that we don't break the sitemap area. /__middleman/sitemap/
diff --git a/lib/crunchbase-api/relation.rb b/lib/crunchbase-api/relation.rb index abc1234..def5678 100644 --- a/lib/crunchbase-api/relation.rb +++ b/lib/crunchbase-api/relation.rb @@ -16,11 +16,6 @@ @type = data['type'] @name = data['name'] @path = data['path'] - @money_invested = data['money_...
Remove funding round specific properties from Relation
diff --git a/core/data/constants_spec.rb b/core/data/constants_spec.rb index abc1234..def5678 100644 --- a/core/data/constants_spec.rb +++ b/core/data/constants_spec.rb @@ -0,0 +1,15 @@+require_relative '../../spec_helper' + +describe "Data" do + it "is a subclass of Object" do + suppress_warning do + Data.sup...
Add specs for the deprecated Data class
diff --git a/lib/priceable.rb b/lib/priceable.rb index abc1234..def5678 100644 --- a/lib/priceable.rb +++ b/lib/priceable.rb @@ -18,7 +18,7 @@ end end - unless Rails::VERSION::MAJOR == 4 + unless Rails::VERSION::MAJOR == 4 && !defined?(ProtectedAttributes) if self._accessible_attributes? ...
Support for rails 4 protected_attributes gem
diff --git a/lib/newrelic_moped/instrumentation.rb b/lib/newrelic_moped/instrumentation.rb index abc1234..def5678 100644 --- a/lib/newrelic_moped/instrumentation.rb +++ b/lib/newrelic_moped/instrumentation.rb @@ -12,7 +12,8 @@ executes do Moped::Node.class_eval do def process_with_newrelic_trace(operation...
Include collection name into metrics name
diff --git a/lib/rucaptcha.rb b/lib/rucaptcha.rb index abc1234..def5678 100644 --- a/lib/rucaptcha.rb +++ b/lib/rucaptcha.rb @@ -35,5 +35,10 @@ end end -ActionController::Base.send(:include, RuCaptcha::ControllerHelpers) -ActionView::Base.send(:include, RuCaptcha::ViewHelpers) +ActiveSupport.on_load(:action_contro...
Use `ActiveSupport.on_load` to extend ActionController and ActionView. http://api.rubyonrails.org/classes/ActiveSupport/LazyLoadHooks.html https://github.com/rails/rails/blob/92703a9ea5d8b96f30e0b706b801c9185ef14f0e/actionpack/lib/action_controller/base.rb#L264 https://github.com/rails/rails/blob/7da8d76206271bdf200ea...
diff --git a/lib/rails-settings/cached_settings.rb b/lib/rails-settings/cached_settings.rb index abc1234..def5678 100644 --- a/lib/rails-settings/cached_settings.rb +++ b/lib/rails-settings/cached_settings.rb @@ -21,8 +21,8 @@ end def save_default(key, value) - return false unless send(key).nil? -...
Fix method name cannot be setting's key
diff --git a/lib/spec_support/check_all_columns.rb b/lib/spec_support/check_all_columns.rb index abc1234..def5678 100644 --- a/lib/spec_support/check_all_columns.rb +++ b/lib/spec_support/check_all_columns.rb @@ -1,7 +1,5 @@ def check_all_columns(instance) instance.class.columns.each do |column| - it "has data in...
Remove the 'it' so 'it' can be placed higher up to catch interrupts
diff --git a/app/models/ability.rb b/app/models/ability.rb index abc1234..def5678 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -5,6 +5,10 @@ user ||= User.new can :update, Club, :user_id => user.id + + can :read, Club do |club| + club.members.include?(user) + end can [ ...
Update the Ability Model for Club :read Update the Ability model to handle restricting Club show actions based on whether the member is currently a member of the Club.
diff --git a/lib/httplog/adapters/patron.rb b/lib/httplog/adapters/patron.rb index abc1234..def5678 100644 --- a/lib/httplog/adapters/patron.rb +++ b/lib/httplog/adapters/patron.rb @@ -20,6 +20,16 @@ if log_enabled headers = @response.headers HttpLog.log_compact(action_name, url, @response...
Implement JSON logging for Patron
diff --git a/environment.rb b/environment.rb index abc1234..def5678 100644 --- a/environment.rb +++ b/environment.rb @@ -12,7 +12,5 @@ DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3:///#{Dir.pwd}/development.sqlite3") - if ENV['RACK_ENV'] == 'production' - use Rack::GoogleAnalytics, :tracker => 'U...
Test for Heroku, unconditionally enabled Google Analytics
diff --git a/erbtex.gemspec b/erbtex.gemspec index abc1234..def5678 100644 --- a/erbtex.gemspec +++ b/erbtex.gemspec @@ -23,5 +23,5 @@ s.require_paths = ["lib"] s.add_dependency "erubis" - s.add_development_dependency "rspec" + s.add_development_dependency "debugger" end
Add debugger as development dependency.
diff --git a/capistrano-bundler.gemspec b/capistrano-bundler.gemspec index abc1234..def5678 100644 --- a/capistrano-bundler.gemspec +++ b/capistrano-bundler.gemspec @@ -18,7 +18,6 @@ spec.require_paths = ['lib'] spec.add_dependency 'capistrano', '~> 3.1' - spec.add_dependency 'sshkit', '~> 1.2' spec.add_de...
Remove sshkit runtime dependency declaration Capistrano gem depends on sshkit itself.
diff --git a/spec/javascripts/support/jasmine_helper.rb b/spec/javascripts/support/jasmine_helper.rb index abc1234..def5678 100644 --- a/spec/javascripts/support/jasmine_helper.rb +++ b/spec/javascripts/support/jasmine_helper.rb @@ -9,7 +9,6 @@ #end # #Example: prevent PhantomJS auto install, uses PhantomJS already o...
Stop it all exploding on Travis
diff --git a/spec/javascripts/support/jasmine_helper.rb b/spec/javascripts/support/jasmine_helper.rb index abc1234..def5678 100644 --- a/spec/javascripts/support/jasmine_helper.rb +++ b/spec/javascripts/support/jasmine_helper.rb @@ -14,7 +14,8 @@ # pin chromedriver version to latest compatible found # see https://chro...
Downgrade chrome driver for jasmine Inline with feature test chromedirver version and version 79 may not work for some local test envs.
diff --git a/lib/storey/gen_dump_command.rb b/lib/storey/gen_dump_command.rb index abc1234..def5678 100644 --- a/lib/storey/gen_dump_command.rb +++ b/lib/storey/gen_dump_command.rb @@ -1,39 +1,34 @@ module Storey class GenDumpCommand - easy_class_to_instance - - def initialize(options={}) - @options = o...
Simplify GenDumpCommand to not use instances of itself - Remove reliance on `easy_class_to_instance_method`
diff --git a/lib/validate_as_email/rspec.rb b/lib/validate_as_email/rspec.rb index abc1234..def5678 100644 --- a/lib/validate_as_email/rspec.rb +++ b/lib/validate_as_email/rspec.rb @@ -1,4 +1,3 @@-require 'rspec/rails/extensions/active_record/base' # Adds a custom matcher to RSpec to make it easier to make sure your e...
Remove one more instance of old requirement
diff --git a/lib/batch/arguments.rb b/lib/batch/arguments.rb index abc1234..def5678 100644 --- a/lib/batch/arguments.rb +++ b/lib/batch/arguments.rb @@ -18,8 +18,8 @@ # Parse command-line arguments def parse_arguments(args = ARGV) - args_def.title ||= self.job_name.titleize - ar...
Fix argument configuration from job definition properties
diff --git a/resque-statsd-metrics.gemspec b/resque-statsd-metrics.gemspec index abc1234..def5678 100644 --- a/resque-statsd-metrics.gemspec +++ b/resque-statsd-metrics.gemspec @@ -18,6 +18,7 @@ gem.require_paths = ["lib"] gem.add_dependency("resque", "~> 1.13") + gem.add_dependency("statsd-ruby") gem.add_de...
Add statsd-ruby client to dependencies
diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index abc1234..def5678 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -1,5 +1,5 @@ class ArticlesController < ApplicationController - before_filter :authenticate_user!, only...
Add authentication to everything except the index.
diff --git a/app/controllers/expenses_controller.rb b/app/controllers/expenses_controller.rb index abc1234..def5678 100644 --- a/app/controllers/expenses_controller.rb +++ b/app/controllers/expenses_controller.rb @@ -1,5 +1,4 @@ class ExpensesController < ApplicationController - def index @expenses = Expense.al...
Add missing update and destroy actions to expense controller
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index abc1234..def5678 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -9,7 +9,7 @@ sign_in profile redirect_to root_path else - flash[:error] = 'Invali...
Fix flash persisting after you've logged in
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index abc1234..def5678 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -class SessionsController < ApplicationController +class SessionsCo...
Set CmsController as a parent of SessionsController
diff --git a/fixed_array.rb b/fixed_array.rb index abc1234..def5678 100644 --- a/fixed_array.rb +++ b/fixed_array.rb @@ -14,7 +14,6 @@ def set(index, value) instance_variable_set(name(index), value) - value end private
Remove unnecessary line of code
diff --git a/lib/datatrans/xml/transaction/request.rb b/lib/datatrans/xml/transaction/request.rb index abc1234..def5678 100644 --- a/lib/datatrans/xml/transaction/request.rb +++ b/lib/datatrans/xml/transaction/request.rb @@ -8,7 +8,7 @@ def post(url, options = {}) options = options.merge(self.datatrans.pro...
Fix argument delegation in Ruby 3
diff --git a/lib/fact_check_mail.rb b/lib/fact_check_mail.rb index abc1234..def5678 100644 --- a/lib/fact_check_mail.rb +++ b/lib/fact_check_mail.rb @@ -10,7 +10,7 @@ end def out_of_office? - subject_is_out_of_office? or out_of_office_header_set? + subject_is_out_of_office? || out_of_office_header_set? ...
Use correct boolean || operator
diff --git a/lib/firebolt/warmer.rb b/lib/firebolt/warmer.rb index abc1234..def5678 100644 --- a/lib/firebolt/warmer.rb +++ b/lib/firebolt/warmer.rb @@ -28,7 +28,7 @@ end def _warmer_reset_salt! - ::Firebolt.reset_salt!(salt) + ::Firebolt.reset_salt!(_warmer_salt) end def _warmer_salt @...
Fix method calls where name was changed
diff --git a/lib/lita/rspec/matchers/route_matcher.rb b/lib/lita/rspec/matchers/route_matcher.rb index abc1234..def5678 100644 --- a/lib/lita/rspec/matchers/route_matcher.rb +++ b/lib/lita/rspec/matchers/route_matcher.rb @@ -3,13 +3,14 @@ module Matchers # Used to complete a chat routing test chain. c...
Use accessor methods instead of instance variables.
diff --git a/lib/pagylight/active_record_extension.rb b/lib/pagylight/active_record_extension.rb index abc1234..def5678 100644 --- a/lib/pagylight/active_record_extension.rb +++ b/lib/pagylight/active_record_extension.rb @@ -1,13 +1,16 @@ module Pagylight module ActiveRecordExtension + # # It'll give a sim...
Return first page if page supplied inst available
diff --git a/lib/guard/go/runner.rb b/lib/guard/go/runner.rb index abc1234..def5678 100644 --- a/lib/guard/go/runner.rb +++ b/lib/guard/go/runner.rb @@ -41,17 +41,24 @@ end private + def run_go_command! - if @options[:test] - @proc = ChildProcess.build(@options[:cmd], "test") - else - ...
Use 'go build' + ./binary instead of 'go run'
diff --git a/core/process/times_spec.rb b/core/process/times_spec.rb index abc1234..def5678 100644 --- a/core/process/times_spec.rb +++ b/core/process/times_spec.rb @@ -16,12 +16,12 @@ ruby_version_is "2.5" do platform_is_not :windows do it "uses getrusage when available to improve precision beyond millis...
Make more attempts to check for the precision of Process.times * Process.clock_getres specs use 10_000 but that's quite slow for the Process.times spec.
diff --git a/lib/tasks/gitlab/db/drop_all_tables.rake b/lib/tasks/gitlab/db/drop_all_tables.rake index abc1234..def5678 100644 --- a/lib/tasks/gitlab/db/drop_all_tables.rake +++ b/lib/tasks/gitlab/db/drop_all_tables.rake @@ -0,0 +1,10 @@+namespace :gitlab do + namespace :db do + task drop_all_tables: :environment d...
Add a rake task that drops all tables
diff --git a/lib/transcoder/parser/yaml/identifier.rb b/lib/transcoder/parser/yaml/identifier.rb index abc1234..def5678 100644 --- a/lib/transcoder/parser/yaml/identifier.rb +++ b/lib/transcoder/parser/yaml/identifier.rb @@ -3,12 +3,14 @@ module Transcoder class Yaml < Parser - identifier "text/yaml", + iden...
Raise a TypeError if not a hash or an array
diff --git a/lib/identifiers/doi.rb b/lib/identifiers/doi.rb index abc1234..def5678 100644 --- a/lib/identifiers/doi.rb +++ b/lib/identifiers/doi.rb @@ -20,7 +20,7 @@ | [^[:space:]]+ # Suffix... \([^[:space:])]+\) # Ending in balanced parenthese...
Fix misleading comment on DOI regexp The end of the match for DOIs ending in balanced parentheses does not match punctuation (it's looking for something that is neither a space nor punctuation) so correct the comment to be less misleading.
diff --git a/spec/features/admin/parts_spec.rb b/spec/features/admin/parts_spec.rb index abc1234..def5678 100644 --- a/spec/features/admin/parts_spec.rb +++ b/spec/features/admin/parts_spec.rb @@ -3,8 +3,8 @@ describe "Parts", js: true do stub_authorization! - let(:tshirt) { create(:product, :name => "T-Shirt") }...
Fix parts spec by forcing variant creation Avoid errors like: Failure/Error: Unable to find matching line from backtrace ActiveRecord::RecordNotFound: Couldn't find Spree::Variant with id=1
diff --git a/spec/rollbar/delay/thread_spec.rb b/spec/rollbar/delay/thread_spec.rb index abc1234..def5678 100644 --- a/spec/rollbar/delay/thread_spec.rb +++ b/spec/rollbar/delay/thread_spec.rb @@ -20,7 +20,7 @@ it 'doesnt raise any exception' do expect do described_class.call(payload).join - ...
Use raise_error instead of raise_exception
diff --git a/spec/unit/mutant/ast/sexp_spec.rb b/spec/unit/mutant/ast/sexp_spec.rb index abc1234..def5678 100644 --- a/spec/unit/mutant/ast/sexp_spec.rb +++ b/spec/unit/mutant/ast/sexp_spec.rb @@ -0,0 +1,36 @@+RSpec.describe Mutant::AST::Sexp do + let(:object) do + Class.new do + include Mutant::AST::Sexp + + ...
Fix specification holes in Mutant::AST::Sexp
diff --git a/bin/find_spammers.rb b/bin/find_spammers.rb index abc1234..def5678 100644 --- a/bin/find_spammers.rb +++ b/bin/find_spammers.rb @@ -0,0 +1,23 @@+def find_spammers + spammers = Set.new + User.all.each do |u| + puts "Checking user #{u.email}" + hp_last = ProjectHoneypot.lookup(u.last_sign_in_ip.to_s)...
Add script to check all users for spammers.
diff --git a/lib/salsa_supporter.rb b/lib/salsa_supporter.rb index abc1234..def5678 100644 --- a/lib/salsa_supporter.rb +++ b/lib/salsa_supporter.rb @@ -1,5 +1,5 @@ class SalsaSupporter < SalsaObject - salsa_attribute :organization_KEY, :Email, :First_Name, :Last_Name + salsa_attribute :organization_KEY, :Email, :Fir...
Add Phone to supporter data
diff --git a/lib/show_for/helper.rb b/lib/show_for/helper.rb index abc1234..def5678 100644 --- a/lib/show_for/helper.rb +++ b/lib/show_for/helper.rb @@ -14,11 +14,9 @@ html_options[:id] ||= dom_id(object) html_options[:class] = "show_for #{dom_class(object)} #{html_options[:class]}".strip - builder...
Use capture instead of with_output_buffer.
diff --git a/lib/tasks/gettext.rake b/lib/tasks/gettext.rake index abc1234..def5678 100644 --- a/lib/tasks/gettext.rake +++ b/lib/tasks/gettext.rake @@ -6,12 +6,16 @@ desc "Create mo-files for L10n" task :makemo do + require 'gettext' + require 'gettext/rails' require 'gettext/utils' GetText.create_mofiles(t...
Load required libraries in updatepo task
diff --git a/lib/tty/test_prompt.rb b/lib/tty/test_prompt.rb index abc1234..def5678 100644 --- a/lib/tty/test_prompt.rb +++ b/lib/tty/test_prompt.rb @@ -1,4 +1,6 @@ # frozen_string_literal: true + +require "stringio" require_relative 'prompt'
Change to ensure dependency is loaded
diff --git a/threejs-rails.gemspec b/threejs-rails.gemspec index abc1234..def5678 100644 --- a/threejs-rails.gemspec +++ b/threejs-rails.gemspec @@ -21,5 +21,5 @@ spec.add_development_dependency "bundler", "~> 1.7" spec.add_development_dependency "rake", "~> 10.0" - spec.add_runtime_dependency 'railties', '~> 3...
Change from spermy to gt or = for railties dependency
diff --git a/lib/clearance/engine.rb b/lib/clearance/engine.rb index abc1234..def5678 100644 --- a/lib/clearance/engine.rb +++ b/lib/clearance/engine.rb @@ -23,10 +23,7 @@ app.config.filter_parameters += [:password, :token] end - config.app_middleware.insert_after( - ActionDispatch::ParamsParser, -...
Add middleware at the bottom Rails 5 eliminates the `ParamsParser` middleware. The Clearance middleware itself seems to have no dependency on certain middleware running after it.
diff --git a/lib/puppet/type/dism.rb b/lib/puppet/type/dism.rb index abc1234..def5678 100644 --- a/lib/puppet/type/dism.rb +++ b/lib/puppet/type/dism.rb @@ -1,19 +1,7 @@ Puppet::Type.newtype(:dism) do @doc = 'Manages Windows features via dism.' - ensurable do - desc 'Windows feature install state.' - - defa...
Fix ensurable so it works with PE 2015.2, tested as working on 3.8 as well
diff --git a/lib/rack_after_reply.rb b/lib/rack_after_reply.rb index abc1234..def5678 100644 --- a/lib/rack_after_reply.rb +++ b/lib/rack_after_reply.rb @@ -37,3 +37,16 @@ end RackAfterReply.apply + +# The web server library may not be loaded until we've instantiated the Rack +# handler (e.g., Rails 3.0's console co...
Handle RackAfterReply being loaded before web server library.
diff --git a/features/support/env.rb b/features/support/env.rb index abc1234..def5678 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -18,7 +18,7 @@ $: << File.join(File.dirname(__FILE__), '..', '..', 'lib') -require 'spec/expectations' +require 'rspec/expectations' require 'mixlib/log' requ...
Fix obsolete require statement for rspec (The old one brakes with RSpec 2.*)
diff --git a/features/support/vcr.rb b/features/support/vcr.rb index abc1234..def5678 100644 --- a/features/support/vcr.rb +++ b/features/support/vcr.rb @@ -1,7 +1,5 @@ require 'vcr' require 'webmock/cucumber' - -WebMock.disable_net_connect!(:allow => 'lon.auth.api.rackspacecloud.com') VCR.configure do |c| # Aut...
Revert "Allow rackspace connections further up the chain" This reverts commit ccf5271bf223b6c6ab97b13b6fedb24295fddc23.
diff --git a/filtered_params.gemspec b/filtered_params.gemspec index abc1234..def5678 100644 --- a/filtered_params.gemspec +++ b/filtered_params.gemspec @@ -30,7 +30,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib'] - spec.add_dependency 'activesupport', '~> 4.0....
Change the version of ActiveSupport from rc to rel.
diff --git a/tasks/gem.rake b/tasks/gem.rake index abc1234..def5678 100644 --- a/tasks/gem.rake +++ b/tasks/gem.rake @@ -15,7 +15,7 @@ self.readme_file = 'README.rdoc' self.history_file = 'CHANGELOG.rdoc' - self.extra_rdoc_files = FileList['*.rdoc'] + self.extra_rdoc_files = FileList['*.rdoc', 'ext/**/*.c...
Document C code now (pretty much documented) Thanks to tenderlove (Aaron Patterson) for that!
diff --git a/test/helper.rb b/test/helper.rb index abc1234..def5678 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -5,10 +5,10 @@ require 'coveralls' SimpleCov.start do - self.formatter = SimpleCov::Formatter::MultiFormatter[ + self.formatter = SimpleCov::Formatter::MultiFormatter.new([ SimpleCov::Format...
Fix a deprecation warning of simpleCov `SimpleCov::Formatter::MultiFormatter[]` is deprecated. So, this PR replaces it with `.new`. See https://github.com/colszowka/simplecov/blob/cb0e62b37b63816d07bdb15f3ee88ceade0947e5/lib/simplecov/formatter/multi_formatter.rb#L27
diff --git a/lib/web_console/view.rb b/lib/web_console/view.rb index abc1234..def5678 100644 --- a/lib/web_console/view.rb +++ b/lib/web_console/view.rb @@ -25,9 +25,13 @@ render(template: template, layout: 'layouts/inlined_string') end - # Escaped alias for "ActionView::Helpers::TranslationHelper.t". +...
Use j() for i18n translating text
diff --git a/language/versions/retry_1.8.rb b/language/versions/retry_1.8.rb index abc1234..def5678 100644 --- a/language/versions/retry_1.8.rb +++ b/language/versions/retry_1.8.rb @@ -6,7 +6,7 @@ end # block retry has been officially deprecated by matz and is unsupported in 1.9 - not_compliant_on :rubinius do ...
Add not_compliant_on for retry in block on jruby.
diff --git a/rfid.rb b/rfid.rb index abc1234..def5678 100644 --- a/rfid.rb +++ b/rfid.rb @@ -1,5 +1,16 @@ require 'revdev' require 'pry' +require "optparse" + +USAGE=<<__EOF +usage: + ruby #{$0} event_device output_file + + read from event_device and output to file + +example: + #{$0} /dev/input/event5 /var/www...
Make the script work with arguments
diff --git a/spec/models/concerns/user/completeness_spec.rb b/spec/models/concerns/user/completeness_spec.rb index abc1234..def5678 100644 --- a/spec/models/concerns/user/completeness_spec.rb +++ b/spec/models/concerns/user/completeness_spec.rb @@ -21,7 +21,7 @@ end context 'when the profile type is channel' do ...
Fix spec completeness user concern spec
diff --git a/spec/cucumber/web_spec.rb b/spec/cucumber/web_spec.rb index abc1234..def5678 100644 --- a/spec/cucumber/web_spec.rb +++ b/spec/cucumber/web_spec.rb @@ -1,4 +1,15 @@ require 'spec_helper' describe Cucumber::Web do + it 'extends paths' do + subject.should be_a(Cucumber::Web::Paths) + end + + it 'ext...
Test that the Cucumber::Web module extends paths, selectors and steps
diff --git a/hatenablog.gemspec b/hatenablog.gemspec index abc1234..def5678 100644 --- a/hatenablog.gemspec +++ b/hatenablog.gemspec @@ -21,6 +21,9 @@ spec.add_development_dependency "bundler", "~> 1.10" spec.add_development_dependency "rake", "~> 10.0" + spec.add_development_dependency "rr" + spec.add_develop...
Add development dependencies to gemspec
diff --git a/FDTake.podspec b/FDTake.podspec index abc1234..def5678 100644 --- a/FDTake.podspec +++ b/FDTake.podspec @@ -13,7 +13,7 @@ s.social_media_url = 'https://twitter.com/fulldecent' s.platform = :ios, '8.0' s.requires_arc = true - s.dependency "Asivura-CTAssetsPickerController" + s.dependency "CTAs...
Update name of pod dep to match name given in the fork
diff --git a/config/initializers/resque.rb b/config/initializers/resque.rb index abc1234..def5678 100644 --- a/config/initializers/resque.rb +++ b/config/initializers/resque.rb @@ -0,0 +1,5 @@+rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..' +rails_env = ENV['RAILS_ENV'] || 'development' + +resque_co...
Add initializer for production config
diff --git a/smoke_test/steps/base_step.rb b/smoke_test/steps/base_step.rb index abc1234..def5678 100644 --- a/smoke_test/steps/base_step.rb +++ b/smoke_test/steps/base_step.rb @@ -27,6 +27,19 @@ def mail_lookup MailLookup.new(state[:started_at]) end + + def with_retries(attempts: 5, initial_...
Add ability to perform a task with retries
diff --git a/spec/controllers/api/v1/tasks_controller_spec.rb b/spec/controllers/api/v1/tasks_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/api/v1/tasks_controller_spec.rb +++ b/spec/controllers/api/v1/tasks_controller_spec.rb @@ -53,6 +53,11 @@ expect( response_body_object.send k )....
Test for non attribute params on put
diff --git a/spec/features/creating_posts_validations_spec.rb b/spec/features/creating_posts_validations_spec.rb index abc1234..def5678 100644 --- a/spec/features/creating_posts_validations_spec.rb +++ b/spec/features/creating_posts_validations_spec.rb @@ -13,10 +13,10 @@ char = 'a' - it "Doesn't save posts with m...
Update createing post spec with new validations/passing
diff --git a/lib/active_admin/globalize3/index_table_for_extension.rb b/lib/active_admin/globalize3/index_table_for_extension.rb index abc1234..def5678 100644 --- a/lib/active_admin/globalize3/index_table_for_extension.rb +++ b/lib/active_admin/globalize3/index_table_for_extension.rb @@ -6,7 +6,7 @@ def translati...
Use the active admin method for this
diff --git a/spec/acceptance/users_spec.rb b/spec/acceptance/users_spec.rb index abc1234..def5678 100644 --- a/spec/acceptance/users_spec.rb +++ b/spec/acceptance/users_spec.rb @@ -1,3 +1,4 @@+# encoding: UTF-8 require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper') feature 'Users' do
Add magic encoding comment for Ruby 1.9 Required due to "»" character in spec example.
diff --git a/spec/driver_interface_spec.rb b/spec/driver_interface_spec.rb index abc1234..def5678 100644 --- a/spec/driver_interface_spec.rb +++ b/spec/driver_interface_spec.rb @@ -4,45 +4,28 @@ describe EventStore do before(:each) { prepare_for_test } context "interface structure" do - let(:subject) {event_st...
Refactor interface spec and change/add methods