diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/aws/ec2/client.go b/aws/ec2/client.go index <HASH>..<HASH> 100644 --- a/aws/ec2/client.go +++ b/aws/ec2/client.go @@ -226,6 +226,7 @@ func (client *Client) RunInstances(config *RunInstancesConfig) (list InstanceLis type DescribeInstancesOptions struct { InstanceIds []string + Filters []*Filter } func (client *Client) DescribeInstancesWithOptions(options *DescribeInstancesOptions) (instances []*Instance, e error) { @@ -238,6 +239,7 @@ func (client *Client) DescribeInstancesWithOptions(options *DescribeInstancesOpt values.Add("InstanceId."+strconv.Itoa(i+1), id) } } + applyFilters(values, options.Filters) raw, e := client.DoSignedRequest("GET", ENDPOINT, values.Encode(), nil) if e != nil { return instances, e @@ -245,6 +247,7 @@ func (client *Client) DescribeInstancesWithOptions(options *DescribeInstancesOpt rsp := &DescribeInstancesResponse{} e = xml.Unmarshal(raw.Content, rsp) if e != nil { + e = fmt.Errorf("%s: %s", e.Error(), string(raw.Content)) return instances, e } return rsp.Instances(), nil
add filters to DescribeInstances
diff --git a/tests/AuthnetJsonAimTest.php b/tests/AuthnetJsonAimTest.php index <HASH>..<HASH> 100644 --- a/tests/AuthnetJsonAimTest.php +++ b/tests/AuthnetJsonAimTest.php @@ -1158,7 +1158,7 @@ class AuthnetJsonAimTest extends \PHPUnit_Framework_TestCase $this->assertEquals('9', $response->transactionResponse->cavvResultCode); $this->assertEquals('2149186775', $response->transactionResponse->transId); $this->assertEquals('', $response->transactionResponse->refTransID); - $this->assertEquals('C85B15CED28462974F1114DB07A16C39', $response->transactionResponse->transHas); + $this->assertEquals('C85B15CED28462974F1114DB07A16C39', $response->transactionResponse->transHash); $this->assertEquals('0', $response->transactionResponse->testRequest); $this->assertEquals('XXXX0015', $response->transactionResponse->accountNumber); $this->assertEquals('MasterCard', $response->transactionResponse->accountType);
Fixed typo causing unit test to fail
diff --git a/lib/htmlToXlsx.js b/lib/htmlToXlsx.js index <HASH>..<HASH> 100644 --- a/lib/htmlToXlsx.js +++ b/lib/htmlToXlsx.js @@ -55,9 +55,7 @@ module.exports = function (reporter, definition) { if (htmlToXlsxOptions.htmlEngine == null) { if (conversions.chrome) { htmlToXlsxOptions.htmlEngine = 'chrome' - } - - if (conversions.phantom) { + } else if (conversions.phantom) { htmlToXlsxOptions.htmlEngine = 'phantom' }
fix default htmlEngine should be chrome when it is present
diff --git a/pyensembl/database.py b/pyensembl/database.py index <HASH>..<HASH> 100644 --- a/pyensembl/database.py +++ b/pyensembl/database.py @@ -272,14 +272,13 @@ class Database(object): query = """ SELECT %s%s FROM %s - WHERE feature = ? - AND seqname= ? + WHERE seqname= ? AND start <= ? AND end >= ? """ % (distinct_string, column_name, feature) - query_params = [feature, contig, end, position] + query_params = [contig, end, position] if strand: query += " AND strand = ?" @@ -368,12 +367,11 @@ class Database(object): SELECT %s%s FROM %s WHERE %s = ? - AND feature= ? """ % ("distinct " if distinct else "", ", ".join(select_column_names), feature, filter_column) - query_params = [filter_value, feature] + query_params = [filter_value] return self.run_sql_query( sql, required=required, query_params=query_params) @@ -415,9 +413,9 @@ class Database(object): query = """ SELECT %s%s FROM %s - WHERE feature=? + WHERE 1=1 """ % ("DISTINCT " if distinct else "", column, feature) - query_params = [feature] + query_params = [] if contig: contig = normalize_chromosome(contig)
got rid of redundant filter by feature in SQL queries
diff --git a/lib/config/massage.js b/lib/config/massage.js index <HASH>..<HASH> 100644 --- a/lib/config/massage.js +++ b/lib/config/massage.js @@ -20,6 +20,15 @@ function massageConfig(config) { massagedConfig[key] = [val]; } else if (isObject(val)) { massagedConfig[key] = massageConfig(val); + } else if (Array.isArray(val)) { + massagedConfig[key] = []; + val.forEach(item => { + if (isObject(item)) { + massagedConfig[key].push(massageConfig(item)); + } else { + massagedConfig[key].push(item); + } + }); } } return massagedConfig;
fix: arrays of objects should be massaged (#<I>)
diff --git a/frojd_fabric/recipes/django.py b/frojd_fabric/recipes/django.py index <HASH>..<HASH> 100644 --- a/frojd_fabric/recipes/django.py +++ b/frojd_fabric/recipes/django.py @@ -2,20 +2,20 @@ from fabric.state import env from fabric.context_managers import prefix from frojd_fabric.ext import envfile, virtualenv from frojd_fabric import paths -from frojd_fabric.hooks import hook, run_hook +from frojd_fabric.hooks import hook @hook("after_setup") def after_setup(): envfile.create_env() - env.run("virtualenv %s" % paths.get_deploy_path("venv")) + virtualenv.create_venv() @hook("deploy") def after_deploy(): envfile.symlink_env() - with prefix("source %s" % (paths.get_deploy_path("venv")+"/bin/activate")): + with prefix("source %s" % (virtualenv.get_path()+"/bin/activate")): virtualenv.update_requirements() _migrate() reload_uwsgi()
Replaced virtualenv calls with extension
diff --git a/util/src/main/java/org/killbill/billing/util/security/shiro/dao/JDBCSessionDao.java b/util/src/main/java/org/killbill/billing/util/security/shiro/dao/JDBCSessionDao.java index <HASH>..<HASH> 100644 --- a/util/src/main/java/org/killbill/billing/util/security/shiro/dao/JDBCSessionDao.java +++ b/util/src/main/java/org/killbill/billing/util/security/shiro/dao/JDBCSessionDao.java @@ -62,6 +62,9 @@ public class JDBCSessionDao extends CachingSessionDAO { final DateTime lastAccessTime = new DateTime(session.getLastAccessTime(), DateTimeZone.UTC); final Long sessionId = Long.valueOf(session.getId().toString()); jdbcSessionSqlDao.updateLastAccessTime(lastAccessTime, sessionId); + } else if (session instanceof SimpleSession) { + // Hack to override the value in the cache so subsequent requests see the (stale) value on disk + ((SimpleSession) session).setLastAccessTime(previousSession.getLastAccessTime()); } } else { // Various fields were changed, update the full row
util: make previous patch work with caching Make the cached session reflect the stale last access time value, so the comparison accessedRecently uses the old value, not the one from the (cached) last request. The implementation is not pretty but with the current code, I haven't found a better way :/
diff --git a/lib/turntabler/song.rb b/lib/turntabler/song.rb index <HASH>..<HASH> 100644 --- a/lib/turntabler/song.rb +++ b/lib/turntabler/song.rb @@ -51,13 +51,13 @@ module Turntabler # The playlist this song is referenced from # @return [Turntabler::Playlist] - attribute :playlist do |id| + attribute :playlist, :load => false do |id| client.user.playlists.build(:_id => id) end # The time at which the song was started # @return [Time] - attribute :started_at, :starttime + attribute :started_at, :starttime, :load => false # The number of up votes this song has received. # @note This is only available for the current song playing in a room
Don't load song data when accessing the playlist or started_at timestamp
diff --git a/pkg/ignore/ignore.go b/pkg/ignore/ignore.go index <HASH>..<HASH> 100644 --- a/pkg/ignore/ignore.go +++ b/pkg/ignore/ignore.go @@ -70,6 +70,10 @@ func getListOfFilesToIgnore(workingDir string) (map[string]string, error) { for scanner.Scan() { filespec := strings.Trim(scanner.Text(), " ") + if len(filespec) == 0 { + continue + } + if strings.HasPrefix(filespec, "#") { continue } diff --git a/pkg/ignore/ignore_test.go b/pkg/ignore/ignore_test.go index <HASH>..<HASH> 100644 --- a/pkg/ignore/ignore_test.go +++ b/pkg/ignore/ignore_test.go @@ -157,6 +157,10 @@ func baseTest(t *testing.T, patterns []string, filesToDel []string, filesToKeep } } +func TestBlankLine(t *testing.T) { + baseTest(t, []string{"foo.bar\n", "\n", "bar.baz\n"}, []string{"foo.bar", "bar.baz"}, []string{"foo.baz"}) +} + func TestSingleIgnore(t *testing.T) { baseTest(t, []string{"foo.bar\n"}, []string{"foo.bar"}, []string{}) }
Skip blank lines in .s2iignore file Updating pkg/ignore/ignore.go to skip blank lines in the .s2iignore file Added test to pkg/ignore/ignore_test.go to test for blank line issues Fixes #<I>
diff --git a/src/Controllers/ElementalAreaController.php b/src/Controllers/ElementalAreaController.php index <HASH>..<HASH> 100644 --- a/src/Controllers/ElementalAreaController.php +++ b/src/Controllers/ElementalAreaController.php @@ -165,6 +165,14 @@ class ElementalAreaController extends CMSMain return HTTPResponse::create($body)->addHeader('Content-Type', 'application/json'); } + /** + * Provides action control for form fields that are request handlers when they're used in an in-line edit form. + * + * Eg. UploadField + * + * @param HTTPRequest $request + * @return array|HTTPResponse|\SilverStripe\Control\RequestHandler|string + */ public function formAction(HTTPRequest $request) { $formName = $request->param('FormName');
DOCS Documention form field action controller method
diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenGeneratorInterface.php b/src/Symfony/Component/Security/Csrf/CsrfTokenGeneratorInterface.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenGeneratorInterface.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenGeneratorInterface.php @@ -35,6 +35,8 @@ interface CsrfTokenGeneratorInterface * Generates a CSRF token with the given token ID. * * @param string $tokenId An ID that identifies the token + * + * @return string The generated CSRF token */ public function generateCsrfToken($tokenId);
[Security] Added missing PHPDoc tag
diff --git a/openquake/hazardlib/calc/gmf.py b/openquake/hazardlib/calc/gmf.py index <HASH>..<HASH> 100644 --- a/openquake/hazardlib/calc/gmf.py +++ b/openquake/hazardlib/calc/gmf.py @@ -279,7 +279,7 @@ class GmfComputer(object): if len(intra_res.shape) == 1: # a vector intra_res = intra_res[:, None] - inter_res = tau * epsilons + inter_res = tau * epsilons # shape (N, 1) * E => (N, E) gmf = to_imt_unit_values(mean + intra_res + inter_res, imt) stdi = tau.max(axis=0) # from shape (N, E) => E return gmf, stdi, epsilons
Added comment [ci skip]
diff --git a/pytmx/pytmx.py b/pytmx/pytmx.py index <HASH>..<HASH> 100644 --- a/pytmx/pytmx.py +++ b/pytmx/pytmx.py @@ -879,6 +879,10 @@ class TiledTileset(TiledElement): p = {k: types[k](v) for k, v in child.items()} p.update(parse_properties(child)) + + # images are listed as relative to the .tsx file, not the .tmx file: + if source: + p["path"] = os.path.join(os.path.dirname(source), p["path"]) # handle tiles that have their own image image = child.find('image') @@ -914,6 +918,11 @@ class TiledTileset(TiledElement): image_node = node.find('image') if image_node is not None: self.source = image_node.get('source') + + # When loading from tsx, tileset image path is relative to the tsx file, not the tmx: + if source: + self.source = os.path.join(os.path.dirname(source), self.source) + self.trans = image_node.get('trans', None) self.width = int(image_node.get('width')) self.height = int(image_node.get('height'))
Tileset image is relative to the .tsx file
diff --git a/src/runner.js b/src/runner.js index <HASH>..<HASH> 100644 --- a/src/runner.js +++ b/src/runner.js @@ -262,6 +262,7 @@ async function runTests() { } toggleCallsites(true) + const finished = [] try { if (!focused && files.length == 1) { console.log('') @@ -269,6 +270,8 @@ async function runTests() { for (let i = 0; i < files.length; i++) { if (!this.stopped) { const file = files[i] + const running = new RunningFile(file, this) + if (focused || files.length > 1) { const header = file.header || path.relative(process.cwd(), file.path) @@ -277,7 +280,9 @@ async function runTests() { console.log(new Array(header.length).fill('⎼').join('')) console.log(bold(header) + '\n') } - await runGroup(file.group) + + await runGroup(running.group) + finished.push(running) } } } catch(error) { @@ -291,7 +296,7 @@ async function runTests() { this.finished = true let testCount = 0, passCount = 0, failCount = 0 - files.forEach(file => { + finished.forEach(file => { testCount += file.testCount passCount += file.passCount failCount += file.failCount
fix: test results The `testCount`, `passCount`, and `failCount` were evaluating to NaN because File instances were used instead of RunningFile instances.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ extras_require = { # For the pipelines.lsst.io documentation project 'pipelines': [ 'lsst-sphinx-bootstrap-theme>=0.1.0,<0.2.0', - 'astropy-helpers>=1.2.0,<1.4.0', + 'astropy-helpers>=3.0.0,<4.0.0', 'breathe==4.4.0' ],
bump astropy_helpers to ~> <I>
diff --git a/lib/middleware.js b/lib/middleware.js index <HASH>..<HASH> 100644 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -127,10 +127,27 @@ module.exports = less.middleware = function(options){ // Default dest dir to source var dest = options.dest ? options.dest : src; + if (options.paths){ + if (!(options.paths instanceof Array)) { + options.paths = [options.paths]; + } + } else { + options.paths = []; + } + // Default compile callback options.render = options.render || function(str, lessPath, cssPath, callback) { + + var paths = []; + options.paths.forEach(function(p){ paths.push(p); }); + + var p = path.dirname(lessPath); + if (paths.indexOf(p) < 0) { + paths.push(p); + } + var parser = new less.Parser({ - paths: [path.dirname(lessPath)], + paths: paths, filename: lessPath, optimization: options.optimization });
Added the option to configure the less paths.
diff --git a/saltcontainers/factories.py b/saltcontainers/factories.py index <HASH>..<HASH> 100644 --- a/saltcontainers/factories.py +++ b/saltcontainers/factories.py @@ -225,6 +225,10 @@ class SaltFactory(BaseFactory): client.configure_salt(obj['container']['config']) + if os.environ.get('FLAVOR') == 'devel' and os.environ.get('SALT_REPO'): + obj.run('pip install -e {0}'.format( + os.environ.get('SALT_REPO_MOUNTPOINT', '/salt/src/salt-*'))) + output = client.run( obj['container']['config']['name'], obj['cmd'] )
Do pip install right after devel container start
diff --git a/src/nodes/entity/switch-controller.js b/src/nodes/entity/switch-controller.js index <HASH>..<HASH> 100644 --- a/src/nodes/entity/switch-controller.js +++ b/src/nodes/entity/switch-controller.js @@ -26,11 +26,10 @@ class Switch extends EntityNode { } onHaEventMessage(evt) { + const stateChanged = + evt.type === 'state_changed' && evt.state !== this.isEnabled; super.onHaEventMessage(evt); - if ( - evt.type === 'state_changed' && - this.nodeConfig.outputOnStateChange - ) { + if (stateChanged && this.nodeConfig.outputOnStateChange) { // fake a HA entity const entity = { state: this.isEnabled,
fix(entity): Only output state change when the state actually changes The entity switch would output anytime the state_changed event was received even when the state didn't change Closes #<I>
diff --git a/src/Support/Carbon.php b/src/Support/Carbon.php index <HASH>..<HASH> 100644 --- a/src/Support/Carbon.php +++ b/src/Support/Carbon.php @@ -52,7 +52,7 @@ class Carbon extends BaseCarbon implements JsonSerializable * @param array $array * @return static */ - public static function __set_state($array) + public static function __set_state(array $array) { return static::instance(parent::__set_state($array)); }
Merge with Laravel <I>
diff --git a/bigtable-dataflow-parent/bigtable-hbase-beam/src/main/java/com/google/cloud/bigtable/beam/CloudBigtableConfiguration.java b/bigtable-dataflow-parent/bigtable-hbase-beam/src/main/java/com/google/cloud/bigtable/beam/CloudBigtableConfiguration.java index <HASH>..<HASH> 100644 --- a/bigtable-dataflow-parent/bigtable-hbase-beam/src/main/java/com/google/cloud/bigtable/beam/CloudBigtableConfiguration.java +++ b/bigtable-dataflow-parent/bigtable-hbase-beam/src/main/java/com/google/cloud/bigtable/beam/CloudBigtableConfiguration.java @@ -247,7 +247,10 @@ public class CloudBigtableConfiguration implements Serializable { // BigtableOptions.BIGTABLE_ASYNC_MUTATOR_COUNT_DEFAULT); config.set(BigtableOptionsFactory.BIGTABLE_ASYNC_MUTATOR_COUNT_KEY, "0"); for (Entry<String, ValueProvider<String>> entry : configuration.entrySet()) { - config.set(entry.getKey(), entry.getValue().get()); + // If the value from ValueProvider is null, the value was not provided at runtime. + if (entry.getValue().get() != null) { + config.set(entry.getKey(), entry.getValue().get()); + } } setUserAgent(config); return config;
Add CloudBigtable config to HBase config only if the value in ValueProvider is not null. (#<I>)
diff --git a/lib/octokit/client/contents.rb b/lib/octokit/client/contents.rb index <HASH>..<HASH> 100644 --- a/lib/octokit/client/contents.rb +++ b/lib/octokit/client/contents.rb @@ -73,7 +73,9 @@ module Octokit end end raise ArgumentError.new "content or :file option required" if content.nil? - options[:content] = Base64.strict_encode64(content) + options[:content] = Base64.respond_to?(:strict_encode64) ? + Base64.strict_encode64(content) : + Base64.encode64(content).delete("\n") # Ruby 1.9.2 options[:message] = message url = "repos/#{Repository.new repo}/contents/#{path}" put url, options
Ruby <I> does not have #strict_encode<I>
diff --git a/lifxlan/device.py b/lifxlan/device.py index <HASH>..<HASH> 100644 --- a/lifxlan/device.py +++ b/lifxlan/device.py @@ -428,7 +428,7 @@ class Device(object): attempts += 1 if not success: self.close_socket() - raise IOError("WorkflowException: Did not receive {} in response to {}".format(str(response_type), str(msg_type))) + raise WorkflowException("WorkflowException: Did not receive {} in response to {}".format(str(response_type), str(msg_type))) else: self.close_socket() return device_response diff --git a/lifxlan/lifxlan.py b/lifxlan/lifxlan.py index <HASH>..<HASH> 100644 --- a/lifxlan/lifxlan.py +++ b/lifxlan/lifxlan.py @@ -46,7 +46,11 @@ class LifxLAN: if self.num_lights == None: responses = self.discover() else: - responses = self.broadcast_with_resp(GetService, StateService) + try: + responses = self.broadcast_with_resp(GetService, StateService) + except WorkflowException as e: + print ("Exception: {}".format(e)) + return None for r in responses: light = Light(r.target_addr, r.ip_addr, r.service, r.port, self.source_id, self.verbose) self.lights.append(light)
Added error handling for LAN with zero attached LIFX devices
diff --git a/lib/rule/bubble.js b/lib/rule/bubble.js index <HASH>..<HASH> 100644 --- a/lib/rule/bubble.js +++ b/lib/rule/bubble.js @@ -11,11 +11,13 @@ var bubbleJobTitles = [ ]; var temptations = [ + /ales?/, /beers?/, /brewskis?/, 'coffee', 'foosball', /keg(?:erator)?s?/, + /lagers?/, /nerf\s*guns?/, /ping\s*pong?/, /pints?/,
Add a few more beer synonyms Resolves #<I>
diff --git a/src/controllers/VersionController.php b/src/controllers/VersionController.php index <HASH>..<HASH> 100644 --- a/src/controllers/VersionController.php +++ b/src/controllers/VersionController.php @@ -34,7 +34,7 @@ class VersionController extends FileController { $v = trim($this->exec('git', ['log', '-n', '1', '--pretty=%ai %H %s'])[0]); list($date, $time, $zone, $hash, $commit) = explode(' ', $v, 5); - if ($commit !== 'version bump to ' . $this->version) { + if (!in_array($commit, ['minor', 'version bump to ' . $this->version])) { if ($hash !== $this->hash) { $this->version = 'dev'; }
slightly improved `version` file handling
diff --git a/spaceship/spec/portal/app_spec.rb b/spaceship/spec/portal/app_spec.rb index <HASH>..<HASH> 100644 --- a/spaceship/spec/portal/app_spec.rb +++ b/spaceship/spec/portal/app_spec.rb @@ -109,8 +109,7 @@ describe Spaceship::Portal::App do subject { Spaceship::Portal::App.find("net.sunapps.151") } it 'updates the name of the app by given bundle_id' do stub_request(:post, "https://developer.apple.com/services-account/QH65B2/account/ios/identifiers/updateAppIdName.action"). - with(body: { "appIdId" => "B7JBD8LHAA", "name" => "The New Name", "teamId" => "XXXXXXXXXX" }, - headers: { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Spaceship 2.3.0' }). + with(body: { "appIdId" => "B7JBD8LHAA", "name" => "The New Name", "teamId" => "XXXXXXXXXX" }). to_return(status: 200, body: JSON.parse(PortalStubbing.adp_read_fixture_file('updateAppIdName.action.json')), headers: {}) app = subject.update_name!('The New Name')
Fix spaceship tests shouldn’t include version number (#<I>)
diff --git a/Controller/VendorController.php b/Controller/VendorController.php index <HASH>..<HASH> 100644 --- a/Controller/VendorController.php +++ b/Controller/VendorController.php @@ -83,6 +83,13 @@ class VendorController extends Controller { $this->get('white_october_breadcrumbs') ->addItem('Home', $this->get('router')->generate('_homepage')) + ->addItem('Vendors', $this->get('router')->generate('pengarwin_vendor')) + ->addItem( + $vendor->getName(), + $this->get('router')->generate('pengarwin_vendor_show', array( + 'slug' => $vendor->getSlug(), + )) + ) ; return array('vendor' => $vendor);
Adding rest of breadcrumbs to vendor/show
diff --git a/generators/server/templates/src/test/java/package/config/_DatabaseTestConfiguration.java b/generators/server/templates/src/test/java/package/config/_DatabaseTestConfiguration.java index <HASH>..<HASH> 100644 --- a/generators/server/templates/src/test/java/package/config/_DatabaseTestConfiguration.java +++ b/generators/server/templates/src/test/java/package/config/_DatabaseTestConfiguration.java @@ -24,8 +24,10 @@ import com.couchbase.client.java.cluster.DefaultBucketSettings; import com.couchbase.client.java.env.CouchbaseEnvironment; import org.assertj.core.util.Lists; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration; +import org.springframework.data.couchbase.config.BeanNames; import org.springframework.data.couchbase.config.CouchbaseConfigurer; import org.testcontainers.couchbase.CouchbaseContainer; @@ -43,6 +45,7 @@ public class DatabaseTestConfiguration extends AbstractCouchbaseConfiguration { } @Override + @Bean(destroyMethod = "", name = BeanNames.COUCHBASE_ENV) public CouchbaseEnvironment couchbaseEnvironment() { return getCouchbaseContainer().getCouchbaseEnvironment(); }
Fix Spring shutdown problem During tests, Couchbase closing connection methods were called on the destroyed Couchbase container, hence a stack trace a the end of the integration test. Override Spring data beans to remove destroy method call (shutdown is done by closing Docker environment).
diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py index <HASH>..<HASH> 100644 --- a/salt/utils/__init__.py +++ b/salt/utils/__init__.py @@ -1379,8 +1379,14 @@ def check_state_result(running): # return false when hosts return a list instead of a dict return False - if state_result.get('result', False) is False: - return False + if 'result' in state_result: + if state_result.get('result', False) is False: + return False + return True + + # Check nested state results + return check_state_result(state_result) + return True
Check nested structures for state results.
diff --git a/.eslintrc.js b/.eslintrc.js index <HASH>..<HASH> 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -47,7 +47,7 @@ module.exports = { "no-unreachable": ["error"],// disallow unreachable code after return, throw, continue, and break statements "no-unsafe-finally": ["error"],// disallow control flow statements in finally blocks "use-isnan": ["error"],// require calls to isNaN() when checking for NaN - "valid-jsdoc": ["error"],// enforce valid JSDoc comments + "valid-jsdoc": ["warn"],// enforce valid JSDoc comments "valid-typeof": ["error"],// enforce comparing typeof expressions against valid strings /*--====[ Best Practices ]====--*/ @@ -165,7 +165,7 @@ module.exports = { "jsx-quotes": ["off"],// enforce the consistent use of either double or single quotes in JSX attributes "key-spacing": ["off"],// enforce consistent spacing between keys and values in object literal properties "keyword-spacing": ["off"],// enforce consistent spacing before and after keywords - "linebreak-style": ["warn", "windows"],// enforce consistent linebreak style + "linebreak-style": ["off", "windows"],// enforce consistent linebreak style "lines-around-comment": ["off"],// require empty lines around comments "max-depth": ["off"],// enforce a maximum depth that blocks can be nested "max-len": ["off"],// enforce a maximum line length
Updating lint rules.
diff --git a/bakery/management/commands/build.py b/bakery/management/commands/build.py index <HASH>..<HASH> 100644 --- a/bakery/management/commands/build.py +++ b/bakery/management/commands/build.py @@ -91,6 +91,8 @@ settings.py or provide a list as arguments." # get the relative path that we want to copy into rel_path = os.path.relpath(dirpath, settings.STATIC_ROOT) dest_path = os.path.join(target_dir, rel_path[2:]) + if not os.path.exists(dest_path): + os.mkdirs(dest_path) # run the regex match m = pattern.search(filename) if m: @@ -104,7 +106,7 @@ settings.py or provide a list as arguments." f_in.close() # otherwise, just copy the file else: - shutil.copy(og_file, os.path.join(dest_path, filename)) + shutil.copy(og_file, dest_path) # if gzip isn't enabled, just copy the tree straight over else: shutil.copytree(settings.STATIC_ROOT, target_dir)
create path if doesn't exist
diff --git a/marcx.py b/marcx.py index <HASH>..<HASH> 100644 --- a/marcx.py +++ b/marcx.py @@ -219,7 +219,10 @@ class FatRecord(Record): def remove(self, fieldspec): """ - Removes **all** fields with tag `tag`. + Removes fields or subfields according to `fieldspec`. + + If a non-control field subfield removal leaves no other subfields, + delete the field entirely. """ pattern = r'(?P<field>[^.]+)(.(?P<subfield>[^.]+))?'
a bit more info on FatRecord.remove
diff --git a/lib/nydp/lexical_context.rb b/lib/nydp/lexical_context.rb index <HASH>..<HASH> 100644 --- a/lib/nydp/lexical_context.rb +++ b/lib/nydp/lexical_context.rb @@ -55,8 +55,8 @@ module Nydp values << at_index(n).inspect n += 1 end - parent = parent ? " parent #{parent.to_s}" : "" - "(context (#{values.join ' '})#{parent})" + parent_s = parent ? " parent #{parent.to_s}" : "" + "(context (#{values.join ' '})#{parent_s})" end end end
lexical_context: fix error in #to_s
diff --git a/framework/web/User.php b/framework/web/User.php index <HASH>..<HASH> 100644 --- a/framework/web/User.php +++ b/framework/web/User.php @@ -13,6 +13,14 @@ use yii\base\HttpException; use yii\base\InvalidConfigException; /** + * User is an application component that manages the user authentication status. + * + * In particular, [[User::isGuest]] returns a value indicating whether the current user is a guest or not. + * Through methods [[login()]] and [[logout()]], you can change the user authentication status. + * + * User works with a class implementing the [[Identity]] interface. This class implements + * the actual user authentication logic and is often backed by a user database table. + * * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ diff --git a/framework/web/UserEvent.php b/framework/web/UserEvent.php index <HASH>..<HASH> 100644 --- a/framework/web/UserEvent.php +++ b/framework/web/UserEvent.php @@ -30,5 +30,5 @@ class UserEvent extends Event * Event handlers may modify this property to determine whether the login or logout should proceed. * This property is only meaningful for [[User::EVENT_BEFORE_LOGIN]] and [[User::EVENT_BEFORE_LOGOUT]] events. */ - public $isValid; + public $isValid = true; } \ No newline at end of file
Fixed UserEvent bug. Updated docs.
diff --git a/nephele/nephele-server/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionGroupVertex.java b/nephele/nephele-server/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionGroupVertex.java index <HASH>..<HASH> 100644 --- a/nephele/nephele-server/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionGroupVertex.java +++ b/nephele/nephele-server/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionGroupVertex.java @@ -744,12 +744,6 @@ public class ExecutionGroupVertex { } this.verticesSharingInstances.addIfAbsent(groupVertex); - - System.out.print(getName() + ": "); - for (final ExecutionGroupVertex v : this.verticesSharingInstances) { - System.out.print(v.getName() + " "); - } - System.out.println(""); } private void removeFromVerticesSharingInstances(final ExecutionGroupVertex groupVertex) {
Removed debug output in ExecutionGroupVertex
diff --git a/falafel/content.py b/falafel/content.py index <HASH>..<HASH> 100644 --- a/falafel/content.py +++ b/falafel/content.py @@ -117,11 +117,7 @@ def import_tsv(): to_add = [] for d in data: to_add.extend(list(save_rule(d, CONTENT_PREFIX))) - apply_changeset(repo, - to_add, - "Import content from TSV", - "Kyle Lape", - "klape@redhat.com") + repo.index.add(to_add) def apply_changeset(repo, to_add, message, name, email):
Only stage (don't commit) the inital import to content repo
diff --git a/v2/goi18n/extract_command.go b/v2/goi18n/extract_command.go index <HASH>..<HASH> 100644 --- a/v2/goi18n/extract_command.go +++ b/v2/goi18n/extract_command.go @@ -259,6 +259,9 @@ func extractStringLiteral(expr ast.Expr) (string, bool) { } return x + y, true case *ast.Ident: + if v.Obj == nil { + return "", false + } switch z := v.Obj.Decl.(type) { case *ast.ValueSpec: s, ok := extractStringLiteral(z.Values[0]) diff --git a/v2/goi18n/extract_command_test.go b/v2/goi18n/extract_command_test.go index <HASH>..<HASH> 100644 --- a/v2/goi18n/extract_command_test.go +++ b/v2/goi18n/extract_command_test.go @@ -202,6 +202,18 @@ zero = "Zero translation" activeFile: []byte(`ConstantID = "ID is a constant" `), }, + { + name: "undefined identifier in composite lit", + fileName: "file.go", + file: `package main + + import "github.com/nicksnyder/go-i18n/v2/i18n" + + var m = &i18n.LocalizeConfig{ + Funcs: Funcs, + } + `, + }, } for _, test := range tests {
Add a nil pointer check before dereferencing an identifier's Obj (#<I>) When walking the AST during extraction, if an identifier in a composite literal is encountered that does not define in that file, the `Obj` field of the `ast.Ident` will be nil. Rather than panicking in this case, have the literal string extraction function return false (no string found). Also, add a test case representing this scenario.
diff --git a/packages/cli/src/utils/hosting/hosting.js b/packages/cli/src/utils/hosting/hosting.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/utils/hosting/hosting.js +++ b/packages/cli/src/utils/hosting/hosting.js @@ -280,7 +280,7 @@ class Hosting { } getURL () { - return `https://${this.name}--${session.project.instance}.${this.hostingHost}` + return `https://${this.name}--${session.project.instance}.${session.location}.${this.hostingHost}` } encodePath (pathToEncode) {
fix(cli): proper url for hosting
diff --git a/src/main/java/kcsaba/image/viewer/ImageComponent.java b/src/main/java/kcsaba/image/viewer/ImageComponent.java index <HASH>..<HASH> 100644 --- a/src/main/java/kcsaba/image/viewer/ImageComponent.java +++ b/src/main/java/kcsaba/image/viewer/ImageComponent.java @@ -171,13 +171,13 @@ class ImageComponent extends JComponent { AffineTransform tr=new AffineTransform(); switch (resizeStrategy) { case NO_RESIZE: - tr.setToTranslation((getWidth()-image.getWidth())/2, (getHeight()-image.getHeight())/2); + tr.setToTranslation((getWidth()-image.getWidth())/2.0, (getHeight()-image.getHeight())/2.0); break; case SHRINK_TO_FIT: double shrink = Math.min(getSizeRatio(), 1); double imageDisplayWidth=image.getWidth()*shrink; double imageDisplayHeight=image.getHeight()*shrink; - tr.setToTranslation((getWidth()-imageDisplayWidth)/2, (getHeight()-imageDisplayHeight)/2); + tr.setToTranslation((getWidth()-imageDisplayWidth)/2.0, (getHeight()-imageDisplayHeight)/2.0); tr.scale(shrink, shrink); break; default:
Fix inconsistent position between NO_RESIZE and SHRINK_TO_FIT due to rounding.
diff --git a/ruby/command-t/scanner/jump_scanner.rb b/ruby/command-t/scanner/jump_scanner.rb index <HASH>..<HASH> 100644 --- a/ruby/command-t/scanner/jump_scanner.rb +++ b/ruby/command-t/scanner/jump_scanner.rb @@ -31,7 +31,7 @@ module CommandT include VIM::PathUtilities def paths - jumps_with_filename = jumps.select do |line| + jumps_with_filename = jumps.lines.select do |line| line_contains_filename?(line) end filenames = jumps_with_filename[1..-2].map do |line|
Fix CommandTJump under Ruby <I>.x The jump scanner pulls in a string jumplist. This worked fine under Ruby <I>, where `String#select` operates in a line-wise fashion. Under Ruby <I>.x, however, it's a private method and explodes. Using `String#lines` instead makes things work on both Rubies.
diff --git a/irc/client.py b/irc/client.py index <HASH>..<HASH> 100644 --- a/irc/client.py +++ b/irc/client.py @@ -1275,6 +1275,10 @@ class Event(object): tags = [] self.tags = tags + def __str__(self): + return "type: {}, source: {}, target: {}, arguments: {}, tags: {}".format(self.type, + self.source, self.target, self.arguments, self.tags) + def is_channel(string): """Check if a string is a channel name.
allow str(Event) to work
diff --git a/src/AudioPlayer.js b/src/AudioPlayer.js index <HASH>..<HASH> 100644 --- a/src/AudioPlayer.js +++ b/src/AudioPlayer.js @@ -260,7 +260,21 @@ class AudioPlayer extends Component { } } - componentDidUpdate () { + componentDidUpdate (prevProps, prevState) { + if (typeof this.props.onRepeatStrategyUpdate === 'function') { + const prevRepeatStrategy = getRepeatStrategy( + prevState.loop, + prevState.cycle + ); + const newRepeatStrategy = getRepeatStrategy( + this.state.loop, + this.state.cycle + ); + if (prevRepeatStrategy !== newRepeatStrategy) { + this.props.onRepeatStrategyUpdate(newRepeatStrategy); + } + } + /* if we loaded a new playlist and the currently playing track couldn't * be found, pause and load the first track in the new playlist. */ @@ -726,6 +740,7 @@ AudioPlayer.propTypes = { stayOnBackSkipThreshold: PropTypes.number, style: PropTypes.object, onActiveTrackUpdate: PropTypes.func, + onRepeatStrategyUpdate: PropTypes.func, onShuffleUpdate: PropTypes.func, onMediaEvent: PropTypes.objectOf(PropTypes.func.isRequired), audioElementRef: PropTypes.func
onRepeatStrategyUpdate prop included.
diff --git a/matgendb/creator.py b/matgendb/creator.py index <HASH>..<HASH> 100644 --- a/matgendb/creator.py +++ b/matgendb/creator.py @@ -247,7 +247,7 @@ class VaspToDbTaskDrone(AbstractDrone): # DOS data tends to be above the 4Mb limit for mongo docs. A ref # to the dos file is in the dos_fs_id. result = coll.find_one({"dir_name": d["dir_name"]}, - fields=["dir_name", "task_id"]) + ["dir_name", "task_id"]) if result is None or self.update_duplicates: if self.parse_dos and "calculations" in d: for calc in d["calculations"]: diff --git a/matgendb/query_engine.py b/matgendb/query_engine.py index <HASH>..<HASH> 100644 --- a/matgendb/query_engine.py +++ b/matgendb/query_engine.py @@ -376,8 +376,7 @@ class QueryEngine(object): crit = self._parse_criteria(criteria) #print("@@ {}.find({}, fields={}, timeout=False)".format(self.collection.name, crit, props)) - cur = self.collection.find(crit, fields=props, - timeout=False).skip(index) + cur = self.collection.find(crit, props).skip(index) if limit is not None: cur.limit(limit) if distinct_key is not None:
Upgrade for pymongo<I> compatibility field argument to Collection.find() got renamed
diff --git a/DrdPlus/Tables/Armaments/Armourer.php b/DrdPlus/Tables/Armaments/Armourer.php index <HASH>..<HASH> 100644 --- a/DrdPlus/Tables/Armaments/Armourer.php +++ b/DrdPlus/Tables/Armaments/Armourer.php @@ -198,6 +198,7 @@ class Armourer extends StrictObject { /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ return + // shooting weapons are two-handed (except minicrossbow), projectiles are not $this->isTwoHanded($weaponToHoldByBothHands) // the weapon is explicitly two-handed // or it is melee weapon with length at least 1 (see PPH page 92 right column) || ($weaponToHoldByBothHands->isMeleeArmament()
Note about shooting weapons and their two-hands requirement
diff --git a/stagpy/plates.py b/stagpy/plates.py index <HASH>..<HASH> 100644 --- a/stagpy/plates.py +++ b/stagpy/plates.py @@ -128,14 +128,16 @@ def plot_plate_limits_field(axis, rcmb, ridges, trenches): xxt = (rcmb + 1.35) * np.cos(trench) # arrow end yyt = (rcmb + 1.35) * np.sin(trench) # arrow end axis.annotate('', xy=(xxd, yyd), xytext=(xxt, yyt), - arrowprops=dict(facecolor='red', shrink=0.05)) + arrowprops=dict(facecolor='red', shrink=0.05), + annotation_clip=False) for ridge in ridges: xxd = (rcmb + 1.02) * np.cos(ridge) yyd = (rcmb + 1.02) * np.sin(ridge) xxt = (rcmb + 1.35) * np.cos(ridge) yyt = (rcmb + 1.35) * np.sin(ridge) axis.annotate('', xy=(xxd, yyd), xytext=(xxt, yyt), - arrowprops=dict(facecolor='green', shrink=0.05)) + arrowprops=dict(facecolor='green', shrink=0.05), + annotation_clip=False) def _isurf(snap):
Always show plate limit annotations Annotations outside of data limits wouldn't show. This commit fix this with the annotation_clip kwarg.
diff --git a/ui/plugins/controller.js b/ui/plugins/controller.js index <HASH>..<HASH> 100644 --- a/ui/plugins/controller.js +++ b/ui/plugins/controller.js @@ -270,6 +270,10 @@ treeherder.controller('PluginCtrl', [ // second is when we have the buildapi id and need to send a request // to the self serve api (which does not listen over pulse!). ThJobModel.retrigger($scope.repoName, $scope.job.id).then(function() { + // XXX: Bug 1170839 disables buildapi retrigger requests for the ash branch + if($scope.repoName === "ash") { + return; + } // XXX: Remove this after 1134929 is resolved. var requestId = getBuildbotRequestId(); if (requestId) { @@ -294,6 +298,10 @@ treeherder.controller('PluginCtrl', [ $scope.cancelJob = function() { // See note in retrigger logic. ThJobModel.cancel($scope.repoName, $scope.job.id).then(function() { + // XXX: Bug 1170839 disables buildapi cancel requests for the ash branch + if($scope.repoName === "ash") { + return; + } // XXX: Remove this after 1134929 is resolved. var requestId = getBuildbotRequestId(); if (requestId) {
Bug <I> - Don't send retrigger/cancel requests for the ash repository r=emorley
diff --git a/src/Classifiers/MiddlewareClassifier.php b/src/Classifiers/MiddlewareClassifier.php index <HASH>..<HASH> 100644 --- a/src/Classifiers/MiddlewareClassifier.php +++ b/src/Classifiers/MiddlewareClassifier.php @@ -37,8 +37,13 @@ class MiddlewareClassifier implements Classifier { $reflection = new ReflectionProperty($this->httpKernel, 'middleware'); $reflection->setAccessible(true); + $middlewares = $reflection->getValue($this->httpKernel); - return $reflection->getValue($this->httpKernel); + $reflection = new ReflectionProperty($this->httpKernel, 'routeMiddleware'); + $reflection->setAccessible(true); + $routeMiddlwares = $reflection->getValue($this->httpKernel); + + return array_values(array_unique(array_merge($middlewares, $routeMiddlwares))); } protected function getMiddlewareGroupsFromKernel() : array
Include Route Middlewares Include Route Middlewares when retrieving the Middlewares (getMiddlewares)
diff --git a/src/Symfony/Component/HttpFoundation/HeaderBag.php b/src/Symfony/Component/HttpFoundation/HeaderBag.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpFoundation/HeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/HeaderBag.php @@ -101,11 +101,11 @@ class HeaderBag implements \IteratorAggregate, \Countable /** * Returns a header value by name. * - * @param string $key The header name - * @param string|string[] $default The default value - * @param bool $first Whether to return the first value or all header values + * @param string $key The header name + * @param string|string[]|null $default The default value + * @param bool $first Whether to return the first value or all header values * - * @return string|string[] The first header value or default value if $first is true, an array of values otherwise + * @return string|string[]|null The first header value or default value if $first is true, an array of values otherwise */ public function get($key, $default = null, $first = true) {
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
diff --git a/lib/middleman/core_extensions/front_matter.rb b/lib/middleman/core_extensions/front_matter.rb index <HASH>..<HASH> 100644 --- a/lib/middleman/core_extensions/front_matter.rb +++ b/lib/middleman/core_extensions/front_matter.rb @@ -17,7 +17,7 @@ module Middleman::CoreExtensions::FrontMatter frontmatter.touch_file(file) end - file_deleted do |file| + file_deleted FrontMatter.matcher do |file| frontmatter.remove_file(file) end @@ -52,7 +52,7 @@ module Middleman::CoreExtensions::FrontMatter class FrontMatter class << self def matcher - %r{^source/.*\.html} + %r{source/.*\.html} end end @@ -121,4 +121,4 @@ module Middleman::CoreExtensions::FrontMatter [data, content] end end -end \ No newline at end of file +end
Oops - the change to the frontmatter regex broke it somehow. This reverts that change (but also reigns in the file_deleted hook).
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ setup( version = versioneer.get_version(), cmdclass = versioneer.get_cmdclass(), maintainer = "Eduard Broecker", - maintainer_email = "eduard at gmx dot de", + maintainer_email = "eduard@gmx.de", url = "http://github.com/ebroecker/canmatrix", classifiers = filter(None, classifiers.split("\n")), description = doclines[0],
correct maintainer email for pypi
diff --git a/lib/HTMLParser.js b/lib/HTMLParser.js index <HASH>..<HASH> 100644 --- a/lib/HTMLParser.js +++ b/lib/HTMLParser.js @@ -4205,7 +4205,7 @@ function HTMLParser(address, fragmentContext, options) { case 0x0060: // GRAVE ACCENT /* falls through */ default: - attrvaluebuf += String.fromCharCode(c); + attrvaluebuf += getMatchingChars(UNQUOTEDATTRVAL); tokenizer = attribute_value_unquoted_state; break; }
A small improvement to attribute value parsing performance. Use `getMatchingChars` when parsing unquoted attribute values.
diff --git a/test/test.document_conversion.v1-experimental.js b/test/test.document_conversion.v1-experimental.js index <HASH>..<HASH> 100644 --- a/test/test.document_conversion.v1-experimental.js +++ b/test/test.document_conversion.v1-experimental.js @@ -73,7 +73,8 @@ describe('document_conversion', function() { it('should generate a valid payload', function() { var req = servInstance.convert(payload, noop); - assert(req.uri.href.startsWith(service_options.url + convertPath)); + var url = service_options.url + convertPath; + assert.equal(req.uri.href.slice(0, url.length), url); assert.equal(req.method, 'POST'); assert(req.formData); });
[DCS] Fixes a failing test for Node.js <I> The test needed to be updated to not use features from ECMAScript 6. (String.prototype.startsWith)
diff --git a/ejb3/src/main/java/org/jboss/as/ejb3/remote/LocalEjbReceiver.java b/ejb3/src/main/java/org/jboss/as/ejb3/remote/LocalEjbReceiver.java index <HASH>..<HASH> 100644 --- a/ejb3/src/main/java/org/jboss/as/ejb3/remote/LocalEjbReceiver.java +++ b/ejb3/src/main/java/org/jboss/as/ejb3/remote/LocalEjbReceiver.java @@ -225,8 +225,13 @@ public class LocalEjbReceiver extends EJBReceiver implements Service<LocalEjbRec @Override - protected void verify(final String appName, final String moduleName, final String distinctName, final String beanName) throws Exception { - findBean(appName, moduleName, distinctName, beanName); + protected boolean exists(final String appName, final String moduleName, final String distinctName, final String beanName) { + try { + final EjbDeploymentInformation ejbDeploymentInformation = findBean(appName, moduleName, distinctName, beanName); + return ejbDeploymentInformation != null; + } catch (IllegalArgumentException iae) { + return false; + } } private EjbDeploymentInformation findBean(final String appName, final String moduleName, final String distinctName, final String beanName) {
EJBCLIENT-<I> Update LocalEjbReceiver to take into account the EJB client API change
diff --git a/lib/xmlseclibs.php b/lib/xmlseclibs.php index <HASH>..<HASH> 100644 --- a/lib/xmlseclibs.php +++ b/lib/xmlseclibs.php @@ -337,9 +337,10 @@ class XMLSecurityKey { } if ($this->cryptParams['library'] == 'openssl') { if ($this->cryptParams['type'] == 'public') { - /* Load the fingerprint if this is an X509 certificate. */ - $this->X509Fingerprint = self::calculateX509Fingerprint($this->key); - + if ($isCert) { + /* Load the fingerprint if this is an X509 certificate. */ + $this->X509Fingerprint = self::calculateX509Fingerprint($this->key); + } $this->key = openssl_get_publickey($this->key); } else { $this->key = openssl_get_privatekey($this->key, $this->passphrase); @@ -1540,7 +1541,7 @@ class XMLSecEnc { $x509cert = $x509certNodes->item(0)->textContent; $x509cert = str_replace(array("\r", "\n"), "", $x509cert); $x509cert = "-----BEGIN CERTIFICATE-----\n".chunk_split($x509cert, 64, "\n")."-----END CERTIFICATE-----\n"; - $objBaseKey->loadKey($x509cert); + $objBaseKey->loadKey($x509cert, FALSE, TRUE); } } break;
don't calculate the fingerprint for anything that is not an x<I> certificate; this fixes an issue where a key value is included -after- the certificate value in the authnresponse and the fingerprint would be overridden (and set to a null value)
diff --git a/test/helper.rb b/test/helper.rb index <HASH>..<HASH> 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -26,7 +26,7 @@ class Rake::TestCase < Minitest::Test include Rake::TaskManager end - RUBY = Gem.ruby + RUBY = ENV['BUNDLE_RUBY'] || Gem.ruby def setup ARGV.clear
Support test-bundled-gems task on ruby core repository
diff --git a/restcomm/restcomm.dao/src/main/java/org/mobicents/servlet/restcomm/dao/mybatis/MybatisUsageDao.java b/restcomm/restcomm.dao/src/main/java/org/mobicents/servlet/restcomm/dao/mybatis/MybatisUsageDao.java index <HASH>..<HASH> 100644 --- a/restcomm/restcomm.dao/src/main/java/org/mobicents/servlet/restcomm/dao/mybatis/MybatisUsageDao.java +++ b/restcomm/restcomm.dao/src/main/java/org/mobicents/servlet/restcomm/dao/mybatis/MybatisUsageDao.java @@ -120,7 +120,6 @@ public final class MybatisUsageDao implements UsageDao { return usageRecords; } finally { session.close(); - System.out.println("Query '" + queryName + "' took " + (System.currentTimeMillis()-startTime) + "ms to complete."); } }
Removed System.out.println
diff --git a/lib/chronic.rb b/lib/chronic.rb index <HASH>..<HASH> 100644 --- a/lib/chronic.rb +++ b/lib/chronic.rb @@ -42,7 +42,7 @@ require 'chronic/time_zone' require 'numerizer/numerizer' module Chronic - VERSION = "0.2.3" + VERSION = "0.2.4" class << self attr_accessor :debug @@ -129,4 +129,4 @@ class Time Time.local(year, month, day, hour, minute, second) end -end \ No newline at end of file +end
update version number to reflect History.txt
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -113,6 +113,7 @@ entry_points = { "TaskotronProcessor", "releng=fedmsg_meta_fedora_infrastructure.releng:RelengProcessor", "mdapi=fedmsg_meta_fedora_infrastructure.mdapi:MdapiProcessor", + "nagios=fedmsg_meta_fedora_infrastructure.nagios:NagiosProcessor", ] }
Forgotten setup.py line.
diff --git a/agent/http_oss_test.go b/agent/http_oss_test.go index <HASH>..<HASH> 100644 --- a/agent/http_oss_test.go +++ b/agent/http_oss_test.go @@ -72,7 +72,8 @@ func TestHTTPAPI_MethodNotAllowed_OSS(t *testing.T) { testMethodNotAllowed := func(method string, path string, allowedMethods []string) { t.Run(method+" "+path, func(t *testing.T) { client := fastClient - if path == "/v1/agent/leave" { + switch path { + case "/v1/agent/leave", "/v1/agent/self": // there are actual sleeps in this code that should take longer client = slowClient t.Logf("Using slow http client for leave tests")
Update agent tests to wait a bit longer for the /v1/agent/self endpoint (#<I>)
diff --git a/contractcourt/chain_watcher.go b/contractcourt/chain_watcher.go index <HASH>..<HASH> 100644 --- a/contractcourt/chain_watcher.go +++ b/contractcourt/chain_watcher.go @@ -578,8 +578,20 @@ func (c *chainWatcher) dispatchContractBreach(spendEvent *chainntnfs.SpendDetail return fmt.Errorf("unable to create breach retribution: %v", err) } + // Nil the curve before printing. + if retribution.RemoteOutputSignDesc != nil && + retribution.RemoteOutputSignDesc.DoubleTweak != nil { + retribution.RemoteOutputSignDesc.DoubleTweak.Curve = nil + } + if retribution.LocalOutputSignDesc != nil && + retribution.LocalOutputSignDesc.DoubleTweak != nil { + retribution.LocalOutputSignDesc.DoubleTweak.Curve = nil + } + log.Debugf("Punishment breach retribution created: %v", - spew.Sdump(retribution)) + newLogClosure(func() string { + return spew.Sdump(retribution) + })) // With the event processed, we'll now notify all subscribers of the // event.
contractcourt/chain_watcher: don't print curve of DoubleTweak
diff --git a/airflow/hooks/hive_hooks.py b/airflow/hooks/hive_hooks.py index <HASH>..<HASH> 100644 --- a/airflow/hooks/hive_hooks.py +++ b/airflow/hooks/hive_hooks.py @@ -47,6 +47,7 @@ class HiveCliHook(BaseHook): True """ conn = self.conn + schema = schema or conn.schema if schema: hql = "USE {schema};\n{hql}".format(**locals())
Picking up the connection's schema in hive operator
diff --git a/lib/Project/Image.php b/lib/Project/Image.php index <HASH>..<HASH> 100644 --- a/lib/Project/Image.php +++ b/lib/Project/Image.php @@ -114,6 +114,11 @@ class Image extends TimberImage { $originalWidth = parent::width(); $width = $this->width($customSize); + if (!isset($width)) { + // if image doesn't exist, width won't be set + return 0; + } + if ($width != $originalWidth) { // distinct custom dimensions; calculate new based on aspect ratio $height = floor( $width / $this->aspect() );
If image file doesn't exist, Image::height() should return 0
diff --git a/lib/atdis/models/page.rb b/lib/atdis/models/page.rb index <HASH>..<HASH> 100644 --- a/lib/atdis/models/page.rb +++ b/lib/atdis/models/page.rb @@ -32,7 +32,7 @@ module ATDIS if response.respond_to?(:count) errors.add(:count, ErrorMessage["is not the same as the number of applications returned", "6.4"]) if count != response.count end - if pagination.respond_to?(:per_page) + if pagination.respond_to?(:per_page) && pagination.per_page errors.add(:count, ErrorMessage["should not be larger than the number of results per page", "6.4"]) if count > pagination.per_page end end
Only do comparison if both numbers are not nil
diff --git a/IndexedRedis/utils.py b/IndexedRedis/utils.py index <HASH>..<HASH> 100644 --- a/IndexedRedis/utils.py +++ b/IndexedRedis/utils.py @@ -3,7 +3,6 @@ # Some random utility functions - # vim:set ts=8 shiftwidth=8 softtabstop=8 noexpandtab : @@ -32,9 +31,8 @@ class KeyList(list): ''' def __getitem__(self, item): - if isinstance(item, int): + if isinstance(item, (int, slice)): return list.__getitem__(self, item) - try: idx = self.index(item) except:
Support slicing FIELDS after it is converted to a KeyList
diff --git a/src/transforms/ViewLayout.js b/src/transforms/ViewLayout.js index <HASH>..<HASH> 100644 --- a/src/transforms/ViewLayout.js +++ b/src/transforms/ViewLayout.js @@ -17,7 +17,8 @@ var AxisRole = 'axis', ColHeader = 'column-header', ColFooter = 'column-footer'; -var tempBounds = new Bounds(); +var AxisOffset = 0.5, + tempBounds = new Bounds(); /** * Layout view elements such as axes and legends. @@ -184,7 +185,7 @@ function layoutAxis(view, axis, width, height) { // update bounds boundStroke(bounds.translate(x, y), item); - if (set(item, 'x', x + 0.5) | set(item, 'y', y + 0.5)) { + if (set(item, 'x', x + AxisOffset) | set(item, 'y', y + AxisOffset)) { item.bounds = tempBounds; view.dirty(item); item.bounds = bounds;
Lift axis half-pixel offset to named constant.
diff --git a/model-test/src/main/java/org/jboss/as/model/test/EAPRepositoryReachableUtil.java b/model-test/src/main/java/org/jboss/as/model/test/EAPRepositoryReachableUtil.java index <HASH>..<HASH> 100644 --- a/model-test/src/main/java/org/jboss/as/model/test/EAPRepositoryReachableUtil.java +++ b/model-test/src/main/java/org/jboss/as/model/test/EAPRepositoryReachableUtil.java @@ -39,7 +39,7 @@ public class EAPRepositoryReachableUtil { public static boolean isReachable() { if (reachable == null) { - if (System.getProperties().contains(TEST_TRANSFORMERS_EAP)) { + if (System.getProperties().containsKey(TEST_TRANSFORMERS_EAP)) { try { InetAddress.getByName(EAP_REPOSITORY_HOST); reachable = true;
[WFLY-<I>] More forgiving specification of -Djboss.test.transformers.eap was: <I>f<I>e5ae<I>d<I>a5c2dfd<I>ad<I>
diff --git a/salt/modules/linux_lvm.py b/salt/modules/linux_lvm.py index <HASH>..<HASH> 100644 --- a/salt/modules/linux_lvm.py +++ b/salt/modules/linux_lvm.py @@ -444,7 +444,7 @@ def lvcreate( salt '*' lvm.lvcreate new_volume_name vg_name extents=100 pv=/dev/sdb salt '*' lvm.lvcreate new_snapshot vg_name snapshot=volume_name size=3G - .. versionadded:: to_complete + .. versionadded:: 0.12.0 Support for thin pools and thin volumes diff --git a/salt/states/lvm.py b/salt/states/lvm.py index <HASH>..<HASH> 100644 --- a/salt/states/lvm.py +++ b/salt/states/lvm.py @@ -252,7 +252,7 @@ def lv_present( Any supported options to lvcreate. See :mod:`linux_lvm <salt.modules.linux_lvm>` for more details. - .. versionadded:: to_complete + .. versionadded:: 2016.11.0 thinvolume Logical Volume is thinly provisioned
Use the right version on `versionadded`
diff --git a/src/sap.ui.core/test/sap/ui/core/qunit/mvc/AnyViewAsync.qunit.js b/src/sap.ui.core/test/sap/ui/core/qunit/mvc/AnyViewAsync.qunit.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.core/test/sap/ui/core/qunit/mvc/AnyViewAsync.qunit.js +++ b/src/sap.ui.core/test/sap/ui/core/qunit/mvc/AnyViewAsync.qunit.js @@ -37,7 +37,9 @@ sap.ui.define([ success : function(data) { sSource = oConfig.receiveSource(data); }, - async : false + async : false, + // avoid that jQuery executes the loaded code in case of JSView which causes CSP violation + dataType: sType === "js" ? "text" : undefined }); // fake an asynchronous resource request to have control over the delay @@ -155,4 +157,4 @@ sap.ui.define([ return asyncTestsuite; -}); \ No newline at end of file +});
[INTERNAL] core.mvc: make view loading in test more CSP futureproof - in case of loading JS resources, the header "text" is used to avoid evaluating the loaded content by jQuery Change-Id: I<I>abae4b0bc<I>d3b4efa<I>ca<I>ff5bbcb
diff --git a/satpy/readers/utils.py b/satpy/readers/utils.py index <HASH>..<HASH> 100644 --- a/satpy/readers/utils.py +++ b/satpy/readers/utils.py @@ -202,7 +202,7 @@ def unzip_file(filename): fdn, tmpfilepath = tempfile.mkstemp() LOGGER.info("Using temp file for BZ2 decompression:", tmpfilepath) # If in python 3, try pbzip2 - if sys.version_info > (3, 0): + if sys.version_info.major >= 3: pbzip = shutil.which('pbzip2') # Run external pbzip2 if pbzip is not None:
Change python version checker to check only the major release number in unzip_files
diff --git a/imagen/random.py b/imagen/random.py index <HASH>..<HASH> 100644 --- a/imagen/random.py +++ b/imagen/random.py @@ -2,6 +2,7 @@ Two-dimensional pattern generators drawing from various random distributions. """ +import warnings import numpy as np import param from param.parameterized import ParamOverrides @@ -17,9 +18,8 @@ from numbergen import TimeAware, Hash def seed(seed=None): """ Set the seed on the shared RandomState instance. - - Convenience function: shortcut to RandomGenerator.random_generator.seed(). """ + warnings.warn("Use param.seed instead. To be deprecated.", FutureWarning) RandomGenerator.random_generator.seed(seed)
Added warning to random.seed function as it should not be used
diff --git a/examples/multiple_logging.py b/examples/multiple_logging.py index <HASH>..<HASH> 100644 --- a/examples/multiple_logging.py +++ b/examples/multiple_logging.py @@ -21,7 +21,7 @@ LOGGER = logging.getLogger('enlighten') DATACENTERS = 5 SYSTEMS = (10, 20) # Range -FILES = (100, 1000) # Range +FILES = (10, 100) # Range def process_files(manager): @@ -49,7 +49,7 @@ def process_files(manager): # Iterate through files for fnum in range(files): # pylint: disable=unused-variable system.update() # Update count - time.sleep(random.uniform(0.0001, 0.0005)) # Random processing time + time.sleep(random.uniform(0.001, 0.005)) # Random processing time system.close() # Close counter so it gets removed # Log status
Use less granular time in examples
diff --git a/AWSScout2/utils_vpc.py b/AWSScout2/utils_vpc.py index <HASH>..<HASH> 100644 --- a/AWSScout2/utils_vpc.py +++ b/AWSScout2/utils_vpc.py @@ -79,8 +79,11 @@ def list_resources_in_security_group(aws_config, current_config, path, current_p else: sg['used_by'][service]['resource_type'][resource_type].append(resource_id) except Exception as e: - printInfo('Exception caught.') - printException(e) + vpc_id = current_path[5] + if vpc_id == ec2_classic and resource_type == 'elbs': + pass + else: + printException(e) # # Add a display name for all known CIDRs
For ELBs in EC2 classic , no ELBs is normal -- ignore exception
diff --git a/test/e2e_node/memory_eviction_test.go b/test/e2e_node/memory_eviction_test.go index <HASH>..<HASH> 100644 --- a/test/e2e_node/memory_eviction_test.go +++ b/test/e2e_node/memory_eviction_test.go @@ -33,7 +33,7 @@ import ( // Eviction Policy is described here: // https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-eviction.md -var _ = framework.KubeDescribe("MemoryEviction [Slow] [Serial]", func() { +var _ = framework.KubeDescribe("MemoryEviction [Slow] [Serial] [Disruptive]", func() { f := framework.NewDefaultFramework("eviction-test") Context("When there is memory pressure", func() {
Label MemoryEviction [Disruptive]
diff --git a/tests/export_unittest.py b/tests/export_unittest.py index <HASH>..<HASH> 100644 --- a/tests/export_unittest.py +++ b/tests/export_unittest.py @@ -88,7 +88,6 @@ class GetCalculationsTestCase(BaseExportTestCase): """Tests for the :function:`openquake.export.get_calculations` API function.""" - def test_get_calculations(self): # Test that :function:`openquake.export.get_calculations` retrieves # only _completed_ calculations for the given user, in reverse chrono
removed an excess blank line Former-commit-id: c8a<I>ee<I>c<I>d<I>ffbc<I>d<I>a<I>f6a
diff --git a/tests/TestCase/Database/ConnectionTest.php b/tests/TestCase/Database/ConnectionTest.php index <HASH>..<HASH> 100644 --- a/tests/TestCase/Database/ConnectionTest.php +++ b/tests/TestCase/Database/ConnectionTest.php @@ -204,9 +204,9 @@ class ConnectionTest extends TestCase { $sql = 'SELECT 1'; $statement = $this->connection->execute($sql); $result = $statement->fetch(); - $statement->closeCursor(); $this->assertCount(1, $result); $this->assertEquals([1], $result); + $statement->closeCursor(); } /**
Moving closeCursor() call after count(), just in case
diff --git a/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java b/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java index <HASH>..<HASH> 100644 --- a/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java +++ b/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java @@ -42,7 +42,7 @@ import static org.apache.flink.util.Preconditions.checkNotNull; * */ @PublicEvolving -public class MemorySize implements java.io.Serializable { +public class MemorySize implements java.io.Serializable, Comparable<MemorySize> { private static final long serialVersionUID = 1L; @@ -120,6 +120,11 @@ public class MemorySize implements java.io.Serializable { return bytes + " bytes"; } + @Override + public int compareTo(MemorySize that) { + return Long.compare(this.bytes, that.bytes); + } + // ------------------------------------------------------------------------ // Calculations // ------------------------------------------------------------------------
[hotfix] Make MemorySize comparable.
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,7 +15,8 @@ module.exports = function(grunt) { commit: true, commitFiles: ['-a'], createTag: true, - push: true + push: true, + pushTo: 'origin' } }, uglify: {
- small fix in grunt-bump config
diff --git a/lib/slanger/redis.rb b/lib/slanger/redis.rb index <HASH>..<HASH> 100644 --- a/lib/slanger/redis.rb +++ b/lib/slanger/redis.rb @@ -11,8 +11,8 @@ module Slanger # Dispatch messages received from Redis to their destination channel. base.on(:message) do |channel, message| message = JSON.parse message - const = message['channel'] =~ /^presence-/ ? 'PresenceChannel' : 'Channel' - Slanger.const_get(const).find_or_create_by_channel_id(message['channel']).dispatch message, channel + klass = message['channel'][/^presence-/] ? PresenceChannel : Channel + klass.find_or_create_by_channel_id(message['channel']).dispatch message, channel end end
use constant directly instead of with const_get. Bonus points come with the truthiness parody
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def readme(): return f.read() setup(name='zeroless', - version='0.3.0', + version='0.4.0', description='A pythonic approach for distributed systems with ZeroMQ.', long_description=readme(), classifiers=[
Updated version of the zeroless module in the setup.py file.
diff --git a/CampaignChainActivityGoToWebinarBundle.php b/CampaignChainActivityGoToWebinarBundle.php index <HASH>..<HASH> 100755 --- a/CampaignChainActivityGoToWebinarBundle.php +++ b/CampaignChainActivityGoToWebinarBundle.php @@ -1,4 +1,12 @@ <?php +/* + * This file is part of the CampaignChain package. + * + * (c) Sandro Groganz <sandro@campaignchain.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace CampaignChain\Activity\GoToWebinarBundle;
CE-<I> Basic MailChimp integration
diff --git a/packages/components/bolt-text/__tests__/text.js b/packages/components/bolt-text/__tests__/text.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-text/__tests__/text.js +++ b/packages/components/bolt-text/__tests__/text.js @@ -71,7 +71,7 @@ describe('<bolt-text> Component', () => { const image = await page.screenshot(); expect(image).toMatchImageSnapshot({ - failureThreshold: '0.01', + failureThreshold: '0.03', failureThresholdType: 'percent', });
test: increase failure threshold to 3%
diff --git a/app/controllers/subscriptions_controller.rb b/app/controllers/subscriptions_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/subscriptions_controller.rb +++ b/app/controllers/subscriptions_controller.rb @@ -234,11 +234,9 @@ class SubscriptionsController < ApplicationController end def create_temp_file(prefix) - # default external encoding in Ruby 1.9.3 is UTF-8, while binary files use binary encoding - ASCII-8BIT + # default external encoding in Ruby 1.9.3 is UTF-8, need to specify that we are opening a binary file (ASCII-8BIT encoding) f = File.new( - File.join(find_or_create_temp_dir, "#{prefix}_#{SecureRandom.hex(10)}.zip"), - (defined? ::Encoding) ? 'w+:ASCII-8BIT' : 'w+', - 0600) + File.join(find_or_create_temp_dir, "#{prefix}_#{SecureRandom.hex(10)}.zip"), 'wb+', 0600) yield f if block_given? f.path
switched to a more succinct way to open a binary file
diff --git a/activemodel/test/cases/serializable/json_test.rb b/activemodel/test/cases/serializable/json_test.rb index <HASH>..<HASH> 100644 --- a/activemodel/test/cases/serializable/json_test.rb +++ b/activemodel/test/cases/serializable/json_test.rb @@ -14,9 +14,11 @@ class Contact end end + remove_method :attributes if method_defined?(:attributes) + def attributes instance_values - end unless method_defined?(:attributes) + end end class JsonSerializationTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/serializable/xml_test.rb b/activemodel/test/cases/serializable/xml_test.rb index <HASH>..<HASH> 100644 --- a/activemodel/test/cases/serializable/xml_test.rb +++ b/activemodel/test/cases/serializable/xml_test.rb @@ -9,6 +9,8 @@ class Contact attr_accessor :address, :friends + remove_method :attributes if method_defined?(:attributes) + def attributes instance_values.except("address", "friends") end
fix method redefined warning in activemodel
diff --git a/openid/test/test_auth_request.py b/openid/test/test_auth_request.py index <HASH>..<HASH> 100644 --- a/openid/test/test_auth_request.py +++ b/openid/test/test_auth_request.py @@ -60,6 +60,20 @@ class TestAuthRequestBase(object): error_message = 'openid.%s unexpectedly present: %s' % (key, actual) self.failIf(actual is not None, error_message) + def test_checkNoAssocHandle(self): + self.authreq.assoc = None + msg = self.authreq.getMessage(self.realm, self.return_to, + self.immediate) + + self.failIfOpenIDKeyExists(msg, 'assoc_handle') + + def test_checkWithAssocHandle(self): + msg = self.authreq.getMessage(self.realm, self.return_to, + self.immediate) + + self.failUnlessOpenIDValueEquals(msg, 'assoc_handle', + self.assoc.handle) + def test_addExtensionArg(self): self.authreq.addExtensionArg('bag:', 'color', 'brown') self.authreq.addExtensionArg('bag:', 'material', 'paper')
[project @ Check assoc_handle against assoc object]
diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index <HASH>..<HASH> 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -1475,9 +1475,10 @@ class Editor(SpyderPluginWidget): def refresh_save_all_action(self): """Enable 'Save All' if there are files to be saved""" editorstack = self.get_current_editorstack() - state = any(finfo.editor.document().isModified() - for finfo in editorstack.data) - self.save_all_action.setEnabled(state) + if editorstack: + state = any(finfo.editor.document().isModified() + for finfo in editorstack.data) + self.save_all_action.setEnabled(state) def update_warning_menu(self): """Update warning list menu"""
Adds a validation for the editorstack existence.
diff --git a/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java b/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java index <HASH>..<HASH> 100644 --- a/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java +++ b/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java @@ -988,13 +988,13 @@ public abstract class MultipleCacheManagersTest extends AbstractCacheTest { public boolean test(CM mode, IMethodInstance method) { // If both method and class have the annotation, method annotation has priority. - A clazzAnnotation = method.getInstance().getClass().getAnnotation(annotationClazz); A methodAnnotation = method.getMethod().getConstructorOrMethod().getMethod().getAnnotation(annotationClazz); if (methodAnnotation != null) { // If a method-level annotation contains current cache mode, run it, otherwise ignore that return Stream.of(modesRetriever.apply(methodAnnotation)).anyMatch(m -> modeChecker.test(m, mode)); } else { - return clazzAnnotation != null; + // If there is no method-level annotation, always run it + return true; } } }
ISPN-<I> Run all test methods when the class isn't annotated @InCacheMode Or @InTransactionMode
diff --git a/guava/src/com/google/common/collect/UnmodifiableIterator.java b/guava/src/com/google/common/collect/UnmodifiableIterator.java index <HASH>..<HASH> 100644 --- a/guava/src/com/google/common/collect/UnmodifiableIterator.java +++ b/guava/src/com/google/common/collect/UnmodifiableIterator.java @@ -23,6 +23,10 @@ import java.util.Iterator; /** * An iterator that does not support {@link #remove}. * + * <p>{@code UnmodifiableIterator} is used primarily in conjunction with implementations of + * {@link ImmutableCollection}, such as {@link ImmutableList}. You can, however, convert an existing + * iterator to an {@code UnmodifiableIterator} using {@link Iterators#unmodifiableIterator}. + * * @author Jared Levy * @since 2.0 */
Give people who have never used UnmodifiableIterator before a hint. ------------- Created by MOE: <URL>
diff --git a/masonite/snippets/auth/controllers/RegisterController.py b/masonite/snippets/auth/controllers/RegisterController.py index <HASH>..<HASH> 100644 --- a/masonite/snippets/auth/controllers/RegisterController.py +++ b/masonite/snippets/auth/controllers/RegisterController.py @@ -45,7 +45,7 @@ class RegisterController: user.verify_email(mail_manager, request) # Login the user - if auth.login(request.input(auth_config.AUTH['model'].__auth__), request.input('password')): + if auth.login(request.input('name'), request.input('password')): # Redirect to the homepage return request.redirect('/home')
fixed issue with logging in with multiple authentications
diff --git a/src/Strict.php b/src/Strict.php index <HASH>..<HASH> 100644 --- a/src/Strict.php +++ b/src/Strict.php @@ -13,10 +13,7 @@ use function reset; use function strtolower; class Strict implements Iterator, ArrayAccess, Countable { - /** - * @var array - */ - protected $container = []; + protected array $container = []; /** * Hash the initial array, and store in the container.
Declare type for Strict:: property
diff --git a/tests/test_twitter.py b/tests/test_twitter.py index <HASH>..<HASH> 100644 --- a/tests/test_twitter.py +++ b/tests/test_twitter.py @@ -114,7 +114,7 @@ async def test_oauth2_bearer_token(oauth2_client): @oauth2_decorator async def test_oauth2_nonexisting_endpoint(oauth2_client): - with pytest.raises(exceptions.DoesNotExist): + with pytest.raises(exceptions.HTTPNotFound): await oauth2_client.api.whereismytweet.get()
tests: expect HTTPNotFound on nonexisting endpoint (?) it seems to happen consistently and doesn't matter that much I suppose
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name="arxiv", - version="0.1.0", + version="0.1.1", packages=["arxiv"], # dependencies @@ -18,5 +18,5 @@ setup( license="MIT", keywords="arxiv api wrapper academic journals papers", url="https://github.com/lukasschwab/arxiv.py", - download_url="https://github.com/lukasschwab/arxiv.py/tarball/0.1.0", + download_url="https://github.com/lukasschwab/arxiv.py/tarball/0.1.1", ) \ No newline at end of file
Increment version to <I>
diff --git a/wire.py b/wire.py index <HASH>..<HASH> 100644 --- a/wire.py +++ b/wire.py @@ -723,7 +723,7 @@ Note that this is a platform-independent method of activating IME resources.append( SessionResource('/session/:sessionId/frame'). - Post('''Change focus to another frame on the page. If the frame ID is \ + Post('''Change focus to another frame on the page. If the frame `id` is \ `null`, the server should switch to the page's default content.'''). AddJsonParameter('id', '{string|number|null|WebElement JSON Object}',
LukeIS: updating wire protocol doc from frame switching the parameter is 'id' (so updating reference to it as 'ID' to lowercase). Fixes Issue <I> r<I>
diff --git a/specs-go/config.go b/specs-go/config.go index <HASH>..<HASH> 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -61,7 +61,7 @@ type User struct { GID uint32 `json:"gid" platform:"linux,solaris"` // AdditionalGids are additional group ids set for the container's process. AdditionalGids []uint32 `json:"additionalGids,omitempty" platform:"linux,solaris"` - // Username is the user name. (this field is platform dependent) + // Username is the user name. Username string `json:"username,omitempty" platform:"windows"` }
specs-go/config: Drop "this field is platform dependent" (again) We dropped these in <I> (specs-go/config: Drop "this field is platform dependent", <I>-<I>-<I>, #<I>) but f9e<I>e<I> (Windows: User struct changes, <I>-<I>-<I>, #<I>) was developed in parallel and brought in a new one.
diff --git a/lib/heroku/helpers/addons/api.rb b/lib/heroku/helpers/addons/api.rb index <HASH>..<HASH> 100644 --- a/lib/heroku/helpers/addons/api.rb +++ b/lib/heroku/helpers/addons/api.rb @@ -1,7 +1,7 @@ module Heroku::Helpers module Addons module API - VERSION="3.switzerland".freeze + VERSION="3".freeze def request(options = {}) defaults = {
Remove switzerland variant from version
diff --git a/src/Kunstmaan/VotingBundle/Services/RepositoryResolver.php b/src/Kunstmaan/VotingBundle/Services/RepositoryResolver.php index <HASH>..<HASH> 100644 --- a/src/Kunstmaan/VotingBundle/Services/RepositoryResolver.php +++ b/src/Kunstmaan/VotingBundle/Services/RepositoryResolver.php @@ -15,7 +15,11 @@ use Kunstmaan\VotingBundle\Event\Facebook\FacebookSendEvent; */ class RepositoryResolver { - + /** + * Entity manager + */ + protected $em; + /** * Constructor * @param Object $em entity manager @@ -69,4 +73,4 @@ class RepositoryResolver return $this->em->getRepository($name); } -} \ No newline at end of file +}
Update RepositoryResolver.php
diff --git a/src/Tomahawk/HttpKernel/Kernel.php b/src/Tomahawk/HttpKernel/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Tomahawk/HttpKernel/Kernel.php +++ b/src/Tomahawk/HttpKernel/Kernel.php @@ -82,7 +82,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface const MAJOR_VERSION = '2'; const MINOR_VERSION = '0'; const RELEASE_VERSION = '0'; - const EXTRA_VERSION = 'b2'; + const EXTRA_VERSION = 'b3'; /** * Constructor.
Update to version <I>b3 [skip ci]
diff --git a/lib/Models/CatalogItem.js b/lib/Models/CatalogItem.js index <HASH>..<HASH> 100644 --- a/lib/Models/CatalogItem.js +++ b/lib/Models/CatalogItem.js @@ -322,7 +322,6 @@ var CatalogItem = function(terria) { } }); - /** * Gets the CatalogItems current time. * This property is an observable version of clock.currentTime, they will always have the same value. @@ -339,6 +338,22 @@ var CatalogItem = function(terria) { }, }); + /** + * Gets the CatalogItems current time as the discrete time that time the catalogItem has information for. + * Returns undefined if it is not possible to query the time (i.e. the item doesn't have a clock or canUseOwnClock is false). + * + * @member {Date} The CatalogItems discrete current time. + * @memberOf CatalogItem.prototype + */ + knockout.defineProperty(this, 'discreteTime', { + get : function() { + if (!defined(this.currentTime) || !defined(this.availableDates) || !defined(this.intervals) || (this.intervals.length === 0)) { + return undefined; + } + + return this.availableDates[this.intervals.indexOf(this.currentTime)]; + }, + }); // A property which defines when we are using the terria clock. // We define this as a knockout property so that we can watch for changes to the propery triggered by observables
[#<I>] CatalogItem: Add a discreteTime property.
diff --git a/test/test_dataproperty.py b/test/test_dataproperty.py index <HASH>..<HASH> 100644 --- a/test/test_dataproperty.py +++ b/test/test_dataproperty.py @@ -33,6 +33,8 @@ if six.PY2: sys.setdefaultencoding("utf-8") +dateutil = pytest.importorskip("dateutil", minversion="2.7") + DATATIME_DATA = datetime.datetime(2017, 1, 2, 3, 4, 5) nan = float("nan")
Add importorskip to a test file
diff --git a/ext/rest/src/main/java/org/minimalj/rest/RestServer.java b/ext/rest/src/main/java/org/minimalj/rest/RestServer.java index <HASH>..<HASH> 100644 --- a/ext/rest/src/main/java/org/minimalj/rest/RestServer.java +++ b/ext/rest/src/main/java/org/minimalj/rest/RestServer.java @@ -16,7 +16,7 @@ public class RestServer { private static final boolean SECURE = true; private static final int TIME_OUT = 5 * 60 * 1000; - private static void start(boolean secure) { + public static void start(boolean secure) { int port = getPort(secure); if (port > 0) { LOG.info("Start " + Application.getInstance().getClass().getSimpleName() + " rest server on port " + port + (secure ? " (Secure)" : ""));
RestServer: first step to allow include to normal server
diff --git a/mrq/basetasks/utils.py b/mrq/basetasks/utils.py index <HASH>..<HASH> 100644 --- a/mrq/basetasks/utils.py +++ b/mrq/basetasks/utils.py @@ -154,6 +154,6 @@ class JobAction(Task): "_id": {"$in": jobs_by_queue[queue]} }, {"$set": updates}, multi=True) - set_queues_size({queue: len(jobs) for queue, jobs in jobs_by_queue.iteritems()}) + set_queues_size({queue: len(jobs) for queue, jobs in jobs_by_queue.items()}) return stats
Fix iterating keys for python3 (#<I>)
diff --git a/table.go b/table.go index <HASH>..<HASH> 100644 --- a/table.go +++ b/table.go @@ -21,11 +21,7 @@ type Table struct { } func (t *Table) String() string { - lines := []string{} - for _, line := range t.Lines() { - lines = append(lines, line) - } - return strings.Join(lines, "\n") + return strings.Join(t.Lines(), "\n") } var uncolorRegexp = regexp.MustCompile("\033\\[38;5;\\d+m")
Simplify String() Since t.Lines() already returns a suitable slice, which we won't mutate, just the the returned one instead of regenerating one. This easily avoids generating garbage and reduces memory consumption.