diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/cms/fortress/application_controller_methods.rb b/lib/cms/fortress/application_controller_methods.rb index <HASH>..<HASH> 100644 --- a/lib/cms/fortress/application_controller_methods.rb +++ b/lib/cms/fortress/application_controller_methods.rb @@ -5,7 +5,8 @@ module Cms def after_sign_in_path_for(resource) if resource.class.eql?(Cms::Fortress::User) session[:site_id] = resource.site_id - comfy_admin_cms_path + #comfy_admin_cms_path + dashboard_site_path else begin stored_location_for(resource) || send("after_sign_in_path_for_#{ resource.class.name.underscore }", resource) @@ -18,7 +19,8 @@ module Cms def after_sign_out_path_for(resource_or_scope) # request.referrer if resource_or_scope.eql?(:cms_fortress_user) - comfy_admin_cms_path + # comfy_admin_cms_path + dashboard_site_path else begin stored_location_for(resource_or_scope) || send("after_sign_out_path_for_#{ resource_or_scope.to_s }", resource_or_scope)
change default after login url to dashboard
diff --git a/stickytape/__init__.py b/stickytape/__init__.py index <HASH>..<HASH> 100644 --- a/stickytape/__init__.py +++ b/stickytape/__init__.py @@ -336,6 +336,7 @@ _stdlib_modules = set([ "htmllib", "htmlentitydefs", "xml", + "xml/etree", "xml/etree/ElementTree", "xml/dom", "xml/dom/minidom", @@ -344,6 +345,7 @@ _stdlib_modules = set([ "xml/sax/handler", "xml/sax/saxutils", "xml/sax/xmlreader", + "xml/parsers", "xml/parsers/expat", "webbrowser",
Add xml.etree and xml.parsers to stdlib list
diff --git a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb index <HASH>..<HASH> 100644 --- a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb +++ b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb @@ -7,7 +7,6 @@ class <%= class_name %>Test < ActionMailer::TestCase @expected.to = "to@example.org" @expected.from = "from@example.com" @expected.body = read_fixture("<%= action %>") - @expected.date = Time.now assert_equal @expected, <%= class_name %>.<%= action %> end
don't set @expected.date in generated mailer test
diff --git a/lib/browserify-rails/directive_processor.rb b/lib/browserify-rails/directive_processor.rb index <HASH>..<HASH> 100644 --- a/lib/browserify-rails/directive_processor.rb +++ b/lib/browserify-rails/directive_processor.rb @@ -14,10 +14,7 @@ module BrowserifyRails def evaluate(context, locals, &block) if commonjs_module? - dependencies.each do |dep| - path = File.basename(dep["id"], context.environment.root) - next if path == File.basename(file) - + dependencies.each do |path| if path =~ /<([^>]+)>/ path = $1 else
#dependencies already filter the file itself
diff --git a/test/test_girl_friday.rb b/test/test_girl_friday.rb index <HASH>..<HASH> 100644 --- a/test/test_girl_friday.rb +++ b/test/test_girl_friday.rb @@ -137,4 +137,15 @@ class TestGirlFriday < MiniTest::Unit::TestCase end end + def test_should_create_workers_lazily + async_test do |cb| + queue = GirlFriday::WorkQueue.new('shutdown', :size => 2) do |msg| + assert_equal 1, queue.instance_variable_get(:@ready_workers).size + cb.call + end + assert_nil queue.instance_variable_get(:@ready_workers) + queue << 'empty msg' + end + end + end \ No newline at end of file
Add test for lazily worker instantiation
diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py index <HASH>..<HASH> 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -2597,9 +2597,9 @@ def group_install(name, targets = [] for group in groups: group_detail = group_info(group) - targets.extend(group_detail.get('mandatory packages', [])) + targets.extend(group_detail.get('mandatory', [])) targets.extend( - [pkg for pkg in group_detail.get('default packages', []) + [pkg for pkg in group_detail.get('default', []) if pkg not in skip] ) if include:
Use correct keys from group_info in group_install. Fixes #<I>
diff --git a/plugins/lineup/LineUp/test/lineup.js b/plugins/lineup/LineUp/test/lineup.js index <HASH>..<HASH> 100644 --- a/plugins/lineup/LineUp/test/lineup.js +++ b/plugins/lineup/LineUp/test/lineup.js @@ -3,15 +3,15 @@ import test from 'tape-catch'; // needed to handle Babel's conversion of for `(x of array)` import 'babel-polyfill'; -import $ from 'jquery'; - import LineUp from '..'; test('LineUp component', t => { - $('body').append($('<div/>').attr({id: 'elem'}).css({width: 800, height: 600})); + const div = document.createElement('div'); + div.setAttribute('style', 'width: 800px; height: 600px'); + t.ok(LineUp, 'LineUp exists'); t.ok(LineUp.options, 'LineUp options exists'); - let lu = new LineUp(document.getElementById('elem'), { + let lu = new LineUp(div, { data: [ {a: 1, b: 2, c: 'a', d: true}, {a: 3, b: 4, c: 'b', d: false},
test: fix test corruption from use of jquery in lineup test
diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index <HASH>..<HASH> 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -60,7 +60,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js /** * @typedef {Object} AtPixelOptions - * @property {undefined|function(import("./layer/Layer.js").default): boolean} layerFilter Layer filter + * @property {undefined|function(import("./layer/Layer.js").default): boolean} [layerFilter] Layer filter * function. The filter function will receive one argument, the * {@link module:ol/layer/Layer layer-candidate} and it should return a boolean value. * Only layers which are visible and for which this function returns `true`
Mark layerFilter in AtPixelOptions as optional
diff --git a/test/unit/client-test.js b/test/unit/client-test.js index <HASH>..<HASH> 100644 --- a/test/unit/client-test.js +++ b/test/unit/client-test.js @@ -1,5 +1,4 @@ var Client = require("../../lib/dynode/client").Client, - DynamoDB = require('../test-helper'), util = require('utile'), should = require('should'); @@ -8,7 +7,7 @@ describe("DynamoDB Client unit tests", function(){ client; beforeEach(function() { - client = DynamoDB.client; + client = new Client({accessKeyId :"MockId", secretAccessKey: "MockKey"}); realRequest = client._request; });
making unit tests run without needed aws auth keys on environment
diff --git a/service/src/main/java/de/uniulm/omi/cloudiator/sword/service/ServiceBuilder.java b/service/src/main/java/de/uniulm/omi/cloudiator/sword/service/ServiceBuilder.java index <HASH>..<HASH> 100644 --- a/service/src/main/java/de/uniulm/omi/cloudiator/sword/service/ServiceBuilder.java +++ b/service/src/main/java/de/uniulm/omi/cloudiator/sword/service/ServiceBuilder.java @@ -118,9 +118,12 @@ public class ServiceBuilder { protected Set<Module> getBasicModules(ServiceConfiguration serviceConfiguration, ProviderConfiguration providerConfiguration) { Set<Module> modules = new HashSet<>(); - modules.add(new BaseModule(serviceConfiguration, PropertiesBuilder.newBuilder() - .putProperties(providerConfiguration.getDefaultProperties().getProperties()) - .putProperties(this.properties.getProperties()).build())); + PropertiesBuilder propertiesBuilder = PropertiesBuilder.newBuilder() + .putProperties(providerConfiguration.getDefaultProperties().getProperties()); + if (this.properties != null) { + propertiesBuilder.putProperties(this.properties.getProperties()); + } + modules.add(new BaseModule(serviceConfiguration, propertiesBuilder.build())); return modules; }
fixed null pointer if no properties were defined by the user
diff --git a/src/website/app/demos/Icon/examples/importSyntax.js b/src/website/app/demos/Icon/examples/importSyntax.js index <HASH>..<HASH> 100644 --- a/src/website/app/demos/Icon/examples/importSyntax.js +++ b/src/website/app/demos/Icon/examples/importSyntax.js @@ -21,7 +21,7 @@ export default { description: `To render a custom icon, use the default export from the \`mineral-ui/Icon\` package. \`\`\` -import Icon from 'mineral-ui-icons/Icon'; +import Icon from 'mineral-ui/Icon'; \`\`\` Import Mineral UI's provided icons directly from the \`mineral-ui-icons\` package.
chore(website): Fix incorrect Icon import syntax
diff --git a/cmd/geth/js.go b/cmd/geth/js.go index <HASH>..<HASH> 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -439,7 +439,7 @@ func (self *jsre) interactive() { func mustLogInHistory(input string) bool { return len(input) == 0 || passwordRegexp.MatchString(input) || - leadingSpace.MatchString(input) + !leadingSpace.MatchString(input) } func (self *jsre) withHistory(datadir string, op func(*os.File)) {
fix console history, lines with leadning whitespace NOT included
diff --git a/include/componentdispatcher_class.php b/include/componentdispatcher_class.php index <HASH>..<HASH> 100644 --- a/include/componentdispatcher_class.php +++ b/include/componentdispatcher_class.php @@ -47,7 +47,7 @@ class ComponentDispatcher extends Component { $ret["content"] = $component->HandlePayload($_REQUEST, $outputtype); } else if (preg_match("|^/((?:[^./]+/?)*)(?:\.(.*))?$|", $page, $m)) { $componentname = str_replace("/", ".", $m[1]); - $outputtype = any($m[2], "html"); + $outputtype = (isset($m[2]) ? $m[2] : "html"); $ret["component"] = $componentname; $ret["type"] = $outputtype;
- Fixed pedantic warning in component dispatcher
diff --git a/lib/ronin/ui/console.rb b/lib/ronin/ui/console.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/ui/console.rb +++ b/lib/ronin/ui/console.rb @@ -166,6 +166,7 @@ module Ronin irb.context.main.instance_eval do require 'ronin' require 'ronin/ui/output' + require 'ronin/platform/overlays' # include the output helpers include Ronin::UI::Output::Helpers
Explicitly require 'ronin/platform/overlays' from within the Ronin Console.
diff --git a/seleniumbase/fixtures/base_case.py b/seleniumbase/fixtures/base_case.py index <HASH>..<HASH> 100755 --- a/seleniumbase/fixtures/base_case.py +++ b/seleniumbase/fixtures/base_case.py @@ -1687,7 +1687,7 @@ class BaseCase(unittest.TestCase): timeout = settings.SMALL_TIMEOUT if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT: timeout = self.__get_new_timeout(timeout) - if self.is_element_visible(frame): + if type(frame) is str and self.is_element_visible(frame): try: self.scroll_to(frame, timeout=1) except Exception:
Only scroll to iframes before switching to them if identifier is a string
diff --git a/pkg/adaptor/mongodb.go b/pkg/adaptor/mongodb.go index <HASH>..<HASH> 100644 --- a/pkg/adaptor/mongodb.go +++ b/pkg/adaptor/mongodb.go @@ -13,7 +13,7 @@ import ( ) const ( - MONGO_BUFFER_SIZE int = 5e6 + MONGO_BUFFER_SIZE int = 1e6 MONGO_BUFFER_LEN int = 5e5 ) @@ -76,7 +76,7 @@ func NewMongodb(p *pipe.Pipe, path string, extra Config) (StopStartListener, err tail: conf.Tail, debug: conf.Debug, path: path, - opsBuffer: make([]interface{}, 0, MONGO_BUFFER_SIZE), + opsBuffer: make([]interface{}, 0, MONGO_BUFFER_LEN), bulkWriteChannel: make(chan interface{}), bulkQuitChannel: make(chan chan bool), bulk: conf.Bulk, @@ -242,7 +242,7 @@ func (m *Mongodb) writeBuffer() { } } - m.opsBuffer = make([]interface{}, 0, MONGO_BUFFER_SIZE) + m.opsBuffer = make([]interface{}, 0, MONGO_BUFFER_LEN) m.opsBufferSize = 0 }
use a smaller buffer for mongo adaptor
diff --git a/third_party/code.google.com/p/goauth2/oauth/oauth.go b/third_party/code.google.com/p/goauth2/oauth/oauth.go index <HASH>..<HASH> 100644 --- a/third_party/code.google.com/p/goauth2/oauth/oauth.go +++ b/third_party/code.google.com/p/goauth2/oauth/oauth.go @@ -167,7 +167,10 @@ type Token struct { // Expired reports whether the token has expired or is invalid. func (t *Token) Expired() bool { - if t.Expiry.IsZero() || t.AccessToken == "" { + if t.AccessToken == "" { + return true + } + if t.Expiry.IsZero() { return false } return t.Expiry.Before(time.Now())
oauth: fix Token.Expired also sent off as <URL>
diff --git a/src/Place/PlaceRepository.php b/src/Place/PlaceRepository.php index <HASH>..<HASH> 100644 --- a/src/Place/PlaceRepository.php +++ b/src/Place/PlaceRepository.php @@ -81,11 +81,6 @@ class PlaceRepository extends ActorRepository implements RepositoryInterface, Lo */ protected $organizerService; - /** - * @var EventStreamDecoratorInterface[] - */ - private $eventStreamDecorators = array(); - private $aggregateClass; public function __construct( @@ -304,11 +299,8 @@ class PlaceRepository extends ActorRepository implements RepositoryInterface, Lo $contactInfo = new CultureFeed_Cdb_Data_ContactInfo(); $event->setContactInfo($contactInfo); - $cdbXml = new CultureFeed_Cdb_Default(); - $cdbXml->addItem($event); - $this->createImprovedEntryAPIFromMetadata($metadata) - ->createEvent((string)$cdbXml); + ->createEvent($event); return $placeCreated->getPlaceId(); }
III-<I>: Fix loose ends preventing saving places to work & add http logging to Entry API
diff --git a/cdrouter/captures.py b/cdrouter/captures.py index <HASH>..<HASH> 100644 --- a/cdrouter/captures.py +++ b/cdrouter/captures.py @@ -50,7 +50,7 @@ class SummaryPacket(object): self.sections = kwargs.get('sections', None) class SummaryPacketSchema(Schema): - sections = mfields.Nested(SectionSchema, many=True) + sections = mfields.Nested(SectionSchema, many=True, missing=None) @post_load def post_load(self, data): @@ -68,7 +68,7 @@ class Summary(object): class SummarySchema(Schema): structure = mfields.Nested(StructureSchema) - summaries = mfields.Nested(SummaryPacketSchema, many=True) + summaries = mfields.Nested(SummaryPacketSchema, many=True, missing=None) @post_load def post_load(self, data):
Fix issue with CapturesService.summary
diff --git a/test/spec/platform_spec.rb b/test/spec/platform_spec.rb index <HASH>..<HASH> 100644 --- a/test/spec/platform_spec.rb +++ b/test/spec/platform_spec.rb @@ -32,7 +32,7 @@ describe "The PHP Platform Installer" do rescue Errno::ENOENT expected_status = 0 ensure - expect(status.exitstatus).to eq(expected_status), "platform.php failed, stderr: #{stderr}, stdout: #{stdout}" + expect(status.exitstatus).to eq(expected_status), "platform.php exited with status #{status.exitstatus}, expected #{expected_status}; stderr: #{stderr}, stdout: #{stdout}" end begin
slightly improve error message (with exit status) if platform.php test fails
diff --git a/modules/tools-misc/src/main/java/com/wizzardo/tools/misc/UTF8.java b/modules/tools-misc/src/main/java/com/wizzardo/tools/misc/UTF8.java index <HASH>..<HASH> 100644 --- a/modules/tools-misc/src/main/java/com/wizzardo/tools/misc/UTF8.java +++ b/modules/tools-misc/src/main/java/com/wizzardo/tools/misc/UTF8.java @@ -427,6 +427,10 @@ public class UTF8 { return this; } + + public int charsDecoded() { + return charsOffset; + } } public static DecodeContext decode(byte[] bytes, int offset, int length, char[] chars, DecodeContext context) {
add charsDecoded method
diff --git a/embark-ui/src/containers/AppContainer.js b/embark-ui/src/containers/AppContainer.js index <HASH>..<HASH> 100644 --- a/embark-ui/src/containers/AppContainer.js +++ b/embark-ui/src/containers/AppContainer.js @@ -103,6 +103,8 @@ class AppContainer extends Component { renderBody() { if (this.shouldRenderLogin()) { return <Login credentials={this.props.credentials} authenticate={this.props.authenticate} error={this.props.authenticationError} />; + } else if (this.props.credentials.authenticating) { + return <div></div>; } return ( <Layout location={this.props.location}
don't return Layout while authenticating
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 @@ RSpec.configure { |config| extend(Module.new { def describe_extended(mod, ext, singleton = false, &block) - describe(mod, 'when extended by', ext) { + describe(mod, "when extended by #{ext}") { example { klass = singleton ? class << mod; self; end : mod klass.ancestors.should include(ext)
spec/spec_helper.rb: Fixed for RSpec 3.
diff --git a/lib/chamber/settings.rb b/lib/chamber/settings.rb index <HASH>..<HASH> 100644 --- a/lib/chamber/settings.rb +++ b/lib/chamber/settings.rb @@ -107,8 +107,15 @@ class Settings self.namespaces == other.namespaces end + ### + # Internal: Returns the Settings data as a Hash for easy manipulation. + # Changes made to the hash will *not* be reflected in the original Settings + # object. + # + # Returns a Hash + # def to_hash - data + data.dup end def method_missing(name, *args) diff --git a/spec/lib/chamber/settings_spec.rb b/spec/lib/chamber/settings_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/chamber/settings_spec.rb +++ b/spec/lib/chamber/settings_spec.rb @@ -140,5 +140,14 @@ describe Settings do expect(settings.to_hash).to eql('my_encrypted_setting' => 'hello') end + + it 'does not allow manipulation of the internal setting hash when converted to a Hash' do + settings = Settings.new(settings: {setting: 'value'}) + + settings_hash = settings.to_hash + settings_hash[:setting] = 'foo' + + expect(settings.setting).to eql 'value' + end end end
Always duplicate the settings hash before returning it so that we don't have inadvertent modifications
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -65,9 +65,9 @@ setup( 'Intended Audience :: Developers', 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Natural Language :: English', 'Topic :: Education', ],
Update Python support in setup.py
diff --git a/generators/setup-workspace/index.js b/generators/setup-workspace/index.js index <HASH>..<HASH> 100644 --- a/generators/setup-workspace/index.js +++ b/generators/setup-workspace/index.js @@ -98,12 +98,6 @@ class Generator extends Base { type: String }); - this.option('verbose', { - type: Boolean, - defaults: false, - description: 'Show logs from spawned processes' - }); - this.argument('product', { required: true }); @@ -162,11 +156,9 @@ class Generator extends Base { } _spawn(cmd, argline, cwd) { - const stdio = this.options.verbose ? 'inherit' : ['inherit', 'pipe', 'pipe']; // pipe `stdout` and `stderr` to host process - const options = cwd === false ? {} : Object.assign({ cwd: this.cwd, - stdio + stdio: 'inherit' // log output and error of spawned process to host process }, cwd || {}); this.log(`\nRunning: ${cmd} ${argline}\n`)
Remove verbose flag and always log spawned output #<I> Since this `setup-workspace` generator is only used by the user and not used in the product build.js we can remove the verbose flag.
diff --git a/lib/restbase.js b/lib/restbase.js index <HASH>..<HASH> 100644 --- a/lib/restbase.js +++ b/lib/restbase.js @@ -63,8 +63,8 @@ RESTBase.prototype.request = function (req) { return Promise.reject(new HTTPError({ status: 403, body: { - type: 'access_denied', - title: 'Access denied' + type: 'access_denied#sys', + title: 'Access to the /{domain}/sys/ hierarchy is restricted to system users.' } })); }
Add information when denying access to sys
diff --git a/src/ResourceTransformer.php b/src/ResourceTransformer.php index <HASH>..<HASH> 100644 --- a/src/ResourceTransformer.php +++ b/src/ResourceTransformer.php @@ -681,7 +681,8 @@ abstract class ResourceTransformer implements ResourceTransformerContract $childResource = $field->getChildResourceDefinition(); // Process eager loading - $this->processEagerLoading($childrenQueryBuilder, $childResourceFactory, $childContext); + // we actually don't want do eager loading as the eager loading should happen on the root entity + //$this->processEagerLoading($childrenQueryBuilder, $childResourceFactory, $childContext); // fetch the records $children = $this->getQueryAdapter()
Don't eager load expanded relationships as this causes unexpected issues.
diff --git a/lib/ES6ImportsRenamer.js b/lib/ES6ImportsRenamer.js index <HASH>..<HASH> 100644 --- a/lib/ES6ImportsRenamer.js +++ b/lib/ES6ImportsRenamer.js @@ -106,7 +106,8 @@ ES6ImportsRenamer.prototype._renameNextAst = function() { var importPromises = []; var body = current.ast.program.body; for (var i = 0; i < body.length; i++) { - if (n.ImportDeclaration.check(body[i])) { + if (n.ImportDeclaration.check(body[i]) || + (n.ExportDeclaration.check(body[i]) && body[i].source)) { importPromises.push(this._mapImport(body[i], current.name || current.path)); } }
Adds support for exports with source
diff --git a/public/js/editors/keycontrol.js b/public/js/editors/keycontrol.js index <HASH>..<HASH> 100644 --- a/public/js/editors/keycontrol.js +++ b/public/js/editors/keycontrol.js @@ -1,7 +1,7 @@ /*globals objectValue, $, jsbin, $body, $document*/ var keyboardHelpVisible = false; -var customKeys = objectValue('jsbin.settings.keys') || {}; +var customKeys = objectValue('settings.keys', jsbin) || {}; function enableAltUse() { if (!jsbin.settings.keys) {
Custom key settings could not be read when anon We were trying to read the jsbin object of the window object, but since we made the entire thing private a few months ago, this started breaking. So now I pass in the correct context to the read the object. Fixes #<I>
diff --git a/src/variety/country.js b/src/variety/country.js index <HASH>..<HASH> 100644 --- a/src/variety/country.js +++ b/src/variety/country.js @@ -34,6 +34,12 @@ MouseEvent:{ "MouseEvent@moonsun":{ // オーバーライド inputMB : function(){ + var border = this.getpos(0.22).getb(); + if(border.group==='border' && !border.isnull){ + this.inputpeke(); + return; + } + var cell = this.getcell(); if(cell.isnull || cell.qnum===-1){ return;} var clist = cell.room.clist.filter(function(cell2){ return cell.qnum===cell2.qnum;});
moonsun: Enable to input cross marks by smartphone or tablet
diff --git a/dwave/cloud/solver.py b/dwave/cloud/solver.py index <HASH>..<HASH> 100644 --- a/dwave/cloud/solver.py +++ b/dwave/cloud/solver.py @@ -656,9 +656,14 @@ class StructuredSolver(BaseSolver): raise RuntimeError("Can't sample from 'bqm' without dimod. " "Re-install the library with 'bqm' support.") - ising = bqm.spin - return self._sample('ising', ising.linear, ising.quadratic, params, - undirected_biases=True) + if bqm.vartype is dimod.SPIN: + return self._sample('ising', bqm.linear, bqm.quadratic, params, + undirected_biases=True) + elif bqm.vartype is dimod.BINARY: + return self._sample('qubo', bqm.linear, bqm.quadratic, params, + undirected_biases=True) + else: + raise TypeError("unknown/unsupported vartype") def _sample(self, type_, linear, quadratic, params, undirected_biases=False): """Internal method for `sample_ising`, `sample_qubo` and `sample_bqm`.
Route ising/qubo BQMs in `Solver.sample_bqm` to ising/qubo QMIs Fix #<I>.
diff --git a/lib/coral_core/plugin/action.rb b/lib/coral_core/plugin/action.rb index <HASH>..<HASH> 100644 --- a/lib/coral_core/plugin/action.rb +++ b/lib/coral_core/plugin/action.rb @@ -44,15 +44,15 @@ class Action < Base args = array(delete(:args, [])) @codes = Codes.new + + self.usage = usage if get(:settings, nil) set(:processed, true) else set(:settings, {}) parse_base(args) - end - - self.usage = usage + end end #----------------------------------------------------------------------------- @@ -89,7 +89,7 @@ class Action < Base def help return @parser.help if @parser - '' + usage end #----------------------------------------------------------------------------- @@ -125,7 +125,7 @@ class Action < Base logger.debug("Parse successful: #{export.inspect}") elsif @parser.options[:help] && ! quiet? - puts I18n.t('coral.core.exec.help.usage') + ': ' + @parser.help + "\n" + puts I18n.t('coral.core.exec.help.usage') + ': ' + help + "\n" else if @parser.options[:help]
Fixing usage issue in the base action plugin class.
diff --git a/src/main/java/net/openhft/chronicle/network/WireTcpHandler.java b/src/main/java/net/openhft/chronicle/network/WireTcpHandler.java index <HASH>..<HASH> 100755 --- a/src/main/java/net/openhft/chronicle/network/WireTcpHandler.java +++ b/src/main/java/net/openhft/chronicle/network/WireTcpHandler.java @@ -77,7 +77,7 @@ public abstract class WireTcpHandler implements TcpHandler { private boolean read(@NotNull Bytes in, @NotNull Bytes out, @NotNull SessionDetailsProvider sessionDetails) { final long header = in.readInt(in.readPosition()); long length = Wires.lengthOf(header); - assert length >= 0 && length < 1 << 22 : "in=" + in + ", hex=" + in.toHexString(); + assert length >= 0 && length < 1 << 23 : "in=" + in + ", hex=" + in.toHexString(); // we don't return on meta data of zero bytes as this is a system message if (length == 0 && Wires.isData(header)) { @@ -122,8 +122,6 @@ public abstract class WireTcpHandler implements TcpHandler { LOG.error("", e); } finally { in.readLimit(limit); - // TODO remove this !! - Thread.yield(); try { in.readPosition(end); } catch (Exception e) {
CHENT-<I> Performance uniting as a part of testing a buffered overflow.
diff --git a/lib/xcodeproj/plist.rb b/lib/xcodeproj/plist.rb index <HASH>..<HASH> 100644 --- a/lib/xcodeproj/plist.rb +++ b/lib/xcodeproj/plist.rb @@ -60,10 +60,7 @@ module Xcodeproj # The path of the file. # def self.file_in_conflict?(path) - file = File.open(path, 'r') - file.each_line.any? { |l| l.match(/^(<|=|>){7}/) } - ensure - file.close + File.read(path).match(/^(<|=|>){7}/) end end end
[Plist] Simplify merge conflict detection
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb index <HASH>..<HASH> 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb @@ -68,7 +68,7 @@ end # We're overcoming a problem where Homebrew updating Git on MacOS throws a symlink error # We remove git completely to allow homebrew to update Git. -execute 'Remove native Git client' do +execute "Remove native Git client" do "brew list --full-name | grep '^git@' | xargs -r brew uninstall --ignore-dependencies" end
Updated the recipe to remove Git completely before updating it.
diff --git a/tasks/init.js b/tasks/init.js index <HASH>..<HASH> 100644 --- a/tasks/init.js +++ b/tasks/init.js @@ -458,7 +458,11 @@ module.exports = function(grunt) { // Fail task if errors were logged. if (grunt.task.current.errorCount) { taskDone(false); } // Otherwise, print a success message. - grunt.log.writeln().writeln('Initialized from template "' + name + '".'); + grunt.log.subhead('Initialized from template "' + name + '".'); + // Show any template-specific notes. + if (initTemplate.after) { + grunt.log.writelns(initTemplate.after); + } // All done! taskDone(); }].concat(args));
Templates may now export an "after" property to display a message… after.
diff --git a/lib/RouterMixin.js b/lib/RouterMixin.js index <HASH>..<HASH> 100644 --- a/lib/RouterMixin.js +++ b/lib/RouterMixin.js @@ -153,10 +153,10 @@ function getInitialPath(component) { if (!path && detect.canUseDOM) { url = urllite(window.location.href); - if (!component.props.useHistory && url.hash) { - path = urllite(url.hash.slice(2)).pathname; - } else { + if (component.props.useHistory) { path = url.pathname; + } else if (url.hash) { + path = urllite(url.hash.slice(2)).pathname; } }
fix getInitialPath to get correct path while hash is null
diff --git a/languages_substitution.go b/languages_substitution.go index <HASH>..<HASH> 100644 --- a/languages_substitution.go +++ b/languages_substitution.go @@ -21,6 +21,6 @@ var plSub = map[rune]string{ } var esSub = map[rune]string{ - '&': "i", - '@': "na", + '&': "y", + '@': "en", }
Fix sad error with spanish substitution.
diff --git a/app/decorators/socializer/person_decorator.rb b/app/decorators/socializer/person_decorator.rb index <HASH>..<HASH> 100644 --- a/app/decorators/socializer/person_decorator.rb +++ b/app/decorators/socializer/person_decorator.rb @@ -21,20 +21,23 @@ module Socializer html = [] html << toolbar_links(list[0..2]) + html << toolbar_dropdown(list[3..(list.size)]) - html << helpers.content_tag(:li, class: 'dropdown') do + html.join.html_safe + end + + private + + def toolbar_dropdown(list) + helpers.content_tag(:li, class: 'dropdown') do dropdown_link + helpers.content_tag(:ul, class: 'dropdown-menu') do - toolbar_links(list[3..(list.size)]) + toolbar_links(list) end end - - html.join.html_safe end - private - def dropdown_link icon = helpers.content_tag(:span, nil, class: 'fa fa-angle-down fa-fw') helpers.link_to('#', class: 'dropdown-toggle', data: { toggle: 'dropdown' }) do
further reduce complexity of the toolbar_stream_links method move the drop down code to the toolbar_dropdown method
diff --git a/staticjinja/staticjinja.py b/staticjinja/staticjinja.py index <HASH>..<HASH> 100755 --- a/staticjinja/staticjinja.py +++ b/staticjinja/staticjinja.py @@ -26,13 +26,7 @@ def _has_argument(func): :param func: The function to be tested for existence of an argument. """ - if hasattr(inspect, 'signature'): - # New way in python 3.3 - sig = inspect.signature(func) - return bool(sig.parameters) - else: - # Old way - return bool(inspect.getargspec(func).args) + return bool(inspect.signature(func).parameters) class Site(object):
Update use of deprecated `inspect.getargspec()` The newer version, `inspect.signature()`, has been around since python <I>, and we don't support versions before <I>.
diff --git a/php-binance-api.php b/php-binance-api.php index <HASH>..<HASH> 100644 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -128,5 +128,4 @@ class Binance { return $prices; } } - // https://www.binance.com/restapipub.html
Added Kline/Candlestick data Visit binance.com
diff --git a/spec/commands/auth_spec.rb b/spec/commands/auth_spec.rb index <HASH>..<HASH> 100644 --- a/spec/commands/auth_spec.rb +++ b/spec/commands/auth_spec.rb @@ -5,8 +5,10 @@ module Heroku::Command before do @cli = prepare_command(Auth) @sandbox = "#{Dir.tmpdir}/cli_spec_#{Process.pid}" - File.open(@sandbox, "w") { |f| f.write "user\npass\n" } - @cli.stub!(:credentials_file).and_return(@sandbox) + FileUtils.mkdir_p(@sandbox) + @credentials_file = "#{@sandbox}/credentials" + File.open(@credentials_file, "w") { |f| f.write "user\npass\n" } + @cli.stub!(:credentials_file).and_return(@credentials_file) @cli.stub!(:running_on_a_mac?).and_return(false) end @@ -35,7 +37,7 @@ module Heroku::Command @cli.stub!(:credentials).and_return(['one', 'two']) @cli.should_receive(:set_credentials_permissions) @cli.write_credentials - File.read(@sandbox).should == "one\ntwo\n" + File.read(@credentials_file).should == "one\ntwo\n" end it "sets ~/.heroku/credentials to be readable only by the user" do
cannot change permissions on /tmp
diff --git a/integration/container/nat_test.go b/integration/container/nat_test.go index <HASH>..<HASH> 100644 --- a/integration/container/nat_test.go +++ b/integration/container/nat_test.go @@ -59,6 +59,8 @@ func TestNetworkLocalhostTCPNat(t *testing.T) { func TestNetworkLoopbackNat(t *testing.T) { skip.If(t, testEnv.IsRemoteDaemon()) + defer setupTest(t)() + msg := "it works" startServerContainer(t, msg, 8080)
Add the missing call to setupTest to TestNetworkLoopbackNat test function, to avoid leaving behind test containers
diff --git a/arctic/store/_ndarray_store.py b/arctic/store/_ndarray_store.py index <HASH>..<HASH> 100644 --- a/arctic/store/_ndarray_store.py +++ b/arctic/store/_ndarray_store.py @@ -191,6 +191,9 @@ class NdarrayStore(object): data = b''.join(segments) + # free up memory from initial copy of data + del segments + # Check that the correct number of segments has been returned if segment_count is not None and i + 1 != segment_count: raise OperationFailure("Incorrect number of segments returned for {}:{}. Expected: {}, but got {}. {}".format(
attempt to reduce memory peak when deserialising data
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py index <HASH>..<HASH> 100644 --- a/pyrogram/__init__.py +++ b/pyrogram/__init__.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see <http://www.gnu.org/licenses/>. -__version__ = "2.0.9" +__version__ = "2.0.10" __license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)" __copyright__ = "Copyright (C) 2017-present Dan <https://github.com/delivrance>"
Update Pyrogram to <I>
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -62,13 +62,17 @@ module ActionDispatch raise ActionController::RoutingError, e.message, e.backtrace if default_controller end - private + protected + + attr_reader :controller_class_names def controller_reference(controller_param) - const_name = @controller_class_names[controller_param] ||= "#{controller_param.camelize}Controller" + const_name = controller_class_names[controller_param] ||= "#{controller_param.camelize}Controller" ActiveSupport::Dependencies.constantize(const_name) end + private + def dispatch(controller, action, req) controller.action(action).call(req.env) end
Move `controller_reference` and `controller_class_names` to protected scope so that they are available to subclasses.
diff --git a/Command/CacheCommand.php b/Command/CacheCommand.php index <HASH>..<HASH> 100644 --- a/Command/CacheCommand.php +++ b/Command/CacheCommand.php @@ -59,7 +59,7 @@ class CacheCommand extends Command $output->writeln( sprintf( 'Clearing the Aimeos cache for site <info>%1$s</info>', $siteItem->getCode() ) ); - \Aimeos\MAdmin\Cache\Manager\Factory::createManager( $lcontext )->getCache()->flush(); + \Aimeos\MAdmin\Cache\Manager\Factory::createManager( $lcontext )->getCache()->clear(); } } }
Adapt to PSR-<I> changes
diff --git a/lib/pulsar/db.js b/lib/pulsar/db.js index <HASH>..<HASH> 100644 --- a/lib/pulsar/db.js +++ b/lib/pulsar/db.js @@ -73,7 +73,7 @@ module.exports = (function() { this.collection .find({}, {"sort": [['data.timestamp', 'desc']]}) .skip(currentPage * pageSize) - .limit(pageSize) + .limit(pageSize || 0) .toArray(function(err, resultList) { if (!err) { resultList = _.map(resultList, function(result) {
Fix error due to mongodb client upgrade
diff --git a/packages/neos-ui-editors/src/Editors/Image/index.js b/packages/neos-ui-editors/src/Editors/Image/index.js index <HASH>..<HASH> 100644 --- a/packages/neos-ui-editors/src/Editors/Image/index.js +++ b/packages/neos-ui-editors/src/Editors/Image/index.js @@ -171,11 +171,17 @@ export default class ImageEditor extends Component { } handleMediaSelected = assetIdentifier => { - const {commit} = this.props; + const {commit, value} = this.props; const newAsset = { __identity: assetIdentifier }; + // Same image selected as before? + if (value && value.__identity === assetIdentifier) { + this.handleCloseSecondaryScreen(); + return; + } + this.setState({ image: null, isAssetLoading: true
BUGFIX: Same image cannot be selected twice (#<I>)
diff --git a/cachalot/monkey_patch.py b/cachalot/monkey_patch.py index <HASH>..<HASH> 100644 --- a/cachalot/monkey_patch.py +++ b/cachalot/monkey_patch.py @@ -42,10 +42,15 @@ def _get_result_or_execute_query(execute_query_func, cache, new_table_cache_keys = set(table_cache_keys) new_table_cache_keys.difference_update(data) - if not new_table_cache_keys and cache_key in data: - timestamp, result = data.pop(cache_key) - if timestamp >= max(data.values()): - return result + if not new_table_cache_keys: + try: + timestamp, result = data.pop(cache_key) + if timestamp >= max(data.values()): + return result + except (KeyError, TypeError, ValueError): + # In case `cache_key` is not in `data` or contains bad data, + # we simply run the query and cache again the results. + pass result = execute_query_func() if result.__class__ not in ITERABLES and isinstance(result, Iterable):
Handles cases where cache values were tampered with.
diff --git a/goose/article.py b/goose/article.py index <HASH>..<HASH> 100644 --- a/goose/article.py +++ b/goose/article.py @@ -26,7 +26,7 @@ class Article(object): def __init__(self): # title of the article - self.title = None + self.title = u"" # stores the lovely, pure text from the article, # stripped of html, formatting, etc...
#<I> - title is empty string by default
diff --git a/spring-dbunit-core/src/main/java/com/excilys/ebi/spring/dbunit/config/DataSetConfiguration.java b/spring-dbunit-core/src/main/java/com/excilys/ebi/spring/dbunit/config/DataSetConfiguration.java index <HASH>..<HASH> 100644 --- a/spring-dbunit-core/src/main/java/com/excilys/ebi/spring/dbunit/config/DataSetConfiguration.java +++ b/spring-dbunit-core/src/main/java/com/excilys/ebi/spring/dbunit/config/DataSetConfiguration.java @@ -162,7 +162,8 @@ public class DataSetConfiguration implements DatabaseConnectionConfigurer { public Builder withSchema(String schema) { schema = schema.trim(); - dataSetConfiguration.schema = schema.isEmpty() ? null : schema; + if (!schema.isEmpty()) + dataSetConfiguration.schema = schema; return this; }
Properly fixing #<I>
diff --git a/codenerix/static/codenerix/js/codenerix.js b/codenerix/static/codenerix/js/codenerix.js index <HASH>..<HASH> 100644 --- a/codenerix/static/codenerix/js/codenerix.js +++ b/codenerix/static/codenerix/js/codenerix.js @@ -51,7 +51,7 @@ var codenerix_libraries = [ 'ngQuill', 'cfp.hotkeys', ]; -var codenerix_debug = true; +var codenerix_debug = false; // Add the remove method to the Array structure Array.prototype.remove = function(from, to) { @@ -1838,6 +1838,11 @@ function codenerix_builder(libraries, routes) { } }); } + + if (codenerix_debug == true) { + console.info("Router: if the path of the URL doesn't exists, AngularJS will now warn you in anyway, the state will stay with a blank page"); + } + // Add factory module.factory("ListMemory",function(){return {};});
New message, debugger is off
diff --git a/perceval/backends/pipermail.py b/perceval/backends/pipermail.py index <HASH>..<HASH> 100644 --- a/perceval/backends/pipermail.py +++ b/perceval/backends/pipermail.py @@ -65,7 +65,7 @@ class Pipermail(MBox): :param tag: label used to mark the data :param cache: cache object to store raw data """ - version = '0.4.0' + version = '0.4.1' def __init__(self, url, dirpath, tag=None, cache=None): origin = url @@ -302,12 +302,12 @@ class PipermailList(MailingList): return dt def _download_archive(self, url, filepath): - r = requests.get(url) + r = requests.get(url, stream=True) r.raise_for_status() try: with open(filepath, 'wb') as fd: - fd.write(r.content) + fd.write(r.raw.read()) except OSError as e: logger.warning("Ignoring %s archive due to: %s", url, str(e)) return False
[pipermail] Fix error storing decompressed mbox files By default, requests library decompresses gzip-encoded responses, but in some cases is only able to decompress some parts due to encoding issues or to mixed contents. This patch fixes this problem storing the orinal/raw data (compressed or decompressed) into the mbox file to process it in the next phase using the decoder of the MBox class. Backend version bumped to '<I>'.
diff --git a/app/lib/katello/http_resource.rb b/app/lib/katello/http_resource.rb index <HASH>..<HASH> 100644 --- a/app/lib/katello/http_resource.rb +++ b/app/lib/katello/http_resource.rb @@ -76,7 +76,7 @@ module Katello else v end end - logger.debug "Body: #{payload_to_print.to_json}" + logger.debug "Body: #{filter_sensitive_data(payload_to_print.to_json)}" rescue logger.debug "Unable to print debug information" end
Refs #<I> - also filter debug info
diff --git a/packages/@uppy/core/src/index.js b/packages/@uppy/core/src/index.js index <HASH>..<HASH> 100644 --- a/packages/@uppy/core/src/index.js +++ b/packages/@uppy/core/src/index.js @@ -36,6 +36,8 @@ class Uppy { #storeUnsubscribe + #emitter = ee() + /** * Instantiate Uppy * @@ -178,12 +180,6 @@ class Uppy { this.retryUpload = this.retryUpload.bind(this) this.upload = this.upload.bind(this) - this.emitter = ee() - this.on = this.on.bind(this) - this.off = this.off.bind(this) - this.once = this.emitter.once.bind(this.emitter) - this.emit = this.emitter.emit.bind(this.emitter) - this.preProcessors = [] this.uploaders = [] this.postProcessors = [] @@ -222,13 +218,22 @@ class Uppy { this.#addListeners() } + emit (event, ...args) { + this.#emitter.emit(event, ...args) + } + on (event, callback) { - this.emitter.on(event, callback) + this.#emitter.on(event, callback) + return this + } + + once (event, callback) { + this.#emitter.once(event, callback) return this } off (event, callback) { - this.emitter.off(event, callback) + this.#emitter.off(event, callback) return this }
@uppy/core: move event emitter to private properties (#<I>)
diff --git a/src/wavesurfer.js b/src/wavesurfer.js index <HASH>..<HASH> 100644 --- a/src/wavesurfer.js +++ b/src/wavesurfer.js @@ -87,20 +87,38 @@ var WaveSurfer = { mark: function(options) { options = options || {}; + var self = this; var timings = this.timings(0); + var id = options.id || '_m' + this.marks++; var marker = { - width: options.width, - color: options.color, + id: id, percentage: timings[0] / timings[1], - position: timings[0] + position: timings[0], + + update: function(options) { + options = options || {}; + + this.color = options.color; + this.width = options.width; + + if (self.backend.paused) { + self.drawer.redraw(); + if (options.center) { + self.drawer.recenter(this.percentage); + } + } + + return this; + } }; - var id = options.id || '_m' + this.marks++; + return this.drawer.markers[id] = marker.update(options); + }, - this.drawer.markers[id] = marker; - if (this.backend.paused) this.drawer.redraw(); - return marker; + clearMarks: function() { + this.drawer.markers = {}; + this.marks = 0; }, timings: function(offset) {
Add method to clear markers and add an update method to markers.
diff --git a/accounts/views.py b/accounts/views.py index <HASH>..<HASH> 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -119,12 +119,15 @@ class UserAdd(CreateView): # GroupRequiredMixin template_name = 'accounts/deployuser_create.html' def form_valid(self, form): + # Save form response = super(UserAdd, self).form_valid(form) # Send a password recover email - form = PasswordResetForm({'email': form.cleaned_data['email']}) - form.save(email_template_name='accounts/welcome_email.html') + email_form = PasswordResetForm({'email': form.cleaned_data['email']}) + email_form.is_valid() + email_form.save(email_template_name='accounts/welcome_email.html') + # send response return response
Updated the user add view to send a welcome email when a user is created.
diff --git a/bootstrap.php b/bootstrap.php index <HASH>..<HASH> 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -25,6 +25,8 @@ if (file_exists($applicationPath = __DIR__.'/../../../bootstrap/app.php')) { // if ($app instanceof \Illuminate\Contracts\Foundation\Application) { $app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap(); +} elseif ($app instanceof \Laravel\Lumen\Application) { + $app->boot(); } $app->make('config')->set('larastan.mixins', require __DIR__.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'mixins.php');
fix: some internal errors with the lumen framework
diff --git a/app/templates/src/app.js b/app/templates/src/app.js index <HASH>..<HASH> 100644 --- a/app/templates/src/app.js +++ b/app/templates/src/app.js @@ -3,6 +3,7 @@ import route from 'can-route'; import 'can-route-pushstate'; const AppViewModel = DefineMap.extend({ + route: "string", message: { value: 'Hello World!', serialize: false
Include `route` in the appviewmodel This is because it will be connected to can.route, which always sets the route property.
diff --git a/pypump/pypump.py b/pypump/pypump.py index <HASH>..<HASH> 100644 --- a/pypump/pypump.py +++ b/pypump/pypump.py @@ -71,7 +71,7 @@ class PyPump(object): logginglevel = getattr(logging, loglevel.upper(), None) if logginglevel is None: raise PyPumpException("Unknown loglevel {0!r}".format(loglevel)) - logging.basicConfig(level=logginglevel) + _log.setLevel(logginglevel) openid.OpenID.pypump = self # pypump uses PyPump.requester.
Don't override settings on the root logger
diff --git a/src/invalid-aware-types.spec.js b/src/invalid-aware-types.spec.js index <HASH>..<HASH> 100644 --- a/src/invalid-aware-types.spec.js +++ b/src/invalid-aware-types.spec.js @@ -39,5 +39,6 @@ describe('Null/Empty/Invalid Values Representation', () => { expect(dmData[1][0]).to.eql(DataModel.InvalidAwareTypes.NULL); expect(dmData[1][2] instanceof DataModel.InvalidAwareTypes).to.be.true; expect(dmData[1][2]).to.eql(DataModel.InvalidAwareTypes.NULL); + expect(dmData[1][2].value()).to.eql('null'); }); });
#<I>: Added test case
diff --git a/lib/ios-deploy.js b/lib/ios-deploy.js index <HASH>..<HASH> 100644 --- a/lib/ios-deploy.js +++ b/lib/ios-deploy.js @@ -51,7 +51,7 @@ class IOSDeploy { try { await appInstalledNotification; } catch (e) { - log.warn(`Couldn't get the application installed notification with ${APPLICATION_INSTALLED_NOTIFICATION}ms but we will continue`); + log.warn(`Couldn't get the application installed notification with ${APPLICATION_NOTIFICATION_TIMEOUT}ms but we will continue`); } } finally { installationService.close(); @@ -79,7 +79,7 @@ class IOSDeploy { try { await B.all(promises).timeout(APPLICATION_PUSH_TIMEOUT); } catch (e) { - throw new Error(`Couldn't push all the files within the timeout ${APPLICATION_INSTALLED_NOTIFICATION}ms`); + throw new Error(`Couldn't push all the files within the timeout ${APPLICATION_PUSH_TIMEOUT}ms`); } log.debug(`Pushed the app files successfully after ${new Date() - start}ms`); return bundlePathOnPhone;
fix: print the timeout ms instead of the wrong vars
diff --git a/microcosm_postgres/temporary/copy.py b/microcosm_postgres/temporary/copy.py index <HASH>..<HASH> 100644 --- a/microcosm_postgres/temporary/copy.py +++ b/microcosm_postgres/temporary/copy.py @@ -4,6 +4,34 @@ Copy a table. """ from sqlalchemy import Table +from microcosm_postgres.types import Serial + + +def copy_column(column, schema): + """ + Safely create a copy of a column. + + """ + return column.copy(schema=schema) + + +def should_copy(column): + """ + Determine if a column should be copied. + + """ + if not isinstance(column.type, Serial): + return True + + if column.nullable: + return True + + if not column.server_default: + return True + + # do not create temporary serial values; they will be defaulted on upsert/insert + return False + def copy_table(from_table, name): """ @@ -20,8 +48,9 @@ def copy_table(from_table, name): schema = metadata.schema columns = [ - column.copy(schema=schema) + copy_column(column, schema) for column in from_table.columns + if should_copy(column) ] return Table(
Handle serial values on temporary table creation Do not copy serial columns because they will be generated automatically if and only they are omitted from the insert().select_from().
diff --git a/pex/testing.py b/pex/testing.py index <HASH>..<HASH> 100644 --- a/pex/testing.py +++ b/pex/testing.py @@ -79,9 +79,6 @@ PROJECT_CONTENT = { package_data={'my_package': ['package_data/*.dat']}, ) '''), - 'MANIFEST.in': dedent(''' - include setup.py - '''), 'scripts/hello_world': '#!/usr/bin/env python\nprint("hello world!")\n', 'scripts/shell_script': '#!/usr/bin/env bash\necho hello world\n', 'my_package/__init__.py': 0,
Remove crutch from pex.testing that was pasting over Packager bug.
diff --git a/src/Base32.php b/src/Base32.php index <HASH>..<HASH> 100644 --- a/src/Base32.php +++ b/src/Base32.php @@ -27,6 +27,10 @@ namespace SKleeschulte; +use \InvalidArgumentException; +use \RuntimeException; +use \UnexpectedValueException; + /** * Base32 encoding and decoding class. *
Added use statements for exceptions.
diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index <HASH>..<HASH> 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -199,10 +199,10 @@ class StreamDispatcher extends Writable { const next = FRAME_LENGTH + (this.count * FRAME_LENGTH) - (Date.now() - this.startTime - this.pausedTime); setTimeout(done.bind(this), next); } - if (this._sdata.sequence >= (2 ** 16) - 1) this._sdata.sequence = -1; - if (this._sdata.timestamp >= (2 ** 32) - TIMESTAMP_INC) this._sdata.timestamp = -TIMESTAMP_INC; this._sdata.sequence++; this._sdata.timestamp += TIMESTAMP_INC; + if (this._sdata.sequence >= 2 ** 16) this._sdata.sequence = 0; + if (this._sdata.timestamp >= 2 ** 32) this._sdata.timestamp = 0; this.count++; }
refactor: tidier overflow checking in StreamDispatcher
diff --git a/lib/application.js b/lib/application.js index <HASH>..<HASH> 100644 --- a/lib/application.js +++ b/lib/application.js @@ -18,7 +18,7 @@ var Application = function (client) { return client.makeRequest({ path : "applications", method : "GET", - body : params + qs : params }) .then(function (response) { return response.body;
Change body to qs in params
diff --git a/dataType.js b/dataType.js index <HASH>..<HASH> 100644 --- a/dataType.js +++ b/dataType.js @@ -33,7 +33,7 @@ function Data(buffer,offset){ b = this.getUint8(); ret |= ((b & 127) << shift); } - return ret*shift; + return ret*sign; }; this.getUint16 = function(){ var out = this.data.getUint16(this.offset,true); @@ -56,4 +56,4 @@ function Data(buffer,offset){ return out; }; } -module.exports = Data; \ No newline at end of file +module.exports = Data;
Fix varint() for several bytes values Completely untested, but there was an obvious error.
diff --git a/lib/ronin/version.rb b/lib/ronin/version.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/version.rb +++ b/lib/ronin/version.rb @@ -19,5 +19,5 @@ module Ronin # Ronin version - VERSION = '1.1.0' + VERSION = '1.2.0' end
Version bump to <I>.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -124,8 +124,8 @@ def get_version_info(): vinfo = _version_helper.generate_git_version_info() except: vinfo = vdummy() - vinfo.version = '1.16.1' - vinfo.release = 'True' + vinfo.version = '1.16.dev2' + vinfo.release = 'False' with open('pycbc/version.py', 'w') as f: f.write("# coding: utf-8\n")
Set back to development (#<I>)
diff --git a/digitalocean/Droplet.py b/digitalocean/Droplet.py index <HASH>..<HASH> 100644 --- a/digitalocean/Droplet.py +++ b/digitalocean/Droplet.py @@ -307,4 +307,11 @@ class Droplet(BaseAPI): snapshot.id = id snapshot.token = self.token snapshots.append(snapshot) - return snapshots \ No newline at end of file + return snapshots + + def get_kernel_available(self): + """ + Get a list of kernels available + """ + data = self.get_data("droplets/%s/kernels/" % self.id) + return data[u'kernels']
Created a method to download the list of kernels available.
diff --git a/src/sync.js b/src/sync.js index <HASH>..<HASH> 100644 --- a/src/sync.js +++ b/src/sync.js @@ -116,7 +116,7 @@ function handleError(m, key, error) { // TODO: this should be configurable for each sync if (key !== "sso") { - const stopError = new Error("An error occurred when fetching data."); + const stopError = new Error(`An error occurred when fetching data. (key: ${key})`); stopError.code = "sync"; stopError.origin = error; result = l.stop(result, stopError);
Adding `key` to the error "An error occurred when fetching data" (#<I>)
diff --git a/lib/collection/property.js b/lib/collection/property.js index <HASH>..<HASH> 100644 --- a/lib/collection/property.js +++ b/lib/collection/property.js @@ -61,16 +61,21 @@ _.inherit(( * * @type {String} */ - name: src.name, + name: src.name + }); + + if (definition && _.has(definition, 'disabled')) { /** * This (optional) flag denotes whether this property is disabled or not. Usually, this is helpful when a * property is part of a {@link PropertyList}. For example, in a PropertyList of {@link Header}s, the ones * that are disabled can be filtered out and not processed. * @type {Boolean} * @optional + * + * @memberOf Property.prototype */ - disabled: (definition && _.has(definition, 'disabled')) ? !!definition.disabled : undefined - }); + this.disabled = Boolean(definition.disabled); + } // @todo: this is not a good way to create id if duplication check is required. decide. // If this property is marked to require an ID, we generate one if not found.
Made the `disabled` key of properties be added only when one is provided in construction definition. Prevents object clutter
diff --git a/parsl/monitoring/monitoring.py b/parsl/monitoring/monitoring.py index <HASH>..<HASH> 100644 --- a/parsl/monitoring/monitoring.py +++ b/parsl/monitoring/monitoring.py @@ -261,7 +261,7 @@ class MonitoringHub(RepresentationMixin): if isinstance(comm_q_result, str): self.logger.error(f"MonitoringRouter sent an error message: {comm_q_result}") - raise RuntimeError("MonitoringRouter failed to start: {comm_q_result}") + raise RuntimeError(f"MonitoringRouter failed to start: {comm_q_result}") udp_dish_port, ic_port = comm_q_result
Add missing f for an f-string (#<I>)
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -873,7 +873,9 @@ exports.extend = function (newConf) { }); if (config.headless) { - config.noGlobalPlugins = true; + if (!config.pluginsMode) { + config.noGlobalPlugins = true; + } config.pluginsOnlyMode = true; config.disableWebUI = true; delete config.rulesOnlyMode;
feat: allow global plugins in headless mode
diff --git a/openquake/calculators/base.py b/openquake/calculators/base.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/base.py +++ b/openquake/calculators/base.py @@ -344,6 +344,7 @@ class HazardCalculator(BaseCalculator): config.distribution.oq_distribute in ('no', 'futures') or config.directory.shared_dir) if self.oqparam.hazard_calculation_id and read_access: + self.datastore.parent.close() # make sure it is closed return self.datastore.parent def assoc_assets_sites(self, sitecol): @@ -702,9 +703,9 @@ class RiskCalculator(HazardCalculator): else: # gmf getter = riskinput.GmfDataGetter( dstore, sids, self.R, eids) - # if dstore is self.datastore: - # read the hazard data in the controller node - getter.init() # READING ALWAYS UNTIL I DISCOVER THE BUG! + if dstore is self.datastore: + # read the hazard data in the controller node + getter.init() ri = riskinput.RiskInput(getter, reduced_assets, reduced_eps) if ri.weight > 0: riskinputs.append(ri)
Made sure the parent is closed so it can be read from the workers [demos] [skip hazardlib] Former-commit-id: <I>a2d<I>a9e<I>ba2dba<I>d<I>f<I>
diff --git a/app/config/bootstrap/g11n.php b/app/config/bootstrap/g11n.php index <HASH>..<HASH> 100644 --- a/app/config/bootstrap/g11n.php +++ b/app/config/bootstrap/g11n.php @@ -75,7 +75,7 @@ Catalog::config(array( 'adapter' => 'Php', 'path' => LITHIUM_LIBRARY_PATH . '/lithium/g11n/resources/php' ) -)); +) + Catalog::config()); /** * Integration with `Inflector`.
Merge `Catalog` configurations with ones setup by i.e. plugins.
diff --git a/src/Storage/Field/Type/TemplateFieldsType.php b/src/Storage/Field/Type/TemplateFieldsType.php index <HASH>..<HASH> 100644 --- a/src/Storage/Field/Type/TemplateFieldsType.php +++ b/src/Storage/Field/Type/TemplateFieldsType.php @@ -52,8 +52,7 @@ class TemplateFieldsType extends FieldTypeBase $key = $this->mapping['fieldname']; $metadata = $this->buildMetadata($entity); - $type = (string)$entity->getContenttype(); - $builder = $this->em->getEntityBuilder($type); + $builder = $this->em->getEntityBuilder(get_class($entity)); $builder->setClassMetadata($metadata); $templatefieldsEntity = $builder->createFromDatabaseValues($value);
use the class, not the alias to fetch
diff --git a/spec/models/agent_spec.rb b/spec/models/agent_spec.rb index <HASH>..<HASH> 100644 --- a/spec/models/agent_spec.rb +++ b/spec/models/agent_spec.rb @@ -25,6 +25,12 @@ describe Agent do do_not_allow(Agents::WebsiteAgent).async_check Agent.run_schedule("blah") end + + it "will not run the 'never' schedule" do + agents(:bob_weather_agent).update_attribute 'schedule', 'never' + do_not_allow(Agents::WebsiteAgent).async_check + Agent.run_schedule("never") + end end describe "credential" do
add spec about "never" schedule
diff --git a/code/libraries/koowa/libraries/dispatcher/http.php b/code/libraries/koowa/libraries/dispatcher/http.php index <HASH>..<HASH> 100644 --- a/code/libraries/koowa/libraries/dispatcher/http.php +++ b/code/libraries/koowa/libraries/dispatcher/http.php @@ -35,12 +35,12 @@ class KDispatcherHttp extends KDispatcherAbstract implements KObjectMultiton $this->_limit = $config->limit; //Authenticate none safe requests - $this->addCommandHandler('before.post' , '_authenticateRequest'); - $this->addCommandHandler('before.put' , '_authenticateRequest'); - $this->addCommandHandler('before.delete', '_authenticateRequest'); + $this->addCommandCallback('before.post' , '_authenticateRequest'); + $this->addCommandCallback('before.put' , '_authenticateRequest'); + $this->addCommandCallback('before.delete', '_authenticateRequest'); //Sign GET request with a cookie token - $this->addCommandHandler('after.get' , '_signResponse'); + $this->addCommandCallback('after.get' , '_signResponse'); } /**
re #<I> : Renamed command handler to command callback
diff --git a/app/controllers/sortable_controller.rb b/app/controllers/sortable_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/sortable_controller.rb +++ b/app/controllers/sortable_controller.rb @@ -12,6 +12,8 @@ class SortableController < ApplicationController def reorder ActiveRecord::Base.transaction do params['rails_sortable'].each_with_index do |token, new_sort| + next unless token.present? + model = find_model(token) current_sort = model.read_attribute(model.class.sort_attribute) model.update_sort!(new_sort) if current_sort != new_sort
Handle sometimes missing token Was getting vertification problems due to a blank entry coming in - so monkeypatched like this to fix
diff --git a/src/lib/config.js b/src/lib/config.js index <HASH>..<HASH> 100644 --- a/src/lib/config.js +++ b/src/lib/config.js @@ -91,9 +91,7 @@ class Config { // some weird shell scripts are valid yaml files parsed as string assert.equal(typeof(config), 'object', 'CONFIG: it doesn\'t look like a valid config file'); - assert(self.storage, 'CONFIG: storage path not defined'); - - // sanity check for strategic config properties + // sanity check for strategic config properties strategicConfigProps.forEach(function(x) { if (self[x] == null) self[x] = {}; assert(Utils.isObject(self[x]), `CONFIG: bad "${x}" value (object expected)`); diff --git a/src/lib/local-storage.js b/src/lib/local-storage.js index <HASH>..<HASH> 100644 --- a/src/lib/local-storage.js +++ b/src/lib/local-storage.js @@ -842,6 +842,7 @@ class LocalStorage implements IStorage { const Storage = this._loadStorePlugin(); if (_.isNil(Storage)) { + assert(this.config.storage, 'CONFIG: storage path not defined'); return new LocalDatabase(this.config, logger); } else { return Storage;
fix: allow do not include storage if uses a storage plugin
diff --git a/src/exp.js b/src/exp.js index <HASH>..<HASH> 100755 --- a/src/exp.js +++ b/src/exp.js @@ -11,6 +11,7 @@ import url from 'url'; import program, { Command } from 'commander'; import { + Analytics, Config, Logger, NotificationCode, @@ -68,6 +69,8 @@ Command.prototype.asyncActionProjectDir = function(asyncFn) { async function runAsync() { try { + Analytics.setSegmentInstance('vGu92cdmVaggGA26s3lBX6Y5fILm8SQ7'); + Analytics.setVersionName(require('../package.json').version); _registerLogs(); if (process.env.SERVER_URL) {
Add segment to exp fbshipit-source-id: <I>b2bbe
diff --git a/upload/install/language/english.php b/upload/install/language/english.php index <HASH>..<HASH> 100644 --- a/upload/install/language/english.php +++ b/upload/install/language/english.php @@ -108,7 +108,7 @@ $_['error_score'] = 'A score between 0 and 100 is accepted'; $_['error_db_hostname'] = 'Hostname required!'; $_['error_db_username'] = 'Username required!'; $_['error_db_database'] = 'Database Name required!'; -$_['error_db_prefix'] = 'DB Prefix can only contain lowercase characters in the a-z range, 0-9 and ""!'; +$_['error_db_prefix'] = 'DB Prefix can only contain lowercase characters in the a-z range, 0-9 and underscores'; $_['error_db_connect'] = 'Error: Could not connect to the database please make sure the database server, username and password is correct!'; $_['error_username'] = 'Username required!'; $_['error_password'] = 'Password required!';
Slight change to language string for install.
diff --git a/yasha.py b/yasha.py index <HASH>..<HASH> 100644 --- a/yasha.py +++ b/yasha.py @@ -168,9 +168,6 @@ def cli(template, variables, extensions, output, no_variables, no_extensions, mm varpath = find_variables(template.name, sum(filext, [])) variables = click.open_file(varpath, "rb") if varpath else None - if variables and not no_variables: - vardict = parse_variables(variables, extdict["variable_parsers"]) - if mm: if mt: deps = mt + ": " @@ -182,7 +179,10 @@ def cli(template, variables, extensions, output, no_variables, no_extensions, mm if extensions: deps += os.path.relpath(extensions.name) click.echo(deps) - exit(0) + return + + if variables and not no_variables: + vardict = parse_variables(variables, extdict["variable_parsers"]) jinja = load_jinja(t_dirname, extdict) t = jinja.get_template(t_basename)
No need to parse variables if only Make dependencies are required
diff --git a/src/main/java/com/helger/commons/xml/schema/IHasSchema.java b/src/main/java/com/helger/commons/xml/schema/IHasSchema.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/helger/commons/xml/schema/IHasSchema.java +++ b/src/main/java/com/helger/commons/xml/schema/IHasSchema.java @@ -17,11 +17,12 @@ package com.helger.commons.xml.schema; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import javax.xml.validation.Schema; /** * A simple interface, indicating that an item has a Schema object. - * + * * @author Philip Helger */ public interface IHasSchema @@ -31,4 +32,13 @@ public interface IHasSchema */ @Nonnull Schema getSchema (); + + /** + * @param aClassLoader + * The class loader to be used. May be <code>null</code> indicating + * that the default class loader should be used. + * @return The non-<code>null</code> Schema object + */ + @Nonnull + Schema getSchema (@Nullable ClassLoader aClassLoader); }
Added special version with ClassLoader
diff --git a/sendyLibrary.php b/sendyLibrary.php index <HASH>..<HASH> 100644 --- a/sendyLibrary.php +++ b/sendyLibrary.php @@ -4,19 +4,24 @@ */ class SendyLibrary { - private $installation_url = 'http://updates.mydomain.com'; - private $api_key = 'yourapiKEYHERE'; + private $installation_url; + private $api_key; private $list_id; - function __construct($list_id) + function __construct(array $config) { //error checking + $list_id = @$config['list_id']; + $installation_url = @$config['installation_url']; + $api_key = @$config['api_key']; + if (!isset($list_id)) {throw new Exception("Required config parameter [list_id] is not set", 1);} - if (!isset($this->installation_url)) {throw new Exception("Required config parameter [installation_url] is not set", 1);} - if (!isset($this->api_key)) {throw new Exception("Required config parameter [api_key] is not set", 1);} + if (!isset($installation_url)) {throw new Exception("Required config parameter [installation_url] is not set", 1);} + if (!isset($api_key)) {throw new Exception("Required config parameter [api_key] is not set", 1);} $this->list_id = $list_id; - + $this->installation_url = $installation_url; + $this->api_key = $api_key; } public function subscribe(array $values) {
Updating the constructor to accept configs for other variables
diff --git a/src/Illuminate/Foundation/Testing/DatabaseTransactions.php b/src/Illuminate/Foundation/Testing/DatabaseTransactions.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Foundation/Testing/DatabaseTransactions.php +++ b/src/Illuminate/Foundation/Testing/DatabaseTransactions.php @@ -19,7 +19,10 @@ trait DatabaseTransactions $this->beforeApplicationDestroyed(function () use ($database) { foreach ($this->connectionsToTransact() as $name) { - $database->connection($name)->rollBack(); + $connection = $database->connection($name); + + $connection->rollBack(); + $connection->disconnect(); } }); }
Terminate user defined database connections after rollback during testing while using the DatabaseTransactions trait. (#<I>)
diff --git a/src/extensibility/Package.js b/src/extensibility/Package.js index <HASH>..<HASH> 100644 --- a/src/extensibility/Package.js +++ b/src/extensibility/Package.js @@ -248,7 +248,7 @@ define(function (require, exports, module) { // Download the bits (using Node since brackets-shell doesn't support binary file IO) var r = extensionManager.downloadFile(downloadId, urlInfo.url); r.done(function (result) { - d.resolve({ localPath: result, filenameHint: urlInfo.filenameHint }); + d.resolve({ localPath: FileUtils.convertWindowsPathToUnixPath(result), filenameHint: urlInfo.filenameHint }); }).fail(function (err) { d.reject(err); });
Fix #<I>. Bracketize Win paths returned by node.
diff --git a/object/assign-deep.js b/object/assign-deep.js index <HASH>..<HASH> 100644 --- a/object/assign-deep.js +++ b/object/assign-deep.js @@ -8,15 +8,24 @@ var includes = require("../array/#/contains") var isArray = Array.isArray, slice = Array.prototype.slice; +var assignObject = function (target, source) { + // eslint-disable-next-line no-use-before-define + objForEach(source, function (value, key) { target[key] = deepAssign(target[key], value); }); +}; + +var assignArray = function (target, source) { + source.forEach(function (item) { if (!includes.call(target, item)) target.push(item); }); +}; + var deepAssign = function (target, source) { if (isPlainObject(target)) { if (!isPlainObject(source)) return source; - objForEach(source, function (value, key) { target[key] = deepAssign(target[key], value); }); + assignObject(target, source); return target; } if (isArray(target)) { if (!isArray(source)) return source; - source.forEach(function (item) { if (!includes.call(target, item)) target.push(item); }); + assignArray(target, source); return target; } return source;
refactor: seclude assign logic
diff --git a/lib/setup.php b/lib/setup.php index <HASH>..<HASH> 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -225,15 +225,17 @@ global $HTTPSPAGEREQUIRED; * If $SITE global from {@link get_site()} is set then SITEID to $SITE->id, otherwise set to 1. */ define('SITEID', $SITE->id); + /// And the 'default' course + $COURSE = clone($SITE); // For now. This will usually get reset later in require_login() etc. } else { /** * @ignore */ define('SITEID', 1); - define('COURSEID', 1); + /// And the 'default' course + $COURSE = new object; // no site created yet + $COURSE->id = 1; } -/// And the 'default' course - $COURSE = clone($SITE); // For now. This will usually get reset later in require_login() etc. /// Set a default enrolment configuration (see bug 1598)
fixed warning from clone($SITE) during site setup; merged from MOODLE_<I>_STABLE
diff --git a/libraries/lithium/tests/cases/console/command/create/TestTest.php b/libraries/lithium/tests/cases/console/command/create/TestTest.php index <HASH>..<HASH> 100644 --- a/libraries/lithium/tests/cases/console/command/create/TestTest.php +++ b/libraries/lithium/tests/cases/console/command/create/TestTest.php @@ -27,6 +27,7 @@ class TestTest extends \lithium\test\Unit { } public function setUp() { + Libraries::cache(false); $this->classes = array('response' => '\lithium\tests\mocks\console\MockResponse'); $this->_backup['cwd'] = getcwd(); $this->_backup['_SERVER'] = $_SERVER;
`\console\command\create\Test` test: clearing Libraries cache
diff --git a/test/distro/distroSpec.js b/test/distro/distroSpec.js index <HASH>..<HASH> 100644 --- a/test/distro/distroSpec.js +++ b/test/distro/distroSpec.js @@ -1,9 +1,10 @@ describe('distro', function() { it('should expose CJS bundle', function() { - const BpmnJSBpmnlint = require('../..'); + const BpmnJSBpmnlint = require('../../dist/index.js'); expect(BpmnJSBpmnlint).to.exist; + expect(BpmnJSBpmnlint.__init__).to.exist; }); @@ -11,6 +12,7 @@ describe('distro', function() { const BpmnJSBpmnlint = require('../../dist/bpmn-js-bpmnlint.umd.js'); expect(BpmnJSBpmnlint).to.exist; + expect(BpmnJSBpmnlint.__init__).to.exist; }); });
test: verify CJS and UMD exports
diff --git a/src/fields.js b/src/fields.js index <HASH>..<HASH> 100644 --- a/src/fields.js +++ b/src/fields.js @@ -1,7 +1,13 @@ const Field = class Field { - constructor(toModelName, relatedName) { - this.toModelName = toModelName; - this.relatedName = relatedName; + constructor(...args) { + if (args.length === 1 && typeof args[0] === 'object') { + const opts = args[0]; + this.toModelName = opts.to; + this.relatedName = opts.relatedName; + } else { + this.toModelName = args[0]; + this.relatedName = args[1]; + } } };
Accept options object to field declarations in a backwards-compatible manner
diff --git a/lib/IntercomError.js b/lib/IntercomError.js index <HASH>..<HASH> 100644 --- a/lib/IntercomError.js +++ b/lib/IntercomError.js @@ -26,10 +26,11 @@ util.inherits(AbstractError, Error); * * @api private */ -function IntercomError(message) { +function IntercomError(message, errors) { AbstractError.apply(this, arguments); this.name = 'IntercomError'; this.message = message; + this.errors = data.errors; } /** diff --git a/lib/intercom.io.js b/lib/intercom.io.js index <HASH>..<HASH> 100644 --- a/lib/intercom.io.js +++ b/lib/intercom.io.js @@ -135,10 +135,12 @@ Intercom.prototype.request = function(method, path, parameters, cb) { parsed = JSON.parse(data); if (parsed && (parsed.error || parsed.errors)) { - err = new IntercomError(data); + var errorCodes = '"' + parsed.errors.map(function (error) { + return error.code; + }).join('", "') + '"'; // Reject the promise - return deferred.reject(err); + return deferred.reject(new IntercomError(errorCodes + ' error(s) from Intercom', parsed.errors)); } } catch (exception) { // Reject the promise
Store the error details in IntercomError
diff --git a/ledger/__metadata__.py b/ledger/__metadata__.py index <HASH>..<HASH> 100644 --- a/ledger/__metadata__.py +++ b/ledger/__metadata__.py @@ -1,7 +1,7 @@ """ Ledger package metadata """ -__version_info__ = (0, 0, 12) +__version_info__ = (0, 0, 13) __version__ = '{}.{}.{}'.format(*__version_info__) __author__ = "Evernym, Inc." __license__ = "Apache 2.0"
[#<I>] incremented version number
diff --git a/lib/rules/require-strict-equality-operators.js b/lib/rules/require-strict-equality-operators.js index <HASH>..<HASH> 100644 --- a/lib/rules/require-strict-equality-operators.js +++ b/lib/rules/require-strict-equality-operators.js @@ -13,9 +13,7 @@ module.exports.prototype = , lint: function (file, errors) { - file.iterateTokensByFilter(function (token) { - return token.type === 'code' && token.requiresBlock - }, function (token) { + file.iterateTokensByType([ 'if', 'else-if' ], function (token) { var regex = /([!=]=)(.)/ , match = token.val.match(regex) , operator
Refactor `requireStrictEqualityOperators` to handle new token structure
diff --git a/chai-immutable.js b/chai-immutable.js index <HASH>..<HASH> 100644 --- a/chai-immutable.js +++ b/chai-immutable.js @@ -1,6 +1,6 @@ -(function () { - 'use strict'; +'use strict'; +(function () { if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
Make sure strictness is applied everywhere in the plugin