diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/server/export.js b/server/export.js index <HASH>..<HASH> 100644 --- a/server/export.js +++ b/server/export.js @@ -35,6 +35,15 @@ export default async function (dir, options) { join(outDir, '_next', buildStats['app.js'].hash, 'app.js') ) + // Copy static directory + if (existsSync(join(dir, 'static'))) { + log(' copying "static" directory') + await cp( + join(dir, 'static'), + join(outDir, 'static') + ) + } + await copyPages(nextDir, outDir, buildId) // Get the exportPathMap from the `next.config.js`
Copy the static directory for static file serving.
diff --git a/lib/Drivers/DML/sqlite.js b/lib/Drivers/DML/sqlite.js index <HASH>..<HASH> 100644 --- a/lib/Drivers/DML/sqlite.js +++ b/lib/Drivers/DML/sqlite.js @@ -12,7 +12,7 @@ function Driver(config, connection, opts) { this.db = connection; } else { // on Windows, paths have a drive letter which is parsed by - // url.parse() has the hostname. If host is defined, assume + // url.parse() as the hostname. If host is defined, assume // it's the drive letter and add ":" this.db = new sqlite3.Database(((config.host ? config.host + ":" : "") + (config.pathname || "")) || ':memory:'); }
Fixes typo in sqlite3 driver
diff --git a/lib/metamorpher/drivers/ruby.rb b/lib/metamorpher/drivers/ruby.rb index <HASH>..<HASH> 100644 --- a/lib/metamorpher/drivers/ruby.rb +++ b/lib/metamorpher/drivers/ruby.rb @@ -59,7 +59,7 @@ module Metamorpher # omitting a necessary keyword. Note that these are the symbols produced # by Parser which are not necessarily the same as Ruby keywords (e.g., # Parser sometimes produces a :zsuper node for a program of the form "super") - @keywords ||= %i(nil false true self array) + @keywords ||= %i(nil false true self array hash) end def ast_for(literal) diff --git a/spec/unit/drivers/ruby_spec.rb b/spec/unit/drivers/ruby_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/drivers/ruby_spec.rb +++ b/spec/unit/drivers/ruby_spec.rb @@ -87,7 +87,7 @@ module Metamorpher end end - { "[]" => :array }.each do |ruby_literal, type| + { "[]" => :array, "{}" => :hash }.each do |ruby_literal, type| describe "for a program containing the '#{ruby_literal}' Ruby literal" do let(:source) { "a = #{ruby_literal}" } let(:metamorpher_literal) { builder.lvasgn(:a, type) }
Fix bug in unparsing Ruby code with {} literal.
diff --git a/js/src/files.js b/js/src/files.js index <HASH>..<HASH> 100644 --- a/js/src/files.js +++ b/js/src/files.js @@ -559,7 +559,7 @@ module.exports = (common) => { }) }) - it('exports a chunk of a file', (done) => { + it('exports a chunk of a file', function (done) { if (withGo) { this.skip() } const offset = 1 @@ -589,7 +589,7 @@ module.exports = (common) => { })) }) - it('exports a chunk of a file in a ReadableStream', (done) => { + it('exports a chunk of a file in a ReadableStream', function (done) { if (withGo) { this.skip() } const offset = 1 @@ -625,7 +625,7 @@ module.exports = (common) => { ) }) - it('exports a chunk of a file in a PullStream', (done) => { + it('exports a chunk of a file in a PullStream', function (done) { if (withGo) { this.skip() } const offset = 1
fix: this.skip needs to be under a function declaration
diff --git a/client/extjs/src/panel/attribute/ItemUi.js b/client/extjs/src/panel/attribute/ItemUi.js index <HASH>..<HASH> 100644 --- a/client/extjs/src/panel/attribute/ItemUi.js +++ b/client/extjs/src/panel/attribute/ItemUi.js @@ -89,7 +89,7 @@ MShop.panel.attribute.ItemUi = Ext.extend(MShop.panel.AbstractItemUi, { allowBlank : false, emptyText : _('Attribute code (required)') }, { - xtype : 'textarea', + xtype : 'textfield', fieldLabel : _('Label'), name : 'attribute.label', allowBlank : false,
Changes attribute label from text area to text field
diff --git a/lib/action_controller/parameters.rb b/lib/action_controller/parameters.rb index <HASH>..<HASH> 100644 --- a/lib/action_controller/parameters.rb +++ b/lib/action_controller/parameters.rb @@ -1,7 +1,7 @@ require 'active_support/core_ext/hash/indifferent_access' module ActionController - class ParameterMissing < RuntimeError + class ParameterMissing < IndexError end class Parameters < ActiveSupport::HashWithIndifferentAccess
use IndexError to be closer to hash fetch
diff --git a/lib/endpoints/class-wp-rest-comments-controller.php b/lib/endpoints/class-wp-rest-comments-controller.php index <HASH>..<HASH> 100755 --- a/lib/endpoints/class-wp-rest-comments-controller.php +++ b/lib/endpoints/class-wp-rest-comments-controller.php @@ -360,11 +360,11 @@ class WP_REST_Comments_Controller extends WP_REST_Controller { $error_code = $prepared_comment['comment_approved']->get_error_code(); $error_message = $prepared_comment['comment_approved']->get_error_message(); - if ( $error_code === 'comment_duplicate' ) { + if ( 'comment_duplicate' === $error_code ) { return new WP_Error( $error_code, $error_message, array( 'status' => 409 ) ); } - if ( $error_code === 'comment_flood' ) { + if ( 'comment_flood' === $error_code ) { return new WP_Error( $error_code, $error_message, array( 'status' => 400 ) ); }
Use Yoda Condition checks, you must
diff --git a/lib/chef/knife/core/ui.rb b/lib/chef/knife/core/ui.rb index <HASH>..<HASH> 100644 --- a/lib/chef/knife/core/ui.rb +++ b/lib/chef/knife/core/ui.rb @@ -172,7 +172,7 @@ class Chef tf.sync = true tf.puts output tf.close - raise "Please set EDITOR environment variable. See https://docs.chef.io/knife_using.html for details." unless system("#{config[:editor]} #{tf.path}") + raise "Please set EDITOR environment variable. See https://docs.chef.io/knife_setup.html for details." unless system("#{config[:editor]} #{tf.path}") output = IO.read(tf.path) end diff --git a/lib/chef/knife/edit.rb b/lib/chef/knife/edit.rb index <HASH>..<HASH> 100644 --- a/lib/chef/knife/edit.rb +++ b/lib/chef/knife/edit.rb @@ -58,7 +58,7 @@ class Chef # Let the user edit the temporary file if !system("#{config[:editor]} #{file.path}") - raise "Please set EDITOR environment variable. See https://docs.chef.io/knife_using.html for details." + raise "Please set EDITOR environment variable. See https://docs.chef.io/knife_setup.html for details." end result_text = IO.read(file.path)
Update the knife editor error message to point to the correct document I updated the structure of the knife documentation a while back and we have a dedicated doc for setting up knife now.
diff --git a/src/unicode-decomposition.js b/src/unicode-decomposition.js index <HASH>..<HASH> 100644 --- a/src/unicode-decomposition.js +++ b/src/unicode-decomposition.js @@ -37,6 +37,11 @@ const MAP_CONVERSION = { '—': '-', '―': '-', /** + * @internal Normalizations (MELINDA-4172, MELINDA-4175) + **/ + 'Ⓒ': '©', + 'Ⓟ': '℗', + /** * @internal Precompose å, ä, ö, Å, Ä and Ö **/ å: 'å', @@ -52,6 +57,9 @@ const MAP_CONVERSION = { à: 'à', â: 'â', ã: 'ã', + ć: 'ć', + č: 'č', + ç: 'ç', é: 'é', è: 'è', ê: 'ê', @@ -68,6 +76,7 @@ const MAP_CONVERSION = { ô: 'ô', õ: 'õ', ś: 'ś', + š: 'š', ú: 'ú', ù: 'ù', û: 'û', @@ -78,6 +87,7 @@ const MAP_CONVERSION = { ŷ: 'ŷ', ỹ: 'ỹ', ÿ: 'ÿ', + ž: 'ž', Á: 'Á', À: 'À', Â: 'Â',
Normalize Ⓒ and Ⓟ. Decompose c-cedilla and few other consonants.
diff --git a/data/__init__.py b/data/__init__.py index <HASH>..<HASH> 100644 --- a/data/__init__.py +++ b/data/__init__.py @@ -1,3 +1,5 @@ +__version__ = '0.2.dev1' + from six import text_type, PY2
Added __version__ string.
diff --git a/dciclient/v1/tests/shell_commands/utils.py b/dciclient/v1/tests/shell_commands/utils.py index <HASH>..<HASH> 100644 --- a/dciclient/v1/tests/shell_commands/utils.py +++ b/dciclient/v1/tests/shell_commands/utils.py @@ -121,6 +121,29 @@ def provision(db_conn): team_admin_id = db_insert(models.TEAMS, name='admin') team_user_id = db_insert(models.TEAMS, name='user') + # Create the three mandatory roles + super_admin_role = { + 'name': 'Super Admin', + 'label': 'SUPER_ADMIN', + 'description': 'Admin of the platform', + } + + admin_role = { + 'name': 'Admin', + 'label': 'ADMIN', + 'description': 'Admin of a team', + } + + user_role = { + 'name': 'User', + 'label': 'USER', + 'description': 'Regular User', + } + + db_insert(models.ROLES, **admin_role) + db_insert(models.ROLES, **user_role) + db_insert(models.ROLES, **super_admin_role) + # Create users db_insert(models.USERS, name='user', role='user', password=user_pw_hash, team_id=team_user_id)
Roles: Create mandatory role in the dataset This commit aims to create the mandatory roles in the dataset used to run the test suite. Change-Id: I<I>a<I>ad1d<I>fdaba<I>c<I>d<I>db<I>e<I>a5d
diff --git a/src/etc/roles/literal/regionRole.js b/src/etc/roles/literal/regionRole.js index <HASH>..<HASH> 100644 --- a/src/etc/roles/literal/regionRole.js +++ b/src/etc/roles/literal/regionRole.js @@ -11,6 +11,7 @@ const regionRole: ARIARoleDefinition = { ], props: {}, relatedConcepts: [ + // frame tag on html5 is deprecated { module: 'HTML', concept: { @@ -18,6 +19,12 @@ const regionRole: ARIARoleDefinition = { }, }, { + module: 'HTML', + concept: { + name: 'section', + }, + }, + { concept: { name: 'Device Independence Glossart perceivable unit', }, @@ -42,4 +49,4 @@ const regionRole: ARIARoleDefinition = { ], }; -export default regionRole; \ No newline at end of file +export default regionRole;
frame tag is deprecated in html5, should add support to section tag
diff --git a/config/sentry.php b/config/sentry.php index <HASH>..<HASH> 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -36,6 +36,7 @@ return array( 'users_groups' => 'users_groups', 'users_metadata' => 'users_metadata', 'users_suspended' => 'users_suspended', + 'rules' => 'rules', ), /* @@ -151,6 +152,15 @@ return array( 'superuser' => 'superuser', /** + * Source of defined rules + * Possible choices: file / database. + * If file is chosen it reads the rules from config/sentry.php's permissions->rules array + * If database is chosen it reads the rules from the rules table defined in the table array + * + */ + 'rules_source' => 'file'; + + /** * The permission rules file * Must return an array with a 'rules' key. */ @@ -172,6 +182,8 @@ return array( ), /** + * !Ignored if database is selected instead of file! + * * setup rules for permissions * These are resources that will require access permissions. * Rules are assigned to groups or specific users in the
Modified the configurations, now supports rules stored in the database
diff --git a/eulfedora/server.py b/eulfedora/server.py index <HASH>..<HASH> 100644 --- a/eulfedora/server.py +++ b/eulfedora/server.py @@ -124,6 +124,7 @@ class Repository(object): default_object_type = DigitalObject "Default type to use for methods that return fedora objects - :class:`DigitalObject`" + default_pidspace = None search_fields = ['pid', 'label', 'state', 'ownerId', 'cDate', 'mDate', 'dcmDate', 'title', 'creator', 'subject', 'description', 'publisher',
define a default pidspace of None for server, to simplify passing default pidspace to DigitalObject
diff --git a/platform/html5/html.js b/platform/html5/html.js index <HASH>..<HASH> 100644 --- a/platform/html5/html.js +++ b/platform/html5/html.js @@ -68,6 +68,8 @@ StyleCache.prototype.classify = function(rules) { } var _modernizrCache = {} +if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) + _modernizrCache['appearance'] = '-webkit-appearance' var getPrefixedName = function(name) { var prefixedName = _modernizrCache[name]
Hack for unstandard '-webkit-appearance' property.
diff --git a/spec/helpers/canonical_rails/tag_helper_spec.rb b/spec/helpers/canonical_rails/tag_helper_spec.rb index <HASH>..<HASH> 100644 --- a/spec/helpers/canonical_rails/tag_helper_spec.rb +++ b/spec/helpers/canonical_rails/tag_helper_spec.rb @@ -4,7 +4,7 @@ describe CanonicalRails::TagHelper do before(:each) do controller.request.host = 'www.alternative-domain.com' - controller.request.path = 'our_resources' + controller.request.path = '/our_resources' end after(:each) do
spec: path should include a leading slash
diff --git a/src/Template/Pats/Pats.php b/src/Template/Pats/Pats.php index <HASH>..<HASH> 100644 --- a/src/Template/Pats/Pats.php +++ b/src/Template/Pats/Pats.php @@ -73,7 +73,7 @@ EOT; */ public static function addPats(array $pats) { - self::$pats = $pats + self::$pats; + self::$pats = $pats + self::getPats(); } /** @@ -85,11 +85,12 @@ EOT; */ public static function get($name) { - if (!isset(self::$pats[$name])) { + $pats = self::getPats(); + if (!isset($pats[$name])) { throw new \InvalidArgumentException(sprintf('Pat named "%s" doesn\'t exist', $name)); } - return self::$pats[$name]; + return $pats[$name]; } /** @@ -97,6 +98,8 @@ EOT; */ public static function getRandomPatName() { - return self::$pats[array_rand(array_keys(self::$pats))]; + $pats = self::getPats(); + + return array_rand($pats); } }
Fixes at `Pats`
diff --git a/src/com/joml/Matrix4f.java b/src/com/joml/Matrix4f.java index <HASH>..<HASH> 100644 --- a/src/com/joml/Matrix4f.java +++ b/src/com/joml/Matrix4f.java @@ -1545,9 +1545,9 @@ public class Matrix4f implements Serializable, Externalizable { float h = (float)Math.tan(Math.toRadians(fovy) * 0.5f) * zNear; float w = h * aspect; float fl = -w; - float fr = fl + 2.0f * w; + float fr = +w; float fb = -h; - float ft = fb + 2.0f * h; + float ft = +h; return frustum(fl, fr, fb, ft, zNear, zFar); }
Simpler computation of perspective frustum
diff --git a/flurs/tests/test_evaluator.py b/flurs/tests/test_evaluator.py index <HASH>..<HASH> 100644 --- a/flurs/tests/test_evaluator.py +++ b/flurs/tests/test_evaluator.py @@ -12,7 +12,7 @@ class EvaluatorTestCase(TestCase): def setUp(self): recommender = Popular() recommender.init_recommender() - self.evaluator = Evaluator(recommender, repeat=False) + self.evaluator = Evaluator(recommender=recommender, repeat=False) self.samples = [Event(User(0), Item(0), 1), Event(User(0), Item(1), 1),
Explicitly pass `recommender` to Evaluator
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java index <HASH>..<HASH> 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java @@ -186,7 +186,13 @@ public class TomcatWebServerFactoryCustomizer // The internal proxies default to a white list of "safe" internal IP // addresses valve.setInternalProxies(tomcatProperties.getInternalProxies()); - valve.setHostHeader(tomcatProperties.getHostHeader()); + try { + valve.setHostHeader(tomcatProperties.getHostHeader()); + } + catch (NoSuchMethodError ex) { + // Avoid failure with war deployments to Tomcat 8.5 before 8.5.44 and + // Tomcat 9 before 9.0.23 + } valve.setPortHeader(tomcatProperties.getPortHeader()); valve.setProtocolHeaderHttpsValue(tomcatProperties.getProtocolHeaderHttpsValue()); // ... so it's safe to add this valve by default.
Protect against NoSuchMethodError when deploying to old Tomcats Fixes gh-<I>
diff --git a/main.go b/main.go index <HASH>..<HASH> 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,7 @@ func (d *Daemon) RunClient() (err error) { } func (d *Daemon) Run() (err error) { + G.Daemon = true if err = d.ConfigRpcServer(); err != nil { return }
say we're a daemon
diff --git a/libkbfs/config_local.go b/libkbfs/config_local.go index <HASH>..<HASH> 100644 --- a/libkbfs/config_local.go +++ b/libkbfs/config_local.go @@ -1221,6 +1221,10 @@ func (c *ConfigLocal) Shutdown(ctx context.Context) error { if dbc != nil { dbc.Shutdown(ctx) } + dmc := c.DiskMDCache() + if dmc != nil { + dmc.Shutdown(ctx) + } kbfsServ := c.kbfsService if kbfsServ != nil { kbfsServ.Shutdown() diff --git a/libkbfs/disk_md_cache.go b/libkbfs/disk_md_cache.go index <HASH>..<HASH> 100644 --- a/libkbfs/disk_md_cache.go +++ b/libkbfs/disk_md_cache.go @@ -470,6 +470,7 @@ func (cache *DiskMDCacheLocal) Shutdown(ctx context.Context) { select { case <-cache.shutdownCh: cache.log.CWarningf(ctx, "Shutdown called more than once") + return default: } close(cache.shutdownCh)
config_local: shutdown disk md cache Otherwise each singleop git operation will leave one open.
diff --git a/lib/kaminari/helpers/action_view_extension.rb b/lib/kaminari/helpers/action_view_extension.rb index <HASH>..<HASH> 100644 --- a/lib/kaminari/helpers/action_view_extension.rb +++ b/lib/kaminari/helpers/action_view_extension.rb @@ -86,16 +86,10 @@ module Kaminari # <%= page_entries_info @posts, :entry_name => 'item' %> # #-> Displaying items 6 - 10 of 26 in total def page_entries_info(collection, options = {}) - if collection.empty? - entry_name = 'entry' - else - class_name = collection.first.class.name - entry_name = class_name.include?("::")? class_name.split("::").last : class_name - entry_name = entry_name.underscore.sub('_', ' ') - end + entry_name = 'entry' + entry_name = collection.first.class.model_name.human.downcase unless collection.empty? entry_name = options[:entry_name] unless options[:entry_name].nil? entry_name = entry_name.pluralize unless collection.total_count == 1 - output = "" if collection.num_pages < 2 output = t("helpers.page_entries_info.one_page.display_entries", { :count => collection.total_count, :entry_name => entry_name }) else
Following tip from @rtlong. =D
diff --git a/tests/changelog.py b/tests/changelog.py index <HASH>..<HASH> 100644 --- a/tests/changelog.py +++ b/tests/changelog.py @@ -184,13 +184,24 @@ class releases(Spec): assert self.b not in one_0_1 assert self.b2 in one_0_1 assert self.b3 in one_0_1 - # 1.1.1 includes all 3 + # 1.1.1 includes all 3 (i.e. the explicitness of 1.0.1 didn't affect + # the 1.1 line bucket.) assert self.b in one_1_1 assert self.b2 in one_1_1 assert self.b3 in one_1_1 - # Also ensure it affected 'unreleased' (both should be empty) - assert len(rendered[-1]['entries']) == 0 - assert len(rendered[-2]['entries']) == 0 + + def explicit_minor_releases_dont_clear_entire_unreleased_minor(self): + f1 = _issue('feature', '1') + f2 = _issue('feature', '2') + changelog = _release_list('1.2', '1.1', f1, f2) + # Ensure that 1.1 specifies feature 2 + changelog[0][1].append("2") + rendered = construct_releases(changelog, _app()) + # 1.1 should have feature 2 only + assert f2 in rendered[1]['entries'] + assert f1 not in rendered[1]['entries'] + # 1.2 should still get/see feature 1 + assert f1 in rendered[2]['entries'] def _obj2name(obj):
Shuffle out unreleased stuff into its own test
diff --git a/galpy/orbit_src/integrateFullOrbit.py b/galpy/orbit_src/integrateFullOrbit.py index <HASH>..<HASH> 100644 --- a/galpy/orbit_src/integrateFullOrbit.py +++ b/galpy/orbit_src/integrateFullOrbit.py @@ -123,7 +123,10 @@ def _parse_pot(pot,potforactions=False): pot_args.extend([p._amp,p._a]) elif isinstance(p,potential.SCFPotential): pot_type.append(24) - pot_args.extend([p._amp,p._NN[None,:,:]*p._Acos, p._NN[None,:,:]*p._Asin, p._a]) + pot_args.extend([p._amp, p._a]) + pot_args.extend(p._Acos.shape) + pot_args.extend(p._Acos.flatten(order='C')) + pot_args.extend(p._Asin.flatten(order='C')) pot_type= nu.array(pot_type,dtype=nu.int32,order='C') pot_args= nu.array(pot_args,dtype=nu.float64,order='C') return (npot,pot_type,pot_args)
Removed the NN multiplication from the SCFPotential case. Also added the shape of Acos and Asin, and flattened them.
diff --git a/ara/cli/playbook.py b/ara/cli/playbook.py index <HASH>..<HASH> 100644 --- a/ara/cli/playbook.py +++ b/ara/cli/playbook.py @@ -430,6 +430,12 @@ class PlaybookMetrics(Lister): help=("List playbooks matching the provided name (full or partial)"), ) parser.add_argument( + "--controller", + metavar="<controller>", + default=None, + help=("List playbooks that ran from the provided controller (full or partial)"), + ) + parser.add_argument( "--path", metavar="<path>", default=None, @@ -486,6 +492,9 @@ class PlaybookMetrics(Lister): if args.name is not None: query["name"] = args.name + if args.controller is not None: + query["controller"] = args.controller + if args.path is not None: query["path"] = args.path
cli: add missing controller arg to playbook metrics This provides the ability to get playbook metrics for a specific controller. Change-Id: I<I>abfc1bf6ef5e0ceb<I>da4f9a<I>a<I>ab
diff --git a/lib/github-auth.js b/lib/github-auth.js index <HASH>..<HASH> 100644 --- a/lib/github-auth.js +++ b/lib/github-auth.js @@ -120,10 +120,14 @@ function setRoutes(server) { // - Ensure tokens have been propagated to all servers // - Debug GitHub badge failures // - // The admin can authenticate with HTTP Basic Auth, with the shields secret - // in the username and an empty/any password. + // The admin can authenticate with HTTP Basic Auth, with an empty/any + // username and the shields secret in the password and an empty/any + // password. + // + // e.g. + // curl -u ':very-very-secret' 'https://example.com/$github-auth/tokens' server.ajax.on('github-auth/tokens', (json, end, ask) => { - if (! constEq(ask.username, serverSecrets.shieldsSecret)) { + if (! constEq(ask.password, serverSecrets.shieldsSecret)) { // An unknown entity tries to connect. Let the connection linger for a minute. return setTimeout(function() { end('Invalid secret.'); }, 10000); }
Github admin endpoint: use basic auth password instead of username (#<I>)
diff --git a/builtin/providers/aws/resource_aws_iam_user_login_profile_test.go b/builtin/providers/aws/resource_aws_iam_user_login_profile_test.go index <HASH>..<HASH> 100644 --- a/builtin/providers/aws/resource_aws_iam_user_login_profile_test.go +++ b/builtin/providers/aws/resource_aws_iam_user_login_profile_test.go @@ -90,7 +90,7 @@ func TestAccAWSUserLoginProfile_notAKey(t *testing.T) { { // We own this account but it doesn't have any key associated with it Config: testAccAWSUserLoginProfileConfig(username, "/", "lolimnotakey"), - ExpectError: regexp.MustCompile(`Error encrypting password`), + ExpectError: regexp.MustCompile(`Error encrypting Password`), }, }, })
provider/aws: Update regex to pass test
diff --git a/salt/modules/nix.py b/salt/modules/nix.py index <HASH>..<HASH> 100644 --- a/salt/modules/nix.py +++ b/salt/modules/nix.py @@ -35,7 +35,7 @@ def __virtual__(): This only works if we have access to nix-env ''' nixhome = os.path.join(os.path.expanduser('~{0}'.format(__opts__['user'])), '.nix-profile/bin/') - if salt.utils.which(os.path.join(nixhome, 'nix-env')) and salt.utils.which(os.path.join(nixhome, 'nix-store')): + if salt.utils.which(os.path.join(nixhome, 'nix-env')) and salt.utils.which(os.path.join(nixhome, 'nix-collect-garbage')): return True else: return (False, "The `nix` binaries required cannot be found or are not installed. (`nix-store` and `nix-env`)")
nix: Check for nix-collect-garbage I changed this from nix-store to nix-collect-garbage as the nix.collect_garbage function used to use `nix-store --gc`, but now just uses nix-collect-garbage.
diff --git a/classes/phing/tasks/system/AppendTask.php b/classes/phing/tasks/system/AppendTask.php index <HASH>..<HASH> 100644 --- a/classes/phing/tasks/system/AppendTask.php +++ b/classes/phing/tasks/system/AppendTask.php @@ -166,6 +166,15 @@ class AppendTask extends Task } /** + * Sets specific file to append. + * @param PhingFile $f + */ + public function setFile(PhingFile $f) + { + $this->file = $f; + } + + /** * Supports embedded <filelist> element. * * @return FileList
Update AppendTask.php (#<I>)
diff --git a/flight/template/View.php b/flight/template/View.php index <HASH>..<HASH> 100644 --- a/flight/template/View.php +++ b/flight/template/View.php @@ -122,9 +122,7 @@ class View { ob_start(); $this->render($file, $data); - $output = ob_get_contents(); - - ob_end_clean(); + $output = ob_get_clean(); return $output; }
Simplify output buffering code No need to use both ob_get_contents() and ob_end_clean() when you can just use ob_get_clean().
diff --git a/js/kucoin.js b/js/kucoin.js index <HASH>..<HASH> 100644 --- a/js/kucoin.js +++ b/js/kucoin.js @@ -356,7 +356,7 @@ module.exports = class kucoin extends Exchange { if (feeCurrency in this.currencies_by_id) feeCurrency = this.currencies_by_id[feeCurrency]['code']; } - }; + } let feeCost = this.safeFloat (order, 'fee'); let fee = { 'cost': this.safeFloat (order, 'feeTotal', feeCost),
removed unnecessary semicolon from kucoin parseOrder, minor typo
diff --git a/lib/inherited_views/base.rb b/lib/inherited_views/base.rb index <HASH>..<HASH> 100644 --- a/lib/inherited_views/base.rb +++ b/lib/inherited_views/base.rb @@ -82,7 +82,7 @@ module InheritedViews def render_or_default(name, args = {}) render name, args rescue ActionView::MissingTemplate - render "#{self.class.default_views}/#{name}", args + render args.merge(:template => "#{self.class.default_views}/#{name}", :prefix => '') end end
Ensure that we force the proper template file to be rendered when rendering the default
diff --git a/backend/product-browse.go b/backend/product-browse.go index <HASH>..<HASH> 100644 --- a/backend/product-browse.go +++ b/backend/product-browse.go @@ -83,6 +83,9 @@ func InitProductBrowse() { RegisterSample("samples_templates/product_page", renderProduct) RegisterSampleEndpoint("samples_templates/product_browse_page", SEARCH, handleSearchRequest) http.HandleFunc("/samples_templates/products", handleProductsRequest) + http.HandleFunc(ADD_TO_CART_PATH, func(w http.ResponseWriter, r *http.Request) { + handlePost(w, r, addToCart) + }) cache = NewLRUCache(100) }
Fix shopping cart (#<I>) * Fix shopping cart * Fix style
diff --git a/pp/channel.py b/pp/channel.py index <HASH>..<HASH> 100644 --- a/pp/channel.py +++ b/pp/channel.py @@ -108,7 +108,7 @@ class Channel(GenericChannel): raise ValueError("Cannot define a channel with neither name " "nor wavelength range.") - if not isinstance(resolution, int): + if not isinstance(resolution, (int, float)): raise TypeError("Resolution must be an integer number of meters.") self.resolution = resolution
Resolution can now be a floating point number.
diff --git a/rest_hooks/__init__.py b/rest_hooks/__init__.py index <HASH>..<HASH> 100644 --- a/rest_hooks/__init__.py +++ b/rest_hooks/__init__.py @@ -1 +1 @@ -VERSION = (1, 4, 3) +VERSION = (1, 5, 0)
Updates version tuple for release Updates tuple for <I> release
diff --git a/src/Drupal/DrupalExtension/Context/DrupalContext.php b/src/Drupal/DrupalExtension/Context/DrupalContext.php index <HASH>..<HASH> 100644 --- a/src/Drupal/DrupalExtension/Context/DrupalContext.php +++ b/src/Drupal/DrupalExtension/Context/DrupalContext.php @@ -420,7 +420,14 @@ class DrupalContext extends MinkContext implements DrupalAwareInterface, Transla // Use a step 'I press the "Esc" key in the "LABEL" field' to close // autocomplete suggestion boxes with Mink. "Click" events on the // autocomplete suggestion do not work. - $this->getSession()->wait(1000, 'jQuery("#autocomplete").length === 0'); + try { + $this->getSession()->wait(1000, 'jQuery("#autocomplete").length === 0'); + } + catch (UnsupportedDriverActionException $e) { + // The jQuery probably failed because the driver does not support + // javascript. That is okay, because if the driver does not support + // javascript, it does not support autocomplete boxes either. + } // Use the Mink Extension step definition. return parent::pressButton($button);
Add support for drivers that do not support Javascript. * <URL>
diff --git a/bigchaindb/backend/rethinkdb/query.py b/bigchaindb/backend/rethinkdb/query.py index <HASH>..<HASH> 100644 --- a/bigchaindb/backend/rethinkdb/query.py +++ b/bigchaindb/backend/rethinkdb/query.py @@ -134,7 +134,7 @@ def get_votes_by_block_id_and_voter(connection, block_id, node_pubkey): def write_block(connection, block): return connection.run( r.table('bigchain') - .insert(r.json(block), durability=WRITE_DURABILITY)) + .insert(r.json(block.to_str()), durability=WRITE_DURABILITY)) @register_query(RethinkDBConnection) diff --git a/bigchaindb/core.py b/bigchaindb/core.py index <HASH>..<HASH> 100644 --- a/bigchaindb/core.py +++ b/bigchaindb/core.py @@ -516,7 +516,7 @@ class Bigchain(object): block (Block): block to write to bigchain. """ - return backend.query.write_block(self.connection, block.to_str()) + return backend.query.write_block(self.connection, block) def transaction_exists(self, transaction_id): return backend.query.has_transaction(self.connection, transaction_id)
fix mongodb write_block without thouching mongodb code
diff --git a/peng3d/util/__init__.py b/peng3d/util/__init__.py index <HASH>..<HASH> 100644 --- a/peng3d/util/__init__.py +++ b/peng3d/util/__init__.py @@ -195,12 +195,12 @@ class calculated_from(object): *args ) self.multiargs: bool = len(args) != 1 - self.func: Optional[Callable[[...], T]] = None + self.func: Optional[Callable[[Any], T]] = None # self.hashcode: Optional[int] = None # self.cached_value: T = None - def __call__(self, func: Callable[[...], T]) -> Callable[[...], T]: + def __call__(self, func: Callable[[Any], T]) -> Callable[[Any], T]: self.func = func return self._call
Fixed broken tests/RTD builds on Python <= <I>
diff --git a/Net/OpenID/OIDUtil.php b/Net/OpenID/OIDUtil.php index <HASH>..<HASH> 100644 --- a/Net/OpenID/OIDUtil.php +++ b/Net/OpenID/OIDUtil.php @@ -21,6 +21,25 @@ $_Net_OpenID_digits = "0123456789"; $_Net_OpenID_punct = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; /** + * Convenience function for getting array values. + */ +function Net_OpenID_array_get($arr, $key, $fallback = null) +{ + if (is_array($arr)) { + if (array_key_exists($key, $arr)) { + return $arr[$key]; + } else { + return $fallback; + } + } else { + trigger_error("Net_OpenID_array_get expected " . + "array as first parameter", E_USER_WARNING); + return false; + } +} + + +/** * Prints the specified message using trigger_error(E_USER_NOTICE). */ function Net_OpenID_log($message, $unused_level = 0)
[project @ Added array_get convenience function]
diff --git a/tests/test_integration.py b/tests/test_integration.py index <HASH>..<HASH> 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -73,7 +73,6 @@ def test_execute_conda_wrappers(tmpdir, monkeypatch): 'installed and added to PATH env var') subprocess.check_call(['conda', 'create', - '--offline', '--clone', 'root', '-p', 'conda envs/test'])
Don't use --offline when cloning the conda env It's not guaranteed that all packages are already cached.
diff --git a/lib/node_modules/@stdlib/math/generics/statistics/kstest/lib/cdf.js b/lib/node_modules/@stdlib/math/generics/statistics/kstest/lib/cdf.js index <HASH>..<HASH> 100644 --- a/lib/node_modules/@stdlib/math/generics/statistics/kstest/lib/cdf.js +++ b/lib/node_modules/@stdlib/math/generics/statistics/kstest/lib/cdf.js @@ -8,6 +8,7 @@ var CDF = {}; +CDF[ 'arcsine' ] = require( '@stdlib/math/base/dist/arcsine/cdf' ); CDF[ 'beta' ] = require( '@stdlib/math/base/dist/beta/cdf' ); CDF[ 'cauchy' ] = require( '@stdlib/math/base/dist/cauchy/cdf' ); CDF[ 'chisquare' ] = require( '@stdlib/math/base/dist/chisquare/cdf' );
Support arcsine in kstest
diff --git a/spinoff/util/testing.py b/spinoff/util/testing.py index <HASH>..<HASH> 100644 --- a/spinoff/util/testing.py +++ b/spinoff/util/testing.py @@ -197,6 +197,8 @@ class Container(MockActor): # from Actor, so __exit__ is not DRY etc. There might be a way to refactor Actor to allow for a more elegant # implementation of this class. + _actor = None + def __init__(self, actor_cls=None, start_automatically=True): super(Container, self).__init__() self._actor_cls = actor_cls
Added support for 'with testing.contain(None) as (container, _)' for consistency/completeness
diff --git a/lib/how_is/cli.rb b/lib/how_is/cli.rb index <HASH>..<HASH> 100644 --- a/lib/how_is/cli.rb +++ b/lib/how_is/cli.rb @@ -23,7 +23,7 @@ module HowIs # Parses +argv+ to generate an options Hash to control the behavior of # the library. def parse(argv) - opts, options = parse_main(argv) + parser, options = parse_main(argv) # Options that are mutually-exclusive with everything else. options = {:help => true} if options[:help] @@ -32,8 +32,7 @@ module HowIs validate_options!(options) @options = options - @parser = opts - @help_text = @parser.to_s + @help_text = parser.to_s self end
miscellaneous cleanup of CLI code.
diff --git a/will/__init__.py b/will/__init__.py index <HASH>..<HASH> 100644 --- a/will/__init__.py +++ b/will/__init__.py @@ -0,0 +1 @@ +VERSION = "0.6.6" \ No newline at end of file
Bugfix to tagging script.
diff --git a/spyderlib/config.py b/spyderlib/config.py index <HASH>..<HASH> 100644 --- a/spyderlib/config.py +++ b/spyderlib/config.py @@ -589,8 +589,8 @@ DEFAULTS = [ # ---- IDLE ---- # Name Color Bold Italic 'idle/background': "#ffffff", - 'idle/currentline': "#d9e8c9", - 'idle/currentcell': "#f9ffe7", + 'idle/currentline': "#e3e7d3", + 'idle/currentcell': "#edf1dc", 'idle/occurence': "#e8f2fe", 'idle/ctrlclick': "#0000ff", 'idle/sideareas': "#efefef", @@ -661,7 +661,7 @@ DEFAULTS = [ # ---- Spyder ---- # Name Color Bold Italic 'spyder/background': "#ffffff", - 'spyder/currentline': "#d8d8bd", + 'spyder/currentline': "#e6e6c9", 'spyder/currentcell': "#fcfcdc", 'spyder/occurence': "#ffff99", 'spyder/ctrlclick': "#0000ff",
Spyder and IDLE schemes (edited online with Bitbucket)
diff --git a/server/src/main/java/org/cloudfoundry/identity/uaa/util/UaaMapUtils.java b/server/src/main/java/org/cloudfoundry/identity/uaa/util/UaaMapUtils.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/org/cloudfoundry/identity/uaa/util/UaaMapUtils.java +++ b/server/src/main/java/org/cloudfoundry/identity/uaa/util/UaaMapUtils.java @@ -113,7 +113,7 @@ public class UaaMapUtils { return new AbstractMap.SimpleEntry<>(key, value); } - public static <K extends Comparable<? super K>, V extends Object> Map<K, V> sortByKeys(Map<K,V> map) { + public static <K extends Comparable<? super K>, V> Map<K, V> sortByKeys(Map<K,V> map) { List<Entry<K, V>> sortedEntries = map .entrySet() .stream() @@ -130,7 +130,7 @@ public class UaaMapUtils { return result; } - public static <K extends Comparable<? super K>, V extends Object> String prettyPrintYaml(Map<K,V> map) { + public static <K extends Comparable<? super K>, V> String prettyPrintYaml(Map<K,V> map) { DumperOptions dump = new DumperOptions(); dump.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); dump.setPrettyFlow(true);
Type parameter doesn't need to explictly extend Object [#<I>]
diff --git a/lib/jets/commands/base.rb b/lib/jets/commands/base.rb index <HASH>..<HASH> 100644 --- a/lib/jets/commands/base.rb +++ b/lib/jets/commands/base.rb @@ -138,6 +138,8 @@ class Jets::Commands::Base < Thor def eager_load! return if Jets::Turbo.afterburner? + # Jets::Dotenv.load! - so ENV vars can be used in class definitions. + Jets::Dotenv.load! Jets.application.setup_auto_load_paths # in case an app/extension is defined Jets::Autoloaders.once.eager_load end
allow usage of env vars in class methods
diff --git a/src/candela/util/vega/index.js b/src/candela/util/vega/index.js index <HASH>..<HASH> 100644 --- a/src/candela/util/vega/index.js +++ b/src/candela/util/vega/index.js @@ -206,7 +206,7 @@ let templateFunctions = { type: 'linear', zero: false, domain: {data: params.data, field: params.field}, - range: ['#dfd', 'green'] + range: ['#df2709', '#2709df'] }; },
Use a red-to-blue default colormap for Vega components
diff --git a/command/agent/testagent.go b/command/agent/testagent.go index <HASH>..<HASH> 100644 --- a/command/agent/testagent.go +++ b/command/agent/testagent.go @@ -130,7 +130,7 @@ func (a *TestAgent) Start() *TestAgent { a.Agent = agent a.Agent.LogOutput = a.LogOutput a.Agent.LogWriter = a.LogWriter - retry.Run(&panicFailer{}, func(r *retry.R) { + retry.RunWith(retry.ThreeTimes(), &panicFailer{}, func(r *retry.R) { err := a.Agent.Start() if err == nil { return
test: use less aggressive retry for agent startup
diff --git a/src/PHPCoverFish/Common/Base/BaseCoverFishOutput.php b/src/PHPCoverFish/Common/Base/BaseCoverFishOutput.php index <HASH>..<HASH> 100644 --- a/src/PHPCoverFish/Common/Base/BaseCoverFishOutput.php +++ b/src/PHPCoverFish/Common/Base/BaseCoverFishOutput.php @@ -45,7 +45,7 @@ abstract class BaseCoverFishOutput protected $outputFormat; /** - * @var string + * @var int */ protected $outputLevel; @@ -85,13 +85,13 @@ abstract class BaseCoverFishOutput protected $scanFailure; /** - * @param $content + * @param string $content * * @return null on json */ protected function writeLine($content) { - if (true === $this->outputFormatJson || -1 === $this->outputLevel) { + if (true === $this->outputFormatJson) { return null; } @@ -99,13 +99,13 @@ abstract class BaseCoverFishOutput } /** - * @param $content + * @param string $content * * @return null on json */ protected function write($content) { - if (true === $this->outputFormatJson || -1 === $this->outputLevel) { + if (true === $this->outputFormatJson) { return null; }
fix base output class, scrutinizer issues
diff --git a/core/lib/torquebox/option_utils.rb b/core/lib/torquebox/option_utils.rb index <HASH>..<HASH> 100644 --- a/core/lib/torquebox/option_utils.rb +++ b/core/lib/torquebox/option_utils.rb @@ -63,7 +63,7 @@ module TorqueBox extracted_options = {} options.each_pair do |key, value| if opts_hash.include?(key) - extracted_options[opts_hash[key]] = value + extracted_options[opts_hash[key]] = value.is_a?(Symbol) ? value.to_s : value end end extracted_options
Coerce symbol option values to strings. This allows symbols to be used when the wunderboss value is a String without requiring manual coercion.
diff --git a/src/ModuleConfig/ModuleConfig.php b/src/ModuleConfig/ModuleConfig.php index <HASH>..<HASH> 100644 --- a/src/ModuleConfig/ModuleConfig.php +++ b/src/ModuleConfig/ModuleConfig.php @@ -346,6 +346,8 @@ class ModuleConfig */ protected function prefixMessages($messages, $prefix) { + $result = []; + $prefix = (string)$prefix; // Convert single messages to array @@ -354,9 +356,9 @@ class ModuleConfig } // Prefix all messages - $messages = array_map(function ($item) use ($prefix) { - return sprintf("[%s][%s] %s : %s", $this->module, $this->configType, $prefix, $item); - }, $messages); + foreach ($messages as $message) { + $result[] = sprintf("[%s][%s] %s : %s", $this->module, $this->configType, $prefix, $message); + } return $messages; }
Replaced array_map() with foreach() for clarity (task #<I>) Simple foreach() is easier to read than the array_map() with the closure. Also, it might be slightly faster and/or consume less memory. Read more: <URL>
diff --git a/auth_server/authn/ldap_auth.go b/auth_server/authn/ldap_auth.go index <HASH>..<HASH> 100755 --- a/auth_server/authn/ldap_auth.go +++ b/auth_server/authn/ldap_auth.go @@ -92,8 +92,9 @@ func (la *LDAPAuth) bindReadOnlyUser(l *ldap.Conn) error { if err != nil { return err } - glog.V(2).Infof("Bind read-only user %s", string(password)) - err = l.Bind(la.config.BindDN, string(password)) + password_str := strings.TrimSpace(string(password)) + glog.V(2).Infof("Bind read-only user %s", password_str) + err = l.Bind(la.config.BindDN, password_str) if err != nil { return err }
Trim space from LDAP password before use Makes it editor-friendly.
diff --git a/src/Auth/ShibbolethAuthenticate.php b/src/Auth/ShibbolethAuthenticate.php index <HASH>..<HASH> 100644 --- a/src/Auth/ShibbolethAuthenticate.php +++ b/src/Auth/ShibbolethAuthenticate.php @@ -11,7 +11,7 @@ use Cake\Http\Response; class ShibbolethAuthenticate extends BaseAuthenticate { - protected $mod_rewrite_prefix = 'REDIRECT_'; + const MOD_REWRITE_PREFIX = 'REDIRECT_'; /** * Contains the key-value mapping between Shibooleth attributes and users properties @@ -195,17 +195,16 @@ class ShibbolethAuthenticate extends BaseAuthenticate { $repeat = 0; $value = null; - - while(!isset($value) && $repeat < 5) + while (!isset($value) && $repeat < 6) { - $value = $request->getEnv($this->mod_rewrite_prefix . $attribute_name); + $value = $request->getEnv($attribute_name); if(isset($value)) { return $value; } - $attribute_name = $this->mod_rewrite_prefix . $attribute_name; + $attribute_name = self::MOD_REWRITE_PREFIX . $attribute_name; $repeat++; }
ShibbolethAuthenticate: try first to get Shibboleth attributes without mode_rewrite prefix
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ setup(name="ctypeslib", author="Thomas Heller", author_email="theller@ctypes.org", license="MIT License", - version = "0.5.0", + version = "0.5.1", ## url="http://starship.python.net/crew/theller/ctypes.html", ## platforms=["windows", "Linux", "MacOS X", "Solaris", "FreeBSD"],
Change the version number to the setup script (only to experiment with easy_install). git-svn-id: <URL>
diff --git a/lib/form/areafiles.php b/lib/form/areafiles.php index <HASH>..<HASH> 100644 --- a/lib/form/areafiles.php +++ b/lib/form/areafiles.php @@ -6,16 +6,19 @@ class MoodleQuickForm_areafiles extends HTML_QuickForm_element { protected $_helpbutton = ''; protected $_options = array('subdirs'=>0, 'maxbytes'=>0); - function MoodleQuickForm_areafiles($elementName=null, $elementLabel=null, $options=null) { + function MoodleQuickForm_areafiles($elementName=null, $elementLabel=null, $options=null, $attributes=null) { global $CFG; - if (!empty($options['subdirs'])) { - $this->_options['subdirs'] = 1; + $options = (array)$options; + foreach ($options as $name=>$value) { + if (array_key_exists($name, $this->_options)) { + $this->_options[$name] = $value; + } } if (!empty($options['maxbytes'])) { $this->_options['maxbytes'] = get_max_upload_file_size($CFG->maxbytes, $options['maxbytes']); } - parent::HTML_QuickForm_element($elementName, $elementLabel); + parent::HTML_QuickForm_element($elementName, $elementLabel, $attributes); } function setName($name) {
MDL-<I> minor constructor improvements
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -66,6 +66,9 @@ module.exports = (opts = {}) => { if (!passthrough) { const msg = debug ? e.message : 'Authentication Error'; ctx.throw(401, msg, { originalError: e }); + }else{ + //lets downstream middlewares handle JWT exceptions + ctx.state.jwtOriginalError = e; } }
error handling when passthrough is on Let downstream middlewares handle verification exceptions
diff --git a/lib/WeChatApp.php b/lib/WeChatApp.php index <HASH>..<HASH> 100644 --- a/lib/WeChatApp.php +++ b/lib/WeChatApp.php @@ -689,6 +689,21 @@ class WeChatApp extends Base } /** + * Returns the text content or click event key + * + * @return bool|string + */ + public function getKeyword() + { + if ($this->getMsgType() == 'text') { + return strtolower($this->getContent()); + } elseif ($this->getMsgType() == 'event' && $this->getEvent() == 'click') { + return strtolower($this->getEventKey()); + } + return false; + } + + /** * Generate message for output * * @param string $type The type of message
added getKeyword for weChatApp service
diff --git a/src/Rcm/Repository/Site.php b/src/Rcm/Repository/Site.php index <HASH>..<HASH> 100644 --- a/src/Rcm/Repository/Site.php +++ b/src/Rcm/Repository/Site.php @@ -127,10 +127,10 @@ class Site extends EntityRepository ->where('site.siteId = :siteId') ->setParameter('siteId', $siteId); -// if ($checkActive) { -// $queryBuilder->andWhere('site.status = :status'); -// $queryBuilder->setParameter('status', 'A'); -// } + if ($checkActive) { + $queryBuilder->andWhere('site.status = :status'); + $queryBuilder->setParameter('status', 'A'); + } $result = $queryBuilder->getQuery()->getScalarResult();
Disable sites Enable sites Uncomment some code
diff --git a/app/models/multi_client/client.rb b/app/models/multi_client/client.rb index <HASH>..<HASH> 100644 --- a/app/models/multi_client/client.rb +++ b/app/models/multi_client/client.rb @@ -8,6 +8,10 @@ module MultiClient scope :enabled, -> { where(enabled: true) } + def self.master + where(identifier: Configuration.master_tenant_identifier).first + end + def self.current_id=(id) Thread.current[:client_id] = id end @@ -36,10 +40,12 @@ module MultiClient original_id = current_id begin self.current_id = tenant.id + Rails.logger.info "Temporarily set tenant id to #{tenant.id}" block.call rescue raise ensure + Rails.logger.info "Restored tenant id to #{original_id}" self.current_id = original_id end end
Added log message when setting master. Added master query method.
diff --git a/tests/test_bdist.py b/tests/test_bdist.py index <HASH>..<HASH> 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -39,6 +39,9 @@ class BuildTestCase(support.TempdirManager, for name in names: subcmd = cmd.get_finalized_command(name) + if getattr(subcmd, '_unsupported', False): + # command is not supported on this build + continue self.assertTrue(subcmd.skip_build, '%s should take --skip-build from bdist' % name) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index <HASH>..<HASH> 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -5,6 +5,8 @@ from test.support import run_unittest from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support +@unittest.skipIf(getattr(bdist_wininst, '_unsupported', False), + 'bdist_wininst is not supported in this install') class BuildWinInstTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase):
bpo-<I>: Fixes missing venv files and other tests (GH-<I>)
diff --git a/lib/mongoid/relations/eager.rb b/lib/mongoid/relations/eager.rb index <HASH>..<HASH> 100644 --- a/lib/mongoid/relations/eager.rb +++ b/lib/mongoid/relations/eager.rb @@ -23,11 +23,9 @@ module Mongoid def preload(relations, docs) grouped_relations = relations.group_by(&:inverse_class_name) - grouped_relations.keys.each do |klass| - grouped_relations[klass] = grouped_relations[klass].group_by(&:relation) - end - grouped_relations.each do |_klass, associations| - associations.each do |relation, association| + grouped_relations.values.each do |associations| + associations.group_by(&:relation) + .each do |relation, association| relation.eager_load_klass.new(association, docs).run end end
Remove double iteration on grouped relations
diff --git a/grade/lib.php b/grade/lib.php index <HASH>..<HASH> 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -1002,6 +1002,11 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null, grade_extend_settings($plugin_info, $courseid); } + // Set the current report as active in the breadcrumbs. + if ($active_plugin !== null && $reportnav = $PAGE->settingsnav->find($active_plugin, navigation_node::TYPE_SETTING)) { + $reportnav->make_active(); + } + $returnval = $OUTPUT->header(); if (!$return) {
MDL-<I> grade: Ensure report appears in breadcrumbs
diff --git a/Kwc/Abstract/Cards/Generator.php b/Kwc/Abstract/Cards/Generator.php index <HASH>..<HASH> 100644 --- a/Kwc/Abstract/Cards/Generator.php +++ b/Kwc/Abstract/Cards/Generator.php @@ -25,8 +25,8 @@ class Kwc_Abstract_Cards_Generator extends Kwf_Component_Generator_Static $cc = $select->getPart(Kwf_Component_Select::WHERE_COMPONENT_CLASSES); if (is_array($parentData)) { } else { - $row = $this->_getModel()->getRow($parentData->dbId); - if (!in_array($this->_settings['component'][$row->component], $cc)) return null; + $component = $this->_getModel()->fetchColumnByPrimaryId('component', $parentData->dbId); + if (!$component || !in_array($this->_settings['component'][$component], $cc)) return null; } } return parent::_formatSelect($parentData, $select);
use more efficient fetchColumnByPrimaryId method to get the selected component
diff --git a/src/com/google/javascript/jscomp/DefaultPassConfig.java b/src/com/google/javascript/jscomp/DefaultPassConfig.java index <HASH>..<HASH> 100644 --- a/src/com/google/javascript/jscomp/DefaultPassConfig.java +++ b/src/com/google/javascript/jscomp/DefaultPassConfig.java @@ -46,6 +46,7 @@ import com.google.javascript.jscomp.lint.CheckUselessBlocks; import com.google.javascript.jscomp.parsing.ParserRunner; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -394,7 +395,10 @@ public final class DefaultPassConfig extends PassConfig { checks.add(checkAccessControls); } - checks.add(checkConsts); + if (!options.getNewTypeInference()) { + // NTI performs this check already + checks.add(checkConsts); + } // Analyzer checks must be run after typechecking. if (options.enables(DiagnosticGroups.ANALYZER_CHECKS)) {
[NTI] Don't run checkConsts when NTI is enabled. ------------- Created by MOE: <URL>
diff --git a/_demos/editbox.go b/_demos/editbox.go index <HASH>..<HASH> 100644 --- a/_demos/editbox.go +++ b/_demos/editbox.go @@ -2,13 +2,14 @@ package main import ( "github.com/nsf/termbox-go" + "github.com/mattn/go-runewidth" "unicode/utf8" ) func tbprint(x, y int, fg, bg termbox.Attribute, msg string) { for _, c := range msg { termbox.SetCell(x, y, c, fg, bg) - x++ + x += runewidth.RuneWidth(c) } }
fix tbprint for multi-width characters
diff --git a/core-bundle/src/Resources/contao/library/Contao/System.php b/core-bundle/src/Resources/contao/library/Contao/System.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Resources/contao/library/Contao/System.php +++ b/core-bundle/src/Resources/contao/library/Contao/System.php @@ -438,7 +438,7 @@ abstract class System /** - * Return the counties as array + * Return the countries as array * * @return array An array of country names */
[Core] Fixed a typo in the `getCountries()` phpDoc
diff --git a/salt/runners/survey.py b/salt/runners/survey.py index <HASH>..<HASH> 100644 --- a/salt/runners/survey.py +++ b/salt/runners/survey.py @@ -152,7 +152,7 @@ def _get_pool_results(*args, **kwargs): expr_form = kwargs.get('expr_form', 'compound') if expr_form not in ['compound', 'pcre']: - expr_form='compound' + expr_form = 'compound' client = salt.client.get_local_client(__opts__['conf_file']) try:
regular expressions in specifiing targets for salt-run survey.diff, hash
diff --git a/src/AssetManager/Service/AssetManager.php b/src/AssetManager/Service/AssetManager.php index <HASH>..<HASH> 100644 --- a/src/AssetManager/Service/AssetManager.php +++ b/src/AssetManager/Service/AssetManager.php @@ -27,6 +27,20 @@ class AssetManager return $this; } + public function send($file) + { + $finfo = new finfo(FILEINFO_MIME); + $mimeType = $finfo->file($file); + $fileinfo = new SplFileInfo($file); + $file = $fileinfo->openFile('rb'); + + header("Content-Type: $mimeType"); + header("Content-Length: " . $file->getSize()); + + $file->fpassthru(); + exit; + } + public function setServiceLocator(ServiceLocatorInterface $serviceLocator) { $this->serviceLocator = $serviceLocator;
Added send method to send file to client
diff --git a/yubico/yubico.py b/yubico/yubico.py index <HASH>..<HASH> 100644 --- a/yubico/yubico.py +++ b/yubico/yubico.py @@ -194,13 +194,12 @@ class Yubico(): if signature != generated_signature: raise SignatureVerificationError(generated_signature, signature) - param_dict = self.get_parameters_as_dictionary(parameters) - if param_dict.get('otp', otp) != otp: + if 'otp' in param_dict and param_dict['dict'] != otp: raise InvalidValidationResponse('Unexpected OTP in response. Possible attack!', response, param_dict) - if param_dict.get('nonce', nonce) != nonce: + if 'nonce' in param_dict and param_dict['nonce'] != nonce: raise InvalidValidationResponse('Unexpected nonce in response. Possible attack!', response, param_dict)
Only check otp and nonce if they are present in the response.
diff --git a/spec/level_spec.rb b/spec/level_spec.rb index <HASH>..<HASH> 100644 --- a/spec/level_spec.rb +++ b/spec/level_spec.rb @@ -1,6 +1,10 @@ require 'level' describe Level do + before(:all) do + IO.any_instance.stub(:puts) + end + describe '#initialize' do it 'exits when level is not defined' do expect { Level.new(:undefined_level) }.to raise_error SystemExit
Stub 'puts' to avoid some echoing from the tests
diff --git a/base/src/main/java/uk/ac/ebi/atlas/experimentimport/admin/ExperimentAdminHelpPage.java b/base/src/main/java/uk/ac/ebi/atlas/experimentimport/admin/ExperimentAdminHelpPage.java index <HASH>..<HASH> 100644 --- a/base/src/main/java/uk/ac/ebi/atlas/experimentimport/admin/ExperimentAdminHelpPage.java +++ b/base/src/main/java/uk/ac/ebi/atlas/experimentimport/admin/ExperimentAdminHelpPage.java @@ -21,6 +21,12 @@ public class ExperimentAdminHelpPage { addLine(result, title); addLine(result, StringUtils.repeat('-', title.length())); addLine(result,""); + addLine(result, "### Usage"); + addLine(result,""); + addLine(result, "admin/experiments/<accessions>/<ops>"); + addLine(result,"e.g."); + addLine(result, "admin/experiments/E-MTAB-513/update_design"); + addLine(result,""); addLine(result, "### Operations by name"); addLine(result,""); for(Op op: Op.values()){
The help page explanation gets a bit longer
diff --git a/sacred/optional.py b/sacred/optional.py index <HASH>..<HASH> 100644 --- a/sacred/optional.py +++ b/sacred/optional.py @@ -13,6 +13,10 @@ class MissingDependencyMock(object): raise ImportError('Depends on missing "{}" package.' .format(object.__getattribute__(self, 'depends_on'))) + def __call__(self, *args, **kwargs): + raise ImportError('Depends on missing "{}" package.' + .format(object.__getattribute__(self, 'depends_on'))) + try: import numpy as np diff --git a/tests/conftest.py b/tests/conftest.py index <HASH>..<HASH> 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -42,7 +42,7 @@ def pytest_generate_tests(metafunc): if 'example_test' in metafunc.fixturenames: examples = [f.strip('.py') for f in os.listdir(EXAMPLES_PATH) if os.path.isfile(os.path.join(EXAMPLES_PATH, f)) and - f.endswith('.py')] + f.endswith('.py') and f != '__init__.py'] sys.path.append(EXAMPLES_PATH) example_tests = []
MissingDependencyMock is now callable
diff --git a/cpnet/qstest.py b/cpnet/qstest.py index <HASH>..<HASH> 100644 --- a/cpnet/qstest.py +++ b/cpnet/qstest.py @@ -47,7 +47,7 @@ def qstest( significance_level=0.05, null_model=config_model, sfunc=sz_n, - num_of_rand_net=300, + num_of_rand_net=100, q_tilde=[], s_tilde=[], **params @@ -106,7 +106,7 @@ def qstest( if len(q_tilde) == 0: results = [] for _ in tqdm(range(num_of_rand_net)): - results+=sampling(G, cpa, sfunc, null_model) + results+=[sampling(G, cpa, sfunc, null_model)] if isinstance(results[0]["q"], list): q_tilde = np.array(sum([res["q"] for res in results], [])) else:
fix compatilibity issue with numba and add test scripts
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go index <HASH>..<HASH> 100644 --- a/bridge/mattermost/mattermost.go +++ b/bridge/mattermost/mattermost.go @@ -181,7 +181,7 @@ func (b *Bmattermost) handleMatterClient(mchan chan *MMMessage) { m.Text = message.Text + b.Config.EditSuffix } if len(message.Post.FileIds) > 0 { - for _, link := range b.mc.GetPublicLinks(message.Post.FileIds) { + for _, link := range b.mc.GetFileLinks(message.Post.FileIds) { m.Text = m.Text + "\n" + link } }
Use GetFileLinks. Also show links to non-public files (mattermost)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ setup( maintainer_email="tribaal@gmail.com", url="http://www.xhtml2pdf.com", keywords="PDF, HTML, XHTML, XML, CSS", - install_requires = ["html5lib", "pypdf", "pil", "reportlab"], + install_requires = ["html5lib", "pyPdf", "Pillow", "reportlab"], include_package_data = True, packages=find_packages(exclude=["tests", "tests.*"]), # test_suite = "tests", They're not even working yet
Update setup.py to use Pillow rather than PIL PIL is old and broken, using Pillow instead to support modern systems.
diff --git a/Resources/public/js/components/products/components/attributes/main.js b/Resources/public/js/components/products/components/attributes/main.js index <HASH>..<HASH> 100644 --- a/Resources/public/js/components/products/components/attributes/main.js +++ b/Resources/public/js/components/products/components/attributes/main.js @@ -353,7 +353,6 @@ define([ this.status = !!this.options.data ? this.options.data.status : Config.get('product.status.active'); this.render(); - } }; });
Remove empty line at the end of function
diff --git a/lib/GoCardless/Request.php b/lib/GoCardless/Request.php index <HASH>..<HASH> 100644 --- a/lib/GoCardless/Request.php +++ b/lib/GoCardless/Request.php @@ -84,6 +84,10 @@ class GoCardless_Request { // Request format $curl_options[CURLOPT_HTTPHEADER][] = 'Accept: application/json'; + // Enable SSL certificate validation. + // This is true by default since libcurl 7.1. + $curl_options[CURLOPT_SSL_VERIFYPEER] = true; + // Debug - DO NOT USE THIS IN PRODUCTION FOR SECURITY REASONS // // This fixes a problem in some environments with connecting to HTTPS-enabled servers.
Setting CURLOPT_SSL_VERIFYPEER to 'true' to avoid insecure default in old libcurl versions.
diff --git a/spec/unit/azurerm_server_delete_spec.rb b/spec/unit/azurerm_server_delete_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/azurerm_server_delete_spec.rb +++ b/spec/unit/azurerm_server_delete_spec.rb @@ -17,8 +17,8 @@ describe Chef::Knife::AzurermServerDelete do @arm_server_instance.name_args = ['VM001'] @server_detail = double('server', :name => "VM001", :hardware_profile => double, :storage_profile => double(:os_disk => double)) - allow(@server_detail.hardware_profile).to receive_message_chain(:vm_size).and_return("10") - allow(@server_detail.storage_profile.os_disk).to receive_message_chain(:os_type).and_return("Linux") + allow(@server_detail.hardware_profile).to receive(:vm_size).and_return("10") + allow(@server_detail.storage_profile.os_disk).to receive(:os_type).and_return("Linux") end it "deletes server" do
Updated code logic and removed unused methods and specs related to azure management gems
diff --git a/core/src/test/java/io/basic/ddf/BasicDDFTests.java b/core/src/test/java/io/basic/ddf/BasicDDFTests.java index <HASH>..<HASH> 100644 --- a/core/src/test/java/io/basic/ddf/BasicDDFTests.java +++ b/core/src/test/java/io/basic/ddf/BasicDDFTests.java @@ -40,7 +40,6 @@ public class BasicDDFTests { Assert.assertNotNull("DDF cannot be null", ddf); Assert.assertNotNull(ddf.getNamespace()); - Assert.assertNotNull(ddf.getTableName()); Assert.assertNotNull(ddf.getUUID()); DDF ddf2 = this.getTestDDF();
don't need to check tableName
diff --git a/spec/active_pstore/base_spec.rb b/spec/active_pstore/base_spec.rb index <HASH>..<HASH> 100644 --- a/spec/active_pstore/base_spec.rb +++ b/spec/active_pstore/base_spec.rb @@ -124,4 +124,22 @@ describe ActivePStore::Base do it { expect(subject.birth_date).to be_nil } end end + + describe '#valid?' do + let(:artist) { Artist.new(name: name) } + + subject { artist.valid? } + + context 'valid' do + let(:name) { 'foo' } + + it { is_expected.to be true } + end + + context 'invalid' do + let(:name) { '' } + + it { is_expected.to be false } + end + end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,6 @@ +require 'rspec/expectations' +require 'rspec/mocks' + require 'codeclimate-test-reporter' CodeClimate::TestReporter.start @@ -5,6 +8,8 @@ require 'active_pstore' class Artist < ActivePStore::Base attr_accessor :name, :associated_act, :instrument, :birth_date + + validates_presence_of :name end Dir['./spec/support/**/*.rb'].each {|f| require f}
add specs for `valid?` method.
diff --git a/src/Models/MenuGenerator.php b/src/Models/MenuGenerator.php index <HASH>..<HASH> 100755 --- a/src/Models/MenuGenerator.php +++ b/src/Models/MenuGenerator.php @@ -379,8 +379,8 @@ class MenuGenerator implements Countable { return $this->items->sortBy('properties.order')->each(function(MenuItem $parent) { $parent->hideWhen(function() use ($parent) { - return ! $parent->getChilds()->reduce(function($carry, MenuItem $child) { - return $carry || !$child->isHidden(); + return in_array($parent->properties['type'], ['dropdown', 'header']) && ! $parent->getChilds()->reduce(function($carry, MenuItem $child) { + return $carry || ! $child->isHidden(); }, false); }); });
Fix hide logic for hiding parent items without visible children, only if type is dropdown or header
diff --git a/lib/define.js b/lib/define.js index <HASH>..<HASH> 100755 --- a/lib/define.js +++ b/lib/define.js @@ -38,8 +38,6 @@ var functionWrapper = function (f, name, supers) { } ret = f.apply(this, arguments); this._super = orgSuper || null; - } else if (f.__meta && f.__meta.isConstructor) { - f.apply(null, arguments); } else { ret = f.apply(this, arguments); } diff --git a/test/define.test.js b/test/define.test.js index <HASH>..<HASH> 100755 --- a/test/define.test.js +++ b/test/define.test.js @@ -429,6 +429,24 @@ suite.addBatch({ } }); + +suite.addBatch({ + "when in creating a class that that has another class as a property it should not wrap it":{ + topic:function () { + return define([Mammal, Wolf, Dog, Breed], { + static:{ + DogMammal : Dog + } + }); + }, + + "it should call init":function (Mammal) { + assert.deepEqual(Mammal.DogMammal, Dog); + assert.instanceOf(new Mammal.DogMammal(), Dog); + } + } +}); + suite.addBatch({ "When using as to export an object to exports":{ topic:function () {
Bug fixes * Removed dead code from define.js * Added new test for Object Properties
diff --git a/clustergrammer_widget/_version.py b/clustergrammer_widget/_version.py index <HASH>..<HASH> 100644 --- a/clustergrammer_widget/_version.py +++ b/clustergrammer_widget/_version.py @@ -1,2 +1,2 @@ -version_info = (1, 0, 1) +version_info = (1, 1, 0) __version__ = '.'.join(map(str, version_info))
going to publish clustergrammer_widget <I>
diff --git a/drivers/python/rethinkdb/rethinkdb.py b/drivers/python/rethinkdb/rethinkdb.py index <HASH>..<HASH> 100644 --- a/drivers/python/rethinkdb/rethinkdb.py +++ b/drivers/python/rethinkdb/rethinkdb.py @@ -96,7 +96,10 @@ class Connection(object): if debug: print "response:", response - if response.status_code == p.Response.SUCCESS: + if response.status_code == p.Response.SUCCESS_JSON: + return json.loads(response.response[0]) + # FIXME: need to handle SUCCESS_EMPTY, SUCCESS_PARTIAL + if response.status_code == p.Response.SUCCESS_STREAM: return [json.loads(s) for s in response.response] if response.status_code == p.Response.PARTIAL: new_protobuf = p.Query()
partially fix python client
diff --git a/salt/modules/cron.py b/salt/modules/cron.py index <HASH>..<HASH> 100644 --- a/salt/modules/cron.py +++ b/salt/modules/cron.py @@ -151,7 +151,7 @@ def set_special(user, special, cmd): 'cmd': cmd} lst['special'].append(spec) comdat = _write_cron(user, _render_tab(lst)) - if not comdat['retcode']: + if comdat['retcode']: # Failed to commit, return the error return comdat['stderr'] return 'new'
Fixed set_special from returning stderr on success instead of 'new'.
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -102,7 +102,8 @@ module.exports = function (grunt) { grunt.registerTask('phpcs', 'PHP Codesniffer', 'exec:phpcs'); grunt.registerTask('phpmd', 'PHP Mess Detector', 'exec:phpmd'); grunt.registerTask('install', 'Install all project dependencies', ['exec:npm-install', 'exec:composer-install', 'exec:bundle-install']); - grunt.registerTask('default', ['phpunit']); + grunt.registerTask('default', ['qa']); + grunt.registerTask('qa', ['exec:composer-install', 'phpunit', 'phpcs', 'phpmd']); grunt.registerTask('jenkins', ['exec:ci-prepare', 'phpunit-ci', 'phpcs', 'phpmd']); } ;
Add new grunt task for QA. Set as default task.
diff --git a/spyder/app/tests/test_mainwindow.py b/spyder/app/tests/test_mainwindow.py index <HASH>..<HASH> 100644 --- a/spyder/app/tests/test_mainwindow.py +++ b/spyder/app/tests/test_mainwindow.py @@ -82,6 +82,7 @@ def main_window(request): # Tests #============================================================================== @flaky(max_runs=10) +@pytest.mark.skipif(os.name == 'nt', reason="It times out sometimes on Windows") def test_open_notebooks_from_project_explorer(main_window, qtbot): """Test that new breakpoints are set in the IPython console.""" projects = main_window.projects
Testing: Skip improved test on Windows because it hangs there
diff --git a/lib/async.js b/lib/async.js index <HASH>..<HASH> 100644 --- a/lib/async.js +++ b/lib/async.js @@ -14,7 +14,16 @@ // global on the server, window in the browser var root, previous_async; - root = this; + if (typeof window == 'object' && this === window) { + root = window; + } + else if (typeof global == 'object' && this === global) { + root = global; + } + else { + root = this; + } + if (root != null) { previous_async = root.async; }
Better support for browsers. In a RequireJS environment `this` doesn't refer to the `window` object, so async doesn't work there.
diff --git a/firebase_test.go b/firebase_test.go index <HASH>..<HASH> 100644 --- a/firebase_test.go +++ b/firebase_test.go @@ -1,7 +1,6 @@ package firebase_test import ( - "fmt" "os" "reflect" "testing" @@ -159,10 +158,11 @@ func TestSetRules(t *testing.T) { } } +/* TODO: Once circle ci supports go 1.4, uncomment this func TestMain(m *testing.M) { if testUrl == "" || testAuth == "" { fmt.Printf("You need to set FIREBASE_TEST_URL and FIREBASE_TEST_AUTH\n") os.Exit(1) } os.Exit(m.Run()) -} +}*/
Disable go <I> features for now, they just make us fail more elegantly
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,7 +58,7 @@ master_doc = 'index' # General information about the project. project = u'ciscosparkapi' -copyright = u'2016, Cisco DevNet' +copyright = u'2016 Cisco Systems, Inc.' author = u'Chris Lunsford' # The version info for the project you're documenting, acts as replacement for
Update copyright in docs/conf.py This copyright reference shows up in the footers of the HTML docs generated by Sphinx.
diff --git a/Model/Api.php b/Model/Api.php index <HASH>..<HASH> 100644 --- a/Model/Api.php +++ b/Model/Api.php @@ -679,7 +679,12 @@ class Api // Must have at least ONE valid contact field (some are to be ignored since we provide them or they are core). $ignore = ['ip', 'attribution', 'attribution_date', 'utm_source']; if (!count(array_diff_key($this->fieldsProvided, array_flip($ignore)))) { - return null; + throw new ContactSourceException( + 'There were no fields provided. A contact could not be created.', + Codes::HTTP_BAD_REQUEST, + null, + Stat::TYPE_INVALID + ); } // Dynamically generate the field map and import.
Prevent exception when no fields are provided via Source API.
diff --git a/reformulation-core/src/main/java/org/semanticweb/ontop/owlrefplatform/core/translator/IntermediateQueryToDatalogTranslator.java b/reformulation-core/src/main/java/org/semanticweb/ontop/owlrefplatform/core/translator/IntermediateQueryToDatalogTranslator.java index <HASH>..<HASH> 100644 --- a/reformulation-core/src/main/java/org/semanticweb/ontop/owlrefplatform/core/translator/IntermediateQueryToDatalogTranslator.java +++ b/reformulation-core/src/main/java/org/semanticweb/ontop/owlrefplatform/core/translator/IntermediateQueryToDatalogTranslator.java @@ -112,7 +112,7 @@ public class IntermediateQueryToDatalogTranslator { List<Function> atoms = new LinkedList<Function>(); //Constructing the rule - CQIE newrule = ofac.getCQIE(substitutedHead, atoms); + CQIE newrule = ofac.getCQIE(convertToMutableFunction(substitutedHead), atoms); pr.appendRule(newrule); @@ -218,7 +218,7 @@ public class IntermediateQueryToDatalogTranslator { QueryNode nod= listnode.get(0); if (nod instanceof ConstructionNode) { - Function newAns = ((ConstructionNode) nod).getProjectionAtom(); + Function newAns = convertToMutableFunction(((ConstructionNode) nod).getProjectionAtom()); body.add(newAns); return body; }else{
Makes the heads and the sub-rule atoms mutable after translation back to Datalog.
diff --git a/src/rituals/invoke_tasks.py b/src/rituals/invoke_tasks.py index <HASH>..<HASH> 100644 --- a/src/rituals/invoke_tasks.py +++ b/src/rituals/invoke_tasks.py @@ -136,8 +136,8 @@ def test(): except which.WhichError: pytest = None - if console and pytest: - run('{0} --color=yes {1}'.format(pytest, cfg.testdir), echo=RUN_ECHO) + if pytest: + run('{}{} "{}"'.format(pytest, ' --color=yes' if console else '', cfg.testdir), echo=RUN_ECHO) else: run('python setup.py test', echo=RUN_ECHO)
:twisted_rightwards_arrows: if py.test is found, always use it directly
diff --git a/lib/genevalidator/version.rb b/lib/genevalidator/version.rb index <HASH>..<HASH> 100644 --- a/lib/genevalidator/version.rb +++ b/lib/genevalidator/version.rb @@ -1,3 +1,3 @@ module GeneValidator - VERSION = "1.0.0" + VERSION = "1.0.1" end \ No newline at end of file
Update the Version and add IsmailM as co-author
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -168,21 +168,7 @@ end_error initializer "active_record.initialize_database" do ActiveSupport.on_load(:active_record) do self.configurations = Rails.application.config.database_configuration - - begin - establish_connection - rescue ActiveRecord::NoDatabaseError - warn <<-end_warning -Oops - You have a database configured, but it doesn't exist yet! - -Here's how to get started: - - 1. Configure your database in config/database.yml. - 2. Run `rails db:create` to create the database. - 3. Run `rails db:setup` to load your database schema. -end_warning - raise - end + establish_connection end end
Remove unreachable database warning `establish_connection` will never raise `ActiveRecord::NoDatabaseError`, because it doesn't connect to a database; it sets up a connection pool.
diff --git a/sitetree/management/commands/sitetreedump.py b/sitetree/management/commands/sitetreedump.py index <HASH>..<HASH> 100644 --- a/sitetree/management/commands/sitetreedump.py +++ b/sitetree/management/commands/sitetreedump.py @@ -38,9 +38,9 @@ class Command(BaseCommand): objects.extend(trees) for tree in trees: - objects.extend(TreeItem._default_manager.using(using).filter(tree=tree)) + objects.extend(TreeItem._default_manager.using(using).filter(tree=tree).order_by('parent')) try: return serializers.serialize('json', objects, indent=indent) except Exception, e: - raise CommandError("Unable to serialize sitetree(s): %s" % e) + raise CommandError('Unable to serialize sitetree(s): %s' % e)
Updated tree items order in 'sitetreedump' management command.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -24,7 +24,7 @@ ActiveRecord::Base.establish_connection(ENV["DB"] || "sqlite") load File.dirname(__FILE__) + "/fixtures/schema.rb" # Freeze time to Jan 1st of this year -Timecop.travel(Time.local(Time.zone.now.year, 1, 1)) +Timecop.travel(Time.local(Time.zone.now.year, 1, 1, 0, 0, 0)) load File.dirname(__FILE__) + "/fixtures/models.rb"
Set hours, mins and sec for Timecop.travel in spec_helper.rb This will fix by_weekend tests, and cause last commit to be reverted
diff --git a/js/main.js b/js/main.js index <HASH>..<HASH> 100644 --- a/js/main.js +++ b/js/main.js @@ -59,12 +59,19 @@ GraphNode.Impl = class { } } + /* + * + * @param {type} f + * @returns {unresolved} a promise thta is satisfied whne all promises returned by f are resolved + */ each(f) { - this.nodes.forEach(node => f(GraphNode([node], this.graph, this.sources))); + var results = this.nodes.map(node => f(GraphNode([node], this.graph, this.sources))); + return Promise.all(results); } fetchEach(f) { - this.nodes.forEach(node => GraphNode([node], this.graph, this.sources).fetch().then(f)); + var results = this.nodes.map(node => GraphNode([node], this.graph, this.sources).fetch().then(f)); + return Promise.all(results); } out(predicate) {
returning promise in each and eachFetch