diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/config/environment.rb b/config/environment.rb index abc1234..def5678 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -22,3 +22,7 @@ } end +# Fix the bug described here:http://stackoverflow.com/questions/9122411/rails-javascript-too-many-parameter-keys-whats-a-good-way-to-normalize-f +# Allows the CLSI to handle large POST requests +Rack::Utils.key_space_limit = 262144 +
Fix 'exceeded available parameter key space' with large POST requests
diff --git a/Casks/razer-synapse.rb b/Casks/razer-synapse.rb index abc1234..def5678 100644 --- a/Casks/razer-synapse.rb +++ b/Casks/razer-synapse.rb @@ -1,6 +1,6 @@ cask :v1 => 'razer-synapse' do - version '1.41' - sha256 'f8fce465114da56f6d5f0771429b1f118ac547c77b9b05d3f84333f8d94b5019' + version '1.44' + sha256 '63c739c78d4f537ec64b32126fc358fba4840194296e45bd7c22638af6529984' # amazonaws.com is the official download host per the vendor homepage url "https://razerdrivers.s3.amazonaws.com/drivers/Synapse2/mac/Razer_Synapse_Mac_Driver_v#{version}.dmg" @@ -13,5 +13,23 @@ depends_on :macos => '>= :lion' uninstall :script => '/Applications/Utilities/Uninstall Razer Synapse.app/Contents/MacOS/Uninstall Razer Synapse', - :pkgutil => 'com.razerzone.*' + :pkgutil => 'com.razerzone.*', + :quit => [ + 'com.razerzone.RzUpdater', + 'com.razerzone.rzdeviceengine' + ], + :launchctl => [ + 'com.razer.rzupdater', + 'com.razerzone.rzdeviceengine' + ] + + zap :delete => [ + '~/Library/Preferenecs/com.razer.*', + '~/Library/Preferenecs/com.razerzone.*' + ] + + caveats do + reboot + end + end
Update Razer Synapse to 1.44 - update to version 1.44.1 - add zap stanza - add pkgutil, quit, and launchctl to uninstall stanza
diff --git a/core/string/unpack/z_spec.rb b/core/string/unpack/z_spec.rb index abc1234..def5678 100644 --- a/core/string/unpack/z_spec.rb +++ b/core/string/unpack/z_spec.rb @@ -20,4 +20,9 @@ ["\x00a\x00 bc \x00", ["", "c"]] ].should be_computed_by(:unpack, "Z5Z") end + + it "does not advance past the null byte when given a 'Z' format specifier" do + "a\x00\x0f".unpack('Zxc').should == ['a', 15] + "a\x00\x0f".unpack('Zcc').should == ['a', 0, 15] + end end
Add specs for consuming null byte.
diff --git a/lib/appsignal/integrations/delayed_job_plugin.rb b/lib/appsignal/integrations/delayed_job_plugin.rb index abc1234..def5678 100644 --- a/lib/appsignal/integrations/delayed_job_plugin.rb +++ b/lib/appsignal/integrations/delayed_job_plugin.rb @@ -6,7 +6,7 @@ invoke_with_instrumentation(job, block) end - lifecycle.after(:loop) do |loop| + lifecycle.after(:execute) do |execute| Appsignal.stop end end
Change Delayed Job callback from loop to execute
diff --git a/lib/cognizant/process/conditions/memory_usage.rb b/lib/cognizant/process/conditions/memory_usage.rb index abc1234..def5678 100644 --- a/lib/cognizant/process/conditions/memory_usage.rb +++ b/lib/cognizant/process/conditions/memory_usage.rb @@ -0,0 +1,32 @@+module Cognizant + class Process + module Conditions + class MemoryUsage < Condition + MB = 1024 ** 2 + FORMAT_STR = "%d%s" + MB_LABEL = "MB" + KB_LABEL = "KB" + + def initialize(options = {}) + @above = options[:above] + end + + def run(pid) + System.memory_usage(pid).to_f + end + + def check(value) + value.kilobytes > @above + end + + def format_value(value) + if value.kilobytes >= MB + FORMAT_STR % [(value / 1024).round, MB_LABEL] + else + FORMAT_STR % [value, KB_LABEL] + end + end + end + end + end +end
Add a memory usage condition.
diff --git a/lib/infinity_test/core/continuous_test_server.rb b/lib/infinity_test/core/continuous_test_server.rb index abc1234..def5678 100644 --- a/lib/infinity_test/core/continuous_test_server.rb +++ b/lib/infinity_test/core/continuous_test_server.rb @@ -3,14 +3,14 @@ class ContinuousTestServer attr_reader :base delegate :binary, :command_arguments, to: :test_framework - delegate :infinity_and_beyond, to: :base + delegate :infinity_and_beyond, :notifications, to: :base def initialize(base) @base = base end def start - run_strategy + notify!(run_strategy) start_observer end @@ -20,6 +20,14 @@ # PENDING: run_before_callbacks strategy.run # PENDING: run_after_callbacks + end + + def notify!(strategy_result) + Core::Notifier.notify!( + notify_library: notifications, + strategy_result: strategy_result, + test_framework: test_framework + ) end # Start to monitoring files in the project.
Add a Poc for notifications code. Put the instantiation code in continuous test server.
diff --git a/dartsduino-games-x01.gemspec b/dartsduino-games-x01.gemspec index abc1234..def5678 100644 --- a/dartsduino-games-x01.gemspec +++ b/dartsduino-games-x01.gemspec @@ -8,8 +8,8 @@ spec.version = Dartsduino::Games::X01::VERSION spec.authors = ["Ikuo Terado"] spec.email = ["eqobar@gmail.com"] - spec.summary = %q{TODO: Write a short summary. Required.} - spec.description = %q{TODO: Write a longer description. Optional.} + spec.summary = %q{dartsduino games: X01 (301/501/701).} + spec.description = %q{dartsduino games: X01 (301/501/701).} spec.homepage = "" spec.license = "MIT"
Update gem's summary and description
diff --git a/bump-version.rb b/bump-version.rb index abc1234..def5678 100644 --- a/bump-version.rb +++ b/bump-version.rb @@ -0,0 +1,50 @@+#!/usr/bin/ruby + +if not ARGV.empty? then + version_str = ARGV.first + version_array = ARGV.first.split('.') + if version_array.size == 3 then + major = version_array[0] + minor = version_array[1] + patch = version_array[2] + puts "Major: #{major}" + puts "Minor: #{minor}" + puts "Patch: #{patch}" + + script_dir_name = File.expand_path(File.dirname(__FILE__)) + + # CMakeLists.txt + path_CMakeLists_txt = "#{script_dir_name}/CMakeLists.txt" + CMakeLists_txt = File.open(path_CMakeLists_txt, "r").read + CMakeLists_txt.sub!(/(set\(GMIO_VERSION_MAJOR\s+)\d+/, "\\1#{major}") + CMakeLists_txt.sub!(/(set\(GMIO_VERSION_MINOR\s+)\d+/, "\\1#{minor}") + CMakeLists_txt.sub!(/(set\(GMIO_VERSION_PATCH\s+)\d+/, "\\1#{patch}") + File.open(path_CMakeLists_txt, "w").write(CMakeLists_txt) + puts "Bumped #{path_CMakeLists_txt}" + + # README.md + path_README_md = "#{script_dir_name}/README.md" + README_md = File.open(path_README_md, "r").read + README_md.sub!( + /(img\.shields\.io\/badge\/version\-v)\d+\.\d+\.\d+/, + "\\1#{version_str}") + README_md.gsub!( + /(www\.fougue\.pro\/docs\/gmio\/)\d+\.\d+/, + "\\1#{major}.#{minor}") + File.open(path_README_md, "w").write(README_md) + puts "Bumped #{path_README_md}" + + # appveyor.yml + path_appveyor_yml = "#{script_dir_name}/appveyor.yml" + appveyor_yml = File.open(path_appveyor_yml, "r").read + appveyor_yml.sub!( + /(version:\s+)\d+\.\d+(_build)/, + "\\1#{major}.#{minor}\\2") + File.open(path_appveyor_yml, "w").write(appveyor_yml) + puts "Bumped #{path_appveyor_yml}" + else + puts "Error: wrong version format(maj.min.patch)" + end +else + puts "Error: no version argument" +end
Add script to automate version bumping
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index abc1234..def5678 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -3,9 +3,15 @@ module ActionController class NonInferrableControllerError < ActionControllerError def initialize(name) + @name = name super "Unable to determine the controller to test from #{name}. " + "You'll need to specify it using 'tests YourController' in your " + - "test case definition" + "test case definition. This could mean that #{inferred_controller_name} does not exist " + + "or it contains syntax errors" + end + + def inferred_controller_name + @name.sub(/Test$/, '') end end
Make the non inferrable controller message a little friendlier. [Koz] git-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@8749 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
diff --git a/Library/Homebrew/os.rb b/Library/Homebrew/os.rb index abc1234..def5678 100644 --- a/Library/Homebrew/os.rb +++ b/Library/Homebrew/os.rb @@ -4,7 +4,7 @@ end def self.linux? - /linux/i === RUBY_PLATFORM + /linux/i === RUBY_PLATFORM || /linux/i === RbConfig::CONFIG["host_os"] end require "os/mac"
Fix OS detection for JRuby on Linuxbrew Included an extra check for whether the OS was Linux or not. RUBY_PLATFORM returns "java" on Linux if using JRuby, which is Fedora's default, for example. Closes Homebrew/linuxbrew#653. Signed-off-by: Shaun Jackman <b580dab3251a9622aba3803114310c23fdb42900@gmail.com>
diff --git a/app/controllers/spree/admin/look_book_image_products_controller.rb b/app/controllers/spree/admin/look_book_image_products_controller.rb index abc1234..def5678 100644 --- a/app/controllers/spree/admin/look_book_image_products_controller.rb +++ b/app/controllers/spree/admin/look_book_image_products_controller.rb @@ -5,7 +5,7 @@ def update_positions ActiveRecord::Base.transaction do params[:positions].each do |id, index| - model_class.find(id).set_list_position(index) + model_class.find(id).insert_at(index) end end
Use insert_at for placing an item at the correct index
diff --git a/has_magic_columns.gemspec b/has_magic_columns.gemspec index abc1234..def5678 100644 --- a/has_magic_columns.gemspec +++ b/has_magic_columns.gemspec @@ -14,7 +14,7 @@ s.date = Date.today s.files = `git ls-files`.split("\n") - s.test_files = `git ls-files -- {test,spec,features}/`.split("\n") + s.test_files = `git ls-files -- spec/`.split("\n") s.require_paths = ["lib"] s.add_dependency("activesupport", ["~> 3.0"])
Test cases now live in the spec directory
diff --git a/server/roles/bootstrap/spec/create-user.rb b/server/roles/bootstrap/spec/create-user.rb index abc1234..def5678 100644 --- a/server/roles/bootstrap/spec/create-user.rb +++ b/server/roles/bootstrap/spec/create-user.rb @@ -5,3 +5,13 @@ # |_.__/ \___/ \___/ \__|___/\__|_| \__,_| .__/_/ |___/ .__/ \___|\___| # |_| |_| # create-user +unixusers = %w|admin| + +unixusers.each do |v| + # Test each user + describe user(v) do + it { should exist } + it { should have_home_directory('/home/' + v ) } + end +end +
Add test code for checking user
diff --git a/app/helpers/startups_helper.rb b/app/helpers/startups_helper.rb index abc1234..def5678 100644 --- a/app/helpers/startups_helper.rb +++ b/app/helpers/startups_helper.rb @@ -1,2 +1,11 @@ module StartupsHelper + def market_names(markets) + markets.map { |market| market.name } + end + + def market_names_list(markets) + market_names(markets).each do |market| + concat content_tag(:li, market, class: 'markets') + end + end end
Add startup helper methods for getting names and generating markup
diff --git a/recipes/install_remoteservices.rb b/recipes/install_remoteservices.rb index abc1234..def5678 100644 --- a/recipes/install_remoteservices.rb +++ b/recipes/install_remoteservices.rb @@ -45,3 +45,7 @@ action [:enable, :start] end end + +service "abiquo-tomcat" do + action :nothing +end
Define the tomcat service when installing the remote services
diff --git a/db/seeds/maintainer_users.rb b/db/seeds/maintainer_users.rb index abc1234..def5678 100644 --- a/db/seeds/maintainer_users.rb +++ b/db/seeds/maintainer_users.rb @@ -1,5 +1,5 @@ if Rails.env.development? || ENV['STAGING'] - names = %w[kevin rachel] + names = %w[kevin rachel austin] names.each do |name| User.find_or_create_by!(email: "#{name}@odin.com") do |user|
Add name to maintainer seeds
diff --git a/spec/boulangerie_spec.rb b/spec/boulangerie_spec.rb index abc1234..def5678 100644 --- a/spec/boulangerie_spec.rb +++ b/spec/boulangerie_spec.rb @@ -5,15 +5,27 @@ { example_key_id => "totally secret key I swear" } end + it "raises NotConfiguredError unless configured" do + expect { described_class.default }.to raise_error(described_class::NotConfiguredError) + end + it "initializes a default Boulangerie" do - expect { described_class.default }.to raise_error(described_class::NotConfiguredError) - - described_class.setup( + boulangerie = described_class.new( schema: fixture_path.join("example_schema.yml"), keys: example_keys, key_id: example_key_id ) - expect(described_class.default).to be_a described_class + expect(boulangerie).to be_a described_class + end + + it "initializes from a Schema class instead of a path" do + boulangerie = described_class.new( + schema: Boulangerie::Schema.from_yaml(fixture_path.join("example_schema.yml").read), + keys: example_keys, + key_id: example_key_id + ) + + expect(boulangerie).to be_a described_class end end
Test initializing with a Schema class
diff --git a/spec/config_test_spec.rb b/spec/config_test_spec.rb index abc1234..def5678 100644 --- a/spec/config_test_spec.rb +++ b/spec/config_test_spec.rb @@ -12,6 +12,7 @@ stubs = stub_faraday_request expect(Rnotifier::ConfigTest.test).to be_true + expect(Rnotifier::Config.api_key).to eq 'API-KEY' expect {stubs.verify_stubbed_calls }.to_not raise_error end @@ -26,6 +27,7 @@ Rnotifier::Config.init expect(Rnotifier::Config.valid?).to be_true + expect(Rnotifier::Config.api_key).to eq 'API-KEY' expect(Rnotifier::ConfigTest.test).to be_true expect {stubs.verify_stubbed_calls }.to_not raise_error end
Check for api key in config test spec
diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index abc1234..def5678 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -0,0 +1,76 @@+require 'rails_helper' + +RSpec.describe 'Integration Test', :type => :request do + let(:url) { '/posts/1234?categoryFilter[categoryName][]=food' } + let(:headers) do + { "CONTENT_TYPE" => "application/json", 'X-Key-Inflection' => 'camel' } + end + let(:params) do + { 'post' => { 'authorName' => 'John Smith' } } + end + + context "when the X-Key-Inflection HTTP header is set to 'camel'" do + it "should transform response keys to camel case" do + put_request + + payload = JSON.parse(response.body) + + expect(payload['postAuthorName']).to eq 'John Smith' + expect(payload['categoryFilterName']).to eq ['food'] + end + + it "should set the controller's params to be underscored for the request/query parameters" do + put_request + + req_params = JSON.parse(request.env['params_spy'].to_json).with_indifferent_access + + expect(req_params).to include(post: { author_name: 'John Smith' }, category_filter: { category_name: ['food'] }) + end + + it "should NOT transform the path params in the controller's params" do + put_request + + req_params = JSON.parse(request.env['params_spy'].to_json).with_indifferent_access + + expect(req_params).to include(postId: "1234") + end + end + + context "when the X-Key-Inflection HTTP header is not set" do + let(:headers) { { "CONTENT_TYPE" => "application/json" } } + + it "should NOT transform response keys" do + put_request + + payload = JSON.parse(response.body) + + expect(payload['postAuthorName']).to be_nil + expect(payload['categoryFilterName']).to be_nil + expect(payload).to include('post_author_name', 'category_filter_name') + end + + it "should NOT transform the controller's params' keys" do + put_request + + req_params = JSON.parse(request.env['params_spy'].to_json).with_indifferent_access + + expect(req_params).to include(params) + end + + it "should NOT transform the path params in the controller's params" do + put_request + + req_params = JSON.parse(request.env['params_spy'].to_json).with_indifferent_access + + expect(req_params).to include(postId: "1234") + end + end + + def put_request + if Rails::VERSION::MAJOR >= 5 + put url, params: params.to_json, headers: headers + else + put url, params.to_json, headers + end + end +end
Add integration test for middleware
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index abc1234..def5678 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -19,4 +19,10 @@ expect(user.password).to eq("password") end end + + describe "Invalid username" do + it "is invalid without a username" do + expect { User.new(:user, username: nil) }.to raise_error(ArgumentError) + end + end end
Add rspect to user model - raise error for invalid username - success
diff --git a/spec/tic_tac_toe_spec.rb b/spec/tic_tac_toe_spec.rb index abc1234..def5678 100644 --- a/spec/tic_tac_toe_spec.rb +++ b/spec/tic_tac_toe_spec.rb @@ -45,10 +45,10 @@ expect(@board.pos 10).to eq(nil) end - def do_winning_test board, mark - board.move 0, mark - board.move 1, mark - board.move 2, mark + def do_winning_test board, mark, places + places.each do |n| + board.move n, mark + end expect(board.won).to eq mark end @@ -56,7 +56,7 @@ it 'knows when someone has won' do ["X", "O"].each do |mark| board = TicTacToe::Board.new - do_winning_test board, mark + do_winning_test board, mark, [0, 1, 2] end end
Add ability to test winning at arbitrary places
diff --git a/app/controllers/api/v1/nightbot_controller.rb b/app/controllers/api/v1/nightbot_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/v1/nightbot_controller.rb +++ b/app/controllers/api/v1/nightbot_controller.rb @@ -10,7 +10,7 @@ render text: format('Now playing: %s - %s', track.artist, track.name) when 'playlist' plays = Play.where(played_at: nil) - render text: plays.map { |play| play.track.name }.reverse.join(', ') + render text: plays.map { |play| play.track.name }.reverse.inspect when /request\s+(?<name>.+)/ name = Regexp.last_match(:name) track = Track.find_by(name: name)
Fix response of empty playlist of Nightbot API
diff --git a/app/controllers/credit_invoices_controller.rb b/app/controllers/credit_invoices_controller.rb index abc1234..def5678 100644 --- a/app/controllers/credit_invoices_controller.rb +++ b/app/controllers/credit_invoices_controller.rb @@ -6,7 +6,7 @@ :customer_id => current_tenant.company.id, :state => 'booked', :value_date => Date.today, - :due_date => Date.today.in(30.days) + :due_date => Date.today.in(30.days).to_date } # Set default parameters
Use .to_date in pre seeded due_date on credit_invoices.
diff --git a/app/controllers/settings/import_controller.rb b/app/controllers/settings/import_controller.rb index abc1234..def5678 100644 --- a/app/controllers/settings/import_controller.rb +++ b/app/controllers/settings/import_controller.rb @@ -8,23 +8,30 @@ hide_cover_image if params[:animelist] + file = params[:animelist] begin - if params[:animelist].content_type == "text/xml" - xml = params[:animelist].read - else - gz = Zlib::GzipReader.new(params[:animelist]) + # Check the magic number for gzip because some browsers are stupid + # Many users are uploading zipped-up lists with a text/xml MIME + if file.readpartial(3) == 0x1F_8B_08 + gz = Zlib::GzipReader.new(file) xml = gz.read gz.close + elsif file.content_type.include?('xml') + xml = file.read + else + raise "Unknown format" end xml = XMLCleaner.clean(xml) + + raise "Blank file" if xml.blank? current_user.update_column :mal_import_in_progress, true MyAnimeListImportApplyWorker.perform_async(current_user.id, xml) mixpanel.track "Imported from MyAnimeList", {email: current_user.email} if Rails.env.production? - rescue - flash[:error] = "There was a problem importing your anime list. Please send an email to <a href='mailto:vikhyat@hummingbird.me'>vikhyat@hummingbird.me</a> with the file you are trying to import.".html_safe + rescue Exception => e + flash[:error] = "There was a problem importing your anime list (#{e.message}). Please send an email to <a href='mailto:vikhyat@hummingbird.me'>vikhyat@hummingbird.me</a> with the file you are trying to import.".html_safe redirect_to "/users/edit" return end
Improve handling of really stupid browsers
diff --git a/app/models/project_score_calculation_batch.rb b/app/models/project_score_calculation_batch.rb index abc1234..def5678 100644 --- a/app/models/project_score_calculation_batch.rb +++ b/app/models/project_score_calculation_batch.rb @@ -1,4 +1,28 @@ class ProjectScoreCalculationBatch + def self.run(platform, limit = 5000) + # pull project ids from start of redis sorted set + key = queue_key(platform) + project_ids = REDIS.multi do + REDIS.zrange key, 0, limit-1 + REDIS.zremrangebyrank key, 0, limit-1 + end.first + + # process + batch = ProjectScoreCalculationBatch.new(platform, project_ids) + new_project_ids = batch.process + + # put resulting ids back in the end of the set + enqueue(platform, new_project_ids) + end + + def self.enqueue(platform, project_ids) + REDIS.zadd(queue_key(platform), project_ids.map{|id| [Time.now.to_i, id] }) + end + + def self.queue_key(platform) + "project_score:#{platform.downcase}" + end + def initialize(platform, project_ids) @platform = platform @project_ids = project_ids
Add redis set for managing recursive project score calcualtion batches
diff --git a/app/models/solidus_paypal_braintree/source.rb b/app/models/solidus_paypal_braintree/source.rb index abc1234..def5678 100644 --- a/app/models/solidus_paypal_braintree/source.rb +++ b/app/models/solidus_paypal_braintree/source.rb @@ -1,6 +1,7 @@ class SolidusPaypalBraintree::Source < ApplicationRecord belongs_to :user, class_name: "Spree::User" belongs_to :payment_method, class_name: 'Spree::PaymentMethod' + has_many :payments, as: :source, class_name: "Spree::Payment" belongs_to :customer, class_name: "SolidusPaypalBraintree::Customer"
Add AR relation from Source to Payment
diff --git a/app/helpers/admin/paths_helper.rb b/app/helpers/admin/paths_helper.rb index abc1234..def5678 100644 --- a/app/helpers/admin/paths_helper.rb +++ b/app/helpers/admin/paths_helper.rb @@ -20,10 +20,6 @@ "/admin/editions/#{edition.to_param}" end - def clone_edition_path(edition, conversions) - send("clone_admin_edition_path", edition, conversions) - end - def view_edition_path(edition) "/admin?with=#{edition.id}" end
Remove clone edition path helper as the method won't exist
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 @@ -10,6 +10,16 @@ end def open_source_url - "https://github.com/buildkite/docs/tree/master/pages/TODO.md.erb" + # This dirty hack grabs the filename for the current ERB file being rendered + view_path = @page.instance_variable_get(:@filename) + + view_file = view_path.to_s. + sub(Rails.root.to_s, ''). + # /app/views/pages are a symlink to /pages at the moment, and you can't link + # to them on GitHub. So until we remove the symlink, we'll just rewrite the + # URL so it points to the /pages version. + sub('/app/views/pages', '/pages') + + "https://github.com/buildkite/docs/tree/master#{view_file}" end end
Fix the Github contribute link
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 @@ -2,7 +2,7 @@ def gravatar_image_tag(email, size = 16) hash = Digest::MD5.hexdigest(email.strip.downcase) - image_tag "https://www.gravatar.com/avatar/#{hash}?s=#{size}&d=identicon", :size => "#{size}x#{size}" + image_tag "https://secure.gravatar.com/avatar/#{hash}?s=#{size}&d=identicon", :size => "#{size}x#{size}" end end
Use actual secure gravatar URL
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 @@ -44,16 +44,10 @@ end def current_main_navigation_path(parameters) - case parameters[:controller] - when "common" - if parameters[:action] == 'services' - services_path - end - when "fco" - services_path - when "licensing" - services_path - end + # Currently, everything in Limelight lives under the "Services" main nav + # item. As we add datainsight-frontend in, this method will need to get + # smarter. + services_path end end
Make navigation highlighting method more dumb People sometimes forget to add their controllers to this method, so for now everything in Limelight is "Services".
diff --git a/app/models/concerns/squishable.rb b/app/models/concerns/squishable.rb index abc1234..def5678 100644 --- a/app/models/concerns/squishable.rb +++ b/app/models/concerns/squishable.rb @@ -12,7 +12,7 @@ attributes.each do |attribute| class_eval <<-RUBY def #{attribute}=(attribute) - self[:#{attribute}] = attribute.try(:squish) + super(attribute.try(:squish)) end RUBY end
Use super when overwriting default accessors
diff --git a/Casks/brackets.rb b/Casks/brackets.rb index abc1234..def5678 100644 --- a/Casks/brackets.rb +++ b/Casks/brackets.rb @@ -3,4 +3,5 @@ homepage 'http://brackets.io' version 'sprint-24' sha1 '279912a34b788fa7e40528b8581df947de1e58ac' + link :app, 'Brackets Sprint 24.app' end
Add the missing `link` line.
diff --git a/natero/natero.gemspec b/natero/natero.gemspec index abc1234..def5678 100644 --- a/natero/natero.gemspec +++ b/natero/natero.gemspec @@ -18,7 +18,7 @@ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.require_paths = 'lib' + spec.require_paths = ['lib'] spec.add_dependency 'httparty', '~> 0.13' spec.add_development_dependency 'bundler', '~> 1.11'
Use array, fails on older Ruby versions
diff --git a/config.ru b/config.ru index abc1234..def5678 100644 --- a/config.ru +++ b/config.ru @@ -1,12 +1,11 @@ # This file is used by Rack-based servers to start the application. +ENV["RAILS_RELATIVE_URL_ROOT"] ||= "/" require ::File.expand_path('../config/environment', __FILE__) if defined? PhusionPassenger run Shreds::Application else - ENV["RAILS_RELATIVE_URL_ROOT"] ||= "/" - map ENV["RAILS_RELATIVE_URL_ROOT"] do run Shreds::Application end
Move env assignment out, so rails wont detect it as nil at boot
diff --git a/recipes/default.rb b/recipes/default.rb index abc1234..def5678 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,5 +1,5 @@-package libxml-xpath-perl -package gdal-bin +package "libxml-xpath-perl" +package "gdal-bin" git "/root/xml-to-csv" do repository "https://github.comjjshoe/xml-to-csv"
Fix a bug where by package names wern't enclosed as strings
diff --git a/recipes/default.rb b/recipes/default.rb index abc1234..def5678 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -22,5 +22,5 @@ # Install dynect gem for usage within Chef runs chef_gem 'dynect_rest' do action :install - compile_time false if Chef::Resource::ChefGem.method_defined?(:compile_time) + compile_time false end
Remove chef 11 compatibility in chef_gem Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/recipes/smartos.rb b/recipes/smartos.rb index abc1234..def5678 100644 --- a/recipes/smartos.rb +++ b/recipes/smartos.rb @@ -17,18 +17,11 @@ # limitations under the License. # -include_recipe 'pkgin' - %w{ - gcc47 - gcc47-runtime - scmgit-base - gmake - pkg-config - binutils + build-essential }.each do |pkg| - r = pkgin_package pkg do + r = package pkg do action( node['build_essential']['compiletime'] ? :nothing : :install ) end r.run_action(:install) if node['build_essential']['compiletime']
Switch SmartOS to use build-essentials with package provider
diff --git a/lib/happy/extras/action_controller.rb b/lib/happy/extras/action_controller.rb index abc1234..def5678 100644 --- a/lib/happy/extras/action_controller.rb +++ b/lib/happy/extras/action_controller.rb @@ -13,8 +13,16 @@ # /foo/123 # foo (with params['id'] set to 123) # class ActionController < Happy::Controller + + protected + def dispatch_to_method(name) - send(name) if public_methods.include?(name.to_sym) + # Only dispatch to public methods + if public_methods.include?(name.to_sym) + send name + else + raise Errors::NotFound + end end def route
Fix method visibility for ActionController
diff --git a/lib/less-rails-fontawesome/version.rb b/lib/less-rails-fontawesome/version.rb index abc1234..def5678 100644 --- a/lib/less-rails-fontawesome/version.rb +++ b/lib/less-rails-fontawesome/version.rb @@ -2,7 +2,7 @@ module Awesome module Less module Rails - VERSION = "0.1.0" + VERSION = "0.2.0" end end end
Upgrade to Font Awesome v2.0
diff --git a/lib/metasploit/cache/payload/stage.rb b/lib/metasploit/cache/payload/stage.rb index abc1234..def5678 100644 --- a/lib/metasploit/cache/payload/stage.rb +++ b/lib/metasploit/cache/payload/stage.rb @@ -1,5 +1,5 @@ # Namespace for stage payload Metasploit Module cache metadata, including -# {Metasploit::Cache::Payload::Stage::Ancestor ancestors}. +# {Metasploit::Cache::Payload::Stage::Ancestor ancestors} and {Metasploit::Cache::Payload::Stage::Class classes}. module Metasploit::Cache::Payload::Stage extend ActiveSupport::Autoload
Add link from namespace to Payload::Stage::Class MSP-12343
diff --git a/lib/oxblood/commands/hyper_log_log.rb b/lib/oxblood/commands/hyper_log_log.rb index abc1234..def5678 100644 --- a/lib/oxblood/commands/hyper_log_log.rb +++ b/lib/oxblood/commands/hyper_log_log.rb @@ -20,7 +20,7 @@ # @param [String, Array<String>] keys # # @return [Integer] the approximated number of unique elements observed - # via {pfadd}. + # via {#pfadd}. def pfcount(*keys) run(*keys.unshift(:PFCOUNT)) end
Fix link to method in docs
diff --git a/lib/raven/integrations/delayed_job.rb b/lib/raven/integrations/delayed_job.rb index abc1234..def5678 100644 --- a/lib/raven/integrations/delayed_job.rb +++ b/lib/raven/integrations/delayed_job.rb @@ -14,23 +14,23 @@ rescue Exception => exception # Log error to Sentry ::Raven.capture_exception(exception, - logger: 'delayed_job', - tags: { + logger => 'delayed_job', + tags => { delayed_job_queue: job.queue }, - extra: { - delayed_job: { - id: job.id, - priority: job.priority, - attempts: job.attempts, - handler: job.handler, - last_error: job.last_error, - run_at: job.run_at, - locked_at: job.locked_at, - #failed_at: job.failed_at, - locked_by: job.locked_by, - queue: job.queue, - created_at: job.created_at + extra => { + delayed_job => { + id => job.id, + priority => job.priority, + attempts => job.attempts, + handler => job.handler, + last_error => job.last_error, + run_at => job.run_at, + locked_at => job.locked_at, + #failed_at => job.failed_at, + locked_by => job.locked_by, + queue => job.queue, + created_at => job.created_at } })
Support for Ruby 1.8.7 failing due new Hash syntax
diff --git a/lib/rollbar/plugins/resque/failure.rb b/lib/rollbar/plugins/resque/failure.rb index abc1234..def5678 100644 --- a/lib/rollbar/plugins/resque/failure.rb +++ b/lib/rollbar/plugins/resque/failure.rb @@ -2,13 +2,16 @@ module Resque module Failure + # Falure class to use in Resque in order to send + # Resque errors to the Rollbar API class Rollbar < Base def save - if use_exception_level_filters? - payload_with_options = payload.merge(:use_exception_level_filters => true) - else - payload_with_options = payload - end + payload_with_options = + if use_exception_level_filters? + payload.merge(:use_exception_level_filters => true) + else + payload + end rollbar.error(exception, payload_with_options) end
Make Codeclimate happy with Resque Failure class
diff --git a/lib/sequenceserver/blast/formatter.rb b/lib/sequenceserver/blast/formatter.rb index abc1234..def5678 100644 --- a/lib/sequenceserver/blast/formatter.rb +++ b/lib/sequenceserver/blast/formatter.rb @@ -2,24 +2,26 @@ module SequenceServer module BLAST - # Formats BLAST+ archive file format into other file formats. + # Formatter is invoked during report generation or for results download to + # convert BLAST+ archive file to other formats. Formatter generates output + # in Job#dir. Output files persist till the job itself is deleted. Calling + # Formatter a second time (for the same input job and output format) will + # return saved ouput. class Formatter class << self alias_method :run, :new end extend Forwardable - def_delegators SequenceServer, :config, :logger, :sys + def_delegators SequenceServer, :config, :sys def initialize(job, type) @job = job - @format, @mime, @specifiers = OUTFMT[type] @type = type + @format, @mime, @specifiers = OUTFMT[type] run end - - attr_reader :job, :type attr_reader :format, :mime, :specifiers @@ -28,20 +30,23 @@ end def filename - @filename ||= - "sequenceserver-#{type}_report.#{mime}" + @filename ||= "sequenceserver-#{type}_report.#{mime}" end private + attr_reader :job, :type + def run return if File.exist?(file) - command = - "blast_formatter -archive '#{job.stdout}'" \ - " -outfmt '#{format} #{specifiers}'" \ - " -out '#{file}'" - sys(command, path: config[:bin], dir: DOTDIR) + command = "blast_formatter -archive '#{job.stdout}'" \ + " -outfmt '#{format} #{specifiers}'" + sys(command, path: config[:bin], dir: DOTDIR, + stdout: file) rescue CommandFailed => e + # Mostly we will never get here: empty archive file, + # file permissions, broken BLAST binaries, etc. will + # have been caught before reaching here. fail SystemError, e.stderr end end
Use sys's stdout option in BLAST::Formatter Instead of blast_formatter's -out option. Just being consistent - we don't use -out option while running the search either. Increase documentation comments and fix funny line breaks. Signed-off-by: Anurag Priyam <6e6ab5ea9cb59fe7c35d2a1fc74443577eb60635@gmail.com>
diff --git a/test/lib/tasks/score_and_reward_test.rb b/test/lib/tasks/score_and_reward_test.rb index abc1234..def5678 100644 --- a/test/lib/tasks/score_and_reward_test.rb +++ b/test/lib/tasks/score_and_reward_test.rb @@ -0,0 +1,18 @@+require 'test_helper' + +class ScoreAndRewardTest < ActiveSupport::TestCase + def test_score_and_reward_calculations + repo = create :repository, name: 'tanya-josh', owner: 'tanya-saroha', language: 'Ruby' + user = create :user, github_handle: 'tanya-saroha', created_at: Date.yesterday - 1 + commit = create :commit, message: 'commit1', repository_id: repo.id + + assert_equal commit.score, 0 + assert_nil commit.reward + + Rake::Task['score_and_reward'].invoke + commit.reload + + assert commit.score > 5 + assert commit.reward > 5 + end +end
Test for calculate score and reward rake task
diff --git a/activerecord-safer_migrations.gemspec b/activerecord-safer_migrations.gemspec index abc1234..def5678 100644 --- a/activerecord-safer_migrations.gemspec +++ b/activerecord-safer_migrations.gemspec @@ -20,5 +20,5 @@ gem.add_development_dependency "pg", "~> 0.21.0" gem.add_development_dependency "rspec", "~> 3.8.0" - gem.add_development_dependency "rubocop", "~> 0.56.0" + gem.add_development_dependency "rubocop", "~> 0.57.2" end
Update rubocop requirement from ~> 0.56.0 to ~> 0.57.2 Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop-hq/rubocop/commits/v0.57.2) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -32,7 +32,9 @@ Giphy::Configuration.configure do |config| config.api_key = ENV['GIPHY_KEY'] end - @image=Giphy.random("puppies").image_original_url + + @image=Giphy.random("puppies") + p @image @giphy = @image.id.to_s render json: @giphy end
Add print method to giphy api
diff --git a/massa.gemspec b/massa.gemspec index abc1234..def5678 100644 --- a/massa.gemspec +++ b/massa.gemspec @@ -11,7 +11,7 @@ spec.summary = 'Keep the quality, good practices and security of Rails projects.' spec.description = 'Keep the quality, good practices and security of Rails projects.' - spec.homepage = 'http://github.com/lucascaton/massa' + spec.homepage = 'https://github.com/lucascaton/massa' spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(readme|spec)/}) }
Use HTTPS instead of HTTP
diff --git a/spec/features/ListItems/index_spec.rb b/spec/features/ListItems/index_spec.rb index abc1234..def5678 100644 --- a/spec/features/ListItems/index_spec.rb +++ b/spec/features/ListItems/index_spec.rb @@ -26,4 +26,16 @@ expect(page.all("ul.list_items li").size).to eq(0) end + it "displays list items when the task list has content" do + task_list.list_items.create(content: "The Sprinkler") + task_list.list_items.create(content: "The Bart-Man") + task_list.list_items.create(content: "The Pioneer") + + visit_task_list(task_list) + expect(page.all("ul.list_items li").size).to eq(3) + expect(page).to have_content("The Sprinkler") + expect(page).to have_content("The Bart-Man") + expect(page).to have_content("The Pioneer") + end + end
Test displaying content from list
diff --git a/lib/buildr_plus/extension_registry.rb b/lib/buildr_plus/extension_registry.rb index abc1234..def5678 100644 --- a/lib/buildr_plus/extension_registry.rb +++ b/lib/buildr_plus/extension_registry.rb @@ -35,7 +35,9 @@ def activate! raw_extensions.each do |extension| - Buildr::Project.include extension + Buildr::Project.class_eval do |p| + include extension + end end end
Use class eval to call include so code works on earlier versions of ruby
diff --git a/lib/electric_sheeps/agents/command.rb b/lib/electric_sheeps/agents/command.rb index abc1234..def5678 100644 --- a/lib/electric_sheeps/agents/command.rb +++ b/lib/electric_sheeps/agents/command.rb @@ -10,8 +10,16 @@ @logger = options[:logger] @shell = options[:shell] @work_dir = options[:work_dir] + @resources = options[:resources] end + def method_missing(method, *args, &block) + if @resources.has_key?(method) + @resources[method] + else + super + end + end end end end
Add method_missing in order to access resources
diff --git a/lib/fund_america/selling_agreement.rb b/lib/fund_america/selling_agreement.rb index abc1234..def5678 100644 --- a/lib/fund_america/selling_agreement.rb +++ b/lib/fund_america/selling_agreement.rb @@ -10,9 +10,9 @@ end # End point: https://apps.fundamerica.com/api/selling_agreements/:id (GET) - # Usage: FundAmerica::SellingAgreement.details(rta_agreement_id) + # Usage: FundAmerica::SellingAgreement.details(selling_agreement_id) # Output: Returns the details of an rta_agreement with matching id - def details(rta_agreement_id) + def details(selling_agreement_id) API::request(:get, "selling_agreements/#{selling_agreement_id}") end
Add Selling Agreement API points
diff --git a/server.rb b/server.rb index abc1234..def5678 100644 --- a/server.rb +++ b/server.rb @@ -2,9 +2,15 @@ require 'redis' require 'redis-namespace' +configure do + set :server, :puma + set :bind, '0.0.0.0' + set :port, 80 +end + redis_options = { - host: (ENV['REDIS_HOST'] || 'localhost'), - port: (ENV['REDIS_PORT'] || 6379), + host: (ENV['REDIS_DB_HOST'] || ENV['REDIS_PORT_6379_TCP_ADDR']), + port: (ENV['REDIS_DB_PORT'] || ENV['REDIS_PORT_6379_TCP_PORT']), password: (ENV['REDIS_PASSWORD'] || nil) } redis_connection = Redis.new(redis_options)
Configure Puma and Redis connection
diff --git a/rails_stats.gemspec b/rails_stats.gemspec index abc1234..def5678 100644 --- a/rails_stats.gemspec +++ b/rails_stats.gemspec @@ -20,4 +20,7 @@ spec.add_dependency "rake" spec.add_development_dependency "bundler", ">= 1.6", "< 3.0" + spec.add_development_dependency "byebug" + spec.add_development_dependency "minitest" + spec.add_development_dependency "minitest-around" end
Add minitest and byebug as development dependencies
diff --git a/lhm.gemspec b/lhm.gemspec index abc1234..def5678 100644 --- a/lhm.gemspec +++ b/lhm.gemspec @@ -13,7 +13,7 @@ s.email = %q{rany@soundcloud.com, tobi@soundcloud.com, ts@soundcloud.com} s.summary = %q{online schema changer for mysql} s.description = %q{Migrate large tables without downtime by copying to a temporary table in chunks. The old table is not dropped. Instead, it is moved to timestamp_table_name for verification.} - s.homepage = %q{http://github.com/soundcloud/large-hadron-migrator} + s.homepage = %q{http://github.com/soundcloud/lhm} s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.require_paths = ["lib"]
Update homepage url in gemspec
diff --git a/app/mailers/ballot_notifier.rb b/app/mailers/ballot_notifier.rb index abc1234..def5678 100644 --- a/app/mailers/ballot_notifier.rb +++ b/app/mailers/ballot_notifier.rb @@ -1,23 +1,41 @@ class BallotNotifier < ApplicationMailer - # First define the value for "locker_mail_to" in secrets.yml - default from: Rails.application.secrets.mailer_username + # First define the value for "locker_mail_to" in secrets.yml + default from: Rails.application.secrets.mailer_username - def test_email(user) - @user = user - mail to: user.email if user.email - end + def test_email(user) + @user = user + mail to: user.email if user.email + end - def submitted_ballot_to_user(user, ballot) - @round = ballot.round - @user = user - @ballot = ballot - mail(to: user.email, reply_to: 'connect@nuscomputing.com', subject: '[Locker Ballot] Ballot Received') if user.email - end + def submitted_ballot_to_user(submitter, user, ballot) + @round = ballot.round + @submitter = submitter + @user = user + @ballot = ballot + mail(to: user.email, reply_to: 'connect@nuscomputing.com', subject: '[Locker Ballot] Ballot Received') if user.email + end - def submitted_ballot_to_bot(user, ballot) - @round = ballot.round - @user = user - @ballot = ballot - mail(to: Rails.application.secrets.locker_mail_to, reply_to: 'connect@nuscomputing.com', subject: '[Locker Ballot] Ballot Received') if user.email - end + def submitted_ballot_to_bot(submitter, user, ballot) + @round = ballot.round + @submitter = submitter + @user = user + @ballot = ballot + mail(to: Rails.application.secrets.locker_mail_to, reply_to: 'connect@nuscomputing.com', subject: '[Locker Ballot] Ballot Received') if user.email + end + + def deleted_ballot_to_user(submitter, user, ballot) + @round = ballot.round + @submitter = submitter + @user = user + @ballot = ballot + mail(to: user.email, reply_to: 'connect@nuscomputing.com', subject: '[Locker Ballot] Ballot Rescinded') if user.email + end + + def deleted_ballot_to_bot(submitter, user, ballot) + @round = ballot.round + @submitter = submitter + @user = user + @ballot = ballot + mail(to: Rails.application.secrets.locker_mail_to, reply_to: 'connect@nuscomputing.com', subject: '[Locker Ballot] Ballot Rescinded') if user.email + end end
Update ballot mailer to track ballot submitter
diff --git a/app/models/etsource/dataset.rb b/app/models/etsource/dataset.rb index abc1234..def5678 100644 --- a/app/models/etsource/dataset.rb +++ b/app/models/etsource/dataset.rb @@ -25,9 +25,11 @@ end def self.region_codes - @region_codes ||= Atlas::Dataset.all - .select { |dataset| dataset.enabled[:etengine] } - .map { |dataset| dataset.key.to_s } + NastyCache.instance.fetch('region_codes') do + Atlas::Dataset.all + .select { |dataset| dataset.enabled[:etengine] } + .map { |dataset| dataset.key.to_s } + end end end end
Expire region code cache when importing ETSource
diff --git a/lib/wemo.rb b/lib/wemo.rb index abc1234..def5678 100644 --- a/lib/wemo.rb +++ b/lib/wemo.rb @@ -5,7 +5,7 @@ module WeMo def self.all - light_switches + switches + light_switches + switches + sensors end def self.light_switches @@ -14,6 +14,10 @@ def self.switches @switches ||= devices("controllee") + end + + def self.sensors + @sensors ||= devices("sensors") end private
Add WeMo motion into device list
diff --git a/app/services/gemmies/create.rb b/app/services/gemmies/create.rb index abc1234..def5678 100644 --- a/app/services/gemmies/create.rb +++ b/app/services/gemmies/create.rb @@ -2,7 +2,7 @@ module Gemmies class Create < Services::Base - class AlreadyExists < Error + class BaseError < StandardError attr_reader :gemmy def initialize(gemmy) @@ -12,17 +12,11 @@ end end - class NotFound < Error - attr_reader :gemmy_name + class AlreadyExists < BaseError; end - def initialize(gemmy_name) - super nil - - @gemmy_name = gemmy_name - end - + class NotFound < BaseError def message - "Gem '#{@gemmy_name}' does not exist." + "Gem '#{@gemmy.name}' does not exist." end end @@ -38,7 +32,7 @@ begin Gems.info name rescue Gems::NotFound - raise NotFound.new(name) + raise NotFound.new(Gemmy.new(name: name)) end gemmy = Gemmy.create!(name: name)
Refactor NotFound Error to be similar to AlreadyExists
diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index abc1234..def5678 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -9,7 +9,7 @@ def amr_data_show @meter = Meter.includes(:meter_readings).find(params[:meter_id]) @first_reading = @meter.first_reading - @reading_summary = @meter.meter_readings.order('read_at::date').group('read_at::date').count + @reading_summary = @meter.meter_readings.order(Arel.sql('read_at::date')).group('read_at::date').count @missing_array = (@first_reading.read_at.to_date..Date.today).collect do |day| if ! @reading_summary.key?(day) [ day, 'No readings' ]
Fix deprecation warning by wrapping cast
diff --git a/app/helpers/container_image_helper.rb b/app/helpers/container_image_helper.rb index abc1234..def5678 100644 --- a/app/helpers/container_image_helper.rb +++ b/app/helpers/container_image_helper.rb @@ -1,4 +1,4 @@-module ContainerImageHelper +module ContainerImageHelper include_concern 'ComplianceSummaryHelper' include_concern 'ContainerSummaryHelper' include_concern 'TextualSummary'
Fix rubocop warnings in ContainerImageHelper
diff --git a/app/jobs/admin_activity_notify_job.rb b/app/jobs/admin_activity_notify_job.rb index abc1234..def5678 100644 --- a/app/jobs/admin_activity_notify_job.rb +++ b/app/jobs/admin_activity_notify_job.rb @@ -1,6 +1,6 @@ class AdminActivityNotifyJob < ApplicationJob CHANNEL = if Rails.env.production? - '#admin-activities'.freeze + '#notif-admin'.freeze else '#sandbox'.freeze end
Change channel name in AdminActivityNotifyJob
diff --git a/spec/parser/source_parser_spec.rb b/spec/parser/source_parser_spec.rb index abc1234..def5678 100644 --- a/spec/parser/source_parser_spec.rb +++ b/spec/parser/source_parser_spec.rb @@ -2,7 +2,6 @@ describe YARD::Parser::SourceParser do before do - p self.class.description Registry.clear end
Remove debugging message in spec
diff --git a/spec/shared/models/sanitizable.rb b/spec/shared/models/sanitizable.rb index abc1234..def5678 100644 --- a/spec/shared/models/sanitizable.rb +++ b/spec/shared/models/sanitizable.rb @@ -2,12 +2,6 @@ let(:sanitizable) { build(model_name(described_class)) } describe "#tag_list" do - before do - unless described_class.included_modules.include?(Taggable) - skip "#{described_class} does not have a tag list" - end - end - it "sanitizes the tag list" do sanitizable.tag_list = "user_id=1"
Remove unnecessary condition to skip tag list test This file only has tests related to tags; if the model doesn't have tags, we simply wouldn't include `it_behaves_as` in their tests instead of including it and then skipping it.
diff --git a/spec/unit/recipes/default_spec.rb b/spec/unit/recipes/default_spec.rb index abc1234..def5678 100644 --- a/spec/unit/recipes/default_spec.rb +++ b/spec/unit/recipes/default_spec.rb @@ -4,6 +4,6 @@ let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) } it 'installs the chef gem' do - expect(chef_run).to install_chef_gem('chef-sugar').with(version: '1.0.0') + expect(chef_run).to install_chef_gem('chef-sugar') end end
Remove version check in tests
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 @@ -8,11 +8,7 @@ CodeClimate::TestReporter.start require 'rom' - require 'rom/adapter/memory' - -require 'rom-sql' -require 'rom/sql/spec/support' root = Pathname(__FILE__).dirname
Use memory adapter for all specs * extend memory dataset with new operations * fix sorting in Join operation * fix method forwarding in Join operation * remove sql-related code
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index abc1234..def5678 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,7 +11,7 @@ Thread.abort_on_exception = true require "#{File.dirname(__FILE__)}/../watirspec" -hook = File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper") +hook = File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper.rb") if File.exist?(hook) require hook
Use .rb since we're checking if File.exist?
diff --git a/app/authorizers/universe_core_content_authorizer.rb b/app/authorizers/universe_core_content_authorizer.rb index abc1234..def5678 100644 --- a/app/authorizers/universe_core_content_authorizer.rb +++ b/app/authorizers/universe_core_content_authorizer.rb @@ -2,6 +2,7 @@ def self.creatable_by? user [ PermissionService.user_has_fewer_owned_universes_than_plan_limit?(user: user), + PermissionService.user_is_on_premium_plan?(user: user) ].any? end
Allow anyone on premium to create universes regardless of current subscription
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -17,3 +17,7 @@ DatabaseRewinder.clean end end + +class ActionDispatch::IntegrationTest + include FactoryGirl::Syntax::Methods +end
Enable factory_girl shortcut in controller tests
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,5 @@ require 'test/unit' -require 'lib/email_veracity' +require File.dirname(__FILE__) + '/../lib/email_veracity' Dir.glob('test/mocks/*.rb') { |f| require(f) }
Fix up include path to make test files run in TextMate
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -2,10 +2,11 @@ maintainer 'Chef Software, Inc' maintainer_email 'cookbooks@chef.io' license 'Apache 2.0' -description 'Installs/Configures unicorn' +description 'Installs and configures unicorn' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '2.0.0' -recipe 'unicorn', 'Installs unicorn rubygem' +supports 'ubuntu' +recipe 'unicorn::default', 'Installs unicorn rubygem' -source_url 'https://github.com/opscode-cookbooks/unicorn' -issues_url 'https://github.com/opscode-cookbooks/unicorn/issues' +source_url 'https://github.com/opscode-cookbooks/unicorn' if respond_to?(:source_url) +issues_url 'https://github.com/opscode-cookbooks/unicorn/issues' if respond_to?(:source_url)
Add Chef 11 compat and cleanup wording
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -25,4 +25,4 @@ depends "apt", ">= 1.9.0" depends "build-essential" -depends "openssl", "~> 4.0.0" +depends "openssl", "~> 4.0"
Use more optimistic openssl version constraint.
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -16,4 +16,4 @@ depends 'line', '< 1.0' depends 'chef-vault' -version '1.57.2' +version '1.58.0'
Add SSL private key management
diff --git a/visio2pdf.rb b/visio2pdf.rb index abc1234..def5678 100644 --- a/visio2pdf.rb +++ b/visio2pdf.rb @@ -22,8 +22,8 @@ end def visio2pdf - @visio = WIN32OLE.new('Visio.Application') begin + @visio = WIN32OLE.new('Visio.Application') files = Dir["#{@in_dir}/[^~]*{#{VSDEXTS}}"] files.sort.each do |file| get_filepath file @@ -35,8 +35,8 @@ end def visio2pdf_exec - vsd = @visio.Documents.Open(@vsd_fullpath) begin + vsd = @visio.Documents.Open(@vsd_fullpath) vsd.ExportAsFixedFormat( FixedFormat: 1, OutputFileName: @pdf_fullpath, Intent: 0, PrintRange: 0 )
Fix blank is included in filepath
diff --git a/spec/devise-i18n-bootstrap_spec.rb b/spec/devise-i18n-bootstrap_spec.rb index abc1234..def5678 100644 --- a/spec/devise-i18n-bootstrap_spec.rb +++ b/spec/devise-i18n-bootstrap_spec.rb @@ -1,8 +1,8 @@ require 'spec_helper' -Dir.glob('locales/*.yml').each do |locale_file| - describe "a devise-i18n-views #{locale_file} locale file" do +Dir.glob('config/locales/*.yml').each do |locale_file| + describe "a devise-i18n-bootstrap #{locale_file} locale file" do it_behaves_like 'a valid locale file', locale_file - it { locale_file.should be_a_subset_of 'locales/en.yml' } + it { locale_file.should be_a_subset_of 'config/locales/en.yml' } end end
Fix new path of locales folder
diff --git a/ruby_provisioning_api.gemspec b/ruby_provisioning_api.gemspec index abc1234..def5678 100644 --- a/ruby_provisioning_api.gemspec +++ b/ruby_provisioning_api.gemspec @@ -4,9 +4,9 @@ Gem::Specification.new do |gem| gem.authors = ["Davide Targa", "Damiano Braga"] gem.email = ["davide.targa@gmail.com", "damiano.braga@gmail.com"] - gem.description = %q{TODO: Write a gem description} - gem.summary = %q{TODO: Write a gem summary} - gem.homepage = "" + gem.description = %q{a ruby wrapper for google provisioning api} + gem.summary = %q{a ruby wrapper for google provisioning api} + gem.homepage = "https://github.com/digitalprog/ruby_provisioning_api" gem.files = `git ls-files`.split($\) gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
Add description and summary to the gemspec.
diff --git a/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb b/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb index abc1234..def5678 100644 --- a/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb +++ b/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb @@ -20,8 +20,16 @@ module Mixin module FuzzyHostnameMatcher + # + # Check to see if a hostname matches a match string. Used to see if hosts fall under our no_proxy config + # + # @param [String] hostname the hostname to check + # @param [String] matches the pattern to match + # + # @return [Boolean] + # def fuzzy_hostname_match_any?(hostname, matches) - unless hostname.nil? || matches.nil? + if hostname && matches return matches.to_s.split(/\s*,\s*/).compact.any? do |m| fuzzy_hostname_match?(hostname, m) end
Remove .nil? and add some yard explaining what this method is Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/pixiv.gemspec b/pixiv.gemspec index abc1234..def5678 100644 --- a/pixiv.gemspec +++ b/pixiv.gemspec @@ -18,4 +18,8 @@ gem.require_paths = ["lib"] gem.add_dependency 'mechanize', '~> 2.0' + + gem.add_development_dependency 'rake', '>= 0.8.7' + gem.add_development_dependency 'rspec', '~> 2.12' + gem.add_development_dependency 'webmock', '~> 1.9' end
Add development dependency on rake, rspec, webmock
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 @@ -6,20 +6,20 @@ # # Read the Guide for Upgrading Ruby on Rails for more info on each option. -Rails.application.config.action_controller.raise_on_unfiltered_parameters = true +Rails.application.config.action_controller.raise_on_unfiltered_parameters = false # Enable per-form CSRF tokens. Previous versions had false. -Rails.application.config.action_controller.per_form_csrf_tokens = false +Rails.application.config.action_controller.per_form_csrf_tokens = true # Enable origin-checking CSRF mitigation. Previous versions had false. -Rails.application.config.action_controller.forgery_protection_origin_check = false +Rails.application.config.action_controller.forgery_protection_origin_check = true # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. # Previous versions had false. -ActiveSupport.to_time_preserves_timezone = false +ActiveSupport.to_time_preserves_timezone = true # Require `belongs_to` associations by default. Previous versions had false. -Rails.application.config.active_record.belongs_to_required_by_default = false +Rails.application.config.active_record.belongs_to_required_by_default = true # Do not halt callback chains when a callback returns false. Previous versions had true. -ActiveSupport.halt_callback_chains_on_return_false = true +ActiveSupport.halt_callback_chains_on_return_false = false
Migrate to new framework defaults
diff --git a/spec/ffi/spec_helper.rb b/spec/ffi/spec_helper.rb index abc1234..def5678 100644 --- a/spec/ffi/spec_helper.rb +++ b/spec/ffi/spec_helper.rb @@ -2,10 +2,14 @@ require 'rbconfig' require 'spec' -if ENV["MRI_FFI"] +if RUBY_PLATFORM =~/java/ + libdir = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "lib")) + $:.reject! { |p| p == libdir } +else $:.unshift File.join(File.dirname(__FILE__), "..", "..", "lib"), File.join(File.dirname(__FILE__), "..", "..", "build", "#{Config::CONFIG['host_cpu''arch']}", "ffi_c", RUBY_VERSION) end +puts "loadpath=#{$:.join(':')}" require "ffi" module TestLibrary
Remove lib/ from load path when running under JRuby
diff --git a/spec/knife/maas_spec.rb b/spec/knife/maas_spec.rb index abc1234..def5678 100644 --- a/spec/knife/maas_spec.rb +++ b/spec/knife/maas_spec.rb @@ -1,11 +1,7 @@ require 'spec_helper' -describe Knife::Maas do +describe Chef::Knife::Maas do it 'has a version number' do - expect(Knife::Maas::VERSION).not_to be nil - end - - it 'does something useful' do - expect(false).to eq(true) + expect(Chef::Knife::Maas::VERSION).not_to be nil end end
Make sure all tests pass
diff --git a/spree_warehouse.gemspec b/spree_warehouse.gemspec index abc1234..def5678 100644 --- a/spree_warehouse.gemspec +++ b/spree_warehouse.gemspec @@ -7,7 +7,7 @@ s.description = 'Warehouse management system based on Spree' s.required_ruby_version = '>= 1.8.7' - s.author = 'Rei Kagetsuki' + s.authors = ['Rei Kagetsuki', 'Vassil Kalkov'] s.email = 'info@genshin.org' s.homepage = 'http://github.com/Genshin/spree_warehouse'
Put myself in authors list
diff --git a/app/presenters/georgia/sidebar_link_presenter.rb b/app/presenters/georgia/sidebar_link_presenter.rb index abc1234..def5678 100644 --- a/app/presenters/georgia/sidebar_link_presenter.rb +++ b/app/presenters/georgia/sidebar_link_presenter.rb @@ -44,7 +44,7 @@ def get_active_state_from_controller controller = options.fetch(:controller) - controller_name == controller + controller.is_a?(Array) ? controller.include?(controller_name) : (controller_name == controller) end end
Allow multiple controllers on links
diff --git a/bin/cleanup_old_execution_histories.rb b/bin/cleanup_old_execution_histories.rb index abc1234..def5678 100644 --- a/bin/cleanup_old_execution_histories.rb +++ b/bin/cleanup_old_execution_histories.rb @@ -0,0 +1,9 @@+old_histories = Kuroko2::ExecutionHistory.where('finished_at < ?', 2.weeks.ago) + +count = old_histories.count + +Kuroko2::ExecutionHistories.transaction do + old_histories.destroy_all +end + +puts "Destroyed #{count} histories"
Add script to cleanup old execution histories
diff --git a/UINavigationItem+Margin.podspec b/UINavigationItem+Margin.podspec index abc1234..def5678 100644 --- a/UINavigationItem+Margin.podspec +++ b/UINavigationItem+Margin.podspec @@ -10,5 +10,5 @@ s.frameworks = 'UIKit' s.requires_arc = true - s.ios.deployment_target = '6.0' + s.ios.deployment_target = '7.0' end
Update deployment target to 7.0
diff --git a/prius.gemspec b/prius.gemspec index abc1234..def5678 100644 --- a/prius.gemspec +++ b/prius.gemspec @@ -22,5 +22,5 @@ spec.add_development_dependency "rspec", "~> 3.1" spec.add_development_dependency "rubocop", "~> 0.54.0" - spec.add_development_dependency "rspec_junit_formatter", "~> 0.3.0" + spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.0" end
Update rspec_junit_formatter requirement to ~> 0.4.0 Updates the requirements on [rspec_junit_formatter](https://github.com/sj26/rspec_junit_formatter) to permit the latest version. - [Release notes](https://github.com/sj26/rspec_junit_formatter/releases) - [Commits](https://github.com/sj26/rspec_junit_formatter/commits/v0.4.0) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
diff --git a/lib/buildr_plus/common.rb b/lib/buildr_plus/common.rb index abc1234..def5678 100644 --- a/lib/buildr_plus/common.rb +++ b/lib/buildr_plus/common.rb @@ -18,7 +18,7 @@ require 'buildr/git_auto_version' require 'buildr/top_level_generate_dir' -BuildrPlus::FeatureManager.activate_features([:repositories, :idea_codestyle, :product_version, :dialect_mapping, :libs, :publish, :whitespace, :ci]) +BuildrPlus::FeatureManager.activate_features([:repositories, :idea_codestyle, :product_version, :dialect_mapping, :libs, :publish, :whitespace, :ci, :gitignore, :whitespace]) BuildrPlus::FeatureManager.activate_feature(:dbt) if BuildrPlus::Util.is_dbt_gem_present? BuildrPlus::FeatureManager.activate_feature(:domgen) if BuildrPlus::Util.is_domgen_gem_present?
Make sure whitespace and gitignore features are activated
diff --git a/lib/config/wdtk-routes.rb b/lib/config/wdtk-routes.rb index abc1234..def5678 100644 --- a/lib/config/wdtk-routes.rb +++ b/lib/config/wdtk-routes.rb @@ -1,6 +1,8 @@ # Here you can override or add to the pages in the core website Rails.application.routes.draw do + get '/london' => redirect('/body?tag=london', status: 302) + # Add a route for the survey scope '/profile/survey' do root :to => 'user#survey', :as => :survey
Add redirect for /london authorities This mirrors the behaviour of `GET /local/london`. Eventually we'll want to make `/london` a landing page in its own right, but this just makes the URL accessible in case we want to get it out in to marketing material. See https://github.com/mysociety/whatdotheyknow-theme/issues/416.
diff --git a/lib/engineyard/version.rb b/lib/engineyard/version.rb index abc1234..def5678 100644 --- a/lib/engineyard/version.rb +++ b/lib/engineyard/version.rb @@ -1,4 +1,4 @@ module EY - VERSION = '2.0.7' + VERSION = '2.0.8.pre' ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.0.3' end
Add .pre for next release
diff --git a/Casks/iterm2-beta.rb b/Casks/iterm2-beta.rb index abc1234..def5678 100644 --- a/Casks/iterm2-beta.rb +++ b/Casks/iterm2-beta.rb @@ -1,7 +1,7 @@ class Iterm2Beta < Cask - url 'http://www.iterm2.com/downloads/beta/iTerm2-1_0_0_20131218.zip' + url 'http://www.iterm2.com/downloads/beta/iTerm2-1_0_0_20131228.zip' homepage 'http://www.iterm2.com/' - version '1.0.0.20131218' - sha1 '51a099ed6be536bc517ca22fb2cb5db6706e1fd6' + version '1.0.0.20131228' + sha1 'd771ed0cbb7d422539befc529c5ece6cf09011e5' link 'iTerm.app' end
Update iterm2 version to 20131228
diff --git a/Casks/omnigraffle.rb b/Casks/omnigraffle.rb index abc1234..def5678 100644 --- a/Casks/omnigraffle.rb +++ b/Casks/omnigraffle.rb @@ -14,7 +14,7 @@ end name 'OmniGraffle' - homepage 'http://www.omnigroup.com/products/omnigraffle' + homepage 'https://www.omnigroup.com/omnigraffle/' license :commercial app 'OmniGraffle.app'
Fix homepage to use SSL in OmniGraffle Cask The HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly makes it more secure and saves a HTTP round-trip.
diff --git a/TABSwiftLayout.podspec b/TABSwiftLayout.podspec index abc1234..def5678 100644 --- a/TABSwiftLayout.podspec +++ b/TABSwiftLayout.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TABSwiftLayout' - s.version = '4.0.0' + s.version = '4.0.1' s.platforms = { :ios => "8.0", :osx => "10.10" } s.license = 'MIT' s.author = { "The App Business" => "https://www.theappbusiness.com" }
Set podspec version to 4.0.1
diff --git a/app/controllers/benchmark_runs_controller.rb b/app/controllers/benchmark_runs_controller.rb index abc1234..def5678 100644 --- a/app/controllers/benchmark_runs_controller.rb +++ b/app/controllers/benchmark_runs_controller.rb @@ -1,7 +1,8 @@ class BenchmarkRunsController < APIController def create - repo = Organization.find_by_name(params[:organization]) - .repos.find_by_name(params[:repo]) + repo = Repo.joins(:organization) + .where(name: params[:repo], organizations: { name: params[:organization] }) + .first # FIXME: Probably bad code. if params[:commit_hash]
PERF: Reduce to one SQL call.
diff --git a/app/controllers/course_classes_controller.rb b/app/controllers/course_classes_controller.rb index abc1234..def5678 100644 --- a/app/controllers/course_classes_controller.rb +++ b/app/controllers/course_classes_controller.rb @@ -15,10 +15,10 @@ config.columns[:year].options = {:options => ((Date.today.year-5)..Date.today.year).map {|y| y}.reverse} config.create.columns = - [:name, :course, :professor, :year, :semester] + [:name, :course, :professor, :year, :semester, :allocations] config.update.columns = - [:name, :course, :professor, :class_enrollments, :allocations, :year, :semester] + [:name, :course, :professor, :year, :semester, :class_enrollments, :allocations] end record_select :per_page => 10, :search_on => [:name], :order_by => 'name', :full_text_search => true end
Add Allocations form into Course Classes create form
diff --git a/lib/green-button-data/parser/summary_measurement.rb b/lib/green-button-data/parser/summary_measurement.rb index abc1234..def5678 100644 --- a/lib/green-button-data/parser/summary_measurement.rb +++ b/lib/green-button-data/parser/summary_measurement.rb @@ -2,20 +2,30 @@ module Parser class SummaryMeasurement include SAXMachine + include Enumerations - element :powerOfTenMultiplier, as: :power_of_ten_multiplier + element :powerOfTenMultiplier, class: Integer, + as: :power_of_ten_multiplier element :timeStamp, as: :time_stamp - element :uom + element :uom, class: Integer element :value, class: Integer element :readingTypeRef, as: :reading_type_ref def power_of_ten_multiplier - UNIT_MULTIPLIER[@power_of_ten_multiplier] if @power_of_ten_multiplier + UNIT_MULTIPLIER[@power_of_ten_multiplier] end def uom - UNIT_SYMBOL[@uom] if @uom + UNIT_SYMBOL[@uom] end + + # ESPI Namespacing + element :'espi:powerOfTenMultiplier', class: Integer, + as: :power_of_ten_multiplier + element :'espi:timeStamp', as: :time_stamp + element :'espi:uom', class: Integer, as: :uom + element :'espi:value', class: Integer, as: :value + element :'espi:readingTypeRef', as: :reading_type_ref end end end
Fix bug and add ESPI namespace
diff --git a/app/controllers/fixes_controller.rb b/app/controllers/fixes_controller.rb index abc1234..def5678 100644 --- a/app/controllers/fixes_controller.rb +++ b/app/controllers/fixes_controller.rb @@ -4,11 +4,11 @@ protect_from_forgery with: :null_session, if: Proc.new { |c| c.request.format == 'application/json' } def show - if @fix = Fix.find_by(id: params[:id]) + if @fix = Fix.find_by(id: params[:id], issue_id: params[:issue_id]) @issue = @fix.issue @comments = @fix.fix_comments.map { |comment| comment.package_info } else - redirect_to welcome_index_path + redirect_to dashboard_path end end
Fix bug where fix_controller only looks at fix id. When issue id and fix id in the URL do not match user is now redirected to the dashboard.
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index abc1234..def5678 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -7,8 +7,8 @@ @last_newsletter = Newsletter.last @upcoming_events = Event.upcoming - flash[:warning] = "We are now open for Sunday morning worship service. We ask that attendees please continue to maintain social " + - "distancing. We'll also still be livestreaming services on Facebook and uploading them to Youtube, so feel free to join us online if preferred." + flash[:warning] = "Due to nearby cases, we will be closed for Sunday morning worship services. " + + "Please join us for services online via our Facebook page!" end def beliefs
Change alert message on homepage
diff --git a/lib/simctl/device_path.rb b/lib/simctl/device_path.rb index abc1234..def5678 100644 --- a/lib/simctl/device_path.rb +++ b/lib/simctl/device_path.rb @@ -17,7 +17,11 @@ end def launchctl - @launchctl ||= File.join(runtime_root, 'bin/launchctl') + @launchctl ||= if Xcode::Version.gte? '9.0' + "#{Xcode::Path.home}//Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/bin/launchctl" + else + File.join(runtime_root, 'bin/launchctl') + end end def preferences_plist
Update launchctl location for Xcode 9
diff --git a/lib/sqlize/definitions.rb b/lib/sqlize/definitions.rb index abc1234..def5678 100644 --- a/lib/sqlize/definitions.rb +++ b/lib/sqlize/definitions.rb @@ -16,7 +16,7 @@ end def template(qname) - qname.split('/')[1..-1].inject(defs){|m,k| m[k]} + qname.split('/')[1..-1].inject(defs){|m,k| m[k]} || raise rescue raise ArgumentError, "No such template #{qname}" end
Raise even when last one is missing
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index abc1234..def5678 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -14,6 +14,15 @@ @errors = @user.errors.full_messages render 'new' end + end + + def join_from_invitation + @team = find_team(params[:team_id]) + render 'join_from_invitation' + end + + def create_user_from_invitation + end def edit
Call new user form from invitation