diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,3 +5,7 @@ # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Character.create(name: 'Luke', movie: movies.first) + +(0..9).each do |num| + Customer.create(first_name: "Customer #{num}", last_name: 'Last name') +end
Add seed data for customers to view locally
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,3 +5,8 @@ # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) + +rail_lines = %w[ brown purple yellow red blue orange green ] +rail_lines.each { |line| Line.find_or_create_by(line_name: line) } + +Map.create(name: '2015 CTA Rail Map', author: 'system')
Create default values for some databases. Load up the default rails lines and system map
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -32,7 +32,7 @@ cd #{path} && rm -rf #{git} && git clone --bare git://github.com/water/grack.git #{git} -} +} unless git =~ /^\// # codes = ["TDA289", "DAT255", "FFR101", "EDA343", "DAT036", "EDA331", "EDA451"] # codes.each do |code|
Make git init in seed script a bit safer
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,3 +5,17 @@ # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) + +# Creates qualification and subject records for database from parsed JSON feed. + +# Parses JSON feed into Ruby hash. +URL = "https://api.gojimo.net/api/v4/qualifications" +response = HTTParty.get(URL) +qualifications = response.parsed_response + +qualifications.each do |qualification| + qual = Qualification.create(name: qualification["name"], country: qualification.dig("country","name")) + qualification["subjects"].each do |subject| + Subject.create(name: subject["title"], colour: subject["colour"], qualification_id: qual.id) + end +end
Create records to seed database
diff --git a/lib/sastrawi/stemmer/context/visitor/remove_plain_prefix.rb b/lib/sastrawi/stemmer/context/visitor/remove_plain_prefix.rb index abc1234..def5678 100644 --- a/lib/sastrawi/stemmer/context/visitor/remove_plain_prefix.rb +++ b/lib/sastrawi/stemmer/context/visitor/remove_plain_prefix.rb @@ -1,3 +1,8 @@+## +# Remove plain prefix +# Asian J. (2007) "Effective Techniques for Indonesian Text Retrieval" page 61 +# http://researchbank.rmit.edu.au/eserv/rmit:6312/Asian.pdf + module Sastrawi module Stemmer module Context @@ -16,6 +21,9 @@ end end + ## + # Remove plain prefix: di|ke|se + def remove(word) word.sub(/^(di|ke|se)/, '') end
Add comments to "RemovePlainPrefix" class
diff --git a/features/support/hooks.rb b/features/support/hooks.rb index abc1234..def5678 100644 --- a/features/support/hooks.rb +++ b/features/support/hooks.rb @@ -14,7 +14,7 @@ param_file = File.join(File.dirname(__FILE__), 'gpg-params.txt') cmd = "gpg --debug-quick-random --batch --gen-key #{param_file}" Open3.popen3 cmd do |stdin, stdout, stderr, wait_thr| - raise "Failed to generate GPG keys" unless wait_thr.value.success? + raise "Failed to generate GPG keys:\n#{stdout}\n#{stderr}" unless wait_thr.value.success? end puts 'done.'
Include stdout/stderr when there's an error generating keys
diff --git a/features/support/hooks.rb b/features/support/hooks.rb index abc1234..def5678 100644 --- a/features/support/hooks.rb +++ b/features/support/hooks.rb @@ -1,4 +1,10 @@ require 'udaeta' + +AfterConfiguration do + # It'd be far better to have a way to add certificates to a store having + # lifetime equal to that of the Cucumber test run. + OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:verify_mode] = OpenSSL::SSL::VERIFY_NONE +end Before do rm_rf tmpdir
Disable SSL certificate checking in Cucumber scenarios. We're using a self-signed certificate for the CAS proxy callback, because the CAS protocol mandates that communication with the proxy callback be done over HTTPS. Unfortunately, I haven't yet found a way to set up a certificate store for the lifetime of the Cucumber session; hence, this gross but working hack.
diff --git a/config/initializers/active_record_extensions.rb b/config/initializers/active_record_extensions.rb index abc1234..def5678 100644 --- a/config/initializers/active_record_extensions.rb +++ b/config/initializers/active_record_extensions.rb @@ -1,4 +1,4 @@-if defined?(::ActiveRecord) +ActiveSupport.on_load(:active_record) do module ActiveRecord class Base def self.rails_admin(&block)
Use ActiveSupport.on_load to correctly re-open ActiveRecord::Base.
diff --git a/spec/defines/rbenv__rehash_spec.rb b/spec/defines/rbenv__rehash_spec.rb index abc1234..def5678 100644 --- a/spec/defines/rbenv__rehash_spec.rb +++ b/spec/defines/rbenv__rehash_spec.rb @@ -10,6 +10,7 @@ it { should contain_exec('rbenv rehash for 1.2.3-p456').with( + :command => '/usr/bin/rbenv rehash', :environment => [ 'RBENV_ROOT=/usr/lib/rbenv', 'RBENV_VERSION=1.2.3-p456',
Test :command for exec in rbenv::rehash.
diff --git a/core/spec/lib/factlink_api/user_manager_spec.rb b/core/spec/lib/factlink_api/user_manager_spec.rb index abc1234..def5678 100644 --- a/core/spec/lib/factlink_api/user_manager_spec.rb +++ b/core/spec/lib/factlink_api/user_manager_spec.rb @@ -6,8 +6,8 @@ DateTime.stub!(now: time) FactlinkApi::UserManager.create_user "Gerard", "gelefiets@hotmail.com", "god1337" @u = User.where(username: "Gerard").first - @u.encrypted_password.should == 'god1337' - @u.email.should == 'gelefiets@hotmail.com' + @u.valid_password?("god1337").should be_true + @u.email.should == "gelefiets@hotmail.com" @u.confirmed_at.to_i.should == time.to_i end end
Fix UserManager Spec, check for valid_password
diff --git a/Casks/vagrant.rb b/Casks/vagrant.rb index abc1234..def5678 100644 --- a/Casks/vagrant.rb +++ b/Casks/vagrant.rb @@ -1,8 +1,8 @@ class Vagrant < Cask - version '1.6.4' - sha256 '21f556c75765bce280eeb1ed5059b7c36f5397f0aec2393862ef0b21b03b16d8' + version '1.6.5' + sha256 'a94a16b9ed5f63460f64110738067aea029238f8d826c8dd90c5c34615a5be1e' - url 'https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.4.dmg' + url 'https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5.dmg' homepage 'http://www.vagrantup.com' install 'Vagrant.pkg'
Update Vagrant to version 1.6.5
diff --git a/AGi18n.podspec b/AGi18n.podspec index abc1234..def5678 100644 --- a/AGi18n.podspec +++ b/AGi18n.podspec @@ -4,13 +4,13 @@ # Pod::Spec.new do |s| s.name = "AGi18n" - s.version = "0.0.1" + s.version = "0.0.3" s.summary = "Localize iOS apps by automatically extracting texts from code and XIB files and inject them back on runtime." s.description = "Utility to easily localize your iOS apps by automatically extracting texts from code and XIB files into a Localizable strings and inject them back on runtime without changing your XIB files." s.homepage = "https://github.com/angelolloqui/AGi18n" s.license = "MIT License" s.author = { "Angel Garcia Olloqui" => "http://angelolloqui.com" } - s.source = { :git => "https://github.com/angelolloqui/AGi18n.git", :tag => "0.0.1" } + s.source = { :git => "https://github.com/octo-online/AGi18n.git", :tag => "0.0.3" } s.platform = :ios, '5.0' s.ios.deployment_target = '5.0' s.source_files = 'lib/*.{h,m}'
Update spec and tag 0.0.3
diff --git a/app/controllers/campaigns_controller.rb b/app/controllers/campaigns_controller.rb index abc1234..def5678 100644 --- a/app/controllers/campaigns_controller.rb +++ b/app/controllers/campaigns_controller.rb @@ -22,7 +22,7 @@ def join_request JoinMailer.join_request(current_user, campaign).deliver - redirect_to campaigns_path, notice: "Your request has been sent succesfully." + redirect_to campaigns_path, notice: "Your request was sent to Game Master of campaign." end def manage_members
Change message in join request
diff --git a/app/controllers/api/v1/organizations_controller.rb b/app/controllers/api/v1/organizations_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/v1/organizations_controller.rb +++ b/app/controllers/api/v1/organizations_controller.rb @@ -13,7 +13,7 @@ def index orgs = current_user.viewable_organizations.map{ |o| {id: o.id, name: o.name}} - render status: 200, json: orgs + render status: 200, json: json_response(:success, data: orgs) end private
Use the json_response format when returning the index of orgs.
diff --git a/breaker-rails-cache-repo.gemspec b/breaker-rails-cache-repo.gemspec index abc1234..def5678 100644 --- a/breaker-rails-cache-repo.gemspec +++ b/breaker-rails-cache-repo.gemspec @@ -20,7 +20,7 @@ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "breaker" + spec.add_dependency "breaker", "~>0.2" spec.add_dependency "activesupport" spec.add_development_dependency "bundler"
Adjust gem spec to depend the forked version of breaker
diff --git a/lib/serializers/transfer_serializer.rb b/lib/serializers/transfer_serializer.rb index abc1234..def5678 100644 --- a/lib/serializers/transfer_serializer.rb +++ b/lib/serializers/transfer_serializer.rb @@ -45,6 +45,8 @@ deleted_at: transfer.deleted_at, purged_at: transfer.purged_at, + schedule: { uuid: transfer.schedule_id }, + num_keep: transfer.num_keep } end
Add schedule information to transfer serialization
diff --git a/lib/tasks/update_trove_visibility.rake b/lib/tasks/update_trove_visibility.rake index abc1234..def5678 100644 --- a/lib/tasks/update_trove_visibility.rake +++ b/lib/tasks/update_trove_visibility.rake @@ -33,11 +33,9 @@ end begin - if fedora_object.visibility.nil? - puts "Visibility is nil" - else - puts "#{fedora_object.visibility}" - end + puts "Setting #{fedora_object.title} to authenticated visibility." + fedora_object.visibility = "authenticated" + fedora_object.save rescue => ex puts "ERROR There was an error doing the conversion for: #{pid}" puts ex.message
Set the visibility to authenticated for trove records
diff --git a/chainer.gemspec b/chainer.gemspec index abc1234..def5678 100644 --- a/chainer.gemspec +++ b/chainer.gemspec @@ -1,11 +1,12 @@ # frozen_string_literal: true require_relative 'lib/chainer/version' +require 'date' Gem::Specification.new do |s| s.name = 'chainer' s.version = ::Chainer::VERSION - s.date = '2017-03-01' + s.date = Date.today.to_s s.summary = 'Allows to pipe Ruby calls in a nice way' s.description = 'Allows to pipe Ruby calls in a nice way' s.authors = ['Viktor Lazarev']
Use Date class to set correct publish date
diff --git a/lib/stripe_mock/request_handlers/helpers/token_helpers.rb b/lib/stripe_mock/request_handlers/helpers/token_helpers.rb index abc1234..def5678 100644 --- a/lib/stripe_mock/request_handlers/helpers/token_helpers.rb +++ b/lib/stripe_mock/request_handlers/helpers/token_helpers.rb @@ -35,7 +35,8 @@ end def get_card_or_bank_by_token(token) - @card_tokens[token] || @bank_tokens[token] || raise(Stripe::InvalidRequestError.new("Invalid token id: #{token}", 'tok', 404)) + token_id = token['id'] || token + @card_tokens[token_id] || @bank_tokens[token_id] || raise(Stripe::InvalidRequestError.new("Invalid token id: #{token_id}", 'tok', 404)) end end
Handle edge case when method agrument is Stripe::Token.
diff --git a/config/initializers/omni_auth.rb b/config/initializers/omni_auth.rb index abc1234..def5678 100644 --- a/config/initializers/omni_auth.rb +++ b/config/initializers/omni_auth.rb @@ -1,3 +1,8 @@ Rails.application.config.middleware.use OmniAuth::Builder do - provider :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET'], scope: 'user:email,admin:repo_hook,admin:org' + provider( + :github, + ENV['GITHUB_CLIENT_ID'], + ENV['GITHUB_CLIENT_SECRET'], + scope: 'user:email,repo' + ) end
Revert back to full repo access * Hound cannot work without repo access because a collaborator cannot * be added without it.
diff --git a/vagrant_cloud.gemspec b/vagrant_cloud.gemspec index abc1234..def5678 100644 --- a/vagrant_cloud.gemspec +++ b/vagrant_cloud.gemspec @@ -11,7 +11,6 @@ s.homepage = 'https://github.com/hashicorp/vagrant_cloud' s.license = 'MIT' - s.add_runtime_dependency 'json', '~> 2.1.0' s.add_runtime_dependency 'rest-client', '~> 2.0.2' s.add_development_dependency 'rake', '~> 10.4'
Remove the JSON runtime dependency Rely on JSON provided by stdlib by default. This can be modified at runtime by installing the RubyGem. Prevents dependency conflicts with other libraries that may impose constraints on the JSON library.
diff --git a/nokia2droid.rb b/nokia2droid.rb index abc1234..def5678 100644 --- a/nokia2droid.rb +++ b/nokia2droid.rb @@ -3,14 +3,23 @@ require 'optparse' require 'ostruct' require 'nokogiri' +require 'vcardigan' -def forward_convert filename - src = File.open(filename) - doc = Nokogiri::XML(src) - # p doc.at_xpath("//c:Notes").children.to_s - p doc.at_xpath("//c:Number").children.to_s - p doc.at_xpath("//c:FamilyName").children.to_s - p doc.at_xpath("//c:GivenName").children.to_s +def forward_convert in_filename + src = File.open(in_filename) + doc = Nokogiri::XML(src) + dst = VCardigan.create(:version => '4.0') + + unless doc.at_xpath("//c:Notes").nil? + dst.note doc.at_xpath("//c:Notes").children.to_s + end + dst.tel doc.at_xpath("//c:Number").children.to_s, :type => 'CELL' + dst.name doc.at_xpath("//c:FamilyName").children.to_s, + doc.at_xpath("//c:GivenName").children.to_s + dst.fullname doc.at_xpath("//c:GivenName").children.to_s + doc.at_xpath("//c:FamilyName").children.to_s + # FN mandatory for vcard? + + src.close end options = OpenStruct.new
Create VCARD from data extracted from XML
diff --git a/puppet-lint-duplicate_class_parameters-check.gemspec b/puppet-lint-duplicate_class_parameters-check.gemspec index abc1234..def5678 100644 --- a/puppet-lint-duplicate_class_parameters-check.gemspec +++ b/puppet-lint-duplicate_class_parameters-check.gemspec @@ -25,5 +25,5 @@ spec.add_development_dependency 'rubocop', '~> 0.47.1' spec.add_development_dependency 'rake', '~> 11.2.0' spec.add_development_dependency 'rspec-json_expectations', '~> 2.2' - spec.add_development_dependency 'simplecov', '~> 0.15.0' + spec.add_development_dependency 'simplecov', '~> 0.17.1' end
Update simplecov requirement from ~> 0.15.0 to ~> 0.17.1 Updates the requirements on [simplecov](https://github.com/colszowka/simplecov) to permit the latest version. - [Release notes](https://github.com/colszowka/simplecov/releases) - [Changelog](https://github.com/colszowka/simplecov/blob/master/CHANGELOG.md) - [Commits](https://github.com/colszowka/simplecov/compare/v0.15.0...v0.17.1) Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
diff --git a/Casks/katana.rb b/Casks/katana.rb index abc1234..def5678 100644 --- a/Casks/katana.rb +++ b/Casks/katana.rb @@ -0,0 +1,9 @@+class Katana < Cask + version '1.1.1' + sha256 'cac0091f63a0281f6f95f609e04455db98f915f4e1f40a575e822208b3265eae' + + url 'http://download.witiz.com/Katana.zip' + homepage 'http://katana.witiz.com/' + + link 'Katana.app' +end
Add the note application Katana v1.1.1
diff --git a/Formula/sshs.rb b/Formula/sshs.rb index abc1234..def5678 100644 --- a/Formula/sshs.rb +++ b/Formula/sshs.rb @@ -12,6 +12,40 @@ end test do - assert_equal "sshs version #{version}", shell_output("#{bin}/sshs --version").strip + assert_equal "sshs version #{version}", shell_output(bin/"sshs --version").strip + + # Homebrew testing environment doesn't have ~/.ssh/config by default + assert_match "no such file or directory", shell_output(bin/"sshs 2>&1 || true").strip + + require "pty" + require "io/console" + + ENV["TERM"] = "xterm" + + (testpath/".ssh/config").write <<~EOS + Host "Test" + HostName example.com + User root + Port 22 + EOS + + PTY.spawn(bin/"sshs") do |r, w, _pid| + r.winsize = [80, 40] + sleep 1 + + # Search for Test host + w.write "Test" + sleep 1 + + # Quit + w.write "\003" + sleep 1 + + begin + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end end end
Add more tests to SSHS formula
diff --git a/XPCSwift.podspec b/XPCSwift.podspec index abc1234..def5678 100644 --- a/XPCSwift.podspec +++ b/XPCSwift.podspec @@ -16,7 +16,7 @@ s.platform = :osx, "10.9" s.source = { :git => "https://github.com/IngmarStein/XPCSwift.git" } - s.source_files = "XPCSwift/**/*.{h,swift}" + s.source_files = "XPCSwift/**/*.{m,h,swift}" s.public_header_files = "XPCSwift/**/*.h" # s.requires_arc = true
Add .m to source file list
diff --git a/lib/qspec/helper.rb b/lib/qspec/helper.rb index abc1234..def5678 100644 --- a/lib/qspec/helper.rb +++ b/lib/qspec/helper.rb @@ -12,6 +12,7 @@ puts "Creating template" Config.create_template when 'spork' + Qspec.create_tmp_directory_if_not_exist @config = Config.new puts "Start #{@config['workers']} sporks" start_spork_workers(@config['workers'])
Create temporary directory before start spork
diff --git a/lib/utils/writer.rb b/lib/utils/writer.rb index abc1234..def5678 100644 --- a/lib/utils/writer.rb +++ b/lib/utils/writer.rb @@ -6,7 +6,7 @@ data = CSV.generate do |csv| csv << header result.sort_by{|c| c[1].name}.each do |uri, character| - csv << character.output if character.output + csv << character.output if character.output.any? end end file.put(body: data)
Fix issue with empty summary
diff --git a/lib/tasks/sample_data/payment_method_factory.rb b/lib/tasks/sample_data/payment_method_factory.rb index abc1234..def5678 100644 --- a/lib/tasks/sample_data/payment_method_factory.rb +++ b/lib/tasks/sample_data/payment_method_factory.rb @@ -46,7 +46,7 @@ description: description, distributor_ids: [enterprise.id] ) - card.calculator = calculator - card.save! + calculator.calculable = card + calculator.save! end end
Fix creation of sample payment methods on staging Due to an unknown reason my chosen way of creating calculator and assigning it to a payment method didn't work in staging environment even though it was working in development. Without diving deeper into the cause of this, I decided to change the record assignments and fix the problem that way.
diff --git a/event_store-entity_store.gemspec b/event_store-entity_store.gemspec index abc1234..def5678 100644 --- a/event_store-entity_store.gemspec +++ b/event_store-entity_store.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'event_store-entity_store' - s.version = '0.1.1' + s.version = '0.1.2' s.summary = 'Store of entities that are projected from EventStore streams' s.description = ' '
Package version is incremented from 0.1.1 to 0.1.2
diff --git a/core/lib/sndicate_helper.rb b/core/lib/sndicate_helper.rb index abc1234..def5678 100644 --- a/core/lib/sndicate_helper.rb +++ b/core/lib/sndicate_helper.rb @@ -1,5 +1,52 @@-module SndicateHelper - def load_plugins - puts 'This method loads user-installed plugins.' +require 'sinatra/base' + +# Sndicate Helpers +# +# This file extends Sinatra and adds some global helpers. +# The plan is to extract this out into the snd-commands +# gem when there are enough methods to extract out. +module Sinatra + module SndicateHelpers + # Relative Time Helper + # + # Returns a relative time from any date. Useful for + # knowing when a post was published and things like + # that. + # + # For example, given any date object - + # + # yesterday = Time.now.to_i - (3600 * 24) + # relative_time(yesterday) + # #=> "yesterday" + # + # All credit goes to Rails. This is ripped verbatim from + # Active Support. + def relative_time(from_time, to_time = Time.now.to_i, include_seconds = false) + distance_in_minutes = (((to_time - from_time).abs)/60).round + distance_in_seconds = ((to_time - from_time).abs).round + + case distance_in_minutes + when 0..1 + return (distance_in_minutes==0) ? 'less than a minute ago' : '1 minute ago' unless include_seconds + case distance_in_seconds + when 0..5 then 'less than 5 seconds ago' + when 6..10 then 'less than 10 seconds ago' + when 11..20 then 'less than 20 seconds ago' + when 21..40 then 'half a minute ago' + when 41..59 then 'less than a minute ago' + else '1 minute ago' + end + + when 2..45 then "#{distance_in_minutes} minutes ago" + when 46..90 then 'about 1 hour ago' + when 90..1440 then "about #{(distance_in_minutes / 60).round} hours ago" + when 1441..2880 then '1 day ago' + when 2881..43220 then "#{(distance_in_minutes / 1440).round} days ago" + when 43201..86400 then 'about 1 month ago' + when 86401..525960 then "#{(distance_in_minutes / 43200).round} months ago" + when 525961..1051920 then 'about 1 year ago' + else "over #{(distance_in_minutes / 525600).round} years ago" + end + end end -end +end
Add method to convert times to relative, human-readable format.
diff --git a/Casks/join-together.rb b/Casks/join-together.rb index abc1234..def5678 100644 --- a/Casks/join-together.rb +++ b/Casks/join-together.rb @@ -1,6 +1,6 @@ cask :v1 => 'join-together' do - version '7.5.2' - sha256 '113eafed2832f3053c80419e832d1ad8d9e5da2806b09c8ec4cbce55c4843b8f' + version '7.5.3' + sha256 '2df29280c83580e16acaac20e5015acf1d24889de1439cc252f735658053af23' url "http://dougscripts.com/itunes/scrx/jointogether#{version.delete('.')}.zip" name 'Join Together'
Update Join Together to 7.5.3
diff --git a/lib/bugsnag/middleware/rails3_request.rb b/lib/bugsnag/middleware/rails3_request.rb index abc1234..def5678 100644 --- a/lib/bugsnag/middleware/rails3_request.rb +++ b/lib/bugsnag/middleware/rails3_request.rb @@ -15,6 +15,7 @@ # Augment the request tab notification.add_tab(:request, { + :requestId => env["action_dispatch.request_id"], :railsAction => "#{params[:controller]}##{params[:action]}", :params => params })
Add logging of Rails request ID The request ID was introduced in Rails 3.2 to enable easy tracking of individual requests in logs. This adds it to the Request tab in bugsnag, to make tracking down logs for a particular error easier. The ID is generated by ActionDispatch::RequestId (using either the `X-Request-Id` header, or `SecureRandom.uuid`).
diff --git a/lib/less/rails/railtie.rb b/lib/less/rails/railtie.rb index abc1234..def5678 100644 --- a/lib/less/rails/railtie.rb +++ b/lib/less/rails/railtie.rb @@ -16,8 +16,8 @@ end initializer 'less-rails.before.load_config_initializers', :before => :load_config_initializers, :group => :all do |app| - app.assets.register_preprocessor 'text/css', ImportProcessor - Sprockets.register_preprocessor 'text/css', ImportProcessor if Sprockets.respond_to?('register_preprocessor') + sprockets_env = app.assets || Sprockets + sprockets_env.register_preprocessor 'text/css', ImportProcessor config.assets.configure do |env| env.context_class.class_eval do
Fix Undefined MethodError at app.assets.register_preprocessor for sprockets3.X
diff --git a/lib/napa/stats_d_timer.rb b/lib/napa/stats_d_timer.rb index abc1234..def5678 100644 --- a/lib/napa/stats_d_timer.rb +++ b/lib/napa/stats_d_timer.rb @@ -1,15 +1,19 @@ module Napa module StatsDTimer - def report_time(timer_name) - start_time = Time.now - yield - response_time = (Time.now - start_time) * 1000 # statsd reports timers in milliseconds - Napa::Stats.emitter.timing(timer_name, response_time) + def report_time(timer_name, sample_rate: 1) + if (Time.now.to_f * 1000).to_i % sample_rate == 0 + start_time = Time.now + yield + response_time = (Time.now - start_time) * 1000 # statsd reports timers in milliseconds + Napa::Stats.emitter.timing(timer_name, response_time) + else + yield + end end module ClassMethods - def report_time(timer_name) - new.report_time(timer_name) do + def report_time(timer_name, sample_rate: 1) + new.report_time(timer_name, sample_rate: sample_rate) do yield end end
Add a sampling rate to StatsD timer
diff --git a/lib/specinfra/helper/detect_os/debian.rb b/lib/specinfra/helper/detect_os/debian.rb index abc1234..def5678 100644 --- a/lib/specinfra/helper/detect_os/debian.rb +++ b/lib/specinfra/helper/detect_os/debian.rb @@ -20,7 +20,7 @@ end distro ||= 'debian' release ||= nil - { :family => distro.strip.downcase, :release => release } + { :family => distro.gsub(/\p{^Alnum}/, '').downcase, :release => release } end end end
Remove all non-alphanumeric characters from the distro name, rather than just strip'ing it; this cleans up names like "Cumulus Networks" (with the literal double-quotes)
diff --git a/lib/snapme/cli/command.rb b/lib/snapme/cli/command.rb index abc1234..def5678 100644 --- a/lib/snapme/cli/command.rb +++ b/lib/snapme/cli/command.rb @@ -1,15 +1,12 @@ module Snapme module CLI class Command - def self.command_name - 'snapme' - end def self.start(args) options = Options.parse(args) auth_token = ENV['SNAPME_AUTH_TOKEN'] if options.kill - `killall #{command_name}` + `killall #{$PROGRAM_NAME}` return end
Replace class method constant with $PROGRAM_NAME
diff --git a/lib/vapebot/connection.rb b/lib/vapebot/connection.rb index abc1234..def5678 100644 --- a/lib/vapebot/connection.rb +++ b/lib/vapebot/connection.rb @@ -15,7 +15,7 @@ join_channel(config.channels) end - def register(nick, user, host, pass) + def register(nick, pass) @socket.puts "NICK #{nick}" sleep 1 @socket.puts "USER #{nick} 8 * :#{nick}"
Remove unused args in register function.
diff --git a/daemons.gemspec b/daemons.gemspec index abc1234..def5678 100644 --- a/daemons.gemspec +++ b/daemons.gemspec @@ -24,8 +24,7 @@ s.files = [ "Rakefile", "Releases", - "TODO", - "README", + "README.md", "LICENSE", "setup.rb", "lib/*.rb",
Update gemspec removing TODO and renaming README.md
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index abc1234..def5678 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -6,7 +6,7 @@ def tweets twitter_username = params[:username] - num_tweets = params[:count] || 15 + num_tweets = params[:count] || 25 @tweets = fetch(twitter_username, num_tweets) render :json => @tweets, status: :ok end
Update default tweet fetch count per project requirements
diff --git a/lib/active_job/queue_adapters/resque_adapter.rb b/lib/active_job/queue_adapters/resque_adapter.rb index abc1234..def5678 100644 --- a/lib/active_job/queue_adapters/resque_adapter.rb +++ b/lib/active_job/queue_adapters/resque_adapter.rb @@ -1,10 +1,12 @@ require 'resque' require 'active_support/core_ext/enumerable' require 'active_support/core_ext/array/access' + begin require 'resque-scheduler' -rescue LoadError - require 'resque_scheduler' +rescue LoadError => e + $stderr.puts 'The ActiveJob resque adapter requires resque-scheduler. Please add it to your Gemfile and run bundle install' + raise e end module ActiveJob
Improve the error message when resque-scheduler is not available
diff --git a/test/integration/worker/project/update_info_test.rb b/test/integration/worker/project/update_info_test.rb index abc1234..def5678 100644 --- a/test/integration/worker/project/update_info_test.rb +++ b/test/integration/worker/project/update_info_test.rb @@ -8,6 +8,5 @@ it "should work using .enqueue" do described_class.enqueue(project_uid) - p Project.find_by_uid(project_uid) end end
Remove debug output from test
diff --git a/app/jobs/slack_jobs/inviter_job.rb b/app/jobs/slack_jobs/inviter_job.rb index abc1234..def5678 100644 --- a/app/jobs/slack_jobs/inviter_job.rb +++ b/app/jobs/slack_jobs/inviter_job.rb @@ -1,6 +1,7 @@ class SlackJobs class InviterJob < SlackJobs include Sidekiq::Worker + sidekiq_options retry: 5 def perform(email) Raven.user_context email: email
Add retries option to ActiveJob
diff --git a/app/serializers/list_serializer.rb b/app/serializers/list_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/list_serializer.rb +++ b/app/serializers/list_serializer.rb @@ -1,5 +1,5 @@ class ListSerializer < ActiveModel::Serializer # embed :ids, include: true - attributes :id, :title + attributes :id, :title, :description, :user has_many :list_items end
Add description filed to list serializer.
diff --git a/Casks/adium.rb b/Casks/adium.rb index abc1234..def5678 100644 --- a/Casks/adium.rb +++ b/Casks/adium.rb @@ -3,8 +3,8 @@ sha256 'bca3ac81d33265b71c95a3984be80715fbd98f38d7c463d0441d43a335ed399a' url "http://download.adium.im/Adium_#{version}.dmg" - appcast 'http://www.adium.im/sparkle/update.php', - :sha256 => 'cfb624cfa2f2526905ed7cb0eb39da98c73ef3c4633618348c00f12b2d44e19a' + appcast 'https://www.adium.im/sparkle/appcast-release.xml', + :sha256 => '5d05831689494b3059ddf31580438579dee1d1b2a34f24a018b86fcaadd46e53' homepage 'https://www.adium.im/' license :gpl
Fix appcast url for Adium. The old url is out-of-date and points to version 1.1.4 from 2007. The new url is the correct one for stable releases.
diff --git a/Casks/tower.rb b/Casks/tower.rb index abc1234..def5678 100644 --- a/Casks/tower.rb +++ b/Casks/tower.rb @@ -1,9 +1,9 @@ cask :v1 => 'tower' do - version '2.2.1-277' - sha256 'e8fd917eb00674b1a0db1a95165e12a782d2286ea631b7b19337b0ca54aff22a' + version '2.2.2-284' + sha256 'f2336a0565a99436b9159b7d066f30f136b6fe72f803ab354e678fe0fbc351fd' # amazonaws.com is the official download host per the vendor homepage - url "https://fournova-app-updates.s3.amazonaws.com/apps/tower2-mac/277-0be85680/Tower-2-#{version}.zip" + url "https://fournova-app-updates.s3.amazonaws.com/apps/tower2-mac/284-05b8a99e/Tower-2-#{version}.zip" appcast 'https://updates.fournova.com/updates/tower2-mac/stable' name 'Tower' homepage 'http://www.git-tower.com/'
Update Tower to version 2.2.2 This commit updates the version, sha256 and url stanzas. (The url update is unfortunate, but the Tower folks bake the version number and a hash fragment for the release into the path)
diff --git a/multi_spork.gemspec b/multi_spork.gemspec index abc1234..def5678 100644 --- a/multi_spork.gemspec +++ b/multi_spork.gemspec @@ -1,4 +1,5 @@-require File.expand_path("../lib/multi_spork/version", __FILE__) +$:.unshift File.expand_path("../lib", __FILE__) +require "multi_spork/version" Gem::Specification.new do |s| s.name = "multi_spork"
Add gem lib to load path
diff --git a/Casks/eqmac.rb b/Casks/eqmac.rb index abc1234..def5678 100644 --- a/Casks/eqmac.rb +++ b/Casks/eqmac.rb @@ -1,13 +1,11 @@ cask :v1 => 'eqmac' do - version '1.3.2-b1' - sha256 '4e810e2956f3c46b13f3a7024c58676fd54a1f2d02e63252f946c53479ce43a1' + version '2.0.0beta3' + sha256 '892bfb439f4ee4fdb009ce4b1d802d997e0675976cc8c8434506d95b994acdc4' - url "http://eqmac.hulse.id.au/sites/default/files/downloads/Mount-#{version}.app_.zip" + url "http://eqmac.hulse.id.au/sites/default/files/downloads/EQMac-#{version}.zip" name 'EQMac' homepage 'http://eqmac.hulse.id.au/' license :unknown - # Renamed for clarity: app name is inconsistent with the branding on the website, and will be corrected in the next version. - # Original discussion: https://github.com/caskroom/homebrew-cask/pull/8438 - app "Mount-#{version}.app", :target => 'EQMac.app' + app "EQMac-#{version}.app" end
Update EQMac version from 1.3.2-b1 to 2.0.0beta3 url changed format, and the naming issue in #8438 is dealt with
diff --git a/TEST2/test2.rb b/TEST2/test2.rb index abc1234..def5678 100644 --- a/TEST2/test2.rb +++ b/TEST2/test2.rb @@ -15,8 +15,10 @@ td1, description = tr.xpath('./td') if months.any? { |month| description.content.include?(month) } #refactored for better hash output thanks to https://stackoverflow.com/questions/9336039/get-link-and-href-text-from-html-doc-with-nokogiri-ruby - rows = Hash[td1.xpath('./a').map {|link| [link.text.gsub(/[[:space:]]+/, ""), link["href"]]}] - p rows + rows = Hash[td1.xpath('./a').map {|link| [link.text.gsub(/[[:space:]]+/, ""), File.expand_path(link["href"])]}] + rows.each do |key, value| + puts "#{key} #{value}" + end end end
Print each entry, one per line, with table name and absolute path
diff --git a/db/migrate/20160624101145_add_builder_enabled_to_users.rb b/db/migrate/20160624101145_add_builder_enabled_to_users.rb index abc1234..def5678 100644 --- a/db/migrate/20160624101145_add_builder_enabled_to_users.rb +++ b/db/migrate/20160624101145_add_builder_enabled_to_users.rb @@ -1,7 +1,7 @@ Sequel.migration do change do alter_table :users do - add_column :builder_enabled, :text + add_column :builder_enabled, :boolean, null: true, default: true end end end
Use a boolean column for builder_enabled
diff --git a/test/functional/functional_test.rb b/test/functional/functional_test.rb index abc1234..def5678 100644 --- a/test/functional/functional_test.rb +++ b/test/functional/functional_test.rb @@ -1,7 +1,9 @@ #!/usr/bin/env ruby begin + old_verbose = $VERBOSE require 'rubygems' + $VERBOSE = nil gem 'session' require 'session' rescue LoadError @@ -10,6 +12,8 @@ else puts "Unable to run functional tests -- please run \"gem install session\"" end +ensure + $VERBOSE = old_verbose end if defined?(Session)
Disable (annoying) warnings from session gem.
diff --git a/app/controllers/spree/admin/payments_controller_decorator.rb b/app/controllers/spree/admin/payments_controller_decorator.rb index abc1234..def5678 100644 --- a/app/controllers/spree/admin/payments_controller_decorator.rb +++ b/app/controllers/spree/admin/payments_controller_decorator.rb @@ -6,14 +6,14 @@ redirect_to admin_order_payment_path(@order, @payment) end elsif request.post? - response = @payment.payment_method.refund(@payment, params[:refund_amount]) - if response.success? + begin + @payment.refund!(params[:refund_amount].to_f) flash[:success] = Spree.t(:refund_successful, :scope => 'paypal') redirect_to admin_order_payments_path(@order) - else - flash.now[:error] = Spree.t(:refund_unsuccessful, :scope => 'paypal') + " (#{response.errors.first.long_message})" + rescue Core::GatewayError => e + flash.now[:error] = Spree.t(:refund_unsuccessful, :scope => 'paypal') + " (#{e})" render end end end -end+end
Use current store refund workflow
diff --git a/Formula/bartycrouch.rb b/Formula/bartycrouch.rb index abc1234..def5678 100644 --- a/Formula/bartycrouch.rb +++ b/Formula/bartycrouch.rb @@ -1,7 +1,7 @@ class Bartycrouch < Formula desc "Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files." homepage "https://github.com/Flinesoft/BartyCrouch" - url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.0.0-alpha.2", :revision => "7edc4cfdcdf934a823914b3b0332c007557c9609" + url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.0.0", :revision => "3afdce4b875b6e8a573eaa30a225e709b7ee7b0a" head "https://github.com/Flinesoft/BartyCrouch.git" depends_on :xcode => ["10.0", :build]
Update formula to version 4.0.0
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index abc1234..def5678 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -4,4 +4,4 @@ # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -Marli::Application.config.secret_token = Settings.secret_token +Marli::Application.config.secret_token = ENV['SECRET_TOKEN']
Use the Figs environment variable for the secret token
diff --git a/Sodium.podspec b/Sodium.podspec index abc1234..def5678 100644 --- a/Sodium.podspec +++ b/Sodium.podspec @@ -14,14 +14,9 @@ s.osx.deployment_target = '10.11' s.watchos.deployment_target = '5.0' -s.ios.vendored_library = 'Sodium/libsodium/libsodium-ios.a' -s.osx.vendored_library = 'Sodium/libsodium/libsodium-osx.a' -s.watchos.vendored_library = 'Sodium/libsodium/libsodium-watchos.a' - s.source_files = 'Sodium/**/*.{swift,h}' s.private_header_files = 'Sodium/libsodium/*.h' -s.preserve_paths = 'Sodium/libsodium/module.modulemap' s.pod_target_xcconfig = { 'SWIFT_INCLUDE_PATHS' => '$(PODS_TARGET_SRCROOT)/Sodium/libsodium', }
Remove references to nonexistent files
diff --git a/db/migrate/20160412174954_add_ci_commit_indexes.rb b/db/migrate/20160412174954_add_ci_commit_indexes.rb index abc1234..def5678 100644 --- a/db/migrate/20160412174954_add_ci_commit_indexes.rb +++ b/db/migrate/20160412174954_add_ci_commit_indexes.rb @@ -1,7 +1,13 @@ class AddCiCommitIndexes < ActiveRecord::Migration + disable_ddl_transaction! + def change - add_index :ci_commits, [:gl_project_id, :sha] - add_index :ci_commits, [:gl_project_id, :status] - add_index :ci_commits, [:status] + add_index :ci_commits, [:gl_project_id, :sha], index_options + add_index :ci_commits, [:gl_project_id, :status], index_options + add_index :ci_commits, [:status], index_options + end + + def index_options + { algorithm: :concurrently } if Gitlab::Database.postgresql? end end
Add indexes concurrently on PostgreSQL
diff --git a/db/migrate/20140221000855_add_reset_at_to_sites.rb b/db/migrate/20140221000855_add_reset_at_to_sites.rb index abc1234..def5678 100644 --- a/db/migrate/20140221000855_add_reset_at_to_sites.rb +++ b/db/migrate/20140221000855_add_reset_at_to_sites.rb @@ -1,5 +1,8 @@ class AddResetAtToSites < ActiveRecord::Migration def change add_column :sites, :reset_at, :datetime + reversible do |dir| + dir.up { Site.update_all reset_at: DateTime.now } + end end end
Add a default value to reset_at
diff --git a/features/support/hooks.rb b/features/support/hooks.rb index abc1234..def5678 100644 --- a/features/support/hooks.rb +++ b/features/support/hooks.rb @@ -21,7 +21,14 @@ end end +Before("@capsulecrm") do + @capsule_cleanup = [] +end + After("@capsulecrm") do + @capsule_cleanup.each do |x| + x.delete! + end end After do
Clean up capsule items afterwards
diff --git a/lib/matasano_crypto_challenges/single_byte_xor_cracker.rb b/lib/matasano_crypto_challenges/single_byte_xor_cracker.rb index abc1234..def5678 100644 --- a/lib/matasano_crypto_challenges/single_byte_xor_cracker.rb +++ b/lib/matasano_crypto_challenges/single_byte_xor_cracker.rb @@ -10,12 +10,12 @@ @normally_frequent_bytes = Array(normally_frequent_bytes) end - def crack(hexadecimal) + def crack(representation) best = Representations::Hexadecimal.from_bytes([]) 1.upto 255 do |key_seed| key = Representations::Hexadecimal.from_bytes([key_seed] * - hexadecimal.bytes.length) - guess = (hexadecimal ^ key) + representation.bytes.length) + guess = (representation ^ key) if best.normalcy_score < (guess.normalcy_score = normalcy_score(guess)) best = guess end @@ -25,9 +25,9 @@ private - def frequent_bytes(hexadecimal) + def frequent_bytes(representation) table = {} - hexadecimal.bytes.each do |b| + representation.bytes.each do |b| table[b] = table[b].to_i + 1 end table.to_a. @@ -37,9 +37,9 @@ slice 0, normally_frequent_bytes.length end - def normalcy_score(hexadecimal) + def normalcy_score(representation) normally_frequent_bytes.length - - (frequent_bytes(hexadecimal) - normally_frequent_bytes).length + (frequent_bytes(representation) - normally_frequent_bytes).length end end
Refactor SingleByteXorCracker method parameter names to reflect contract
diff --git a/fog/list.rb b/fog/list.rb index abc1234..def5678 100644 --- a/fog/list.rb +++ b/fog/list.rb @@ -1,10 +1,14 @@+#!/usr/bin/ruby + +require './config.rb' require 'fog' docean = Fog::Compute.new({ :provider => 'DigitalOcean', - :digitalocean_api_key => 'b186e1ca2928bb56fe6c9c5c1533c6c6', # your API key here - :digitalocean_client_id => '1368a5b6f9367dcdfd78034138339c86' # your client key here + :digitalocean_api_key => @docean_api_key, # your API key here + :digitalocean_client_id => @docean_client_id # your client key here }) + docean.servers.each do |server|
Remove API key from code
diff --git a/event_store-entity_store.gemspec b/event_store-entity_store.gemspec index abc1234..def5678 100644 --- a/event_store-entity_store.gemspec +++ b/event_store-entity_store.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'event_store-entity_store' - s.version = '0.0.3.4' + s.version = '0.0.3.5' s.summary = 'Store of entities that are projected from EventStore streams' s.description = ' '
Increase version from 0.0.3.4 to 0.0.3.5
diff --git a/app/controllers/lists_controller.rb b/app/controllers/lists_controller.rb index abc1234..def5678 100644 --- a/app/controllers/lists_controller.rb +++ b/app/controllers/lists_controller.rb @@ -4,7 +4,7 @@ end def new - #@list = List.new + @list = List.new end def create
Initialize new List for use by form
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 @@ -1,9 +1,10 @@ class UsersController < ApplicationController def index - @users = User.all @user = current_user - #@name = User.where(email: current_user.email).first.name + # redirect_to @user + # raise @user.inspect + # @name = User.where(email: current_user.email).first.name end def show
Comment out @user declaration in controller since current_user is null
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 @@ -4,12 +4,12 @@ def show @user = @current_user - @invoices = @user.invoices.unpaid - @orders_to_ship = @user.orders.to_ship - @orders_awaiting_payment = @user.orders.awaiting_payment - @orders_processing = @user.orders.processing - @orders_unprocessed = @user.orders.unprocessed - @last_shipped_orders = @user.orders.shipped.limit(5) + @invoices = @user.invoices.unpaid.order("created_at DESC") + @orders_to_ship = @user.orders.to_ship.order("created_at DESC") + @orders_awaiting_payment = @user.orders.awaiting_payment.order("created_at DESC") + @orders_processing = @user.orders.processing.order("created_at DESC") + @orders_unprocessed = @user.orders.unprocessed.order("created_at DESC") + @last_shipped_orders = @user.orders.shipped.order("created_at DESC").limit(5) @addresses = @user.addresses.active @notifications = @user.notifications
Order newest stuff first in user backend.
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 @@ -2,5 +2,6 @@ def show @user = User.find(params[:id]) + @transactions = Transaction.sort_by_user(@user) end end
Update user controller to include transactions to be called on user show page
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 @@ -1,5 +1,6 @@ class UsersController < ApplicationController skip_before_filter :require_login, :only => [:new, :create] + before_action :set_date_format, only: [:create, :update] def new @user = User.new @@ -9,7 +10,7 @@ @user = User.new(user_params) if @user.save flash[:success] = 'Bienvenido !' - redirect_to @user + redirect_to login_path else flash[:error] = @user.errors.full_messages.join(',') render 'new' @@ -23,7 +24,13 @@ def user_params params.require(:user).permit(:username, :first_name, :last_name, :birth_date, :email, - :password, :password_confirmation) + :password, :password_confirmation, :type) end + + def set_date_format + formatted_date = (params['user']['birth_date']).to_date + params['user'].merge(birth_date: formatted_date) + end + private :set_date_format end
Add before_filter on save and update to set date format and permit type as user param.
diff --git a/app/controllers/votes_controller.rb b/app/controllers/votes_controller.rb index abc1234..def5678 100644 --- a/app/controllers/votes_controller.rb +++ b/app/controllers/votes_controller.rb @@ -0,0 +1,18 @@+class VotesController < ApplicationController + + def create + @vote = Vote.new(vote_params) + @question = Question.find(params[:vote][:votable_id]) + if @vote.save + redirect_to question_path(@question) + else + flash[:notice] = @vote.errors.full_messages.join(", ") + render 'questions/show.html.erb' + end + end + + def vote_params + params.require(:vote).permit(:value, :voter_id, :votable_id, :votable_type) + end + +end
Create votes controller and create action to handle question voting
diff --git a/lib/ecm/cms/action_view/template/handlers/textile.rb b/lib/ecm/cms/action_view/template/handlers/textile.rb index abc1234..def5678 100644 --- a/lib/ecm/cms/action_view/template/handlers/textile.rb +++ b/lib/ecm/cms/action_view/template/handlers/textile.rb @@ -1,7 +1,7 @@ module ActionView::Template::Handlers class Textile class_attribute :default_format - self.default_format = Mime::HTML + self.default_format = Mime[:html] def erb_handler @@erb_handler ||= ActionView::Template.registered_template_handler(:erb)
Change Mime::HTML to Mime[:html] for rails 5.1 compatibility.
diff --git a/app/helpers/we_the_people_helper.rb b/app/helpers/we_the_people_helper.rb index abc1234..def5678 100644 --- a/app/helpers/we_the_people_helper.rb +++ b/app/helpers/we_the_people_helper.rb @@ -1,5 +1,7 @@ module WeThePeopleHelper TAIWAN_PETITION_ID = '51942b9b2f2c888e2f00000c' GOOGLE_WALLET_PETITION_ID = '51955d78cde5b88f6b000005' + PRE_TAX_FEDERAL_STUDENT_LOAN_PAYMENT_PETITION_ID = '51884a8cadfd95980300000a' + POSITIVE_THEME_PETITION_ID = PRE_TAX_FEDERAL_STUDENT_LOAN_PAYMENT_PETITION_ID EXAMPLE_PETITION_ID = TAIWAN_PETITION_ID end
Add an example for a petition which has a positive theme.
diff --git a/healthy.gemspec b/healthy.gemspec index abc1234..def5678 100644 --- a/healthy.gemspec +++ b/healthy.gemspec @@ -18,6 +18,7 @@ gem.require_paths = ['lib'] gem.add_dependency 'activesupport', '~> 3.2' + gem.add_dependency 'addressable', '~> 2.3' gem.add_development_dependency 'bundler', '~> 1.0' gem.add_development_dependency 'rake', '~> 0.8'
Add addressable as explicit dependency
diff --git a/app/serializers/event_serializer.rb b/app/serializers/event_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/event_serializer.rb +++ b/app/serializers/event_serializer.rb @@ -1,5 +1,5 @@ class EventSerializer < ActiveModel::Serializer - attributes :id, :title, :start_time, :end_time, :start_date, :end_date, :description, :address, :skills_needed, :minimum_age, :url + attributes :id, :title, :organization, :start_time, :end_time, :start_date, :end_date, :description, :address, :skills_needed, :minimum_age, :url has_one :cause end
Add organization attributes to event serializer
diff --git a/app/serializers/story_serializer.rb b/app/serializers/story_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/story_serializer.rb +++ b/app/serializers/story_serializer.rb @@ -24,13 +24,13 @@ first_substory = object.substories.first # FIXME This logic doesn't belong in a serializer. Move it to the substory # before_save hook. - if first_substory + if first_substory && !first_substory.data["formatted_comment"] formatted_comment = MessageFormatter.format_message first_substory.data["comment"] first_substory.data["formatted_comment"] = formatted_comment - first_substory.save + first_substory.save! + end first_substory.data["formatted_comment"] - end - end + end def include_comment? object.story_type == "comment" end
Speed up story serializer by ∞%
diff --git a/amp_generate.rb b/amp_generate.rb index abc1234..def5678 100644 --- a/amp_generate.rb +++ b/amp_generate.rb @@ -10,10 +10,14 @@ self.read_yaml(File.join(base, '_layouts'), 'amp.html') self.content = post.content self.data['body'] = (Liquid::Template.parse post.content).render site.site_payload - self.data['title'] = post.data['title'] - self.data['date'] = post.data['date'] - self.data['author'] = post.data['author'] - self.data['category'] = post.data['category'] + + # Merge all data from post so that keys from self.data have higher priority + self.data = post.data.merge(self.data) + + # Remove non needed keys from data + # Excerpt will cause an error if kept + self.data.delete('excerpt') + self.data['canonical_url'] = post.url end end
Add all data from post into amp page Many of the custom data keys were missing from amp data and this caused strange errors into my amp pages. Now all of the data elements from post will get copied.
diff --git a/spec/unit/vagrant-proxyconf/cap/linux/env_proxy_conf_spec.rb b/spec/unit/vagrant-proxyconf/cap/linux/env_proxy_conf_spec.rb index abc1234..def5678 100644 --- a/spec/unit/vagrant-proxyconf/cap/linux/env_proxy_conf_spec.rb +++ b/spec/unit/vagrant-proxyconf/cap/linux/env_proxy_conf_spec.rb @@ -0,0 +1,11 @@+require 'spec_helper' +require 'vagrant-proxyconf/cap/linux/env_proxy_conf' + +describe VagrantPlugins::ProxyConf::Cap::Linux::EnvProxyConf do + + describe '.env_proxy_conf' do + let(:subject) { described_class.env_proxy_conf(double) } + it { should eq '/etc/profile.d/proxy.sh' } + end + +end
Add unit test for Cap::Linux::EnvProxyConf.env_proxy_conf
diff --git a/PINRemoteImage.podspec b/PINRemoteImage.podspec index abc1234..def5678 100644 --- a/PINRemoteImage.podspec +++ b/PINRemoteImage.podspec @@ -14,7 +14,7 @@ s.homepage = "https://github.com/pinterest/PINRemoteImage" s.license = 'Apache 2.0' s.author = { "Garrett Moon" => "garrett@pinterest.com" } - s.source = { :git => "https://github.com/pinterest/PINRemoteImage.git", :tag => "1.1.2" } + s.source = { :git => "https://github.com/pinterest/PINRemoteImage.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/garrettmoon' s.platform = :ios, '6.0'
Make source tag be the same as the podspec version
diff --git a/spec/features/admin/unit_price_spec.rb b/spec/features/admin/unit_price_spec.rb index abc1234..def5678 100644 --- a/spec/features/admin/unit_price_spec.rb +++ b/spec/features/admin/unit_price_spec.rb @@ -0,0 +1,50 @@+# frozen_string_literal: true + +require 'spec_helper' + +feature ' + As an admin + I want to check the unit price of my products/variants +' do + include AuthenticationHelper + include WebHelper + + let!(:stock_location) { create(:stock_location, backorderable_default: false) } + + before do + allow(OpenFoodNetwork::FeatureToggle).to receive(:enabled?).with(:unit_price, anything) { true } + end + + describe "product", js: true do + scenario "creating a new product" do + login_as_admin_and_visit spree.admin_products_path + click_link 'New Product' + select "Weight (kg)", from: 'product_variant_unit_with_scale' + fill_in 'Value', with: '1' + fill_in 'Price', with: '1' + + expect(find_field("Unit Price", disabled: true).value).to eq "$1.00 / kg" + end + end + + describe "variant", js: true do + scenario "creating a new variant" do + product = create(:simple_product, variant_unit: "weight", variant_unit_scale: "1") + login_as_admin_and_visit spree.admin_product_variants_path product + click_link 'New Variant' + fill_in 'Weight (g)', with: '1' + fill_in 'Price', with: '1' + + expect(find_field("Unit Price", disabled: true).value).to eq '$1,000.00 / kg' + end + + scenario "editing a variant" do + product = create(:simple_product, variant_unit: "weight", variant_unit_scale: "1") + variant = product.variants.first + variant.update(price: 1.0) + login_as_admin_and_visit spree.edit_admin_product_variant_path(product, variant) + + expect(find_field("Unit Price", disabled: true).value).to eq '$1,000.00 / kg' + end + end +end
Add tests around unit price in backoffice 3 cases: - creating a new product - creating a new variant - editing an existing variant
diff --git a/spec/controllers/clubs_users_controller_spec.rb b/spec/controllers/clubs_users_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/clubs_users_controller_spec.rb +++ b/spec/controllers/clubs_users_controller_spec.rb @@ -0,0 +1,67 @@+require 'spec_helper' + +describe ClubsUsersController do + let(:user) { FactoryGirl.create :user } + let(:club) { FactoryGirl.create :club } + + describe "GET 'new'" do + describe "for a non signed-in user" do + before :each do + get 'new', :id => club.id, :format => 'js' + end + + it "redirects to a new user registration path" do + response.should redirect_to(new_user_registration_path) + end + + it "returns the club" do + assigns(:club).should == club + end + + it "returns a new unsaved subscription" do + assigns(:subscription).should be_new_record + end + + it "returns a subscription that includes the club" do + assigns(:subscription).club.should == club + end + + it "assigns the subscription within the session" do + session[:subscription].should == assigns(:subscription) + end + end + + describe "for a signed-in user" do + before :each do + @request.env["devise.mapping"] = Devise.mappings[:users] + sign_in user + + get 'new', :id => club.id, :format => 'js' + end + + it "returns http success" do + response.should be_success + end + + it "returns the club" do + assigns(:club).should == club + end + + it "returns a new unsaved subscription" do + assigns(:subscription).should be_new_record + end + + it "returns a subscription that includes the club" do + assigns(:subscription).club.should == club + end + + it "returns a subscription that includes the user" do + assigns(:subscription).user.should == user + end + + it "ensures that the subscription session variable is cleared" do + session[:subscription].should be_blank + end + end + end +end
Add Spec for New Subscription Controller Add a spec for the ClubsUsers controller for a new Club Subscription.
diff --git a/puppet-lint-usascii_format-check.gemspec b/puppet-lint-usascii_format-check.gemspec index abc1234..def5678 100644 --- a/puppet-lint-usascii_format-check.gemspec +++ b/puppet-lint-usascii_format-check.gemspec @@ -17,9 +17,9 @@ A puppet-lint plugin to check that manifest files contain only US ASCII. EOF - spec.add_dependency 'puppet-lint', '~> 1.0' + spec.add_dependency 'puppet-lint', '>= 1.0', '< 3.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'rspec-its', '~> 1.0' spec.add_development_dependency 'rspec-collection_matchers', '~> 1.0' spec.add_development_dependency 'rake' -25 end+25 end
Update puppet-lint version to include 2.x
diff --git a/BHCDatabase/test/models/initiative_test.rb b/BHCDatabase/test/models/initiative_test.rb index abc1234..def5678 100644 --- a/BHCDatabase/test/models/initiative_test.rb +++ b/BHCDatabase/test/models/initiative_test.rb @@ -32,7 +32,7 @@ end test "location should not be too long" do - @initiative.location = "a" * 51 + @initiative.location = "a" * 256 assert_not @initiative.valid? end
Update test to account for longer allowed location on an intitiative.
diff --git a/spec/test_app/db/seeds.rb b/spec/test_app/db/seeds.rb index abc1234..def5678 100644 --- a/spec/test_app/db/seeds.rb +++ b/spec/test_app/db/seeds.rb @@ -1,4 +1,4 @@-admin = UserMaintenance::User.create(:email => 'admin@csi.com', +admin = UserMaintenance::User.create(:email => 'admin@sample.com', :password => 'password', :password_confirmation => 'password', :first_name => 'Admin', @@ -7,7 +7,7 @@ :enabled => true) admin.update(:password_last_updated_by => admin) -user = UserMaintenance::User.create(:email => 'user@csi.com', +user = UserMaintenance::User.create(:email => 'user@sample.com', :password => 'password', :password_confirmation => 'password', :first_name => 'User',
Update user names in seed file Use a generic email domain instead. Signed-off-by: Joan Tiffany Siy <e0397393f2258e8c6ee68e35ceb46d86a4ac5382@teamcodeflux.com>
diff --git a/app/controllers/asset_manager_redirect_controller.rb b/app/controllers/asset_manager_redirect_controller.rb index abc1234..def5678 100644 --- a/app/controllers/asset_manager_redirect_controller.rb +++ b/app/controllers/asset_manager_redirect_controller.rb @@ -5,6 +5,6 @@ asset_url = Plek.new.external_url_for('draft-assets') end - redirect_to host: URI.parse(asset_url).host + redirect_to host: URI.parse(asset_url).host, status: 301 end end
Use 301s rather than 302s for attachments All the Whitehall attachments have been migrated to Asset Manager, permanently. We're not going to switch back, so we should reflect this in the status code.
diff --git a/app/controllers/spree/admin/superadmin_controller.rb b/app/controllers/spree/admin/superadmin_controller.rb index abc1234..def5678 100644 --- a/app/controllers/spree/admin/superadmin_controller.rb +++ b/app/controllers/spree/admin/superadmin_controller.rb @@ -4,8 +4,10 @@ def complete_payment if params[:transaction_id].present? - @order.payment.response_code = params[:transaction_id] - @order.payment.complete! + # update the last one b/c that's what the order checks to see if + # the payment has been completed (wtf?) + @order.payments.last.response_code = params[:transaction_id] + @order.payments.last.complete! flash[:notice] = 'Order completed!' else flash[:error] = 'Transaction ID required!'
Fix issue with updating order in super admin
diff --git a/SwiftyVK.podspec b/SwiftyVK.podspec index abc1234..def5678 100644 --- a/SwiftyVK.podspec +++ b/SwiftyVK.podspec @@ -9,6 +9,7 @@ s.requires_arc = true s.osx.deployment_target = "10.10" s.ios.deployment_target = "8.0" + s.swift_version = "5.0" s.source = { :git => "https://github.com/SwiftyVK/SwiftyVK.git" , :tag => s.version.to_s } s.source_files = "Library/Sources/**/*.*"
Add swift_version arg into podfile
diff --git a/lib/spree_fishbowl/middleware/close_fishbowl_connection.rb b/lib/spree_fishbowl/middleware/close_fishbowl_connection.rb index abc1234..def5678 100644 --- a/lib/spree_fishbowl/middleware/close_fishbowl_connection.rb +++ b/lib/spree_fishbowl/middleware/close_fishbowl_connection.rb @@ -1,5 +1,3 @@-require 'pry' - module SpreeFishbowl module Middleware class CloseFishbowlConnection
Remove errant dangling reference to pry
diff --git a/spec/rspecify/transformers/test_class_and_methods_spec.rb b/spec/rspecify/transformers/test_class_and_methods_spec.rb index abc1234..def5678 100644 --- a/spec/rspecify/transformers/test_class_and_methods_spec.rb +++ b/spec/rspecify/transformers/test_class_and_methods_spec.rb @@ -63,5 +63,26 @@ end }) } end + + describe "class extending ActiveSupport::TestCase with alternate method naming" do + subject { %{ + class MyClass < ActiveSupport::TestCase + test "should be valid" do + something + 1 + end + end + } } + + it { pending "not yet implemented" + should transform_to("describe block", %{ + describe MyClass do + it "should be valid" do + something + 1 + end + end + }) } + end end
Test for alternate method naming
diff --git a/lib/cryptosphere/identity.rb b/lib/cryptosphere/identity.rb index abc1234..def5678 100644 --- a/lib/cryptosphere/identity.rb +++ b/lib/cryptosphere/identity.rb @@ -5,8 +5,8 @@ end def initialize(privkey) - @privkey = Cryptosphere.pubkey_cipher.new privkey - @id = Cryptosphere.hash_function.digest(@privkey.public_key.to_der) + @privkey = Cryptosphere.pubkey_cipher.new(privkey) + @id = Cryptosphere.kdf(@privkey.public_key.to_der) end def id
Use HKDF to compute node IDs
diff --git a/oneskyapp_upload.rb b/oneskyapp_upload.rb index abc1234..def5678 100644 --- a/oneskyapp_upload.rb +++ b/oneskyapp_upload.rb @@ -10,5 +10,5 @@ p resp['data'] # upload file -resp = project.upload_file(file: 'strings.xml', file_format: 'ANDROID_XML', is_keeping_all_strings: 'false') +resp = project.upload_file(file: 'app/src/main/res/values/strings.xml', file_format: 'ANDROID_XML', is_keeping_all_strings: 'false') p resp.code # => 202
Fix upload path of original strings.xml file
diff --git a/hashy_db.gemspec b/hashy_db.gemspec index abc1234..def5678 100644 --- a/hashy_db.gemspec +++ b/hashy_db.gemspec @@ -7,7 +7,7 @@ s.version = HashyDb::VERSION s.authors = ["Matt Simpson", "Jason Mayer", "Asynchrony Solutions"] s.email = ["matt@railsgrammer.com", "jason.mayer@gmail.com"] - s.homepage = "https://github.com/asynchrony/HashyDb" + s.homepage = "https://github.com/asynchrony/hashy_db" s.summary = %q{Provides an interface to store and retrieve data in a Hash.} s.description = %q{Provides an interface to store and retrieve data in a Hash.}
Update the homepage to the new github url
diff --git a/lib/json_structure/object.rb b/lib/json_structure/object.rb index abc1234..def5678 100644 --- a/lib/json_structure/object.rb +++ b/lib/json_structure/object.rb @@ -1,7 +1,7 @@ module JsonStructure class Object_ < Type def initialize(hash = nil) - @hash = hash.each_with_object({}) do |(key, value), new_hash| + @hash = hash && hash.each_with_object({}) do |(key, value), new_hash| new_hash[key.to_s] = value end end
Modify Object type to consider when argument is not given
diff --git a/lib/redd/models/wiki_page.rb b/lib/redd/models/wiki_page.rb index abc1234..def5678 100644 --- a/lib/redd/models/wiki_page.rb +++ b/lib/redd/models/wiki_page.rb @@ -6,16 +6,30 @@ module Models # A reddit user. class WikiPage < LazyModel + # Edit the wiki page. + # @param content [String] the new wiki page contents + # @param reason [String, nil] an optional reason for editing the page + def edit(content, reason: nil) + params = { page: @attributes.fetch(:title), content: content } + params[:reason] = reason if reason + @client.post("/r/#{@attributes.fetch(:subreddit).display_name}/api/wiki/edit", params) + end + private def default_loader title = @attributes.fetch(:title) if @attributes.key?(:subreddit) - sr_name = attributes[:subreddit].display_name + sr_name = @attributes[:subreddit].display_name return @client.get("/r/#{sr_name}/wiki/#{title}").body[:data] end @client.get("/wiki/#{title}").body[:data] end + + def after_initialize + return unless @attributes[:revision_by] + @attributes[:revision_by] = @client.unmarshal(@attributes[:revision_by]) + end end end end
Allow editing of wiki pages.
diff --git a/lib/toy_robot/model/robot.rb b/lib/toy_robot/model/robot.rb index abc1234..def5678 100644 --- a/lib/toy_robot/model/robot.rb +++ b/lib/toy_robot/model/robot.rb @@ -9,8 +9,14 @@ # The direction the robot is facing attr_accessor:face - # Initialize the robot with x and y position and direction facing. + # Initialize the robot with x and y position and direction the robos is facing. + # = Parameters + # - +x+:: the x position on the table + # - +y+:: the y position on the table + # - +face+:: the direction the robot is facing def initialize(x, y, face) + raise ArgumentError, 'Robot x position is invalid.' unless x.is_a?(Numeric) + raise ArgumentError, 'Robot y position is invalid.' unless y.is_a?(Numeric) @x = x @y = y @face = face
Check for invalid table x and y
diff --git a/lib/stream_reader/avro_parser.rb b/lib/stream_reader/avro_parser.rb index abc1234..def5678 100644 --- a/lib/stream_reader/avro_parser.rb +++ b/lib/stream_reader/avro_parser.rb @@ -9,7 +9,7 @@ buffer = StringIO.new(@data) reader = Avro::DataFile::Reader.new(buffer, Avro::IO::DatumReader.new) reader.each do |record| - schema_name = reader.datum_reader.readers_schema.name + schema_name = reader.datum_reader.readers_schema.try(:name) || reader.datum_reader.readers_schema.schemas.last.name yield record, schema_name end end
Fix issue where there are multiple schemas
diff --git a/lib/tasks/republish_manuals.rake b/lib/tasks/republish_manuals.rake index abc1234..def5678 100644 --- a/lib/tasks/republish_manuals.rake +++ b/lib/tasks/republish_manuals.rake @@ -0,0 +1,11 @@+require "manuals_republisher" +require "logger" + +desc "Republish manuals" +task republish_manuals: [:environment] do + logger = Logger.new(STDOUT) + logger.formatter = Logger::Formatter.new + + republisher = ManualsRepublisher.new(logger) + republisher.execute +end
Convert republish manuals script to a rake task Part of #858 Converting scripts in `bin/` to rake tasks allows them to be run from Jenkins. We also need to run this particular script as part of the fix for bad data caused by #970 so it seems like a good time to convert it.
diff --git a/lib/worth_saving/form_builder.rb b/lib/worth_saving/form_builder.rb index abc1234..def5678 100644 --- a/lib/worth_saving/form_builder.rb +++ b/lib/worth_saving/form_builder.rb @@ -1,9 +1,5 @@ module WorthSaving class FormBuilder < ActionView::Base.default_form_builder - def self.default_interval - 3 - end - def text_field(method, options = {}) process_options! method, options super
Clean up cruft from FormBuilder
diff --git a/lib/rbplusplus/builders/allocation_strategy.rb b/lib/rbplusplus/builders/allocation_strategy.rb index abc1234..def5678 100644 --- a/lib/rbplusplus/builders/allocation_strategy.rb +++ b/lib/rbplusplus/builders/allocation_strategy.rb @@ -27,7 +27,6 @@ namespace Rice { template<> struct Default_Allocation_Strategy< #{node_name} > { - static #{node_name} * allocate(); static void free(#{node_name} * obj); }; } @@ -36,12 +35,6 @@ declarations << code pre = "Rice::Default_Allocation_Strategy< #{node_name} >::" - - tmp = "#{node_name} * #{pre}allocate() { return " - tmp += @public_constructor ? "new #{node_name};" : "NULL;" - tmp += " }" - - registrations << tmp tmp = "void #{pre}free(#{node_name} * obj) { " tmp += @public_destructor ? "delete obj;" : ""
Stop generating Allocation_Strategy::alloc, it's not used
diff --git a/lib/capistrano-paratrooper-chef/omnibus_install.rb b/lib/capistrano-paratrooper-chef/omnibus_install.rb index abc1234..def5678 100644 --- a/lib/capistrano-paratrooper-chef/omnibus_install.rb +++ b/lib/capistrano-paratrooper-chef/omnibus_install.rb @@ -22,7 +22,11 @@ desc "Installs chef (by omnibus installer)" task :install_omnibus_chef do - run "curl -L http://www.opscode.com/chef/install.sh | #{top.sudo} bash" + if capture("command -v curl || true").strip.empty? + run "wget -O - http://www.opscode.com/chef/install.sh | #{top.sudo} bash" + else + run "curl -L http://www.opscode.com/chef/install.sh | #{top.sudo} bash" + end end after "deploy:setup", "paratrooper:chef:install_omnibus_chef" end
Add Ubuntu support on ombnibus_install task
diff --git a/savant.gemspec b/savant.gemspec index abc1234..def5678 100644 --- a/savant.gemspec +++ b/savant.gemspec @@ -16,7 +16,7 @@ gem.version = Savant::VERSION gem.add_dependency 'rails' - gem.add_dependency 'activerecord-tableless' + gem.add_dependency 'activerecord-tableless', '>= 1.1.3' gem.add_dependency 'squeel' gem.add_development_dependency 'rspec' gem.add_development_dependency 'sqlite3'
Add dependency on activerecord-tableless 1.1.3, fixes issues with testing outside Rails.
diff --git a/Casks/tower-beta.rb b/Casks/tower-beta.rb index abc1234..def5678 100644 --- a/Casks/tower-beta.rb +++ b/Casks/tower-beta.rb @@ -1,9 +1,9 @@ cask :v1 => 'tower-beta' do - version '2.2.2-281' - sha256 '83fdbb887c394ed0f76bf91c66972d28bc6d36f144c21dfd582ccb09d5e19864' + version '2.2.3-285' + sha256 'c9d79a6a8bfc298f38a2d7dbe724d71468f86c1de09fabd1d9da754fd8a40f74' # amazonaws.com is the official download host per the vendor homepage - url "https://fournova-app-updates.s3.amazonaws.com/apps/tower2-mac/281-3f2b7672/Tower-2-#{version}.zip" + url "https://fournova-app-updates.s3.amazonaws.com/apps/tower2-mac/285-e057eb4f/Tower-2-#{version}.zip" appcast 'https://updates.fournova.com/updates/tower2-mac/beta' name 'Tower' homepage 'http://www.git-tower.com/'
Update Tower beta to version 2.2.3 This commit updates the version, sha256 and url stanzas.
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -9,7 +9,7 @@ concern :site do resources :posts, only: %i(show), param: :original_id, constraints: {original_id: /\d+/}, path: '/' - get '/:original_id/:page' => redirect('/%{original_id}?page=%{page}') # To compatible with old URL + get '/:original_id/:page' => redirect('/%{original_id}?page=%{page}'), constraints: {original_id: /\d+/, page: /\d+/} # To compatible with old URL resources :categories, only: %i(show), path: 'category' resource :feed, only: %i(show), path: 'feed', controller: 'feed'
Add constraints for old post params
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,7 +6,7 @@ get '/logout', to: 'sessions#destroy', as: :logout post '/shares/search', as: :search - resources :timeslots, only: [:update, :show] + resources :timeslots, only: [:show] resources :users, only: [:edit] resources :shares, only: [:index, :create, :new]
Remove extra update route in timeslot controller