diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/InstantMock.podspec b/InstantMock.podspec index abc1234..def5678 100644 --- a/InstantMock.podspec +++ b/InstantMock.podspec @@ -27,7 +27,8 @@ s.source_files = "Sources/**/*.{h,m,swift}" s.requires_arc = true s.ios.deployment_target = "9.0" - # s.osx.deployment_target = "10.10" # FIXME: disable osx deployment for now + s.osx.deployment_target = "10.10" + s.tvos.deployment_target = '9.0' # Project Linking s.frameworks = 'XCTest'
Update podspec to add more targets
diff --git a/lib/generators/templates/models/concerns/token_verification.rb b/lib/generators/templates/models/concerns/token_verification.rb index abc1234..def5678 100644 --- a/lib/generators/templates/models/concerns/token_verification.rb +++ b/lib/generators/templates/models/concerns/token_verification.rb @@ -5,17 +5,11 @@ class ExpiredToken < StandardError; end PASSWORD_RESET = 'password_reset' - EMAIL_CONFIRMATION = 'email_confirmation' extend ActiveSupport::Concern def password_reset_token verifier = self.class.verifier_for(PASSWORD_RESET) - verifier.generate([id, Time.now]) - end - - def email_confirmation_token - verifier = self.class.verifier_for(EMAIL_CONFIRMATION) verifier.generate([id, Time.now]) end @@ -32,13 +26,7 @@ def find_by_password_reset_token!(token) <%= domain_model_id %>, timestamp = self.class.verifier_for(PASSWORD_RESET).verify(token) raise ::TokenVerification::ExpiredToken if timestamp < 1.day.ago - <% identity_model_class %>.find(<%= domain_model_id %>) - end - - def find_by_email_confirmation!(token) - <%= domain_model_id %>, timestamp = self.class.verifier_for(EMAIL_CONFIRMATION).verify(token) - raise ::TokenVerification::ExpiredToken if timestamp < 1.day.ago - <% identity_model_class %>.find(<%= domain_model_id %>) + <%= identity_model_class %>.find(<%= domain_model_id %>) end end
Remove user confirmation, fix erb typo
diff --git a/reeltalk.gemspec b/reeltalk.gemspec index abc1234..def5678 100644 --- a/reeltalk.gemspec +++ b/reeltalk.gemspec @@ -13,6 +13,8 @@ gem.homepage = "https://github.com/tarcieri/reeltalk" gem.add_runtime_dependency 'reel' + + gem.add_development_dependency 'rake' gem.add_development_dependency 'rspec' gem.files = `git ls-files`.split($/)
Add Rake to the gemspec
diff --git a/lib/vagrant-librarian-puppet-plugin/action/librarian_puppet.rb b/lib/vagrant-librarian-puppet-plugin/action/librarian_puppet.rb index abc1234..def5678 100644 --- a/lib/vagrant-librarian-puppet-plugin/action/librarian_puppet.rb +++ b/lib/vagrant-librarian-puppet-plugin/action/librarian_puppet.rb @@ -19,12 +19,23 @@ File.exist? File.join(env[:root_path], config.puppetfile_path) env[:ui].info "Installing Puppet modules with Librarian-Puppet..." + + # NB: Librarian::Puppet::Environment calls `which puppet` so we + # need to make sure VAGRANT_HOME/gems/bin has been added to the + # path. + original_path = ENV['PATH'] + bin_path = env[:gems_path].join('bin') + ENV['PATH'] = "#{bin_path}#{::File::PATH_SEPARATOR}#{ENV['PATH']}" + environment = Librarian::Puppet::Environment.new({ :project_path => File.join(env[:root_path], config.puppetfile_dir) }) Librarian::Action::Ensure.new(environment).run Librarian::Action::Resolve.new(environment).run Librarian::Action::Install.new(environment).run + + # Restore the original path + ENV['PATH'] = original_path end @app.call(env) end
Make sure VAGRANT_HOME/gems/bin is added to ENV['PATH'] before running librarian-puppet
diff --git a/fuubar.gemspec b/fuubar.gemspec index abc1234..def5678 100644 --- a/fuubar.gemspec +++ b/fuubar.gemspec @@ -13,7 +13,7 @@ spec.license = 'MIT' spec.executables = [] - spec.files = Dir['{app,config,db,lib}/**/*'] + %w{Rakefile README.md LICENSE} + spec.files = Dir['{app,config,db,lib}/**/*'] + %w{Rakefile README.md LICENSE.txt} spec.test_files = Dir['{test,spec,features}/**/*'] spec.add_dependency 'rspec', ["~> 3.0"]
Chore: Update gemspec to point to LICENSE.txt
diff --git a/RSPOPPickerSheet.podspec b/RSPOPPickerSheet.podspec index abc1234..def5678 100644 --- a/RSPOPPickerSheet.podspec +++ b/RSPOPPickerSheet.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RSPOPPickerSheet" - s.version = "0.0.2" + s.version = "0.0.3" s.summary = "Fullscreen pop-able and block-able picker sheet." s.homepage = "https://github.com/yeahdongcn/RSPOPPickerSheet" s.license = { :type => 'MIT', :file => 'LICENSE.md' }
Change pod spec to 0.0.3
diff --git a/thor-foodcritic.gemspec b/thor-foodcritic.gemspec index abc1234..def5678 100644 --- a/thor-foodcritic.gemspec +++ b/thor-foodcritic.gemspec @@ -15,6 +15,6 @@ s.require_paths = ["lib"] s.required_ruby_version = ">= 2.1" - s.add_runtime_dependency 'thor' - s.add_runtime_dependency 'foodcritic', '~> 4.0' + s.add_runtime_dependency "thor" + s.add_runtime_dependency "foodcritic" end
Remove the version constraint on Foodcritic Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/test/test_proxy.rb b/test/test_proxy.rb index abc1234..def5678 100644 --- a/test/test_proxy.rb +++ b/test/test_proxy.rb @@ -0,0 +1,66 @@+require File.expand_path('../helper', __FILE__) +require 'fileutils' +require 'socket' +require 'mini_portile' + +class TestProxy < TestCase + def with_dummy_proxy + gs = TCPServer.open('localhost', 0) + th = Thread.new do + s = gs.accept + gs.close + begin + s.gets + ensure + s.close + end + end + + yield "http://localhost:#{gs.addr[1]}" + + # Set timeout for reception of the request + Thread.new do + sleep 1 + th.kill + end + th.value + end + + def setup + # remove any download files + FileUtils.rm_rf("port/archives") + end + + def test_http_proxy + recipe = MiniPortile.new("test http_proxy", "1.0.0") + recipe.files << "http://myserver/path/to/tar.gz" + request = with_dummy_proxy do |url, thread| + ENV['http_proxy'] = url + assert_raise(RuntimeError) { recipe.cook } + ENV.delete('http_proxy') + end + assert_match(/GET http:\/\/myserver\/path\/to\/tar.gz/, request) + end + + def test_https_proxy + recipe = MiniPortile.new("test https_proxy", "1.0.0") + recipe.files << "https://myserver/path/to/tar.gz" + request = with_dummy_proxy do |url, thread| + ENV['https_proxy'] = url + assert_raise(RuntimeError) { recipe.cook } + ENV.delete('https_proxy') + end + assert_match(/CONNECT myserver:443/, request) + end + + def test_ftp_proxy + recipe = MiniPortile.new("test ftp_proxy", "1.0.0") + recipe.files << "ftp://myserver/path/to/tar.gz" + request = with_dummy_proxy do |url, thread| + ENV['ftp_proxy'] = url + assert_raise(RuntimeError) { recipe.cook } + ENV.delete('ftp_proxy') + end + assert_match(/GET ftp:\/\/myserver\/path\/to\/tar.gz/, request) + end +end
Add test cases for proxy usage on http, https and ftp. The ftp and https test fail, currently.
diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index abc1234..def5678 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -7,8 +7,10 @@ it "should list all files in a directory" do cli = Aspec::CLI.new(test_app_dir, ["aspec/"]) - cli.aspec_files.sort.should == [ - File.expand_path("aspec/failing.aspec", test_app_dir), + expected_results = [ + File.expand_path("aspec/failing.aspec", test_app_dir), File.expand_path("aspec/passing.aspec", test_app_dir)].sort + + expect(cli.aspec_files.sort).to eq expected_results end end
Use RSpec expect syntax in specs
diff --git a/lib/appinsights/installers/base.rb b/lib/appinsights/installers/base.rb index abc1234..def5678 100644 --- a/lib/appinsights/installers/base.rb +++ b/lib/appinsights/installers/base.rb @@ -13,8 +13,8 @@ @app.use middleware, *args.values end rescue AppInsights::ConfigFileNotFound => e - @logger.error e.message - @logger.info config_file_not_found_message + logger.error e.message + logger.info config_file_not_found_message end def logger
Use logger method instead of the uninitialized variable
diff --git a/test/cases/schema_dumper_test_sqlserver.rb b/test/cases/schema_dumper_test_sqlserver.rb index abc1234..def5678 100644 --- a/test/cases/schema_dumper_test_sqlserver.rb +++ b/test/cases/schema_dumper_test_sqlserver.rb @@ -15,7 +15,7 @@ assert_no_match %r{c_int_4.*:limit}, output end - def test_mysql_schema_dump_should_honor_nonstandard_primary_keys + def test_sqlserver_schema_dump_should_honor_nonstandard_primary_keys output = standard_dump match = output.match(%r{create_table "movies"(.*)do}) assert_not_nil(match, "nonstandardpk table not found")
Fix rename of test_sqlserver_schema_dump_should_honor_nonstandard_primary_keys test.
diff --git a/test/integration/character_stories_test.rb b/test/integration/character_stories_test.rb index abc1234..def5678 100644 --- a/test/integration/character_stories_test.rb +++ b/test/integration/character_stories_test.rb @@ -2,16 +2,15 @@ # Tests scenarios related to interacting with Characters class CharacterStoriesTest < ActionDispatch::IntegrationTest - + setup do @user = log_in_as_user end - + test 'a user can create a new character' do character = build(:character) visit new_character_path fill_in 'character_name', with: character.name - fill_in 'character_universe_id', with: character.universe click_on 'Create Character' assert_equal character_path(Character.where(name: character.name).first), current_path
Remove failing line from story
diff --git a/lib/paper_trail/frameworks/active_record/models/paper_trail/version.rb b/lib/paper_trail/frameworks/active_record/models/paper_trail/version.rb index abc1234..def5678 100644 --- a/lib/paper_trail/frameworks/active_record/models/paper_trail/version.rb +++ b/lib/paper_trail/frameworks/active_record/models/paper_trail/version.rb @@ -4,9 +4,12 @@ module PaperTrail # This is the default ActiveRecord model provided by PaperTrail. Most simple - # applications will only use this and its partner, `VersionAssociation`, but - # it is possible to sub-class, extend, or even do without this model entirely. - # See the readme for details. + # applications will use this model as-is, but it is possible to sub-class, + # extend, or even do without this model entirely. See documentation section + # 6.a. Custom Version Classes. + # + # The paper_trail-association_tracking gem provides a related model, + # `VersionAssociation`. class Version < ::ActiveRecord::Base include PaperTrail::VersionConcern end
Docs: Clarify that VersionAssociation is in separate gem
diff --git a/lib/scoring_engine/engine/work_unit.rb b/lib/scoring_engine/engine/work_unit.rb index abc1234..def5678 100644 --- a/lib/scoring_engine/engine/work_unit.rb +++ b/lib/scoring_engine/engine/work_unit.rb @@ -1,6 +1,7 @@ require 'resque/plugins/status' -require 'pty' + require 'timeout' +require 'open3' module ScoringEngine module Engine @@ -19,10 +20,13 @@ output = "" begin Timeout::timeout(Machine::CHECK_MAX_TIMEOUT) do - ::PTY.spawn(cmd_str) do |irb_out, irb_in, pid| - begin - output = irb_out.readlines.join("") - rescue Errno::EIO + ::Open3.popen3(cmd_str) do |stdin, stdout, stderr, wait_thr| + while line = stdout.gets + output << line + end + + while line = stderr.gets + output << line end end end
Switch to using popen3 to run command
diff --git a/lib/tasks/check_route_consistency.rake b/lib/tasks/check_route_consistency.rake index abc1234..def5678 100644 --- a/lib/tasks/check_route_consistency.rake +++ b/lib/tasks/check_route_consistency.rake @@ -3,9 +3,8 @@ def report_errors(errors) GovukError.notify( "Inconsistent routes", - parameters: { - errors: errors, - } + level: "warning", + extra: { errors: errors }, ) errors.each do |base_path, item_errors|
Add a level on the route consistency error
diff --git a/lib/ppcurses/actions/BaseAction.rb b/lib/ppcurses/actions/BaseAction.rb index abc1234..def5678 100644 --- a/lib/ppcurses/actions/BaseAction.rb +++ b/lib/ppcurses/actions/BaseAction.rb @@ -1,5 +1,3 @@-require 'curses' - #noinspection RubyResolve module PPCurses class BaseAction
Remove require. Requires are set at the base level.
diff --git a/lib/rack/dynamic_session_secure.rb b/lib/rack/dynamic_session_secure.rb index abc1234..def5678 100644 --- a/lib/rack/dynamic_session_secure.rb +++ b/lib/rack/dynamic_session_secure.rb @@ -2,6 +2,27 @@ module Rack module DynamicSessionSecure - # Your code goes here... + end + + module Session + module Abstract + class ID + def prepare_session_with_dynamic(env) + prepare_session_without_dynamic(env) + + _options = env[ENV_SESSION_OPTIONS_KEY].dup + + secure = _options[:secure] + if secure && secure.respond_to?(:call) + _options[:secure] = !!secure.call(env) + end + + env[ENV_SESSION_OPTIONS_KEY] = _options + end + + alias_method :prepare_session_without_dynamic, :prepare_session + alias_method :prepare_session, :prepare_session_with_dynamic + end + end end end
Replace secure option with returning value if it's a Proc
diff --git a/ext/leveldb/extconf.rb b/ext/leveldb/extconf.rb index abc1234..def5678 100644 --- a/ext/leveldb/extconf.rb +++ b/ext/leveldb/extconf.rb @@ -5,6 +5,8 @@ system "make libleveldb.a" or abort Dir.chdir "../ext/leveldb" +CONFIG['LDSHARED'] = "$(CXX) -shared" + $CFLAGS << " -I../../leveldb/include" $LIBS << " -L../../leveldb -lleveldb" create_makefile "leveldb/leveldb"
Fix "undefined symbol: __cxa_pure_virtual" error on load.
diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb index abc1234..def5678 100644 --- a/actionpack/lib/action_controller/metal/compatibility.rb +++ b/actionpack/lib/action_controller/metal/compatibility.rb @@ -4,10 +4,6 @@ # Temporary hax included do - # ROUTES TODO: This should be handled by a middleware and route generation - # should be able to handle SCRIPT_NAME - self.config.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT'] - class << self delegate :default_charset=, :to => "ActionDispatch::Response" end
Remove relative url root setting from ENV var This is already being set by Rails configuration.
diff --git a/spec/html/proofer/scripts_spec.rb b/spec/html/proofer/scripts_spec.rb index abc1234..def5678 100644 --- a/spec/html/proofer/scripts_spec.rb +++ b/spec/html/proofer/scripts_spec.rb @@ -14,6 +14,12 @@ output.should == "" end + it "fails for missing internal src" do + file = "#{FIXTURES_DIR}/script_missing_internal.html" + output = capture_stderr { HTML::Proofer.new(file).run } + output.should match /doesnotexist.js does not exist/ + end + it "works for present content" do file = "#{FIXTURES_DIR}/script_content.html" output = capture_stderr { HTML::Proofer.new(file).run }
Test for missing internal src
diff --git a/em-jsonrpc.gemspec b/em-jsonrpc.gemspec index abc1234..def5678 100644 --- a/em-jsonrpc.gemspec +++ b/em-jsonrpc.gemspec @@ -4,7 +4,7 @@ spec.name = "em-jsonrpc" spec.version = EventMachine::JsonRPC::VERSION spec.date = Time.now - spec.authors = ["Iñaki Baz Castillo"] + spec.authors = ["Inaki Baz Castillo"] spec.email = "ibc@aliax.net" spec.summary = "JSON RCP 2.0 client and server for EventMachine over TCP or UnixSocket" spec.homepage = "https://github.com/ibc/em-jsonrpc"
Fix gemspec by removing utf8 char - It breaks running some applications
diff --git a/finite_machine.gemspec b/finite_machine.gemspec index abc1234..def5678 100644 --- a/finite_machine.gemspec +++ b/finite_machine.gemspec @@ -1,4 +1,3 @@-# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'finite_machine/version' @@ -20,6 +19,6 @@ spec.add_development_dependency 'bundler', '>= 1.5.0', '< 2.0' spec.add_development_dependency 'rspec', '~> 3.1' - spec.add_development_dependency 'rspec-benchmark', '~> 0.3.0' + spec.add_development_dependency 'rspec-benchmark', '~> 0.4.0' spec.add_development_dependency 'rake' end
Change to update dev dependency
diff --git a/app/controllers/islay_shop/admin/products_controller.rb b/app/controllers/islay_shop/admin/products_controller.rb index abc1234..def5678 100644 --- a/app/controllers/islay_shop/admin/products_controller.rb +++ b/app/controllers/islay_shop/admin/products_controller.rb @@ -17,7 +17,11 @@ end def new_record - Product.new.tap {|p| p.skus.build(:template => true)} + if params[:action] == 'new' + Product.new.tap {|p| p.skus.build(:template => true)} + else + Product.new + end end def find_record
Fix an issue with templating SKUs.
diff --git a/app/views/ninetails/containers/_container.json.jbuilder b/app/views/ninetails/containers/_container.json.jbuilder index abc1234..def5678 100644 --- a/app/views/ninetails/containers/_container.json.jbuilder +++ b/app/views/ninetails/containers/_container.json.jbuilder @@ -1,6 +1,7 @@ json.container do json.call container, :id json.type container.type.demodulize + json.layout_id container.layout_id if container.try(:layout).present? json.layout do
Include layout id in the page response
diff --git a/engines/dfc_provider/app/serializers/dfc_provider/offer_serializer.rb b/engines/dfc_provider/app/serializers/dfc_provider/offer_serializer.rb index abc1234..def5678 100644 --- a/engines/dfc_provider/app/serializers/dfc_provider/offer_serializer.rb +++ b/engines/dfc_provider/app/serializers/dfc_provider/offer_serializer.rb @@ -6,7 +6,7 @@ class OfferSerializer < ActiveModel::Serializer attribute :id, key: '@id' attribute :type, key: '@type' - attribute :offeres_to, key: 'dfc:offeres_to' + attribute :offers_to, key: 'dfc:offers_to' attribute :price, key: 'dfc:price' attribute :stock_limitation, key: 'dfc:stockLimitation' @@ -18,7 +18,7 @@ 'dfc:Offer' end - def offeres_to + def offers_to { '@type' => '@id', '@id' => nil
Change offeres_to to offers_to for method naming
diff --git a/app/models/concerns/gobierto_common/module_name_prefixable.rb b/app/models/concerns/gobierto_common/module_name_prefixable.rb index abc1234..def5678 100644 --- a/app/models/concerns/gobierto_common/module_name_prefixable.rb +++ b/app/models/concerns/gobierto_common/module_name_prefixable.rb @@ -0,0 +1,25 @@+# frozen_string_literal: true + +module GobiertoCommon + module ModuleNamePrefixable + extend ActiveSupport::Concern + + module ClassMethods + def module_key + @module_key ||= name.underscore.split("/")[-2].gsub("gobierto_", "") + end + + def module_name_translations + @module_name_translations ||= I18n.available_locales.map do |locale| + [locale, I18n.with_locale(locale) { I18n.t("gobierto_admin.layouts.application.modules.#{module_key}") }] + end.to_h.symbolize_keys + end + + def prefix_translations(translations) + translations.each_with_object({}) do |(locale, translation), prefixed_translations| + prefixed_translations[locale] = "#{module_name_translations[locale.to_sym]} - #{translation}" + end + end + end + end +end
Add concern to prefix translations with module name translations
diff --git a/lib/hawk/model/connection.rb b/lib/hawk/model/connection.rb index abc1234..def5678 100644 --- a/lib/hawk/model/connection.rb +++ b/lib/hawk/model/connection.rb @@ -15,9 +15,21 @@ module ClassMethods def connection - raise Error::Configuration, "URL for #{name} is not yet set" unless url + @_connection ||= begin + raise Error::Configuration, "URL for #{name} is not yet set" unless url + raise Error::Configuration, "Please set the client_name" unless client_name - @_connection ||= Hawk::HTTP.new(url, http_options) + options = self.http_options.dup + headers = (options[:headers] ||= {}) + + if headers.key?('User-Agent') + raise Error::Configuration, "Please set the User-Agent header through client_name" + end + + headers['User-Agent'] = self.client_name + + Hawk::HTTP.new(url, options) + end end def url(url = nil) @@ -28,15 +40,22 @@ def http_options(options = nil) @_http_options = options.dup.freeze if options - @_http_options || {} + @_http_options ||= {} end alias http_options= http_options + + def client_name(name = nil) + @_client_name = name.dup.freeze if name + @_client_name + end + alias client_name= client_name def inherited(subclass) super subclass.url = self.url subclass.http_options = self.http_options + subclass.client_name = self.client_name end end end
Add mandatory User Agent as client_name
diff --git a/lib/formalist/form/validity_check.rb b/lib/formalist/form/validity_check.rb index abc1234..def5678 100644 --- a/lib/formalist/form/validity_check.rb +++ b/lib/formalist/form/validity_check.rb @@ -17,13 +17,13 @@ def visit_attr(node) name, type, errors, attributes, children = node - errors.empty? && children.map { |child| visit(child) }.none? + errors.empty? && children.map { |child| visit(child) }.all? end def visit_compound_field(node) type, attributes, children = node - children.map { |child| visit(child) }.none? + children.map { |child| visit(child) }.all? end def visit_field(node) @@ -35,19 +35,19 @@ def visit_group(node) type, attributes, children = node - children.map { |child| visit(child) }.none? + children.map { |child| visit(child) }.all? end def visit_many(node) name, type, errors, attributes, child_template, children = node - errors.empty? && children.map { |child| visit(child) }.none? + errors.empty? && children.map { |child| visit(child) }.all? end def visit_section(node) name, type, attributes, children = node - children.map { |child| visit(child) }.none? + children.map { |child| visit(child) }.all? end end end
Fix reversed logic for child validity This was preventing the embedded form validity check from ever returning a proper result for a rich text field with fully valid embedded forms
diff --git a/lib/librarian/puppet/source/local.rb b/lib/librarian/puppet/source/local.rb index abc1234..def5678 100644 --- a/lib/librarian/puppet/source/local.rb +++ b/lib/librarian/puppet/source/local.rb @@ -46,6 +46,7 @@ def manifest?(name, path) return true if path.join('manifests').exist? return true if path.join('lib').join('puppet').exist? + return true if path.join('lib').join('facter').exist? false end end
Modify the code to check for lib/facter also to handle fact only modules
diff --git a/tasks/javadoc_patch.rake b/tasks/javadoc_patch.rake index abc1234..def5678 100644 --- a/tasks/javadoc_patch.rake +++ b/tasks/javadoc_patch.rake @@ -0,0 +1,17 @@+raise 'Patch already integrated into buildr code' unless Buildr::VERSION.to_s == '1.5.6' + +module Buildr + module JavadocPatch + module ProjectExtension + include Extension + + after_define do |project| + project.doc.options.merge!('sourcepath' => project.compile.sources.join(File::PATH_SEPARATOR)) + end + end + end +end + +class Buildr::Project + include Buildr::JavadocPatch::ProjectExtension +end
Patch javadoc process to avoid warning due to source in jar
diff --git a/spec/features/rdb_spec.rb b/spec/features/rdb_spec.rb index abc1234..def5678 100644 --- a/spec/features/rdb_spec.rb +++ b/spec/features/rdb_spec.rb @@ -0,0 +1,23 @@+# encoding: UTF-8 +require File.expand_path("../../spec_helper", __FILE__) + +describe "Rdb", :js => true do + fixtures :projects, :projects_trackers, :users, :members, + :member_roles, :issues, :issue_categories, + :issue_statuses, :enumerations, :roles, :time_entries, + :versions, :workflows + + let(:project) { Project.find 'ecookbook' } + + before do + set_permissions + project.enable_module! 'dashboard' + login_as 'dlopper', 'foo' + end + + it "should redirect to taskboard" do + visit '/projects/ecookbook/rdb' + + current_path.should eq('/projects/ecookbook/rdb/taskboard') + end +end
Add some general rdb specs.
diff --git a/spec/jotform/user_spec.rb b/spec/jotform/user_spec.rb index abc1234..def5678 100644 --- a/spec/jotform/user_spec.rb +++ b/spec/jotform/user_spec.rb @@ -30,7 +30,7 @@ end context "#active?" do - it "should return true for an active user" do + it "returns true for an active user" do VCR.use_cassette("user/details") do api.user.active?.should be_true end
Fix wording in user spec
diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index abc1234..def5678 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -2,15 +2,12 @@ RSpec.describe Event, type: :model do - it { is_expected.to validate_presence_of(:category)} it { is_expected.to validate_presence_of(:volunteers_needed)} it { is_expected.to validate_presence_of(:starts_at)} it { is_expected.to validate_presence_of(:ends_at)} it { is_expected.to validate_presence_of(:shift_length)} it { is_expected.to validate_presence_of(:address)} - it { is_expected.to define_enum_for(:category).with([:volunteer, :medical, :legal])} - it { is_expected.to have_many(:shifts).dependent(:destroy) } end
Remove category from event specs
diff --git a/spec/routing/home_spec.rb b/spec/routing/home_spec.rb index abc1234..def5678 100644 --- a/spec/routing/home_spec.rb +++ b/spec/routing/home_spec.rb @@ -4,4 +4,8 @@ it 'routes /en to the home controller' do expect(get('/en')).to route_to(controller: "home", action: "show", locale: "en") end + + it 'routes /cy to the home controller' do + expect(get('/cy')).to route_to(controller: "home", action: "show", locale: "cy") + end end
Add Welsh test case to home routing spec
diff --git a/lib/tasks/global_user_migration.rake b/lib/tasks/global_user_migration.rake index abc1234..def5678 100644 --- a/lib/tasks/global_user_migration.rake +++ b/lib/tasks/global_user_migration.rake @@ -27,4 +27,15 @@ GlobalUserMigrator.new(tenant).migrate_user_ids puts "done." end + + desc "Migrate all tenants" + task migrate_all: :environment do + Tenant.all.each do |tenant| + subdomain = tenant.subdomain + puts "Migrating Users for #{subdomain}" + GlobalUserMigrator.new(subdomain).update_global_users + GlobalUserMigrator.new(subdomain).migrate_user_ids + puts "done" + end + end end
Create a GlobalUser migrate_all task
diff --git a/specs.rb b/specs.rb index abc1234..def5678 100644 --- a/specs.rb +++ b/specs.rb @@ -1,11 +1,18 @@-Dir['algorithms/**/*.md'].each do |file_name| - matcher = File.read(file_name).match(/~~~\n(require 'rspec'\n.+?)\n~~~/m) +require 'tempfile' + +Dir[ARGV[0] || 'algorithms/**/*.md'].each do |filename| + matcher = File.read(filename).match(/~~~\n(require 'rspec'\n.+?)\n~~~/m) next if matcher.nil? - puts "Running #{file_name}" + puts "Running #{filename}" matcher.captures.each do |capture| - File.write('_site/spec.rb', capture) - system('rspec _site/spec.rb') + tempfile = Tempfile.new('spec') + tempfile.write(capture) + tempfile.close + + system("rspec #{tempfile.path}") + + tempfile.unlink end end
Support running spec for one file.
diff --git a/app/jobs/index_protip.rb b/app/jobs/index_protip.rb index abc1234..def5678 100644 --- a/app/jobs/index_protip.rb +++ b/app/jobs/index_protip.rb @@ -5,6 +5,6 @@ def perform protip = Protip.find(protip_id) - protip.tire.update_index + protip.tire.update_index unless protip.user.banned? end end
Check if protip owner is banned before indexing.
diff --git a/app/lib/github/params.rb b/app/lib/github/params.rb index abc1234..def5678 100644 --- a/app/lib/github/params.rb +++ b/app/lib/github/params.rb @@ -31,7 +31,7 @@ def set_query_params # Check if keyword is present in query string - keyword = @params["q"].slice!('keyword:') + keyword = @params["q"].slice!('name:') query = keyword.nil? ? @params["q"] : format_keyword_query(@params["q"]) # Format params hash @@ -43,7 +43,7 @@ # Format the query is keyword is present? def format_keyword_query(query) - query.slice!('keyword:') + query.slice!('name:') query.gsub!(', ', '+') end
Use name instead of keyword
diff --git a/spec/default_search_spec.rb b/spec/default_search_spec.rb index abc1234..def5678 100644 --- a/spec/default_search_spec.rb +++ b/spec/default_search_spec.rb @@ -10,6 +10,14 @@ default_search('b2041590', 'remains of the day', 10) end + it "Should match full title strings without quotes" do + default_search('b2151715', 'A Pale View of Hills', 2) + end + + it "Should match full title strings with quotes" do + default_search('b2151715', '"A Pale View of Hills"', 2) + end + it "Should match partial title and TOC text" do default_search('b3176352', 'Effects of globalization in india', 5) end
Add exact title match examples.
diff --git a/lib/facter/cisco.rb b/lib/facter/cisco.rb index abc1234..def5678 100644 --- a/lib/facter/cisco.rb +++ b/lib/facter/cisco.rb @@ -11,7 +11,13 @@ hash = {} hash["images"] = {} - hash["images"]["system_image"] = Platform.system_image + begin + hash["images"]["system_image"] = Platform.system_image + rescue NameError + # In more recent versions, Platform moved into the Cisco namespace. + Platform = Cisco::Platform + hash["images"]["system_image"] = Platform.system_image + end hash["images"]["packages"] = Platform.packages hash["hardware"] = {}
Support both Cisco::Platform and Platform
diff --git a/app.rb b/app.rb index abc1234..def5678 100644 --- a/app.rb +++ b/app.rb @@ -10,6 +10,7 @@ class App < Sinatra::Application configure do set :root, File.dirname(__FILE__) + set :show_exceptions, :after_handler # Mongoid Mongoid.load!("./config/mongoid.yml") @@ -19,4 +20,6 @@ config.access_token = ENV["ROLLBAR_ACCESS_TOKEN"] end end + + end
Add show_exceptions in configure block
diff --git a/spec/requests/pages_spec.rb b/spec/requests/pages_spec.rb index abc1234..def5678 100644 --- a/spec/requests/pages_spec.rb +++ b/spec/requests/pages_spec.rb @@ -12,7 +12,7 @@ post pages_path, page: page_params.merge(liquid_layout_id: liquid_layout.id) }.to change{ Page.count }.by 1 page = Page.last - expect(PageFollower.new_from_page(page).follow_up_path).to eq "/pages/#{page.slug}/follow-up" + expect(PageFollower.new_from_page(page).follow_up_path).to eq "/a/#{page.slug}/follow-up" end it 'has a blank follow-up url if liquid layout has no default follow-up url' do
Update spec to use short url
diff --git a/test/match_either_test.rb b/test/match_either_test.rb index abc1234..def5678 100644 --- a/test/match_either_test.rb +++ b/test/match_either_test.rb @@ -16,7 +16,7 @@ match_either( proc { nil }, proc { false }, - proc { Mismatch } + proc { Mismatch.new } ).call('') end end
Fix small bug in test
diff --git a/spec/controllers/events_controller_spec.rb b/spec/controllers/events_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/events_controller_spec.rb +++ b/spec/controllers/events_controller_spec.rb @@ -1,13 +1,13 @@-require "rails_helper" +require 'rails_helper' RSpec.describe EventsController, :type => :controller do - describe "GET #index" do + describe 'GET #index' do before(:each) do create_list(:event, 3) get :index end - it "responds successfully with an HTTP 200 status code" do + it 'responds successfully with an HTTP 200 status code' do expect(response).to be_success expect(response).to have_http_status(200) end @@ -23,7 +23,7 @@ get :show, params: { slug: event.slug } end - it "responds successfully with an HTTP 200 status code" do + it 'responds successfully with an HTTP 200 status code' do expect(response).to be_success expect(response).to have_http_status(200) end
Clean up " => '
diff --git a/lib/apnotic.rb b/lib/apnotic.rb index abc1234..def5678 100644 --- a/lib/apnotic.rb +++ b/lib/apnotic.rb @@ -5,4 +5,5 @@ require 'apnotic/version' module Apnotic + raise "Cannot require Apnotic, unsupported engine '#{RUBY_ENGINE}'" unless RUBY_ENGINE == "ruby" end
Raise error if engine is not MRI.
diff --git a/WebKitPlus.podspec b/WebKitPlus.podspec index abc1234..def5678 100644 --- a/WebKitPlus.podspec +++ b/WebKitPlus.podspec @@ -16,7 +16,7 @@ s.source = { :git => "https://github.com/yashigani/WebKitPlus.git", :tag => "#{s.version}" } s.source_files = "Sources/WebKitPlus/**/*.{swift,h}" - s.resources = "Sources/WebKitPlus/Resources/**/*.lproj" + s.resource_bundles = { "WebKitPlus" => ["Sources/WebKitPlus/Resources/**/*.lproj"] } s.pod_target_xcconfig = { "APPLICATION_EXTENSION_API_ONLY" => "YES" } s.swift_version = "5.0"
Fix to revert resouces to resource_bundles
diff --git a/Casks/handbrake.rb b/Casks/handbrake.rb index abc1234..def5678 100644 --- a/Casks/handbrake.rb +++ b/Casks/handbrake.rb @@ -1,6 +1,7 @@ class Handbrake < Cask - url 'http://handbrake.fr/rotation.php?file=HandBrake-0.9.8-MacOSX.6_GUI_x86_64.dmg' + url 'http://handbrake.fr/rotation.php?file=HandBrake-0.9.9-MacOSX.6_GUI_x86_64.dmg' homepage 'http://handbrake.fr/' - version '0.9.8' - sha1 'd255b4daa64cc359209e306ff9ef8a24a66e20aa' + version '0.9.9' + sha1 '9b6f0259f3378b0cc136378d7859162aa95c0eb7' + link :app, 'HandBrake.app' end
Upgrade HandBrake to 0.9.9, add application link
diff --git a/Casks/handbrake.rb b/Casks/handbrake.rb index abc1234..def5678 100644 --- a/Casks/handbrake.rb +++ b/Casks/handbrake.rb @@ -9,5 +9,7 @@ homepage 'https://handbrake.fr' license :oss + auto_updates true + app 'HandBrake.app' end
Add auto_updates flag to Handbrake
diff --git a/Casks/sketch-up.rb b/Casks/sketch-up.rb index abc1234..def5678 100644 --- a/Casks/sketch-up.rb +++ b/Casks/sketch-up.rb @@ -0,0 +1,8 @@+class SketchUp < Cask + url 'http://dl.trimble.com/sketchup/SketchUpMEN.dmg' + homepage 'http://www.sketchup.com/intl/en/' + version '8' + sha1 '0dbfc19d64119fee86b38bc757b0d2431eef01e0' + + link :app, 'SketchUp.app' +end
Add Sketch Up (version 8) Cask
diff --git a/app/controllers/concerns/authenticate.rb b/app/controllers/concerns/authenticate.rb index abc1234..def5678 100644 --- a/app/controllers/concerns/authenticate.rb +++ b/app/controllers/concerns/authenticate.rb @@ -2,30 +2,27 @@ extend ActiveSupport::Concern def self.getKeyUser(token) - ApiKey.where(access_token: token.split(" ")[2]).pluck('user_id') + ApiKey.where(access_token: token.split(" ")[1]).pluck('user_id') end def self.getKeyExpiration(token) - ApiKey.where(access_token: token.split(" ")[2]).pluck('expires_at') + ApiKey.where(access_token: token.split(" ")[1]).pluck('expires_at') end private def restrict_access - authenticate_token || render_unauthorized - end - - def authenticate_token authenticate_or_request_with_http_token do |token, options| if ApiKey.exists?(access_token: token) return true else - return false + render_unauthorized end end end def render_unauthorized self.headers['WWW-Authenticate'] = 'Token realm="Application"' - render json: 'Bad credentials', status: 401 + toRender = [] + render json: toRender, status: 401 end end
Update authentication for api to be cleaner
diff --git a/app/controllers/spree/api/v2/base_controller_decorator.rb b/app/controllers/spree/api/v2/base_controller_decorator.rb index abc1234..def5678 100644 --- a/app/controllers/spree/api/v2/base_controller_decorator.rb +++ b/app/controllers/spree/api/v2/base_controller_decorator.rb @@ -0,0 +1,4 @@+module Spree::Api::V2::BaseControllerDecorator + Spree::Api::V2::BaseController.include(SpreeI18n::ControllerLocaleHelper) +end +Spree::Api::V2::BaseController.prepend(Spree::Api::V2::BaseControllerDecorator)
Apply localization in API v2 controller
diff --git a/app/routes/users.rb b/app/routes/users.rb index abc1234..def5678 100644 --- a/app/routes/users.rb +++ b/app/routes/users.rb @@ -12,12 +12,12 @@ end get "/:id/edit" do - @user = User.find params[:id] + @user = User.find( params[:id] ) or halt 404 view "admin/users/user_edit" end post "/:id/edit" do - @user = User.find params[:id] + @user = User.find( params[:id] ) or halt 404 if @user.update_attributes params[:user].except( :emails, :authentications ) flash[:notice] = "User details saved" redirect '/admin/users/'
Handle 'not found' errors in /admin/user/../edit
diff --git a/app/serializers/split_time_serializer.rb b/app/serializers/split_time_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/split_time_serializer.rb +++ b/app/serializers/split_time_serializer.rb @@ -1,7 +1,4 @@ class SplitTimeSerializer < BaseSerializer attributes :id, :effort_id, :lap, :split_id, :bitkey, :time_from_start, :data_status, :pacer, :remarks link(:self) { api_v1_split_time_path(object) } - - belongs_to :effort - belongs_to :split -end+end
Remove belongs_to relationships from SplitTimeSerializer.
diff --git a/lib/cmis/utils.rb b/lib/cmis/utils.rb index abc1234..def5678 100644 --- a/lib/cmis/utils.rb +++ b/lib/cmis/utils.rb @@ -32,10 +32,17 @@ end def normalize(value) - if value.respond_to?(:strftime) + if value.respond_to?(:strftime) # datetime literal value = value.strftime('%Y-%m-%dT%H:%M:%S.%L') "TIMESTAMP '#{value}'" - else + + elsif value.is_a?(Numeric) # signed numeric literal + value + + elsif value.is_a?(TrueClass) || value.is_a?(FalseClass) # boolean literal + value + + else # treat as a character string literal value = value.to_s value.gsub!(/\\/, Regexp.escape('\\\\')) value.gsub!(/'/, Regexp.escape('\\\''))
Support numeric and boolean literals in query builder.
diff --git a/lib/coloration.rb b/lib/coloration.rb index abc1234..def5678 100644 --- a/lib/coloration.rb +++ b/lib/coloration.rb @@ -1,7 +1,7 @@ require 'color' require "coloration/extensions.rb" -require "coloration//style.rb" +require "coloration/style.rb" require "coloration/abstract_converter.rb" require "coloration/color_rgba.rb"
Remove double slash from path
diff --git a/app/models/coronavirus/sub_section.rb b/app/models/coronavirus/sub_section.rb index abc1234..def5678 100644 --- a/app/models/coronavirus/sub_section.rb +++ b/app/models/coronavirus/sub_section.rb @@ -5,10 +5,34 @@ validates :title, :content, presence: true validates :page, presence: true validate :featured_link_must_be_in_content + validate :all_structured_content_valid + after_initialize :populate_structured_content + attr_reader :structured_content + + def content=(content) + super.tap { populate_structured_content } + end def featured_link_must_be_in_content - if featured_link.present? && !content.include?(featured_link) + return if featured_link.blank? || !structured_content + + unless structured_content.links.any? { |l| l.url == featured_link } errors.add(:featured_link, "does not exist in accordion content") end end + +private + + def populate_structured_content + @structured_content = if StructuredContent.parseable?(content) + StructuredContent.parse(content) + end + end + + def all_structured_content_valid + StructuredContent.error_lines(content).each do |line| + errors.add(:content, "unable to parse markdown: #{line}") + end + errors.present? + end end
Create structured content when creating a sub section This makes it so that structured content is created when a sub section is. It also adds the validation into the sub section model to ensure that the content is valid according to the Structured content. This in turn means that it is impossible for invalid content to be saved to the database. It also makes it so that when `content` is called on the `SubSection` model the associated `StructuredContent` is updated. This has been achieved by creating a new `content` method on the `SubSection`. It also ensures that that same population is done after the initialisation of the model. This is to make sure that `StructuredContent` always exists and is usable by the Json Presenter later on. Co-authored-by: Alex Newton <a4a07234de0a205690872ef5d9931abdf491c9ba@digital.cabinet-office.gov.uk> Co-authored-by: Kevin Dew <d334d31fcac6ab5494e26b93a13c454c9ec1a7b4@digital.cabinet-office.gov.uk>
diff --git a/lib/travis/cli/setup/engine_yard.rb b/lib/travis/cli/setup/engine_yard.rb index abc1234..def5678 100644 --- a/lib/travis/cli/setup/engine_yard.rb +++ b/lib/travis/cli/setup/engine_yard.rb @@ -8,7 +8,7 @@ description "automatic deployment to Engine Yard" def run - deploy 'provider' => 'engineyard' do |config| + deploy 'engineyard' do |config| eyrc = File.expand_path(".eyrc", Dir.home) config['api_key'] = YAML.load_file(eyrc)["api_token"] if File.exists?(eyrc) config['api_key'] = ask("API token: ") { |q| q.echo = "*" }.to_s unless config['api_key'] @@ -21,4 +21,4 @@ end end end -end+end
Fix for outputting 'provider:' twice in .travis.yml The 'travis setup engineyard' command outputted deploy: provider: provider: engineyard
diff --git a/spec/lib/ruby_gnuplot/style_spec.rb b/spec/lib/ruby_gnuplot/style_spec.rb index abc1234..def5678 100644 --- a/spec/lib/ruby_gnuplot/style_spec.rb +++ b/spec/lib/ruby_gnuplot/style_spec.rb @@ -1,5 +1,66 @@-describe Gnuplot::Plot do +describe Gnuplot::Plot::Style do subject(:style) { described_class.new } - xit "Adds tests here" + let(:index) { style.index } + + describe '#to_s' do + context "when nothing has been set" do + it 'creates an empty style' do + expect(style.to_s).to eq("set style line #{index}") + end + end + + context 'when setting the stype' do + before do + style.ls = 1 + style.lw = 2 + style.lc = 3 + style.pt = 4 + style.ps = 5 + style.fs = 6 + end + + it 'creates and indexes the style' do + expect(style.to_s).to eq( + "set style line #{index} ls 1 lw 2 lc 3 pt 4 ps 5 fs 6" + ) + end + end + + context 'when setting the stype on initialize' do + subject(:style) do + described_class.new do |style| + style.ls = 1 + style.lw = 2 + style.lc = 3 + style.pt = 4 + style.ps = 5 + style.fs = 6 + end + end + + it 'creates and indexes the style' do + expect(style.to_s).to eq( + "set style line #{index} ls 1 lw 2 lc 3 pt 4 ps 5 fs 6" + ) + end + end + + context 'when setting using the full method name' do + before do + style.linestyle = 1 + style.linewidth = 2 + style.linecolor = 3 + style.pointtype = 4 + style.pointsize = 5 + style.fill = 6 + end + + it 'creates and indexes the style' do + expect(style.to_s).to eq( + "set style line #{index} ls 1 lw 2 lc 3 pt 4 ps 5 fs 6" + ) + end + end + end end
Add spec over style class
diff --git a/spec/factories/organizations.rb b/spec/factories/organizations.rb index abc1234..def5678 100644 --- a/spec/factories/organizations.rb +++ b/spec/factories/organizations.rb @@ -11,6 +11,7 @@ organization_type_id { 1 } sequence(:name) { |n| "Org #{n}" } short_name {name} + legal_name {name} license_holder { true } factory :transit_operator, class: TransitOperator do organization_type_id { 2 }
[TTPLAT-1117] Add legal name to organization factories.
diff --git a/spec/filesystem_watcher_spec.rb b/spec/filesystem_watcher_spec.rb index abc1234..def5678 100644 --- a/spec/filesystem_watcher_spec.rb +++ b/spec/filesystem_watcher_spec.rb @@ -14,10 +14,10 @@ Dir::rmdir(@test_dir) end it "see created file in watched dir" do - @core.watchers << FilesystemWatcher.new(@core, {:path => @test_dir, :glob => "**/*", :interval => 1}) + @core.watchers << FilesystemWatcher.new(@core, {:path => @test_dir, :glob => "**/*", :interval => 0.1}) filename = File.join(@test_dir, "test_file1") File.open(filename, 'a'){|f| f.puts ' '} - sleep 5 - @core.logger.counter.should == 2 + sleep 1 + @core.logger.counter.should == 1 end end
Make tests go quicker by changing dirwatch timers
diff --git a/ruby/event-machine/server.rb b/ruby/event-machine/server.rb index abc1234..def5678 100644 --- a/ruby/event-machine/server.rb +++ b/ruby/event-machine/server.rb @@ -17,6 +17,7 @@ end end.parse! +EM.epoll EM.run { @channel = EM::Channel.new
Fix eventmachine crashing by using epoll
diff --git a/db/migrate/20161103110635_add_more_fields_to_trade_uploads.rb b/db/migrate/20161103110635_add_more_fields_to_trade_uploads.rb index abc1234..def5678 100644 --- a/db/migrate/20161103110635_add_more_fields_to_trade_uploads.rb +++ b/db/migrate/20161103110635_add_more_fields_to_trade_uploads.rb @@ -0,0 +1,14 @@+class AddMoreFieldsToTradeUploads < ActiveRecord::Migration + def change + add_column :trade_annual_report_uploads, :is_from_epix, :boolean, default: false + add_column :trade_annual_report_uploads, :is_from_web_service, :boolean, default: false + add_column :trade_annual_report_uploads, :number_of_records_submitted, :integer + add_column :trade_annual_report_uploads, :auto_reminder_sent_at, :date + add_column :trade_annual_report_uploads, :sandbox_transferred_at, :date + add_column :trade_annual_report_uploads, :sandbox_transferred_by_id, :integer + add_column :trade_annual_report_uploads, :submitted_at, :date + add_column :trade_annual_report_uploads, :submitted_by_id, :integer + add_column :trade_annual_report_uploads, :deleted_at, :date + add_column :trade_annual_report_uploads, :deleted_by_id, :integer + end +end
Add migration to add fields to annual report uploads
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index abc1234..def5678 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -1,6 +1,6 @@ module UsersHelper def follow_user_button(user, size_classes = "tiny expand") - if user_signed_in? && user != current_user + if user_signed_in? && user != current_user && !share_mode if current_user.following?(user) following = current_user.follower_followings.find_by(followee_id: user.id) link_to following_path(following), method: :delete, class: "button unfollow alert #{size_classes}" do
Remove follow button in share mode
diff --git a/app/controllers/things_controller.rb b/app/controllers/things_controller.rb index abc1234..def5678 100644 --- a/app/controllers/things_controller.rb +++ b/app/controllers/things_controller.rb @@ -14,28 +14,29 @@ end post "/things" do - @thing = Thing.new(params[:thing]) - @thing.user = current_user - if @thing.save - redirect "/things/#{@thing.id}" + thing = Thing.new(params[:thing]) + thing.user = current_user + if thing.save + redirect "/things/#{thing.id}" else - @errors = @thing.errors.full_messages - erb :"/things/edit" + errors = thing.errors.full_messages + redirect "/things/new?errors=#{errors}" end end get '/things/:id/edit' do @thing = Thing.find_by(id: params[:id]) + @errors = params[:errors] erb :"/things/edit" end put '/things/:id' do - @thing = Thing.find_by(id: params[:id]) - if @thing.update(params[:thing]) - redirect "/things/#{@thing.id}" + thing = Thing.find_by(id: params[:id]) + if thing.update(params[:thing]) + redirect "/things/#{thing.id}" else - @errors = @thing.errors.full_messages - erb :"/things/edit" + errors = thing.errors.full_messages + redirect "/things/#{thing.id}/edit?errors=#{errors}" end end
Convert fail routes for things/post, /put, /delete routes from erb's to redirects
diff --git a/app/models/authorization.rb b/app/models/authorization.rb index abc1234..def5678 100644 --- a/app/models/authorization.rb +++ b/app/models/authorization.rb @@ -3,12 +3,4 @@ belongs_to :oauth_provider validates_presence_of :oauth_provider, :uid - - scope :from_hash, ->(hash){ - joins(:oauth_provider).where("oauth_providers.name = :name AND uid = :uid", { name: hash['provider'], uid: hash['uid'] }) - } - - scope :from_hash_without_uid, ->(hash){ - joins(:oauth_provider).where("oauth_providers.name = :name", { name: hash['provider'] }).joins(:user).where('users.email = :email', { email: hash['info']['email'] }) - } end
Remove from_hash scopes from Authorization Not used since authorization refactory.
diff --git a/app/overrides/admin/tabs.rb b/app/overrides/admin/tabs.rb index abc1234..def5678 100644 --- a/app/overrides/admin/tabs.rb +++ b/app/overrides/admin/tabs.rb @@ -1,5 +1,5 @@ Deface::Override.new(:virtual_path => "spree/layouts/admin", :name => "add tolk tab", :insert_bottom => "[data-hook='admin_tabs'], #admin_tabs[data-hook]", - :text => "<%= tab(:locales, :url => spree.tolk_path, :label => :translations ) %>", + :text => "<%= tab(:locales, :url => spree.tolk_path, :label => :translations, :match_path => '/tolk' ) %>", :disabled => false)
Add tolk to Spree Navigation
diff --git a/lib/acts_as_audited/audit_sweeper.rb b/lib/acts_as_audited/audit_sweeper.rb index abc1234..def5678 100644 --- a/lib/acts_as_audited/audit_sweeper.rb +++ b/lib/acts_as_audited/audit_sweeper.rb @@ -20,6 +20,7 @@ end class AuditSweeper < ActionController::Caching::Sweeper #:nodoc: + observe Audit cattr_accessor :current_user_method self.current_user_method = :current_user @@ -37,4 +38,3 @@ extend CollectiveIdea::ActionController::Audited cache_sweeper :audit_sweeper end -Audit.add_observer(AuditSweeper.instance)
Use new observer API. Fixes Rails3
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 @@ -10,9 +10,12 @@ attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name # attr_accessible :title, :body - def self.find_for_oauth(auth, signed_in_resource=nil) + def self.find_or_create_from_oauth(auth, signed_in_resource=nil) user = User.where(:provider => auth.provider, :uid => auth.uid).first - unless user + if user.present? + puts "*********************** user was found or created from oauth hash" + else + puts "*********************** user was NOT found or created from oauth hash" user = User.create(name:auth.extra.raw_info.name, provider:auth.provider, uid:auth.uid, @@ -20,6 +23,6 @@ password:Devise.friendly_token[0,20] ) end - user + return user end end
Add logging to onmiauth action
diff --git a/lib/lanes/command/generate_screen.rb b/lib/lanes/command/generate_screen.rb index abc1234..def5678 100644 --- a/lib/lanes/command/generate_screen.rb +++ b/lib/lanes/command/generate_screen.rb @@ -10,7 +10,8 @@ description: '', icon: '', group_id: '', - model_class: '' + model_class: '', + namespace: nil } argument :name attr_reader :namespace, :class_name @@ -25,7 +26,7 @@ end def load_extension - @namespace = Command.load_current_extension.identifier + @namespace = options[:namespace] || Command.load_current_extension.identifier @class_name = name.camelize end @@ -34,7 +35,7 @@ template "client/screens/index.js", "client/screens/#{name}.js" template "client/screens/styles.scss", "client/screens/#{name}.scss" template "client/screens/Screen.coffee", "client/screens/#{name.classify}.coffee" - template "client/screens/template.html", "client/screens/#{name.dasherize}.html" + template "client/screens/template.html", "client/screens/#{name.dasherize}-layout.html" end end
Create "lanes generate sceen" command
diff --git a/lib/three_little_pigs/objects/pot.rb b/lib/three_little_pigs/objects/pot.rb index abc1234..def5678 100644 --- a/lib/three_little_pigs/objects/pot.rb +++ b/lib/three_little_pigs/objects/pot.rb @@ -1,13 +1,9 @@ module ThreeLittlePigs class Pot - TEMPERATURE_TO_BOIL_WATER = 110 # °C - private_constant :TEMPERATURE_TO_BOIL_WATER - - attr_accessor :contents, :temperature + attr_accessor :contents def initialize @contents = [] - @temperature = Utilities::ROOM_TEMPERATURE end def water @@ -15,7 +11,6 @@ end def raise_temperature - self.temperature = TEMPERATURE_TO_BOIL_WATER contents.each { |item| item.boil } end end
Remove some code irrelevant to the story
diff --git a/src/main/script/ci_build.rb b/src/main/script/ci_build.rb index abc1234..def5678 100644 --- a/src/main/script/ci_build.rb +++ b/src/main/script/ci_build.rb @@ -17,20 +17,27 @@ return system("git reset --hard #{REMOTE}/#{BRANCH}") end -def print_results(msg) +def success(message) puts - puts msg + puts message + exit 0 +end + +def failure(message) + puts + puts "Error: #{message}" + exit 1 end Dir.chdir(PROJECT_HOME) do if clean_build() if push_changes() - print_results 'All OK' + success 'All OK' else - print_results 'Error: Failed to push changes - you should do it manually' + failure 'Failed to push changes - you should do it manually' end else rollback_changes() - print_results 'Error: Failed to build - changes rolled back (undo with `git reset --hard HEAD@{1}`)' + failure 'Failed to build - changes rolled back (undo with `git reset --hard HEAD@{1}`)' end end
Return status codes from the CI build script
diff --git a/lib/tasks/deployment/20181127161213_fix_sheffield_config.rake b/lib/tasks/deployment/20181127161213_fix_sheffield_config.rake index abc1234..def5678 100644 --- a/lib/tasks/deployment/20181127161213_fix_sheffield_config.rake +++ b/lib/tasks/deployment/20181127161213_fix_sheffield_config.rake @@ -0,0 +1,14 @@+namespace :after_party do + desc 'Deployment task: fix_sheffield_config' + task fix_sheffield_config: :environment do + puts "Running deploy task 'fix_sheffield_config'" + + # Put your task implementation HERE. + sheffield_config = AmrDataFeedConfig.find_by(description: 'Sheffield') + sheffield_config.update(local_bucket_path: 'tmp/amr_files_bucket/sheffield') + + # Update task as completed. If you remove the line below, the task will + # run with every deploy (or every time you call after_party:run). + AfterParty::TaskRecord.create version: '20181127161213' + end +end
Add task to fix sheffield
diff --git a/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb b/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb index abc1234..def5678 100644 --- a/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb +++ b/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb @@ -4,37 +4,29 @@ add_column :alchemy_pages, :public_until, :datetime add_index :alchemy_pages, [:public_on, :public_until] - Alchemy::Page.each do |page| - next unless page.published_at - page.update_column(public_on: page.published_at) - say "Updated #{page.name} public state" - end + update <<-SQL.strip_heredoc + UPDATE alchemy_pages + SET public_on = published_at + WHERE published_at IS NOT NULL AND public=#{ActiveRecord::Base.connection.quoted_true} + SQL remove_column :alchemy_pages, :public end def down add_column :alchemy_pages, :public, :boolean, default: false + current_time = ActiveRecord::Base.connection.quoted_date(Time.current) - Alchemy::Page.each do |page| - next unless page_public?(page) - page.update_column(public: true) - say "Updated #{page.name} public state" - end + update <<-SQL.strip_heredoc + UPDATE alchemy_pages + SET public = ( + public_on IS NOT NULL AND public_on < '#{current_time}' + AND (public_until > '#{current_time}' OR public_until IS NULL) + ) + SQL + remove_index :alchemy_pages, [:public_on, :public_until] remove_column :alchemy_pages, :public_on remove_column :alchemy_pages, :public_until - remove_index :alchemy_pages, [:public_on, :public_until] - end - - private - - def page_public?(page) - page.public_on && page.public_on < current_time && - page.public_until && page.public_until > current_time - end - - def current_time - @_current_time ||= Time.current end end
Migrate page publicity using SQL Before this was done in Ruby and did not work. This does the same migration in SQL and therefore much faster.
diff --git a/spec/features/vimrc_generation_spec.rb b/spec/features/vimrc_generation_spec.rb index abc1234..def5678 100644 --- a/spec/features/vimrc_generation_spec.rb +++ b/spec/features/vimrc_generation_spec.rb @@ -18,7 +18,7 @@ scenario 'User can generate vimrc with custom settings', js: true do visit '/' - choose('On') + choose('option_set_compatible_true') click_on('Generate') expect(page).to have_content('set compatible')
Make Capybara locator more specific
diff --git a/spec/support/ensure_assets_compiled.rb b/spec/support/ensure_assets_compiled.rb index abc1234..def5678 100644 --- a/spec/support/ensure_assets_compiled.rb +++ b/spec/support/ensure_assets_compiled.rb @@ -4,15 +4,9 @@ module EnsureAssetsCompiled def self.check_built_assets return if @checked_built_assets - build_all_assets - end - - def self.running_webpack_watch?(type) - running = `pgrep -fl '\\-w \\-\\-config webpack\\.#{type}\\.rails\\.build\\.config\\.js'` - if running.present? - puts "Found process, so skipping rebuild => #{running.ai}" - return true - end + build_assets_for_type("client") + build_assets_for_type("server") + @checked_built_assets = true end def self.build_assets_for_type(type) @@ -26,10 +20,12 @@ end end - def self.build_all_assets - build_assets_for_type("client") - build_assets_for_type("server") - @checked_built_assets = true + def self.running_webpack_watch?(type) + running = `pgrep -fl '\\-w \\-\\-config webpack\\.#{type}\\.rails\\.build\\.config\\.js'` + if running.present? + puts "Found process, so skipping rebuild => #{running.ai}" + return true + end end # Runs on require
Add warning message if the user is testing with webpack running
diff --git a/lib/metasploit_data_models/active_record_models/vuln.rb b/lib/metasploit_data_models/active_record_models/vuln.rb index abc1234..def5678 100644 --- a/lib/metasploit_data_models/active_record_models/vuln.rb +++ b/lib/metasploit_data_models/active_record_models/vuln.rb @@ -11,9 +11,10 @@ after_update :save_refs scope :search, lambda { |*args| - where(["(vulns.name ILIKE ? or vulns.info ILIKE ?)", - "%#{args[0]}%", "%#{args[0]}%" - ]) + where(["(vulns.name ILIKE ? or vulns.info ILIKE ? or refs.name ILIKE ?)", + "%#{args[0]}%", "%#{args[0]}%", "%#{args[0]}%" + ]). + joins("LEFT OUTER JOIN vulns_refs ON vulns_refs.vuln_id=vulns.id LEFT OUTER JOIN refs ON refs.id=vulns_refs.ref_id") } private
Add Refs to the Vuns shallow search scope
diff --git a/plugins/identity/app/controllers/identity/domains_controller.rb b/plugins/identity/app/controllers/identity/domains_controller.rb index abc1234..def5678 100644 --- a/plugins/identity/app/controllers/identity/domains_controller.rb +++ b/plugins/identity/app/controllers/identity/domains_controller.rb @@ -6,7 +6,7 @@ def show @user_domain_projects_tree = services.identity.auth_projects_tree @root_projects = @user_domain_projects.reject{ |project| !project.parent.blank? } - @domain = service_user.find_domain(@scoped_domain_id) if current_user.is_allowed?('identity:domain_get') + @domain = service_user.find_domain(@scoped_domain_id) end def index
Fix domain get for non admins, Delete nonsense auth. check
diff --git a/plugins/fb_app/controllers/public/fb_app_plugin_controller.rb b/plugins/fb_app/controllers/public/fb_app_plugin_controller.rb index abc1234..def5678 100644 --- a/plugins/fb_app/controllers/public/fb_app_plugin_controller.rb +++ b/plugins/fb_app/controllers/public/fb_app_plugin_controller.rb @@ -15,4 +15,10 @@ protected + # prevent session reset because X-CSRF not being passed by FB + # see also https://gist.github.com/toretore/911886 + def handle_unverified_request + end + end +
Fix reset session on facebook requests
diff --git a/Casks/keyboard-maestro.rb b/Casks/keyboard-maestro.rb index abc1234..def5678 100644 --- a/Casks/keyboard-maestro.rb +++ b/Casks/keyboard-maestro.rb @@ -1,6 +1,6 @@ cask 'keyboard-maestro' do - version '7.0.2' - sha256 'd80b9cc8790c9b1595bfe132f47f12f54210fc3430c462d8cd668784c4f1c6c0' + version '7.0.3' + sha256 '36cc4b09d344a874c8d7c183b3f078f5c699fe37596dd53f00c433618bc28743' # stairways.com is the official download host per the vendor homepage url "https://files.stairways.com/keyboardmaestro-#{version.delete('.')}.zip"
Upgrade Keyboard Maestro to 7.0.3.
diff --git a/templates/xml_sitemap.builder b/templates/xml_sitemap.builder index abc1234..def5678 100644 --- a/templates/xml_sitemap.builder +++ b/templates/xml_sitemap.builder @@ -1,15 +1,15 @@ xml.instruct! xml.urlset "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance", - "xsi:schemaLocation" => "http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd", - "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do + "xsi:schemaLocation" => "http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd", + "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do links.each do |link| xml.url do - xml.loc link[:loc] - xml.lastmod w3c_date(link[:lastmod]) - xml.changefreq link[:changefreq] - xml.priority link[:priority] + xml.loc link[:loc] + xml.lastmod w3c_date(link[:lastmod]) if link[:lastmod] + xml.changefreq link[:changefreq] if link[:changefreq] + xml.priority link[:priority] if link[:priority] end end - -end+ +end
Allow empty lastmod, changefreq and priority. Provide a way to pass false values to lastmod, changefreq and priority. Signed-off-by: Adam Salter <f257d94038124c89b9e3063ebb3ccaafdcb43ccb@gmail.com>
diff --git a/db/data_migration/20141210090358_change_slug_for_schools_colleges_policy_document.rb b/db/data_migration/20141210090358_change_slug_for_schools_colleges_policy_document.rb index abc1234..def5678 100644 --- a/db/data_migration/20141210090358_change_slug_for_schools_colleges_policy_document.rb +++ b/db/data_migration/20141210090358_change_slug_for_schools_colleges_policy_document.rb @@ -9,10 +9,10 @@ supporting_pages = policy.published_supporting_pages # remove the old versions from the search index -Whitehall::SearchIndex.for(:government).delete(policy) +Whitehall::SearchIndex.delete(policy) supporting_pages.each do |supporting_page| - Whitehall::SearchIndex.for(:government).delete(supporting_page) + Whitehall::SearchIndex.delete(supporting_page) end # change the slug on the parent document @@ -20,14 +20,14 @@ policy.document.save! # re-index the new versions -Whitehall::SearchIndex.for(:government).add(policy) +Whitehall::SearchIndex.add(policy) supporting_pages.each do |supporting_page| - Whitehall::SearchIndex.for(:government).add(supporting_page) + Whitehall::SearchIndex.add(supporting_page) end # set the redirect -router.add_redirect_route("/government/policy/#{slug}", - 'exact', - "/government/policy/#{new_slug}") +router.add_redirect_route("/government/policies/#{slug}", + 'prefix', + "/government/policies/#{new_slug}") router.commit_routes
Update policy data migration to use prefix route Use a prefix redirect for the policy change. This will then match all the supporting pages and redirect them. Also remove the 'for' from the search index calls. As far as I can tell the search index gets set based on the object anyway. It was also causing the migration to fail for me locally.
diff --git a/db/migrate/20161017175509_remove_order_id_from_solidus_subscriptions_installments.rb b/db/migrate/20161017175509_remove_order_id_from_solidus_subscriptions_installments.rb index abc1234..def5678 100644 --- a/db/migrate/20161017175509_remove_order_id_from_solidus_subscriptions_installments.rb +++ b/db/migrate/20161017175509_remove_order_id_from_solidus_subscriptions_installments.rb @@ -1,6 +1,5 @@ class RemoveOrderIdFromSolidusSubscriptionsInstallments < SolidusSupport::Migration[4.2] def change - remove_foreign_key :solidus_subscriptions_installments, column: :order_id remove_column :solidus_subscriptions_installments, :order_id, :integer end end
Fix remove_foreign_key failing in Rails 6 In Rails 6, this statement fails because Rails thinks the foreign key does not exist for some reason. Since the remove_foreign_key call is not needed because the column is removed in the subsequent statement, we can remove it altogether.
diff --git a/lib/rails-observers.rb b/lib/rails-observers.rb index abc1234..def5678 100644 --- a/lib/rails-observers.rb +++ b/lib/rails-observers.rb @@ -4,9 +4,13 @@ module Rails module Observers class Railtie < ::Rails::Railtie - initializer "active_record.observer", :before => "active_record.set_configs" do + initializer "active_record.observer", :before => "active_record.set_configs" do |app| ActiveSupport.on_load(:active_record) do require "rails/observers/activerecord/active_record" + + if observers = app.config.respond_to?(:active_record) && app.config.active_record.delete(:observers) + send :observers=, observers + end end end
Set the observers before active_record.set_configs. This will avoid the deprecation warning
diff --git a/lib/reduce_examples.rb b/lib/reduce_examples.rb index abc1234..def5678 100644 --- a/lib/reduce_examples.rb +++ b/lib/reduce_examples.rb @@ -1,6 +1,6 @@-<<~DOC - Use reduce to get the sum of an array -DOC - +# Use reduce to get the sum of an array a = [1, 2, 3] a.reduce :+ # => 6 + +# Use reduce to get the factorial of a number +(1..n).reduce(1, :*)
Use reduce to compute factorials
diff --git a/lib/reel/connection.rb b/lib/reel/connection.rb index abc1234..def5678 100644 --- a/lib/reel/connection.rb +++ b/lib/reel/connection.rb @@ -24,6 +24,8 @@ def respond(response) response.render(@socket) + rescue Errno::ECONNRESET, Errno::EPIPE + # The client disconnected early ensure # FIXME: Keep-Alive support @socket.close
Handle disconnects during response rendering
diff --git a/lib/rubill/customer.rb b/lib/rubill/customer.rb index abc1234..def5678 100644 --- a/lib/rubill/customer.rb +++ b/lib/rubill/customer.rb @@ -13,19 +13,6 @@ CustomerContact.find_by_customer(id) end - def create_credit(amount, description="", syncReference="") - data = { - customerId: id, - amount: amount.to_f, - description: description, - syncReference: syncReference, - paymentType: "5", - paymentDate: Date.today, - } - - ReceivedPayment.create(data) - end - def self.remote_class_name "Customer" end
Remove Compete-specific logic into domain models.
diff --git a/lib/with_uuid/model.rb b/lib/with_uuid/model.rb index abc1234..def5678 100644 --- a/lib/with_uuid/model.rb +++ b/lib/with_uuid/model.rb @@ -14,12 +14,19 @@ end + protected + def set_id return unless id.blank? - # Assign generated COMBination GUID to #id - write_attribute( :id, WithUuid::CombUuid.uuid.to_s ) + uuid = WithUuid::CombUuid.uuid.to_s + before_set_id( uuid ) + write_attribute( :id, uuid ) + after_set_id( uuid ) end + + def before_set_id( uuid ); end + def after_set_id( uuid ); end end end
Add callbacks to UUID setting.
diff --git a/src/scp-article-loader.rb b/src/scp-article-loader.rb index abc1234..def5678 100644 --- a/src/scp-article-loader.rb +++ b/src/scp-article-loader.rb @@ -1,12 +1,13 @@ require 'nokogiri' require 'mechanize' +require_relative 'locale' class SCPArticleLoader def initialize(item_no, option) @item_no = item_no @option = option @agent = Mechanize.new - url = "http://#{@option[:locale]}.scp-wiki.net/scp-#{@item_no}" + url = "http://#{get_endpoint(@option[:locale])}/scp-#{@item_no}" page = @agent.get(url) doc = Nokogiri::HTML(page.content.toutf8) @article = doc.xpath('//*[@id="page-content"]').first
Support the other SCP Databases the other SCP Databases are: * SCP-RU * SCP-KO * SCP-CN * SCP-FR * SCP-PL * SCP-ES * SCP-TH
diff --git a/librarian-chef.gemspec b/librarian-chef.gemspec index abc1234..def5678 100644 --- a/librarian-chef.gemspec +++ b/librarian-chef.gemspec @@ -11,6 +11,7 @@ gem.summary = %q{A Bundler for your Chef Cookbooks.} gem.description = %q{A Bundler for your Chef Cookbooks.} gem.homepage = "" + gem.license = "MIT" gem.files = `git ls-files`.split($/) gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
Mark the license in the gemspec.
diff --git a/app/controllers/flow_managers_controller.rb b/app/controllers/flow_managers_controller.rb index abc1234..def5678 100644 --- a/app/controllers/flow_managers_controller.rb +++ b/app/controllers/flow_managers_controller.rb @@ -5,14 +5,15 @@ def show respond_to do |format| format.json do - incomplete_tasks = Task.assigned_to(current_user).incomplete.group_by { |t| t.paper }.to_a - complete_tasks = Task.assigned_to(current_user).completed.map do |task| + bq = Task.joins(phase: {task_manager: :paper}).assigned_to(current_user) + incomplete_tasks = bq.incomplete.group_by { |t| t.paper }.to_a + complete_tasks = bq.completed.map do |task| [task.paper, [task]] end - paper_admin_tasks = PaperAdminTask.assigned_to(current_user).map do |task| + paper_admin_tasks = PaperAdminTask.joins(phase: {task_manager: :paper}).assigned_to(current_user).map do |task| [task.paper, []] end - unassigned_papers = PaperAdminTask.where(assignee_id: nil).map do |task| + unassigned_papers = PaperAdminTask.joins(phase: {task_manager: :paper}).where(assignee_id: nil).map do |task| [task.paper, [task]] if User.admins_for(task.paper.journal).include? current_user end.compact @flows = [["Up for grabs", unassigned_papers],
Add join to task queries in flowmanager.
diff --git a/app/controllers/restaurateurs_controller.rb b/app/controllers/restaurateurs_controller.rb index abc1234..def5678 100644 --- a/app/controllers/restaurateurs_controller.rb +++ b/app/controllers/restaurateurs_controller.rb @@ -0,0 +1,16 @@+class RestaurateursController < ApplicationResourcesController + defaults :resource_class => User + before_action :set_restaurateur, only: [:show, :edit, :update, :destroy] + + private + # Use callbacks to share common setup or constraints between actions. + def set_restaurateur + @restaurateur = User.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def restaurateur_params + # devise_parameter_sanitizer.for(:account_update) + params.require(:user).permit(:nom, :adresse, :mock_restaurateur) + end +end
ADD : creation d'un controller pour les restaurateurs
diff --git a/app/serializers/api/dashboard_serializer.rb b/app/serializers/api/dashboard_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/api/dashboard_serializer.rb +++ b/app/serializers/api/dashboard_serializer.rb @@ -1,6 +1,6 @@ class Api::DashboardSerializer < ActiveModel::Serializer attributes :id, :title, :slug, :summary, :content, :attribution, :published, - :user_id, :production, :preproduction, :staging, :tags, :locations + :user_id, :production, :preproduction, :staging, :tags, :locations, :author belongs_to :partner, serializer: Api::PartnerSerializer end
Add author to dashboard index serializer
diff --git a/app/views/renalware/api/ukrdc/patients/procedures/_dialysis_session.xml.builder b/app/views/renalware/api/ukrdc/patients/procedures/_dialysis_session.xml.builder index abc1234..def5678 100644 --- a/app/views/renalware/api/ukrdc/patients/procedures/_dialysis_session.xml.builder +++ b/app/views/renalware/api/ukrdc/patients/procedures/_dialysis_session.xml.builder @@ -9,8 +9,8 @@ xml.ProcedureType do xml.CodingStandard "SNOMED" - xml.Code "19647005" - xml.Description "Plasma Exchange" + xml.Code "302497006" + xml.Description "Haemodialysis" end xml.Clinician do
Change procedure type to Haemodialysis
diff --git a/app.rb b/app.rb index abc1234..def5678 100644 --- a/app.rb +++ b/app.rb @@ -1,7 +1,9 @@+$LOAD_PATH << '.' + require 'bundler/setup' require 'docify' require 'sinatra' -require './app/lib/highlight' +require 'app/lib/highlight' VERSION = '0.3.4'
Define load path to be local
diff --git a/app.rb b/app.rb index abc1234..def5678 100644 --- a/app.rb +++ b/app.rb @@ -7,7 +7,10 @@ require 'content_alert' def main - return if File.exists?("#{ENV['HOME']}/.stop_content_alert") + if File.exists?("#{ENV['HOME']}/.stop_content_alert") + puts '.stop_content_alert exists' + return + end ContentAlert::Alert.run end
Add stop content alert message
diff --git a/XYFSnowAnimation.podspec b/XYFSnowAnimation.podspec index abc1234..def5678 100644 --- a/XYFSnowAnimation.podspec +++ b/XYFSnowAnimation.podspec @@ -2,7 +2,7 @@ s.name = "XYFSnowAnimation" -s.version = "2.0.0" +s.version = "2.0.1" s.ios.deployment_target = '8.0' @@ -14,7 +14,7 @@ s.author = { "CoderXYF" => "https://github.com/CoderXYF" } -s.source = { :git => "https://github.com/CoderXYF/XYFSnowAnimation.git", :tag => "2.0.0" } +s.source = { :git => "https://github.com/CoderXYF/XYFSnowAnimation.git", :tag => "2.0.1" } s.source_files = "XYFSnowAnimationDemo/XYFSnowAnimation/*.{h,m}"
Update cocoaPods depository to version 2.0.1
diff --git a/YALPullToRefresh.podspec b/YALPullToRefresh.podspec index abc1234..def5678 100644 --- a/YALPullToRefresh.podspec +++ b/YALPullToRefresh.podspec @@ -1,16 +1,16 @@ Pod::Spec.new do |spec| - spec.name = 'YALPullToRefresh' - spec.version = '1.0' + spec.name = "YALPullToRefresh" + spec.version = "1.0" - spec.homepage = 'https://github.com/Yalantis/Pull-to-Refresh.Rentals-iOS' - spec.summary = 'Simple and customizable pull-to-refresh implementation' + spec.homepage = "https://github.com/Yalantis/Pull-to-Refresh.Rentals-iOS" + spec.summary = "Simple and customizable pull-to-refresh implementation" - spec.author = 'Yalantis' - spec.license = { :type => 'MIT', :file => 'LICENSE' } - spec.social_media_url = 'https://twitter.com/yalantis' + spec.author = "Yalantis" + spec.license = { :type => "MIT", :file => "LICENSE" } + spec.social_media_url = "https://twitter.com/yalantis" spec.platform = :ios, '7.0' - spec.ios.deployment_target = '7.0 + spec.ios.deployment_target = '7.0' spec.resources = 'YALTourPullToRefresh/YALSunnyRefreshControll/Images.xcassets'
Revert "[Fix] Fixed podspec format" This reverts commit 15b1ae77f86213914d404767e28efdeae361f11a.
diff --git a/MercadoPagoSDK.podspec b/MercadoPagoSDK.podspec index abc1234..def5678 100644 --- a/MercadoPagoSDK.podspec +++ b/MercadoPagoSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MercadoPagoSDK" - s.version = "4.0.0.beta.24" + s.version = "4.0.0.beta.28" s.summary = "MercadoPagoSDK" s.homepage = "https://www.mercadopago.com" s.license = { :type => "MIT", :file => "LICENSE" }
Change beta version to .28
diff --git a/pg_search.gemspec b/pg_search.gemspec index abc1234..def5678 100644 --- a/pg_search.gemspec +++ b/pg_search.gemspec @@ -6,8 +6,8 @@ s.name = "pg_search" s.version = PgSearch::VERSION s.platform = Gem::Platform::RUBY - s.authors = ["Case Commons, LLC"] - s.email = ["casecommons-dev@googlegroups.com"] + s.authors = ["Grant Hutchins", "Case Commons, LLC"] + s.email = ["gems@nertzy.com", "casecommons-dev@googlegroups.com"] s.homepage = "https://github.com/Casecommons/pg_search" s.summary = %q{PgSearch builds Active Record named scopes that take advantage of PostgreSQL's full text search} s.description = %q{PgSearch builds Active Record named scopes that take advantage of PostgreSQL's full text search}
Add myself to the authors
diff --git a/core/lib/generators/spree/mailers_preview/templates/mailers/previews/order_preview.rb b/core/lib/generators/spree/mailers_preview/templates/mailers/previews/order_preview.rb index abc1234..def5678 100644 --- a/core/lib/generators/spree/mailers_preview/templates/mailers/previews/order_preview.rb +++ b/core/lib/generators/spree/mailers_preview/templates/mailers/previews/order_preview.rb @@ -6,4 +6,8 @@ def cancel_email Spree::OrderMailer.cancel_email(Spree::Order.complete.first) end + + def store_owner_notification_email + Spree::OrderMailer.store_owner_notification_email(Spree::Order.complete.first) + end end
Add email preview for order store_owner_notification mail