diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/all_seeing_pi/camera.rb b/lib/all_seeing_pi/camera.rb index abc1234..def5678 100644 --- a/lib/all_seeing_pi/camera.rb +++ b/lib/all_seeing_pi/camera.rb @@ -1,7 +1,13 @@ module AllSeeingPi class Camera + attr_reader :script + + def initialize + @script = File.expand_path('../../../capture....
Use relative path for capture script.
diff --git a/spec/factories/staff_members.rb b/spec/factories/staff_members.rb index abc1234..def5678 100644 --- a/spec/factories/staff_members.rb +++ b/spec/factories/staff_members.rb @@ -1,6 +1,14 @@ FactoryGirl.define do factory :staff_member do - + sequence(:email){ |n| "member#{n}@example.com" } + f...
Add staff members in factroy
diff --git a/lib/c2y/dsl/context/unit.rb b/lib/c2y/dsl/context/unit.rb index abc1234..def5678 100644 --- a/lib/c2y/dsl/context/unit.rb +++ b/lib/c2y/dsl/context/unit.rb @@ -10,18 +10,12 @@ instance_eval(&block) end - private + [:command, :content, :enable].each do |attr| + define_method(attr) do...
Use dynamic method definition in Unit
diff --git a/spec/ruboty/dmm/ranking_spec.rb b/spec/ruboty/dmm/ranking_spec.rb index abc1234..def5678 100644 --- a/spec/ruboty/dmm/ranking_spec.rb +++ b/spec/ruboty/dmm/ranking_spec.rb @@ -0,0 +1,21 @@+describe Ruboty::DMM::Ranking do + let(:instance) { described_class.new(command).call } + + describe '#call' do + ...
Add a spec for Ranking klass
diff --git a/spec/support/database_access.rb b/spec/support/database_access.rb index abc1234..def5678 100644 --- a/spec/support/database_access.rb +++ b/spec/support/database_access.rb @@ -32,8 +32,8 @@ ## # Resets member and admin lists for the test database to []. def clear_security - set_security({ 'users...
PUT /_security messup: the key is "names", not "users".
diff --git a/CargoBay.podspec b/CargoBay.podspec index abc1234..def5678 100644 --- a/CargoBay.podspec +++ b/CargoBay.podspec @@ -9,7 +9,6 @@ s.source_files = 'CargoBay' s.requires_arc = true - s.ios.deployment_target = '5.0' s.osx.deployment_target = '10.7' s.frameworks = 'StoreKit'
Remove min iOS deployment target
diff --git a/Casks/makemkv.rb b/Casks/makemkv.rb index abc1234..def5678 100644 --- a/Casks/makemkv.rb +++ b/Casks/makemkv.rb @@ -1,8 +1,8 @@ class Makemkv < Cask - version '1.8.11' - sha256 '6551e167079d49c4bc414ce9494afae2857338ea5fbcd2ed63d705d2313b48a6' + version '1.8.12' + sha256 '06a7868764871cbf9b1db90def501b...
Update MakeMKV to version 1.8.12
diff --git a/lib/swarker/paths_merger.rb b/lib/swarker/paths_merger.rb index abc1234..def5678 100644 --- a/lib/swarker/paths_merger.rb +++ b/lib/swarker/paths_merger.rb @@ -10,7 +10,7 @@ private def merge(original_paths) - groups = {} + groups = HashWithIndifferentAccess.new original_paths...
Refactor PathsMerger to store schema in HashWithIndifferentAccess
diff --git a/lib/wego/middleware/http.rb b/lib/wego/middleware/http.rb index abc1234..def5678 100644 --- a/lib/wego/middleware/http.rb +++ b/lib/wego/middleware/http.rb @@ -19,7 +19,7 @@ if env[:status].to_s =~ /2\d\d/ env[:body] = Hashie::Rash.new(MultiJson.decode(env[:body])) if e ...
Add environment output to Wego 2xx errors
diff --git a/app/controllers/api/json/geocodings_controller.rb b/app/controllers/api/json/geocodings_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/json/geocodings_controller.rb +++ b/app/controllers/api/json/geocodings_controller.rb @@ -22,13 +22,15 @@ end def create + table = current_...
Remove automatic geocodings when creating new geocoding
diff --git a/app/controllers/pages_core/frontend_controller.rb b/app/controllers/pages_core/frontend_controller.rb index abc1234..def5678 100644 --- a/app/controllers/pages_core/frontend_controller.rb +++ b/app/controllers/pages_core/frontend_controller.rb @@ -4,6 +4,8 @@ class PagesCore::FrontendController < Applicati...
Set I81n locale in FrontendController from params[:language]
diff --git a/YumiStartAppSDK/3.4.1/YumiStartAppSDK.podspec b/YumiStartAppSDK/3.4.1/YumiStartAppSDK.podspec index abc1234..def5678 100644 --- a/YumiStartAppSDK/3.4.1/YumiStartAppSDK.podspec +++ b/YumiStartAppSDK/3.4.1/YumiStartAppSDK.podspec @@ -20,7 +20,7 @@ s.ios.deployment_target = "7.0" - s.source = { :http =...
Update startapp sdk source to use cdn
diff --git a/app/controllers/concerns/exception_handler.rb b/app/controllers/concerns/exception_handler.rb index abc1234..def5678 100644 --- a/app/controllers/concerns/exception_handler.rb +++ b/app/controllers/concerns/exception_handler.rb @@ -11,8 +11,11 @@ end def auth_error(exception) - session[:ret...
Add ajax_request verification to Pundit gem exception handler Verification to ajax requests to avoid the update of session[:return_to] on these cases.
diff --git a/app/serializers/invitables/base_serializer.rb b/app/serializers/invitables/base_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/invitables/base_serializer.rb +++ b/app/serializers/invitables/base_serializer.rb @@ -11,20 +11,10 @@ def subtitle raise NotImplementedError.new - ca...
Remove unneeded cruft from base invitable serializer
diff --git a/spec/features/demo_roster_spec.rb b/spec/features/demo_roster_spec.rb index abc1234..def5678 100644 --- a/spec/features/demo_roster_spec.rb +++ b/spec/features/demo_roster_spec.rb @@ -14,9 +14,9 @@ it "can see risk categories" do visit root_url click_link "Roster Demo" - expect(page)...
Update expectations for demo page feature spec Expecting to see risk categories isn't a good idea because sometimes those categories are empty... ...so let's expect to see fixed column categories instead.
diff --git a/spec/github/paged_request_spec.rb b/spec/github/paged_request_spec.rb index abc1234..def5678 100644 --- a/spec/github/paged_request_spec.rb +++ b/spec/github/paged_request_spec.rb @@ -15,15 +15,15 @@ it 'sets default per_page when only custom page passed' do Github.stub_chain(:api_client, :per_p...
Update specs to account for fix.
diff --git a/spec/odata/query/criteria_spec.rb b/spec/odata/query/criteria_spec.rb index abc1234..def5678 100644 --- a/spec/odata/query/criteria_spec.rb +++ b/spec/odata/query/criteria_spec.rb @@ -0,0 +1,12 @@+require 'spec_helper' + +describe OData::Query::Criteria do + let(:subject) { OData::Query::Criteria.new(prop...
Set up initial specs around OData::Query::Criteria.
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index abc1234..def5678 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -21,16 +21,20 @@ def destroy @comment = Comment.find(params[:id]) - @comment.destroy - ...
Fix update and delete operations Fix update operation Fix delete operation
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index abc1234..def5678 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -2,7 +2,7 @@ def index @projects = Project.by_last_updated.paginate(page: params[:page], per_page...
Use SQL for ordering entries
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 @@ -21,5 +21,6 @@ end get '/logout' do + session.clear redirect '/' end
Update logout route to clear session
diff --git a/robut_whois.gemspec b/robut_whois.gemspec index abc1234..def5678 100644 --- a/robut_whois.gemspec +++ b/robut_whois.gemspec @@ -10,8 +10,8 @@ gem.add_dependency "robut", "~> 0.3" gem.add_dependency "whois", "~> 2.1.0" - gem.add_development_dependency "rspec" gem.add_development_dependency "rsp...
Add rake to the development dependancies, for travis-ci.org
diff --git a/roles/teraswitch.rb b/roles/teraswitch.rb index abc1234..def5678 100644 --- a/roles/teraswitch.rb +++ b/roles/teraswitch.rb @@ -2,6 +2,11 @@ description "Role applied to all servers at TeraSwitch Networks" default_attributes( + :accounts => { + :users => { + :sysadmin => { :status => :administr...
Add remote hands account for TeraSwitch
diff --git a/tty-cursor.gemspec b/tty-cursor.gemspec index abc1234..def5678 100644 --- a/tty-cursor.gemspec +++ b/tty-cursor.gemspec @@ -19,6 +19,8 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] + spec.required_ruby_version = '>= 2.0.0' + spec.add_development...
Change to restrict to Ruby 2.0
diff --git a/lib/pureftpd_user_patch.rb b/lib/pureftpd_user_patch.rb index abc1234..def5678 100644 --- a/lib/pureftpd_user_patch.rb +++ b/lib/pureftpd_user_patch.rb @@ -0,0 +1,19 @@+module Plugin + module Pureftpd + module User + def self.included(base) + base.send(:include, InstanceMethods) + ba...
Patch the redmine User model to add another before_save hook.
diff --git a/SSPPullToRefresh/SSPPullToRefresh.podspec b/SSPPullToRefresh/SSPPullToRefresh.podspec index abc1234..def5678 100644 --- a/SSPPullToRefresh/SSPPullToRefresh.podspec +++ b/SSPPullToRefresh/SSPPullToRefresh.podspec @@ -0,0 +1,18 @@+Pod::Spec.new do |s| + s.name = 'SSPPullToRefresh' + s.version ...
Update pod spec to 0.1.9
diff --git a/lib/wptemplates/regexes.rb b/lib/wptemplates/regexes.rb index abc1234..def5678 100644 --- a/lib/wptemplates/regexes.rb +++ b/lib/wptemplates/regexes.rb @@ -15,7 +15,7 @@ end def an_equals_no_doubleclosebrace_or_pipe - /\|(([^|=}]|}(?!}))+)=/ + /\|(([^|=}]|}(?!}))*)=/ end ...
Make Wptemplates::Regexes.an_equals_no_doubleclosebrace_or_pipe accept empty param names
diff --git a/lib/facebook/messenger/server.rb b/lib/facebook/messenger/server.rb index abc1234..def5678 100644 --- a/lib/facebook/messenger/server.rb +++ b/lib/facebook/messenger/server.rb @@ -6,48 +6,46 @@ # This module holds the server that processes incoming messages from the # Facebook Messenger Platform. ...
Use instance variables for request/response data. I think this would be more friendly for threaded servers. I don't think request/response data should be shared.
diff --git a/lib/gov_kit/transparency_data.rb b/lib/gov_kit/transparency_data.rb index abc1234..def5678 100644 --- a/lib/gov_kit/transparency_data.rb +++ b/lib/gov_kit/transparency_data.rb @@ -13,6 +13,13 @@ parse(response) end end + + class Entity < TransparencyDataResource + def self.find_...
Add transparencydata contribution aggregates entity support
diff --git a/lib/protobuf/field/enum_field.rb b/lib/protobuf/field/enum_field.rb index abc1234..def5678 100644 --- a/lib/protobuf/field/enum_field.rb +++ b/lib/protobuf/field/enum_field.rb @@ -53,7 +53,7 @@ if default.is_a?(Symbol) type_class.const_get(default) else - type_class.enu...
Use type_class.fetch to get a default value if it exists
diff --git a/lib/serverkit/resources/goget.rb b/lib/serverkit/resources/goget.rb index abc1234..def5678 100644 --- a/lib/serverkit/resources/goget.rb +++ b/lib/serverkit/resources/goget.rb @@ -12,7 +12,10 @@ # @note Override def check - Dir.exists?("#{ENV['GOPATH']}/src/#{url}") + go_packag...
Use SpecInfra command to check directory exists
diff --git a/week-6/die-2/my_solution.rb b/week-6/die-2/my_solution.rb index abc1234..def5678 100644 --- a/week-6/die-2/my_solution.rb +++ b/week-6/die-2/my_solution.rb @@ -1,38 +1,94 @@ # Die Class 2: Arbitrary Symbols -# I worked on this challenge [by myself, with: ]. +# I worked on this challenge [by myself]. #...
Add solution file for 6.2
diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index abc1234..def5678 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -9,10 +9,10 @@ Rails.application.config.action_controller.raise_on_unfiltere...
Improve CSRF strength through new defaults This seems like it won't increase our current false flags, because forms that previously would have been valid should still be valid after this.
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -34,4 +34,20 @@ username: "mochi", email: "mochi@gmail.com", password: "1234" +}) + +Item.create({ + name: "Hiking Shoes", + description: "Going out on a hike? Take these! Waterproof, sturdy, AND comf...
Update seed file so that a few categories are created off the bat
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -12,13 +12,13 @@ puts 1 puts 2 puts 3 -cases: -- input: "5\\n1" - expected_output: 25 -- input: "5\\n1" - expected_output: 16 features: step instructions console END +#cases: +#- input: "5\\n1" +# ex...
Remove test cases for deployed version.
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -4,8 +4,9 @@ gds_organisation_id = "af07d5a5-df63-4ddc-9383-6a666845ebe9" User.create!( name: "Test user", - permissions: ["signin", "GDS Admin"], + permissions: ["signin", "GDS Admin", "GDS Edito...
Add more permissions to the seed user As part of writing E2E tests for Whitehall we want the user to have access to all permissions options, and to have an organisation to edit.
diff --git a/DAAppsViewController.podspec b/DAAppsViewController.podspec index abc1234..def5678 100644 --- a/DAAppsViewController.podspec +++ b/DAAppsViewController.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DAAppsViewController' - s.version = '1.1.0' + s.version = '1.2.0' s.platform = :ios ...
Update podspec version to 1.2.0
diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index abc1234..def5678 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -37,7 +37,7 @@ 0 end - @limit = 10 + @limit = 25 ...
Increase commit log amount for tree view from 10 to 25 Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb index abc1234..def5678 100644 --- a/app/helpers/gitlab_routing_helper.rb +++ b/app/helpers/gitlab_routing_helper.rb @@ -1,4 +1,17 @@ # Shorter routing method for project and project items +# Since update to rails 4.1.9 we are now a...
Add explanation to routing method
diff --git a/Formula/instantclient-sqlplus.rb b/Formula/instantclient-sqlplus.rb index abc1234..def5678 100644 --- a/Formula/instantclient-sqlplus.rb +++ b/Formula/instantclient-sqlplus.rb @@ -17,5 +17,8 @@ end lib.install Dir["*.dylib"] bin.install ["sqlplus"] + if MacOS.version == :catalina + bi...
Work around the Catalina issues with sqlplus
diff --git a/init.rb b/init.rb index abc1234..def5678 100644 --- a/init.rb +++ b/init.rb @@ -1,4 +1,4 @@-if RAILS_ENV == "test" +if RAILS_ENV.index("test") require 'active_support/test_case'
Check for any environment that contains 'test'.
diff --git a/app/resources/pragma/devise/token/operation/create.rb b/app/resources/pragma/devise/token/operation/create.rb index abc1234..def5678 100644 --- a/app/resources/pragma/devise/token/operation/create.rb +++ b/app/resources/pragma/devise/token/operation/create.rb @@ -15,9 +15,9 @@ def call ...
Save user and token in context on token creation
diff --git a/test/unit/raml_poliglota_test.rb b/test/unit/raml_poliglota_test.rb index abc1234..def5678 100644 --- a/test/unit/raml_poliglota_test.rb +++ b/test/unit/raml_poliglota_test.rb @@ -0,0 +1,21 @@+require 'test/unit' +require File.expand_path '../../../lib/raml_poliglota.rb', __FILE__ +require File.expand_path...
Create unit test to main class.
diff --git a/lib/jsonapi/active_record_operations_processor.rb b/lib/jsonapi/active_record_operations_processor.rb index abc1234..def5678 100644 --- a/lib/jsonapi/active_record_operations_processor.rb +++ b/lib/jsonapi/active_record_operations_processor.rb @@ -18,7 +18,7 @@ # Catch errors that should be handled befor...
Check method defined in rescue block, add fallback
diff --git a/lib/vagrant-proxyconf/cap/linux/npm_proxy_conf.rb b/lib/vagrant-proxyconf/cap/linux/npm_proxy_conf.rb index abc1234..def5678 100644 --- a/lib/vagrant-proxyconf/cap/linux/npm_proxy_conf.rb +++ b/lib/vagrant-proxyconf/cap/linux/npm_proxy_conf.rb @@ -6,7 +6,7 @@ module NpmProxyConf # @retur...
Test for npm availability in sudo context npm proxy provider runs @machine.communicate.sudo(command). cap provider verifies availability of npm with `which' NOT using sudo. This may result in: - which succeeds for the ssh user (mostly vagrant) - machine.communicate.sudo('npm do something') does not succeed because...
diff --git a/app/workers/personal_access_tokens/expiring_worker.rb b/app/workers/personal_access_tokens/expiring_worker.rb index abc1234..def5678 100644 --- a/app/workers/personal_access_tokens/expiring_worker.rb +++ b/app/workers/personal_access_tokens/expiring_worker.rb @@ -3,7 +3,7 @@ module PersonalAccessTokens ...
Add latest changes from gitlab-org/gitlab@master
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 @@ -4,14 +4,14 @@ protect_from_forgery with: :exception rescue_from CanCan::AccessDeni...
Fix Coding Style For find_action_item_type_in_item
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 @@ -2,4 +2,10 @@ # Prevent CSRF attacks by raising an exception. # For APIs, you may want ...
Add current_user helper method for quick session grab
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,7 +1,6 @@ class ApplicationController < ActionController::Base - # Prevent CSRF attacks ...
Stop forgery protection from raising exceptions in API calls. API calls don't have the CSRF tokens but are legit so allow them to happen in a null session. They are authenticated every time, so they don't need a real session.
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 @@ -18,7 +18,7 @@ def check_local_only return true if Rails.env == "test" - if ...
Check for local ipv6 address.
diff --git a/app/presenters/calculator_content_item.rb b/app/presenters/calculator_content_item.rb index abc1234..def5678 100644 --- a/app/presenters/calculator_content_item.rb +++ b/app/presenters/calculator_content_item.rb @@ -23,7 +23,7 @@ title: calculator.title, base_path: base_path, schema_nam...
Rename document type to “calculator” We want to start using `document_type` in place of the deprecated `format` as the value of the `govuk:format` meta tag when using `govuk_components` (https://github.com/alphagov/static/pull/841). In order to not change the current contents of the meta tag for calculators, this com...
diff --git a/app/serializers/environment_serializer.rb b/app/serializers/environment_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/environment_serializer.rb +++ b/app/serializers/environment_serializer.rb @@ -1,3 +1,42 @@ class EnvironmentSerializer < BaseSerializer + Struct.new('Item', :name, :siz...
Use serializer to group environments into folders
diff --git a/app/services/email_alerts_unsubscriber.rb b/app/services/email_alerts_unsubscriber.rb index abc1234..def5678 100644 --- a/app/services/email_alerts_unsubscriber.rb +++ b/app/services/email_alerts_unsubscriber.rb @@ -26,7 +26,7 @@ args.merge!({ govuk_request_id: }) if govuk_request_id end - ...
Fix converting hash to keyword arguments
diff --git a/lib/formalist/elements/standard/text_field.rb b/lib/formalist/elements/standard/text_field.rb index abc1234..def5678 100644 --- a/lib/formalist/elements/standard/text_field.rb +++ b/lib/formalist/elements/standard/text_field.rb @@ -7,6 +7,7 @@ class TextField < Field attribute :password, Types::...
Add disabled as an attribute to TextField fields
diff --git a/db/migrate/20201219120055_add_order_to_adjustments.rb b/db/migrate/20201219120055_add_order_to_adjustments.rb index abc1234..def5678 100644 --- a/db/migrate/20201219120055_add_order_to_adjustments.rb +++ b/db/migrate/20201219120055_add_order_to_adjustments.rb @@ -1,13 +1,14 @@ class AddOrderToAdjustments <...
Move class definitions in adjustment migration
diff --git a/omniauth-vkontakte.gemspec b/omniauth-vkontakte.gemspec index abc1234..def5678 100644 --- a/omniauth-vkontakte.gemspec +++ b/omniauth-vkontakte.gemspec @@ -17,5 +17,5 @@ gem.version = OmniAuth::Vkontakte::VERSION gem.required_ruby_version = '>= 2.6.0' - gem.add_runtime_dependency 'omniauth-oa...
Update omniauth-oauth2 to version 1.7.1
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,4 +1,5 @@ require "bundler/setup" +require "pry" unless ENV["CI"] && !ENV["CI"].empty? begin require "coveralls"
Make Pry available in tests when run locally
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 @@ -7,7 +7,7 @@ def runner(attributes = {}, environment = 'test') # A workaround so that ChefSpec can work with Chef environments (from https://github.com/acrmp/chefspec/issues/5...
Replace deprecated ChefSpec::ChefRunner with ChefSpec::Runner
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,3 +5,4 @@ Dir.glob("spec/lib/**/*_steps.rb") { |f| load f, true } $LOAD_PATH << File.expand_path('../../lib', __FILE__) # the gem's lib dir +$LOAD_PATH << File.expand_path('....
Add lib/portability to search path
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 @@ -10,6 +10,7 @@ Pathname.glob((SPEC_ROOT + 'integration/shared/**/*.rb').to_s).each { |file| require file } DataMapper::Spec.setup +DataMapper.finalize Spec::Runner.configure ...
Call DataMapper.finalize after model definition
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 @@ -7,4 +7,7 @@ config.run_all_when_everything_filtered = true config.order = 'random' config.include Griddler::Testing + config.expect_with(:rspec) do |c| + c.syntax = [:...
Enable both `should` and `expect` in RSpec griddler-sendgrid uses `should` everywhere, but the shared expectation from Griddler uses `expect`. To prevent warnings in newer versions of RSpec, enable both syntaxes.
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 @@ -20,14 +20,6 @@ # config.mock_with :rr config.mock_with :rspec - # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = "#{::...
Fix tests by removing unused ActiveRecord fixture config settings. This got broken in fcbc5c7279be7b03ec7c994a9061a5f98eaf5d2d since we're no longer accidentally requiring ActiveRecord. These ActiveRecord-specific configuration settings then broke, but since we've never used ActiveRecord or fixtures in this app, these...
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 @@ -37,6 +37,7 @@ } RSpec.configure do |c| + c.formatter = :documentation c.default_facts = { :augeasversion => '0.10.0' } end
Use documentation output for rspec
diff --git a/sql-logging.gemspec b/sql-logging.gemspec index abc1234..def5678 100644 --- a/sql-logging.gemspec +++ b/sql-logging.gemspec @@ -1,5 +1,4 @@ require 'rubygems' -require 'rake' lib = File.expand_path('../lib', __FILE__) $:.unshift lib unless $:.include?(lib) @@ -14,7 +13,7 @@ s.platform = Gem::Platform...
Use Dir.glob instead of FileList
diff --git a/app/models/manageiq/providers/redhat/infra_manager/vm.rb b/app/models/manageiq/providers/redhat/infra_manager/vm.rb index abc1234..def5678 100644 --- a/app/models/manageiq/providers/redhat/infra_manager/vm.rb +++ b/app/models/manageiq/providers/redhat/infra_manager/vm.rb @@ -47,4 +47,28 @@ def validate_s...
Add helper methods for Reconfigure VM UI. https://bugzilla.redhat.com/show_bug.cgi?id=1065573
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,4 +5,4 @@ default[:chef][:server][:version] = "12.13.0-1" # Set the default client version -default[:chef]...
Update chef client to 13.8.5
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.18.0-1
diff --git a/features/step_definitions/lockfile_steps.rb b/features/step_definitions/lockfile_steps.rb index abc1234..def5678 100644 --- a/features/step_definitions/lockfile_steps.rb +++ b/features/step_definitions/lockfile_steps.rb @@ -3,6 +3,15 @@ Given a file named "#{'.'.to_lockfile_path}" with: """ ...
Add a step to emulate sharing a lockfile
diff --git a/lib/generators/kebapress/install/install_generator.rb b/lib/generators/kebapress/install/install_generator.rb index abc1234..def5678 100644 --- a/lib/generators/kebapress/install/install_generator.rb +++ b/lib/generators/kebapress/install/install_generator.rb @@ -21,8 +21,8 @@ def create_migration_...
Fix join table name error on generator
diff --git a/test/controllers/requests_test.rb b/test/controllers/requests_test.rb index abc1234..def5678 100644 --- a/test/controllers/requests_test.rb +++ b/test/controllers/requests_test.rb @@ -0,0 +1,14 @@+require 'test_helper' + +class RequestsTest < ActionDispatch::IntegrationTest + setup do + Peek.adapter.re...
Add initial step for integration tests
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 @@ -5,4 +5,11 @@ rescue_from JSONAPI::Exceptions::Error, :with => :jsonapi_render_errors ...
Fix API root url link generation
diff --git a/Casks/rubymine-eap-bundled-jdk.rb b/Casks/rubymine-eap-bundled-jdk.rb index abc1234..def5678 100644 --- a/Casks/rubymine-eap-bundled-jdk.rb +++ b/Casks/rubymine-eap-bundled-jdk.rb @@ -0,0 +1,20 @@+cask :v1 => 'rubymine-eap-bundled-jdk' do + version '141.373' + sha256 '2605d3b61d9ae4a0590337d04bc24bf2f1c4...
Add formula for RubyMine EAP with bundled JDK
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 @@ -41,7 +41,7 @@ end def after_sign_in_path_for(resource) - current_student.update_attri...
Remove logging from students controller
diff --git a/app/jobs/feed_crawler/youtube_receiver.rb b/app/jobs/feed_crawler/youtube_receiver.rb index abc1234..def5678 100644 --- a/app/jobs/feed_crawler/youtube_receiver.rb +++ b/app/jobs/feed_crawler/youtube_receiver.rb @@ -11,11 +11,13 @@ id = entry.dig("data", "youtube_video_id") if embed = embe...
Move duration check outside of content check.
diff --git a/app/models/abilities/superuser_ability.rb b/app/models/abilities/superuser_ability.rb index abc1234..def5678 100644 --- a/app/models/abilities/superuser_ability.rb +++ b/app/models/abilities/superuser_ability.rb @@ -12,15 +12,14 @@ can :manage, :all cannot [:leave], Space do |space| - ...
Improve verification of whether superusers can leave spaces or not refs #1552
diff --git a/0_code_wars/6_autocomplete_yay.rb b/0_code_wars/6_autocomplete_yay.rb index abc1234..def5678 100644 --- a/0_code_wars/6_autocomplete_yay.rb +++ b/0_code_wars/6_autocomplete_yay.rb @@ -0,0 +1,23 @@+# http://www.codewars.com/kata/5389864ec72ce03383000484 +# --- iteration 1 --- +def autocomplete(input, dictio...
Add code wars (6) autocomplete yay
diff --git a/spec/examples_spec.rb b/spec/examples_spec.rb index abc1234..def5678 100644 --- a/spec/examples_spec.rb +++ b/spec/examples_spec.rb @@ -9,6 +9,17 @@ expect(res.count).to eq(8192) expect(res.first).to eq("Test") end + + it 'should handle many calls' do + results = [] + client ...
Test to handle at least 100 calls
diff --git a/lib/dm-salesforce/types.rb b/lib/dm-salesforce/types.rb index abc1234..def5678 100644 --- a/lib/dm-salesforce/types.rb +++ b/lib/dm-salesforce/types.rb @@ -4,6 +4,8 @@ module Types end + + Property = Types end require 'dm-salesforce/types/serial'
Add Property reference in DM0.10 case so DM1'ized quote_value works.
diff --git a/lib/mocha/return_values.rb b/lib/mocha/return_values.rb index abc1234..def5678 100644 --- a/lib/mocha/return_values.rb +++ b/lib/mocha/return_values.rb @@ -23,7 +23,7 @@ end def +(other) - ReturnValues.new(*(@values + other.values)) + self.class.new(*(@values + other.values)) ...
Use implicit reference to class instead of explicit reference to improve maintainability.
diff --git a/lib/mtgox/configuration.rb b/lib/mtgox/configuration.rb index abc1234..def5678 100644 --- a/lib/mtgox/configuration.rb +++ b/lib/mtgox/configuration.rb @@ -23,13 +23,6 @@ yield self end - # Create a hash of options and their values - def options - options = {} - VALID_OPTIONS_K...
Remove seemingly unused options hash.
diff --git a/lib/puppet/feature/mtik.rb b/lib/puppet/feature/mtik.rb index abc1234..def5678 100644 --- a/lib/puppet/feature/mtik.rb +++ b/lib/puppet/feature/mtik.rb @@ -1,3 +1,5 @@ require 'puppet/util/feature' -Puppet.features.add(:mtik, :libs => ["mtik"])+Puppet.features.add(:mtik) do + require "mtik" +end
Define feature as a block
diff --git a/lib/river_notifications.rb b/lib/river_notifications.rb index abc1234..def5678 100644 --- a/lib/river_notifications.rb +++ b/lib/river_notifications.rb @@ -13,7 +13,11 @@ end def after_update(post) - publish(post, :update) + if post.deleted? + publish(post, :delete) + else + publi...
Tweak river-notification observer for soft-deletes
diff --git a/Library/Homebrew/test/test_ENV.rb b/Library/Homebrew/test/test_ENV.rb index abc1234..def5678 100644 --- a/Library/Homebrew/test/test_ENV.rb +++ b/Library/Homebrew/test/test_ENV.rb @@ -23,7 +23,7 @@ def test_switching_compilers ENV.llvm ENV.clang - assert_equal ENV['LD'], ENV['CC'] + asser...
Adjust test expectation for 'LD' Signed-off-by: Jack Nagel <43386ce32af96f5c56f2a88e458cb94cebee3751@gmail.com>
diff --git a/plugin.rb b/plugin.rb index abc1234..def5678 100644 --- a/plugin.rb +++ b/plugin.rb @@ -3,6 +3,8 @@ # version: 0.6.0 # authors: Philipp Wolfer <ph.wolfer@gmail.com> # url: https://github.com/phw/discourse-musicbrainz-onebox + +require 'onebox' require_relative 'engine/musicbrainz_artist_onebox' requi...
Fix missing require of onebox module With Discourse 2.8 this does not seem to happen implicitlcy anymore
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index abc1234..def5678 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -4,11 +4,7 @@ require "extend/ENV/super" def superenv? - if OS.linux? - ARGV.env == "super" || (ENV["CI"] || ARGV.homebrew_develo...
Use --env=super by default for Linuxbrew
diff --git a/app/reports/signatures_report.rb b/app/reports/signatures_report.rb index abc1234..def5678 100644 --- a/app/reports/signatures_report.rb +++ b/app/reports/signatures_report.rb @@ -31,7 +31,7 @@ # Don't want to rely on `write_headers: true` since we want still # header row in the CSV file even ...
Fix no longer defined variable name snafu from merge
diff --git a/Casks/privacy-services-manager.rb b/Casks/privacy-services-manager.rb index abc1234..def5678 100644 --- a/Casks/privacy-services-manager.rb +++ b/Casks/privacy-services-manager.rb @@ -1,6 +1,6 @@ cask :v1 => 'privacy-services-manager' do - version '1.6.9' - sha256 'd59db1d633c40f791578d7496ba3a6f94370fda...
Update Privacy Services Manager to 1.7.2
diff --git a/lib/hache.rb b/lib/hache.rb index abc1234..def5678 100644 --- a/lib/hache.rb +++ b/lib/hache.rb @@ -8,7 +8,9 @@ "/" => "&#x2F;" } + UNSAFE = /[&"'><\/]/ + def self.h(str) - str.to_s.gsub(/[&"'><\/]/, HTML_ESCAPE) + str.to_s.gsub(UNSAFE, HTML_ESCAPE) end end
Move unsafe regexp to a constant.
diff --git a/lib/emcee/processors/directive_processor.rb b/lib/emcee/processors/directive_processor.rb index abc1234..def5678 100644 --- a/lib/emcee/processors/directive_processor.rb +++ b/lib/emcee/processors/directive_processor.rb @@ -5,12 +5,6 @@ # Matches the entire header/directive block. This is everything fr...
Remove unnecessary directive pattern regex The default one in Sprockets works fine
diff --git a/app/helpers/src_images_helper.rb b/app/helpers/src_images_helper.rb index abc1234..def5678 100644 --- a/app/helpers/src_images_helper.rb +++ b/app/helpers/src_images_helper.rb @@ -1,6 +1,6 @@ # encoding: UTF-8 -# Build urls for generated images. +# Build urls for source images. module SrcImagesHelper ...
Fix source images helper comment.
diff --git a/lib/nodus.rb b/lib/nodus.rb index abc1234..def5678 100644 --- a/lib/nodus.rb +++ b/lib/nodus.rb @@ -12,7 +12,11 @@ def self._error_msg(klass) @_error_msg_map[klass] end end -def error(klass, *args) raise klass, sprintf(*([Nodus._error_msg(klass)] + args)) end +def error(klass, *args) + msg = Nodus._e...
Allow 'error' to be used for normal non-mapped raises
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -8,9 +8,6 @@ supports 'ubuntu', '= 13.04' -%w{apt git build-essential user sudo}.each do |dep| +%w{apt git build-essential user sudo nginx docker}.each do |dep| depends dep end - -depends 'nginx', '~> 2.4...
Remove nginx/docker cookbook version restriction
diff --git a/cookbooks/travis_ci_minimal/spec/heroku_toolbelt_spec.rb b/cookbooks/travis_ci_minimal/spec/heroku_toolbelt_spec.rb index abc1234..def5678 100644 --- a/cookbooks/travis_ci_minimal/spec/heroku_toolbelt_spec.rb +++ b/cookbooks/travis_ci_minimal/spec/heroku_toolbelt_spec.rb @@ -1,4 +1,4 @@ describe command('h...
Fix regexes to appease the rubocop
diff --git a/lib/active_decorator/decorator.rb b/lib/active_decorator/decorator.rb index abc1234..def5678 100644 --- a/lib/active_decorator/decorator.rb +++ b/lib/active_decorator/decorator.rb @@ -12,7 +12,7 @@ def decorate(obj) return if obj.nil? - if obj.is_a? Array + if Array === obj ...
Use === to know whether the object is Array or not
diff --git a/lib/condition/condition_oracle.rb b/lib/condition/condition_oracle.rb index abc1234..def5678 100644 --- a/lib/condition/condition_oracle.rb +++ b/lib/condition/condition_oracle.rb @@ -2,18 +2,24 @@ def initialize(text) @text = text @has_cardname = !!(@text =~ /~/) - @normalized_text = normal...
Speed up ConditionOracle to get 131ms to 125ms
diff --git a/lib/deploy_and_deliver/recipes.rb b/lib/deploy_and_deliver/recipes.rb index abc1234..def5678 100644 --- a/lib/deploy_and_deliver/recipes.rb +++ b/lib/deploy_and_deliver/recipes.rb @@ -9,7 +9,7 @@ class Story < ActiveResource::Base ; end protocol = self[:pivotal_tracker_ssl] ? 'https' : 'http...
Switch to v3 of the API, bump version
diff --git a/lib/uniform_notifier/appsignal.rb b/lib/uniform_notifier/appsignal.rb index abc1234..def5678 100644 --- a/lib/uniform_notifier/appsignal.rb +++ b/lib/uniform_notifier/appsignal.rb @@ -12,7 +12,7 @@ def _out_of_channel_notify(data) opt = UniformNotifier.appsignal.is_a?(Hash) ? UniformNotifier...
Add body to Appsignal error message
diff --git a/app/mailers/grades_mailer.rb b/app/mailers/grades_mailer.rb index abc1234..def5678 100644 --- a/app/mailers/grades_mailer.rb +++ b/app/mailers/grades_mailer.rb @@ -11,16 +11,12 @@ @assignment_url = coursewareable.lecture_assignment_url( grade.assignment.lecture, grade.assignment ) - # Fi...
Refactor grades mailer to use associations.
diff --git a/app/mailers/mail_receiver.rb b/app/mailers/mail_receiver.rb index abc1234..def5678 100644 --- a/app/mailers/mail_receiver.rb +++ b/app/mailers/mail_receiver.rb @@ -17,7 +17,12 @@ comment.body = body comment.save - puts " ---> Added comment to Ticket \##{ticket.id}: #{ticket.subject}" + pu...
Add more info to mailman log
diff --git a/app/workers/backup_worker.rb b/app/workers/backup_worker.rb index abc1234..def5678 100644 --- a/app/workers/backup_worker.rb +++ b/app/workers/backup_worker.rb @@ -2,6 +2,10 @@ include Sidekiq::Worker def perform - PgDrive.perform + Timeout::timeout(120) { + PgDrive.perform + } + resc...
Add timeout to backup worker
diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/notifications_controller_spec.rb +++ b/spec/controllers/notifications_controller_spec.rb @@ -7,6 +7,14 @@ context 'user is signed in' do before...
Test for notification count action