diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/app/models/graph.rb b/app/models/graph.rb index abc1234..def5678 100644 --- a/app/models/graph.rb +++ b/app/models/graph.rb @@ -7,7 +7,7 @@ # @return [Graph] graph object def self.find_or_create(params) super.tap do |graph| - if Settings.graph.auto_tagging + if Settings.try(:graph).try(:auto_tagging) graph.tag_list.add params[:path].split('/') end graph.save!
Use try in accessing Settings
diff --git a/Quick.podspec b/Quick.podspec index abc1234..def5678 100644 --- a/Quick.podspec +++ b/Quick.podspec @@ -13,7 +13,7 @@ s.author = "Quick Contributors" s.ios.deployment_target = "7.0" s.osx.deployment_target = "10.9" - s.tvos.deployment_target = '9.0' + #s.tvos.deployment_target = '9.0' s.source = { :git => "https://github.com/Quick/Quick.git", :tag => "v#{s.version}" } s.source_files = "Quick", "Quick/**/*.{swift,h,m}"
Disable tvOS support for Xcode 7.0 for cocoapods - tvOS support prevents pushing Podspec
diff --git a/Qwasi.podspec b/Qwasi.podspec index abc1234..def5678 100644 --- a/Qwasi.podspec +++ b/Qwasi.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.name = "Qwasi" - s.version = "2.1.0-8" + s.version = "2.1.0-9" s.summary = "Qwasi iOS Library" s.homepage = "https://code.qwasi.com/scm/sdk/ios-library" s.license = 'MIT'
Add cocoapod update to travis
diff --git a/spec/controllers/sales_pages_controller_spec.rb b/spec/controllers/sales_pages_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/sales_pages_controller_spec.rb +++ b/spec/controllers/sales_pages_controller_spec.rb @@ -2,7 +2,8 @@ describe SalesPagesController do describe "GET 'show'" do - let!(:sales_page) { FactoryGirl.create :sales_page } + let!(:club) { FactoryGirl.create :club } + let!(:sales_page) { club.sales_page } before :each do get 'show', :club_id => sales_page.club.id @@ -20,4 +21,30 @@ assigns(:sales_page).should == sales_page end end + + describe "GET 'edit'" do + let!(:user) { FactoryGirl.create :user } + let!(:sales_page) { user.clubs.first.sales_page } + + before :each do + @request.env["devise.mapping"] = Devise.mappings[:users] + sign_in user + end + + before :each do + get 'edit', :club_id => sales_page.club.id + end + + it "returns http success" do + response.should be_success + end + + it "returns the club" do + assigns(:club).should == sales_page.club + end + + it "returns the sales_page" do + assigns(:sales_page).should == sales_page + end + end end
Update SalesPage Controller Spec for edit Add edit action SalesPage controller tests.
diff --git a/spec/decorators/content_image_decorator_spec.rb b/spec/decorators/content_image_decorator_spec.rb index abc1234..def5678 100644 --- a/spec/decorators/content_image_decorator_spec.rb +++ b/spec/decorators/content_image_decorator_spec.rb @@ -0,0 +1,15 @@+require 'rails_helper' + +describe ContentImageDecorator do + it '#text?' do + expect(build(:content_image).decorate).not_to be_text + end + + it '#image?' do + expect(build(:content_image).decorate).to be_image + end + + it '#respond_to?' do + expect(build(:content_image).decorate).to respond_to(:text?, :image?) + end +end
Add content image decorator spec.
diff --git a/lib/flickxtractr/cli.rb b/lib/flickxtractr/cli.rb index abc1234..def5678 100644 --- a/lib/flickxtractr/cli.rb +++ b/lib/flickxtractr/cli.rb @@ -4,5 +4,12 @@ module Flickxtractr class CLI < Thor package_name 'Flickxtractr' + + desc "install", "Install library dependencies" + def install + %w{ exiftool phantomjs }.each do |dependency| + `brew install #{dependency}` + end + end end end
Add exec command for installing dependencies
diff --git a/lib/tasks/projects.rake b/lib/tasks/projects.rake index abc1234..def5678 100644 --- a/lib/tasks/projects.rake +++ b/lib/tasks/projects.rake @@ -9,6 +9,13 @@ Project.import query: -> { includes(:github_repository => :github_tags) } end + desc 'Update the sitemap every other day' + task update_sitemap: :environment do + if Date.today.wday.even? + Rake::Task["sitemap:refresh"].invoke + end + end + task update_source_ranks: :environment do ids = Project.order('updated_at ASC').limit(10_000).pluck(:id).to_a Project.includes([{:github_repository => [:readme, :github_tags]}, :versions, :github_contributions]).where(id: ids).find_each(&:update_source_rank)
Update the site map every other day
diff --git a/ReactantUI.podspec b/ReactantUI.podspec index abc1234..def5678 100644 --- a/ReactantUI.podspec +++ b/ReactantUI.podspec @@ -22,10 +22,9 @@ spec.ios.deployment_target = '9.0' spec.source_files = [] - spec.preserve_paths = ['Source/**/*'] + spec.preserve_paths = ['Source/**/*', 'Package.swift', 'Package.pins'] spec.prepare_command = <<-CMD - cd ReactantUI swift build - ln -s ./.build/debug/reactant-ui ./reactant-ui + ln -s .build/debug/reactant-ui ./reactant-ui CMD end
Fix build command in podspec.
diff --git a/code42.gemspec b/code42.gemspec index abc1234..def5678 100644 --- a/code42.gemspec +++ b/code42.gemspec @@ -15,6 +15,7 @@ gem.add_development_dependency 'rspec', '~> 2.11.0' gem.add_development_dependency 'webmock', '~> 1.11.0' gem.add_development_dependency 'vcr', '~> 2.5.0' + gem.add_development_dependency 'rake' gem.add_dependency 'faraday', '~> 0.8.7' gem.add_dependency 'activesupport', '>= 3.2.0' gem.add_dependency 'faraday_middleware', '~> 0.8.7'
Add rake as a development dependency
diff --git a/lib/travis/addons/github_check_status/task.rb b/lib/travis/addons/github_check_status/task.rb index abc1234..def5678 100644 --- a/lib/travis/addons/github_check_status/task.rb +++ b/lib/travis/addons/github_check_status/task.rb @@ -4,14 +4,111 @@ module Addons module GithubCheckStatus class Task < Travis::Task + STATUS = { + 'created' => 'queued', + 'queued' => 'queued', + 'started' => 'in_progress', + 'passed' => 'completed', + 'failed' => 'completed', + 'errored' => 'completed', + 'canceled' => 'completed', + } + + CONCLUSION = { + 'passed' => 'success', + 'failed' => 'failure', + 'errored' => 'action_required', + 'canceled' => 'neutral', + } private + + def process(timeout) + info("type=github_check_status build=#{build[:id]} repo=#{repository[:slug]}") + + ## DO STUFF + end + + def url + "/repos/#{repository[:slug]}/check-runs" + end def headers { "Accept" => "application/vnd.github.antiope-preview+json" } end + + def github_apps + @github_apps ||= Travis::GitHubApps.new + end + + def installation_id + params.fetch(:installation) + end + + def access_token + github_apps.access_token(installation_id) + end + + ## Convenience methods for building the GitHub Check API payload + def status + STATUS[build[:state]] + end + + def conclusion + CONCLUSION[build[:state]] + end + + def details_url + # needs URL for this build's results + end + + def external_id + # ? + end + + def completed_at + build[:finished_at] + end + + def title + "Travis CI check" + end + + def summary + "" + end + + def text + "" + end + + def output + { + title: title, + summary: summary, + text: text, + # annotations: [], + # images: [] + } + end + + def payload + data = { + name: "Travis CI", + details_url: details_url, + external_id: external_id, + status: status, + output: output + } + + if status == 'completed' + data.merge!({conclusion: conclusion, completed_at: completed_at}) + end + + data + end end end end
Add methods to fill out Check Run POST payload
diff --git a/lib/vagrant/action/builtin/config_validate.rb b/lib/vagrant/action/builtin/config_validate.rb index abc1234..def5678 100644 --- a/lib/vagrant/action/builtin/config_validate.rb +++ b/lib/vagrant/action/builtin/config_validate.rb @@ -14,7 +14,7 @@ if !env.has_key?(:config_validate) || env[:config_validate] errors = env[:machine].config.validate(env[:machine]) - if errors + if errors && !errors.empty? raise Errors::ConfigInvalid, :errors => Util::TemplateRenderer.render( "config/validation_failed",
Verify we have errors to show if we're going to show them
diff --git a/app/models/notification_rule.rb b/app/models/notification_rule.rb index abc1234..def5678 100644 --- a/app/models/notification_rule.rb +++ b/app/models/notification_rule.rb @@ -1,15 +1,41 @@ class NotificationRule < ActiveRecord::Base include ActiveModel::ForbiddenAttributesProtection - ACTIONS = %w( create update ) belongs_to :user - validates :class_name, :inclusion => {:in => Inquest::Application.config.notifiable_classes.map { |c| c.name } } - validates :reactor_name, :inclusion => {:in => proc { Inquest::Reactor.subclasses.map { |r| r.name } } } - validates :action, :inclusion => {:in => ACTIONS} + validates :class_name, :inclusion => {:in => Inquest::Application.config.notifiable_classes.map(&:name) } + validates :reactor_name, :inclusion => {:in => Inquest::Application.config.reactor_classes.map(&:name) } + validate :action_in_class_notifiable_actions + + def klass + Inquest::Application.config.notifiable_classes.select do |nc| + nc.name == self.class_name.to_s + end.first + end def reactor Inquest::Reactor.subclasses.select do |sc| sc.name == self.reactor_name.to_s end.first end + + private + + # Private: Ensure that the configured action is within the + # notiable actions recorded against the class. + # + # For example, a Question may notify actions such as: + # * downvoted + # * answered + # + # While an Answer may only notify voting and commenting actions + # + # Returns true if the action is valid, or false if not + def action_in_class_notifiable_actions + unless klass && klass.notifiable_actions.include?(self.action) + errors.add(:actions, :not_in_notifiable_actions) + return false + end + + return true + end end
Update NotificationRule model to correctly validate permitted actions against their associated class
diff --git a/app/models/review_app_target.rb b/app/models/review_app_target.rb index abc1234..def5678 100644 --- a/app/models/review_app_target.rb +++ b/app/models/review_app_target.rb @@ -35,6 +35,6 @@ end def task_definition_name - @task_definition_name = Settings.task_definition_maps.fetch(repository) + @task_definition_name = Settings.task_definition_maps[repository] end end
Fix task definition map settings
diff --git a/catarse_stripe.gemspec b/catarse_stripe.gemspec index abc1234..def5678 100644 --- a/catarse_stripe.gemspec +++ b/catarse_stripe.gemspec @@ -18,9 +18,9 @@ s.add_dependency "rails", "~> 3.2.11" s.add_dependency "activemerchant", ">= 1.17.0" - s.add_dependency "stripe" + s.add_dependency "stripe", :git => 'https://github.com/stripe/stripe-ruby' s.add_dependency "omniauth-stripe-connect" - s.add_dependency "stripe-event" + s.add_dependency "stripe_event" s.add_development_dependency "rspec-rails" s.add_development_dependency "factory_girl_rails"
Fix new dependencies and Migrations
diff --git a/examples/tracklist.rb b/examples/tracklist.rb index abc1234..def5678 100644 --- a/examples/tracklist.rb +++ b/examples/tracklist.rb @@ -1,6 +1,10 @@ #!/usr/bin/ruby # -# Copyright (C) 2008 by Nicholas J Humfrey +# Script to display the URI, artist and title for the tracks on the tracklist. +# +# Author:: Nicholas J Humfrey (mailto:njh@aelius.com) +# Copyright:: Copyright (c) 2008 Nicholas J Humfrey +# License:: Distributes under the same terms as Ruby # $:.unshift File.dirname(__FILE__)+'/../lib' @@ -11,20 +15,28 @@ # Get the number of tracks on the tracklist len = mpris.tracklist.length -current = mpris.tracklist.current_track +if (len <= 0) + puts "There are no tracks on the tracklist." -i=0 -while (i<len) do +else - # Print asterisk next to currently playing track - if (i==current) - print "* " - else - print " " + # Get the number of the currently playing track + current = mpris.tracklist.current_track + + i=0 + while (i<len) do + + # Print asterisk next to currently playing track + if (i==current) + print "* " + else + print " " + end + + # There is a bug in VLC, which makes tracklist start at 1 + meta = mpris.tracklist.metadata(i+1) + puts "#{i}: #{meta['URI']} (#{meta['artist']} - #{meta['title']})" + i+=1 end - - # There is a bug in VLC, which makes tracklist start at 1 - meta = mpris.tracklist.metadata(i+1) - puts "#{i}: #{meta['URI']} (#{meta['artist']} - #{meta['title']})" - i+=1 + end
Check to see if the play list is empty first.
diff --git a/lib/sastrawi/stemmer/cache/array_cache.rb b/lib/sastrawi/stemmer/cache/array_cache.rb index abc1234..def5678 100644 --- a/lib/sastrawi/stemmer/cache/array_cache.rb +++ b/lib/sastrawi/stemmer/cache/array_cache.rb @@ -2,22 +2,20 @@ module Stemmer module Cache class ArrayCache - attr_accessor :data - def initialize - @data = Hash.new + @data = {} end def set(key, value) - @data[key] = value + @data[key,to_sym] = value end def get(key) - return @data[key] if @data.has_key?(key.to_sym) + return @data[key.to_sym] if @data.key?(key.to_sym) end def has(key) - return key if @data.has_key?(key.to_sym) + return key if @data.key?(key.to_sym) end end end
Fix implementation of "ArrayCache" class
diff --git a/no-style-please.gemspec b/no-style-please.gemspec index abc1234..def5678 100644 --- a/no-style-please.gemspec +++ b/no-style-please.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "no-style-please" - spec.version = "0.3.1" + spec.version = "0.4.1" spec.authors = ["Riccardo Graziosi"] spec.email = ["riccardo.graziosi97@gmail.com"]
Update gem version to 0.4.1
diff --git a/cf_spec/spec_helper.rb b/cf_spec/spec_helper.rb index abc1234..def5678 100644 --- a/cf_spec/spec_helper.rb +++ b/cf_spec/spec_helper.rb @@ -1,6 +1,7 @@ require 'bundler/setup' require 'machete' require 'machete/matchers' +require 'timeout' `mkdir -p log` Machete.logger = Machete::Logger.new("log/integration.log") @@ -11,4 +12,19 @@ config.filter_run_excluding :cached => ENV['BUILDPACK_MODE'] == 'uncached' config.filter_run_excluding :uncached => ENV['BUILDPACK_MODE'] == 'cached' + + config.around(:each) do |example| + allowed_time = 20 * 60 # 20 minutes per attempt + begin + Timeout::timeout(allowed_time) do + example.run + end + rescue Timeout::Error + RSpec.configuration.reporter.message("Retry try #{example.location}") + + Timeout::timeout(allowed_time) do + example.run + end + end + end end
Add timeout to integration tests and retry on timeout [#138839265] Signed-off-by: Dave Goddard <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@goddard.id.au> Signed-off-by: Anna Thornton <0e9b4a17e1cf85a71a11118ecdbc866e5f8ffc65@pivotal.io>
diff --git a/cancanright.gemspec b/cancanright.gemspec index abc1234..def5678 100644 --- a/cancanright.gemspec +++ b/cancanright.gemspec @@ -3,7 +3,7 @@ require 'cancanright/version' Gem::Specification.new do |s| - s.name = 'blush' + s.name = 'cancanright' s.version = CanCanRight::Version s.date = '2016-11-22' s.authors = ['Grant Colegate']
Fix incorrect name in gemspec
diff --git a/config/puma.rb b/config/puma.rb index abc1234..def5678 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -14,7 +14,7 @@ ex, :message => ex.message, :extra => { :puma => env }, - :culprit => "Puma" + :transaction => "Puma" ) [500, {}, ["An error has occurred, and engineers have been informed.\n"]] end
Fix breaking change in Sentry SDK This was renamed in sentry-raven 2.7.0: https://github.com/getsentry/raven-ruby/pull/743 We updated from sentry-raven 2.4.0 to 2.9.0 in #132, but we have no test coverage here, so we didn't spot it.
diff --git a/app/models/spree/bp_order_row.rb b/app/models/spree/bp_order_row.rb index abc1234..def5678 100644 --- a/app/models/spree/bp_order_row.rb +++ b/app/models/spree/bp_order_row.rb @@ -21,7 +21,7 @@ taxCode: 'T4', rowNet: { currencyCode: Spree::Config[:currency], - value: @line_item.price.to_f + value: @line_item.total.to_f }, rowTax: { currencyCode: Spree::Config[:currency],
Fix incorrect order total from Spree to BrightPearl
diff --git a/app/views/api/v1/users/show.rabl b/app/views/api/v1/users/show.rabl index abc1234..def5678 100644 --- a/app/views/api/v1/users/show.rabl +++ b/app/views/api/v1/users/show.rabl @@ -6,5 +6,5 @@ node(:mission) { |user| user.mission_id.nil? ? 'N/A' : user.mission.name } node(:purchases_count) { |user| user.purchases.count } -node(:last_purchase_date) { |user| user.purchases.blank? ? nil : user.purchases.last.created_at } -node(:last_activity_date) { |user| user.messages.blank? ? nil : user.messages.last.created_at }+node(:last_purchase_date) { |user| user.purchases.blank? ? nil : user.purchases.first.created_at } +node(:last_activity_date) { |user| user.messages.blank? ? nil : user.messages.first.created_at }
Fix incorrect datetime in API
diff --git a/ssrs/recipes/configure.rb b/ssrs/recipes/configure.rb index abc1234..def5678 100644 --- a/ssrs/recipes/configure.rb +++ b/ssrs/recipes/configure.rb @@ -1,10 +1,10 @@-service 'ReportServer' do +windows_service 'ReportServer' do action [:start, :enable] end powershell_script "Configure SSRS" do code <<-EOH - $rsConfig = Get-WmiObject -namespace "root\\Microsoft\\SqlServer\\ReportServer\\RS_MSSQLServer\\v12\\Admin" -class MSReportServer_ConfigurationSetting -ComputerName localhost -filter "InstanceName='#{node[:ssrsdbsetup][:instance_name]}'" + $rsConfig = Get-WmiObject -namespace "root\\Microsoft\\SqlServer\\ReportServer\\RS_MSSQLServer\\v12\\Admin" -class MSReportServer_ConfigurationSetting -ComputerName localhost -filter "InstanceName='#{node[:ssrsconfig][:instance_name]}'" $rsConfig.RemoveURL("ReportServerWebService", "#{node[:ssrsconfig][:base_url]}", 1033); $rsConfig.RemoveURL("ReportManager", "#{node[:ssrsconfig][:base_url]}", 1033); @@ -16,7 +16,7 @@ $rsConfig.ReserveURL("ReportManager", "#{node[:ssrsconfig][:base_url]}", 1033); $script = $rsConfig.GenerateDatabaseCreationScript("#{node[:ssrsconfig][:database_name]}", 1033, $FALSE) - Invoke-Sqlcmd -Query $script -ServerInstance "#{node[:ssrsconfig][:instance_name]}" + Invoke-Sqlcmd -Query $script -ServerInstance "localhost\\#{node[:ssrsconfig][:instance_name]}" EOH action :run
Fix variable name typo, Fix ServerInstance argument syntax
diff --git a/test/integration/default/inspec/default_spec.rb b/test/integration/default/inspec/default_spec.rb index abc1234..def5678 100644 --- a/test/integration/default/inspec/default_spec.rb +++ b/test/integration/default/inspec/default_spec.rb @@ -1,15 +1,13 @@ if (os[:family] == 'redhat' && os[:release].start_with?('6')) || os[:name] == 'amazon' || os[:family] == 'suse' - describe command('sysctl -n kernel.msgmax') do - its(:exit_status) { should eq 0 } - its(:stdout) { should match(/^65536$/) } + describe kernel_parameter('kernel.msgmax') do + its('value') { should eq 65536 } end else - describe command('sysctl -n kernel.msgmax') do - its(:exit_status) { should eq 0 } - its(:stdout) { should match(/^8192$/) } + describe kernel_parameter('kernel.msgmax') do + its('value') { should eq 8192 } end end @@ -18,7 +16,6 @@ it { should_not be_file } end -describe command('sysctl -n vm.swappiness') do - its(:exit_status) { should eq 0 } - its(:stdout) { should match(/^19$/) } +describe kernel_parameter('vm.swappiness') do + its('value') { should eq 19 } end
Use the kernel_parameter inspec resource Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/appium_tests/search_poem_spec.rb b/appium_tests/search_poem_spec.rb index abc1234..def5678 100644 --- a/appium_tests/search_poem_spec.rb +++ b/appium_tests/search_poem_spec.rb @@ -0,0 +1,23 @@+# coding: utf-8 +require_relative 'spec_helper' + +describe '歌を検索するテスト' do + + it 'アプリのタイトルが正しく表示される' do + can_see(TITLE) + end + + describe '検索窓に文字を入力すると、歌を絞り込むことができる' do + it '歌選択画面を開く' do + click_element_of('UIATableCell', name: '取り札を用意する歌') + can_see('歌を選ぶ') + end + it '検索窓に「秋」を入力すると、1番, 5番, 22番…という順に歌が選ばれている。' do + find_element(:name, "search_text_field").send_keys "秋" + cell_names = find_elements(:class_name, 'UIATableCell').map{|e| e.name} + expect(cell_names.first).to eq '001' + expect(cell_names[1]).to eq '005' + expect(cell_names[2]).to eq '022' + end + end +end
Add Appium test for Searching Poems
diff --git a/tests/hp/requests/block_storage/volume_tests.rb b/tests/hp/requests/block_storage/volume_tests.rb index abc1234..def5678 100644 --- a/tests/hp/requests/block_storage/volume_tests.rb +++ b/tests/hp/requests/block_storage/volume_tests.rb @@ -0,0 +1,62 @@+Shindo.tests('Fog::BlockStorage[:hp] | volume requests', ['hp', 'block_storage']) do + + @volume_format = { + 'status' => String, + 'displayDescription' => String, + 'availabilityZone' => String, + 'displayName' => String, + 'attachments' => [Fog::Nullable::Hash], + 'volumeType' => Fog::Nullable::String, + 'snapshotId' => String, + 'size' => Integer, + 'id' => Integer, + 'createdAt' => String, + 'metadata' => Fog::Nullable::Hash + } + + tests('success') do + + @volume_id = nil + @volume_name = "fogvolumetests" + @volume_desc = @volume_name + " desc" + + tests("#create_volume(#{@volume_name}, #{@volume_desc}, 1)").formats(@volume_format) do + data = Fog::BlockStorage[:hp].create_volume(@volume_name, @volume_desc, 1).body['volume'] + @volume_id = data['id'] + data + end + + #Fog::BlockStorage[:hp].volumes.get(@volume_id).wait_for { ready? } + # + tests("#get_volume_details(#{@volume_id})").formats(@volume_format) do + Fog::BlockStorage[:hp].get_volume_details(@volume_id).body['volume'] + end + + tests('#list_volumes').formats({'volumes' => [@volume_format]}) do + Fog::BlockStorage[:hp].list_volumes.body + end + + #Fog::BlockStorage[:hp].volumes.get(@volume_id).wait_for { ready? } + # + tests("#delete_volume(#{@volume_id})").succeeds do + Fog::BlockStorage[:hp].delete_volume(@volume_id) + end + + # Add attach_volume and detach_volume tests + + end + + tests('failure') do + + tests('#delete_volume(0)').raises(Fog::BlockStorage::HP::NotFound) do + Fog::BlockStorage[:hp].delete_volume(0) + end + + tests('#get_volume_details(0)').raises(Fog::BlockStorage::HP::NotFound) do + Fog::BlockStorage[:hp].get_volume_details(0) + end + + # Add attach_volume and detach_volume tests + end + +end
Add shindo tests for requests methods for block storage.
diff --git a/Casks/openra.rb b/Casks/openra.rb index abc1234..def5678 100644 --- a/Casks/openra.rb +++ b/Casks/openra.rb @@ -1,6 +1,6 @@ cask :v1 => 'openra' do - version '20141029' - sha256 '421f341d324e2e360cf17facc1379b19036f7459516b84685037a041d5020e64' + version '20150424' + sha256 'e90b6cbb7faf941e5b794a322c345132db15e7a31e12ec0a22a9518643baf356' # github.com is the official download host per the vendor homepage url "https://github.com/OpenRA/OpenRA/releases/download/release-#{version}/OpenRA-release-#{version}.zip"
Update OpenRA to Release 2015-04-24
diff --git a/app/models/post.rb b/app/models/post.rb index abc1234..def5678 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -1,3 +1,4 @@+# Record when a moderator has posted a piece of content class Post < ActiveRecord::Base belongs_to :user belongs_to :content, polymorphic: true
Add rough description of purpose of Post model
diff --git a/MulticastDelegateSwift.podspec b/MulticastDelegateSwift.podspec index abc1234..def5678 100644 --- a/MulticastDelegateSwift.podspec +++ b/MulticastDelegateSwift.podspec @@ -2,6 +2,7 @@ s.name = 'MulticastDelegateSwift' s.version = '2.0.1' s.platform = :ios, '8.0' + s.platform = :osx, '10.10' s.license = { :type => 'MIT'} s.summary = 'Swift Multicast Delegate' s.homepage = 'https://github.com/jonasman/MulticastDelegate'
Add macOS/osx target to podspec
diff --git a/app/models/user.rb b/app/models/user.rb index abc1234..def5678 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -28,7 +28,7 @@ pn = attrs[:principal_name] if pn user = User.where(:$or => [{email: attrs[:email]}, {principal_name: pn}]).first - user = User.create! attrs[:email] if user.nil? + user = User.create! attrs if user.nil? user.update_attributes!(attrs) user end
Fix parameters passed to create
diff --git a/app/models/zine.rb b/app/models/zine.rb index abc1234..def5678 100644 --- a/app/models/zine.rb +++ b/app/models/zine.rb @@ -11,9 +11,10 @@ has_many :authors, through: :authorships scope :published, -> { where(published: true).order(updated_at: :desc) } + scope :with_authors, -> { includes(:authors) } def self.catalog - published + published.with_authors end def self.find_published(id)
Add eager loading for authors
diff --git a/bitkassa.gemspec b/bitkassa.gemspec index abc1234..def5678 100644 --- a/bitkassa.gemspec +++ b/bitkassa.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = "bitkassa" s.version = "0.0.1" - s.summary = "Hola!" + s.summary = "Bitkassa" s.description = "Ruby interface to the Bitkassa API" s.authors = ["Bèr Kessels"] s.email = "ber@berk.es"
Fix name from old template name to actual Bitkassa name
diff --git a/hello_sign.gemspec b/hello_sign.gemspec index abc1234..def5678 100644 --- a/hello_sign.gemspec +++ b/hello_sign.gemspec @@ -25,5 +25,4 @@ gem.add_development_dependency 'rspec', '~> 2.12.0' gem.add_development_dependency 'webmock', '~> 1.9.0' gem.add_development_dependency 'rake', '~> 10.0.3' - gem.add_development_dependency 'vcr', '~> 2.4.0' end
Remove VCR as a dependency
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index abc1234..def5678 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -10,7 +10,7 @@ unless admin_auth.user admin_user = User.create_from_authentication(admin_auth) - admin_user.assign_attributes({admin: true}, as: :admin) + admin_user.assign_attributes({admin: true, biography: "I am mighty."}, as: :admin) admin_user.save! end @@ -18,7 +18,11 @@ mortal_auth.name = "Development User" mortal_auth.email = "mortal@ocw.local" - User.create_from_authentication(mortal_auth) unless mortal_auth.user + unless mortal_auth.user + mortal_user = User.create_from_authentication(mortal_auth) + mortal_user.biography = "I'm ordinary." + mortal_user.save! + end end provider :openid, store: OpenID::Store::Filesystem.new(Rails.root.join('tmp'))
Add bios to the auto-generated dev users (so they can edit proposals)
diff --git a/containers/obs/secure_server.rb b/containers/obs/secure_server.rb index abc1234..def5678 100644 --- a/containers/obs/secure_server.rb +++ b/containers/obs/secure_server.rb @@ -11,3 +11,11 @@ get '/' do "I'm the secure OBS server\n" end + +get '/source/home:cschum:go/red_herring' do + "xx" +end + +put '/source/home:cschum:go/red_herring/red_herring-0.0.2.tar.gz' do + "xx" +end
Add API endpoints for checking OBS project
diff --git a/database_rewinder.gemspec b/database_rewinder.gemspec index abc1234..def5678 100644 --- a/database_rewinder.gemspec +++ b/database_rewinder.gemspec @@ -18,7 +18,7 @@ spec.require_paths = ["lib"] spec.add_development_dependency "bundler", "~> 1.3" - spec.add_development_dependency "rake", "< 11" + spec.add_development_dependency "rake" spec.add_development_dependency 'test-unit-rails' spec.add_development_dependency 'rails' spec.add_development_dependency 'sqlite3'
Revert "Use Rake under 11" This reverts commit 1bb7e8bb64006e0446c765eb22d4db5f86708348. Reason: We're no longer depending on RSpec 2
diff --git a/spec/bundler/installer/gem_installer_spec.rb b/spec/bundler/installer/gem_installer_spec.rb index abc1234..def5678 100644 --- a/spec/bundler/installer/gem_installer_spec.rb +++ b/spec/bundler/installer/gem_installer_spec.rb @@ -10,14 +10,14 @@ subject { described_class.new(spec, installer) } context "spec_settings is nil" do - it "invokes install method with empty build_args" do + it "invokes install method with empty build_args", :rubygems => ">= 2" do allow(spec_source).to receive(:install).with(spec, :force => false, :ensure_builtin_gems_cached => false, :build_args => []) subject.install_from_spec end end context "spec_settings is build option" do - it "invokes install method with build_args" do + it "invokes install method with build_args", :rubygems => ">= 2" do allow(Bundler.settings).to receive(:[]).with(:bin) allow(Bundler.settings).to receive(:[]).with("build.dummy").and_return("--with-dummy-config=dummy") allow(spec_source).to receive(:install).with(spec, :force => false, :ensure_builtin_gems_cached => false, :build_args => ["--with-dummy-config=dummy"])
Add limit `:rubygems => ">= 2"` Because those specs are failed with old RubyGems.
diff --git a/lib/deep_cover/core_ext/load_overrides.rb b/lib/deep_cover/core_ext/load_overrides.rb index abc1234..def5678 100644 --- a/lib/deep_cover/core_ext/load_overrides.rb +++ b/lib/deep_cover/core_ext/load_overrides.rb @@ -14,8 +14,8 @@ result = load_without_deep_cover(path) if result.is_a? Symbol result end + + extend ModuleOverride + override ::Kernel, ::Kernel.singleton_class end - - extend ModuleOverride - override ::Kernel, ::Kernel.singleton_class end
Fix it even though it's unused
diff --git a/spec/controllers/admin/tag_controller_spec.rb b/spec/controllers/admin/tag_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/admin/tag_controller_spec.rb +++ b/spec/controllers/admin/tag_controller_spec.rb @@ -4,19 +4,37 @@ let!(:admin) { Profile.create!(FactoryGirl.attributes_for(:admin)) } let!(:non_admin) { Profile.create!(FactoryGirl.attributes_for(:published, topic_list: ['non_admin_topic1','non_admin_topic2'])) } + + before do + sign_in admin + end + describe 'GET categorization' do - before(:each) do - sign_in admin - get :categorization + context 'without any selection' do + before do + get :categorization + end + + it 'should contain all tags' do + expect(response).to render_template(:categorization) + expect(response.status).to eq 200 + expect(assigns(:tags)).to eq( + [ActsAsTaggableOn::Tag.find_by(name: non_admin.topic_list[0]), + ActsAsTaggableOn::Tag.find_by(name: non_admin.topic_list[1])] + ) + end end - it 'should contain all tags' do - expect(response).to render_template(:categorization) - expect(response.status).to eq 200 - expect(assigns(:tags)).to eq( - [ActsAsTaggableOn::Tag.find_by(name: non_admin.topic_list[0]), - ActsAsTaggableOn::Tag.find_by(name: non_admin.topic_list[1])] - ) + context 'select a category' do + before do + @categories = Category.new(name: 'Science') + @tag = ActsAsTaggableOn::Tag.find_by(name: non_admin.topic[0]) + binding.pry + + @tag.categories << @category + binding.pry + get :categorization + end end end
Add another test for tags
diff --git a/app/controllers/api/v1/plays_controller.rb b/app/controllers/api/v1/plays_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/v1/plays_controller.rb +++ b/app/controllers/api/v1/plays_controller.rb @@ -9,15 +9,15 @@ result_count: @plays.total_count, results: @plays } - render json: @object, include: {track: { except: :response }} + render json: @object, include: { track: { except: :response } } end def create @track = Track.find(params[:track_id]) - fail unless @track.sha1? + raise unless @track.sha1? @play = @track.plays.create! - render json: @play, include: {track: { except: :response }} + render json: @play, include: { track: { except: :response } } end def update @@ -31,6 +31,6 @@ @play.played_at ||= Time.now.utc @play.save! - render json: @play, include: {track: { except: :response }} + render json: @play, include: { track: { except: :response } } end end
Fix `Space inside {} missing` issue
diff --git a/app/helpers/spree/base_helper_decorator.rb b/app/helpers/spree/base_helper_decorator.rb index abc1234..def5678 100644 --- a/app/helpers/spree/base_helper_decorator.rb +++ b/app/helpers/spree/base_helper_decorator.rb @@ -7,7 +7,7 @@ root_taxon.children.map do |taxon| css_class = (current_taxon && current_taxon.self_and_ancestors.include?(taxon)) ? 'current' : nil content_tag :li, class: css_class do - link_to(taxon.name, seo_url(taxon), :class => "#{current_taxon}") + + link_to(taxon.name, seo_url(taxon), :class => "taxonomy-child") + taxons_tree(taxon, current_taxon, max_level - 1) end end.join("\n").html_safe
Add css class to taxon links.
diff --git a/cucumber_tricks.gemspec b/cucumber_tricks.gemspec index abc1234..def5678 100644 --- a/cucumber_tricks.gemspec +++ b/cucumber_tricks.gemspec @@ -18,7 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_dependency "cucumber" + spec.add_dependency "cucumber", "~> 1.0" spec.add_development_dependency "bundler" spec.add_development_dependency "rake"
Add version constraint on cucumber
diff --git a/lib/google_timezone/base.rb b/lib/google_timezone/base.rb index abc1234..def5678 100644 --- a/lib/google_timezone/base.rb +++ b/lib/google_timezone/base.rb @@ -3,7 +3,7 @@ module GoogleTimezone class Base - @allowed_params = [:language, :sensor, :timestamp, :client, :signature] + @allowed_params = [:language, :sensor, :timestamp, :client, :signature, :key] def initialize(*args) @lat, @lon = if args.first.is_a? Array
Add key as allowed param Google's timezone API documentation indicates that all apps should use an API key for requests. https://developers.google.com/maps/documentation/timezone/#api_key The "key" parameter was not in the list of allowed_params and would be rejected. This change simply adds :key to the list of allowed_params.
diff --git a/lib/minitest/fail_plugin.rb b/lib/minitest/fail_plugin.rb index abc1234..def5678 100644 --- a/lib/minitest/fail_plugin.rb +++ b/lib/minitest/fail_plugin.rb @@ -28,11 +28,24 @@ empty_test = result.method(result.name).source_location e = ::Minitest::Assertion.new "Empty test <#{result}>" - e.class.send :define_method, :location, -> { empty_test.join(":") } + define_and_redefine e.class, :location do + -> { empty_test.join(":") } + end result.failures << e self.results << result end end + + private + + def define_and_redefine klass, method + return unless block_given? + + if klass.send :method_defined?, method + klass.send :remove_method, method + end + klass.send :define_method, method, yield + end end end
Define and redefine :location to quell warnings
diff --git a/lib/minitest/fail_plugin.rb b/lib/minitest/fail_plugin.rb index abc1234..def5678 100644 --- a/lib/minitest/fail_plugin.rb +++ b/lib/minitest/fail_plugin.rb @@ -28,8 +28,7 @@ empty_test = result.method(result.name).source_location e = ::Minitest::Assertion.new "Empty test #{result}" - e.class.send :attr_accessor, :location - e.location = empty_test.join(":") + e.class.send :define_method, :location, -> { empty_test.join(":") } result.failures << e self.results << result
Use define_method to set location
diff --git a/lib/nigel/commands/flood.rb b/lib/nigel/commands/flood.rb index abc1234..def5678 100644 --- a/lib/nigel/commands/flood.rb +++ b/lib/nigel/commands/flood.rb @@ -3,10 +3,11 @@ class Flood def self.process(options) + threads = [] + Google::Search::Image.new( query: 'Nigel Thornberry').each_with_index do |image, i| - threads = [] if(image.uri.include? '.gif') @@ -14,9 +15,9 @@ threads << self.fetch(image.uri, "#{ i }.gif") end + end - threads.each(&:join) - end + threads.each(&:join) end private
Fix bug with threads not running concurrently.
diff --git a/radar.gemspec b/radar.gemspec index abc1234..def5678 100644 --- a/radar.gemspec +++ b/radar.gemspec @@ -1,6 +1,4 @@-# -*- encoding: utf-8 -*- -$LOAD_PATH.unshift File.expand_path('../lib', __FILE__) -require 'radar/version' +require File.expand_path("../lib/radar/version", __FILE__) Gem::Specification.new do |s| s.name = "radar" @@ -23,6 +21,6 @@ s.add_development_dependency "rake" s.files = `git ls-files`.split("\n") - s.executables = `git ls-files`.split("\n").select{|f| f =~ /^bin/} + s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact s.require_path = 'lib' end
Fix executables line in gemspec
diff --git a/lib/songkickr/result_set.rb b/lib/songkickr/result_set.rb index abc1234..def5678 100644 --- a/lib/songkickr/result_set.rb +++ b/lib/songkickr/result_set.rb @@ -19,7 +19,7 @@ def parse_results(results = {}) return [] unless results.include? result_key_string results[result_key_string].inject([]) do |result_items, result_item| - result_items << Object.const_get("Songkickr::#{result_type}").new(result_item) + result_items << Songkickr.const_get("#{result_type}").new(result_item) end end end
Fix some incompatibilities with certain Ruby runtimes.
diff --git a/lib/spree_flexi_variants.rb b/lib/spree_flexi_variants.rb index abc1234..def5678 100644 --- a/lib/spree_flexi_variants.rb +++ b/lib/spree_flexi_variants.rb @@ -7,10 +7,10 @@ def self.activate Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c| - Rails.env.production? ? require(c) : load(c) + Rails.application.config.cache_classes ? require(c) : load(c) end Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/**/*.rb")) do |c| - Rails.env.production? ? require(c) : load(c) + Rails.application.config.cache_classes ? require(c) : load(c) end [Calculator::Engraving, Calculator::AmountTimesConstant, Calculator::ProductArea, Calculator::CustomizationImage].each(&:register) end
Change the conditions for class loading
diff --git a/config/initializers/cancancan.rb b/config/initializers/cancancan.rb index abc1234..def5678 100644 --- a/config/initializers/cancancan.rb +++ b/config/initializers/cancancan.rb @@ -0,0 +1,12 @@+module CanCanUnauthorizedMessage + # Fix deprecated syntax calling I18n#translate (using keyword args) without using ** + def unauthorized_message(action, subject) + keys = unauthorized_message_keys(action, subject) + variables = {:action => action.to_s} + variables[:subject] = (subject.class == Class ? subject : subject.class).to_s.underscore.humanize.downcase + message = I18n.translate(nil, **variables.merge(:scope => :unauthorized, :default => keys + [""])) + message.blank? ? nil : message + end +end + +CanCan::Ability.prepend(CanCanUnauthorizedMessage)
Patch CanCan deprecated keyword arguments Solves an issue with use of deprecated positional args. The version of CanCan which fixes this is not currently compatible with OFN...
diff --git a/spec/tasks/import_contacts/contact_builder_spec.rb b/spec/tasks/import_contacts/contact_builder_spec.rb index abc1234..def5678 100644 --- a/spec/tasks/import_contacts/contact_builder_spec.rb +++ b/spec/tasks/import_contacts/contact_builder_spec.rb @@ -4,6 +4,7 @@ describe '.build' do let(:contact_record) { build :contact_record } let(:titles) { "title1\ntitle2" } + let!(:department) { create :department, title: 'HMRC', id: 1 } let(:input_attributes) { {
Fix specs that were dependent on Department yaml file content These now require record creation
diff --git a/MCPopupOverlay.podspec b/MCPopupOverlay.podspec index abc1234..def5678 100644 --- a/MCPopupOverlay.podspec +++ b/MCPopupOverlay.podspec @@ -0,0 +1,21 @@+ +Pod::Spec.new do |s| + + s.name = "MCPopupOverlay" + s.version = "0.0.1" + s.summary = "A generic popup view class." + s.homepage = "http://www.mushroomcloud.co.za" + s.license = 'Apache License, Version 2.0' + s.author = { "Rayman Rosevear" => "ray@mushroomcloud.co.za" } + + s.platform = :ios, "6.0" + + s.source = { :git => "https://github.com/MushroomCloud/MCPopupOverlay.git", :tag => "0.0.1" } + s.source_files = "MCPopupOverlay/*.{h,m}", "MCPopupOverlay/**/*.{h,m}" + s.public_header_files = "MCPopupOverlay/*.h", "MCPopupOverlay/Framework/*.h" + + s.requires_arc = true + + s.dependency "JRSwizzle", "~> 1.0" + +end
Add a CocoaPods podspec to the repo
diff --git a/Casks/java6.rb b/Casks/java6.rb index abc1234..def5678 100644 --- a/Casks/java6.rb +++ b/Casks/java6.rb @@ -1,14 +1,12 @@ cask :v1 => 'java6' do version '1.6.0_65' - sha256 '97bc9b3c47af1f303710c8b15f2bcaedd6b40963c711a18da8eac1e49690a8a0' + sha256 '1b7b88c7c7ca3a1c50eacee1977dee974a50157ff7c88d0e73902bd98fc58a86' - url 'http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-001.dmg' - homepage 'http://support.apple.com/kb/DL1572' + url 'https://support.apple.com/downloads/DL1572/en_US/javaforosx.dmg' + homepage 'https://support.apple.com/kb/DL1572' license :unknown pkg 'JavaForOSX.pkg' uninstall :pkgutil => 'com.apple.pkg.JavaForMacOSX107' - - depends_on :macos => '<= :yosemite' end
Use the new package for java 6 that works on el capitan with rootless mode enabled.
diff --git a/ci_environment/bison/attributes/default.rb b/ci_environment/bison/attributes/default.rb index abc1234..def5678 100644 --- a/ci_environment/bison/attributes/default.rb +++ b/ci_environment/bison/attributes/default.rb @@ -1,5 +1,5 @@ arch = kernel['machine'] =~ /x86_64/ ? "amd64" : "i386" -filename = "bison_2.4.1.dfsg-3_#{arch}.deb" +filename = "bison_3.0.4.dfsg-1_#{arch}.deb" default[:bison] = { :filename => filename,
Update bison deb to available version
diff --git a/test/support/load_test_env.rb b/test/support/load_test_env.rb index abc1234..def5678 100644 --- a/test/support/load_test_env.rb +++ b/test/support/load_test_env.rb @@ -9,6 +9,7 @@ require_relative "database_setup" require_relative "schema" require_relative "models" +require "niceql" module TestHelpers
Load niceql in the test environment So useful for debugging!
diff --git a/cookbooks/cumulus/test/cookbooks/cumulus-test/recipes/bonds.rb b/cookbooks/cumulus/test/cookbooks/cumulus-test/recipes/bonds.rb index abc1234..def5678 100644 --- a/cookbooks/cumulus/test/cookbooks/cumulus-test/recipes/bonds.rb +++ b/cookbooks/cumulus/test/cookbooks/cumulus-test/recipes/bonds.rb @@ -0,0 +1,13 @@+# +# Cookbook Name:: cumulus-test +# Recipe:: bonds +# +# Copyright 2015, Cumulus Networks +# +# All rights reserved - Do Not Redistribute +# + +cumulus_bond 'bond0' do + slaves ['swp1-2', 'swp4'] + clag_id 42 +end
Add a cumulus_bond test recipe
diff --git a/rspec_profiling.gemspec b/rspec_profiling.gemspec index abc1234..def5678 100644 --- a/rspec_profiling.gemspec +++ b/rspec_profiling.gemspec @@ -21,6 +21,7 @@ spec.add_dependency "sqlite3" spec.add_dependency "activerecord" spec.add_dependency "pg" + spec.add_dependency "rails" spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake"
Add rails dependency to gemspec
diff --git a/app/controllers/users/notification_rules_controller.rb b/app/controllers/users/notification_rules_controller.rb index abc1234..def5678 100644 --- a/app/controllers/users/notification_rules_controller.rb +++ b/app/controllers/users/notification_rules_controller.rb @@ -2,18 +2,22 @@ before_filter :authenticate_user! def index - @notification_rules = current_user.notification_rules @notification_rule = NotificationRule.new end def create @notification_rule = current_user.notification_rules.build(notification_rule_params) - respond_with @notification_rule, location: user_notification_rules_path + + if @notification_rule.save + redirect_to users_notification_rules_path, notice: 'Notification has been set up.' + else + render :index + end end def destroy @notification_rule = current_user.notification_rules.destroy(params[:id]) - respond_with @notification_rule + redirect_to users_notification_rules_path, notice: 'You will no longer receive notifications matching this criteria.' end private
Stop using respond with in order to render the right view in the right circumstances
diff --git a/app/controllers/api/ims_imports_controller.rb b/app/controllers/api/ims_imports_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/ims_imports_controller.rb +++ b/app/controllers/api/ims_imports_controller.rb @@ -2,8 +2,11 @@ include Concerns::CanvasImsccSupport def create - if params[:data] && params[:data][:lti_launches].present? - lti_launches = lti_launches_params(params[:data])[:lti_launches] + data = params[:data] + if data.present? + lti_launches = if data[:lti_launches].present? + lti_launches_params(data)[:lti_launches] + end data = { lti_launches: lti_launches,
Verify ims import data params separately
diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index abc1234..def5678 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -24,7 +24,8 @@ config.document_unique_id_param = 'ids' # solr field configuration for search results/index views - config.index.title_field = 'full_title_tesim' + config.index.title_field = 'full_title_ssim' + config.add_show_field 'creator_ssim', label: 'Creator' config.add_search_field 'all_fields', label: 'Everything'
Add catalog configuration to display title/creator
diff --git a/app/views/api/chapters/_chapter.json.jbuilder b/app/views/api/chapters/_chapter.json.jbuilder index abc1234..def5678 100644 --- a/app/views/api/chapters/_chapter.json.jbuilder +++ b/app/views/api/chapters/_chapter.json.jbuilder @@ -1,3 +1,12 @@-json.merge! chapter.as_json +json.ignore_nil! + +fields = chapter.attributes.keys.map(&:to_sym) - [:story_id] - [:created_at] - [:updated_at] - [:image] + +json.extract! chapter, *fields + +if chapter.image.url + json.image chapter.image +end + json.node_ids chapter.nodes.pluck :id -json.relation_ids chapter.relations.pluck :id +json.relation_ids chapter.relations.pluck :id
Remove unused attributes in story chapters API call
diff --git a/dm-sqlite-adapter.gemspec b/dm-sqlite-adapter.gemspec index abc1234..def5678 100644 --- a/dm-sqlite-adapter.gemspec +++ b/dm-sqlite-adapter.gemspec @@ -1,4 +1,5 @@-# -*- encoding: utf-8 -*- +# encoding: utf-8 + require File.expand_path('../lib/dm-sqlite-adapter/version', __FILE__) Gem::Specification.new do |gem| @@ -9,17 +10,17 @@ gem.homepage = 'http://datamapper.org' gem.authors = [ 'Dan Kubb' ] - gem.files = `git ls-files`.split("\n") - gem.test_files = `git ls-files -- {spec}/*`.split("\n") - gem.extra_rdoc_files = %w[LICENSE] + gem.files = `git ls-files`.split("\n") + gem.test_files = `git ls-files -- {spec}/*`.split("\n") + gem.extra_rdoc_files = %w[ LICENSE ] - gem.require_paths = [ "lib" ] + gem.require_paths = %w[ lib ] gem.version = DataMapper::SqliteAdapter::VERSION - gem.add_runtime_dependency(%q<dm-do-adapter>, ["~> 1.3.0.beta"]) - gem.add_runtime_dependency(%q<do_sqlite3>, ["~> 0.10.6"]) + gem.add_runtime_dependency('dm-do-adapter', [ '~> 1.3.0.beta' ]) + gem.add_runtime_dependency('do_sqlite3', [ '~> 0.10.6' ]) - gem.add_development_dependency(%q<dm-migrations>, ["~> 1.3.0.beta"]) - gem.add_development_dependency(%q<rake>, ["~> 0.9.2"]) - gem.add_development_dependency(%q<rspec>, ["~> 1.3.2"]) + gem.add_development_dependency('dm-migrations', [ '~> 1.3.0.beta' ]) + gem.add_development_dependency('rake', [ '~> 0.9.2' ]) + gem.add_development_dependency('rspec', [ '~> 1.3.2' ]) end
Fix code formatting in gemspec
diff --git a/delayed_job_sqs.gemspec b/delayed_job_sqs.gemspec index abc1234..def5678 100644 --- a/delayed_job_sqs.gemspec +++ b/delayed_job_sqs.gemspec @@ -10,7 +10,7 @@ s.email = ['isra017@gmail.com'] s.description = 'Amazon SQS backend for delayed_job' s.summary = 'Amazon SQS backend for delayed_job' - s.homepage = 'https://github.com/isra17/delayed_job_sqs' + s.homepage = 'https://github.com/Shopify/delayed_job_sqs' s.license = 'MIT' s.files = `git ls-files`.split($/)
Update the gem spec's "homepage" property.
diff --git a/backend/dorm-management/config/application.rb b/backend/dorm-management/config/application.rb index abc1234..def5678 100644 --- a/backend/dorm-management/config/application.rb +++ b/backend/dorm-management/config/application.rb @@ -22,5 +22,10 @@ # Do not swallow errors in after_commit/after_rollback callbacks. config.active_record.raise_in_transactional_callbacks = true + + config.action_dispatch.default_headers.merge!({ + 'Access-Control-Allow-Origin' => '*', + 'Access-Control-Request-Method' => '*' + }) end end
Allow cross origin requests during development
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -17,7 +17,7 @@ class ActiveSupport::TestCase class << self - remove_method :describe + remove_method :describe if method_defined? :describe end extend MiniTest::Spec::DSL
Remove describe method only when defined
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,6 +2,11 @@ require 'rr' require 'ffi' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) + +if RUBY_PLATFORM == 'java' + require 'java' + JRuby.objectspace = true +end # Since the tests will call Gtk+ functions, Gtk+ must be initialized. module DummyGtk
Enable objectspace in JRuby for testing.
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,2 +1,4 @@+RAILS_ENV = 'test' require 'rubygems' require 'test/unit' +require File.join(File.dirname(__FILE__), '..', 'init.rb')
Include the plugin initialisation file in the test helper for the plugin.
diff --git a/theme_essay.gemspec b/theme_essay.gemspec index abc1234..def5678 100644 --- a/theme_essay.gemspec +++ b/theme_essay.gemspec @@ -10,14 +10,14 @@ s.authors = ["Ace Subido", "Karlo Soriano"] s.email = ["ace@aelogica.com", "karlo@aelogica.com"] s.homepage = "TODO" - s.summary = "AELOGICA AppExpress Essay Theme" + s.summary = "AELOGICA AppExpress Essay Theme 2014" s.description = "AELOGICA AppExpress Essay Theme 2014" s.license = "MIT" s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"] s.test_files = Dir["test/**/*"] - s.add_dependency "rails", "~> 4.1.2" + s.add_dependency "rails", "~> 4.1.1" s.add_dependency "foundation-rails", "~> 5.3" s.add_development_dependency "sqlite3"
Change rails version dependency in order to fix bundle issues
diff --git a/lib/html_mockup/rack/sleep.rb b/lib/html_mockup/rack/sleep.rb index abc1234..def5678 100644 --- a/lib/html_mockup/rack/sleep.rb +++ b/lib/html_mockup/rack/sleep.rb @@ -8,7 +8,7 @@ end def call(env) - r = Rack::Request.new(env) + r = ::Rack::Request.new(env) if r.params["sleep"] sleeptime = [r.params["sleep"].to_i, 5].min sleep sleeptime
Use the rack object instantiated in HtmlMockup
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,6 @@ ActionController::Routing::Routes.draw do |map| - map.root :controller => 'home' + map.root :controller => 'problems', :action => 'new' map.resources :places, :controller => 'problems', :except => [:update, :edit],
Make place finding front page
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -45,6 +45,4 @@ match '/index.:format' => 'site#index' themes_for_rails - - match '/:controller(/:action(/:id))' end
Remove the Rails default route Fixes #19
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -9,6 +9,9 @@ as: :formatted_smart_answer, constraints: { format: /[a-zA-Z]+/ } - get '/:id(/:started(/*responses))', to: 'smart_answers#show', as: :smart_answer + get '/:id(/:started(/*responses))', + to: 'smart_answers#show', + as: :smart_answer, + format: false end end
Set smart_answer path route format to false. This brings back the default rails 3.x behaviour. The new one matches numbers in paths like /pension-amount/300.0 as format and throws an exception.
diff --git a/services/friend_feed.rb b/services/friend_feed.rb index abc1234..def5678 100644 --- a/services/friend_feed.rb +++ b/services/friend_feed.rb @@ -3,10 +3,12 @@ friendfeed_url = URI.parse("http://friendfeed.com/api/share") payload['commits'].each do |commit| - title = "#{commit['author']['name']} just pushed #{commit['id']} to #{repository} on GitHub" + title = "#{commit['author']['name']} just committed a change to #{repository} on GitHub" + comment = "#{commit['id']} - #{commit['message']}" + req = Net::HTTP::Post.new(friendfeed_url.path) req.basic_auth(data['nickname'], data['remotekey']) - req.set_form_data('title' => title, 'link' => commit['url'], 'comment' => commit['message']) + req.set_form_data('title' => title, 'link' => commit['url'], 'comment' => comment, 'via' => 'github') Net::HTTP.new(friendfeed_url.host, friendfeed_url.port).start { |http| http.request(req) } end
Reformat messaging for postcommit. Add 'via' parameter after approval from FriendFeed
diff --git a/app/controllers/socializer/circles_controller.rb b/app/controllers/socializer/circles_controller.rb index abc1234..def5678 100644 --- a/app/controllers/socializer/circles_controller.rb +++ b/app/controllers/socializer/circles_controller.rb @@ -1,5 +1,8 @@ module Socializer class CirclesController < ApplicationController + + before_filter :set_circle, only: [:show, :edit, :update, :destroy] + def index @circles = current_user.circles end @@ -17,7 +20,6 @@ end def show - @circle = current_user.circles.find(params[:id]) @users = Person.all end @@ -32,19 +34,23 @@ end def edit - @circle = current_user.circles.find(params[:id]) end def update - @circle = current_user.circles.find(params[:id]) @circle.update!(params[:circle]) redirect_to @circle end def destroy - @circle = current_user.circles.find(params[:id]) @circle.destroy redirect_to circles_contacts_path end + + private + + def set_circle + @circle = current_user.circles.find(params[:id]) + end + end end
Add before filter for CirclesController.
diff --git a/features/support/form_helpers.rb b/features/support/form_helpers.rb index abc1234..def5678 100644 --- a/features/support/form_helpers.rb +++ b/features/support/form_helpers.rb @@ -8,7 +8,7 @@ def fill_in_field(field_name, value) label_text = field_name.to_s.humanize - if page.first(:select, label_text) + if page.has_css?("select[text='#{label_text}']") select value, from: label_text else fill_in label_text, with: value
Use has_css? instead of first In older versions of Capybara, first would return nil but now it raises an exception.
diff --git a/db/migrate/20150618193748_create_skills.rb b/db/migrate/20150618193748_create_skills.rb index abc1234..def5678 100644 --- a/db/migrate/20150618193748_create_skills.rb +++ b/db/migrate/20150618193748_create_skills.rb @@ -2,7 +2,7 @@ def change create_table :skills do |t| t.string :title, null: false - t.integer :current_streak, default: 1 + t.integer :current_streak, default: 0 t.integer :longest_streak, default: 1 t.integer :expiration_time
Change default current_streak value in skills migration
diff --git a/test/test_legal_markdown_to_markdown.rb b/test/test_legal_markdown_to_markdown.rb index abc1234..def5678 100644 --- a/test/test_legal_markdown_to_markdown.rb +++ b/test/test_legal_markdown_to_markdown.rb @@ -29,11 +29,12 @@ end def destroy_temp ( temp_file ) - File.delete temp_file + File.delete temp_file if File::exists?(temp_file) end def test_files @lmdfiles.each do | lmd_file | + puts "Testing => #{lmd_file}" temp_file = create_temp benchmark_file = File.basename(lmd_file, ".lmd") + ".md" LegalToMarkdown.new( [ lmd_file, temp_file ] )
Add marker to show which file is being tested. Add gaurd if temp file disappears
diff --git a/prius.gemspec b/prius.gemspec index abc1234..def5678 100644 --- a/prius.gemspec +++ b/prius.gemspec @@ -21,6 +21,6 @@ spec.required_ruby_version = ">= 2.2" spec.add_development_dependency "rspec", "~> 3.1" - spec.add_development_dependency "rubocop", "~> 0.57.0" + spec.add_development_dependency "rubocop", "~> 0.58.1" spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.0" end
Update rubocop requirement to ~> 0.58.1 Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop-hq/rubocop/commits/v0.58.1) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
diff --git a/app/controllers/application.rb b/app/controllers/application.rb index abc1234..def5678 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -1,4 +1,10 @@ class ApplicationController < ActionController::Base + helper :all # include all helpers, all the time + + # See ActionController::RequestForgeryProtection for details + # Uncomment the :secret if you're not using the cookie session store + protect_from_forgery # :secret => 'a38aedd25d926734dde3ef15f505a98d' + include ExceptionLoggable helper :all
Update (all helpers, forgery protection) git-svn-id: 688d3875d79a464202b418543870f1890916b750@629 b1a0fcd8-281e-0410-b946-bf040eef99c3
diff --git a/lib/name_whisperer.rb b/lib/name_whisperer.rb index abc1234..def5678 100644 --- a/lib/name_whisperer.rb +++ b/lib/name_whisperer.rb @@ -27,7 +27,7 @@ Pathname.new(xcodeprojects[0]).basename.to_s else error_message = (xcodeprojects.length > 1) ? "found too many" : "couldn't find any" - puts "Hello there, we " + error_message + " xcodeprojects. Please give a name for this project." + puts "CocoaPods-Keys " + error_message + " xcodeprojects. Please give a name for this project." answer = "" loop do
[UI] Include name, so user knows what this is about.
diff --git a/ext/extconf.rb b/ext/extconf.rb index abc1234..def5678 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -16,6 +16,7 @@ f.write '#!/bin/sh' f.chmod f.stat.mode | 0111 end - File.open('rhodes_postinstallhack' + '.so', 'w') {} - File.open('rhodes_postinstallhack' + '.dll', 'w') {} - File.open('nmake.bat', 'w') { |f| } + File.open('rhodes_postinstallhack' + '.so', 'w') { |f| f.chmod 0777} + File.open('rhodes_postinstallhack' + '.dll', 'w') { |f| f.chmod 0777} + File.open('nmake.bat', 'w') { |f| f.write "ECHO \"Done\"" + f.chmod 0777}
Fix for windows 2k3 gem install.
diff --git a/lib/acfs/errors.rb b/lib/acfs/errors.rb index abc1234..def5678 100644 --- a/lib/acfs/errors.rb +++ b/lib/acfs/errors.rb @@ -12,6 +12,26 @@ def initialize(data = {}) self.response = data[:response] + message = '' + message << "Received erroneous response: #{response.code}" + if response.data + message << "\n with content:\n " + message << response.data.map{|k,v| "#{k.inspect}: #{v.inspect}"}.join("\n ") + end + if response.headers.any? + message << "\n with headers:\n " + message << response.headers.map{|k,v| "#{k}: #{v}"}.join("\n ") + end + message << "\nbased on request: #{response.request.method.upcase} #{response.request.url} #{response.request.format}" + if response.request.data + message << "\n with content:\n " + message << response.request.data.map{|k,v| "#{k.inspect}: #{v.inspect}"}.join("\n ") + end + if response.request.headers.any? + message << "\n with headers:\n " + message << response.request.headers.map{|k,v| "#{k}: #{v}"}.join("\n ") + end + super message end end
Expand erroneous response error message.
diff --git a/app/models/metrics/licenses.rb b/app/models/metrics/licenses.rb index abc1234..def5678 100644 --- a/app/models/metrics/licenses.rb +++ b/app/models/metrics/licenses.rb @@ -4,11 +4,18 @@ attr_reader :score + def license_valid?(id) + licenses = { "dl-de-by-1.0" => true } + licenses[id] + end + def initialize @score = 0.0 end def compute(record) + license = record[:license_id] + @score = 1.0 if license_valid?(license) end end
Add more code to the license metric Just started to write some code for the license metric. I will have to find a good way to consolidate different data licenses and on what terms it is open/valid and on what terms it is not. Signed-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>
diff --git a/lib/classloader.rb b/lib/classloader.rb index abc1234..def5678 100644 --- a/lib/classloader.rb +++ b/lib/classloader.rb @@ -13,7 +13,7 @@ def classes all_classes = [] - @files.values.each do |mod| + files.values.each do |mod| mod.constants.each do |const_name| const_value = mod.const_get const_name
Use reader instead of instance variable
diff --git a/lib/tok/controller.rb b/lib/tok/controller.rb index abc1234..def5678 100644 --- a/lib/tok/controller.rb +++ b/lib/tok/controller.rb @@ -22,6 +22,18 @@ request.headers["HTTP_AUTHORIZATION"] || params[:token] end + # Adopted from Devise, licensed under MIT. + # Copyrights 2009 - 2014 Plataformatec. + def secure_compare(a, b) + return false if a.blank? || b.blank? || a.bytesize != b.bytesize + + l = a.unpack "C#{a.bytesize}" + + res = 0 + b.each_byte { |byte| res |= byte ^ l.shift } + res == 0 + end + def resource Tok.configuration.resource.to_s end
Use Devise.secure_compare to prevent timing attacks
diff --git a/garage.gemspec b/garage.gemspec index abc1234..def5678 100644 --- a/garage.gemspec +++ b/garage.gemspec @@ -16,7 +16,7 @@ s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"] - s.add_dependency "rails", '>= 4.0.0' + s.add_dependency "rails", '>= 4.2.0' s.add_dependency "rack-accept-default", "~> 0.0.2" s.add_dependency "oj" s.add_dependency "responders"
Drop support for Rails 4.1
diff --git a/lib/keepr/group.rb b/lib/keepr/group.rb index abc1234..def5678 100644 --- a/lib/keepr/group.rb +++ b/lib/keepr/group.rb @@ -37,7 +37,9 @@ private def set_target_from_parent - self.target = parent.target if parent + self.class.unscoped do + self.target = parent.target if parent + end end def check_result_and_target
Fix warning in Rails 6
diff --git a/lib/prid/client.rb b/lib/prid/client.rb index abc1234..def5678 100644 --- a/lib/prid/client.rb +++ b/lib/prid/client.rb @@ -13,6 +13,7 @@ exit 1 end branch = `git branch 2> /dev/null | grep '^\*' | cut -b 3-` + branch.chomp! if branch.nil? || branch.empty? warn 'Are you on a git directory?' exit 1
Fix bug that branch contains new line code
diff --git a/lib/sloc/runner.rb b/lib/sloc/runner.rb index abc1234..def5678 100644 --- a/lib/sloc/runner.rb +++ b/lib/sloc/runner.rb @@ -19,7 +19,8 @@ end # TODO: formatted output - p report + require 'pp' + pp report nil end
Use pp for printing report prettier
diff --git a/app/controllers/forem/categories_controller.rb b/app/controllers/forem/categories_controller.rb index abc1234..def5678 100644 --- a/app/controllers/forem/categories_controller.rb +++ b/app/controllers/forem/categories_controller.rb @@ -1,5 +1,5 @@ module Forem - class CategoriesController < ApplicationController + class CategoriesController < Forem::ApplicationController load_and_authorize_resource def show
Make CategoriesController inherit from Forem::ApplicationController Fixes #186. The issue is caused because ApplicationController is loaded first, and so Forem doesn't go up the chain looking for another ApplicationController because one's already been loaded. By being explicit like this, we make sure that the right ApplicationController (Forem::ApplicationController) is loaded, rather than the wrong one (the ApplicationController from inside the application)
diff --git a/app/controllers/hive_mind_tv/api_controller.rb b/app/controllers/hive_mind_tv/api_controller.rb index abc1234..def5678 100644 --- a/app/controllers/hive_mind_tv/api_controller.rb +++ b/app/controllers/hive_mind_tv/api_controller.rb @@ -7,7 +7,10 @@ response = {} status = :ok - if device = Device.find(params[:device][:id]) + if ! params[:device][:id] + response = { error: 'Missing device id' } + status = :unprocessable_entity + elsif device = Device.find_by(id: params[:device][:id]) if device.plugin_type == 'HiveMindTv::Plugin' device.plugin.application = params[:device][:application] device.plugin.save
Handle missing or unknown device id
diff --git a/app/controllers/wat_catcher/catcher_of_wats.rb b/app/controllers/wat_catcher/catcher_of_wats.rb index abc1234..def5678 100644 --- a/app/controllers/wat_catcher/catcher_of_wats.rb +++ b/app/controllers/wat_catcher/catcher_of_wats.rb @@ -5,7 +5,7 @@ extend ActiveSupport::Concern included do - around_filter :catch_wats + around_action :catch_wats helper_method :wat_user end @@ -15,11 +15,11 @@ end def disable_wat_report - env["wat_report_disabled"] = true + request.env["wat_report_disabled"] = true end def report_wat? - !!(env["wat_report"].present? && !env["wat_report_disabled"]) + !!(request.env["wat_report"].present? && !request.env["wat_report_disabled"]) end def catch_wats(&block) @@ -29,7 +29,7 @@ begin user = wat_user rescue;end - env["wat_report"] = { + request.env["wat_report"] = { request: request, user: user }
Fix Rails 5 deprecation warnings To fix "DEPRECATION WARNING: env is deprecated and will be removed from Rails 5.1" I replaced calls to 'env' with 'request.env' in CatcherOfWats per https://github.com/rails/rails/issues/23294. To fix "DEPRECATION WARNING: around_filter is deprecated and will be removed in Rails 5.1. Use around_action instead." I replaced 'around_filter' with 'around_action' in CatcherOfWats.
diff --git a/sassy.gemspec b/sassy.gemspec index abc1234..def5678 100644 --- a/sassy.gemspec +++ b/sassy.gemspec @@ -19,7 +19,8 @@ spec.require_paths = ["lib"] spec.add_runtime_dependency "builder", "~> 3.0.4" - spec.add_runtime_dependency "debugger" + spec.add_development_dependency "debugger" + spec.add_development_dependency "test-unit" spec.add_development_dependency "rspec", "~> 2.12" spec.add_development_dependency "guard", "~> 1.8.0" spec.add_development_dependency "guard-rspec"
Change debugger to dev + add test-unit
diff --git a/app/controllers/pawoo/api/v1/followers_you_follow_controller.rb b/app/controllers/pawoo/api/v1/followers_you_follow_controller.rb index abc1234..def5678 100644 --- a/app/controllers/pawoo/api/v1/followers_you_follow_controller.rb +++ b/app/controllers/pawoo/api/v1/followers_you_follow_controller.rb @@ -8,7 +8,8 @@ def show target_account = Account.find(params[:account_id]) current_account_id = current_account.id - return render json: [] if target_account.id == current_account_id + return render json: [] if target_account.id == current_account_id || target_account.user_hides_network? + target_followers = Follow.where(target_account_id: target_account.id).select(:account_id) @followers_you_follow = Follow.where(account_id: current_account_id, target_account_id: target_followers).preload(target_account: :oauth_authentications).limit(30) render json: @followers_you_follow.map(&:target_account), each_serializer: REST::AccountSerializer
Hide follower you follow when hides_network is enable
diff --git a/spec/factories/users.rb b/spec/factories/users.rb index abc1234..def5678 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -34,16 +34,5 @@ password 'password' password_confirmation 'password' confirmed_at Time.zone.today - - # profile settings - name { Faker::Name.name } - bio { Faker::Lorem.sentence 3, true, 12 } - work_company { Faker::Company.name } - work_title { Faker::Name.title } - location { Faker::Address.city } - - trait :charitable do - charitable true - end end end
Remove profile attributes from user factory and re annotate
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/projects/pipelines_controller_spec.rb +++ b/spec/controllers/projects/pipelines_controller_spec.rb @@ -5,13 +5,33 @@ let(:user) { create(:user) } let(:project) { create(:empty_project, :public) } - let(:pipeline) { create(:ci_pipeline, project: project) } before do sign_in(user) end + describe 'GET index.json' do + before do + create_list(:ci_empty_pipeline, 2, project: project) + + get :index, namespace_id: project.namespace.path, + project_id: project.path, + format: :json + end + + it 'returns JSON with serialized pipelines' do + expect(response).to have_http_status(:ok) + + expect(json_response).to include('pipelines') + expect(json_response['pipelines'].count).to eq 2 + expect(json_response['count']['all']).to eq 2 + expect(json_response['count']['running_or_pending']).to eq 2 + end + end + describe 'GET stages.json' do + let(:pipeline) { create(:ci_pipeline, project: project) } + context 'when accessing existing stage' do before do create(:ci_build, pipeline: pipeline, stage: 'build')
Add controller specs for pipeline index API endpoint [ci skip]
diff --git a/lib/aws-record/record/version.rb b/lib/aws-record/record/version.rb index abc1234..def5678 100644 --- a/lib/aws-record/record/version.rb +++ b/lib/aws-record/record/version.rb @@ -13,6 +13,6 @@ module Aws module Record - VERSION = "1.0.0.pre.4" + VERSION = '1.0.0.pre.4' end end
Use Single Quotes for Version Has to do with the release scripts.
diff --git a/lib/ember/appkit/rails/engine.rb b/lib/ember/appkit/rails/engine.rb index abc1234..def5678 100644 --- a/lib/ember/appkit/rails/engine.rb +++ b/lib/ember/appkit/rails/engine.rb @@ -3,7 +3,7 @@ config.ember_appkit.namespace = 'appkit' config.ember_appkit.asset_path = config.ember_appkit.namespace - config.ember_appkit.prefix_pattern = /^(controllers|models|views|helpers|routes|router|adapter)/ + config.ember_appkit.prefix_pattern = /^(controllers|components|models|views|helpers|routes|router|adapter)/ config.ember_appkit.enable_logging = ::Rails.env.development?
Add to default prefix pattern.
diff --git a/lib/rails_admin_approve_event.rb b/lib/rails_admin_approve_event.rb index abc1234..def5678 100644 --- a/lib/rails_admin_approve_event.rb +++ b/lib/rails_admin_approve_event.rb @@ -10,7 +10,18 @@ module Actions class ApproveEvent < Base RailsAdmin::Config::Actions.register(self) - + + register_instance_option :link_icon do + 'icon-check' + end + register_instance_option :visible? do + authorized? && bindings[:object].class == Evenement + end + + register_instance_option :member? do + true + end + register_instance_option :object_level do true end
Add a cusom icon & activate the button only for members.
diff --git a/gems.rb b/gems.rb index abc1234..def5678 100644 --- a/gems.rb +++ b/gems.rb @@ -3,8 +3,58 @@ global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first $LOAD_PATH.concat(Dir.glob("#{global_gemset}/gems/*/lib")) if global_gemset -end +end; nil require 'awesome_print' require 'pry' require 'pry-byebug' +require 'httplog' + +HttpLog.configure do |config| + # Enable or disable all logging + config.enabled = true + + # You can assign a different logger or method to call on that logger + config.logger = Logger.new($stdout) + config.logger_method = :log + + # I really wouldn't change this... + config.severity = Logger::Severity::DEBUG + + # Tweak which parts of the HTTP cycle to log... + config.log_connect = true + config.log_request = true + config.log_headers = false + config.log_data = true + config.log_status = true + config.log_response = true + config.log_benchmark = true + + # ...or log all request as a single line by setting this to `true` + config.compact_log = false + + # You can also log in JSON format + config.json_log = false + + # Prettify the output - see below + config.color = :cyan + + # Limit logging based on URL patterns + config.url_whitelist_pattern = nil + config.url_blacklist_pattern = nil + + # Mask the values of sensitive requestparameters + config.filter_parameters = %w[password] +end + +def enable_http_logging(settings={}) + HttpLog.config.enabled = true + + settings.each do |k,v| + HttpLog.config.send("#{k}=".to_sym, v) + end +end + +def disable_http_logging + HttpLog.config.enabled = false +end
Add HttpLog gem and configuration.