diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/geoscript/geom/multipoint.rb b/lib/geoscript/geom/multipoint.rb index abc1234..def5678 100644 --- a/lib/geoscript/geom/multipoint.rb +++ b/lib/geoscript/geom/multipoint.rb @@ -8,25 +8,30 @@ attr_accessor :bounds def initialize(*points) - feature_points = [] - - if points.first.kind_of? JTSMultiPoint - mp_geom = points.first - - for i in (0...mp_geom.num_geometries) - feature_points << mp_geom.get_geometry_n(i) - end - else - points.each do |point| - if point.kind_of? Point - feature_points << point - else - feature_points << Point.new(*point) + feature_points = + if points.first.kind_of? JTSMultiPoint + points.first.points + else + [].tap do |fp| + points.each do |point| + fp << (point.kind_of?(Point) ? point : Point.new(*point)) + end end end - end super(feature_points.to_java(com.vividsolutions.jts.geom.Point), GEOM_FACTORY) + end + + def points + [].tap do |geometries| + for i in 0...self.num_geometries do + geometries << self.geometry_n(i) + end + end + end + + def <<(*new_points) + MultiPoint.new *(points << new_points) end def buffer(dist)
Add n points to MultiPoint with << operator
diff --git a/lib/html/proofer/check_runner.rb b/lib/html/proofer/check_runner.rb index abc1234..def5678 100644 --- a/lib/html/proofer/check_runner.rb +++ b/lib/html/proofer/check_runner.rb @@ -1,56 +1,56 @@ # encoding: utf-8 -class HTML::Proofer +module HTML + class Proofer + # Mostly handles issue management and collecting of external URLs. + class CheckRunner - # Mostly handles issue management and collecting of external URLs. - class CheckRunner + attr_reader :issues, :src, :path, :options, :external_urls, :href_ignores, :alt_ignores - attr_reader :issues, :src, :path, :options, :external_urls, :href_ignores, :alt_ignores + def initialize(src, path, html, opts={}) + @src = src + @path = path + @html = remove_ignored(html) + @options = opts + @issues = [] + @href_ignores = @options[:href_ignore] + @alt_ignores = @options[:alt_ignore] + @external_urls = {} + end - def initialize(src, path, html, opts={}) - @src = src - @path = path - @html = remove_ignored(html) - @options = opts - @issues = [] - @href_ignores = @options[:href_ignore] - @alt_ignores = @options[:alt_ignore] - @external_urls = {} - end + def run + fail NotImplementedError, 'HTML::Proofer::CheckRunner subclasses must implement #run' + end - def run - fail NotImplementedError, 'HTML::Proofer::CheckRunner subclasses must implement #run' - end + def add_issue(desc, line_number = nil, status = -1) + @issues << Issue.new(@path, desc, line_number, status) + end - def add_issue(desc, line_number = nil, status = -1) - @issues << Issue.new(@path, desc, line_number, status) - end + def add_to_external_urls(href) + if @external_urls[href] + @external_urls[href] << @path + else + @external_urls[href] = [@path] + end + end - def add_to_external_urls(href) - if @external_urls[href] - @external_urls[href] << @path - else - @external_urls[href] = [@path] + def self.checks + classes = [] + + ObjectSpace.each_object(Class) do |c| + next unless c.superclass == self + classes << c + end + + classes + end + + private + + def remove_ignored(html) + html.css('code, pre').each(&:unlink) + html end end - - def self.checks - classes = [] - - ObjectSpace.each_object(Class) do |c| - next unless c.superclass == self - classes << c - end - - classes - end - - private - - def remove_ignored(html) - html.css('code, pre').each(&:unlink) - html - end - end end
Fix class definition for CheckRunner Resolves https://github.com/gjtorikian/html-proofer/issues/157
diff --git a/lib/juvia_rails/configuration.rb b/lib/juvia_rails/configuration.rb index abc1234..def5678 100644 --- a/lib/juvia_rails/configuration.rb +++ b/lib/juvia_rails/configuration.rb @@ -1,12 +1,13 @@ module JuviaRails class Configuration - attr_accessor :site_key, :comment_order, :server_url + attr_accessor :site_key, :comment_order, :server_url, :include_css def initialize @site_key = nil @server_url = nil @comment_order = 'latest-first' + @include_css = nil end end end
Add include_css option to config
diff --git a/Livefyre.podspec b/Livefyre.podspec index abc1234..def5678 100644 --- a/Livefyre.podspec +++ b/Livefyre.podspec @@ -24,5 +24,6 @@ s.requires_arc = true s.dependency 'ASIHTTPRequest', '~> 1.8' - s.dependency 'JSONKit', '~> 1.4' + s.dependency 'JSONKit', '1.5pre' + s.dependency 'BlocksKit', '~> 1.0.6' end
Add BlocksKit to the podspec
diff --git a/lib/puppet/type/shared/target.rb b/lib/puppet/type/shared/target.rb index abc1234..def5678 100644 --- a/lib/puppet/type/shared/target.rb +++ b/lib/puppet/type/shared/target.rb @@ -10,6 +10,7 @@ end def insync?(is) + is = [] if is == :absent or is.nil? is.sort == should.sort end
Fix "undefined method `sort' for :absent:Symbol" This was a problem when managing datasources that had become untargetted. Fixes https://github.com/biemond/biemond-orawls/issues/212 Fix as suggested by Bert Hajee https://github.com/hajee
diff --git a/lib/sinatra/assetpack/builder.rb b/lib/sinatra/assetpack/builder.rb index abc1234..def5678 100644 --- a/lib/sinatra/assetpack/builder.rb +++ b/lib/sinatra/assetpack/builder.rb @@ -4,9 +4,9 @@ def build!(&blk) packages.each { |_, pack| build_package!(pack, &blk) } - unless ENV['RACK_ENV'] == 'production' && - defined?(@app.production_packages_only) && - @app.production_packages_only + unless @app.settings.environment == :production && + defined?(@app.settings.production_packages_only) && + @app.settings.production_packages_only files.each { |path, local| build_file!(path, local, &blk) } end end
Use @app.settings for env and new setting
diff --git a/lib/yacl/define/cli/options.rb b/lib/yacl/define/cli/options.rb index abc1234..def5678 100644 --- a/lib/yacl/define/cli/options.rb +++ b/lib/yacl/define/cli/options.rb @@ -1,6 +1,6 @@ module Yacl::Define::Cli - Option = Struct.new( :property_name, :long, :short, :description ) + Option = Struct.new( :property_name, :long, :short, :description, :cast) class Options < ::Yacl::Loader @@ -11,7 +11,8 @@ # Public def self.opt(name, p = {} ) - opt_list << Option.new( name, p[:long], p[:short], p[:description ] ) + opt_list << Option.new( name, p[:long], p[:short], p[:description ], p[:cast] ) + end end # Public @@ -28,7 +29,10 @@ hash.each do |k,v| self.class.opt_list.each do |option| if option.long == k then - prop_hash[option.property_name] = v + if (option.cast == :boolean) or v then + prop_hash[option.property_name] = v + else + end end end end
Add command line type casting
diff --git a/app/jobs/test_job.rb b/app/jobs/test_job.rb index abc1234..def5678 100644 --- a/app/jobs/test_job.rb +++ b/app/jobs/test_job.rb @@ -7,7 +7,7 @@ fail end - reply_to_slack(url, "Received #{str}") + reply_to_slack(url, "Received '#{str}'") Rails.logger.info("Ran Resque test.") end
Add string quotes in rescque test reply
diff --git a/spec/active_job_status_spec.rb b/spec/active_job_status_spec.rb index abc1234..def5678 100644 --- a/spec/active_job_status_spec.rb +++ b/spec/active_job_status_spec.rb @@ -1,19 +1,19 @@ require "spec_helper" describe ActiveJobStatus do - describe '.store' do - it 'raises error when store has not set' do + describe ".store" do + it "raises error when store has not set" do expect { ActiveJobStatus.store }.to raise_error(ActiveJobStatus::NoStoreError) end - context 'when store has set' do + context "when store has set" do let(:store) { new_store } before do ActiveJobStatus.store = store end - it 'returns configured store' do + it "returns configured store" do expect { ActiveJobStatus.store }.to_not raise_error expect(ActiveJobStatus.store).to eq store end
Use double quote instead of single
diff --git a/spec/defines/unit_file_spec.rb b/spec/defines/unit_file_spec.rb index abc1234..def5678 100644 --- a/spec/defines/unit_file_spec.rb +++ b/spec/defines/unit_file_spec.rb @@ -31,6 +31,24 @@ }.to raise_error(/expects a match for Systemd::Unit/) } end + + context 'with enable => true and active => true' do + let(:params) do + super().merge({ + :enable => true, + :active => true + }) + end + + it { is_expected.to contain_service('test.service').with( + :ensure => true, + :enable => true, + :provider => 'systemd' + ) } + + it { is_expected.to contain_service('test.service').that_subscribes_to("File[/etc/systemd/system/#{title}]") } + it { is_expected.to contain_service('test.service').that_requires('Class[systemd::systemctl::daemon_reload]') } + end end end end
Add test context for unit_file enable and active params
diff --git a/lib/powerschool.rb b/lib/powerschool.rb index abc1234..def5678 100644 --- a/lib/powerschool.rb +++ b/lib/powerschool.rb @@ -23,6 +23,24 @@ end end + def all(resource, options = {}, &block) + _options = options.dup + _options[:query] ||= {} + page = 1 + results = [] + begin + _options[:query][:page] = page + response = self.send(resource, _options) + results = response.parsed_response + plural = results.keys.first + results = results[plural][plural.singularize] || [] + results.each do |result| + block.call(result, response) + end + page += 1 + end while results.any? + end + # client is set up per district so it returns only one district # for urls with parameters get :district, '/district' @@ -30,6 +48,7 @@ get :teachers, '/staff' get :students, '/student' get :sections, '/section' + get :school_teachers, '/school/:school_id/staff' get :school_sections, '/school/:school_id/section' get :school_students, '/school/:school_id/student'
Add Powerschool.all to allow for easier processing of data
diff --git a/sync_version.rb b/sync_version.rb index abc1234..def5678 100644 --- a/sync_version.rb +++ b/sync_version.rb @@ -0,0 +1,26 @@+#!/usr/bin/env ruby + +plist_path = File.absolute_path("RileyLink/RileyLink-Info.plist") + +canonical_version = `defaults read #{plist_path} CFBundleShortVersionString`.chomp + +bundle_version = `defaults read #{plist_path} CFBundleVersion`.chomp +if bundle_version != canonical_version + puts "Updating CFBundleVersion to #{canonical_version}" + `defaults write #{plist_path} CFBundleVersion -string "#{canonical_version}"` +end + +podspec_text = File.open("RileyLink.podspec",:encoding => "UTF-8").read + +match_data = podspec_text.match(/s.version.*=.*\"([\d\.]*)\"/) + +if match_data + podspec_version = match_data[1] + if podspec_version != canonical_version + puts "Updating version in RileyLink.podspec to #{canonical_version}" + `sed -i -e 's/s\.version.*=.*$/s.version = \"#{canonical_version}\"/' RileyLink.podspec` + end +else + puts "Could not find s.version in podspec!" + exit -1 +end
Modify CFBundleVersion and podspec version based on CFBundleShortVersionString
diff --git a/lib/graph/graph.rb b/lib/graph/graph.rb index abc1234..def5678 100644 --- a/lib/graph/graph.rb +++ b/lib/graph/graph.rb @@ -12,10 +12,12 @@ @nodes = [] # empty list of nodes end + # add a node to the graph with the given value def add(value) @nodes << Node.new(value) end + # add the given node to the graph def add_node(node) @nodes << node end
Update the documentation for the add and add_node methods.
diff --git a/ackr.gemspec b/ackr.gemspec index abc1234..def5678 100644 --- a/ackr.gemspec +++ b/ackr.gemspec @@ -8,7 +8,7 @@ s.authors = ['Xavier Nayrac'] s.email = 'xavier.nayrac@gmail.com' s.summary = 'Ackr is a very light grep/ack/rak replacement for lazy developers.' - s.homepage = '' + s.homepage = 'https://github.com/lkdjiin/ackr' s.description = %q{Ackr is a very light grep/ack/rak replacement for lazy developers.} readmes = FileList.new('*') do |list|
Add home page to gemspec
diff --git a/magic_grid.gemspec b/magic_grid.gemspec index abc1234..def5678 100644 --- a/magic_grid.gemspec +++ b/magic_grid.gemspec @@ -17,7 +17,7 @@ s.files = Dir["lib/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"] s.test_files = Dir["{spec,test}/**/*"] - Dir["test/dummy/tmp/**/*", "test/dummy/db/*.sqlite3", "test/dummy/log/*.log"] - s.add_dependency "rails", ">= 3.0" + s.add_dependency "rails", ">= 3.1" s.add_dependency "jquery-rails" , ">= 1.0.17" s.add_development_dependency "rake", "~> 0.9.2"
Drop Rails 3.0 from gemspec, it doesn't work [ci skip]
diff --git a/spec/acceptance/support/javascript.rb b/spec/acceptance/support/javascript.rb index abc1234..def5678 100644 --- a/spec/acceptance/support/javascript.rb +++ b/spec/acceptance/support/javascript.rb @@ -1,8 +1,4 @@ RSpec.configure do |config| - Capybara.register_driver :selenium do |app| - Capybara::Driver::Selenium.new(app, :browser => :chrome) - end - config.before(:each) do Capybara.current_driver = :selenium if example.metadata[:js] end
Revert "Uso de Chrome en vez de Firefox." Razón: el autocompletado no funciona en los tests de Chrome (pero sí en la práctica). No sé por qué. This reverts commit 4b5007eece4cc61a5f8dec2fca2cdd3c497e5f47.
diff --git a/Library/Homebrew/utils/fork.rb b/Library/Homebrew/utils/fork.rb index abc1234..def5678 100644 --- a/Library/Homebrew/utils/fork.rb +++ b/Library/Homebrew/utils/fork.rb @@ -3,42 +3,42 @@ module Utils def self.safe_fork(&block) - socket_path = "#{Dir.mktmpdir("homebrew", HOMEBREW_TEMP)}/socket" - server = UNIXServer.new(socket_path) - ENV["HOMEBREW_ERROR_PIPE"] = socket_path - read, write = IO.pipe + Dir.mktmpdir("homebrew", HOMEBREW_TEMP) do |tmpdir| + UNIXServer.open("#{tmpdir}/socket") do |server| + read, write = IO.pipe - pid = fork do - begin - server.close - read.close - write.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) - yield - rescue Exception => e - Marshal.dump(e, write) - write.close - exit! 1 + pid = fork do + ENV["HOMEBREW_ERROR_PIPE"] = server.path + + begin + server.close + read.close + write.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) + yield + rescue Exception => e + Marshal.dump(e, write) + write.close + exit! 1 + end + end + + ignore_interrupts(:quietly) do # the child will receive the interrupt and marshal it back + begin + socket = server.accept_nonblock + rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR + retry unless Process.waitpid(pid, Process::WNOHANG) + else + socket.send_io(write) + end + write.close + data = read.read + read.close + Process.wait(pid) unless socket.nil? + raise Marshal.load(data) unless data.nil? or data.empty? + raise Interrupt if $?.exitstatus == 130 + raise "Suspicious failure" unless $?.success? + end end end - - ignore_interrupts(:quietly) do # the child will receive the interrupt and marshal it back - begin - socket = server.accept_nonblock - rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR - retry unless Process.waitpid(pid, Process::WNOHANG) - else - socket.send_io(write) - end - write.close - data = read.read - read.close - Process.wait(pid) unless socket.nil? - raise Marshal.load(data) unless data.nil? or data.empty? - raise Interrupt if $?.exitstatus == 130 - raise "Suspicious failure" unless $?.success? - end - ensure - server.close - FileUtils.rm_r File.dirname(socket_path) end end
Clean up socket and filesystem resources separately
diff --git a/spec/unit/parse_error_builder_spec.rb b/spec/unit/parse_error_builder_spec.rb index abc1234..def5678 100644 --- a/spec/unit/parse_error_builder_spec.rb +++ b/spec/unit/parse_error_builder_spec.rb @@ -0,0 +1,78 @@+require "spec_helper" + +describe Whittle::ParseErrorBuilder do + let(:context) do + { + :input => "one two three four five\nsix seven eight nine ten\neleven twelve" + } + end + + let(:state) do + { + "gazillion" => { :action => :shift, :state => 7 } + } + end + + context "given an error region in the middle of a line" do + let(:token) do + { + :name => "eight", + :value => "eight", + :offset => 34 + } + end + + let(:indicator) do + Regexp.escape( + "six seven eight nine ten\n" << + " ... ^ ..." + ) + end + + it "indicates the exact region" do + Whittle::ParseErrorBuilder.exception(state, token, context).message.should =~ /#{indicator}/ + end + end + + context "given an error region near the start of a line" do + let(:token) do + { + :name => "two", + :value => "two", + :offset => 4 + } + end + + let(:indicator) do + Regexp.escape( + "one two three four five\n" << + " ^ ..." + ) + end + + it "indicates the exact region" do + Whittle::ParseErrorBuilder.exception(state, token, context).message.should =~ /#{indicator}/ + end + end + + context "given an error region near the end of a line" do + let(:token) do + { + :name => "five", + :value => "five", + :offset => 19 + } + end + + let(:indicator) do + Regexp.escape( + "one two three four five\n" << + " ... ^ ..." + ) + end + + it "indicates the exact region" do + Whittle::ParseErrorBuilder.exception(state, token, context).message.should =~ /#{indicator}/ + end + end +end
Add spec for the ParseErrorBuilder, since it's not as trivial as it could be
diff --git a/bin/lexer.rb b/bin/lexer.rb index abc1234..def5678 100644 --- a/bin/lexer.rb +++ b/bin/lexer.rb @@ -1,5 +1,7 @@ require_relative '../lib/lexer' File.open(ARGV[0]) do |f| - puts Lexer.new(f).get_tokens(); + Lexer.new(f).get_tokens()[0].map do |token| + puts token.class.name[7..-1] + ", " + token[0] + end; end
Change runner to output in the required format
diff --git a/config/application.rb b/config/application.rb index abc1234..def5678 100644 --- a/config/application.rb +++ b/config/application.rb @@ -16,6 +16,7 @@ config.log_formatter = PrettyFormatter.formatter + Rails.application.config.assets.precompile += ["crowdblog.css", "crowdblog.js"] require "#{Rails.root}/config/initializers/community.rb" end end
Add crowdblog files to the assets pipeline
diff --git a/lib/generators/devise_jwt/install_generator.rb b/lib/generators/devise_jwt/install_generator.rb index abc1234..def5678 100644 --- a/lib/generators/devise_jwt/install_generator.rb +++ b/lib/generators/devise_jwt/install_generator.rb @@ -8,23 +8,11 @@ argument :resource_class, type: :string, default: 'User' def create_initializer_file - copy_file 'devise_jwt.rb', 'config/initializers/devise_jwt.rb' - end - - def copy_initializer_file - # TODO + copy_file 'initializers/devise_jwt.rb', 'config/initializers/devise_jwt.rb' end def copy_locale copy_file '../../../../config/locales/en.yml', 'config/locales/devise_jwt.en.yml' end - - # def copy_migrations - # # TODO - # end - # - # def create_user_model - # # TODO - # end end end
Fix incorrect path to initializer devise_jwt.rb file.
diff --git a/lib/ops_manager/director_template_generator.rb b/lib/ops_manager/director_template_generator.rb index abc1234..def5678 100644 --- a/lib/ops_manager/director_template_generator.rb +++ b/lib/ops_manager/director_template_generator.rb @@ -7,9 +7,9 @@ installation_settings.delete(property_name) end - %w{ director_ssl uaa_ssl uaa_credentials uaa_admin_user_credentials + %w{ director_ssl uaa_ssl credhub_ssl uaa_credentials uaa_admin_user_credentials uaa_admin_client_credentials }.each do |property_name| - product_template["products"][1].delete(property_name) + product_template["products"].select {|p| p["identifier"] == "p-bosh"}.first.delete(property_name) end add_merging_strategy_for_networks
Fix finding the bosh properties Signed-off-by: Lukasz Rabczak <410ccb199b8ef86485fb66a15c6c1c20637585b5@gmail.com>
diff --git a/xcprofiler.gemspec b/xcprofiler.gemspec index abc1234..def5678 100644 --- a/xcprofiler.gemspec +++ b/xcprofiler.gemspec @@ -17,7 +17,7 @@ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_development_dependency "bundler", "~> 1.6" + spec.add_development_dependency "bundler", "~> 2.0" spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "rspec" spec.add_development_dependency "coveralls"
Update bundler in gemspec to fix tests
diff --git a/alephant-harness.gemspec b/alephant-harness.gemspec index abc1234..def5678 100644 --- a/alephant-harness.gemspec +++ b/alephant-harness.gemspec @@ -18,7 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_runtime_dependency "aws-sdk" + spec.add_runtime_dependency "aws-sdk", "~> 1.0" spec.add_development_dependency "bundler", "~> 1.6" spec.add_development_dependency "rake"
Fix aws-sdk to version 1
diff --git a/opal/corelib/io.rb b/opal/corelib/io.rb index abc1234..def5678 100644 --- a/opal/corelib/io.rb +++ b/opal/corelib/io.rb @@ -13,7 +13,6 @@ module Writable def <<(string) write(string) - self end @@ -52,8 +51,9 @@ STDIN = $stdin = IO.new STDOUT = $stdout = IO.new -$stdout.write_proc = -> (string) {`console.log(#{string.to_s});`} -$stderr.write_proc = -> (string) {`console.warn(#{string.to_s});`} + +$stdout.write_proc = `typeof(process) === 'object' ? function(s){process.stdout.write(s)} : function(s){console.log(s)}` +$stderr.write_proc = `typeof(process) === 'object' ? function(s){process.stderr.write(s)} : function(s){console.warn(s)}` $stdout.extend(IO::Writable) $stderr.extend(IO::Writable)
Support nodejs in corelib if available
diff --git a/lib/test_api.rb b/lib/test_api.rb index abc1234..def5678 100644 --- a/lib/test_api.rb +++ b/lib/test_api.rb @@ -16,4 +16,13 @@ @test_helper.save_screenshot @driver, "#{@screenshot_name}#{suffix}.png", @int_url, @browser @screenshots_count += 1 end + + def click_button(css_selector) + case @browser + when :iPad + @driver.execute_script "$('#{css_selector}').click();" + else + $test.driver.find_element(:css, css_selector).click + end + end end
Add click_button helper method to TestAPI [#69469480] Special case for iPad (using jQuery).
diff --git a/config/initializers/messenger.rb b/config/initializers/messenger.rb index abc1234..def5678 100644 --- a/config/initializers/messenger.rb +++ b/config/initializers/messenger.rb @@ -1,7 +1,7 @@ require 'active_record_ext' require 'messenger' -if Rails.env.test? +if Rails.env.test? or ENV['NO_MESSENGER'].present? Messenger.transport = Marples::NullTransport.instance ActiveRecord::Base.marples_transport = Marples::NullTransport.instance else
Support NO_MESSENGER environment variable to allow running without stomp connection
diff --git a/carrierwave-truevault.gemspec b/carrierwave-truevault.gemspec index abc1234..def5678 100644 --- a/carrierwave-truevault.gemspec +++ b/carrierwave-truevault.gemspec @@ -19,7 +19,7 @@ spec.require_paths = ['lib'] spec.add_dependency 'carrierwave' - spec.add_dependency 'rest_client' + spec.add_dependency 'rest-client' spec.add_development_dependency 'bundler', '~> 1.7' spec.add_development_dependency 'rake', '~> 10.0'
Remove deprecation warning for rest-client dependency
diff --git a/Casks/idisplay.rb b/Casks/idisplay.rb index abc1234..def5678 100644 --- a/Casks/idisplay.rb +++ b/Casks/idisplay.rb @@ -1,9 +1,17 @@ cask :v1 => 'idisplay' do - version '2.3.10' - sha256 '6d87e0566e2e2693d89c4fdb1cddcfed9db6316f6f7b2bada24104ea18b996ae' - # shape.ag is the official download host per the vendor homepage - url "http://www.shape.ag/freedownload/iDisplay/iDisplayFull_#{version.gsub('.', '_')}.dmg" + if MacOS.release <= :leopard + version '1.1.12' + sha256 'ea0f9dd2c488762169c0bab2218ee628b6eff658a814dfca583e4563b99b7c6c' + # shape.ag is the official download host per the vendor homepage + url 'http://www.shape.ag/freedownload/iDisplay/iDisplay.dmg' + else + version '2.3.10' + sha256 '6d87e0566e2e2693d89c4fdb1cddcfed9db6316f6f7b2bada24104ea18b996ae' + # shape.ag is the official download host per the vendor homepage + url "http://www.shape.ag/freedownload/iDisplay/iDisplayFull_#{version.gsub('.', '_')}.dmg" + end + name 'iDisplay' homepage 'http://getidisplay.com/' license :gratis
Include legacy version for iDisplay.app
diff --git a/spec/lockfile_preserver_spec.rb b/spec/lockfile_preserver_spec.rb index abc1234..def5678 100644 --- a/spec/lockfile_preserver_spec.rb +++ b/spec/lockfile_preserver_spec.rb @@ -1,5 +1,3 @@-require "spec_helper" - RSpec.describe LockfilePreserver do it "has a version number" do expect(LockfilePreserver::VERSION).not_to be nil
Remove a unnecessary require spec_helper line
diff --git a/Analysis.podspec b/Analysis.podspec index abc1234..def5678 100644 --- a/Analysis.podspec +++ b/Analysis.podspec @@ -14,6 +14,7 @@ s.social_media_url = "https://twitter.com/basthomas" s.ios.deployment_target = "8.0" + s.swift_version = "4.2" s.source_files = "Analysis/Classes/**/*"
Add explicit Swift version to podspec
diff --git a/lib/chewy/stash.rb b/lib/chewy/stash.rb index abc1234..def5678 100644 --- a/lib/chewy/stash.rb +++ b/lib/chewy/stash.rb @@ -8,7 +8,7 @@ index_name 'chewy_stash' define_type :specification do - field :value, type: 'string', index: 'not_analyzed' + field :value, index: 'no' end end end
Make Stash::Specification work with variable default type
diff --git a/cookbooks/myapp/recipes/linux.rb b/cookbooks/myapp/recipes/linux.rb index abc1234..def5678 100644 --- a/cookbooks/myapp/recipes/linux.rb +++ b/cookbooks/myapp/recipes/linux.rb @@ -1,4 +1,4 @@ # Use a Linux image vagrant_box 'precise64' do - url 'http://files.vagrantup.com/precise32.box' + url 'http://files.vagrantup.com/precise64.box' end
Fix box URL for precise64
diff --git a/overcommit.gemspec b/overcommit.gemspec index abc1234..def5678 100644 --- a/overcommit.gemspec +++ b/overcommit.gemspec @@ -7,8 +7,8 @@ s.license = 'MIT' s.summary = 'Git hook manager' s.description = 'Utility to install, configure, and extend Git hooks' - s.authors = ['Causes Engineering'] - s.email = 'eng@causes.com' + s.authors = ['Causes Engineering', 'Shane da Silva'] + s.email = ['eng@causes.com', 'shane@causes.com'] s.homepage = 'http://github.com/causes/overcommit' s.post_install_message = 'Install hooks by running `overcommit --install` in your Git repository'
Update gem authors and emails I've put a hefty amount of work into this project, and I don't think anyone's going to mind me mentioning that. Change-Id: Ifc07bac3e7fbf1168a6fde2272ac27d43ca808c4 Reviewed-on: http://gerrit.causes.com/35617 Reviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a402f33d@causes.com> Tested-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a402f33d@causes.com>
diff --git a/lib/extra_tasks.rb b/lib/extra_tasks.rb index abc1234..def5678 100644 --- a/lib/extra_tasks.rb +++ b/lib/extra_tasks.rb @@ -4,7 +4,7 @@ begin # If a rake task is ran from the parent applicatiom, all Rails rasks are # already loaded. - # But if rails {s/v} is ran from the parent application, then tasks are not + # But if `rails {s|c}` is ran from the parent application, then tasks are not # loaded Rake::Task['db:migrate'] rescue RuntimeError
Fix typo : rails v is not a command
diff --git a/lib/gems_parser.rb b/lib/gems_parser.rb index abc1234..def5678 100644 --- a/lib/gems_parser.rb +++ b/lib/gems_parser.rb @@ -29,6 +29,10 @@ end def td_agent_2? - (ENV['BUILD_TD_AGENT_VERSION'] || 3).to_i == 2 + !td_agent_3? + end + + def td_agent_3? + (ENV['BUILD_TD_AGENT_VERSION'] || 3).to_s == '3' end end
Support td-agent 2.5 for gem parser
diff --git a/lib/graph/graph.rb b/lib/graph/graph.rb index abc1234..def5678 100644 --- a/lib/graph/graph.rb +++ b/lib/graph/graph.rb @@ -10,6 +10,10 @@ def initialize(name) @name = name @nodes = [] # empty list of nodes + end + + def add(value) + @nodes.push(Node.new(value)) end end
Add an implementation of the add method that passes spec.
diff --git a/app/models/repository.rb b/app/models/repository.rb index abc1234..def5678 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -29,7 +29,7 @@ Tire.search 'metadata' do query { string 'repository:' + name } size total - end.results + end.results.map { |entry| entry.to_hash } end def update_score(metric, score)
Convert metadata result set to hash For a better abstraction I am converting now the result of the method responsible for returning all metadata into an array of hashes. Signed-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>
diff --git a/dropbox-sdk.gemspec b/dropbox-sdk.gemspec index abc1234..def5678 100644 --- a/dropbox-sdk.gemspec +++ b/dropbox-sdk.gemspec @@ -14,6 +14,7 @@ s.add_dependency "json" s.add_development_dependency "minitest", "~> 4.3.2" + s.add_development_dependency "test-unit" s.homepage = "http://www.dropbox.com/developers/" s.summary = "Dropbox REST API Client."
Add test-unit as a development dependency Tests were unable to be run on my machine without this.
diff --git a/lib/nyanko/test.rb b/lib/nyanko/test.rb index abc1234..def5678 100644 --- a/lib/nyanko/test.rb +++ b/lib/nyanko/test.rb @@ -7,10 +7,12 @@ def enable_unit(unit_name) Test.activations[unit_name] = true end + alias_method :enable_ext, :enable_unit def disable_unit(unit_name) Test.activations[unit_name] = false end + alias_method :disable_ext, :disable_unit end module Unit
Add alise from unit to ext for backward compatibility of Chanko
diff --git a/lib/polyamorous.rb b/lib/polyamorous.rb index abc1234..def5678 100644 --- a/lib/polyamorous.rb +++ b/lib/polyamorous.rb @@ -1,12 +1,7 @@ if defined?(::ActiveRecord) module Polyamorous - if defined?(Arel::InnerJoin) - InnerJoin = Arel::InnerJoin - OuterJoin = Arel::OuterJoin - else - InnerJoin = Arel::Nodes::InnerJoin - OuterJoin = Arel::Nodes::OuterJoin - end + InnerJoin = Arel::Nodes::InnerJoin + OuterJoin = Arel::Nodes::OuterJoin JoinDependency = ::ActiveRecord::Associations::JoinDependency JoinAssociation = ::ActiveRecord::Associations::JoinDependency::JoinAssociation
Remove unused constant aliases for `Arel::{InnerJoin,OuterJoin}` `Arel::Nodes::{InnerJoin,OuterJoin}` exists since Arel 2.2 still today. https://github.com/rails/arel/blame/v9.0.0/lib/arel/nodes/inner_join.rb https://github.com/rails/arel/blame/v9.0.0/lib/arel/nodes/outer_join.rb
diff --git a/lib/api.rb b/lib/api.rb index abc1234..def5678 100644 --- a/lib/api.rb +++ b/lib/api.rb @@ -1,7 +1,8 @@ module Api - class AuthenticationError < StandardError; end - class Forbidden < StandardError; end - class BadRequestError < StandardError; end - class NotFound < StandardError; end - class UnsupportedMediaTypeError < StandardError; end + ApiError = Class.new(StandardError) + AuthenticationError = Class.new(ApiError) + Forbidden = Class.new(ApiError) + BadRequestError = Class.new(ApiError) + NotFound = Class.new(ApiError) + UnsupportedMediaTypeError = Class.new(ApiError) end
Make all API errors inherit from new ApiError This makes them easy to rescue from generically.
diff --git a/serialize.gemspec b/serialize.gemspec index abc1234..def5678 100644 --- a/serialize.gemspec +++ b/serialize.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'serialize' - s.version = '0.1.2' + s.version = '0.1.3' s.summary = 'Common interface for serialization and deserialization, and serializer discovery' s.description = ' '
Package version is increased from 0.1.2 to 0.1.3
diff --git a/sinatra-strong-params.gemspec b/sinatra-strong-params.gemspec index abc1234..def5678 100644 --- a/sinatra-strong-params.gemspec +++ b/sinatra-strong-params.gemspec @@ -7,10 +7,9 @@ Gem::Specification.new do |spec| spec.name = 'sinatra-strong-params' spec.version = Sinatra::StrongParams::VERSION - spec.authors = ['Evan Lecklider'] - spec.email = ['evan@lecklider.com'] - spec.summary = 'Some super basic strong parameter filters for Sinatra.' - spec.description = spec.summary + spec.authors = ['Evan Lecklider', 'Gustavo Sobral'] + spec.email = ['evan@lecklider.com', 'ghsobral@gmail.com'] + spec.summary = 'Basic strong parameter filters for Sinatra.' spec.homepage = 'https://github.com/evanleck/sinatra-strong-params' spec.license = 'MIT'
Add myself to the list of authors :tada:
diff --git a/lita-slack.gemspec b/lita-slack.gemspec index abc1234..def5678 100644 --- a/lita-slack.gemspec +++ b/lita-slack.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = "lita-slack" - spec.version = "0.1.2" + spec.version = "1.0.0" spec.authors = ["Ken J."] spec.email = ["kenjij@gmail.com"] spec.description = %q{Lita adapter for Slack.} @@ -14,10 +14,12 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_runtime_dependency "lita", ">= 2.7" - spec.add_runtime_dependency "lita-slack-handler", ">= 0.2.1" + spec.add_runtime_dependency "lita", ">= 4.0.0" spec.add_development_dependency "bundler", "~> 1.3" + spec.add_development_dependency "rack-test" spec.add_development_dependency "rake" spec.add_development_dependency "rspec", ">= 3.0.0" + spec.add_development_dependency "simplecov" + spec.add_development_dependency "coveralls" end
Revise gemspec for Lita 4/Slack RTM.
diff --git a/PulsarKit.podspec b/PulsarKit.podspec index abc1234..def5678 100644 --- a/PulsarKit.podspec +++ b/PulsarKit.podspec @@ -14,5 +14,5 @@ spec.ios.deployment_target = "10.0" spec.source = { :git => "https://github.com/maxoly/PulsarKit.git", :tag => "#{spec.version}" } spec.source_files = "PulsarKit", "PulsarKit/PulsarKit/**/*.{h,m,swift,c}" - spec.swift_version = '4.2' + spec.swift_version = '5.0' end
Update podspec, changed swift version to swift 5.0
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index abc1234..def5678 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -9,6 +9,4 @@ # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # Rails.application.config.assets.precompile += %w( search.js ) -Rails.application.config.assets.precompile += %w( animate.css ) -Rails.application.config.assets.precompile += %w( style.css ) -Rails.application.config.assets.precompile += %w( navbar.css )+Rails.application.config.assets.precompile += %w( animate.css style.css navbar.css )
Put asset.rb items on single line
diff --git a/spec/functional/fc086_spec.rb b/spec/functional/fc086_spec.rb index abc1234..def5678 100644 --- a/spec/functional/fc086_spec.rb +++ b/spec/functional/fc086_spec.rb @@ -1,17 +1,17 @@ require "spec_helper" describe "FC086" do - context "with a cookbook with a recipe that uses Chef::EncryptedDataBagItem.load_secret" do + context "with a recipe that uses Chef::EncryptedDataBagItem.load" do recipe_file 'Chef::EncryptedDataBagItem.load("users", "tsmith", key)' it { is_expected.to violate_rule } end - context "with a cookbook with a recipe that uses Chef::DataBagItem.load" do + context "with a recipe that uses Chef::DataBagItem.load" do recipe_file 'Chef::DataBagItem.load("users", "tsmith")' it { is_expected.to violate_rule } end - context "with a cookbook with a resource that uses Chef::EncryptedDataBagItem.load_secret" do + context "with a resource that uses Chef::EncryptedDataBagItem.load" do resource_file <<-EOF action :create do data = Chef::EncryptedDataBagItem.load("users", "tsmith", key) @@ -20,7 +20,7 @@ it { is_expected.to violate_rule } end - context "with a cookbook with a resource that uses Chef::EncryptedDataBagItem.load_secret" do + context "with a resource that uses Chef::DataBagItem.load" do resource_file <<-EOF action :create do data = Chef::DataBagItem.load("users", "tsmith") @@ -29,8 +29,8 @@ it { is_expected.to violate_rule } end - context "with a cookbook with a resource that uses data_bag_item" do - recipe_file "data_bag_item('bag', 'item', IO.read('secret_file'))" + context "with a recipe that uses data_bag_item" do + recipe_file "data_bag_item('bag', 'item', IO.read('secret_file').strip)" it { is_expected.not_to violate_rule } end end
Fix test labels to match the tests.
diff --git a/spec/support/elasticsearch.rb b/spec/support/elasticsearch.rb index abc1234..def5678 100644 --- a/spec/support/elasticsearch.rb +++ b/spec/support/elasticsearch.rb @@ -5,6 +5,23 @@ config.before(:suite) { start_elastic_cluster } config.after(:suite) { stop_elastic_cluster } + end + + SEARCHABLE_MODELS = [Spree::Product].freeze + + # create indices for searchable models + config.before do + SEARCHABLE_MODELS.each do |model| + model.reindex + model.searchkick_index.refresh + end + end + + # delete indices for searchable models to keep clean state between tests + config.after do + SEARCHABLE_MODELS.each do |model| + model.searchkick_index.delete + end end end
Set up indices before tests and clean up after tests
diff --git a/app/workers/beeminder_worker.rb b/app/workers/beeminder_worker.rb index abc1234..def5678 100644 --- a/app/workers/beeminder_worker.rb +++ b/app/workers/beeminder_worker.rb @@ -24,7 +24,9 @@ private def safe_sync(goal) - goal.sync + Timeout::timeout(60) { + goal.sync + } rescue => e Rollbar.error(e, goal_id: goal.id) logger.error e.backtrace
Add timeout per goal sync
diff --git a/cmd/lib/spree_cmd.rb b/cmd/lib/spree_cmd.rb index abc1234..def5678 100644 --- a/cmd/lib/spree_cmd.rb +++ b/cmd/lib/spree_cmd.rb @@ -3,7 +3,6 @@ case ARGV.first when 'version', '-v', '--version' - puts "outputting version" puts Gem.loaded_specs['spree_cmd'].version when 'extension' ARGV.shift
Remove debug from -v/--version call
diff --git a/FileMD5Hash.podspec b/FileMD5Hash.podspec index abc1234..def5678 100644 --- a/FileMD5Hash.podspec +++ b/FileMD5Hash.podspec @@ -1,13 +1,13 @@ Pod::Spec.new do |s| s.name = 'FileMD5Hash' - s.version = '0.0.1' + s.version = '1.0.0' s.license = 'Apache' s.summary = 'Library for computing MD5 hashes of files with small memory usage.' s.homepage = 'http://www.joel.lopes-da-silva.com/2010/09/07/compute-md5-or-sha-hash-of-large-file-efficiently-on-ios-and-mac-os-x/' s.author = { 'Joel Lopes Da Silva' => 'joel@lopes-da-silva.com' } - s.source = { :git => 'https://github.com/JoeKun/FileMD5Hash.git', :commit => 'd00c0c51c6d0955d9daf94c30cfd95a219d4914e' } + s.source = { :git => 'https://github.com/JoeKun/FileMD5Hash.git', :tag => '1.0.0' } s.prefix_header_file = 'Common/FileMD5Hash_Prefix.pch' s.source_files = 'Common/*.{h,c}' -end+end
Fix version and tag in podspec.
diff --git a/lib/heroku-deflater/railtie.rb b/lib/heroku-deflater/railtie.rb index abc1234..def5678 100644 --- a/lib/heroku-deflater/railtie.rb +++ b/lib/heroku-deflater/railtie.rb @@ -8,5 +8,9 @@ app.middleware.insert_before ActionDispatch::Static, Rack::Deflater app.middleware.insert_before ActionDispatch::Static, HerokuDeflater::SkipImages end + + config.after_initialize do |app| + app.config.static_cache_control ||= "public, max-age=86400" + end end end
Set default static asset lifetime to one day
diff --git a/api/gificiency.rb b/api/gificiency.rb index abc1234..def5678 100644 --- a/api/gificiency.rb +++ b/api/gificiency.rb @@ -0,0 +1,60 @@+require 'net/http' +require 'json' +require 'pry' + +class Gificiency + + def initialize + @gifs = {} + @categories = [] + @category_gifs = [] + + @response = get_json + @gifs = JSON.parse(@response.body, symbolize_names: true) + + set_categories + end + + def get_category(string) + string.to_s.split('-')[0] + end + + def get_categories + @categories.uniq.join(', ') + end + + def set_categories + @gifs.each do |gif| + unless gif[:category] == nil + @categories << get_category( gif[:category] ) + end + end + end + + def get_category_gifs(category) + category_gifs = [] + + @gifs.each do |gif| + unless gif[:category] == nil + if gif[:category] == category + category_gifs << gif + end + end + end + + category_gifs + end + + def get_json + Net::HTTP.get_response('gificiency.com', '/gifs.json') + end + + def get_random_gif_by_category(category) + gif_set = get_category_gifs(category) + gif_set.sample[:url] + end +end + +# gificiency = Gificiency.new +# puts gificiency.get_categories +# puts gificiency.get_random_gif_by_category('sad')
Add Ruby Gificiency class for the "API"
diff --git a/app/services/create_extension.rb b/app/services/create_extension.rb index abc1234..def5678 100644 --- a/app/services/create_extension.rb +++ b/app/services/create_extension.rb @@ -17,6 +17,9 @@ CollectExtensionMetadataWorker.perform_async(extension.id, @compatible_platforms.select { |p| !p.strip.blank? }) SetupExtensionWebHooksWorker.perform_async(extension.id) NotifyModeratorsOfNewExtension.perform_async(extension.id) + else if existing = Extension.where(enabled: false, github_url: extension.github_url) + existing.update_attribute(:enabled, true) + return existing end end end
Handle re-adding a disabled/removed extension
diff --git a/Casks/menumeters.rb b/Casks/menumeters.rb index abc1234..def5678 100644 --- a/Casks/menumeters.rb +++ b/Casks/menumeters.rb @@ -3,10 +3,5 @@ homepage 'http://www.ragingmenace.com/software/menumeters/' version 'latest' no_checksum - link 'MenuMeters Installer.app' - - def caveats; <<-EOS.undent - You need to run #{destination_path/'MenuMeters Installer.app'} to actually install MenuMeters - EOS - end + prefpane 'MenuMeters Installer.app/Contents/Resources/MenuMeters.prefPane' end
Install MenuMeters prefpane directly, no caveats The Menumeters.prefpane exists within the cask, so it can be directly linked, removing the need for the user to run the installer app separately.
diff --git a/Casks/purescript.rb b/Casks/purescript.rb index abc1234..def5678 100644 --- a/Casks/purescript.rb +++ b/Casks/purescript.rb @@ -1,6 +1,6 @@ cask :v1 => 'purescript' do - version '0.6.8' - sha256 'a5ab60c44cb90cca7b4966eb15d71c179e37ecc18e4df2698b177067404d8971' + version '0.6.9' + sha256 '38261d62c9e632e4b24f8d62ef0be7569b4db43a1365aa8e06783ba1e1d8de53' # github.com is the official download host per the vendor homepage url "https://github.com/purescript/purescript/releases/download/v#{version}/macos.tar.gz"
Update PureScript v0.6.8 -> v0.6.9
diff --git a/rackheader.gemspec b/rackheader.gemspec index abc1234..def5678 100644 --- a/rackheader.gemspec +++ b/rackheader.gemspec @@ -16,5 +16,5 @@ gem.version = Rack::Header::VERSION gem.add_development_dependency 'rake' - gem.add_dependency 'rack', '~> 1.4.1' + gem.add_dependency 'rack', '>= 1.4.1' end
Allow usage on Rack 1.5.X
diff --git a/rb-fsevent.gemspec b/rb-fsevent.gemspec index abc1234..def5678 100644 --- a/rb-fsevent.gemspec +++ b/rb-fsevent.gemspec @@ -13,6 +13,10 @@ s.description = 'FSEvents API with Signals catching (without RubyCocoa)' s.license = 'MIT' + s.metadata = { + 'source_code_uri' => 'https://github.com/thibaudgg/rb-fsevent' + } + s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) } s.require_path = 'lib'
Add source code link to gemspec
diff --git a/recipes/default.rb b/recipes/default.rb index abc1234..def5678 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -17,6 +17,9 @@ # limitations under the License. # +# required so we have build-essential packages when we compile the gem +node.override['build-essential']['compile_time'] = true + include_recipe 'build-essential::default' # Install dynect gem for usage within Chef runs
Make sure we have build-essential installed at compile_time We need it to compile the gem Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/recipes/php56.rb b/recipes/php56.rb index abc1234..def5678 100644 --- a/recipes/php56.rb +++ b/recipes/php56.rb @@ -9,7 +9,7 @@ options "--with-mysql --with-pgsql --with-apache" end -%w[ php56-apcu php56-http php56-xdebug php56-intl php56-yaml php56-imagick php56-twig php56-mcrypt].each do |pkg| +%w[ php56-apcu php56-http php56-xdebug php56-mongo php56-yaml php56-imagick php56-twig php56-mcrypt].each do |pkg| package pkg do action [:install, :upgrade] end
Remove intl and readd mongo
diff --git a/gds_zendesk.gemspec b/gds_zendesk.gemspec index abc1234..def5678 100644 --- a/gds_zendesk.gemspec +++ b/gds_zendesk.gemspec @@ -23,6 +23,6 @@ gem.add_development_dependency "rake" gem.add_development_dependency "rspec", "~> 3" - gem.add_development_dependency "rubocop-govuk", "4.7.0" + gem.add_development_dependency "rubocop-govuk", "4.8.0" gem.add_development_dependency "webmock", ">= 2" end
Update rubocop-govuk requirement from = 4.7.0 to = 4.8.0 Updates the requirements on [rubocop-govuk](https://github.com/alphagov/rubocop-govuk) to permit the latest version. - [Release notes](https://github.com/alphagov/rubocop-govuk/releases) - [Changelog](https://github.com/alphagov/rubocop-govuk/blob/main/CHANGELOG.md) - [Commits](https://github.com/alphagov/rubocop-govuk/compare/v4.7.0...v4.8.0) --- updated-dependencies: - dependency-name: rubocop-govuk dependency-type: direct:development ... Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@github.com>
diff --git a/spec/support/factory_girl.rb b/spec/support/factory_girl.rb index abc1234..def5678 100644 --- a/spec/support/factory_girl.rb +++ b/spec/support/factory_girl.rb @@ -1,3 +1,12 @@ RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods + + config.before(:suite) do + begin + DatabaseCleaner.start + FactoryGirl.lint + ensure + DatabaseCleaner.clean + end + end end
Configure factory girl to lint factories before test suite
diff --git a/appsignal.gemspec b/appsignal.gemspec index abc1234..def5678 100644 --- a/appsignal.gemspec +++ b/appsignal.gemspec @@ -30,4 +30,5 @@ gem.add_development_dependency 'rspec' gem.add_development_dependency 'capistrano' gem.add_development_dependency 'generator_spec' + gem.add_development_dependency 'pry' end
Add pry to development dependencies
diff --git a/arelastic.gemspec b/arelastic.gemspec index abc1234..def5678 100644 --- a/arelastic.gemspec +++ b/arelastic.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'arelastic' - s.version = '2.4.0' + s.version = '2.4.1' s.summary = 'Elastic Search query builder' s.description = 'Build Elastic Search queries with objects'
v2.4.1: Fix the API for Aggregations::Filters
diff --git a/spec/replication/util/schema_structure_spec.rb b/spec/replication/util/schema_structure_spec.rb index abc1234..def5678 100644 --- a/spec/replication/util/schema_structure_spec.rb +++ b/spec/replication/util/schema_structure_spec.rb @@ -0,0 +1,11 @@+describe "database schema" do + it "is structured as expected" do + ret = EvmDatabase.check_schema + + expect(ret).to be_nil, <<-EOS.gsub!(/^ +/, "") + #{Rails.configuration.database_configuration[Rails.env]["database"]} is not structured as expected. + + #{ret} + EOS + end +end
Add replication spec to validate the schema structure This spec runs the EvmDatabase.check_schema method and fails if it fails. This will make sure that we are aware every time the schema changes, including changes in rails that could affect the way our schema is layed out.
diff --git a/lib/divisio/base_adapter.rb b/lib/divisio/base_adapter.rb index abc1234..def5678 100644 --- a/lib/divisio/base_adapter.rb +++ b/lib/divisio/base_adapter.rb @@ -3,7 +3,7 @@ extend self def split(experiment_name, variants, identity) - ModuloAlgorithm.new(experiment_name+identity.to_s, variants).calc + ModuloAlgorithm.new(experiment_name.to_s+identity.to_s, variants).calc end def delete_experiment_for_identity(identity, experiment_name)
Allow for experiment names that are keys
diff --git a/lib/docsplit/timeoutable.rb b/lib/docsplit/timeoutable.rb index abc1234..def5678 100644 --- a/lib/docsplit/timeoutable.rb +++ b/lib/docsplit/timeoutable.rb @@ -30,9 +30,12 @@ Process.detach(pid) end - if !status || status.exitstatus != 0 - result = "Unexpected exit code #{status.exitstatus} when running `#{command}`:\n#{output}" - raise ExtractionFailed, result + if !status + raise ExtractionFailed, + "Timed out after #{timeout_seconds} when running `#{command}`:\n#{output}" + elsif status.exitstatus != 0 + raise ExtractionFailed, + "Unexpected exit code #{status.exitstatus} when running `#{command}`:\n#{output}" end return output
Fix timedout error message when timeout reached.
diff --git a/app/controllers/expenses_controller.rb b/app/controllers/expenses_controller.rb index abc1234..def5678 100644 --- a/app/controllers/expenses_controller.rb +++ b/app/controllers/expenses_controller.rb @@ -1,14 +1,11 @@ class ExpensesController < ApplicationController + before_filter :find_expenses, :only => %w(index) + before_filter :build_expense, :only => %w(index) + before_filter :calculate_averages, :only => %w(index) + # List recent expenses. def index - @expense = current_user.expenses.build - @expenses = current_user.expenses - @groups = @expenses.find_recent_grouped_by_relative_date - @averages = { - :day => @expenses.calculate_average_for(:day), - :week => @expenses.calculate_average_for(:week), - :month => @expenses.calculate_average_for(:month) - } + @groups = @expenses.find_recent_grouped_by_relative_date end # Display new expense form. @@ -32,4 +29,25 @@ end end end + + protected + + # Build an expense for the current user. + def build_expense + @expense = current_user.expenses.build + end + + # Calculate daily, weekly and monthly averages. + def calculate_averages + @averages = { + :day => @expenses.calculate_average_for(:day), + :week => @expenses.calculate_average_for(:week), + :month => @expenses.calculate_average_for(:month) + } + end + + # Find current users expenses. + def find_expenses + @expenses = current_user.expenses + end end
Move common queries to before filters in preparation for searching.
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index abc1234..def5678 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,7 +1,5 @@ # This controller handles the login/logout function of the site. class SessionsController < ApplicationController - # Be sure to include AuthenticationSystem in Application Controller instead - include AuthenticatedSystem # render new.rhtml def new
Clean up AutheticationSystem includes in controllers.
diff --git a/app/serializers/resource_serializer.rb b/app/serializers/resource_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/resource_serializer.rb +++ b/app/serializers/resource_serializer.rb @@ -1,4 +1,3 @@ class ResourceSerializer < ActiveModel::Serializer attributes :id, :title, :url, :description, :user_id - has_many :languages end
Remove language from resource serializer.
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Rails.application.routes.draw do get "/oauth/authorize" => "oauth2/authentication#authorize" - post "/oauth/access_token" => "oauth2/authentication#access_token" + match "/oauth/access_token" => "oauth2/authentication#access_token", :via => [:get, :post] get "/oauth/user" => "oauth2/users#show" end
Allow /oauth/access_token via get and post
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,3 @@ JsonSchemaRails::Engine.routes.draw do - resources :schemas, only: :show, path: '', id: /[\/a-zA-Z0-9_-]+/, defaults: { format: 'json' } + get '*id(.:format)', to: 'schemas#show', as: :schema, id: /[\/a-zA-Z0-9_-]+/, defaults: { format: 'json' } end
Fix route to get schema for Rails 4.1.2 Due to changes in Rails 4.1.2, slashes in a path generated by json_schema_rails url helper were escaped to '%2F', which is not comfortable for nested schema names. To avoid the escaping, we need to use wildcard segments ('*foo') to express a parameter of schema name. So stopped using "resources" routing and uses "get" with "as" parameter for url helpers.
diff --git a/config/initializers/slow_log.rb b/config/initializers/slow_log.rb index abc1234..def5678 100644 --- a/config/initializers/slow_log.rb +++ b/config/initializers/slow_log.rb @@ -0,0 +1,32 @@+# log excessively slow events to make debugging & optimization easier. +# ideally this will be replaced by proper metrics at some future point. + +ActiveSupport::Notifications.subscribe("process_action.action_controller") do |*args| + event = ActiveSupport::Notifications::Event.new *args + next unless event.duration > 5000 + + # hide most headers as they significantly clutter logs + headers = event.payload.delete(:headers).to_h + event.payload[:partial_headers] = headers.slice("HTTP_USER_AGENT", "REMOTE_ADDR") + Rails.logger.warn "[process_action.action_controller] SLOW: action took longer than 5 seconds: #{event.payload}" +end + +ActiveSupport::Notifications.subscribe("sql.active_record") do |*args| + event = ActiveSupport::Notifications::Event.new *args + next unless event.duration > 1000 + + # convert activerecord binds into more readable parameters + event.payload[:binds] = event.payload[:binds].map { |x| [x.name, x.value] } + Rails.logger.warn "[sql.active_record] SLOW: sql took longer than 1 second: #{event.payload}" +end + +ActiveSupport::Notifications.subscribe("instantiation.active_record") do |*args| + event = ActiveSupport::Notifications::Event.new *args + detail_string = "#{event.payload[:class_name]}, #{event.payload[:record_count]}" + if event.payload[:record_count] > 70 + Rails.logger.warn "[instantiation.active_record] SLOW: many records created: #{detail_string}" + end + if event.duration > 1000 + Rails.logger.warn "[instantiation.active_record] SLOW: instantiation took more than 1 second: #{detail_string}" + end +end
Add slow log on certain Rails events
diff --git a/SuperLogger.podspec b/SuperLogger.podspec index abc1234..def5678 100644 --- a/SuperLogger.podspec +++ b/SuperLogger.podspec @@ -13,13 +13,13 @@ * Finally, don't worry about the indent, CocoaPods strips it! DESC - s.homepage = "https://github.com/Oggerschummer/SuperLogger" - s.screenshots = "https://raw.githubusercontent.com/Oggerschummer/SuperLogger/master/ScreenShot/ScreenShot1.PNG", "https://raw.githubusercontent.com/Oggerschummer/SuperLogger/master/ScreenShot/ScreenShot2.PNG", "https://raw.githubusercontent.com/Oggerschummer/SuperLogger/master/ScreenShot/ScreenShot3.PNG" + s.homepage = "https://github.com/yourtion/SuperLogger" + s.screenshots = "https://raw.githubusercontent.com/yourtion/SuperLogger/master/ScreenShot/ScreenShot1.PNG", "https://raw.githubusercontent.com/yourtion/SuperLogger/master/ScreenShot/ScreenShot2.PNG", "https://raw.githubusercontent.com/yourtion/SuperLogger/master/ScreenShot/ScreenShot3.PNG" s.license = "Apache License, Version 2.0" s.author = { "Yourtion" => "yourtion@gmail.com" } s.platform = :ios - s.source = { :git => "https://github.com/Oggerschummer/SuperLogger.git", :tag => "0.5.0" } + s.source = { :git => "https://github.com/yourtion/SuperLogger.git", :tag => "0.5.0" } s.source_files = "SuperLogger" s.frameworks = "Foundation", "UIKit", "MessageUI" s.requires_arc = true
Revert "Adjust podfile to fork" This reverts commit e0ca570e26ab7b0f17a63e488fb0a925307a216e.
diff --git a/provisioner/worker/plugins/automators/chef_solo_automator/chef_solo_automator/cookbooks/loom_dns/recipes/default.rb b/provisioner/worker/plugins/automators/chef_solo_automator/chef_solo_automator/cookbooks/loom_dns/recipes/default.rb index abc1234..def5678 100644 --- a/provisioner/worker/plugins/automators/chef_solo_automator/chef_solo_automator/cookbooks/loom_dns/recipes/default.rb +++ b/provisioner/worker/plugins/automators/chef_solo_automator/chef_solo_automator/cookbooks/loom_dns/recipes/default.rb @@ -19,4 +19,6 @@ unless node['loom_dns']['provider'].nil? include_recipe "loom_dns::#{node['loom_dns']['provider']}" +else + Chef::Log.warn('No DNS provider configured, skipping DNS registration') end
Add a nice else log message
diff --git a/test/ffi-glib/main_loop_test.rb b/test/ffi-glib/main_loop_test.rb index abc1234..def5678 100644 --- a/test/ffi-glib/main_loop_test.rb +++ b/test/ffi-glib/main_loop_test.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true require 'gir_ffi_test_helper' + +class MainLoopTestException < RuntimeError; end describe GLib::MainLoop do describe '#run' do @@ -24,5 +26,27 @@ a.must_equal ['Before run', 'During run', 'After run'] end + + it 'raises and quits on exceptions in callbacks' do + main_loop = GLib::MainLoop.new nil, false + + a = 'expected' + + # This timeout shouldn't get called + guard = GLib.timeout_add GLib::PRIORITY_DEFAULT, 150 do + a = 'unexpected' + main_loop.quit + end + + GLib.timeout_add GLib::PRIORITY_DEFAULT, 10 do + raise MainLoopTestException + end + + lambda { main_loop.run }.must_raise MainLoopTestException + a.must_equal 'expected' + + # Clean up uncalled timeout + GLib.source_remove guard + end end end
Add test for actually quitting loops on exceptions
diff --git a/lib/oboe.rb b/lib/oboe.rb index abc1234..def5678 100644 --- a/lib/oboe.rb +++ b/lib/oboe.rb @@ -1,19 +1,11 @@ # Copyright (c) 2012 by Tracelytics, Inc. # All rights reserved. -module Oboe - class Railtie < Rails::Railtie - initializer "oboe.start" do |app| - Oboe::Loading.require_api - Oboe::Loading.instrument_rails if defined?(Rails) - end - end -end - begin require 'oboe_metal.so' require 'rbconfig' require 'oboe_metal' + require 'oboe/config' require 'oboe/loading' rescue LoadError
Move Rails initialization code to rails section.
diff --git a/test/unit/test_pomodori_view.rb b/test/unit/test_pomodori_view.rb index abc1234..def5678 100644 --- a/test/unit/test_pomodori_view.rb +++ b/test/unit/test_pomodori_view.rb @@ -7,7 +7,7 @@ end def test_start - assert_match(/^Starting pomodoro #1\.$/m, render(:start)) + assert_match(/^Started pomodoro #1\.$/m, render(:start)) end def test_finish @@ -19,6 +19,16 @@ assert_match(/^Canceled pomodoro #1 after .* minutes\.$/m, render(:cancel)) end + def test_interrupt_internal + @interrupt_type = 'internally' + assert_match(/^Marked pomodoro #1 as internally interrupted\.$/m, render(:interrupt)) + end + + def test_interrupt_external + @interrupt_type = 'externally' + assert_match(/^Marked pomodoro #1 as externally interrupted\.$/m, render(:interrupt)) + end + protected def model
Add view test for pomodoro interrupt
diff --git a/lib/trix.rb b/lib/trix.rb index abc1234..def5678 100644 --- a/lib/trix.rb +++ b/lib/trix.rb @@ -51,7 +51,7 @@ end def assets - %w( trix.js index.html ) + %w( trix.js index.html basecamp.png ) end def root
Add basecamp.png as installation target
diff --git a/lib/user.rb b/lib/user.rb index abc1234..def5678 100644 --- a/lib/user.rb +++ b/lib/user.rb @@ -6,7 +6,7 @@ end def contributions(username) - rows = DB.view('ghcontributors/contributions', :start_key => [username], :end_key => [username, {}])['rows'] + rows = DB.view('ghcontributors/contributions', :startkey => [username], :endkey => [username, {}])['rows'] rows = rows.map { |row| [row['key'][1], row['value']] }.sort_by { |repo, contributions| -contributions } Hash[*rows.flatten] end
Fix couchdb options to support cloudant
diff --git a/rails_admin_guest_list.gemspec b/rails_admin_guest_list.gemspec index abc1234..def5678 100644 --- a/rails_admin_guest_list.gemspec +++ b/rails_admin_guest_list.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |s| s.name = "rails_admin_guest_list" s.version = RailsAdminGuestList::VERSION - s.authors = ["Birgir Hrafn Sigurðsson"] + s.authors = ["Birgir Hrafn Sigurdsson"] s.email = ["birgir@transmit.is"] s.homepage = "http://www.transmit.is" s.summary = "RailsAdmin gem to display guestlists"
Remove icelandic chars from gemspec
diff --git a/lib/active_record_doctor/printers/io_printer.rb b/lib/active_record_doctor/printers/io_printer.rb index abc1234..def5678 100644 --- a/lib/active_record_doctor/printers/io_printer.rb +++ b/lib/active_record_doctor/printers/io_printer.rb @@ -1,7 +1,7 @@ module ActiveRecordDoctor module Printers class IOPrinter - def initialize(io: $stdout) + def initialize(io: STDOUT) @io = io end
Use $stdout instead of STDOUT $stdout can be reassigned so STDOUT may be a more reliable choice (at least in theory).
diff --git a/test/contactotron_api_test.rb b/test/contactotron_api_test.rb index abc1234..def5678 100644 --- a/test/contactotron_api_test.rb +++ b/test/contactotron_api_test.rb @@ -0,0 +1,15 @@+require 'test_helper' +require 'gds_api/contactotron' + +class ContactotronApiTest < MiniTest::Unit::TestCase + def api + GdsApi::Contactotron.new + end + + def test_should_fetch_and_parse_JSON_into_ostruct + uri = "http://contactotron.environment/contacts/1" + stub_request(:get, uri). + to_return(:status => 200, :body => '{"detail":"value"}') + assert_equal OpenStruct, api.contact_for_uri(uri).class + end +end
Add a sanity test for contactotron. Override initialize on that adapter as we don't want it to take a parameter
diff --git a/app/decorators/vm_decorator.rb b/app/decorators/vm_decorator.rb index abc1234..def5678 100644 --- a/app/decorators/vm_decorator.rb +++ b/app/decorators/vm_decorator.rb @@ -14,7 +14,7 @@ def quadicon icon = { :top_left => { - :tooltip => os_image_name.humanize.downcase + :tooltip => os_image_name.humanize.downcase }.merge(QuadiconHelper.os_icon(os_image_name.downcase)), :top_right => { :tooltip => normalized_state
Fix rubocop warning in VmDecorator
diff --git a/app/policies/afc_authorizer.rb b/app/policies/afc_authorizer.rb index abc1234..def5678 100644 --- a/app/policies/afc_authorizer.rb +++ b/app/policies/afc_authorizer.rb @@ -1,6 +1,6 @@ class AFCScheduleAuthorizer < PatronStatusAuthorizer def initialize(user) super(user) - @authorized_bor_statuses = %w{03 05 10 12 20 30 32 50 52 53 54 61 62 70 80 89 90 55} + @authorized_bor_statuses = %w{03 05 10 12 20 30 32 50 52 53 54 61 62 70 80 89 90} end end
Remove test status from AFC authorizer
diff --git a/lib/rubicure_fuzzy_match.rb b/lib/rubicure_fuzzy_match.rb index abc1234..def5678 100644 --- a/lib/rubicure_fuzzy_match.rb +++ b/lib/rubicure_fuzzy_match.rb @@ -19,6 +19,7 @@ TITLES_DICTIONARY.merge! FUZZY_TITLES_DICTIONARY def self.regularize(title) - TITLES[TITLES_DICTIONARY[FUZZY_MATCHER.find title]] + s = FUZZY_MATCHER.find title + s ? TITLES[TITLES_DICTIONARY[s]] : nil end end
Return nil when find method result is nil
diff --git a/lib/tasks/geocode_data.rake b/lib/tasks/geocode_data.rake index abc1234..def5678 100644 --- a/lib/tasks/geocode_data.rake +++ b/lib/tasks/geocode_data.rake @@ -13,6 +13,10 @@ klass = class_from_string(class_name) klass.not_geocoded.find_each(batch_size: 100) do |obj| + if obj.respond_to?(:summary) && obj.summary.blank? + obj.summary = 'Geocoded cases for map display' + end + obj.geocode obj.save sleep(sleep_timer.to_f) unless sleep_timer.nil?
Add summary default message if summary is blank
diff --git a/lib/weibo_2/access_token.rb b/lib/weibo_2/access_token.rb index abc1234..def5678 100644 --- a/lib/weibo_2/access_token.rb +++ b/lib/weibo_2/access_token.rb @@ -2,7 +2,7 @@ class AccessToken < OAuth2::AccessToken def validated? - !!@expires_at && !expired? + !!expires_at && !expired? end def expired?
Fix validated? method in AccessToken
diff --git a/proj4rb.gemspec b/proj4rb.gemspec index abc1234..def5678 100644 --- a/proj4rb.gemspec +++ b/proj4rb.gemspec @@ -1,21 +1,3 @@-# encoding: utf-8 -require 'rake' - - -# ------- Default Package ---------- -FILES = FileList[ - 'Rakefile', - 'README.rdoc', - 'MIT-LICENSE', - 'data/**/*', - 'doc/**/*', - 'example/**/*', - 'ext/*', - 'ext/vc/*.sln', - 'ext/vc/*.vcproj', - 'lib/**/*.rb' -] - Gem::Specification.new do |spec| spec.name = 'proj4rb' spec.version = '1.0.0' @@ -33,6 +15,6 @@ spec.requirements << 'Proj.4 C library' spec.require_path = 'lib' spec.extensions = ['ext/extconf.rb'] - spec.files = FILES.to_a - spec.test_files = FileList['test/test*.rb'] + spec.files = "git ls-files".split("\n") + spec.test_files = "git ls-files -- {test,spec,features}/*".split("\n") end
Remove Rake dependency at gemspec
diff --git a/app/models/message_task.rb b/app/models/message_task.rb index abc1234..def5678 100644 --- a/app/models/message_task.rb +++ b/app/models/message_task.rb @@ -2,7 +2,7 @@ title 'Message' role 'user' - PERMITTED_ATTRIBUTES = [:body, {participants: []}] + PERMITTED_ATTRIBUTES = [:body, {participant_ids: []}] has_many :comments, inverse_of: :message_task, foreign_key: 'task_id' has_many :message_participants, inverse_of: :message_task, foreign_key: 'task_id'
Update message task to accept participant_ids
diff --git a/app/models/post_indexer.rb b/app/models/post_indexer.rb index abc1234..def5678 100644 --- a/app/models/post_indexer.rb +++ b/app/models/post_indexer.rb @@ -0,0 +1,35 @@+class PostIndexer + def initialize + @sites = Groonga['Sites'] + @categories = Groonga['Categories'] + @authors = Groonga['Authors'] + @posts = Groonga['Posts'] + end + + def add(post) + site = @sites.add(post.site_id) + category = @categories.add(post.category_id) + if post.author_id + author = @authors.add(post.author_id) + else + author = nil + end + @posts.add(post.id, + title: post.title, + content: extract_content(post), + published_at: post.published_at, + site: site, + category: category, + author: author) + end + + def remove(post) + @posts[post.id].delete + end + + private + + def extract_content(post) + post.body + end +end
Support importing data to Groonga
diff --git a/config/initializers/6_rack_profiler.rb b/config/initializers/6_rack_profiler.rb index abc1234..def5678 100644 --- a/config/initializers/6_rack_profiler.rb +++ b/config/initializers/6_rack_profiler.rb @@ -4,4 +4,5 @@ # initialization is skipped so trigger it Rack::MiniProfilerRails.initialize!(Rails.application) Rack::MiniProfiler.config.position = 'right' + Rack::MiniProfiler.config.start_hidden = true end
Hide rack profiler by default Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
diff --git a/config/initializers/search_callback.rb b/config/initializers/search_callback.rb index abc1234..def5678 100644 --- a/config/initializers/search_callback.rb +++ b/config/initializers/search_callback.rb @@ -1,7 +1,7 @@ # In development environments we don't want to depend on Rummager unless # explicitly told to do so unless Rails.env.development? - update_search = true + update_search = ENV['QUIRKAFLEEG_SEARCH_DISABLE'].nil? else update_search = ENV['UPDATE_SEARCH'].present? end
Allow disabling of search in production mode using env var
diff --git a/docker/puma_config.rb b/docker/puma_config.rb index abc1234..def5678 100644 --- a/docker/puma_config.rb +++ b/docker/puma_config.rb @@ -4,8 +4,6 @@ pidfile '/var/run/puma.pid' -if ENV['PUMA_THREADS'] - threads(*ENV['PUMA_THREADS'].split(':').map(&:to_i)) -end +threads(*ENV['PUMA_THREADS'].split(':').map(&:to_i)) if ENV['PUMA_THREADS'] preload_app!
Fix rubocop single line if warning.
diff --git a/app/view/webview_bridge.rb b/app/view/webview_bridge.rb index abc1234..def5678 100644 --- a/app/view/webview_bridge.rb +++ b/app/view/webview_bridge.rb @@ -6,41 +6,41 @@ end def self.factory(frame) - if kind_of?(WKWebView) + if kind_of?(UIWebView) + self.alloc.initWithFrame(frame) + else self.alloc.initWithFrame(frame, configration:nil) - else - self.alloc.initWithFrame(frame) end end def title - if kind_of?(WKWebView) + if kind_of?(UIWebView) + stringByEvaluatingJavaScriptFromString("document.title") + else super - else - stringByEvaluatingJavaScriptFromString("document.title") end end def URL - if kind_of?(WKWebView) - super + if kind_of?(UIWebView) + self.request.URL else - self.request.URL + super end end def delegate=(object) - if kind_of?(WKWebView) + if kind_of?(UIWebView) + super(object) + else self.navigationDelegate = object self.UIDelegate = object - else - super(object) end end def scalesPageToFit=(bool) - unless kind_of?(WKWebView) - super.scalesPageToFit(bool) + if kind_of?(UIWebView) + super.setScalesPageToFit(bool) end end
Fix webview crash bug when iOS 7.1
diff --git a/AZSClient.podspec b/AZSClient.podspec index abc1234..def5678 100644 --- a/AZSClient.podspec +++ b/AZSClient.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "AZSClient" - s.version = "0.2.3" + s.version = "0.2.4" s.summary = "Azure Storage Client Library for iOS." s.description = <<-DESC "This library is designed to help you build iOS applications that use Microsoft Azure Storage." DESC
Bump the version to 0.2.4
diff --git a/cookbooks/tilecache/recipes/default.rb b/cookbooks/tilecache/recipes/default.rb index abc1234..def5678 100644 --- a/cookbooks/tilecache/recipes/default.rb +++ b/cookbooks/tilecache/recipes/default.rb @@ -19,11 +19,7 @@ include_recipe "squid" -expiry_time = 14 * 86400 - -tilecaches = search(:node, "roles:tilecache").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.sort_by { |n| n[:hostname] }.map do |n| - { :name => n[:hostname], :interface => n.interfaces(:role => :external).first[:interface] } -end +tilecaches = search(:node, "roles:tilecache") squid_fragment "tilecache" do template "squid.conf.erb"
Revert "Teach tilecache cookbook to return caches sorted (deterministic)" This reverts commit 8d66a30c923fe2c0b25fb1e72677b5f9f19d6333.
diff --git a/rails-i18n.gemspec b/rails-i18n.gemspec index abc1234..def5678 100644 --- a/rails-i18n.gemspec +++ b/rails-i18n.gemspec @@ -2,14 +2,14 @@ Gem::Specification.new do |s| s.name = "rails-i18n" - s.version = '0.3.0.beta' + s.version = '0.3.0.beta2' s.authors = ["Rails I18n Group"] s.email = "rails-i18n@googlegroups.com" s.homepage = "http://github.com/svenfuchs/rails-i18n" s.summary = "Common locale data and translations for Rails i18n." s.description = "A set of common locale data and translations to internationalize and/or localize your Rails applications." - s.files = Dir.glob("lib/**/*") + Dir.glob("rails/locale/*") + %w(README.md MIT-LICENSE.txt) + s.files = Dir.glob("lib/**/*") + Dir.glob("rails/locale/*") + Dir.glob("will_paginate/*") + %w(README.md MIT-LICENSE.txt) s.platform = Gem::Platform::RUBY s.require_path = 'lib' s.rubyforge_project = '[none]'
Include will_paginate/* to the gem (0.3.0.beta2)
diff --git a/recipes/default.rb b/recipes/default.rb index abc1234..def5678 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -35,7 +35,8 @@ end end -template "#{node['backup']['config_path']}/config.rb" do +template "Backup config file" do + path ::File.join( node['backup']['config_path'], "config.rb") source 'config.rb.erb' owner node['backup']['user'] group node['backup']['group']
Use a better name instead of a path