diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/app/controllers/spree/admin/social_controller.rb b/app/controllers/spree/admin/social_controller.rb index abc1234..def5678 100644 --- a/app/controllers/spree/admin/social_controller.rb +++ b/app/controllers/spree/admin/social_controller.rb @@ -13,6 +13,15 @@ end end + if params[:social][:facebook] + Spree::Config.facebook_app_id = params[:facebook_options][:facebook_id] + Spree::Config.facebook_layout = params[:facebook_options][:facebook_layout] + Spree::Config.facebook_show_faces = params[:facebook_options][:facebook_show_faces] + Spree::Config.facebook_verb_to_display = params[:facebook_options][:facebook_verb_to_display] + Spree::Config.facebook_color_scheme = params[:facebook_options][:facebook_color_scheme] + Spree::Config.facebook_send_button = params[:facebook_options][:facebook_send_button] + end + redirect_to edit_admin_social_path, notice: Spree.t(:social_sharing_settings_updated) end end
Change settings for facebook conections
diff --git a/ci_environment/zeromq/recipes/ppa.rb b/ci_environment/zeromq/recipes/ppa.rb index abc1234..def5678 100644 --- a/ci_environment/zeromq/recipes/ppa.rb +++ b/ci_environment/zeromq/recipes/ppa.rb @@ -19,14 +19,17 @@ case node['platform'] when "ubuntu" - apt_repository "travis_ci_zeromq3" do - uri "http://ppa.launchpad.net/travis-ci/zero-mq/ubuntu" - distribution node['lsb']['codename'] - components ['main'] - key "75E9BCC5" - keyserver "keyserver.ubuntu.com" + case node['platform_version'] + when '12.04' + apt_repository "travis_ci_zeromq3" do + uri "http://ppa.launchpad.net/travis-ci/zero-mq/ubuntu" + distribution node['lsb']['codename'] + components ['main'] + key "75E9BCC5" + keyserver "keyserver.ubuntu.com" - action :add + action :add + end end end
Use special PPA only for Precise For Trusty, there is a package from http://packages.ubuntu.com/trusty/libzmq3 Fixes https://github.com/travis-ci/travis-ci/issues/2558
diff --git a/RestGoatee.podspec b/RestGoatee.podspec index abc1234..def5678 100644 --- a/RestGoatee.podspec +++ b/RestGoatee.podspec @@ -10,6 +10,6 @@ s.platform = :ios, '6.0' s.requires_arc = true s.source_files = 'RestGoatee' - s.dependency 'RestGoatee-Core' + s.dependency 'RestGoatee-Core', '= 1.1.0' s.dependency 'AFNetworking' end
Insert lock on the version of the core
diff --git a/SSignalKit.podspec b/SSignalKit.podspec index abc1234..def5678 100644 --- a/SSignalKit.podspec +++ b/SSignalKit.podspec @@ -12,7 +12,7 @@ s.ios.deployment_target = "6.0" s.osx.deployment_target = "10.7" - s.source = { :git => "https://github.com/PauloMigAlmeida/Signals.git", :tag => "0.0.1" } + s.source = { :git => "https://github.com/PauloMigAlmeida/Signals.git", :tag => s.version } s.source_files = "SSignalKit/**/*.{h,m}" s.requires_arc = true
Add MacOSx entry to spec file
diff --git a/spec/classes/global/tap_to_click_spec.rb b/spec/classes/global/tap_to_click_spec.rb index abc1234..def5678 100644 --- a/spec/classes/global/tap_to_click_spec.rb +++ b/spec/classes/global/tap_to_click_spec.rb @@ -20,4 +20,14 @@ :user => facts[:boxen_user] }) end -end+ + it do + should contain_boxen__osx_defaults('Tap-To-Click Current Host').with({ + :key => 'com.apple.mouse.tapBehavior', + :domain => 'NSGlobalDomain', + :value => 1, + :user => facts[:boxen_user], + :host => 'currentHost' + }) + end +end
Add spec for tap-to-click current host
diff --git a/spec/components/sidekiq/pausable_spec.rb b/spec/components/sidekiq/pausable_spec.rb index abc1234..def5678 100644 --- a/spec/components/sidekiq/pausable_spec.rb +++ b/spec/components/sidekiq/pausable_spec.rb @@ -3,9 +3,27 @@ describe Sidekiq do it "can pause and unpause" do - Sidekiq.pause! - Sidekiq.paused?.should == true - Sidekiq.unpause! - Sidekiq.paused?.should == false + + # Temporary work around + + t = Thread.new do + Sidekiq.pause! + Sidekiq.paused?.should == true + Sidekiq.unpause! + Sidekiq.paused?.should == false + end + + t2 = Thread.new do + sleep 5 + t.kill + end + + t.join + if t2.alive? + t2.kill + else + raise "Timed out running sidekiq pause test" + end + end end
Workaround: Make sure this spec can not hang our spec suite
diff --git a/lib/docs/scrapers/react_native.rb b/lib/docs/scrapers/react_native.rb index abc1234..def5678 100644 --- a/lib/docs/scrapers/react_native.rb +++ b/lib/docs/scrapers/react_native.rb @@ -3,7 +3,7 @@ self.name = 'React Native' self.slug = 'react_native' self.type = 'react' - self.release = '0.26' + self.release = '0.27' self.base_url = 'https://facebook.github.io/react-native/docs/' self.root_path = 'getting-started.html' self.links = { @@ -15,6 +15,7 @@ options[:root_title] = 'React Native Documentation' options[:only_patterns] = nil + options[:skip_patterns] = [/\Asample\-/] options[:skip] = %w( videos.html transforms.html
Update React Native documentation (0.27)
diff --git a/lib/tasks/remove-orphan-data.rake b/lib/tasks/remove-orphan-data.rake index abc1234..def5678 100644 --- a/lib/tasks/remove-orphan-data.rake +++ b/lib/tasks/remove-orphan-data.rake @@ -0,0 +1,29 @@+namespace :db do + desc 'Delete PanopticonMapping records without corresponding SpecialistDocumentEditions and vice-versa' + task :remove_orphan_data => :environment do + delete_specialist_editions_without_mappings + delete_mappings_with_non_existant_documents + end + + def delete_specialist_editions_without_mappings + SpecialistDocumentEdition.not_in(document_id: document_ids_with_mappings).each do |edition| + puts "Deleting #{edition.inspect}" + edition.delete + end + end + + def delete_mappings_with_non_existant_documents + PanopticonMapping.not_in(document_id: document_ids_with_editions).each do |mapping| + puts "Deleting #{mapping.inspect}" + mapping.delete + end + end + + def document_ids_with_mappings + PanopticonMapping.all.distinct(:document_id) + end + + def document_ids_with_editions + SpecialistDocumentEdition.all.distinct(:document_id) + end +end
Add rake task to clean up orphaned data Previous bugs resulted in editions without mappings and mappings without editions. The rake task deletes all the affected records. None of the records are being used by anything because of other checks in the code that make sure both an edition and a mapping exist before exposing it.
diff --git a/iig.gemspec b/iig.gemspec index abc1234..def5678 100644 --- a/iig.gemspec +++ b/iig.gemspec @@ -22,6 +22,7 @@ spec.add_runtime_dependency 'mechanize' spec.add_runtime_dependency 'slop' + spec.add_development_dependency 'guard' spec.add_development_dependency 'guard-minitest' spec.add_development_dependency 'webmock' spec.add_development_dependency 'vcr'
Add Guard gem to testing
diff --git a/Casks/appcode.rb b/Casks/appcode.rb index abc1234..def5678 100644 --- a/Casks/appcode.rb +++ b/Casks/appcode.rb @@ -1,6 +1,6 @@ cask :v1 => 'appcode' do - version '3.1.5' - sha256 '17c78a828cf438b9497b9716f26585f279d40cab9a550f8e50551e93ee125372' + version '3.1.6' + sha256 'e172dae4027de31bd941f7e062e2a5fefaa56d1a2e0031a846a9ba57f8f1b911' url "http://download.jetbrains.com/objc/AppCode-#{version}.dmg" name 'AppCode'
Update AppCode to version 3.1.6 This commit increases the version token and the updates the SHA
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 @@ -50,7 +50,7 @@ tmp_namespace = "#{name.parameterize}_#{i}" end - break if Tag.where(namespace: tmp_namespace).empty? + break if Tag.where(namespace: /#{tmp_namespace}/i).empty? end self.namespace = tmp_namespace end
Tag namespace anticollision should be case sensitive
diff --git a/aqbanking.gemspec b/aqbanking.gemspec index abc1234..def5678 100644 --- a/aqbanking.gemspec +++ b/aqbanking.gemspec @@ -23,4 +23,5 @@ spec.add_development_dependency "rspec" spec.add_development_dependency "guard" spec.add_development_dependency "guard-rspec" + spec.add_development_dependency "rubocop" end
Add rubocop to development dependencies
diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb index abc1234..def5678 100644 --- a/config/initializers/elasticsearch.rb +++ b/config/initializers/elasticsearch.rb @@ -3,5 +3,6 @@ begin Searchkick.client.info rescue - abort 'Searchkick not running' + Rails.logger.error 'ElasticSearch not running' + abort end
Throw error on ElasticSearch connection
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 @@ -1,27 +1,6 @@ require 'spec_helper' describe Article do - let(:article) { FactoryGirl.build :article } - it { should belong_to :author } - it { pending "shoulda is being stupid with Rails 4 association reflections"; should have_and_belong_to_many :tags } - it { should have_many :revisions } - - context "#revisions" do - let(:editor){ FactoryGirl.create(:user) } - let(:revision) { FactoryGirl.create(:revision, editor: editor) } - - context "creating an article" do - before do - article.save - end - - it "has one revision that matches the article content" do - article.revisions.count.should eq 1 - article.revisions.first.content.should match article.content - end - end - - context "updating an article" - end -end+ it { should have_and_belong_to_many :tags } +end
Revert "Add specs to article to cover the revision feature." This reverts commit 5bf320b7dfafa64b470f9ea9cf82dcbe6dbaa12a.
diff --git a/BHCDatabase/test/models/funder_test.rb b/BHCDatabase/test/models/funder_test.rb index abc1234..def5678 100644 --- a/BHCDatabase/test/models/funder_test.rb +++ b/BHCDatabase/test/models/funder_test.rb @@ -41,4 +41,14 @@ assert_not @funder.valid? end + test 'index on name and email' do + @duplicate_funder = @funder.dup + assert_not @duplicate_funder.valid? + assert @duplicate_funder.name == @funder.name + assert @duplicate_funder.email == @funder.email + assert_no_difference 'Funder.count' do + @duplicate_funder.save + end + end + end
Add test for index on name and email for a funder.
diff --git a/app/mailers/noisy_workflow.rb b/app/mailers/noisy_workflow.rb index abc1234..def5678 100644 --- a/app/mailers/noisy_workflow.rb +++ b/app/mailers/noisy_workflow.rb @@ -24,7 +24,7 @@ :to => email_addresses, :reply_to => fact_check_address, :from => "Gov.UK Editors <#{fact_check_address}>", - :subject => "[FACT CHECK REQUESTED] #{edition.title} (id:#{edition.fact_check_id})") unless email_addresses.blank? + :subject => "[FACT CHECK REQUESTED] #{edition.title}") unless email_addresses.blank? end end
Remove guide ID from subject line of fact check emails
diff --git a/lib/devbar.rb b/lib/devbar.rb index abc1234..def5678 100644 --- a/lib/devbar.rb +++ b/lib/devbar.rb @@ -25,7 +25,7 @@ end def bar - "<div style='height:24px;width:100%;font-size:12px;font-family:helvetica,arial;padding:0;margin:0;line-height:2em;background:red;bottom:0;font-weight:bold;position:fixed;right:0;text-align:center;font-weight:bold;color:white;z-index:999;opacity:0.7;transition:opacity .15s;-webkit-transition:opacity .15s' onmouseover='this.style.opacity=0.1' onmouseout='this.style.opacity=0.7'>#{ Rails.env.upcase } ENVIRONMENT</div>" + %(<div style="height:24px;width:100%;font-size:12px;font-family:helvetica,arial;background-color:red;bottom:0;position:fixed;right:0; text-align:center;color:white;z-index:999;opacity:0.7;line-height:24px;font-weight:bold;" onmouseover="if(this.style.bottom=='0px'){this.style.top=0;this.style.bottom=null}else{this.style.bottom=0;this.style.top=null}">#{ Rails.env.upcase } ENVIRONMENT</div>) end end end
Move bar out of the way when hovering Currently the bar prevents you from clicking links below it. This change just moves the bar to the top or bottom of the page when the user mouses over.
diff --git a/Casks/rubymine-bundled-jdk.rb b/Casks/rubymine-bundled-jdk.rb index abc1234..def5678 100644 --- a/Casks/rubymine-bundled-jdk.rb +++ b/Casks/rubymine-bundled-jdk.rb @@ -0,0 +1,20 @@+cask :v1 => 'rubymine-bundled-jdk' do + version '7.1' + sha256 '2e9fced43c8e14ffbc82a72a8f6cde1cbab50861db079162ca5ff34c668ba57c' + + url "https://download.jetbrains.com/ruby/RubyMine-#{version}-custom-jdk-bundled.dmg" + name 'RubyMine' + homepage 'https://www.jetbrains.com/ruby/' + license :commercial + + app 'RubyMine.app' + + zap :delete => [ + '~/Library/Preferences/com.jetbrains.rubymine.plist', + '~/Library/Preferences/RubyMine70', + '~/Library/Application Support/RubyMine70', + '~/Library/Caches/RubyMine70', + '~/Library/Logs/RubyMine70', + '/usr/local/bin/mine', + ] +end
Add cask for RubyMine with bundled JDK
diff --git a/lib/chef/provider/aws_instance.rb b/lib/chef/provider/aws_instance.rb index abc1234..def5678 100644 --- a/lib/chef/provider/aws_instance.rb +++ b/lib/chef/provider/aws_instance.rb @@ -6,7 +6,10 @@ def update_aws_object(instance); end def destroy_aws_object(instance) - converge_by "delete instance #{new_resource} in VPC #{instance.vpc.id} in #{region}" do + message = "delete instance #{new_resource}" + message += " in VPC #{instance.vpc.id}" unless instance.vpc.nil? + message += " in #{region}" + converge_by message do instance.delete end converge_by "waited until instance #{new_resource} is :terminated" do
Make destroy_aws_object work when using ec2-classic
diff --git a/ee/app/helpers/ee/users_helper.rb b/ee/app/helpers/ee/users_helper.rb index abc1234..def5678 100644 --- a/ee/app/helpers/ee/users_helper.rb +++ b/ee/app/helpers/ee/users_helper.rb @@ -0,0 +1,31 @@+# frozen_string_literal: true + +module EE + module UsersHelper + def users_sentence(users, link_class: nil) + users.map { |user| link_to(user.name, user, class: link_class) }.to_sentence.html_safe + end + + def user_namespace_union(user = current_user, select = :id) + ::Gitlab::SQL::Union.new([ + ::Namespace.select(select).where(type: nil, owner: user), + user.owned_groups.select(select).where(parent_id: nil) + ]).to_sql + end + + def user_has_namespace_with_trial?(user = current_user) + ::Namespace + .from("(#{user_namespace_union(user, :trial_ends_on)}) #{::Namespace.table_name}") + .where('trial_ends_on > ?', Time.now.utc) + .any? + end + + def user_has_namespace_with_gold?(user = current_user) + ::Namespace + .includes(:plan) + .where("namespaces.id IN (#{user_namespace_union(user)})") # rubocop:disable GitlabSecurity/SqlInjection + .where.not(plans: { id: nil }) + .any? + end + end +end
Update user_has_namespace_with_gold? to check for any plan instead of just gold plan
diff --git a/manageiq-providers-amazon.gemspec b/manageiq-providers-amazon.gemspec index abc1234..def5678 100644 --- a/manageiq-providers-amazon.gemspec +++ b/manageiq-providers-amazon.gemspec @@ -13,7 +13,15 @@ s.files = Dir["{app,config,lib}/**/*"] - s.add_dependency "aws-sdk", "~> 3.0.1" + s.add_dependency "aws-sdk-cloudformation", "~> 1.0" + s.add_dependency "aws-sdk-cloudwatch", "~> 1.0" + s.add_dependency "aws-sdk-ec2", "~> 1.0" + s.add_dependency "aws-sdk-elasticloadbalancing", "~> 1.0" + s.add_dependency "aws-sdk-iam", "~> 1.0" + s.add_dependency "aws-sdk-s3", "~> 1.0" + s.add_dependency "aws-sdk-servicecatalog", "~> 1.0" + s.add_dependency "aws-sdk-sns", "~> 1.0" + s.add_dependency "aws-sdk-sqs", "~> 1.0" s.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0" s.add_development_dependency "simplecov"
Reduce the number of gems for AWS SDK usage
diff --git a/lib/guessr.rb b/lib/guessr.rb index abc1234..def5678 100644 --- a/lib/guessr.rb +++ b/lib/guessr.rb @@ -1,5 +1,14 @@ require "guessr/version" +require "guessr/init_db" + +require "guessr/player" +require "guessr/game" + +require "pry" module Guessr - # Your code goes here... + class App + end end + +binding.pry
Add skeleton of app class and load other assets.
diff --git a/lib/jobs/coords.rb b/lib/jobs/coords.rb index abc1234..def5678 100644 --- a/lib/jobs/coords.rb +++ b/lib/jobs/coords.rb @@ -15,7 +15,7 @@ def location(need) city, place = need.city, need.location - return "%s, %s" % [city, place] + return "%s, %s" % [place, city] end end end
Switch place and city in google request
diff --git a/minitest-rails-assertions.gemspec b/minitest-rails-assertions.gemspec index abc1234..def5678 100644 --- a/minitest-rails-assertions.gemspec +++ b/minitest-rails-assertions.gemspec @@ -1,23 +1,25 @@-# coding: utf-8 +# encoding: utf-8 + lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + require 'minitest/rails/assertions/version' -Gem::Specification.new do |spec| - spec.name = "minitest-rails-assertions" - spec.version = Minitest::Rails::Assertions::VERSION - spec.authors = ["Geoffrey ROGUELON"] - spec.email = ["[email protected]"] - spec.summary = %q{TODO: Write a short summary. Required.} - spec.description = %q{TODO: Write a longer description. Optional.} - spec.homepage = "" - spec.license = "MIT" +Gem::Specification.new do |gem| + gem.name = 'minitest-rails-assertions' + gem.version = Minitest::Rails::Assertions::VERSION + gem.authors = ['Geoffrey Roguelon', 'Loïc Sence'] + gem.email = ['[email protected]', '[email protected]'] + gem.summary = %q{The gem minitest-rails-assertions extends MiniTest to add some assertions to Rails tests.} + gem.description = %q{The gem minitest-rails-assertions extends MiniTest to add some assertions to Rails tests.} + gem.homepage = 'https://github.com/jules-vernes/minitest-rails-assertions' + gem.license = 'MIT' - spec.files = `git ls-files -z`.split("\x0") - spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } - spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) - spec.require_paths = ["lib"] + gem.files = `git ls-files`.split($/) + gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) + gem.require_paths = ['lib'] - spec.add_development_dependency "bundler", "~> 1.7" - spec.add_development_dependency "rake", "~> 10.0" + gem.add_development_dependency 'bundler', '~> 1.7' + gem.add_development_dependency 'rake', '~> 10.0' end
Complete the specification of the gem.
diff --git a/test/everypolitician/popolo/area_test.rb b/test/everypolitician/popolo/area_test.rb index abc1234..def5678 100644 --- a/test/everypolitician/popolo/area_test.rb +++ b/test/everypolitician/popolo/area_test.rb @@ -10,4 +10,15 @@ assert_instance_of Everypolitician::Popolo::Areas, popolo.areas assert_instance_of Everypolitician::Popolo::Area, area end + + def test_accessing_area_properties + popolo = Everypolitician::Popolo::JSON.new( + areas: [{ id: '123', name: 'Newtown', type: 'constituency' }] + ) + area = popolo.areas.first + + assert_equal '123', area.id + assert_equal 'Newtown', area.name + assert_equal 'constituency', area.type + end end
Make sure that Area properties are accessible (add test only)
diff --git a/examples/http_read_async/basic.rb b/examples/http_read_async/basic.rb index abc1234..def5678 100644 --- a/examples/http_read_async/basic.rb +++ b/examples/http_read_async/basic.rb @@ -19,7 +19,7 @@ headers: { "Flipper-Cloud-Token" => ENV["FLIPPER_CLOUD_TOKEN"], }, - worker: {interval: 5}, + interval: 1, start_with: adapter, }) end
Use top level interval option
diff --git a/db/migrate/20200312205938_add_root_account_id_to_master_courses_master_content_tags.rb b/db/migrate/20200312205938_add_root_account_id_to_master_courses_master_content_tags.rb index abc1234..def5678 100644 --- a/db/migrate/20200312205938_add_root_account_id_to_master_courses_master_content_tags.rb +++ b/db/migrate/20200312205938_add_root_account_id_to_master_courses_master_content_tags.rb @@ -0,0 +1,32 @@+# +# Copyright (C) 2020 - present Instructure, Inc. +# +# This file is part of Canvas. +# +# Canvas is free software: you can redistribute it and/or modify +# the terms of the GNU Affero General Public License as publishe +# Software Foundation, version 3 of the License. +# +# Canvas is distributed in the hope that it will be useful, but +# WARRANTY; without even the implied warranty of MERCHANTABILITY +# A PARTICULAR PURPOSE. See the GNU Affero General Public Licens +# details. +# +# You should have received a copy of the GNU Affero General Publ +# with this program. If not, see <http://www.gnu.org/licenses/>. + +class AddRootAccountIdToMasterCoursesMasterContentTags < ActiveRecord::Migration[5.2] + include MigrationHelpers::AddColumnAndFk + + tag :predeploy + disable_ddl_transaction! + + def up + add_column_and_fk :master_courses_master_content_tags, :root_account_id, :accounts + add_index :master_courses_master_content_tags, :root_account_id, algorithm: :concurrently + end + + def down + remove_column :master_courses_master_content_tags, :root_account_id + end +end
Add root account id to master_courses_master_content_tags Closes PLAT-5570 flag=none Test Plan: - Verify migrations run - Verify a root_account_id can be set on a MasterCourses::MasterContentTag record - Verify MasterContentTags always live on the same shard as their root account Change-Id: Id52b98e2e2affd860781a99785052999000b3170 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229831 Tested-by: Service Cloud Jenkins <[email protected]> QA-Review: Weston Dransfield <[email protected]> Product-Review: Weston Dransfield <[email protected]> Reviewed-by: Clint Furse <[email protected]> Reviewed-by: Cody Cutrer <[email protected]>
diff --git a/db/migrate/20221010191537_change_discussion_topic_materialized_views_fields_to_text.rb b/db/migrate/20221010191537_change_discussion_topic_materialized_views_fields_to_text.rb index abc1234..def5678 100644 --- a/db/migrate/20221010191537_change_discussion_topic_materialized_views_fields_to_text.rb +++ b/db/migrate/20221010191537_change_discussion_topic_materialized_views_fields_to_text.rb @@ -0,0 +1,33 @@+# frozen_string_literal: true + +# Copyright (C) 2022 - present Instructure, Inc. +# +# This file is part of Canvas. +# +# Canvas is free software: you can redistribute it and/or modify it under +# the terms of the GNU Affero General Public License as published by the Free +# Software Foundation, version 3 of the License. +# +# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +# details. +# +# You should have received a copy of the GNU Affero General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. + +class ChangeDiscussionTopicMaterializedViewsFieldsToText < ActiveRecord::Migration[6.1] + tag :predeploy + + def up + change_column :discussion_topic_materialized_views, :json_structure, :text, limit: nil + change_column :discussion_topic_materialized_views, :participants_array, :text, limit: nil + change_column :discussion_topic_materialized_views, :entry_ids_array, :text, limit: nil + end + + def down + change_column :discussion_topic_materialized_views, :json_structure, :text, limit: 10.megabytes + change_column :discussion_topic_materialized_views, :participants_array, :text, limit: 10.megabytes + change_column :discussion_topic_materialized_views, :entry_ids_array, :text, limit: 10.megabytes + end +end
Change discussion_topic_materialized_views fields to text flag=none closes VICE-3126 test plan: - Tests pass - Cursory testing of legacy discussions qa risk: low Change-Id: Ifc84cbeadb439b919bc84d5cae400b92ff32eb0b Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302961 Tested-by: Service Cloud Jenkins <[email protected]> Migration-Review: Jeremy Stanley <[email protected]> QA-Review: Caleb Guanzon <[email protected]> Reviewed-by: Chawn Neal <[email protected]> Product-Review: Chawn Neal <[email protected]>
diff --git a/lib/kamikakushi.rb b/lib/kamikakushi.rb index abc1234..def5678 100644 --- a/lib/kamikakushi.rb +++ b/lib/kamikakushi.rb @@ -21,7 +21,7 @@ def destroy_with_kamikakushi run_callbacks(:destroy) do - update_column(:deleted_at, Time.current) + touch(:deleted_at) end end
Use touch instead of update_column
diff --git a/amq-client.gemspec b/amq-client.gemspec index abc1234..def5678 100644 --- a/amq-client.gemspec +++ b/amq-client.gemspec @@ -6,7 +6,8 @@ Gem::Specification.new do |s| s.name = "amq-client" s.version = "0.2.0" - s.authors = ["Jakub Stastny"] + s.authors = ["Jakub Stastny", "Michael S. Klishin"] + s.email = ["[email protected]"] s.homepage = "http://github.com/ruby-amqp/amq-client" s.summary = "Low-level AMQP 0.9.1 client agnostic to the used IO library." s.description = "Very low-level AMQP 0.9.1 client which is supposed to be used for implementing more high-level AMQP libraries rather than to be used by the end users."
Add myself to the .gemspec
diff --git a/spec/classes/puppetrspec_spec.rb b/spec/classes/puppetrspec_spec.rb index abc1234..def5678 100644 --- a/spec/classes/puppetrspec_spec.rb +++ b/spec/classes/puppetrspec_spec.rb @@ -13,8 +13,8 @@ :ensure => 'something NOT UNDEF' } end - it 'should have file' do - should contain_file(filename) + it 'should have File with ensure file' do + should contain_file(filename).with_ensure('file') end end @@ -25,8 +25,8 @@ :ensure => '# WHAT SHOULD WE USE HERE TO PASS PUPPET undef VALUE ?#' } end - it 'should NOT have file' do - should_not contain_file(filename) + it 'should have File with ensure absent' do + should contain_file(filename).with_ensure('absent') end end
Fix spec file that wasn't working at al
diff --git a/app/models/action_mailroom/inbound_email.rb b/app/models/action_mailroom/inbound_email.rb index abc1234..def5678 100644 --- a/app/models/action_mailroom/inbound_email.rb +++ b/app/models/action_mailroom/inbound_email.rb @@ -7,7 +7,7 @@ enum status: %i[ pending processing delivered failed bounced ] - after_create_commit :deliver_to_mailroom_later + # after_create_commit :deliver_to_mailroom_later def mail
Save this for a little later
diff --git a/app/models/agenda_time.rb b/app/models/agenda_time.rb index abc1234..def5678 100644 --- a/app/models/agenda_time.rb +++ b/app/models/agenda_time.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class AgendaTime < ApplicationRecord - validates :order, presence: true + validates :label, presence: true default_scope -> { order(order: :asc) } end
Fix validator for agenda time
diff --git a/lib/imagetastic.rb b/lib/imagetastic.rb index abc1234..def5678 100644 --- a/lib/imagetastic.rb +++ b/lib/imagetastic.rb @@ -28,3 +28,5 @@ end autoload_files_in_dir("#{File.dirname(__FILE__)}/imagetastic", 'Imagetastic') + +require 'rubygems'
Make sure rubygems is available for things like rack, rmagick, etc.
diff --git a/lib/inflections.rb b/lib/inflections.rb index abc1234..def5678 100644 --- a/lib/inflections.rb +++ b/lib/inflections.rb @@ -10,7 +10,7 @@ inflect.singular(/s$/i, '') inflect.singular(/(ss)$/i, '\1') - inflect.singular(/([sxz]|[cs]h)es/, '\1') + inflect.singular(/([sxz]|[cs]h)es$/, '\1') inflect.singular(/([^aeiouy]o)es$/, '\1') inflect.singular(/([^aeiouy])ies$/i, '\1y')
Fix the singular inflection for sibilant sounds. Signed-off-by: David Celis <[email protected]>
diff --git a/spec/features/heat_map_spec.rb b/spec/features/heat_map_spec.rb index abc1234..def5678 100644 --- a/spec/features/heat_map_spec.rb +++ b/spec/features/heat_map_spec.rb @@ -13,12 +13,18 @@ #Create reviewers #Create reviews for the assignment from reviewers - + end - it 'Views a heat map of review scores' do - #Fill in steps to execute this - true.should == false + it 'should be able to views a heat map of review scores' do + #Log in as the student with an assignment and reviews + login_as @student.name + + #Select the assignment and follow the link to the heat map + click_link @assignment.name + click_link 'Alternate View' + + expect(page).to have_content('Summary Report for Assignment') end end
Set up a basic test to verify that the heat map page is accessible to the test user.
diff --git a/lib/micro_q/dsl.rb b/lib/micro_q/dsl.rb index abc1234..def5678 100644 --- a/lib/micro_q/dsl.rb +++ b/lib/micro_q/dsl.rb @@ -23,13 +23,17 @@ def self.attach_async_methods(target, opts) target.class_eval do (target.microq_options[:methods] |= opts.flatten).each do |method| - target.define_singleton_method(:"#{method}_async") do |*args| - MicroQ::Proxy::Instance.new( - target.microq_options.dup.merge(:class => self) - ).send(method, *args) - end unless respond_to?(:"#{method}_async") + DSL.define_proxy_method target, method end end + end + + def self.define_proxy_method(target, method) + target.define_singleton_method(:"#{method}_async") do |*args| + MicroQ::Proxy::Instance.new( + target.microq_options.dup.merge(:class => self) + ).send(method, *args) + end unless respond_to?(:"#{method}_async") end module ClassMethods
Refactor building proxy methods based on worker methods.
diff --git a/spec/lib/gplaces/place_spec.rb b/spec/lib/gplaces/place_spec.rb index abc1234..def5678 100644 --- a/spec/lib/gplaces/place_spec.rb +++ b/spec/lib/gplaces/place_spec.rb @@ -9,7 +9,7 @@ end it "has lat and lng" do - expect(subject.geometry.location.lat).to eq(-33.8669330) - expect(subject.geometry.location.lng).to eq(151.1957910) + expect(subject.location.lat).to eq(-33.8669330) + expect(subject.location.lng).to eq(151.1957910) end end
Fix test to use location directly
diff --git a/spec/model_specs/skill_spec.rb b/spec/model_specs/skill_spec.rb index abc1234..def5678 100644 --- a/spec/model_specs/skill_spec.rb +++ b/spec/model_specs/skill_spec.rb @@ -3,6 +3,7 @@ describe Skill do let(:valid_skill) { Skill.create(title: "valid skill") } let(:invalid_skill) { Skill.create(title: "invalid skill") } + let(:streak_test) { Skill.create(title: "testing", longest_streak: 7)} it "is valid with a title" do expect(valid_skill.valid?).to be true @@ -26,6 +27,11 @@ expect(valid_skill.current_streak).to eq 0 end + it "updates the longest streak if the current streak becomes higher" do + 7.times { streak_test.increment_current_streak } + expect(streak_test.longest_streak).to eq 8 + end + xit "can give the number of seconds remaining after creation" do wait 5 expect(valid_skill.time_remaining).to eq false
Add test to verify that longest streak incrementing works
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index abc1234..def5678 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -30,17 +30,6 @@ hosts.each do |host| copy_module_to(host, :source => proj_root, :module_name => 'firewall') on host, puppet('module install puppetlabs-stdlib --version 3.2.0'), { :acceptable_exit_codes => [0,1] } - if ! UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) - pp = <<-EOS - if $::osfamily == 'RedHat' { - exec { 'setenforce Permissive': - path => ['/bin','/usr/bin','/sbin','/usr/sbin'], - onlyif => 'getenforce | grep Enforcing', - } - } - EOS - apply_manifest(pp, :catch_failures => true) - end end end end
Revert "Don't enable selinux on redhat systems"
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,7 +1,7 @@ name 'hubot' maintainer 'Chef Software, Inc.' maintainer_email '[email protected]' -license 'Apache 2.0' +license 'Apache-2.0' description "Deploys and manages an instance of Github's Hubot." long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '1.0.7'
Use SPDX standard license string Signed-off-by: Tim Smith <[email protected]>
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,6 +6,11 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.1.0' +supports 'ubuntu' +supports 'debian', '>= 7.0' +supports 'centos', '>= 6.4' + +depends 'yum' depends 'apt' depends 'build-essential' depends 'augeas'
Add supports oses, add yum recipe dependency
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'Apache 2.0' description 'Configures rabbitmq cluster' long_description 'This cookbook configures rabbitmq cluster by executing rabbitmqctl command.' -version '0.1.1' +version '0.1.2' depends 'rabbitmq'
Increase the version to 0.1.2
diff --git a/PusherSwift.podspec b/PusherSwift.podspec index abc1234..def5678 100644 --- a/PusherSwift.podspec +++ b/PusherSwift.podspec @@ -8,8 +8,9 @@ s.source = { git: "https://github.com/pusher/pusher-websocket-swift.git", tag: s.version.to_s } s.social_media_url = 'https://twitter.com/pusher' - s.requires_arc = true - s.source_files = 'Sources/*.swift' + s.swift_version = '4.2' + s.requires_arc = true + s.source_files = 'Sources/*.swift' s.dependency 'CryptoSwift', '~> 0.9' s.dependency 'ReachabilitySwift', '4.3.0'
Add Swift version to Podspec
diff --git a/core/spec/lib/spree/core/testing_support/factories/store_credit_category_factory_spec.rb b/core/spec/lib/spree/core/testing_support/factories/store_credit_category_factory_spec.rb index abc1234..def5678 100644 --- a/core/spec/lib/spree/core/testing_support/factories/store_credit_category_factory_spec.rb +++ b/core/spec/lib/spree/core/testing_support/factories/store_credit_category_factory_spec.rb @@ -0,0 +1,14 @@+ENV['NO_FACTORIES'] = "NO FACTORIES" + +require 'spec_helper' +require 'spree/testing_support/factories/store_credit_category_factory' + +RSpec.describe 'store credit category factory' do + let(:factory_class) { Spree::StoreCreditCategory } + + describe 'plain store credi category' do + let(:factory) { :store_credit_category } + + it_behaves_like 'a working factory' + end +end
Test store credit category factory
diff --git a/app/models/race.rb b/app/models/race.rb index abc1234..def5678 100644 --- a/app/models/race.rb +++ b/app/models/race.rb @@ -13,13 +13,15 @@ def assign_points # za svaku kategoriju Racer.categories.each do |category| + p category # nadi top 25 rezultata - race_results.includes(:racer).where({'racers.category': category }) + race_results.includes(:racer).where({'racers.category': category[1] }) .sort{|x,y| x.finish_time <=> y.finish_time} .first(25) .select{ |rr| rr.lap_times.length > 0 } .each_with_index do |rr, index| # podijeli bodove + p rr rr.update!(points: Race.points[index]) end end
Add prints to point assignment
diff --git a/app/models/user.rb b/app/models/user.rb index abc1234..def5678 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -27,7 +27,7 @@ def unfulfilled_booking_requests booking_requests - .includes(:appointment, :slots) + .includes(:appointment) .where(appointments: { booking_request_id: nil }) end
Revert "Remove N+1 query on booking request slots" This reverts commit 0d1da14eadf7953b33d88fcbc190bfe3a08ba235. When eager-loading the associated slots, the `order` clause on the `slots` association is ignored. I'll revert this now for a quick fix and follow up with better specs to catch this next time.
diff --git a/authoraise.gemspec b/authoraise.gemspec index abc1234..def5678 100644 --- a/authoraise.gemspec +++ b/authoraise.gemspec @@ -21,4 +21,5 @@ spec.add_development_dependency "bundler", "~> 1.8" spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "pry" + spec.add_development_dependency "minitest" end
Add minitest as dev dependency
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,9 @@ module ApplicationHelper def format_date(date) - date.strftime("%m/%d/%y") + if date + date.strftime("%m/%d/%y") + else + '--' + end end end
Update 'format_date()' to handle empty date fields
diff --git a/app/views/home/index.atom.builder b/app/views/home/index.atom.builder index abc1234..def5678 100644 --- a/app/views/home/index.atom.builder +++ b/app/views/home/index.atom.builder @@ -5,7 +5,7 @@ atom_feed do |feed| feed.title t(:activities) - feed.updated @activities.max { |a, b| a.updated_at <=> b.updated_at }.updated_at + feed.updated @activities.max { |a, b| a.updated_at <=> b.updated_at }.try(:updated_at) feed.generator "Fat Free CRM v#{FatFreeCRM::Version}" feed.author do |author| author.name @current_user.full_name
Fix Atom builder with no activities
diff --git a/config/cloudwatch_schedule.rb b/config/cloudwatch_schedule.rb index abc1234..def5678 100644 --- a/config/cloudwatch_schedule.rb +++ b/config/cloudwatch_schedule.rb @@ -2,12 +2,12 @@ CloudwatchScheduler() do |_config| # every hour at 10 minutes past the hour - task 'run_notifications', cron: '10 * * * *' do + task 'run_notifications', cron: '10 * * ? *' do RunNotificationsService.new.call! end # every day at 5:00am - task 'cleanup', cron: '0 5 * * *' do + task 'cleanup', cron: '0 5 * ? *' do CleanupDbService.new.call! end end
Use Amazon's weird cron syntax
diff --git a/config/initializers/stripe.rb b/config/initializers/stripe.rb index abc1234..def5678 100644 --- a/config/initializers/stripe.rb +++ b/config/initializers/stripe.rb @@ -1,6 +1,6 @@ Rails.configuration.stripe = { - :publishable_key => ENV['PUBLISHABLE_KEY'], - :secret_key => ENV['SECRET_KEY'] + :publishable_key => Rails.application.secrets.stripe_publishable_key, + :secret_key => Rails.application.secrets.stripe_secret_key } Stripe.api_key = Rails.application.secrets.stripe_secret_key
Fix access to keys internally. Start server with `rails s`
diff --git a/Casks/lyx.rb b/Casks/lyx.rb index abc1234..def5678 100644 --- a/Casks/lyx.rb +++ b/Casks/lyx.rb @@ -1,7 +1,7 @@ class Lyx < Cask - url 'ftp://ftp.lyx.org/pub/lyx/bin/2.0.6/LyX-2.0.6+qt4.dmg' + url 'ftp://ftp.lyx.org/pub/lyx/bin/2.0.7/LyX-2.0.7+qt4.dmg' homepage 'http://www.lyx.org' - version '2.0.6' - sha1 '7fc3350afb6b5b9ebad04d6a1370ca8670b24e04' + version '2.0.7' + sha1 '5c1b74645b20ffe85fc0a3c1d3aaf51ea8c9490f' link 'LyX.app' end
Update LyX to version 2.0.7
diff --git a/lib/ymdp.rb b/lib/ymdp.rb index abc1234..def5678 100644 --- a/lib/ymdp.rb +++ b/lib/ymdp.rb @@ -18,7 +18,7 @@ require File.expand_path(path) end -["support", "configuration"].each do |directory| +["support", "configuration", "compiler"].each do |directory| Dir["#{dir}/#{directory}/*.rb"].each do |path| require File.expand_path(path) end
Load compiler directory by default
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index abc1234..def5678 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -1,6 +1,7 @@ class AccountsController < AuthorizedController # Scopes has_scope :by_value_period, :using => [:from, :to], :default => proc { |c| c.session[:has_scope] } + has_scope :by_text def show @account = Account.find(params[:id])
Support booking filtering in account.
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 @@ def destroy session[:user_id] = nil - redirect_to logout_path(request.fullpath) + redirect_to logout_path(root_url) # redirect_to root_url, notice: :signed_out end end
Fix redirect url when signing out
diff --git a/app/controllers/callbacks_controller.rb b/app/controllers/callbacks_controller.rb index abc1234..def5678 100644 --- a/app/controllers/callbacks_controller.rb +++ b/app/controllers/callbacks_controller.rb @@ -15,7 +15,7 @@ if oauth_user.valid? sign_in_and_redirect else - session['devise.omniauth_data'] = oauth + session['devise.omniauth_data'] = oauth.except('extra') redirect_to new_user_registration_path, alert: flash_message end end
Fix `CookieOverflow` error on google login The "extra" hash coming from the provider is quite big and we're not using it, so let's not save it in session.
diff --git a/app/controllers/space_api_controller.rb b/app/controllers/space_api_controller.rb index abc1234..def5678 100644 --- a/app/controllers/space_api_controller.rb +++ b/app/controllers/space_api_controller.rb @@ -1,5 +1,15 @@ class SpaceApiController < ApplicationController + before_action :set_access_control_headers, only: :status + def status @space_api = SpaceApi.new end + + private + def set_access_control_headers + if request.format.json? + response.headers['Access-Control-Allow-Origin'] = '*' + response.headers['Access-Control-Request-Method'] = '*' + end + end end
Add a CORS header for the Space API endpoint
diff --git a/app/controllers/user_info_controller.rb b/app/controllers/user_info_controller.rb index abc1234..def5678 100644 --- a/app/controllers/user_info_controller.rb +++ b/app/controllers/user_info_controller.rb @@ -1,8 +1,5 @@ class UserInfoController < ApplicationController before_filter :require_user_access_token - after_filter do |c| - logger.info c.response.body - end rescue_from FbGraph::Exception, Rack::OAuth2::Client::Error do |e| provider = case e
Revert "try to log user_info response" This reverts commit eec3c5aa32e50aa98a06c79a3ab26bce85e1b0c7.
diff --git a/app/presenters/field/embed_presenter.rb b/app/presenters/field/embed_presenter.rb index abc1234..def5678 100644 --- a/app/presenters/field/embed_presenter.rb +++ b/app/presenters/field/embed_presenter.rb @@ -15,7 +15,13 @@ if field.iframe? raw_value&.html_safe - compact? ? raw_value&.gsub(/width=["']\d+["']/, "width=\"#{COMPACT_WIDTH}\"")&.gsub(/height=["']\d+["']/, "height=\"#{COMPACT_HEIGHT}\"")&.html_safe : raw_value&.html_safe + + if compact? + raw_value&.gsub(/style=["'].*["']/, "style=\"width:#{COMPACT_WIDTH}px; height:#{COMPACT_HEIGHT}px; border: none;\"") + &.gsub(/width=["']\d+["']/, "width=\"#{COMPACT_WIDTH}\"") + &.gsub(/height=["']\d+["']/, "height=\"#{COMPACT_HEIGHT}\"") + &.html_safe + end elsif field.url? "<iframe width='#{compact? ? COMPACT_WIDTH : field.iframe_width}' height='#{compact? ? COMPACT_HEIGHT : field.iframe_height}' style='border: none;' src='#{raw_value}'></iframe>".html_safe end
Remove iframe styles for embed field in compact mode
diff --git a/app/resources/api/v1/member_resource.rb b/app/resources/api/v1/member_resource.rb index abc1234..def5678 100644 --- a/app/resources/api/v1/member_resource.rb +++ b/app/resources/api/v1/member_resource.rb @@ -7,9 +7,13 @@ has_many :plantings has_many :harvests has_many :seeds + has_many :photos attribute :login_name + attribute :slug + + filters :login_name, :slug end end end
Add filters for the members api
diff --git a/objc-rlite.podspec b/objc-rlite.podspec index abc1234..def5678 100644 --- a/objc-rlite.podspec +++ b/objc-rlite.podspec @@ -12,6 +12,8 @@ s.version = "0.0.1" s.summary = "Objective-C wrapper for rlite" s.description = <<-DESC + For more information on rlite visit + https://github.com/seppo0010/rlite DESC s.homepage = "https://github.com/seppo0010/objc-rlite" s.license = 'BSD'
Add reference to rlite repository
diff --git a/app/resources/api/v1/place_resource.rb b/app/resources/api/v1/place_resource.rb index abc1234..def5678 100644 --- a/app/resources/api/v1/place_resource.rb +++ b/app/resources/api/v1/place_resource.rb @@ -2,7 +2,7 @@ module V1 class PlaceResource < JSONAPI::Resource - attributes :name, :place_type, :geometry + attributes :name, :place_type, :geometry, :neighborhood_ids def place_type @model.type @@ -12,6 +12,11 @@ @model.to_geojson end + def neighborhood_ids + return [] if @model.type == 'Neighborhood' + @model.neighborhoods.pluck(:id) + end + end end end
Add neighborhood id collection so frontend can query municipality and all its neighborhoods as a filter
diff --git a/messaging.gemspec b/messaging.gemspec index abc1234..def5678 100644 --- a/messaging.gemspec +++ b/messaging.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'evt-messaging' - s.version = '0.7.1.0' + s.version = '0.7.1.1' s.summary = 'Messaging primitives for Eventide' s.description = ' '
Package version increased from 0.7.1.0 to 0.7.1.1
diff --git a/messaging.gemspec b/messaging.gemspec index abc1234..def5678 100644 --- a/messaging.gemspec +++ b/messaging.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'evt-messaging' - s.version = '0.9.0.0' + s.version = '0.9.0.1' s.summary = 'Messaging primitives for Eventide' s.description = ' '
Package version is increased from 0.9.0.0 to 0.9.0.1
diff --git a/lib/active_record/turntable/algorithm.rb b/lib/active_record/turntable/algorithm.rb index abc1234..def5678 100644 --- a/lib/active_record/turntable/algorithm.rb +++ b/lib/active_record/turntable/algorithm.rb @@ -8,5 +8,16 @@ autoload :RangeBsearchAlgorithm autoload :ModuloAlgorithm end + + def class_for(name_or_class) + case name_or_class + when Algorithm::Base + name_or_class + else + const_get("#{name_or_class.classify}Algorithm") + end + end + + module_function :class_for end end
Add `Algorithm.class_for` method for DSL
diff --git a/lib/coverband/integrations/background.rb b/lib/coverband/integrations/background.rb index abc1234..def5678 100644 --- a/lib/coverband/integrations/background.rb +++ b/lib/coverband/integrations/background.rb @@ -3,6 +3,7 @@ module Coverband class Background @semaphore = Mutex.new + @thread = nil def self.stop return unless @thread
Initialize thread to silence warning
diff --git a/lib/jqgrid_rails/jqgrid_rails_helpers.rb b/lib/jqgrid_rails/jqgrid_rails_helpers.rb index abc1234..def5678 100644 --- a/lib/jqgrid_rails/jqgrid_rails_helpers.rb +++ b/lib/jqgrid_rails/jqgrid_rails_helpers.rb @@ -9,14 +9,15 @@ # key:: ondbl_click_row/on_select_row # Sets up click event functions based on hash values def map_click(key, options) + id_replacement = '000' if(options[key].is_a?(Hash)) @url_gen ||= JqGridRails::UrlGenerator.new args = options[key][:args].to_a - args << '!!' + args << id_replacement if(options[key][:remote]) - options[key] = "function(id){ jQuery.get('#{@url_gen.send(options[key][:url], *args)}'.replace('!!', id)) + '#{options[key][:suffix]}'; }" + options[key] = "function(id){ jQuery.get('#{@url_gen.send(options[key][:url], *args)}'.replace('000', id)) + '#{options[key][:suffix]}'; }" else - options[key] = "function(id){ window.location = '#{@url_gen.send(options[key][:url], *args)}'.replace('!!', id) + '#{options[key][:suffix]}'; }" + options[key] = "function(id){ window.location = '#{@url_gen.send(options[key][:url], *args)}'.replace('000', id) + '#{options[key][:suffix]}'; }" end end end
Use numerical value for ID replacement to allow proper path generation when \d+ restriction is being applied via routing setup
diff --git a/lib/middleware/oauth_state_middleware.rb b/lib/middleware/oauth_state_middleware.rb index abc1234..def5678 100644 --- a/lib/middleware/oauth_state_middleware.rb +++ b/lib/middleware/oauth_state_middleware.rb @@ -5,14 +5,19 @@ def call(env) request = Rack::Request.new(env) - if request.params["state"] + if request.params["state"] && request.params["code"] if oauth_state = OauthState.find_by(state: request.params["state"]) env["oauth.state"] = JSON.parse(oauth_state.payload) || {} application_instance = ApplicationInstance.find_by(lti_key: env["oauth.state"]["oauth_consumer_key"]) env["canvas.url"] = application_instance.lti_consumer_uri oauth_state.destroy + else + raise OauthStateMiddlewareException, "Invalid state in OAuth callback" end end @app.call(env) end end + +class OauthStateMiddlewareException < RuntimeError +end
Check for state if state and code are params are present.
diff --git a/lib/spontaneous/rack/back/site_assets.rb b/lib/spontaneous/rack/back/site_assets.rb index abc1234..def5678 100644 --- a/lib/spontaneous/rack/back/site_assets.rb +++ b/lib/spontaneous/rack/back/site_assets.rb @@ -13,7 +13,7 @@ end def find(env) - apps.map { |app| app.call(env) }.detect { |code, headers, body| code == 200 } + apps.map { |app| app.call(env) }.detect { |code, headers, body| code < 400 } end def apps
Use the first non-error response so that 304 not modified responses are accepted
diff --git a/lib/dox/printers/action_printer.rb b/lib/dox/printers/action_printer.rb index abc1234..def5678 100644 --- a/lib/dox/printers/action_printer.rb +++ b/lib/dox/printers/action_printer.rb @@ -3,7 +3,7 @@ class ActionPrinter < BasePrinter def print(action) - @output.puts "### #{action.name} [#{action.verb} #{action.path}]\n\n#{print_desc(action.desc)}\n\n" + @output.puts "### #{action.name} [#{action.verb.upcase} #{action.path}]\n\n#{print_desc(action.desc)}\n\n" if action.uri_params.present? @output.puts("+ Parameters\n#{formatted_params(action.uri_params)}") @@ -22,7 +22,9 @@ def formatted_params(uri_params) uri_params.map do |param, details| - " + #{CGI.escape(param.to_s)}: `#{CGI.escape(details[:value].to_s)}` (#{details[:type]}, #{details[:required]}) - #{details[:description]}" + desc = " + #{CGI.escape(param.to_s)}: `#{CGI.escape(details[:value].to_s)}` (#{details[:type]}, #{details[:required]})" + desc += "- #{details[:description]}" if details[:description].present? + desc end.flatten.join("\n") end
Print uri params desc if present
diff --git a/brain/spec/spec_helper.rb b/brain/spec/spec_helper.rb index abc1234..def5678 100644 --- a/brain/spec/spec_helper.rb +++ b/brain/spec/spec_helper.rb @@ -19,5 +19,6 @@ config.before { WebMock.disable_net_connect! } end +ENV['ADAM_MEMORY_URL'] = 'http://local.adamrabbit.com:3000' ENV['ADAM_ROOT_DOMAIN'] = 'local.adamrabbit.com:3000' ENV['ADAM_INTERNAL_PASSWORD'] = 'foobar'
[BRAIN] Fix specs to use separate memory URL
diff --git a/Set-1/2.rb b/Set-1/2.rb index abc1234..def5678 100644 --- a/Set-1/2.rb +++ b/Set-1/2.rb @@ -4,6 +4,7 @@ [s].pack('H*').unpack('B*').last.to_i 2 end +public def xor(str1, str2) h1 = treatAsHex str1 h2 = treatAsHex str2
Make xor public of second challenge
diff --git a/manageiq-appliance-dependencies.rb b/manageiq-appliance-dependencies.rb index abc1234..def5678 100644 --- a/manageiq-appliance-dependencies.rb +++ b/manageiq-appliance-dependencies.rb @@ -1,3 +1,2 @@ # Add gems here, in Gemfile syntax, which are dependencies of the appliance itself rather than a part of the ManageIQ application gem "manageiq-appliance_console", "~>3.2", :require => false -gem "manageiq-postgres_ha_admin", "~>2.0", :require => false
Remove manageiq-postgres_ha_admin from the appliance dependencies We use the gem from manageiq's core repo now, so we will move the dependency there. https://bugzilla.redhat.com/show_bug.cgi?id=1391095
diff --git a/lib/hstore-attributes/hstore_columns.rb b/lib/hstore-attributes/hstore_columns.rb index abc1234..def5678 100644 --- a/lib/hstore-attributes/hstore_columns.rb +++ b/lib/hstore-attributes/hstore_columns.rb @@ -23,7 +23,7 @@ return unless table_exists? column = ActiveRecord::ConnectionAdapters::Column.new(attr_name, nil, "#{type}") columns_hash[attr_name.to_s]= column - cast_code = column.type_cast_code('v') + cast_code = column.type_cast('v') access_code = "(v=read_hstore('#{attr_name}', '#{hstore_column}')) && #{cast_code}" class_eval <<-RUBY, __FILE__, __LINE__ + 1
Change type_cast_code to type_cast due to method deprecation in Rails4 See https://github.com/rails/rails/commit/f50c160cd028bd3e16c46dcba7692439daf709c8
diff --git a/certs_manager/lib/acme.rb b/certs_manager/lib/acme.rb index abc1234..def5678 100644 --- a/certs_manager/lib/acme.rb +++ b/certs_manager/lib/acme.rb @@ -1,5 +1,7 @@ module ACME def self.sign(domain) + puts "Signing certificates from #{NAConfig.ca} ..." + command = <<-EOC acme_tiny \ --account-key /var/lib/nginx-acme/account.key \
Add output to indicate which server we are using
diff --git a/lib/screenshot.rb b/lib/screenshot.rb index abc1234..def5678 100644 --- a/lib/screenshot.rb +++ b/lib/screenshot.rb @@ -24,6 +24,6 @@ dir_path = File.dirname(file_path) FileUtils.mkdir_p( dir_path ) unless File.exist?( dir_path ) - system("curl -L --silent -o '#{ file_path }' '#{ api_url }'") + system("curl -L -f --compressed --silent -o '#{ file_path }' '#{ api_url }'") end end
Add `curl` options for errors/gzip transport.
diff --git a/config/initializers/not_live_yet_email_interceptor.rb b/config/initializers/not_live_yet_email_interceptor.rb index abc1234..def5678 100644 --- a/config/initializers/not_live_yet_email_interceptor.rb +++ b/config/initializers/not_live_yet_email_interceptor.rb @@ -0,0 +1,9 @@+class NotLiveYetEmailInterceptor + def self.delivering_email(message) + message.subject = "#{message.to} #{message.subject}" + message.to = [ ENV["GMAIL_USERNAME"] ] + end +end + +ActionMailer::Base.register_interceptor(NotLiveYetEmailInterceptor) if Rails.env.development? +
Add email interceptor to redirect development emails.
diff --git a/core/app/ohm-models/activity/queries.rb b/core/app/ohm-models/activity/queries.rb index abc1234..def5678 100644 --- a/core/app/ohm-models/activity/queries.rb +++ b/core/app/ohm-models/activity/queries.rb @@ -16,7 +16,8 @@ def self.user(gu) Query.where( - gu.channels.map { |ch| {subject: ch, action: 'added_subchannel'}}.flatten + gu.channels.map { |ch| {subject: ch, action: 'added_subchannel'} }.flatten + + gu.created_facts.map { |f| {object: f, action: [:added_supporting_evidence, :added_weakening_evidence]} }.flatten ) end end
Return evidence activities on a graph users created_facts
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index abc1234..def5678 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -8,8 +8,8 @@ raise "Cucumber failed!" unless $?.exitstatus == 0 else ["rake generate_fixtures", "rake spec"].each do |cmd| - puts "Running #{cmd}..." - system("export DISPLAY=:99.0 && bundle exec #{cmd}") + puts "Running bundle exec #{cmd}..." + system("bundle exec #{cmd}") raise "#{cmd} failed!" unless $?.exitstatus == 0 end end
Remove export display for now to see if it affects travis
diff --git a/lib/yard/extra.rb b/lib/yard/extra.rb index abc1234..def5678 100644 --- a/lib/yard/extra.rb +++ b/lib/yard/extra.rb @@ -1,12 +1,26 @@ class File + RELATIVE_PARENTDIR = '..' + + # Turns a path +to+ into a relative path from starting + # point +from+. The argument +from+ is assumed to be + # a filename. To treat it as a directory, make sure it + # ends in {File::SEPARATOR} ('/' on UNIX filesystems). + # + # @param [String] from the starting filename + # (or directory with +from_isdir+ set to +true+). + # + # @param [String] to the final path that should be made relative. + # + # @return [String] the relative path from +from+ to +to+. + # def self.relative_path(from, to) - from = File.expand_path(from).split('/') - to = File.expand_path(to).split('/') + from = expand_path(from).split(SEPARATOR) + to = expand_path(to).split(SEPARATOR) from.length.times do break if from[0] != to[0] from.shift; to.shift end fname = from.pop - join *(from.map { '..' } + to) + join *(from.map { RELATIVE_PARENTDIR } + to) end end
Update relative_path and add documentation
diff --git a/spec/integration/cookbook_spec.rb b/spec/integration/cookbook_spec.rb index abc1234..def5678 100644 --- a/spec/integration/cookbook_spec.rb +++ b/spec/integration/cookbook_spec.rb @@ -13,4 +13,20 @@ it 'creates a .bash_profile' do expect(File).to be_exists("#{ENV['HOME']}/.bash_profile") end + + it 'creates custom plugins' do + expect(File).to be_exists("#{ENV['HOME']}/.bash_it/custom/disable_ctrl-s_output_control.bash") + end + + it 'creates enabled aliases' do + expect(File).to be_exists("#{ENV['HOME']}/.bash_it/aliases/enabled/general.aliases.bash") + end + + it 'creates enabled completions' do + expect(File).to be_exists("#{ENV['HOME']}/.bash_it/completion/enabled/git.completion.bash") + end + + it 'creates enabled plugins' do + expect(File).to be_exists("#{ENV['HOME']}/.bash_it/plugins/enabled/ssh.plugin.bash") + end end
Test LWRP through integration spec. - Apparently it is difficult (or impossible?) to test LWRP w/ ChefSpec :sob:
diff --git a/spec/integration/security_spec.rb b/spec/integration/security_spec.rb index abc1234..def5678 100644 --- a/spec/integration/security_spec.rb +++ b/spec/integration/security_spec.rb @@ -3,6 +3,11 @@ describe "Security: " do context "If no user is present" do + + before(:all) do + Alchemy::User.delete_all + end + it "render the signup view" do visit '/alchemy/' within('#alchemy_greeting') { page.should have_content('Signup') }
Truncate users table before security integration test.
diff --git a/spec/quandl/quandl-config_spec.rb b/spec/quandl/quandl-config_spec.rb index abc1234..def5678 100644 --- a/spec/quandl/quandl-config_spec.rb +++ b/spec/quandl/quandl-config_spec.rb @@ -1,19 +1,27 @@ require 'spec_helper' describe Quandl::Config do + subject(:configuration) { Quandl::Config.new('fake') } + describe '.initialize' do it 'generates a Config class, evaluating ERB' do - configuration = Quandl::Config.new('fake') + expect(configuration['notifiers']['ci']['channel']).to eq('#development') + end + end + describe 'accessing values' do + it 'can access values as methods' do expect(configuration['notifiers']['ci']['channel']).to eq('#development') + end + + it 'can access values as hash table' do + expect(configuration.notifiers['ci']['channel']).to eq('#development') end end describe '#configurable_attributes' do it 'provides a list of configurable attributes' do - configuration = Quandl::Config.new('fake') - - expect(configuration.configurable_attributes).to eq([:webhook_url, :notifiers]) + expect(configuration.configurable_attributes).to match_array([:webhook_url, :notifiers]) end end end
Fix up some basic tests.
diff --git a/spec/support/active_model_lint.rb b/spec/support/active_model_lint.rb index abc1234..def5678 100644 --- a/spec/support/active_model_lint.rb +++ b/spec/support/active_model_lint.rb @@ -4,6 +4,11 @@ shared_examples_for "ActiveModel" do include ActiveModel::Lint::Tests include Test::Unit::Assertions + attr_writer :assertions + + def assertions + @assertions ||= 0 + end before { @model = subject }
Update specs to pass with minitest 5
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -7,7 +7,6 @@ version '0.2.0' depends 'apache2' -depends 'chef-solo-search' depends 'database' depends 'iptables' depends 'mysql'
Drop chef-solo-search from direct dependencies
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'Apache 2.0' description 'Installs/Configures TYPO3' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.6.0' +version '0.7.0' %w{
Increase version number to 0.7.0
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -2,7 +2,7 @@ maintainer 'Alexander Pyatkin' maintainer_email '[email protected]' license 'MIT' -version '1.4.6' +version '1.4.7' description 'Installs and configures email server' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) @@ -16,7 +16,7 @@ depends 'chef_nginx', '~> 6.0.1' depends 'tls', '~> 3.0.0' -depends 'poise-python', '~> 1.6.0' +depends 'poise-python', '>= 1.6.0' depends 'localdns', '~> 1.1.0'
Fix strict poise-python version dependency
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -15,7 +15,7 @@ depends 'php' depends 'nginx' depends 'nodejs' -depends 'mysql' +depends 'mysql', '~>5.6.1' depends 'redisio' depends 'ntp' depends 'git'
Add version lock on mysql recipe
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'All rights reserved' description 'Installs/Configures Server' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '1.2.1' +version '1.3.1' recipe "appsindo", "Default" @@ -16,7 +16,7 @@ depends 'mongodb', '~> 0.16.2' depends 'mysql', '~>5.6.1' depends 'redisio', '~>2.3.0' -depends 'ntp', '~>1.8.2' +depends 'ntp', '~>1.8.6' depends 'git', '~>4.1.0' depends 'cron', '~>1.6.1'
Upgrade the version due to changes
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,9 @@ maintainer_email '[email protected]' license 'mit' description 'Installs/Configures Sysmon from the Sysinternals suite' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) long_description 'Installs/Configures from the Sysinternals suite' version '0.1.0' +supports 'windows' depends 'windows'
Add long_description and supports 'windows' Adding the supports improves search in Supermarket
diff --git a/librarian.gemspec b/librarian.gemspec index abc1234..def5678 100644 --- a/librarian.gemspec +++ b/librarian.gemspec @@ -26,5 +26,5 @@ s.add_development_dependency "aruba" s.add_development_dependency "webmock" - s.add_development_dependency "chef", ">= 0.10" + s.add_dependency "chef", ">= 0.10" end
Add chef gem to runtime dependency list.
diff --git a/GPUImage.podspec b/GPUImage.podspec index abc1234..def5678 100644 --- a/GPUImage.podspec +++ b/GPUImage.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GPUImage-NoAlpha' - s.version = '0.1.5.2' + s.version = '0.1.6' s.license = 'BSD' s.summary = 'An open source iOS framework for GPU-based image and video processing.' s.homepage = 'https://github.com/DepositDev/GPUImage'
Change pod version to 3-digit number.
diff --git a/test/integration/helpers/serverspec/support/install_common.rb b/test/integration/helpers/serverspec/support/install_common.rb index abc1234..def5678 100644 --- a/test/integration/helpers/serverspec/support/install_common.rb +++ b/test/integration/helpers/serverspec/support/install_common.rb @@ -27,7 +27,7 @@ it_behaves_like 'a kafka directory' it 'contains kafka-run-class.sh' do - expect(files.grep(/kafka-run-class\.sh$/)).to be true + expect(files.grep(/kafka-run-class\.sh$/)).to_not be_empty end describe '/opt/kafka/bin/kafka-run-class.sh' do
Fix broken integration test of “installed” file(s) Of course `Array#grep` returns a list, not true/false, duh.
diff --git a/optional/capi/data_spec.rb b/optional/capi/data_spec.rb index abc1234..def5678 100644 --- a/optional/capi/data_spec.rb +++ b/optional/capi/data_spec.rb @@ -30,6 +30,10 @@ @s.change_struct(a, 100) @s.get_struct(a).should == 100 end + + it "raises a TypeError if the object does not wrap a struct" do + lambda { @s.get_struct(Object.new) }.should raise_error(TypeError) + end end describe "DATA_PTR" do
Add a spec for calling `RDATA` on a non data wrapper.
diff --git a/partial_ks.gemspec b/partial_ks.gemspec index abc1234..def5678 100644 --- a/partial_ks.gemspec +++ b/partial_ks.gemspec @@ -10,7 +10,7 @@ gem.has_rdoc = false gem.author = "Thong Kuah" gem.email = "[email protected]" - gem.homepage = "https://github.com/powershop/partial_ks" + gem.homepage = "https://github.com/fluxfederation/partial_ks" gem.license = "MIT" gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
Update homepage as org has been renamed
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 @@ -41,6 +41,10 @@ } end +Then /^(?:a|the) lockfile is (?:created|updated) and matches with:$/ do |content| + check_file_content('.'.to_lockfile_path, /#{content}/, true) +end + Then /^(?:a|the) lockfile is not created$/ do steps %Q{ Then a file named "#{'.'.to_lockfile_path}" should not exist
Define a step to verify lockfile with regexp
diff --git a/features/step_definitions/resource_steps.rb b/features/step_definitions/resource_steps.rb index abc1234..def5678 100644 --- a/features/step_definitions/resource_steps.rb +++ b/features/step_definitions/resource_steps.rb @@ -28,5 +28,5 @@ resource_model = find_model(resource_model) accessible = resource_model.accessible_by(actor) - expect(accessible).to match(resources) + expect(accessible).to match_array(resources) end
Use the correct matcher for arrays
diff --git a/SPTPersistentCache.podspec b/SPTPersistentCache.podspec index abc1234..def5678 100644 --- a/SPTPersistentCache.podspec +++ b/SPTPersistentCache.podspec @@ -20,6 +20,5 @@ s.source_files = "include/SPTPersistentCache/*.h", "Sources/*.{h,m}" s.public_header_files = "include/SPTPersistentCache/*.h" s.xcconfig = { 'OTHER_LDFLAGS' => '-lObjC' } - s.module_map = 'include/SPTPersistentCache/module.modulemap' end
Remove reference to modulemap in podspec - It doesn’t exist anymore.
diff --git a/NSURL+QueryDictionary.podspec b/NSURL+QueryDictionary.podspec index abc1234..def5678 100644 --- a/NSURL+QueryDictionary.podspec +++ b/NSURL+QueryDictionary.podspec @@ -9,6 +9,7 @@ s.source = { :git => "https://github.com/itsthejb/NSURL-QueryDictionary.git", :tag => "v" + s.version.to_s } s.ios.deployment_target = '6.1' s.osx.deployment_target = '10.8' + s.watchos.deployment_target = '2.0' s.source_files = s.name + '/*.{h,m}' s.frameworks = 'Foundation' s.requires_arc = true
[watchos] Add support for watchOS 2