diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/app/controllers/addresses_controller.rb b/app/controllers/addresses_controller.rb index abc1234..def5678 100644 --- a/app/controllers/addresses_controller.rb +++ b/app/controllers/addresses_controller.rb @@ -14,7 +14,7 @@ else @addresses = Address.where(@queries) end - @addresses = @addr...
Use no_timeout for search queries This won't remove the underlying problem, but will at least help me diagnose what's going on
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index abc1234..def5678 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -6,7 +6,11 @@ puts(current_user.id) @user = User.find(current_user.id) @plants = @user...
Improve data-load being sent to client
diff --git a/app/controllers/denuncias_controller.rb b/app/controllers/denuncias_controller.rb index abc1234..def5678 100644 --- a/app/controllers/denuncias_controller.rb +++ b/app/controllers/denuncias_controller.rb @@ -2,17 +2,25 @@ def create @denuncia = Denuncia.new(denuncia_params) - respond_to do |for...
Add correct redirect after denuncia and add additional strong params for items.
diff --git a/app/controllers/feedbacks_controller.rb b/app/controllers/feedbacks_controller.rb index abc1234..def5678 100644 --- a/app/controllers/feedbacks_controller.rb +++ b/app/controllers/feedbacks_controller.rb @@ -1,10 +1,37 @@ class FeedbacksController < ApplicationController def new + @feedback = Feedbac...
Add new and create actions for feedback
diff --git a/test/controllers/api/story_images_controller_test.rb b/test/controllers/api/story_images_controller_test.rb index abc1234..def5678 100644 --- a/test/controllers/api/story_images_controller_test.rb +++ b/test/controllers/api/story_images_controller_test.rb @@ -13,21 +13,20 @@ end it 'should show' do ...
Access story image nested in story
diff --git a/app/workers/update_milestones_worker.rb b/app/workers/update_milestones_worker.rb index abc1234..def5678 100644 --- a/app/workers/update_milestones_worker.rb +++ b/app/workers/update_milestones_worker.rb @@ -2,8 +2,8 @@ include Sidekiq::Worker def perform(activity_session_uid) - return unless act...
Make sure we have an activity session.
diff --git a/app/models/document.rb b/app/models/document.rb index abc1234..def5678 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -1,2 +1,5 @@ class Document < ActiveRecord::Base + scope :full_text_search, -> (query) { + where("MATCH(content) AGAINST(? IN BOOLEAN MODE)", "*D+ #{query}") + } ...
Add a scope for full text search
diff --git a/cleaner.rb b/cleaner.rb index abc1234..def5678 100644 --- a/cleaner.rb +++ b/cleaner.rb @@ -1,26 +1,40 @@ class Cleaner def self.clean_folder path dirty_folders = [] + Dir.glob(path + "/**").sort.each do |file| if File.directory?(file) self.clean_folder file dirty_fold...
Add check for length restrictions of file name and folders
diff --git a/ohm-contrib.gemspec b/ohm-contrib.gemspec index abc1234..def5678 100644 --- a/ohm-contrib.gemspec +++ b/ohm-contrib.gemspec @@ -10,9 +10,9 @@ s.files = `git ls-files`.split("\n") - s.add_dependency "ohm", "~> 2.0.0" + s.add_dependency "ohm", "~> 2.0" - s.add_development_dependency "cutest" - s....
Fix the gem build warnings
diff --git a/pronto-rubocop.gemspec b/pronto-rubocop.gemspec index abc1234..def5678 100644 --- a/pronto-rubocop.gemspec +++ b/pronto-rubocop.gemspec @@ -20,7 +20,7 @@ s.test_files = `git ls-files -- {spec}/*`.split("\n") s.require_paths = ['lib'] - s.add_dependency 'rubocop', '~> 0.12.0' + s.add_dependency ...
Update rubocop dependency version to 0.13.0
diff --git a/cookbooks/chef/attributes/default.rb b/cookbooks/chef/attributes/default.rb index abc1234..def5678 100644 --- a/cookbooks/chef/attributes/default.rb +++ b/cookbooks/chef/attributes/default.rb @@ -5,7 +5,7 @@ default[:chef][:server][:version] = "11.1.3-1" # Set the default client version -default[:chef][...
Update chef client to 11.16.0-1
diff --git a/data-aggregation-accumulator.gemspec b/data-aggregation-accumulator.gemspec index abc1234..def5678 100644 --- a/data-aggregation-accumulator.gemspec +++ b/data-aggregation-accumulator.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'data_aggregation-accumulator'...
Package version is increased from 0.0.0.1 to 0.0.1.0
diff --git a/problem_035.rb b/problem_035.rb index abc1234..def5678 100644 --- a/problem_035.rb +++ b/problem_035.rb @@ -0,0 +1,16 @@+require 'prime' + +# find all circular primes below a certain number +def p35(max) + (collection = []).tap do + Prime.each(max) do |p| + digits_array = p.to_s.chars.map(&:to_i)...
Add solution to problem 35, circular primes.
diff --git a/lib/data_repository.rb b/lib/data_repository.rb index abc1234..def5678 100644 --- a/lib/data_repository.rb +++ b/lib/data_repository.rb @@ -9,7 +9,7 @@ end def read(name) - File.read("#{data_dir}/#{name}.json") + File.open("#{data_dir}/#{name}.json", "r:utf-8", &:read) end def data_dir...
Tag read string correctly as UTF8
diff --git a/lib/how_bad/fetcher.rb b/lib/how_bad/fetcher.rb index abc1234..def5678 100644 --- a/lib/how_bad/fetcher.rb +++ b/lib/how_bad/fetcher.rb @@ -12,12 +12,12 @@ pulls = github.pulls.list user: user, repo: repo { - issues: to_array_of_hashes(issues), - pulls: to_array_of_hashes(pulls), +...
Rename to_array_of_hashes so it's clearer how it works.
diff --git a/lib/http/redirector.rb b/lib/http/redirector.rb index abc1234..def5678 100644 --- a/lib/http/redirector.rb +++ b/lib/http/redirector.rb @@ -7,7 +7,7 @@ class EndlessRedirectError < TooManyRedirectsError; end # HTTP status codes which indicate redirects - REDIRECT_CODES = 301..303 + REDIREC...
Fix list of redirect codes we handle
diff --git a/spec/app/models/mdm/module_action_spec.rb b/spec/app/models/mdm/module_action_spec.rb index abc1234..def5678 100644 --- a/spec/app/models/mdm/module_action_spec.rb +++ b/spec/app/models/mdm/module_action_spec.rb @@ -27,6 +27,7 @@ end context 'mass assignment security' do + it { should_not allow_m...
Add missing negative mass assignment spec [#47720609] Mdm::ModuleAction's spec was missing that it should NOT allow mass assignment of module_detail_id, which all the other Mdm::Module* specs did have.
diff --git a/lib/policies/policy.rb b/lib/policies/policy.rb index abc1234..def5678 100644 --- a/lib/policies/policy.rb +++ b/lib/policies/policy.rb @@ -1,9 +1,9 @@ class Policy - attr_reader :user, :role + attr_reader :current_user, :current_role - def initialize(user, role, object) - @user = user - @role =...
Change user to current_user and role to current_role
diff --git a/lib/rip/environment.rb b/lib/rip/environment.rb index abc1234..def5678 100644 --- a/lib/rip/environment.rb +++ b/lib/rip/environment.rb @@ -1,7 +1,7 @@ module Rip class Package < OpenStruct def to_s - "#{source} (#{version})" + "#{name} (#{version})" end def name @@ -10,6 +10,...
Fix last failing test, Package knows its dependencies
diff --git a/lib/identificamex/nombre/mayusculas.rb b/lib/identificamex/nombre/mayusculas.rb index abc1234..def5678 100644 --- a/lib/identificamex/nombre/mayusculas.rb +++ b/lib/identificamex/nombre/mayusculas.rb @@ -1,5 +1,6 @@ module Identificamex module Nombre + module Mayusculas def mayusculas(str) ...
Replace dots with spaces and squeeze and strip the string.
diff --git a/lib/harness/railtie.rb b/lib/harness/railtie.rb index abc1234..def5678 100644 --- a/lib/harness/railtie.rb +++ b/lib/harness/railtie.rb @@ -37,7 +37,7 @@ require 'harness/queues/sidekiq_queue' Harness.config.queue = :sidekiq else - Harness.config.queue = :syncronous + ...
Set queue explicity since weird thing with AS
diff --git a/lib/how_bad/fetcher.rb b/lib/how_bad/fetcher.rb index abc1234..def5678 100644 --- a/lib/how_bad/fetcher.rb +++ b/lib/how_bad/fetcher.rb @@ -24,7 +24,7 @@ end - Contract String, C::Optional[C::RespondTo[:issues, :pulls]] => Results + Contract String, C::RespondTo[:issues, :pulls] => Results def c...
Remove unnecessary and nonfunctional C::Optional.
diff --git a/core/class.rb b/core/class.rb index abc1234..def5678 100644 --- a/core/class.rb +++ b/core/class.rb @@ -8,7 +8,11 @@ #{sup.inherited `klass`}; - return block !== nil ? block.call(klass, null) : klass; + if (block !== nil) { + block.call(klass, null); + } + + return klas...
Fix bug in Class.new when taking a block
diff --git a/lib/rack/body_proxy.rb b/lib/rack/body_proxy.rb index abc1234..def5678 100644 --- a/lib/rack/body_proxy.rb +++ b/lib/rack/body_proxy.rb @@ -1,7 +1,9 @@ module Rack class BodyProxy def initialize(body, &block) - @body, @block, @closed = body, block, false + @body = body + @block = blo...
Expand initialize ivars instead of using 1 line Flattening the ivars here causes them to be allocated as an array. This commit expands them to avoid these extra allocations. Total allocations before: 2913000 Total allocations after: 2892000
diff --git a/lib/rack/serverinfo.rb b/lib/rack/serverinfo.rb index abc1234..def5678 100644 --- a/lib/rack/serverinfo.rb +++ b/lib/rack/serverinfo.rb @@ -6,7 +6,7 @@ class Serverinfo < Plastic def change_nokogiri_doc(doc) - return request.xhr? + return doc if request.xhr? badge = doc.create_e...
Return the doc when it is a xhr request.
diff --git a/lib/twain/describer.rb b/lib/twain/describer.rb index abc1234..def5678 100644 --- a/lib/twain/describer.rb +++ b/lib/twain/describer.rb @@ -25,10 +25,12 @@ @view_template end + def __output + @__output ||= Liquid::Template.parse(text).render(Proxy.new(self)) + end + def compile...
Split compile into two methods
diff --git a/lib/web_game_engine.rb b/lib/web_game_engine.rb index abc1234..def5678 100644 --- a/lib/web_game_engine.rb +++ b/lib/web_game_engine.rb @@ -12,5 +12,17 @@ @rules = args.fetch(:rules, nil) end + def versus_user(current_board, player, user_input) + if current_board.valid_move?(user_input) + ...
Create methods for game enginer for vs user and vs computer
diff --git a/app/decorators/generic_object_definition_decorator.rb b/app/decorators/generic_object_definition_decorator.rb index abc1234..def5678 100644 --- a/app/decorators/generic_object_definition_decorator.rb +++ b/app/decorators/generic_object_definition_decorator.rb @@ -6,4 +6,11 @@ def fileicon try(:pictu...
Add missing quadicon definition for generic object definitions Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1650146
diff --git a/examples/multi/custom_indent_opts.rb b/examples/multi/custom_indent_opts.rb index abc1234..def5678 100644 --- a/examples/multi/custom_indent_opts.rb +++ b/examples/multi/custom_indent_opts.rb @@ -3,11 +3,10 @@ require 'tty-spinner' opts = { - indent: 4, style: { top: ". ", - middle: "|--", -...
Change :style values in the example
diff --git a/lib/ruco/file_store.rb b/lib/ruco/file_store.rb index abc1234..def5678 100644 --- a/lib/ruco/file_store.rb +++ b/lib/ruco/file_store.rb @@ -1,4 +1,5 @@ require "digest/md5" +require "fileutils.rb" module Ruco class FileStore @@ -8,7 +9,7 @@ end def set(key, value) - `mkdir -p #{@folde...
Fix an error on quitting ruco. Windows full paths have a colon, and those were not being passed to the system correctly.
diff --git a/test/test_lxc_class_methods.rb b/test/test_lxc_class_methods.rb index abc1234..def5678 100644 --- a/test/test_lxc_class_methods.rb +++ b/test/test_lxc_class_methods.rb @@ -0,0 +1,25 @@+$:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'lib')) + +require 'test/unit' +require 'lxc' +require 'time...
Add a few specs against LXC singleton methods
diff --git a/lib/set/rainbow_set.rb b/lib/set/rainbow_set.rb index abc1234..def5678 100644 --- a/lib/set/rainbow_set.rb +++ b/lib/set/rainbow_set.rb @@ -26,12 +26,13 @@ set end - def pixel(number, frame = @frame_count) + def pixel(number) number = @length - number if number >= @length + x = @frequenc...
[REFACTORING] Remove obsolete frame parameter, calculate x only once
diff --git a/db/migrate/20130917164747_add_header_color_and_short_title_to_app_content_set.rb b/db/migrate/20130917164747_add_header_color_and_short_title_to_app_content_set.rb index abc1234..def5678 100644 --- a/db/migrate/20130917164747_add_header_color_and_short_title_to_app_content_set.rb +++ b/db/migrate/201309171...
Add migration for header_color and short_title
diff --git a/cf_spec/spec_helper.rb b/cf_spec/spec_helper.rb index abc1234..def5678 100644 --- a/cf_spec/spec_helper.rb +++ b/cf_spec/spec_helper.rb @@ -2,4 +2,8 @@ require 'machete' `mkdir -p log` -Machete.logger = Machete::Logger.new("log/integration.log")+Machete.logger = Machete::Logger.new("log/integration.log"...
Change rspec runner to not use BuildpackUploader Relies on shell script in shared ~/.aliases instead.
diff --git a/lib/sunspot/mongoid.rb b/lib/sunspot/mongoid.rb index abc1234..def5678 100644 --- a/lib/sunspot/mongoid.rb +++ b/lib/sunspot/mongoid.rb @@ -32,7 +32,7 @@ class DataAccessor < Sunspot::Adapters::DataAccessor def load(id) - @clazz.find(id) rescue nil + @clazz.find(BSON::ObjectID.fr...
Convert id to BSON before loading
diff --git a/core/config/initializers/deprecation_checker.rb b/core/config/initializers/deprecation_checker.rb index abc1234..def5678 100644 --- a/core/config/initializers/deprecation_checker.rb +++ b/core/config/initializers/deprecation_checker.rb @@ -4,7 +4,4 @@ if File.exist?(Rails.root.join("public/assets/products"...
Remove deprecation check for 'public/assets' as that's we're precompiled assets get created.
diff --git a/features/support/capybara_screenshot.rb b/features/support/capybara_screenshot.rb index abc1234..def5678 100644 --- a/features/support/capybara_screenshot.rb +++ b/features/support/capybara_screenshot.rb @@ -1 +1,3 @@ require 'capybara-screenshot/cucumber' +Capybara.save_path = File.join( ::Rails.root, 'tm...
Configure capybara screenshot to use correct directory and prune excess screenshots.
diff --git a/stacked_config.gemspec b/stacked_config.gemspec index abc1234..def5678 100644 --- a/stacked_config.gemspec +++ b/stacked_config.gemspec @@ -23,7 +23,7 @@ spec.add_development_dependency 'pry' spec.add_development_dependency 'rspec', '~> 3.0' - spec.add_dependency 'super_stack', '~> 0.2', '>= 0.2.5'...
Fix to avoid dependency upon broken super_stack (0.4)
diff --git a/railsthemes.gemspec b/railsthemes.gemspec index abc1234..def5678 100644 --- a/railsthemes.gemspec +++ b/railsthemes.gemspec @@ -17,4 +17,5 @@ gem.add_dependency "thor" gem.add_dependency "rest-client" + gem.add_dependency "launchy" end
Add launchy as a dependency.
diff --git a/test/sample_config.rb b/test/sample_config.rb index abc1234..def5678 100644 --- a/test/sample_config.rb +++ b/test/sample_config.rb @@ -0,0 +1,21 @@+require "schema/field_definitions" +require "schema/document_types" + +def schema_dir + File.expand_path('../config/schema', File.dirname(__FILE__)) +end + +...
Add helper to get sample schemas for use in tests The schemas provided by these helpers are based on the "real" schema in config. This is more like the normal pattern of an app testing against the database models it's actually using, rather than abstract potential models. I want to move rummager's tests in this dire...
diff --git a/test/unit/url_test.rb b/test/unit/url_test.rb index abc1234..def5678 100644 --- a/test/unit/url_test.rb +++ b/test/unit/url_test.rb @@ -8,6 +8,7 @@ should "return false for a invalid url" do refute Twingly::URL.validate("http://"), "Should not be valid" + refute Twingly::URL.validate("fee...
Test another type of invalid URL Close #7.
diff --git a/config/deploy/local.rb b/config/deploy/local.rb index abc1234..def5678 100644 --- a/config/deploy/local.rb +++ b/config/deploy/local.rb @@ -1,6 +1,5 @@ set :stage, :local set :rails_env, :production -set :branch, :http_proxy role :app, %w{deploy@localhost} role :web, %w{deploy@localhost}
Revert part of last commit
diff --git a/lib/fastlane/plugin/slack_train/actions/slack_train_action.rb b/lib/fastlane/plugin/slack_train/actions/slack_train_action.rb index abc1234..def5678 100644 --- a/lib/fastlane/plugin/slack_train/actions/slack_train_action.rb +++ b/lib/fastlane/plugin/slack_train/actions/slack_train_action.rb @@ -7,6 +7,9 @@...
Fix crash for out of bounds
diff --git a/lib/octocatalog-diff/catalog-diff/filter/single_item_array.rb b/lib/octocatalog-diff/catalog-diff/filter/single_item_array.rb index abc1234..def5678 100644 --- a/lib/octocatalog-diff/catalog-diff/filter/single_item_array.rb +++ b/lib/octocatalog-diff/catalog-diff/filter/single_item_array.rb @@ -7,8 +7,8 @@...
Create single item array filter code
diff --git a/db/migrate/20141121161704_add_identity_table.rb b/db/migrate/20141121161704_add_identity_table.rb index abc1234..def5678 100644 --- a/db/migrate/20141121161704_add_identity_table.rb +++ b/db/migrate/20141121161704_add_identity_table.rb @@ -14,7 +14,10 @@ WHERE provider IS NOT NULL eos - remove_index ...
Remove index only if exists Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
diff --git a/freecodecampruby/seek_and_destroy.rb b/freecodecampruby/seek_and_destroy.rb index abc1234..def5678 100644 --- a/freecodecampruby/seek_and_destroy.rb +++ b/freecodecampruby/seek_and_destroy.rb @@ -0,0 +1,34 @@+# Pseudocode +=begin +INPUT: Obtain an array and duplicate_values +Create a empty array called dup...
Create method that removes all dup values from array
diff --git a/spec/dummy/application.rb b/spec/dummy/application.rb index abc1234..def5678 100644 --- a/spec/dummy/application.rb +++ b/spec/dummy/application.rb @@ -14,28 +14,21 @@ provider :developer, name: 'admin' end - module Actions - class << self - def index - lambda do |env| - [...
Use a Rails controller for integration tests.
diff --git a/core/spec/models/spree/app_configuration_spec.rb b/core/spec/models/spree/app_configuration_spec.rb index abc1234..def5678 100644 --- a/core/spec/models/spree/app_configuration_spec.rb +++ b/core/spec/models/spree/app_configuration_spec.rb @@ -5,13 +5,13 @@ let (:prefs) { Rails.application.config.spree.p...
Switch app config test to move off of site_name Related to #4415
diff --git a/test/test_tori_file.rb b/test/test_tori_file.rb index abc1234..def5678 100644 --- a/test/test_tori_file.rb +++ b/test/test_tori_file.rb @@ -25,8 +25,8 @@ assert_instance_of Tori::File, Tori::File.new(nil, from: nil) end - test "#to_s" do - assert { "test" == Tori::File.new("test").to_s } + te...
Use name instead of to_s
diff --git a/schema.gemspec b/schema.gemspec index abc1234..def5678 100644 --- a/schema.gemspec +++ b/schema.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'schema' s.summary = "Primitives for schema and structure" - s.version = '0.3.0.0' + s.version = '0.4.0.0' s.description = ' ' s.aut...
Package version is increased from 0.3.0.0 to 0.4.0.0
diff --git a/schema.gemspec b/schema.gemspec index abc1234..def5678 100644 --- a/schema.gemspec +++ b/schema.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'evt-schema' s.summary = "Primitives for schema and data structure" - s.version = '2.2.8.0' + s.version = '2.3.0.0' s.description = ' ' ...
Package version is increased from 2.2.8.0 to 2.3.0.0
diff --git a/lib/thredded_create_app/tasks/setup_database.rb b/lib/thredded_create_app/tasks/setup_database.rb index abc1234..def5678 100644 --- a/lib/thredded_create_app/tasks/setup_database.rb +++ b/lib/thredded_create_app/tasks/setup_database.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true require 'thredded_create...
Use fixed DB password so that multiple runs succeed
diff --git a/manifests/milky_way.rb b/manifests/milky_way.rb index abc1234..def5678 100644 --- a/manifests/milky_way.rb +++ b/manifests/milky_way.rb @@ -10,7 +10,7 @@ coords = file_name.match(/\w*?([\d\.]+)((\-|\+)[\d\.]+)\w*?/)[1..2].collect &:to_f group name: group_name - subject location: u...
Set group names on MWP subjects
diff --git a/fluent-plugin-graylog.gemspec b/fluent-plugin-graylog.gemspec index abc1234..def5678 100644 --- a/fluent-plugin-graylog.gemspec +++ b/fluent-plugin-graylog.gemspec @@ -21,7 +21,7 @@ spec.add_runtime_dependency 'fluentd', '~> 0.12.36' - spec.add_development_dependency 'rake', '~> 10.0' + spec.add_de...
Update rake requirement to ~> 12.1 Updates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version. - [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
diff --git a/lib/stackato-lkg/amazon/support/rate_limit_handler.rb b/lib/stackato-lkg/amazon/support/rate_limit_handler.rb index abc1234..def5678 100644 --- a/lib/stackato-lkg/amazon/support/rate_limit_handler.rb +++ b/lib/stackato-lkg/amazon/support/rate_limit_handler.rb @@ -0,0 +1,33 @@+require 'aws-sdk' +require 'co...
Add handler for AWS RateLimitExceeded errors
diff --git a/setler.gemspec b/setler.gemspec index abc1234..def5678 100644 --- a/setler.gemspec +++ b/setler.gemspec @@ -7,7 +7,7 @@ s.version = Setler::VERSION s.authors = ["Chris Kelly"] s.email = ["ckdake@ckdake.com"] - s.homepage = "" + s.homepage = "https://github.com/ckdake/setler" ...
Add homepage link to gemspec
diff --git a/web/plugins/pagetoc.rb b/web/plugins/pagetoc.rb index abc1234..def5678 100644 --- a/web/plugins/pagetoc.rb +++ b/web/plugins/pagetoc.rb @@ -0,0 +1,39 @@+# Copyright 2015 Google Inc. All rights reserved. +# +# Use of this source code is governed by The MIT License. +# See the LICENSE file for details. + +# ...
Web: Create Jekyll plugin to generate in-page TOC data Progress on #344
diff --git a/spec/views/images/show.html.erb_spec.rb b/spec/views/images/show.html.erb_spec.rb index abc1234..def5678 100644 --- a/spec/views/images/show.html.erb_spec.rb +++ b/spec/views/images/show.html.erb_spec.rb @@ -12,8 +12,13 @@ it 'shows the user that uploaded this image' do uploader = create(:user) + ...
Test if page has a link back to uploader
diff --git a/app/models/activity.rb b/app/models/activity.rb index abc1234..def5678 100644 --- a/app/models/activity.rb +++ b/app/models/activity.rb @@ -1,4 +1,6 @@ class Activity < ApplicationRecord + HIGH_PRIORITY_ACTIVITY_CLASS_NAMES = %w(DropActivity).freeze + belongs_to :appointment belongs_to :user belo...
Add way to classify activities as high priority
diff --git a/app/models/incident.rb b/app/models/incident.rb index abc1234..def5678 100644 --- a/app/models/incident.rb +++ b/app/models/incident.rb @@ -5,5 +5,8 @@ # https://github.com/collectiveidea/audited # audited - attr_accessible :body, :name + attr_accessible :body, :name, :monitoring_id + + # Validat...
Add validators on Incident Model
diff --git a/lib/apivore/rspec_matchers.rb b/lib/apivore/rspec_matchers.rb index abc1234..def5678 100644 --- a/lib/apivore/rspec_matchers.rb +++ b/lib/apivore/rspec_matchers.rb @@ -37,7 +37,7 @@ matcher :conform_to_the_documented_model_for do |swagger, fragment| match do |body| body = JSON.parse(bod...
Disable strict mode of JSON::Validator Strict mode treats all properties as required, and ignores the `required` attribute specified in the schema. This behaviour makes it impossible to have optional fields in the schema. Using the `required` property in the schema allows you to specify which other properties are req...
diff --git a/warden-rails.gemspec b/warden-rails.gemspec index abc1234..def5678 100644 --- a/warden-rails.gemspec +++ b/warden-rails.gemspec @@ -6,12 +6,12 @@ s.version = Warden::Rails::VERSION s.authors = ["Adrià Planas"] s.email = ["adriaplanas@liquidcodeworks.com"] - s.summary = "Thin wrap...
Replace rails dependency with railties >= 3.2
diff --git a/lib/cangaroo/logger_helper.rb b/lib/cangaroo/logger_helper.rb index abc1234..def5678 100644 --- a/lib/cangaroo/logger_helper.rb +++ b/lib/cangaroo/logger_helper.rb @@ -0,0 +1,13 @@+require 'active_support/concern' + +module Cangaroo + module LoggerHelper + extend ActiveSupport::Concern + + def job_t...
Add a logger helper module for jobs
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index abc1234..def5678 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,3 +1,17 @@ class ApplicationController < ActionController::Base protect_from_forgery w...
Add methods to APplication Controller
diff --git a/app/helpers/rails/add_ons/table_helper.rb b/app/helpers/rails/add_ons/table_helper.rb index abc1234..def5678 100644 --- a/app/helpers/rails/add_ons/table_helper.rb +++ b/app/helpers/rails/add_ons/table_helper.rb @@ -25,7 +25,7 @@ end @view_context = view_context - @column_na...
Add column_name options to sort in the collection table helper.
diff --git a/Casks/synology-cloud-station.rb b/Casks/synology-cloud-station.rb index abc1234..def5678 100644 --- a/Casks/synology-cloud-station.rb +++ b/Casks/synology-cloud-station.rb @@ -1,6 +1,6 @@ cask :v1 => 'synology-cloud-station' do - version '3317' - sha256 'd3305b5f2b4d47cf84e18cdbdb86a58578bff396fbe4664c4c...
Update Synology Cloud Client to version 3423
diff --git a/arbitrary_mock.gemspec b/arbitrary_mock.gemspec index abc1234..def5678 100644 --- a/arbitrary_mock.gemspec +++ b/arbitrary_mock.gemspec @@ -9,7 +9,7 @@ s.version = ArbitraryMock::VERSION s.authors = ["Robert White"] s.email = ["robert@terracoding.com"] - s.homepage = "TODO" + s.h...
Add GitHub homepage to gemspec
diff --git a/spec/github_spec.rb b/spec/github_spec.rb index abc1234..def5678 100644 --- a/spec/github_spec.rb +++ b/spec/github_spec.rb @@ -1,5 +1,93 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Github do - pending + + it "should respond to 'new' message" do + Github.should res...
Add spec for main github client.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index abc1234..def5678 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,3 @@-require 'linkedin2' - require 'rspec' require 'vcr' require 'pry' @@ -8,7 +6,10 @@ SimpleCov.start do add_group 'API', 'lib/linkedin/api' + add_filter 'spec' ...
Fix simplecov to cover the gem code, not the spec code
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index abc1234..def5678 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,6 +5,9 @@ require 'cashier' require 'redis' require 'dalli' + +require 'pry' +require 'pry-nav' Combustion.initialize! :all @@ -21,4 +24,6 @@ Cashier::Adapters::Redis...
Enable Rails perform_caching to fix upstream spec.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index abc1234..def5678 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,8 +1,8 @@-require 'codeclimate-test-reporter' -CodeClimate::TestReporter.start +require "simplecov" +SimpleCov.start -$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__...
Update simplecov with post 1.0 config
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index abc1234..def5678 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -35,6 +35,10 @@ def with_headers(headers) proc { [200, {'Content-Type' => 'text/plain' }.merge(headers), ['ok']] } end + + def with_status(status=nil) + proc { [statu...
Add helper for status setting.
diff --git a/spec/test_helper.rb b/spec/test_helper.rb index abc1234..def5678 100644 --- a/spec/test_helper.rb +++ b/spec/test_helper.rb @@ -7,13 +7,13 @@ original_stderr = $stderr original_stdout = $stdout - config.before(:all, silent_cli: true) do + config.before silent_cli: true do # Redirect stderr an...
FIX remove :all options for specs silent CLI config
diff --git a/spec/tiddle_spec.rb b/spec/tiddle_spec.rb index abc1234..def5678 100644 --- a/spec/tiddle_spec.rb +++ b/spec/tiddle_spec.rb @@ -1,10 +1,10 @@ describe Tiddle do + before do + @user = User.create!(email: "test@example.com", password: "12345678") + end + describe "create_and_return_token" do - - ...
Write spec for expire_token method
diff --git a/find_veterans.rb b/find_veterans.rb index abc1234..def5678 100644 --- a/find_veterans.rb +++ b/find_veterans.rb @@ -0,0 +1,38 @@+require 'httparty' + +class FindVeterans + include HTTParty + base_uri 'https://api.github.com' + + # Find the first 10 users on GitHub whose location starts with "New York" +...
Add FindVeterans class and GitHub API call methods
diff --git a/foreplay.gemspec b/foreplay.gemspec index abc1234..def5678 100644 --- a/foreplay.gemspec +++ b/foreplay.gemspec @@ -19,5 +19,5 @@ s.add_runtime_dependency 'foreman', '>= 0.76', '< 1.0' s.add_runtime_dependency 'ssh-shell', '>= 0.4', '< 1.0' - s.add_runtime_dependency 'activesupport', '>= 3.2.22', '...
Allow Ruby 2.2.2+ to use ActiveSupport 5+
diff --git a/schema.gemspec b/schema.gemspec index abc1234..def5678 100644 --- a/schema.gemspec +++ b/schema.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'evt-schema' s.summary = "Primitives for schema and data structure" - s.version = '0.7.1.2' + s.version = '0.7.1.3' s.description = ' ' ...
Package version is increased from 0.7.1.2 to 0.7.1.3
diff --git a/app/helpers/georgia/meta_tags_helper.rb b/app/helpers/georgia/meta_tags_helper.rb index abc1234..def5678 100644 --- a/app/helpers/georgia/meta_tags_helper.rb +++ b/app/helpers/georgia/meta_tags_helper.rb @@ -3,7 +3,7 @@ def meta_title title site_title = "" - site_title << "#{title} | " if...
Fix | in title when no title
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index abc1234..def5678 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -5,7 +5,7 @@ @appointment = Appointment.new @appointments_by_date = Appointment.upcomin...
Modify dashboard index to show only curent users contacts
diff --git a/app/controllers/resources_controller.rb b/app/controllers/resources_controller.rb index abc1234..def5678 100644 --- a/app/controllers/resources_controller.rb +++ b/app/controllers/resources_controller.rb @@ -28,7 +28,6 @@ flash[:alert] = "You are not allowed to edit this resource!" redirect_to...
Remove user variable from edit actions fo resources.
diff --git a/app/controllers/waypoints_controller.rb b/app/controllers/waypoints_controller.rb index abc1234..def5678 100644 --- a/app/controllers/waypoints_controller.rb +++ b/app/controllers/waypoints_controller.rb @@ -45,6 +45,6 @@ end def waypoint_params - params.require(:waypoint).permit(:name, :position...
Allow description in waypoint parameters
diff --git a/app/helpers/multi_year_charts_helper.rb b/app/helpers/multi_year_charts_helper.rb index abc1234..def5678 100644 --- a/app/helpers/multi_year_charts_helper.rb +++ b/app/helpers/multi_year_charts_helper.rb @@ -5,8 +5,9 @@ # # Returns a string. def myc_url(multi_year_chart) - "#{Settings.multi_year...
Send MYC session header to the application
diff --git a/lib/latent_object_detector.rb b/lib/latent_object_detector.rb index abc1234..def5678 100644 --- a/lib/latent_object_detector.rb +++ b/lib/latent_object_detector.rb @@ -13,18 +13,48 @@ end def suspicious_methods - explicit_instance_methods.select{|m| (words_in_method(m.to_s) & potential_obje...
Simplify methods by decomposing them, and use really explicit method names
diff --git a/app/presenters/publication_presenter.rb b/app/presenters/publication_presenter.rb index abc1234..def5678 100644 --- a/app/presenters/publication_presenter.rb +++ b/app/presenters/publication_presenter.rb @@ -17,7 +17,7 @@ :body, :introduction, :expectations, :video_url, :alternative_title, :overvi...
Fix place editions - displaying the results The JS which filled in the results was getting an error page instead of JSON, so would error.
diff --git a/flair.gemspec b/flair.gemspec index abc1234..def5678 100644 --- a/flair.gemspec +++ b/flair.gemspec @@ -13,7 +13,7 @@ s.summary = "TODO: Summary of Flair." s.description = "TODO: Description of Flair." - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] + s...
Update gemspec to use README.md not README.rdoc
diff --git a/lib/specjour/socket_helper.rb b/lib/specjour/socket_helper.rb index abc1234..def5678 100644 --- a/lib/specjour/socket_helper.rb +++ b/lib/specjour/socket_helper.rb @@ -1,5 +1,7 @@ module Specjour module SocketHelper + Socket.do_not_reverse_lookup = true + def ip_from_hostname(hostname) So...
Disable reverse lookup, speed up linux; DUH!
diff --git a/libraries/port_reservation.rb b/libraries/port_reservation.rb index abc1234..def5678 100644 --- a/libraries/port_reservation.rb +++ b/libraries/port_reservation.rb @@ -1,9 +1,13 @@ module PortReservation extend Chef::DSL::DataQuery + class MissingReservation < StandardError; end + class << self ...
Raise if no reservation is configured in data bag
diff --git a/govuk_message_queue_consumer.gemspec b/govuk_message_queue_consumer.gemspec index abc1234..def5678 100644 --- a/govuk_message_queue_consumer.gemspec +++ b/govuk_message_queue_consumer.gemspec @@ -19,7 +19,7 @@ s.add_dependency 'bunny', '~> 2.11' s.add_development_dependency 'rspec', '~> 3.8.0' - s....
Update rake requirement from ~> 12.3.2 to ~> 13.0.0 Updates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version. - [Release notes](https://github.com/ruby/rake/releases) - [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc) - [Commits](https://github.com/ruby/rake/compa...
diff --git a/spec/app_manager/api/version11_spec.rb b/spec/app_manager/api/version11_spec.rb index abc1234..def5678 100644 --- a/spec/app_manager/api/version11_spec.rb +++ b/spec/app_manager/api/version11_spec.rb @@ -0,0 +1,10 @@+require 'spec_helper' + +describe ManageEngine::AppManager::Api::Version11 do + subject {...
Add Spec for Version11 Api Add a spec to test the Version11 Api.
diff --git a/spec/integration/multi_adapter_spec.rb b/spec/integration/multi_adapter_spec.rb index abc1234..def5678 100644 --- a/spec/integration/multi_adapter_spec.rb +++ b/spec/integration/multi_adapter_spec.rb @@ -0,0 +1,49 @@+RSpec.describe 'Repository with multi-adapters setup' do + include_context 'database' + +...
Add a spec for multi-adapter repo :boom: :tada: :boom:
diff --git a/specs/spec_helper.rb b/specs/spec_helper.rb index abc1234..def5678 100644 --- a/specs/spec_helper.rb +++ b/specs/spec_helper.rb @@ -6,5 +6,25 @@ require "timecop" require "mocha/mini_test" require "webmock/minitest" +require 'stringio' alias :context :describe + +class FakeLogger + def initialize + ...
Add FakeLogger to specs helper
diff --git a/spec/dummy/app/controllers/people_controller.rb b/spec/dummy/app/controllers/people_controller.rb index abc1234..def5678 100644 --- a/spec/dummy/app/controllers/people_controller.rb +++ b/spec/dummy/app/controllers/people_controller.rb @@ -1,4 +1,4 @@-class PeopleController < AuthorizedController +class Pe...
Use HasAccountsController for People dummy spec controller.
diff --git a/spec/application_spec.rb b/spec/application_spec.rb index abc1234..def5678 100644 --- a/spec/application_spec.rb +++ b/spec/application_spec.rb @@ -1,12 +1,12 @@ require 'hyperloop' describe Hyperloop::Application do - before :all do + before :each do @root = 'spec/fixtures/simple/' + @app = ...
Move app spec setup from before :all to :each
diff --git a/layer-custom/recipes/esmonit.rb b/layer-custom/recipes/esmonit.rb index abc1234..def5678 100644 --- a/layer-custom/recipes/esmonit.rb +++ b/layer-custom/recipes/esmonit.rb @@ -1,6 +1,6 @@-template "/etc/monit.d/elasticsearch-monit.conf" do +template "/etc/monit/monitrc.d/elasticsearch-monit.conf" do sou...
Use the updated monit conf directory
diff --git a/calculators/bsa/bsa.rb b/calculators/bsa/bsa.rb index abc1234..def5678 100644 --- a/calculators/bsa/bsa.rb +++ b/calculators/bsa/bsa.rb @@ -5,8 +5,8 @@ weight = get_field_as_float :weight_in_kg height = get_field_as_float :height_in_m - raise FieldError.new('weight', 'weight must be greater than ze...
Remove redundant field name from error
diff --git a/lib/countries.rb b/lib/countries.rb index abc1234..def5678 100644 --- a/lib/countries.rb +++ b/lib/countries.rb @@ -5,6 +5,7 @@ class Country < ISO3166::Country def to_s + warn "[DEPRECATION] `Country` is deprecated. Please use `ISO3166::Country` instead." name end end
Add deprecation warning on country object.
diff --git a/lib/encryptor.rb b/lib/encryptor.rb index abc1234..def5678 100644 --- a/lib/encryptor.rb +++ b/lib/encryptor.rb @@ -14,6 +14,7 @@ begin return e.decrypt_and_verify(value) rescue Zlib::DataError + STATSD_CLIENT.increment('pvb.app.legacy_encryptor') next end ...
Add a tracker for legacy encryption scheme.
diff --git a/Casks/daisydisk-beta.rb b/Casks/daisydisk-beta.rb index abc1234..def5678 100644 --- a/Casks/daisydisk-beta.rb +++ b/Casks/daisydisk-beta.rb @@ -0,0 +1,24 @@+cask :v1 => 'daisydisk-beta' do + version :latest + sha256 :no_check + + url 'http://daisydiskapp.com/downloads/DaisyDiskBeta.zip' + appcast 'http...
Add cask for Daisydisk Beta Closes #946.
diff --git a/Casks/pckeyboardhack.rb b/Casks/pckeyboardhack.rb index abc1234..def5678 100644 --- a/Casks/pckeyboardhack.rb +++ b/Casks/pckeyboardhack.rb @@ -1,7 +1,7 @@ class Pckeyboardhack < Cask - url 'https://pqrs.org/macosx/keyremap4macbook/files/PCKeyboardHack-10.0.0.dmg' + url 'https://pqrs.org/macosx/keyremap4...
Update PCKeyboardHack to version 10.2.0
diff --git a/lib/content_manager/class_resolution.rb b/lib/content_manager/class_resolution.rb index abc1234..def5678 100644 --- a/lib/content_manager/class_resolution.rb +++ b/lib/content_manager/class_resolution.rb @@ -11,7 +11,7 @@ if Object.const_defined?(klass) return klass elsif file_path = ...
Use require relative not require