diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/gems/pending/VMwareWebService/MiqPbmInventory.rb b/lib/gems/pending/VMwareWebService/MiqPbmInventory.rb index abc1234..def5678 100644 --- a/lib/gems/pending/VMwareWebService/MiqPbmInventory.rb +++ b/lib/gems/pending/VMwareWebService/MiqPbmInventory.rb @@ -19,4 +19,14 @@ profiles end + + def pbmQueryMatchingHub(profile_id) + hubs = [] + + if @pbm_svc + hubs = @pbm_svc.queryMatchingHub(profile_id) + end + + hubs + end end
Add a method to get matching datastores
diff --git a/lib/rademade_admin/model/adapter/query/postgresql.rb b/lib/rademade_admin/model/adapter/query/postgresql.rb index abc1234..def5678 100644 --- a/lib/rademade_admin/model/adapter/query/postgresql.rb +++ b/lib/rademade_admin/model/adapter/query/postgresql.rb @@ -11,7 +11,7 @@ def build_where_condition(field: nil, value: nil) if value.is_a? Regexp - ["LOWER(#{field}) ~ ?", [value.source]] + ["LOWER(#{field}) ~* ?", [value.source]] elsif value.is_a? Array ["#{field} IN (?)", [value]] else
Fix postgres regexp search to case insensetive
diff --git a/lib/buildr_plus/patches/project_patch.rb b/lib/buildr_plus/patches/project_patch.rb index abc1234..def5678 100644 --- a/lib/buildr_plus/patches/project_patch.rb +++ b/lib/buildr_plus/patches/project_patch.rb @@ -12,6 +12,8 @@ # limitations under the License. # +raise 'Patch applied in latest release of buildr' if Buildr::VERSION > '1.4.24' + class Buildr::Project def root_project p = project
Patch is applied to buildr proper
diff --git a/test/basic_test.rb b/test/basic_test.rb index abc1234..def5678 100644 --- a/test/basic_test.rb +++ b/test/basic_test.rb @@ -1,13 +1,17 @@ #!/usr/bin/env ruby +require "rubygems" require "test/unit" require "net/http" require "uri" require "logger" +require "fakeweb" require "net-observer/net_logger" + class BasicTest < Test::Unit::TestCase def setup + FakeWeb.register_uri(:get, %r|http://google\.com/|, :body => "Hello World!") end def test_it_by_watching @@ -15,9 +19,9 @@ net_logger = NetObserver::NetLogger.new log # Net::Observer.log :debug - Net::HTTP.get URI.parse("http://www.google.com/search?q=wikileaks") + Net::HTTP.get URI.parse("http://google.com/search?q=wikileaks") # Net::Observer.log :disable - Net::HTTP.get URI.parse("http://www.google.com/search?q=wikipedia") + Net::HTTP.get URI.parse("http://google.com/search?q=wikipedia") end end
Use fakeweb not to contact the real net and see too much.
diff --git a/app/controllers/sha_controller.rb b/app/controllers/sha_controller.rb index abc1234..def5678 100644 --- a/app/controllers/sha_controller.rb +++ b/app/controllers/sha_controller.rb @@ -3,12 +3,12 @@ def index @services = { + 'custom-start-points' => info('custom-start-points', custom_start_points.sha), + 'exercises-start-points' => info('exercises-start-points', exercises_start_points.sha), + 'languages-start-points' => info('languages-start-points', languages_start_points.sha), 'avatars' => info('avatars', avatars.sha), - 'custom' => info('custom', custom.sha), 'differ' => info('differ', differ.sha), - 'exercises' => info('exercises', exercises.sha), - 'languages' => info('languages', languages.sha), - 'nginx' => info('nginx', nginx_sha), + 'nginx' => info('nginx', nginx_sha), 'ragger' => info('ragger', ragger.sha), 'runner' => info('runner', runner.sha), 'saver' => info('saver', saver.sha),
Fix start-point service names in /sha/index page
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,7 +1,7 @@ require 'redcarpet' module ApplicationHelper - def page_title(text) + def page_title(text, tag_type = :h1, tag_attributes = {}) # sets :title content_for in <head>, and outputs an h1 with the title if current_tenant content_for :title, "#{current_tenant.full_name} - #{text}" @@ -9,7 +9,7 @@ content_for :title, text end - return content_tag :h1, text + return content_tag tag_type, text, tag_attributes end def markdown(content)
Allow specifing of tag type and attributes through page_title helper Signed-off-by: Max Fierke <[email protected]>
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 @@ -5,4 +5,16 @@ def datetime_ago date content_tag :date, nil, title: date.to_s(:long), "data-source": date.to_s(:rfc822) end + + def resource_name + :user + end + + def resource + @resource ||= User.new + end + + def devise_mapping + @devise_mapping ||= Devise.mappings[:user] + end end
[Core] Implement global variables on application helper
diff --git a/app/helpers/tab_link_to_helper.rb b/app/helpers/tab_link_to_helper.rb index abc1234..def5678 100644 --- a/app/helpers/tab_link_to_helper.rb +++ b/app/helpers/tab_link_to_helper.rb @@ -1,5 +1,7 @@ module TabLinkToHelper def tab_link_to(name = nil, url = nil, attrs = nil, &block) + url = name if block_given? + html_options = if current_page?(url) attrs.to_h.merge(class: 'selected') else
Fix tab_link_to helper when using blocks
diff --git a/Alamofire.podspec b/Alamofire.podspec index abc1234..def5678 100644 --- a/Alamofire.podspec +++ b/Alamofire.podspec @@ -8,7 +8,7 @@ s.authors = { 'Alamofire Software Foundation' => '[email protected]' } s.source = { :git => 'https://github.com/Alamofire/Alamofire.git', :tag => s.version } - s.dependency 'Result', '~> 0.6' + s.dependency 'Result', '0.6-beta.1' s.ios.deployment_target = '9.0' s.osx.deployment_target = '10.9'
Use correct version for Result dependency
diff --git a/lib/active_record_host_pool/connection_proxy.rb b/lib/active_record_host_pool/connection_proxy.rb index abc1234..def5678 100644 --- a/lib/active_record_host_pool/connection_proxy.rb +++ b/lib/active_record_host_pool/connection_proxy.rb @@ -18,8 +18,9 @@ @cx end - def self.class_eval(*args, &block) - @cx.class.class_eval(*args, &block) + # this helps along folks who want to muck around with our delegatee's methods + def class + @cx.class end end end
Revert "testing a different way of allowing more monkey patches" This reverts commit 3143ef62f79848ec05db98b705f4edef8a146a4a.
diff --git a/lib/alchemy/upgrader/tasks/add_page_versions.rb b/lib/alchemy/upgrader/tasks/add_page_versions.rb index abc1234..def5678 100644 --- a/lib/alchemy/upgrader/tasks/add_page_versions.rb +++ b/lib/alchemy/upgrader/tasks/add_page_versions.rb @@ -8,22 +8,24 @@ no_tasks do def create_public_page_versions - Alchemy::Page.where.not(public_on: nil).find_each do |page| - next if page.versions.published.any? + Alchemy::Deprecation.silence do + Alchemy::Page.where.not(legacy_public_on: nil).find_each do |page| + next if page.versions.published.any? - Alchemy::Page.transaction do - page.versions.create!( - public_on: page.public_on, - public_until: page.public_until - ).tap do |version| - # We must not use .find_each here to not mess up the order of elements - page.draft_version.elements.not_nested.available.each do |element| - Alchemy::Element.copy(element, page_version_id: version.id) + Alchemy::Page.transaction do + page.versions.create!( + public_on: page.legacy_public_on, + public_until: page.legacy_public_until + ).tap do |version| + # We must not use .find_each here to not mess up the order of elements + page.draft_version.elements.not_nested.available.each do |element| + Alchemy::Element.copy(element, page_version_id: version.id) + end end end + + print "." end - - print "." end end end
Adjust upgrader to page legacy timestamps
diff --git a/randexp.gemspec b/randexp.gemspec index abc1234..def5678 100644 --- a/randexp.gemspec +++ b/randexp.gemspec @@ -0,0 +1,29 @@+# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = %q{randexp} + s.version = "0.1.5" + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.authors = ["Ben Burkert"] + s.autorequire = %q{randexp} + s.date = %q{2011-02-10} + s.description = %q{Library for generating random strings.} + s.email = %q{[email protected]} + s.extra_rdoc_files = ["README", "LICENSE", "TODO"] + s.files = ["LICENSE", "README", "Rakefile", "TODO", "CHANGELOG", "lib/randexp", "lib/randexp/core_ext", "lib/randexp/core_ext/array.rb", "lib/randexp/core_ext/integer.rb", "lib/randexp/core_ext/range.rb", "lib/randexp/core_ext/regexp.rb", "lib/randexp/core_ext.rb", "lib/randexp/dictionary.rb", "lib/randexp/parser.rb", "lib/randexp/randgen.rb", "lib/randexp/reducer.rb", "lib/randexp/wordlists", "lib/randexp/wordlists/female_names.rb", "lib/randexp/wordlists/male_names.rb", "lib/randexp/wordlists/real_name.rb", "lib/randexp.rb", "spec/regression", "spec/regression/regexp_spec.rb", "spec/spec_helper.rb", "spec/unit", "spec/unit/core_ext", "spec/unit/core_ext/regexp_spec.rb", "spec/unit/randexp", "spec/unit/randexp/parser_spec.rb", "spec/unit/randexp/reducer_spec.rb", "spec/unit/randexp_spec.rb", "spec/unit/randgen_spec.rb", "wordlists/female_names", "wordlists/male_names", "wordlists/surnames"] + s.homepage = %q{http://github.com/benburkert/randexp} + s.require_paths = ["lib"] + s.rubygems_version = %q{1.3.7} + s.summary = %q{Library for generating random strings.} + + if s.respond_to? :specification_version then + current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION + s.specification_version = 3 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + else + end + else + end +end
Add a gemspec file to ease bundling from git
diff --git a/Casks/font-source-code-pro.rb b/Casks/font-source-code-pro.rb index abc1234..def5678 100644 --- a/Casks/font-source-code-pro.rb +++ b/Casks/font-source-code-pro.rb @@ -2,7 +2,7 @@ url 'http://downloads.sourceforge.net/sourceforge/sourcecodepro.adobe/SourceCodePro_FontsOnly-1.017.zip' homepage 'http://store1.adobe.com/cfusion/store/html/index.cfm?store=OLS-US&event=displayFontPackage&code=1960' version '1.017' - sha1 'c0e3f6f8e25b434c0e28a817539632f8a5ecb9e5' + sha256 '8136b4686309c428ef073356ab178c2f7e8f7b6fadd5a6c61b6a20646377b21f' font 'SourceCodePro_FontsOnly-1.017/OTF/SourceCodePro-Black.otf' font 'SourceCodePro_FontsOnly-1.017/OTF/SourceCodePro-Bold.otf' font 'SourceCodePro_FontsOnly-1.017/OTF/SourceCodePro-ExtraLight.otf'
Update Source Code Pro to sha256 checksums
diff --git a/judoscale-rails/test/app_test.rb b/judoscale-rails/test/app_test.rb index abc1234..def5678 100644 --- a/judoscale-rails/test/app_test.rb +++ b/judoscale-rails/test/app_test.rb @@ -6,6 +6,7 @@ include Rack::Test::Methods def app + # This refers to TestRailsApp created in test_helper.rb ::Rails.application end
Add a note about where the ::Rails.application is defined Co-authored-by: Adam McCrea <[email protected]>
diff --git a/KMSWebRTC.podspec b/KMSWebRTC.podspec index abc1234..def5678 100644 --- a/KMSWebRTC.podspec +++ b/KMSWebRTC.podspec @@ -9,6 +9,7 @@ s.platform = :ios, '7.0' s.requires_arc = true + s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO' } s.module_name = 'KMSWebRTC' s.source_files = 'KMSWebRTC/KMSWebRTC/*.{h,m}' s.dependency 'KMSClient', '1.1.0'
Disable bitcode for pod spec target.
diff --git a/app/serializers/lab_serializer.rb b/app/serializers/lab_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/lab_serializer.rb +++ b/app/serializers/lab_serializer.rb @@ -4,7 +4,7 @@ attributes :id, :name, - :kind_name, + #:kind_name, :parent_id, :blurb, :description, @@ -22,8 +22,8 @@ :address_notes, :phone, :email, - :capabilities, - :url + :capabilities + #:url # :links, # :employees # links_attributes: [ :id, :link_id, :url, '_destroy' ], @@ -31,6 +31,7 @@ has_many :links + # TODO: kind_name is breaking labs.json endpoint. Temporary comment out def kind_name kind end
Revert "Revert "labs.json errors when calling kind_name and url"" This reverts commit ef413e8c4c295fa1b62db1f7a8dc922a94e882c8.
diff --git a/cookiejar.gemspec b/cookiejar.gemspec index abc1234..def5678 100644 --- a/cookiejar.gemspec +++ b/cookiejar.gemspec @@ -19,9 +19,9 @@ s.rdoc_options = ['--title', 'CookieJar -- Client-side HTTP Cookies'] s.require_paths = ['lib'] - s.add_development_dependency 'rake', '~> 10.0' + s.add_development_dependency 'rake', '>= 10.0', '< 13' s.add_development_dependency 'rspec-collection_matchers', '~> 1.0' s.add_development_dependency 'rspec', '~> 3.0' - s.add_development_dependency 'yard', '~> 0.8', '>= 0.8.7' + s.add_development_dependency 'yard', '~> 0.9.20' s.add_development_dependency 'bundler', '>= 0.9.3' end
Update yard to 0.9.20 [GHSA-xfhh-rx56-rxcr] Update rake spec to allow for 11.x and 12.x series
diff --git a/db/migrations/011_add_settings.rb b/db/migrations/011_add_settings.rb index abc1234..def5678 100644 --- a/db/migrations/011_add_settings.rb +++ b/db/migrations/011_add_settings.rb @@ -16,6 +16,13 @@ add_column :saturdays_per_year, Integer, default: 55 add_column :sundays_per_year, Integer, default: 55 end + + run <<-SQL + UPDATE lines + SET layover = maps.layover, hourly_cost = maps.hourly_cost + FROM maps + WHERE lines.map_id = maps.id; + SQL end down do
Copy layover and hourly_cost from maps to associated lines
diff --git a/app/models/topic.rb b/app/models/topic.rb index abc1234..def5678 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -6,18 +6,15 @@ include ResponsesHelper - # def responses_json - # self.charts.map { |c| { chart: c, responses: bucketize_responses(c.responses) } } - # end - def responses_json - keyed_json = {} + timeline_array = Array.new(30) { Hash.new } self.charts.each do |c| - sorted_responses = c.responses.order("date ASC").limit(3).sort_by { |r| r.percentage.to_f } - keyed_json[c.state] = { responses: sorted_responses, - fillKey: sorted_responses.last.answer } + response_chunks = bucketize_responses(c.responses) + response_chunks.each_with_index do |chunk, index| + timeline_array[index][c.state] = chunk + end end - return keyed_json + return timeline_array end end
Update responses_json method to return a timeline of data
diff --git a/lib/capistrano/tasks/phpfpm.rake b/lib/capistrano/tasks/phpfpm.rake index abc1234..def5678 100644 --- a/lib/capistrano/tasks/phpfpm.rake +++ b/lib/capistrano/tasks/phpfpm.rake @@ -7,7 +7,11 @@ desc "Restart php fpm" task :restart do on roles(:web) do - execute :sudo, :service, "php5-fpm restart" + unless fetch(:php_version) do + set :php_version, "5" + end + + execute :sudo, :service, "php" + fetch(:php_version) + "-fpm restart" end end end
Allow parametrable php fpm restart task
diff --git a/app/controllers/urls_controller.rb b/app/controllers/urls_controller.rb index abc1234..def5678 100644 --- a/app/controllers/urls_controller.rb +++ b/app/controllers/urls_controller.rb @@ -34,7 +34,7 @@ def destroy @url = Url.find(params[:id]) - @url.destroy + @url.destroyurls end private
Add CRUD actions for url_contents controller
diff --git a/app/models/esa/context_provider.rb b/app/models/esa/context_provider.rb index abc1234..def5678 100644 --- a/app/models/esa/context_provider.rb +++ b/app/models/esa/context_provider.rb @@ -7,6 +7,7 @@ created = contained - existing created.each do |sub| sub.save if sub.new_record? or sub.changed? + context.subcontexts << sub end removed = existing - contained
Append the created subcontext into parents' subcontexts association
diff --git a/actionpack/test/fixtures/reply.rb b/actionpack/test/fixtures/reply.rb index abc1234..def5678 100644 --- a/actionpack/test/fixtures/reply.rb +++ b/actionpack/test/fixtures/reply.rb @@ -1,5 +1,5 @@ class Reply < ActiveRecord::Base - scope :base, -> { scoped } + scope :base, -> { all } belongs_to :topic, -> { includes(:replies) } belongs_to :developer
Remove deprecation warning, since scoped waas deprecated
diff --git a/ruby/spec/bson/document_spec.rb b/ruby/spec/bson/document_spec.rb index abc1234..def5678 100644 --- a/ruby/spec/bson/document_spec.rb +++ b/ruby/spec/bson/document_spec.rb @@ -3,16 +3,4 @@ describe BSON::Document do - let(:type) { 3.chr } - let(:obj) { { :key => "value" } } - let(:bson) { - "#{20.to_bson}#{String::BSON_TYPE}key#{BSON::NULL_BYTE}" + - "#{6.to_bson}value#{BSON::NULL_BYTE}#{BSON::NULL_BYTE}" - } - - it_behaves_like "a bson element" - it_behaves_like "a serializable bson element" - pending do - it_behaves_like "a deserializable bson element" - end end
Remove the false bson document tests
diff --git a/ceifpar.gemspec b/ceifpar.gemspec index abc1234..def5678 100644 --- a/ceifpar.gemspec +++ b/ceifpar.gemspec @@ -19,7 +19,7 @@ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_development_dependency "rmagick" + spec.add_dependency "rmagick" spec.add_development_dependency "bundler", "~> 1.10" spec.add_development_dependency "rake", "~> 10.0"
Fix gem dependency on development env
diff --git a/lib/exercism/use_cases/notify.rb b/lib/exercism/use_cases/notify.rb index abc1234..def5678 100644 --- a/lib/exercism/use_cases/notify.rb +++ b/lib/exercism/use_cases/notify.rb @@ -6,7 +6,7 @@ end def self.source(submission, from, about) - new(submission, to, from, about).save + new(submission, submission.user, from, about).save end attr_reader :submission, :to, :from, :about
Fix borked notification on approval
diff --git a/lib/lita/handlers/jira_issues.rb b/lib/lita/handlers/jira_issues.rb index abc1234..def5678 100644 --- a/lib/lita/handlers/jira_issues.rb +++ b/lib/lita/handlers/jira_issues.rb @@ -16,7 +16,7 @@ 'to work' end response.matches.each do | key | - response.reply "[#{key}]" + handle_key(response, key) end end @@ -24,6 +24,10 @@ config.url && config.username && config.password end + def handle_key(response, key) + response.reply "[#{key}]" + end + end Lita.register_handler(JiraIssues)
Put handling key in separate method
diff --git a/lib/rubygems/tasks/scm/status.rb b/lib/rubygems/tasks/scm/status.rb index abc1234..def5678 100644 --- a/lib/rubygems/tasks/scm/status.rb +++ b/lib/rubygems/tasks/scm/status.rb @@ -30,8 +30,9 @@ status = self.status unless status.strip.empty? + error "Project has uncommitted changes!" puts status - fail "Project has uncommitted changes!" + abort end end end
Use error() to print the message, and call abort to exit.
diff --git a/lib/thincloud/postmark/engine.rb b/lib/thincloud/postmark/engine.rb index abc1234..def5678 100644 --- a/lib/thincloud/postmark/engine.rb +++ b/lib/thincloud/postmark/engine.rb @@ -2,7 +2,11 @@ module Postmark # Public: Thincloud Postmark Engine class Engine < ::Rails::Engine - attr_accessor :options + + # convenience method for engine options / configuration + def configuration + Thincloud::Postmark.configuration + end # initialize the configuration so it is available during rails init ActiveSupport.on_load :before_configuration do @@ -22,10 +26,10 @@ # Apply the postmark settings just before ActionMailer applies them initializer "thincloud.postmark.action_mailer", before: "action_mailer.set_configs" do - if api_key = Thincloud::Postmark.configuration.try(:api_key) + if configuration.api_key ::Postmark.secure = true Rails.application.config.action_mailer.delivery_method = :postmark - Rails.application.config.action_mailer.postmark_settings = { api_key: api_key } + Rails.application.config.action_mailer.postmark_settings = { api_key: configuration.api_key } end end
Use configuration in Engine init
diff --git a/lib/yarrow/tools/front_matter.rb b/lib/yarrow/tools/front_matter.rb index abc1234..def5678 100644 --- a/lib/yarrow/tools/front_matter.rb +++ b/lib/yarrow/tools/front_matter.rb @@ -3,7 +3,7 @@ module FrontMatter def read_split_content(path) - extract_split_content(File.read(path)) + extract_split_content(File.read(path, :encoding => 'utf-8')) end def extract_split_content(text)
Add 'utf-8' encoding to front matter reader
diff --git a/SwiftFlow.podspec b/SwiftFlow.podspec index abc1234..def5678 100644 --- a/SwiftFlow.podspec +++ b/SwiftFlow.podspec @@ -10,7 +10,7 @@ s.license = { :type => "MIT", :file => "LICENSE.md" } s.author = { "Benjamin Encz" => "[email protected]" } s.social_media_url = "http://twitter.com/benjaminencz" - s.source = { :git => "https://github.com/Swift-Flow/Swift-Flow.git", :tag => s.version.to_s } + s.source = { :git => "https://github.com/Swift-Flow/Swift-Flow.git", :tag => "v#{s.version.to_s}" } s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0'
[CocoaPods] Fix Version Number in Podspec
diff --git a/translator.gemspec b/translator.gemspec index abc1234..def5678 100644 --- a/translator.gemspec +++ b/translator.gemspec @@ -13,12 +13,12 @@ s.summary = "Summary of Translator." s.description = "Description of Translator." s.license = "MIT" - - s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"] + s.files = `git ls-files -z`.split("\x0") s.test_files = Dir["test/**/*"] s.require_paths = ["lib"] s.add_dependency "rails", "~> 4.2.4" + s.add_dependency "rails-html-sanitizer" s.add_development_dependency "sqlite3" end
Add vendor files to gemspec
diff --git a/spec/integration/deploy_job_with_addons_spec.rb b/spec/integration/deploy_job_with_addons_spec.rb index abc1234..def5678 100644 --- a/spec/integration/deploy_job_with_addons_spec.rb +++ b/spec/integration/deploy_job_with_addons_spec.rb @@ -21,10 +21,12 @@ upload_cloud_config(manifest_hash: manifest_hash) deploy_simple_manifest(manifest_hash: manifest_hash) - agent_id = director.vm('foobar', '0').agent_id - expect(`ls #{current_sandbox.agent_tmp_path}/agent-base-dir-#{agent_id}/data/jobs`.strip).to eq("dummy_with_properties\nfoobar") + foobar_vm = director.vm('foobar', '0') - echo_statement = `find #{current_sandbox.agent_tmp_path}/agent-base-dir-#{agent_id} -name "dummy_with_properties_ctl" | xargs cat | grep "prop_value"` - expect(echo_statement.strip).to eq("echo 'prop_value'") + expect(File.exist?(foobar_vm.job_path('dummy_with_properties'))).to eq(true) + expect(File.exist?(foobar_vm.job_path('foobar'))).to eq(true) + + template = foobar_vm.read_job_template('dummy_with_properties', 'bin/dummy_with_properties_ctl') + expect(template).to include("echo 'prop_value'") end end
Use Bosh::Spec::Vm support methods to improve readability of integration test Signed-off-by: Tom McNeely <[email protected]>
diff --git a/lib/action_view/bruce/bruce.rb b/lib/action_view/bruce/bruce.rb index abc1234..def5678 100644 --- a/lib/action_view/bruce/bruce.rb +++ b/lib/action_view/bruce/bruce.rb @@ -11,7 +11,7 @@ # Render the bar graph with the percentage of Australian Gems in your project # Use the style width to show a percentage - body += "[+++--]" + body += "<div class='bar'>testing</div>".html_safe # Wrap everything in a div content_tag(:div, body)
Add a bar under the Kanga
diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index abc1234..def5678 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -20,7 +20,7 @@ # If it does exist, retrieve the extra information if topic - authorize! :read, @post # Check it's been published + authorize! :read, topic # Check it's been published if !topic.description.blank? @description = topic.description end
Fix typo in variable name
diff --git a/app/mailers/admin_notifier_mailer.rb b/app/mailers/admin_notifier_mailer.rb index abc1234..def5678 100644 --- a/app/mailers/admin_notifier_mailer.rb +++ b/app/mailers/admin_notifier_mailer.rb @@ -1,11 +1,12 @@ class AdminNotifierMailer < ApplicationMailer - default :from => ENV['EMAIL_ADDRESS'] add_template_helper(EmailHelpers) # Send a notification email with the new matrix information def send_matrix_submitted_email(new_matrix) @new_matrix = new_matrix mail( to: ENV['DESTINATION_EMAIL'], + from: ENV['EMAIL_ADDRESS'], + reply_to: new_matrix.submitter_email, subject: '[SuiteSparse Matrix Collection] New Matrix Submitted!', template_path: 'admin_notifier', template_name: 'new_matrix_email'
Add reply-to to notification email
diff --git a/spec/lib/assets/asset_encoding_spec.rb b/spec/lib/assets/asset_encoding_spec.rb index abc1234..def5678 100644 --- a/spec/lib/assets/asset_encoding_spec.rb +++ b/spec/lib/assets/asset_encoding_spec.rb @@ -0,0 +1,19 @@+asset_directory = File.expand_path('../../../../assets', __FILE__) +asset_file_paths = Dir.glob(File.join(asset_directory, '*.*')) +asset_file_names = asset_file_paths.map{|e| File.basename(e) } + +describe asset_file_names do + it 'should contain .js files' do + expect(asset_file_names).to include('message-bus.js') + end +end + +asset_file_paths.each do | path | + describe "Asset file #{File.basename(path).inspect}" do + it 'should be encodable as UTF8' do + binary_data = File.open(path, 'rb'){|f| f.read } + encode_block = -> { binary_data.encode(Encoding::UTF_8) } + expect(encode_block).not_to raise_error + end + end +end
Add the asset encoding spec that demonstrates the issue
diff --git a/spec/requests/feeds_controller_spec.rb b/spec/requests/feeds_controller_spec.rb index abc1234..def5678 100644 --- a/spec/requests/feeds_controller_spec.rb +++ b/spec/requests/feeds_controller_spec.rb @@ -11,6 +11,9 @@ describe '#mpdream-info' do it { compare_static '/feeds/mpdream-info.xml?id=1' } - it { compare_static '/feeds/mpdream-info.xml?id=2' } + # This test is commented out because it occasionally fails on travis for unknown reasons + # It doesn't fail when run locally + # TODO Reinstate this test + #it { compare_static '/feeds/mpdream-info.xml?id=2' } end end
Comment out test that occasionally fails on travis
diff --git a/app/filters/ensure_active_user.rb b/app/filters/ensure_active_user.rb index abc1234..def5678 100644 --- a/app/filters/ensure_active_user.rb +++ b/app/filters/ensure_active_user.rb @@ -5,7 +5,7 @@ def before(c) # c = controller return unless c.current_user if (c.current_user.pending? && c.current_user.has_circles? && !on_pending_member_page?(c)) - c.redirect_to pending_member_page_path(c.current_user.primary_circle) + c.redirect_to pending_member_page_path(c) end end
Revert "fix parameter to redirect route on pending user" This reverts commit ed27e23d08a1cac6e11b99eaa36e60b45808f2f3.
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 @@ -12,12 +12,12 @@ end # Generate link to user or group profiles - def link_to_profile(item) + def link_to_profile(item, options = {}) case item when User - link_to item.name, user_profile_path(item) + link_to item.name, user_profile_path(item), options when Group - link_to item.name, group_profile_path(item) + link_to item.name, group_profile_path(item), options end end
Add options support to link_to_profile helper.
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb index abc1234..def5678 100644 --- a/lib/gitlab/current_settings.rb +++ b/lib/gitlab/current_settings.rb @@ -38,7 +38,9 @@ true end - use_db && ActiveRecord::Base.connection.active? && ActiveRecord::Base.connection.table_exists?('application_settings') + use_db && ActiveRecord::Base.connection.active? && + !ActiveRecord::Migrator.needs_migration? && + ActiveRecord::Base.connection.table_exists?('application_settings') end end end
Make sure that is no pending migrations in Gitlab::CurrentSettings
diff --git a/app/models/drink.rb b/app/models/drink.rb index abc1234..def5678 100644 --- a/app/models/drink.rb +++ b/app/models/drink.rb @@ -3,7 +3,7 @@ validates_presence_of :name, :bottle_size, :price has_attached_file :logo, :styles => { :thumb => "100x100#" }, :default_style => :thumb - validates_attachment_content_type :logo, :content_type => %w(image/jpeg image/jpg image/png) + validates_attachment_content_type :logo, :content_type => %w(image/jpeg image/jpg image/png) before_post_process :normalize_filename after_initialize :set_defaults, unless: :persisted?
Replace " " with " ". Former-commit-id: 30f050c36d9525b581a9fa91f0c41d983e5ba88d
diff --git a/app/models/order.rb b/app/models/order.rb index abc1234..def5678 100644 --- a/app/models/order.rb +++ b/app/models/order.rb @@ -24,4 +24,16 @@ } names[status.to_sym] || status.capitalize end + + def subtotal + order_items.inject(0) { |sum, i| sum + i.cost } + end + + def shipping_cost + shipping_method.cost order_items + end + + def total_cost + subtotal + shipping_cost + end end
Add subtotal, shipping_cost and total_cost methods to Order model
diff --git a/app/models/quote.rb b/app/models/quote.rb index abc1234..def5678 100644 --- a/app/models/quote.rb +++ b/app/models/quote.rb @@ -1,6 +1,8 @@ class Quote < ActiveRecord::Base has_many :lines, dependent: :destroy, autosave: true has_many :people, through: :lines, uniq: true + + attr_accessible :description, :raw_quote default_scope order('created_at DESC').includes(:people).includes(:lines)
Add mass-assignment protection to Quote
diff --git a/lib/lita/handlers/keepalive.rb b/lib/lita/handlers/keepalive.rb index abc1234..def5678 100644 --- a/lib/lita/handlers/keepalive.rb +++ b/lib/lita/handlers/keepalive.rb @@ -3,15 +3,14 @@ class Keepalive < Handler config :url, required: true, type: String - http.get '/ping', :ping + http.get "/ping" do |request, response| + response.body << "pong" + end def initialize(*args) super end - def ping - response.write('pong') - end end Lita.register_handler(Keepalive)
Use proper http route block
diff --git a/lib/departure/log_sanitizers/password_sanitizer.rb b/lib/departure/log_sanitizers/password_sanitizer.rb index abc1234..def5678 100644 --- a/lib/departure/log_sanitizers/password_sanitizer.rb +++ b/lib/departure/log_sanitizers/password_sanitizer.rb @@ -15,7 +15,7 @@ private def password_argument - @config['password'] + @config.with_indifferent_access[:password] end end end
Use indifferent access in log sanitizer when indexing config.
diff --git a/lib/punchblock/command_node.rb b/lib/punchblock/command_node.rb index abc1234..def5678 100644 --- a/lib/punchblock/command_node.rb +++ b/lib/punchblock/command_node.rb @@ -4,7 +4,7 @@ module Punchblock class CommandNode < RayoNode - attribute :request_id, String, default: ->(*) { Punchblock.new_uuid } + attribute :request_id, String, default: ->(*) { Punchblock.new_request_id } def initialize(*args) super
Revert "[BUGFIX] Assume request IDs can be UUIDs" This reverts commit 72d91b2962e08d2886903964b69f2b3ed0bc70d0.
diff --git a/lib/tessa/rack_upload_proxy.rb b/lib/tessa/rack_upload_proxy.rb index abc1234..def5678 100644 --- a/lib/tessa/rack_upload_proxy.rb +++ b/lib/tessa/rack_upload_proxy.rb @@ -2,21 +2,21 @@ class RackUploadProxy def call(env) + # Call in to ActiveStorage to create a DirectUpload blob params = env['rack.request.form_hash'] - upload = Tessa::Upload.create({ - name: params["name"], - size: params["size"], - date: params["date"], - mime_type: params["mime_type"], + + blob = ActiveStorage::Blob.create_before_direct_upload!({ + filename: params["name"], + byte_size: params["size"], + content_type: params["mime_type"] + # Note: we don't yet calculate the MD5 client side so can't require it here }.reject { |k, v| v.nil? }) - env['rack.session'][:tessa_upload_asset_ids] ||= [] - env['rack.session'][:tessa_upload_asset_ids] << upload.asset_id - response = { - asset_id: upload.asset_id, - upload_url: upload.upload_url, - upload_method: upload.upload_method, + asset_id: blob.signed_id, + upload_url: blob.service_url_for_direct_upload, + upload_method: 'POST', # ActiveStorage is always POST + upload_headers: blob.service_headers_for_direct_upload } [200, {"Content-Type" => "application/json"}, [response.to_json]]
Allow Dropzone to DirectUpload via activestorage
diff --git a/config/initializers/ascii_logo.rb b/config/initializers/ascii_logo.rb index abc1234..def5678 100644 --- a/config/initializers/ascii_logo.rb +++ b/config/initializers/ascii_logo.rb @@ -0,0 +1,12 @@+# frozen_string_literal: true + +# rubocop:disable Layout/HeredocIndentation, Rails/Output +puts <<-'ASC' + ____ _ +| _ \ ___ _ __ __ _| |_ ____ _ _ __ ___ +| |_) / _ \ '_ \ / _` | \ \ /\ / / _` | '__/ _ \ +| _ < __/ | | | (_| | |\ V V / (_| | | | __/ +|_| \_\___|_| |_|\__,_|_| \_/\_/ \__,_|_| \___| + +ASC +# rubocop:enable Layout/HeredocIndentation, Rails/Output
Add ascii logo on boot from command
diff --git a/calendar.rb b/calendar.rb index abc1234..def5678 100644 --- a/calendar.rb +++ b/calendar.rb @@ -1,4 +1,5 @@ require 'prawn' +require 'date' module Mortalical module Calendar @@ -8,8 +9,30 @@ normal: "./LeagueGothic-Regular.ttf" }) pdf.font "LeagueGothic" - pdf.text "Hello World!" + pdf.text year_data(2015).inspect end + end + + private + def self.year_data(year) + months = (1..12).map do |month| + days_in_month(year, month) + end + + { + year: year, + months: months, + first_day: first_day_of_year(year) + } + end + + def self.days_in_month(year, month) + (Date.new(year, 12, 31) << (12-month)).day + end + + # 0=sunday, 1=monday...6=saturday + def self.first_day_of_year(year) + Date.new(year, 1, 1).cwday % 7 end end end
Add date and time calculating functions
diff --git a/spec/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_by_distributor_report_spec.rb b/spec/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_by_distributor_report_spec.rb index abc1234..def5678 100644 --- a/spec/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_by_distributor_report_spec.rb +++ b/spec/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_by_distributor_report_spec.rb @@ -0,0 +1,37 @@+require "spec_helper" + +RSpec.describe OpenFoodNetwork::OrdersAndFulfillmentsReport::SupplierTotalsByDistributorReport do + let!(:distributor) { create(:distributor_enterprise) } + + let!(:order) do + create(:completed_order_with_totals, line_items_count: 1, distributor: distributor) + end + + let(:current_user) { distributor.owner } + let(:permissions) { OpenFoodNetwork::Permissions.new(current_user) } + + let(:report) do + report_options = { report_type: described_class::REPORT_TYPE } + OpenFoodNetwork::OrdersAndFulfillmentsReport.new(permissions, report_options, true) + end + + let(:report_table) do + OpenFoodNetwork::OrderGrouper.new(report.rules, report.columns).table(report.table_items) + end + + it "generates the report" do + expect(report_table.length).to eq(2) + end + + it "has a variant row under the distributor" do + supplier = order.line_items.first.variant.product.supplier + supplier_name_field = report_table.first[0] + expect(supplier_name_field).to eq supplier.name + + distributor_name_field = report_table.first[3] + expect(distributor_name_field).to eq distributor.name + + total_field = report_table.last[3] + expect(total_field).to eq I18n.t("admin.reports.total") + end +end
Add smoke test for Supplier Totals by Distributor report
diff --git a/spec/praxis-blueprints/config_hash_spec.rb b/spec/praxis-blueprints/config_hash_spec.rb index abc1234..def5678 100644 --- a/spec/praxis-blueprints/config_hash_spec.rb +++ b/spec/praxis-blueprints/config_hash_spec.rb @@ -0,0 +1,64 @@+# frozen_string_literal: true +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe Praxis::ConfigHash do + subject(:instance) { Praxis::ConfigHash.new(hash, &block) } + let(:hash) { { one: ['existing'], two: 'dos' } } + let(:block) do + proc { 'abc' } + end + + context 'initialization' do + it 'saves the passed hash' do + expect(subject.hash).to be(hash) + end + end + + context '.from' do + subject(:instance) { Praxis::ConfigHash.from(hash, &block) } + it 'returns an instance' do + expect(subject).to be_kind_of(Praxis::ConfigHash) + expect(subject.hash).to be(hash) + end + end + + context '#to_hash' do + let(:block) do + proc { hash['i_was'] = 'here' } + end + it 'evaluates the block and returns the resulting hash' do + expect(subject.to_hash).to eq(subject.hash) + expect(subject.hash['i_was']).to eq('here') + end + end + + context '#method_missing' do + context 'when keys do not exist in the hash key' do + it 'sets a single value to the hash' do + subject.some_name 'someval' + expect(subject.hash[:some_name]).to eq('someval') + end + it 'sets a multiple values to the hash key' do + subject.some_name 'someval', 'other1', 'other2' + expect(subject.hash[:some_name]).to include('someval', 'other1', 'other2') + end + end + context 'when keys already exist in the hash key' do + it 'adds one value to the hash' do + subject.one'newval' + expect(subject.hash[:one]).to match_array(%w(existing newval)) + end + it 'adds multiple values to the hash key' do + subject.one 'newval', 'other1', 'other2' + expect(subject.hash[:one]).to match_array(%w(existing newval other1 other2)) + end + context 'when passing a value and a block' do + let(:my_block) { proc {} } + it 'adds the tuple to the hash key' do + subject.one 'val', &my_block + expect(subject.hash[:one]).to include(['val', my_block]) + end + end + end + end +end
Build specs for config_hash (to appease coveralls) Signed-off-by: Josep M. Blanquer <[email protected]>
diff --git a/test/rails_root/config/environment.rb b/test/rails_root/config/environment.rb index abc1234..def5678 100644 --- a/test/rails_root/config/environment.rb +++ b/test/rails_root/config/environment.rb @@ -1,6 +1,6 @@ # Specifies gem version of Rails to use when vendor/rails is not present old_verbose, $VERBOSE = $VERBOSE, nil -RAILS_GEM_VERSION = '>= 2.1.0' unless defined? RAILS_GEM_VERSION +RAILS_GEM_VERSION = '= 2.2.2' unless defined? RAILS_GEM_VERSION $VERBOSE = old_verbose require File.join(File.dirname(__FILE__), 'boot')
Set the tests to run against Rails 2.2.2, as Rails 2.3 is currently unsupported
diff --git a/test/data/pulsar-conf-dummy/recipes/example/dummy.rb b/test/data/pulsar-conf-dummy/recipes/example/dummy.rb index abc1234..def5678 100644 --- a/test/data/pulsar-conf-dummy/recipes/example/dummy.rb +++ b/test/data/pulsar-conf-dummy/recipes/example/dummy.rb @@ -13,3 +13,13 @@ end end + +namespace :deploy do + task :default do + sleep 10 + end + + task :pending do + sleep 1 + end +end
Add test pulsar recipe for `deploy` and `deploy:pending`
diff --git a/test/integration/packages-php73/inspec/php73_spec.rb b/test/integration/packages-php73/inspec/php73_spec.rb index abc1234..def5678 100644 --- a/test/integration/packages-php73/inspec/php73_spec.rb +++ b/test/integration/packages-php73/inspec/php73_spec.rb @@ -1,8 +1,6 @@-%w(mod_php73 - php73-devel - php73-fpm - php73-gd - pear1).each do |pkg| +%w( + mod_php73 php73-devel php73-fpm php73-gd pear1 +).each do |pkg| describe package(pkg) do it { should be_installed } end
Change formatting in php73 inspec test
diff --git a/lita-down-for-everyone.gemspec b/lita-down-for-everyone.gemspec index abc1234..def5678 100644 --- a/lita-down-for-everyone.gemspec +++ b/lita-down-for-everyone.gemspec @@ -3,9 +3,8 @@ spec.version = "0.0.1" spec.authors = ["Jordan Killpack"] spec.email = ["[email protected]"] - spec.description = %q{TODO: Add a description} - spec.summary = %q{TODO: Add a summary} - spec.homepage = "TODO: Add a homepage" + spec.description = %q{Lita, is github.com down?} + spec.summary = %q{Lita, is github.com down?} spec.license = "MIT" spec.files = `git ls-files`.split($/)
Update summary / description in gemspec
diff --git a/app/workers/push_update_worker.rb b/app/workers/push_update_worker.rb index abc1234..def5678 100644 --- a/app/workers/push_update_worker.rb +++ b/app/workers/push_update_worker.rb @@ -15,7 +15,7 @@ scope: InlineRablScope.new(account) ) - Redis.current.publish("timeline:#{timeline_id}", Oj.dump({ event: :update, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i })) + Redis.current.publish("timeline:#{account.id}", Oj.dump({ event: :update, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i })) rescue ActiveRecord::RecordNotFound true end
Fix wrong variable used in publish channel
diff --git a/app/models/supporter.rb b/app/models/supporter.rb index abc1234..def5678 100644 --- a/app/models/supporter.rb +++ b/app/models/supporter.rb @@ -1,2 +1,5 @@ class Supporter < ActiveRecord::Base + validates :email, uniqueness: true, presence: true + validates :first_name, :last_name, :supporter_kind, :sphere, presence: true + validates :email_confirmed, :approved, inclusion: [true, false] end
Add validations to the Supporter model
diff --git a/config/initializers/acts_as_taggable_on.rb b/config/initializers/acts_as_taggable_on.rb index abc1234..def5678 100644 --- a/config/initializers/acts_as_taggable_on.rb +++ b/config/initializers/acts_as_taggable_on.rb @@ -4,5 +4,5 @@ friendly_id :name, use: :slugged, slug_column: :slug, - reserved_words: ['create', 'destroy', 'edit', 'show', 'update'] + reserved_words: ['atom', 'create', 'destroy', 'edit', 'rss', 'show', 'update'] end
Add atom and rss to list of reserved words.
diff --git a/swarmize-dot-com/lib/swarm_results_formatter.rb b/swarmize-dot-com/lib/swarm_results_formatter.rb index abc1234..def5678 100644 --- a/swarmize-dot-com/lib/swarm_results_formatter.rb +++ b/swarmize-dot-com/lib/swarm_results_formatter.rb @@ -16,6 +16,11 @@ headers << "Timestamp" @swarm.swarm_fields.each do |f| headers << f.field_name + if f.derived_field_suffixes + f.derived_field_suffixes.each do |df| + headers << "#{f.field_name} [#{df}]" + end + end end csv << headers @@ -25,6 +30,11 @@ row << format_timestamp(r.timestamp) @swarm.swarm_fields.each do |field| row << r.send(field.field_code) + if field.derived_field_codes + field.derived_field_codes.each do |df| + row << r.send(df) + end + end end csv << row end
Add derived fields to CSV download.
diff --git a/tests/spec/features/backtrace_spec.rb b/tests/spec/features/backtrace_spec.rb index abc1234..def5678 100644 --- a/tests/spec/features/backtrace_spec.rb +++ b/tests/spec/features/backtrace_spec.rb @@ -2,6 +2,8 @@ require 'support/editor' RSpec.feature "A backtrace is shown for certain errors", type: :feature, js: true do + before { pending "Backtracing has a large performance penalty" } + before do visit '/' editor.set(code)
Disable backtrace tests for now
diff --git a/spec/deploy_and_deliver_spec.rb b/spec/deploy_and_deliver_spec.rb index abc1234..def5678 100644 --- a/spec/deploy_and_deliver_spec.rb +++ b/spec/deploy_and_deliver_spec.rb @@ -2,8 +2,8 @@ require 'vcr' Configuration = { - :pivotal_tracker_token => ENV['PIVOTAL_TRACKER_TOKEN'], - :pivotal_tracker_project_id => ENV['PIVOTAL_TRACKER_PROJECT_ID'] + :pivotal_tracker_token => ENV['PIVOTAL_TRACKER_TOKEN'] || '<TOKEN>', + :pivotal_tracker_project_id => ENV['PIVOTAL_TRACKER_PROJECT_ID'] || '477915' } VCR.configure do |c|
Test using project id and token that match VCR cassettes Without this running `rspec spec` results in Failures: 1) DeployAndDeliver::Project constructor loads a project Failure/Error: deliverer = DeployAndDeliver::Project.new(Configuration) PivotalTracker::Client::NoToken: PivotalTracker::Client::NoToken # ./lib/deploy_and_deliver.rb:10:in `initialize' # ./spec/deploy_and_deliver_spec.rb:28:in `new' # ./spec/deploy_and_deliver_spec.rb:28:in `block (3 levels) in <top (required)>' 2) DeployAndDeliver::Project deliver_and_report delivers finished stories Failure/Error: deliverer = DeployAndDeliver::Project.new(Configuration) PivotalTracker::Client::NoToken: PivotalTracker::Client::NoToken # ./lib/deploy_and_deliver.rb:10:in `initialize' # ./spec/deploy_and_deliver_spec.rb:35:in `new' # ./spec/deploy_and_deliver_spec.rb:35:in `block (3 levels) in <top (required)>'
diff --git a/spec/integration/people_spec.rb b/spec/integration/people_spec.rb index abc1234..def5678 100644 --- a/spec/integration/people_spec.rb +++ b/spec/integration/people_spec.rb @@ -26,7 +26,15 @@ Dsl.people.has_people :person end - it 'should not list people from other churches' + it 'should not list people from other churches' do + Dsl.people.add :person + Dsl.people.has_people :person + + Dsl.home.logout + + Dsl.setup.login_with_church :user2, :church2 + Dsl.people.has_people #none + end it 'should not view people from other churches'
Add test to ensure that people from other churches aren't listed.
diff --git a/spec/support/coverage_loader.rb b/spec/support/coverage_loader.rb index abc1234..def5678 100644 --- a/spec/support/coverage_loader.rb +++ b/spec/support/coverage_loader.rb @@ -18,8 +18,9 @@ SimpleCov.at_exit do SimpleCov.result.format! percent = SimpleCov.result.covered_percent + puts "Coverage is #{'%.2f' % percent}%" unless percent >= MINIMUM_COVERAGE - puts "Coverage must be above #{MINIMUM_COVERAGE}%. It is #{'%.2f' % percent}%" + puts "Coverage must be above #{MINIMUM_COVERAGE}%" Kernel.exit(1) end end
Improve coverage loader to always show coverage level * Enables us to increase as needed
diff --git a/spec/unit/configuration_spec.rb b/spec/unit/configuration_spec.rb index abc1234..def5678 100644 --- a/spec/unit/configuration_spec.rb +++ b/spec/unit/configuration_spec.rb @@ -24,4 +24,12 @@ locales_path: '/' }) end + + it "yields configuration" do + conf = double(:conf) + allow(Loaf).to receive(:configuration).and_return(conf) + expect { |b| + Loaf.configure(&b) + }.to yield_with_args(conf) + end end
Add test for loaf configuration
diff --git a/examples/readme.ru b/examples/readme.ru index abc1234..def5678 100644 --- a/examples/readme.ru +++ b/examples/readme.ru @@ -0,0 +1,19 @@+require 'galago/router' +require 'rack/lobster' + +router = Galago::Router.new do + get '/foo', to: ->(env) { [200, {}, ['foo']] } + post '/bar/:bar', to: ->(env) { [200, {}, ['bar']] } + + namespace :lobsters do + get '/', to: Rack::Lobster.new + post '/', to: Rack::Lobster.new + + patch ':name', to: Rack::Lobster.new + put ':name', to: Rack::Lobster.new + delete ':name', to: Rack::Lobster.new + end +end + +run router +
Add example from README to examples
diff --git a/sprout-osx-apps/recipes/flux.rb b/sprout-osx-apps/recipes/flux.rb index abc1234..def5678 100644 --- a/sprout-osx-apps/recipes/flux.rb +++ b/sprout-osx-apps/recipes/flux.rb @@ -1,3 +1,5 @@+include_recipe "sprout-osx-base::addloginitem" + remote_file "#{Chef::Config[:file_cache_path]}/Flux.zip" do source node["flux_download_uri"] checksum node["flux_download_checksum"] @@ -10,4 +12,13 @@ user node['current_user'] group "admin" not_if { File.exists?("/Applications/Flux.app") } + notifies :run, "execute[Start Flux on login]" end + +app_path ="/Applications/Flux.app" + +execute "Start Flux on login" do + command "addloginitem #{app_path}" + user node['current_user'] + action :nothing +end
Add 'addloginitem' execute resource to Flux
diff --git a/example/saisoku.rb b/example/saisoku.rb index abc1234..def5678 100644 --- a/example/saisoku.rb +++ b/example/saisoku.rb @@ -23,7 +23,8 @@ programs.each { |program| puts "|%s|%-8.8s|%s|" % [ program.start_time.strftime("%Y-%m-%d %H:%M"), - program.saisoku_channel_name.tr("A-Z", "A-Z").tr(" ", ""), + program.saisoku_channel_name\ + .tr("A-Z", "A-Z").tr("a-z", "a-z").tr(" ", ""), program.title, ] }
Fix bug: lowercase channel name
diff --git a/thrift-amqp-ruby.gemspec b/thrift-amqp-ruby.gemspec index abc1234..def5678 100644 --- a/thrift-amqp-ruby.gemspec +++ b/thrift-amqp-ruby.gemspec @@ -8,8 +8,8 @@ spec.version = Thrift::Amqp::Ruby::VERSION spec.authors = ["Alexis Montagne"] spec.email = ["[email protected]"] - spec.summary = %q{TODO: Write a short summary. Required.} - spec.description = %q{TODO: Write a longer description. Optional.} + spec.summary = %q{Thrift transport layer over AMQP} + spec.description = %q{Thrift transport layer over AMQP} spec.homepage = "" spec.license = "MIT"
Update the description of the gem
diff --git a/config.ru b/config.ru index abc1234..def5678 100644 --- a/config.ru +++ b/config.ru @@ -1,3 +1,9 @@+require 'rubygems' +require 'sinatra' + +set :environment, ENV['RACK_ENV'].to_sym +disable :run, :reload + require './tubemp.rb' run Sinatra::Application
Revert "Remove some lines that break the app." This reverts commit 9aaac4ba7c8c3705059213bc06921193a367da63.
diff --git a/less_secure_random.gemspec b/less_secure_random.gemspec index abc1234..def5678 100644 --- a/less_secure_random.gemspec +++ b/less_secure_random.gemspec @@ -20,6 +20,4 @@ spec.add_development_dependency "bundler", "~> 1.7" spec.add_development_dependency "rake", "~> 10.0" - - spec.add_dependency 'pry' end
Remove pry as a runtime dependency.
diff --git a/lib/elasticsearch/index.rb b/lib/elasticsearch/index.rb index abc1234..def5678 100644 --- a/lib/elasticsearch/index.rb +++ b/lib/elasticsearch/index.rb @@ -11,7 +11,7 @@ # @return [self] # def refresh - Command::Refresh::Index.run(self) + Command::Index::Refresh.run(self) self end
Correct location of refresh command
diff --git a/vim-flavor.gemspec b/vim-flavor.gemspec index abc1234..def5678 100644 --- a/vim-flavor.gemspec +++ b/vim-flavor.gemspec @@ -6,7 +6,7 @@ gem.email = ['[email protected]'] gem.description = %q{See the README file.} gem.summary = %q{A tool to manage your favorite Vim plugins} - gem.homepage = '' + gem.homepage = 'https://github.com/kana/vim-flavor' gem.executables = `git ls-files -- bin/*`.split(/\n/).map{ |f| File.basename(f) } gem.files = `git ls-files`.split(/\n/)
Add the homepage to the gemspec
diff --git a/lib/moneybird/resource/contact.rb b/lib/moneybird/resource/contact.rb index abc1234..def5678 100644 --- a/lib/moneybird/resource/contact.rb +++ b/lib/moneybird/resource/contact.rb @@ -43,6 +43,8 @@ sepa_mandate_date sepa_mandate_id sepa_sequence_type + si_identifier + si_identifier_type tax_number tax_number_valid tax_number_validated_at
Add si_identifier and si_identifier_type to Contact resource The Moneybird gem kept warning me about: ``` W, [2019-11-04T13:02:33.800623 #24299] WARN -- : Moneybird::Resource::Contact does not have an `si_identifier' attribute W, [2019-11-04T13:02:33.800687 #24299] WARN -- : Moneybird::Resource::Contact does not have an `si_identifier_type' attribute ``` The fields are used for Simplerinvoicing. https://www.moneybird.nl/simplerinvoicing/ I dont need them, but the warning was pretty annoying :)
diff --git a/lib/spotify_to_mp3/grooveshark.rb b/lib/spotify_to_mp3/grooveshark.rb index abc1234..def5678 100644 --- a/lib/spotify_to_mp3/grooveshark.rb +++ b/lib/spotify_to_mp3/grooveshark.rb @@ -19,7 +19,7 @@ Net::HTTP.start(uri.host) do |http| http.request_post("#{uri.path}?#{uri.query}", "") do |response| - win_half = $stdin.winsize[1] / 2 + win_half = $stdout.winsize[1] / 2 title = "[#{no}/#{of_total}] #{track}" cut_title = title[0..win_half.pred].ljust win_half cut_title = cut_title.gsub(/.{3}$/, '...') if title.length > win_half
Fix not being able to specify the tracks from STDIN
diff --git a/lib/logstash/multiqueue.rb b/lib/logstash/multiqueue.rb index abc1234..def5678 100644 --- a/lib/logstash/multiqueue.rb +++ b/lib/logstash/multiqueue.rb @@ -28,6 +28,11 @@ end # def add_queue public + def remove_queue(queue) + @queues.delete(queue) + end + + public def size return @queues.collect { |q| q.size } end # def size
Add a remove_queue method to support removing outputs
diff --git a/lib/mako/file_open_util.rb b/lib/mako/file_open_util.rb index abc1234..def5678 100644 --- a/lib/mako/file_open_util.rb +++ b/lib/mako/file_open_util.rb @@ -0,0 +1,17 @@+module FileOpenUtil + # Opens and reads the passed in file. Thanks to the following article + # for explaining how to define a method on the included singleton class: + # https://6ftdan.com/allyourdev/2015/02/24/writing-methods-for-both-class-and-instance-levels/ + # + # @param [String] resource the path to the resource + # @return [String] the opened resource + def self.included(base) + def base.load_resource(resource) + File.open(resource, 'rb', encoding: 'utf-8', &:read) + end + end + + def load_resource(resource) + self.class.load_resource(resource) + end +end
Add FileOpenUtil module to DRY up File.open calls
diff --git a/lib/monban/warden_setup.rb b/lib/monban/warden_setup.rb index abc1234..def5678 100644 --- a/lib/monban/warden_setup.rb +++ b/lib/monban/warden_setup.rb @@ -5,7 +5,7 @@ end Warden::Manager.serialize_from_session do |id| - User.find(id) + User.find_by_id(id) end Warden::Strategies.add(:password_strategy, Monban::Strategies::PasswordStrategy)
Call find_by_id instead of find so invalid sessions don't throw an error.
diff --git a/transporter-campfire.gemspec b/transporter-campfire.gemspec index abc1234..def5678 100644 --- a/transporter-campfire.gemspec +++ b/transporter-campfire.gemspec @@ -11,7 +11,7 @@ s.email = "[email protected]" s.require_paths = ["lib"] - s.rubyforge_project = "integrity" + s.rubyforge_project = "transporter" s.has_rdoc = true s.rubygems_version = "1.3.1"
Fix the gemspec to point to the right rubyforge project
diff --git a/test/test_address_ch_fr.rb b/test/test_address_ch_fr.rb index abc1234..def5678 100644 --- a/test/test_address_ch_fr.rb +++ b/test/test_address_ch_fr.rb @@ -4,6 +4,6 @@ class TestAddressCHFR < Test::Unit::TestCase def test_ch_fr_canton - assert_match /\A[- a-zàâäèéêëîïôœùûüÿç]+\z/i, FFaker::AddressCHFR.canton + assert_match(/\A[- a-zàâäèéêëîïôœùûüÿç]+\z/i, FFaker::AddressCHFR.canton) end end
Fix rubocop warning about Ambiguous regexp literal.
diff --git a/validates_timeliness.gemspec b/validates_timeliness.gemspec index abc1234..def5678 100644 --- a/validates_timeliness.gemspec +++ b/validates_timeliness.gemspec @@ -10,6 +10,7 @@ s.description = %q{Adds validation methods to ActiveModel for validating dates and times. Works with multiple ORMS.} s.email = %q{[email protected]} s.homepage = %q{http://github.com/adzap/validates_timeliness} + s.license = "MIT" s.require_paths = ["lib"] s.files = `git ls-files`.split("\n") - %w{ .gitignore .rspec Gemfile Gemfile.lock autotest/discover.rb Appraisals Travis.yml } - Dir['gemsfiles/*']
Add license info to the gemspec.
diff --git a/views/opensearch.xml.builder b/views/opensearch.xml.builder index abc1234..def5678 100644 --- a/views/opensearch.xml.builder +++ b/views/opensearch.xml.builder @@ -12,7 +12,7 @@ xml.Url 'type' => 'application/opensearchdescription+xml', 'rel' => 'self', 'template' => 'https://asciiwwdc.com/open-search.xml' - xml.URL 'type' => 'text/html', + xml.Url 'type' => 'text/html', 'rel' => 'results', 'method' => 'get', 'template' => 'https://asciiwwdc.com/search?q={searchTerms}'
Fix case in Url tag
diff --git a/lib/tasks/router_data.rake b/lib/tasks/router_data.rake index abc1234..def5678 100644 --- a/lib/tasks/router_data.rake +++ b/lib/tasks/router_data.rake @@ -13,7 +13,7 @@ csv = "Source,Destination,Type\n" csv << artefacts - .map { |arr| "/#{arr[0]},#{arr[1]},prefix" } + .map { |arr| "/#{arr[0]},#{arr[1].gsub(/#.*/, '')},prefix" } .join("\n") File.write(filename, csv)
Remove segments from mulitpart redirects Publisher currently allows segment redirects within its' GUI. For our temporary task to export multipart redirects to router-data we will be removing all segment redirects and only redirect to the top of the page.
diff --git a/lib/tasks/rspec_parts.rake b/lib/tasks/rspec_parts.rake index abc1234..def5678 100644 --- a/lib/tasks/rspec_parts.rake +++ b/lib/tasks/rspec_parts.rake @@ -5,10 +5,14 @@ desc 'Run part M of N specs' RSpec::Core::RakeTask.new(:part, :part, :groups) do |task, task_args| config = Rspec::Parts.config + groups = task_args[:groups].to_i == 0 ? config.default_number_of_parts : task_args[:groups].to_i - part = (task_args[:part].to_i == 0 ? 1 : task_args[:part].to_i) - 1 + part = (task_args[:part].to_i == 0 ? 1 : task_args[:part].to_i) + part_index = part - 1 - file_list = Rspec::Parts::FileList.from(glob: config.spec_directory_glob, groups: groups, part: part) + puts "Running part #{part} of #{groups} groups" + + file_list = Rspec::Parts::FileList.from(glob: config.spec_directory_glob, groups: groups, part: part_index) config.file_list_exclusions.each do |exclusion| file_list.exclude(exclusion) end
Add output before running spec:parts
diff --git a/helpers/tickets.rb b/helpers/tickets.rb index abc1234..def5678 100644 --- a/helpers/tickets.rb +++ b/helpers/tickets.rb @@ -1,10 +1,10 @@ class Helpdesk < Sinatra::Base #Creates an alphanumeric code for identifying the trouble ticket def generate_code() - @params[:code] = Array.new(5){rand(36).to_s(36)}.join.downcase + @params[:code] = Array.new(8){rand(36).to_s(36)}.join.downcase code_exist = @db[:requests].find('code' => @params[:code]).count() while code_exist > 0 - @params[:code] = Array.new(5){rand(36).to_s(36)}.join.downcase + @params[:code] = Array.new(8){rand(36).to_s(36)}.join.downcase code_exist = @db[:requests].find('code' => @params[:code]).count() end end
Increase the length of the ticket code
diff --git a/db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb b/db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb index abc1234..def5678 100644 --- a/db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb +++ b/db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb @@ -3,20 +3,21 @@ # Set this constant to true if this migration requires downtime. DOWNTIME = false + INDEX_NAME = 'index_ci_build_trace_sections_on_section_name_id' disable_ddl_transaction! def up # MySQL may already have this as a foreign key - unless index_exists?(:ci_build_trace_sections, :section_name_id) - add_concurrent_index :ci_build_trace_sections, :section_name_id + unless index_exists?(:ci_build_trace_sections, :section_name_id, name: INDEX_NAME) + add_concurrent_index :ci_build_trace_sections, :section_name_id, name: INDEX_NAME end end def down # We cannot remove index for MySQL because it's needed for foreign key if Gitlab::Database.postgresql? - remove_concurrent_index :ci_build_trace_sections, :section_name_id + remove_concurrent_index :ci_build_trace_sections, :section_name_id, name: INDEX_NAME end end end
Fix index name to Rails default to ensure idempotency See https://gitlab.com/gitlab-com/infrastructure/issues/3822
diff --git a/Casks/mongochef.rb b/Casks/mongochef.rb index abc1234..def5678 100644 --- a/Casks/mongochef.rb +++ b/Casks/mongochef.rb @@ -1,6 +1,6 @@ cask :v1 => 'mongochef' do - version '3.0.7' - sha256 'ba29d788f619ab11157a5a379a6aca03b523b9e697f7956c8af25dbd20b0d1cb' + version '3.1.0' + sha256 '6c67fbad534bba6815c2ce665f91e8e5dc8700f597b6b4cf47789a99db62ed97' url "https://cdn.3t.io/mongochef/mac/#{version}/MongoChef.dmg" name 'MongoChef'
Update MongoChef version to 3.1.0
diff --git a/db/migrate/20220223142107_create_active_storage_variant_records.active_storage.rb b/db/migrate/20220223142107_create_active_storage_variant_records.active_storage.rb index abc1234..def5678 100644 --- a/db/migrate/20220223142107_create_active_storage_variant_records.active_storage.rb +++ b/db/migrate/20220223142107_create_active_storage_variant_records.active_storage.rb @@ -2,7 +2,7 @@ class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] def change create_table :active_storage_variant_records do |t| - t.belongs_to :blob, null: false, index: false + t.belongs_to :blob, null: false, index: false, type: :bigint t.string :variation_digest, null: false t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true
Fix column type mismatch in ActiveStorage migration
diff --git a/Casks/sickbeard.rb b/Casks/sickbeard.rb index abc1234..def5678 100644 --- a/Casks/sickbeard.rb +++ b/Casks/sickbeard.rb @@ -0,0 +1,7 @@+class Sickbeard < Cask + url 'http://sickbeard.lad1337.de/download.php?f=SickBeard-OSX-master-13.05.25.dmg' + homepage 'http://sickbeard.lad1337.de/' + version '13.05.25' + sha1 '830fafa783858cd6636ce0177d246804e0d1adf7' + link 'SickBeard.app' +end
Add Cask for Sickbeard version 13.05.25
diff --git a/test/request_validation_test_helper.rb b/test/request_validation_test_helper.rb index abc1234..def5678 100644 --- a/test/request_validation_test_helper.rb +++ b/test/request_validation_test_helper.rb @@ -1,4 +1,4 @@-class RequestValidationController < ApplicationController +class RequestValidationController < ActionController::Base @@redirect_for_bad_request = '/error'
Fix small setup item so that tests pass. git-svn-id: b46a55edd163d01e6c678d43094a9b8c8fe8b18e@6639 da5c320b-a5ec-0310-b7f9-e4d854caa1e2
diff --git a/test/servers/helpers/sidekiq_worker_initializer.rb b/test/servers/helpers/sidekiq_worker_initializer.rb index abc1234..def5678 100644 --- a/test/servers/helpers/sidekiq_worker_initializer.rb +++ b/test/servers/helpers/sidekiq_worker_initializer.rb @@ -3,7 +3,7 @@ # # export BUNDLE_GEMFILE=/path/to/ruby-sensor/gemfiles/libraries.gemfile # bundle install -# bundle exec sidekiq -c 2 -q important -r ./test/jobs/sidekiq_job_1.rb -r ./test/jobs/sidekiq_job_2.rb +# bundle exec sidekiq -c 2 -q important -r ./test/servers/helpers/sidekiq_worker_initializer.rb # # In another shell, you can boot a console to queue jobs: # @@ -15,8 +15,12 @@ # > 'args' => [1, 2, 3], 'retry' => false) # > end # + +# Load test jobs. require Dir.pwd + '/test/jobs/sidekiq_job_1.rb' require Dir.pwd + '/test/jobs/sidekiq_job_2.rb' +require "sidekiq" +require "instana" ::Instana.logger.info "Booting instrumented sidekiq worker for tests." ::Sidekiq.logger.level = ::Logger::DEBUG
Update example and include sidekiq/instana
diff --git a/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb b/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb index abc1234..def5678 100644 --- a/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb +++ b/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb @@ -1,6 +1,4 @@ class RemoveBacklogListsFromBoards < ActiveRecord::Migration - include Gitlab::Database::MigrationHelpers - DOWNTIME = false def up
Remove unnecessary include from RemoveBacklogListsFromBoards migration
diff --git a/db/migrate/20181105081426_add_placements_to_league_rosters.rb b/db/migrate/20181105081426_add_placements_to_league_rosters.rb index abc1234..def5678 100644 --- a/db/migrate/20181105081426_add_placements_to_league_rosters.rb +++ b/db/migrate/20181105081426_add_placements_to_league_rosters.rb @@ -4,10 +4,8 @@ reversible do |dir| dir.up do - League.find_each do |league| - league.divisions.each do |division| - Leagues::Rosters::ScoreUpdatingService.call(league, division) - end + League::Roster.find_each do |roster| + roster.update_match_counters! end end end
Revert "Fix old migration not working with scoring refactor [ci skip]" This reverts commit 1abba3b638d87f6ebf848ed0b3c94a7f3230975d.
diff --git a/metro_ui_css-rails.gemspec b/metro_ui_css-rails.gemspec index abc1234..def5678 100644 --- a/metro_ui_css-rails.gemspec +++ b/metro_ui_css-rails.gemspec @@ -19,4 +19,6 @@ spec.add_development_dependency 'bundler', '~> 1.7' spec.add_development_dependency 'rake', '~> 10.0' + + spec.add_runtime_dependency 'railties', '>= 3.2.16' end
Add railties gem to runtime dependency
diff --git a/Casks/intellij-idea-eap.rb b/Casks/intellij-idea-eap.rb index abc1234..def5678 100644 --- a/Casks/intellij-idea-eap.rb +++ b/Casks/intellij-idea-eap.rb @@ -1,6 +1,6 @@ cask :v1 => 'intellij-idea-eap' do - version '141.1383.1' - sha256 '3d0eed3d919cc15568e6b2a9ec36626c407565722882b5acd14e886ceb5337d9' + version '141.1531.2' + sha256 '66fe6dcc84508cac655cac251975e69075ed1b0a80e9bf2baaa02b2a0b33c98d' url "http://download-cf.jetbrains.com/idea/ideaIU-#{version}.dmg" homepage 'https://confluence.jetbrains.com/display/IDEADEV/IDEA+14.1+EAP'
Upgrade Intellij IDEA EAP to build 141.1531.2 Signed-off-by: Koichi Shiraishi <[email protected]>
diff --git a/Casks/plex-media-player.rb b/Casks/plex-media-player.rb index abc1234..def5678 100644 --- a/Casks/plex-media-player.rb +++ b/Casks/plex-media-player.rb @@ -1,6 +1,6 @@ cask :v1 => 'plex-media-player' do - version '1.0.1.42-56cc6ef9' - sha256 'b5eb64a5d4668252fe26d3e4dba612b2ebd60197d42d9d8782273969c22be598' + version '1.0.2.70-15a01542' + sha256 'ff3514acc5ada916d3f9c295f9601eaa255413191b6a9066d9452e25b016cfab' url "https://downloads.plex.tv/plexmediaplayer/#{version}/PlexMediaPlayer-#{version}-macosx-x86_64.zip" name 'Plex Media Player'
Update plex media player to 1.0.2.70
diff --git a/cardgate-rails.gemspec b/cardgate-rails.gemspec index abc1234..def5678 100644 --- a/cardgate-rails.gemspec +++ b/cardgate-rails.gemspec @@ -22,6 +22,6 @@ spec.add_development_dependency "rake" spec.add_development_dependency "mocha" - spec.add_dependency "faraday", "~> 0.8.9" - spec.add_dependency "faraday_middleware", "~> 0.8.8" + spec.add_dependency "faraday", "0.8.9" + spec.add_dependency "faraday_middleware", "0.8.8" end
Set specific versions for faraday and faraday_middleware.
diff --git a/yertle_formatter.gemspec b/yertle_formatter.gemspec index abc1234..def5678 100644 --- a/yertle_formatter.gemspec +++ b/yertle_formatter.gemspec @@ -18,7 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_runtime_dependency 'rspec', '~> 3.0.0' + spec.add_runtime_dependency 'rspec', '>=3.0.0' spec.add_development_dependency "bundler", "~> 1.6" spec.add_development_dependency "rake"
Update to allow for testing with all rspec versions 3 and above.
diff --git a/xmldsig.gemspec b/xmldsig.gemspec index abc1234..def5678 100644 --- a/xmldsig.gemspec +++ b/xmldsig.gemspec @@ -16,5 +16,5 @@ gem.require_paths = ["lib"] gem.version = Xmldsig::VERSION - gem.add_dependency("nokogiri", '~> 1.6.8') + gem.add_dependency("nokogiri", '>= 1.6.8', '< 2.0.0') end
Allow all 1.x.y versions of Nokogiri
diff --git a/app/controllers/forem/admin/topics_controller.rb b/app/controllers/forem/admin/topics_controller.rb index abc1234..def5678 100644 --- a/app/controllers/forem/admin/topics_controller.rb +++ b/app/controllers/forem/admin/topics_controller.rb @@ -1,7 +1,7 @@ module Forem module Admin class TopicsController < BaseController - before_filter :find_topic, :only => [:edit, :update, :destroy] + before_filter :find_topic def edit end
Remove :only restriction on Admin::TopicsController as there's no action in this controller that doesn't need it