diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/app/src/main/java/io/appium/uiautomator2/model/XPathFinder.java b/app/src/main/java/io/appium/uiautomator2/model/XPathFinder.java index <HASH>..<HASH> 100644 --- a/app/src/main/java/io/appium/uiautomator2/model/XPathFinder.java +++ b/app/src/main/java/io/appium/uiautomator2/model/XPathFinder.java @@ -231,7 +231,7 @@ public class XPathFinder implements Finder { public static AccessibilityNodeInfo getRootAccessibilityNode() throws UiAutomator2Exception { final long timeoutMillis = 10000; - Device.waitForIdle(timeoutMillis); + Device.waitForIdle(); long end = SystemClock.uptimeMillis() + timeoutMillis; while (true) {
Shouln't use hardcoded timeout for `waitForIdle()`. (#<I>)
diff --git a/analyzers/MISP/mispclient.py b/analyzers/MISP/mispclient.py index <HASH>..<HASH> 100755 --- a/analyzers/MISP/mispclient.py +++ b/analyzers/MISP/mispclient.py @@ -57,9 +57,9 @@ class MISPClient: elif isinstance(ssl, bool): verify = ssl self.misp_connections.append(pymisp.ExpandedPyMISP(url=server, - key=key[idx], - ssl=verify, - proxies=proxies)) + key=key[idx], + ssl=verify, + proxies=proxies)) else: verify = True if isinstance(ssl, str) and os.path.isfile(ssl): @@ -68,10 +68,10 @@ class MISPClient: raise CertificateNotFoundError('Certificate not found under {}.'.format(ssl)) elif isinstance(ssl, bool): verify = ssl - self.misp_connections.append(pymisp.PyMISP(url=url, - key=key, - ssl=verify, - proxies=proxies)) + self.misp_connections.append(pymisp.ExpandedPyMISP(url=url, + key=key, + ssl=verify, + proxies=proxies)) self.misp_name = name @staticmethod
[#<I>] Use ExpandedPyMISP in case of a single MISP connection also
diff --git a/lib/active_admin/csv_builder.rb b/lib/active_admin/csv_builder.rb index <HASH>..<HASH> 100644 --- a/lib/active_admin/csv_builder.rb +++ b/lib/active_admin/csv_builder.rb @@ -47,9 +47,13 @@ module ActiveAdmin receiver << CSV.generate_line(columns.map{ |c| encode c.name, options }, options) - view_context.send(:collection).find_each do |resource| - resource = view_context.send :apply_decorator, resource - receiver << CSV.generate_line(build_row(resource, columns, options), options) + collection = view_context.send(:collection) + total_pages = collection.public_send(Kaminari.config.page_method_name, 1).per(batch_size).total_pages + (1..total_pages).each do |page_no| + collection.public_send(Kaminari.config.page_method_name, page_no).per(batch_size).each do |resource| + resource = view_context.send :apply_decorator, resource + receiver << CSV.generate_line(build_row(resource, columns, options), options) + end end end @@ -107,5 +111,9 @@ module ActiveAdmin def column_transitive_options @column_transitive_options ||= @options.slice(*COLUMN_TRANSITIVE_OPTIONS) end + + def batch_size + 1000 + end end end
added ability to use sort order in CSV
diff --git a/src/main/java/biz/paluch/logging/gelf/jboss7/JBoss7GelfLogHandler.java b/src/main/java/biz/paluch/logging/gelf/jboss7/JBoss7GelfLogHandler.java index <HASH>..<HASH> 100644 --- a/src/main/java/biz/paluch/logging/gelf/jboss7/JBoss7GelfLogHandler.java +++ b/src/main/java/biz/paluch/logging/gelf/jboss7/JBoss7GelfLogHandler.java @@ -102,7 +102,7 @@ public class JBoss7GelfLogHandler extends biz.paluch.logging.gelf.jul.GelfLogHan } public void setDynamicMdcFields(String fieldSpec) { - super.setMdcFields(fieldSpec); + super.setDynamicMdcFields(fieldSpec); } public boolean isMdcProfiling() {
Use correct setting in MDC names (fixes bug introduced with #<I>)
diff --git a/doc/conf.py b/doc/conf.py index <HASH>..<HASH> 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -81,7 +81,7 @@ copyright = u'2015–2018, SKA South Africa' def get_version(): globals_ = {} root = os.path.dirname(os.path.dirname(__file__)) - with open(os.path.join(root, 'spead2', '_version.py')) as f: + with open(os.path.join(root, 'src', 'spead2', '_version.py')) as f: code = f.read() exec(code, globals_) release = globals_['__version__']
Fix doc build to get _version.py from new location
diff --git a/pkg/datapath/loader/loader.go b/pkg/datapath/loader/loader.go index <HASH>..<HASH> 100644 --- a/pkg/datapath/loader/loader.go +++ b/pkg/datapath/loader/loader.go @@ -364,7 +364,7 @@ func (l *Loader) replaceNetworkDatapath(ctx context.Context, interfaces []string } for _, iface := range option.Config.EncryptInterface { if err := replaceDatapath(ctx, iface, networkObj, symbolFromNetwork, dirIngress, false, ""); err != nil { - log.WithField(logfields.Interface, iface).Fatal("Load encryption network failed") + log.WithField(logfields.Interface, iface).WithError(err).Fatal("Load encryption network failed") } } return nil
Add missing error reporting in replaceNetworkDatapath
diff --git a/tests/CityDataTest.php b/tests/CityDataTest.php index <HASH>..<HASH> 100644 --- a/tests/CityDataTest.php +++ b/tests/CityDataTest.php @@ -146,6 +146,7 @@ final class CityDataTest extends \PHPUnit\Framework\TestCase public function testExtendedClassV2() { + $this->expectException(\TypeError::class); $this->expectExceptionMessageRegExp('#Invalid type: expected "plz" to be of type {string}, instead got value "NULL"#'); $modelMeta = BigCityData::meta();
[+]: search for PhpDoc @property in parent classes <I>
diff --git a/lib/countly.js b/lib/countly.js index <HASH>..<HASH> 100644 --- a/lib/countly.js +++ b/lib/countly.js @@ -2382,7 +2382,7 @@ // set feedback widget family as ratings and load related style file when type is ratings if (presentableFeedback.type === "rating") { feedbackWidgetFamily = "ratings"; - loadCSS(`${this.url}/star-rating/stylesheets/ratings-sdk.css`); + loadCSS(`${this.url}/star-rating/stylesheets/countly-feedback-web.css`); } // if it's not ratings, it means we need to name it as surveys and load related style file // (at least until we add new type in future)
[ratings-css-rename] renamed css file name for backward compatability. (#<I>) also I made a server-side change related this.
diff --git a/messenger.go b/messenger.go index <HASH>..<HASH> 100644 --- a/messenger.go +++ b/messenger.go @@ -23,7 +23,7 @@ type Options struct { VerifyToken string // Token is the access token of the Facebook page to send messages from. Token string - // WebhookURL is where the Messenger client should listen for webhook events. + // WebhookURL is where the Messenger client should listen for webhook events. Leaving the string blank implies a path of "/". WebhookURL string } @@ -53,6 +53,10 @@ func New(mo Options) *Messenger { token: mo.Token, } + if mo.WebhookURL == "" { + mo.WebhookURL = "/" + } + m.verifyHandler = newVerifyHandler(mo.VerifyToken) m.mux.HandleFunc(mo.WebhookURL, m.handle) @@ -113,7 +117,7 @@ func (m *Messenger) handle(w http.ResponseWriter, r *http.Request) { err := json.NewDecoder(r.Body).Decode(&rec) if err != nil { - fmt.Println(err) + fmt.Println("could not decode response:", err) fmt.Fprintln(w, `{status: 'not ok'}`) return }
Add "/" as default WebhookURL This is because an empty string is *invalid* in net/http and will yield a panic.
diff --git a/test/unit/process_runner_test.rb b/test/unit/process_runner_test.rb index <HASH>..<HASH> 100644 --- a/test/unit/process_runner_test.rb +++ b/test/unit/process_runner_test.rb @@ -92,8 +92,8 @@ class ProcessRunnerTest < Test::Unit::TestCase def execute_with_open4_and_bad_mode(command, options="") assert !File.stat(command).executable?, "File should not be executable to begin" + @runner.expects(:update_executable_mode) @runner.execute_open4 command, options - assert File.stat(command).executable?, "File should be converted to become executable" assert_matches /^Hello World/, @runner.read end
Updated process runner test to work on Windoze
diff --git a/lib/rack/timeout.rb b/lib/rack/timeout.rb index <HASH>..<HASH> 100644 --- a/lib/rack/timeout.rb +++ b/lib/rack/timeout.rb @@ -44,7 +44,7 @@ module Rack timeout_thread = Thread.start do loop do info.duration = Time.now - ready_time - sleep_seconds = [1, info.timeout - info.duration].min + sleep_seconds = [1 - (info.duration % 1), info.timeout - info.duration].min break if sleep_seconds <= 0 Rack::Timeout._set_state! env, :active sleep(sleep_seconds)
try to ensure steps between logging active state in debug mode are exactly 1s, by accounting for accumulated processing time from previous iteration
diff --git a/pixiedust/utils/environment.py b/pixiedust/utils/environment.py index <HASH>..<HASH> 100644 --- a/pixiedust/utils/environment.py +++ b/pixiedust/utils/environment.py @@ -34,7 +34,7 @@ class Environment(with_metaclass( scala_out = subprocess.check_output([scala, "-version"], stderr=subprocess.STDOUT).decode("utf-8") except subprocess.CalledProcessError as cpe: scala_out = cpe.output - match = re.search(b'.*version[^0-9]*([0-9]*[^.])\.([0-9]*[^.])\.([0-9]*[^.]).*', scala_out) + match = re.search(".*version[^0-9]*([0-9]*[^.])\.([0-9]*[^.])\.([0-9]*[^.]).*", scala_out) if match and len(match.groups()) > 2: return int(match.group(1)), int(match.group(2)) else:
Change regex search to support Python <I> and Python <I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,8 @@ if not USE_CYTHON: assert os.path.exists(os.path.join("pypolyagamma", "parallel.cpp")) # download GSL if we don't have it in deps -assert os.path.exists('deps') +if not os.path.exists('deps'): + os.makedirs('deps') gslurl = 'http://open-source-box.org/gsl/gsl-latest.tar.gz' gsltarpath = os.path.join('deps', 'gsl-latest.tar.gz') gslpath = os.path.join('deps', 'gsl')
if deps/ dir doesn't exist make it
diff --git a/lib/shopify_app/configuration.rb b/lib/shopify_app/configuration.rb index <HASH>..<HASH> 100644 --- a/lib/shopify_app/configuration.rb +++ b/lib/shopify_app/configuration.rb @@ -5,7 +5,7 @@ module ShopifyApp # for the app in your Shopify Partners page. Change your settings in # `config/initializers/shopify_app.rb` attr_accessor :application_name - attr_accessor :api_key + attr_writer :api_key attr_accessor :secret attr_accessor :old_secret attr_accessor :scope @@ -65,6 +65,11 @@ module ShopifyApp scripttags.present? end + def api_key + raise 'API Key is required and is being returned nil. Are you loading your enviroment variables?' if @api_key.nil? + @api_key + end + def enable_same_site_none !Rails.env.test? && (@enable_same_site_none.nil? ? embedded_app? : @enable_same_site_none) end
raises if you do not have our api_key set
diff --git a/src/extensions/default/QuickView/main.js b/src/extensions/default/QuickView/main.js index <HASH>..<HASH> 100644 --- a/src/extensions/default/QuickView/main.js +++ b/src/extensions/default/QuickView/main.js @@ -371,11 +371,16 @@ define(function (require, exports, module) { editor; for (i = 0; i < inlines.length; i++) { - var $inlineDiv = inlines[i].$editorsDiv; // see MultiRangeInlineEditor + var $inlineDiv = inlines[i].$editorsDiv, // see MultiRangeInlineEditor + $otherDiv = inlines[i].$htmlContent; if ($inlineDiv && divContainsMouse($inlineDiv, event)) { editor = inlines[i].editors[0]; break; + } else if ($otherDiv && divContainsMouse($otherDiv, event)) { + // Mouse inside unsupported inline editor like Quick Docs or Color Editor + hidePreview(); + return; } }
Hide Quick View when hovering in unsuported inline editors.
diff --git a/spyder/widgets/variableexplorer/utils.py b/spyder/widgets/variableexplorer/utils.py index <HASH>..<HASH> 100644 --- a/spyder/widgets/variableexplorer/utils.py +++ b/spyder/widgets/variableexplorer/utils.py @@ -397,10 +397,10 @@ def value_to_display(value, minmax=False, level=0): except: display = default_display(value) - # Truncate display at 80 chars to avoid freezing Spyder + # Truncate display at 70 chars to avoid freezing Spyder # because of large displays - if len(display) > 80: - display = display[:80].rstrip() + ' ...' + if len(display) > 70: + display = display[:70].rstrip() + ' ...' # Restore Numpy threshold if np_threshold is not FakeObject:
Variable Explorer: Reduce number of characters shown in display
diff --git a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php +++ b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php @@ -442,7 +442,7 @@ trait ValidatesAttributes foreach ($parameters as $parameter) { if (Arr::has($this->data, $parameter)) { $other = Arr::get($this->data, $parameter); - + if ($value === $other) { return false; }
Apply fixes from StyleCI (#<I>)
diff --git a/domain/core-api/src/main/java/io/motown/domain/api/chargingstation/CorrelationToken.java b/domain/core-api/src/main/java/io/motown/domain/api/chargingstation/CorrelationToken.java index <HASH>..<HASH> 100644 --- a/domain/core-api/src/main/java/io/motown/domain/api/chargingstation/CorrelationToken.java +++ b/domain/core-api/src/main/java/io/motown/domain/api/chargingstation/CorrelationToken.java @@ -53,7 +53,9 @@ public final class CorrelationToken { } /** - * {@inheritDoc} + * Gets the token. + * + * @return the token. */ public String getToken() { return token;
Fixed the CorrelationToken's getToken JavaDoc
diff --git a/djangocms_text_ckeditor/cms_plugins.py b/djangocms_text_ckeditor/cms_plugins.py index <HASH>..<HASH> 100644 --- a/djangocms_text_ckeditor/cms_plugins.py +++ b/djangocms_text_ckeditor/cms_plugins.py @@ -46,6 +46,15 @@ class TextPlugin(CMSPluginBase): kwargs['form'] = form # override standard form return super(TextPlugin, self).get_form(request, obj, **kwargs) + def render_change_form(self, request, context, add=False, change=False, form_url='', obj=None): + """ + We override the change form template path + to provide backwards compatibility with CMS 2.x + """ + if cms_version.startswith('2'): + context['change_form_template'] = "admin/cms/page/plugin_change_form.html" + return super(TextPlugin, self).render_change_form(request, context, add, change, form_url, obj) + def render(self, context, instance, placeholder): context.update({ 'body': plugin_tags_to_user_html( @@ -56,9 +65,6 @@ class TextPlugin(CMSPluginBase): 'placeholder': placeholder, 'object': instance }) - # Support for Django CMS 2.x - if cms_version.startswith('2'): - context['change_form_template'] = "admin/cms/page/plugin_change_form.html" return context def save_model(self, request, obj, form, change):
Provide extra context variable to override template path.
diff --git a/pavement.py b/pavement.py index <HASH>..<HASH> 100644 --- a/pavement.py +++ b/pavement.py @@ -122,6 +122,8 @@ options( docs=Bunch(docs_dir="docs/apidocs"), ) +setup(**project) + # # Build
optional tools not installed upfront; fixed pyrocore pavement
diff --git a/jest/src/test/java/io/searchbox/cluster/UpdateSettingsIntegrationTest.java b/jest/src/test/java/io/searchbox/cluster/UpdateSettingsIntegrationTest.java index <HASH>..<HASH> 100644 --- a/jest/src/test/java/io/searchbox/cluster/UpdateSettingsIntegrationTest.java +++ b/jest/src/test/java/io/searchbox/cluster/UpdateSettingsIntegrationTest.java @@ -26,7 +26,7 @@ public class UpdateSettingsIntegrationTest extends AbstractIntegrationTest { public void transientSettingShouldBeUpdated() throws IOException { String source = "{\n" + " \"transient\" : {\n" + - " \"discovery.zen.publish_timeout\" : 10\n" + + " \"indices.store.throttle.max_bytes_per_sec\" : \"50mb\"\n" + " }\n" + "}";
using a different setting name to test if transient settings change as expected - the other one must be missing.
diff --git a/discord/member.py b/discord/member.py index <HASH>..<HASH> 100644 --- a/discord/member.py +++ b/discord/member.py @@ -125,3 +125,11 @@ class Member(User): return Colour.default() color = colour + + @property + def mention(self): + if self.nick: + return '<@!{}>'.format(self.id) + return '<@{}>'.format(self.id) + + mention.__doc__ = User.mention.__doc__
Member.mention now uses nickname hint if needed.
diff --git a/Bridges/HttpKernel.php b/Bridges/HttpKernel.php index <HASH>..<HASH> 100644 --- a/Bridges/HttpKernel.php +++ b/Bridges/HttpKernel.php @@ -11,6 +11,7 @@ use React\Http\Request as ReactRequest; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\Request as SymfonyRequest; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; +use Symfony\Component\HttpFoundation\StreamedResponse as SymfonyStreamedResponse; use Symfony\Component\HttpKernel\TerminableInterface; class HttpKernel implements BridgeInterface @@ -171,6 +172,9 @@ class HttpKernel implements BridgeInterface } $content = $syResponse->getContent(); + if ($syResponse instanceof SymfonyStreamedResponse) { + $syResponse->sendContent(); + } $nativeHeaders = [];
Readd simplistic StreamedResponse support
diff --git a/lib/jsonapi/error_codes.rb b/lib/jsonapi/error_codes.rb index <HASH>..<HASH> 100644 --- a/lib/jsonapi/error_codes.rb +++ b/lib/jsonapi/error_codes.rb @@ -17,7 +17,7 @@ module JSONAPI TYPE_MISMATCH = 116 INVALID_PAGE_OBJECT = 117 INVALID_PAGE_VALUE = 118 - INVALID_FIELD_FORMAT = 120 + INVALID_FIELD_FORMAT = 119 FORBIDDEN = 403 RECORD_NOT_FOUND = 404 UNSUPPORTED_MEDIA_TYPE = 415
Shift INVALID_FIELD_FORMAT value from <I> to <I>
diff --git a/src/svg.js b/src/svg.js index <HASH>..<HASH> 100644 --- a/src/svg.js +++ b/src/svg.js @@ -1943,6 +1943,8 @@ function arrayFirstValue(arr) { p.node.appendChild(this.node); return p; }; +// SIERRA Element.marker(): clarify what a reference point is. E.g., helps you offset the object from its edge such as when centering it over a path. +// SIERRA Element.marker(): I suggest the method should accept default reference point values. Perhaps centered with (refX = width/2) and (refY = height/2)? Also, couldn't it assume the element's current _width_ and _height_? And please specify what _x_ and _y_ mean: offsets? If so, from where? Couldn't they also be assigned default values? /*\ * Element.marker [ method ] @@ -1957,7 +1959,7 @@ function arrayFirstValue(arr) { - refX (number) - refY (number) = (Element) `<marker>` element - * You can use pattern later on as an argument for `marker-start` or `marker-end` attributes. + * You can specify the marker later as an argument for `marker-start`, `marker-end`, `marker-mid`, and `marker` attributes. The `marker` attribute places the marker at every point along the path, and `marker-mid` places them at every point except the start and end. \*/ // TODO add usage for markers elproto.marker = function (x, y, width, height, refX, refY) {
EDIT & COMMENT Element.marker
diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index <HASH>..<HASH> 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -467,7 +467,7 @@ class Validation { */ public static function ip($check, $type = 'both') { $type = strtolower($type); - $flags = null; + $flags = 0; if ($type === 'ipv4' || $type === 'both') { $flags |= FILTER_FLAG_IPV4; }
Don't |= with null.
diff --git a/gruvi/jsonrpc.py b/gruvi/jsonrpc.py index <HASH>..<HASH> 100644 --- a/gruvi/jsonrpc.py +++ b/gruvi/jsonrpc.py @@ -208,7 +208,7 @@ def create_error(request, code=None, message=None, data=None, error=None): """Create a JSON-RPC error response message.""" if code is None and error is None: raise ValueError('either "code" or "error" must be set') - msg = {'id': request['id']} + msg = {'id': request and request.get('id')} if code: error = {'code': code} error['message'] = message or strerror(code)
[jsonrpc] create_error(): allow null id This allows you to call create_error() with a message argument that is either None, or a notification. The JSON-RPC spec allows erros with a null ID in case it is not clear where the error belongs to.
diff --git a/sshtunnel.py b/sshtunnel.py index <HASH>..<HASH> 100644 --- a/sshtunnel.py +++ b/sshtunnel.py @@ -1620,7 +1620,7 @@ def open_tunnel(*args, **kwargs): kwargs ) - ssh_port = kwargs.pop('ssh_port', None) + ssh_port = kwargs.pop('ssh_port', 22) skip_tunnel_checkup = kwargs.pop('skip_tunnel_checkup', True) block_on_close = kwargs.pop('block_on_close', _DAEMON) if not args:
Fix #<I> (#<I>)
diff --git a/src/Resources/ElasticSearch/ElasticSearchResource.php b/src/Resources/ElasticSearch/ElasticSearchResource.php index <HASH>..<HASH> 100644 --- a/src/Resources/ElasticSearch/ElasticSearchResource.php +++ b/src/Resources/ElasticSearch/ElasticSearchResource.php @@ -144,7 +144,7 @@ class ElasticSearchResource extends Resource } unset($params['body']['from'], $params['body']['size']); } else { - $where = json_decode($params['where'], true); + $where = json_decode($params['where'] ?? '', true); } }
don't throw exception when filter is not set
diff --git a/lib/bitcoin/sighash_generator.rb b/lib/bitcoin/sighash_generator.rb index <HASH>..<HASH> 100644 --- a/lib/bitcoin/sighash_generator.rb +++ b/lib/bitcoin/sighash_generator.rb @@ -71,7 +71,9 @@ module Bitcoin amount = [amount].pack('Q') nsequence = [tx.inputs[input_index].sequence].pack('V') hash_outputs = Bitcoin.double_sha256(tx.outputs.map{|o|o.to_payload}.join) - + if output_script.p2wsh? + warn('The output_script must be a witness script, not the P2WSH itself.') + end script_code = output_script.to_script_code(skip_separator_index) case (hash_type & 0x1f)
Add waring to Tx#sighash_for_input when P2WSH output_script are specified In P2WSH case, it should pass witness script instead of scriptPubkey. Add a warning message to make you aware of this mistake.
diff --git a/lib/http/2/emitter.rb b/lib/http/2/emitter.rb index <HASH>..<HASH> 100644 --- a/lib/http/2/emitter.rb +++ b/lib/http/2/emitter.rb @@ -20,8 +20,8 @@ module HTTP2 # @param event [Symbol] # @param block [Proc] callback function def once(event, &block) - add_listener(event) do |*args| - block.call(*args) + add_listener(event) do |*args, &callback| + block.call(*args, &callback) :delete end end diff --git a/spec/emitter_spec.rb b/spec/emitter_spec.rb index <HASH>..<HASH> 100644 --- a/spec/emitter_spec.rb +++ b/spec/emitter_spec.rb @@ -31,6 +31,14 @@ describe HTTP2::Emitter do args.should eq 123 end + it "should pass emitted callbacks to listeners" do + @w.on(:a) { |&block| block.call } + @w.once(:a) { |&block| block.call } + @w.emit(:a) { @cnt += 1 } + + @cnt.should eq 2 + end + it "should allow events with no callbacks" do expect { @w.emit(:missing) }.to_not raise_error end
Update 'once' listeners to accept a block argument One-time listeners now accept an emitted callback to match the behavior of persistent listeners.
diff --git a/NewIntegrationTest.py b/NewIntegrationTest.py index <HASH>..<HASH> 100644 --- a/NewIntegrationTest.py +++ b/NewIntegrationTest.py @@ -198,7 +198,7 @@ if len( sys.argv ) > 1 and sys.argv[ 1 ] == "--record": class_, method = method.split( "." ) method = "test" + method print "Recording method", method, "of class", class_ - exec "testCase = " + class_ + "( methodName = method )" + testCase = eval( class_ )( methodName = method ) method = getattr( testCase, method ) TestCase.setUp = TestCase.setUpForRecord TestCase.tearDown = TestCase.tearDownForRecord
Use a small eval instead of a big exec
diff --git a/gitlab/utils.py b/gitlab/utils.py index <HASH>..<HASH> 100644 --- a/gitlab/utils.py +++ b/gitlab/utils.py @@ -55,3 +55,7 @@ def sanitized_url(url): parsed = urlparse(url) new_path = parsed.path.replace(".", "%2E") return parsed._replace(path=new_path).geturl() + + +def remove_none_from_dict(data): + return {k: v for k, v in data.items() if v is not None} diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index <HASH>..<HASH> 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -760,6 +760,7 @@ class FeatureManager(ListMixin, DeleteMixin, RESTManager): "group": group, "project": project, } + data = utils.remove_none_from_dict(data) server_data = self.gitlab.http_post(path, post_data=data, **kwargs) return self._obj_cls(self, server_data)
fix: remove null values from features POST data, because it fails with HTTP <I>
diff --git a/src/main/java/org/primefaces/component/api/UIData.java b/src/main/java/org/primefaces/component/api/UIData.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/primefaces/component/api/UIData.java +++ b/src/main/java/org/primefaces/component/api/UIData.java @@ -150,13 +150,13 @@ public class UIData extends javax.faces.component.UIData { } public void calculateFirst() { - int rows = this.getRowsToRender(); + int rows = this.getRows(); if(rows > 0) { int first = this.getFirst(); int rowCount = this.getRowCount(); - if(first >= rowCount) { + if(rowCount > 0 && first >= rowCount) { int numberOfPages = (int) Math.ceil(rowCount * 1d / rows); this.setFirst((numberOfPages-1) * rows);
Fixed negative first in case rowCount is 0.
diff --git a/rootfs/diff.go b/rootfs/diff.go index <HASH>..<HASH> 100644 --- a/rootfs/diff.go +++ b/rootfs/diff.go @@ -44,7 +44,7 @@ func CreateDiff(ctx context.Context, snapshotID string, sn snapshots.Snapshotter return ocispec.Descriptor{}, err } - lowerKey := fmt.Sprintf("%s-parent-view", info.Parent) + lowerKey := fmt.Sprintf("%s-parent-view-%s", info.Parent, uniquePart()) lower, err := sn.View(ctx, lowerKey, info.Parent) if err != nil { return ocispec.Descriptor{}, err @@ -58,7 +58,7 @@ func CreateDiff(ctx context.Context, snapshotID string, sn snapshots.Snapshotter return ocispec.Descriptor{}, err } } else { - upperKey := fmt.Sprintf("%s-view", snapshotID) + upperKey := fmt.Sprintf("%s-view-%s", snapshotID, uniquePart()) upper, err = sn.View(ctx, upperKey, snapshotID) if err != nil { return ocispec.Descriptor{}, err
fix: support simultaneous create diff for same parent snapshot
diff --git a/app/mailers/camaleon_cms/html_mailer.rb b/app/mailers/camaleon_cms/html_mailer.rb index <HASH>..<HASH> 100644 --- a/app/mailers/camaleon_cms/html_mailer.rb +++ b/app/mailers/camaleon_cms/html_mailer.rb @@ -16,8 +16,8 @@ class CamaleonCms::HtmlMailer < ActionMailer::Base # content='', from=nil, attachs=[], url_base='', current_site, template_name, layout_name, extra_data, format, cc_to def sender(email, subject='Hello', data = {}) - data[:current_site] = CamaleonCms::Site.main_site unless data[:current_site].present? - data[:current_site] = CamaleonCms::Site.find(data[:current_site]) if data[:current_site].is_a?(Integer) + data[:current_site] = CamaleonCms::Site.main_site.decorate unless data[:current_site].present? + data[:current_site] = CamaleonCms::Site.find(data[:current_site]).decorate if data[:current_site].is_a?(Integer) @current_site = data[:current_site] current_site = data[:current_site] data = {cc_to: [], from: current_site.get_option("email")}.merge(data)
send_mail added support for background jobs (sidekiq or similar)
diff --git a/lib/ravel.js b/lib/ravel.js index <HASH>..<HASH> 100644 --- a/lib/ravel.js +++ b/lib/ravel.js @@ -99,6 +99,7 @@ class Ravel extends AsyncEventEmitter { this.registerParameter('session max age', true, null); this.registerParameter('session secure', true, true); this.registerParameter('session rolling', true, false); + this.registerParameter('session samesite', true, null); // Passport parameters this.registerParameter('app route', false, '/'); this.registerParameter('login route', false, '/login'); @@ -275,9 +276,10 @@ class Ravel extends AsyncEventEmitter { httpOnly: true, /* (boolean) httpOnly or not (default true) */ signed: true, /* (boolean) signed or not (default true) */ secure: this.get('https') || this.get('session secure'), /* (boolean) secure or not (default true) */ - rolling: this.get('session rolling') /* (boolean) Force a session identifier cookie to be set on every response. + rolling: this.get('session rolling'), /* (boolean) Force a session identifier cookie to be set on every response. The expiration is reset to the original maxAge, resetting the expiration countdown. default is false */ + sameSite: this.get('session samesite') /** (string) session cookie sameSite options (default null, don't set it) */ }; app.use(session(sessionOptions, app));
Ensure samesite can be set on downstream applications
diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index <HASH>..<HASH> 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1971,6 +1971,15 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid $this->Status = "Unpublished"; $this->write(); + // Unpublish all virtual pages that point here + // This coupling to the subsites module is frustrating, but difficult to avoid. + if(class_exists('Subsite')) { + $virtualPages = Subsite::get_from_all_subsites('VirtualPage', "CopyContentFromID = {$this->ID}"); + } else { + $virtualPages = DataObject::get('VirtualPage', "CopyContentFromID = {$this->ID}"); + } + if ($virtualPages) foreach($virtualPages as $vp) $vp->doUnpublish(); + $this->extend('onAfterUnpublish'); }
MINOR when a parent page is unpublished, unpublish all related virtual pages, includes test coverage (from r<I>) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/<I>@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
diff --git a/core/pog/src/main/java/org/overture/pog/obligation/NonZeroObligation.java b/core/pog/src/main/java/org/overture/pog/obligation/NonZeroObligation.java index <HASH>..<HASH> 100644 --- a/core/pog/src/main/java/org/overture/pog/obligation/NonZeroObligation.java +++ b/core/pog/src/main/java/org/overture/pog/obligation/NonZeroObligation.java @@ -40,7 +40,7 @@ public class NonZeroObligation extends ProofObligation public NonZeroObligation( ILexLocation location, PExp exp, IPOContextStack ctxt) { - super(exp, POType.NON_ZERO, ctxt, exp.getLocation()); + super(exp, POType.NON_ZERO, ctxt, location); // exp <> 0
Changed NonZero location to the divide operator.
diff --git a/src/constants.js b/src/constants.js index <HASH>..<HASH> 100644 --- a/src/constants.js +++ b/src/constants.js @@ -6,8 +6,6 @@ module.exports = { regex: { digits: /\d+/, letters: /[a-zA-Z]+/, - uppercase: /[A-Z]+/, - lowercase: /[a-z]+/, symbols: /[`~\!@#\$%\^\&\*\(\)\-_\=\+\[\{\}\]\\\|;:'",<.>\/\?€£¥₹]+/, spaces: /[\s]+/ } diff --git a/src/lib.js b/src/lib.js index <HASH>..<HASH> 100644 --- a/src/lib.js +++ b/src/lib.js @@ -85,14 +85,14 @@ module.exports = { * Method to validate the presence of uppercase letters */ uppercase: function uppercase() { - return _process.call(this, regex.uppercase); + return this.password !== this.password.toLowerCase(); }, /** * Method to validate the presence of lowercase letters */ lowercase: function lowercase() { - return _process.call(this, regex.lowercase); + return this.password !== this.password.toUpperCase(); }, /**
Add support for non-english lower/upper case Fixes #<I>. Thanks @nikvaessen for proposing this.
diff --git a/salt/modules/grains.py b/salt/modules/grains.py index <HASH>..<HASH> 100644 --- a/salt/modules/grains.py +++ b/salt/modules/grains.py @@ -2,6 +2,8 @@ Control aspects of the grains data ''' +from math import floor + # Seed the grains dict so cython will build __grains__ = {} @@ -12,13 +14,16 @@ __outputter__ = { } -def _str_sanitizer(instr): - return "{0}{1}".format(instr[:-4], 'X' * 4) +def _serial_sanitizer(instr): + '''Replaces the last 1/4 of a string with X's''' + length = len(instr) + index = int(floor(length * .75)) + return "{0}{1}".format(instr[:index], 'X' * (length - index)) # A dictionary of grain -> function mappings for sanitizing grain output. This # is used when the 'sanitize' flag is given. _sanitizers = { - 'serialnumber': _str_sanitizer, + 'serialnumber': _serial_sanitizer, 'domain': lambda x: 'domain', 'fqdn': lambda x: 'minion.domain', 'host': lambda x: 'minion',
Tweak sanitizer to work with serials of any length
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -767,7 +767,11 @@ func doRequestFollowRedirects(req *Request, dst []byte, url string, c clientDoer break } statusCode = resp.Header.StatusCode() - if statusCode != StatusMovedPermanently && statusCode != StatusFound && statusCode != StatusSeeOther { + if statusCode != StatusMovedPermanently && + statusCode != StatusFound && + statusCode != StatusSeeOther && + statusCode != StatusTemporaryRedirect && + statusCode != StatusPermanentRedirect { break }
Fix supported redirect status codes Support the same redirect status codes as the golang standard library does: <URL>
diff --git a/gnosis/eth/ethereum_network.py b/gnosis/eth/ethereum_network.py index <HASH>..<HASH> 100644 --- a/gnosis/eth/ethereum_network.py +++ b/gnosis/eth/ethereum_network.py @@ -354,6 +354,7 @@ class EthereumNetwork(Enum): HARADEV_TESTNET = 197710212031 MILKOMEDA_C1_MAINNET = 2001 MILKOMEDA_C1_TESTNET = 200101 + MILKOMEDA_A1_TESTNET = 200202 CLOUDWALK_MAINNET = 2009 CLOUDWALK_TESTNET = 2008 ALAYA_DEV_TESTNET = 201030
Add milkomeda algorand testnet (#<I>)
diff --git a/src/components/Select.js b/src/components/Select.js index <HASH>..<HASH> 100644 --- a/src/components/Select.js +++ b/src/components/Select.js @@ -188,7 +188,7 @@ const Select = React.createClass({ type={this.state.isOpen ? 'caret-up' : 'caret-down'} /> </div> - {this.props.options.length ? this._renderOptions() : null} + {this.props.options.length || this.props.children ? this._renderOptions() : null} </div> {isMobile ? (
fix conditional for render select options to account for this.props.children
diff --git a/Str.php b/Str.php index <HASH>..<HASH> 100644 --- a/Str.php +++ b/Str.php @@ -38,13 +38,17 @@ class Str */ public static function after($subject, $search) { - if (! static::contains($subject, $search)) { + if ($search == '') { return $subject; } - $end = strpos($subject, $search) + static::length($search); + $pos = strpos($subject, $search); - return static::substr($subject, $end, static::length($subject)); + if ($pos === false) { + return $subject; + } + + return substr($subject, $pos + strlen($search)); } /**
Fixes and optimizations for Str::after (#<I>) * Correct results if there are multibyte characters before the search * Do not trigger warning if search is an empty string Also, should be significantly faster.
diff --git a/lib/yao/resources/server.rb b/lib/yao/resources/server.rb index <HASH>..<HASH> 100644 --- a/lib/yao/resources/server.rb +++ b/lib/yao/resources/server.rb @@ -42,6 +42,10 @@ module Yao::Resources action(id,"resize" => { "flavorRef" => flavor_id }) end + def self.add_security_group(server_id, security_group_name) + action(server_id, {"addSecurityGroup": {"name": security_group_name}}) + end + class << self alias :stop :shutoff
support AddSecurityGroup action
diff --git a/salt/fileserver/s3fs.py b/salt/fileserver/s3fs.py index <HASH>..<HASH> 100644 --- a/salt/fileserver/s3fs.py +++ b/salt/fileserver/s3fs.py @@ -77,7 +77,7 @@ import salt.fileserver as fs import salt.modules import salt.utils import salt.utils.s3 as s3 -import six +import salt.utils.six as six from six.moves import filter log = logging.getLogger(__name__)
Replaced import six in file /salt/fileserver/s3fs.py
diff --git a/lib/poolparty/base_packages/poolparty.rb b/lib/poolparty/base_packages/poolparty.rb index <HASH>..<HASH> 100644 --- a/lib/poolparty/base_packages/poolparty.rb +++ b/lib/poolparty/base_packages/poolparty.rb @@ -40,7 +40,7 @@ module PoolParty has_gempackage(:name => "poolparty-latest", :download_url => "http://github.com/auser/poolparty/tree/master%2Fpkg%2Fpoolparty-latest.gem?raw=true", :requires => [get_gempackage("ruby2ruby"), get_gempackage("RubyInline"), get_gempackage("ParseTree")]) - has_exec(:name => "build_messenger", :command => ". /etc/profile && server-build-messenger", :requires => get_gempackage("poolparty")) + has_exec(:name => "build_messenger", :command => ". /etc/profile && server-build-messenger", :requires => get_gempackage("poolparty-latest")) has_exec(:name => "start_node", :command => ". /etc/profile && server-start-node", :requires => get_exec("build_messenger")) end
Ensures that poolparty is installed before trying to start the messenger
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index <HASH>..<HASH> 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -717,7 +717,6 @@ class SFTPClient(BaseSFTP, ClosingContextManager): .. versionchanged:: 1.7.4 Added the ``callback`` param """ - file_size = self.stat(remotepath).st_size with open(localpath, 'wb') as fl: size = self.getfo(remotepath, fl, callback) s = os.stat(localpath)
Remove vestigial extra 'stat' call in SFTPClient.get() Was apparently not removed when getfo() was born.
diff --git a/Generative-Adversarial-Networks/pygan/generativemodel/conditional_generative_model.py b/Generative-Adversarial-Networks/pygan/generativemodel/conditional_generative_model.py index <HASH>..<HASH> 100644 --- a/Generative-Adversarial-Networks/pygan/generativemodel/conditional_generative_model.py +++ b/Generative-Adversarial-Networks/pygan/generativemodel/conditional_generative_model.py @@ -5,7 +5,7 @@ from abc import abstractmethod class ConditionalGenerativeModel(GenerativeModel): ''' - Generate samples based on the conditonal noise prior. + Generate samples based on the conditional noise prior. `GenerativeModel` that has a `Conditioner`, where the function of `Conditioner` is a conditional mechanism to use previous knowledge @@ -16,7 +16,7 @@ class ConditionalGenerativeModel(GenerativeModel): This model observes not only random noises but also any other prior information as a previous knowledge and outputs feature points. - Dut to the `Conditoner`, this model has the capacity to exploit + Dut to the `Conditioner`, this model has the capacity to exploit whatever prior knowledge that is available and can be represented as a matrix or tensor.
Update for pre learning, typo, and verbose.
diff --git a/lib/rom/lint/repository.rb b/lib/rom/lint/repository.rb index <HASH>..<HASH> 100644 --- a/lib/rom/lint/repository.rb +++ b/lib/rom/lint/repository.rb @@ -22,6 +22,11 @@ module ROM # @api public attr_reader :uri + # Repository instance used in lint tests + # + # @api private + attr_reader :repository_instance + # Create a repository linter # # @param [Symbol] identifier @@ -66,11 +71,6 @@ module ROM private - # Repository instance - # - # @api private - attr_reader :repository_instance - # Setup repository instance # # @api private
Make repository_instance public in Lint::Repository It's still tagged as `private` via YARD tag which OK. After this commit that warning is gone: rom/lib/rom/lint/repository.rb:<I>: warning: private attribute?
diff --git a/util/src/main/java/org/vesalainen/fx/PreferencesBindings.java b/util/src/main/java/org/vesalainen/fx/PreferencesBindings.java index <HASH>..<HASH> 100644 --- a/util/src/main/java/org/vesalainen/fx/PreferencesBindings.java +++ b/util/src/main/java/org/vesalainen/fx/PreferencesBindings.java @@ -92,6 +92,11 @@ public class PreferencesBindings Property<E> enumProperty = getEnumProperty(key, def); return Bindings.createObjectBinding(()->enumProperty.getValue(), enumProperty); } + public <T> ObjectBinding<T> createObjectBinding(String key, T def, StringConverter<T> converter) + { + Property<T> property = getObjectProperty(key, def, converter); + return Bindings.createObjectBinding(()->property.getValue(), property); + } public <T> void bindBiDirectional(String key, T def, Property<T> property, StringConverter<T> converter) { Bindings.bindBidirectional(property, getObjectProperty(key, def, converter));
Added createObjectBinding
diff --git a/app/models/content_type.rb b/app/models/content_type.rb index <HASH>..<HASH> 100644 --- a/app/models/content_type.rb +++ b/app/models/content_type.rb @@ -6,6 +6,7 @@ class ContentType < ActiveRecord::Base acts_as_paranoid validates :name, :creator, presence: true + validates :name, uniqueness: true after_save :rebuild_content_items_index belongs_to :creator, class_name: "User" @@ -25,7 +26,7 @@ class ContentType < ActiveRecord::Base def content_items_index_name content_type_name_sanitized = name.parameterize('_') - "#{Rails.env}_content_type_#{content_type_name_sanitized}_#{id}_content_items" + "#{Rails.env}_content_type_#{content_type_name_sanitized}_content_items" end def wizard_decorator
Content Type name now must validate uniqueness, modify mapping to reflect
diff --git a/mapchete/io/raster.py b/mapchete/io/raster.py index <HASH>..<HASH> 100644 --- a/mapchete/io/raster.py +++ b/mapchete/io/raster.py @@ -162,12 +162,12 @@ def _get_warped_array( dst_nodata = src.nodata if dst_nodata is None else dst_nodata with WarpedVRT( src, - dst_crs=dst_crs, + crs=dst_crs, src_nodata=src_nodata, - dst_nodata=dst_nodata, - dst_width=dst_shape[-2], - dst_height=dst_shape[-1], - dst_transform=Affine( + nodata=dst_nodata, + width=dst_shape[-2], + height=dst_shape[-1], + transform=Affine( (dst_bounds[2] - dst_bounds[0]) / dst_shape[-2], 0, dst_bounds[0], 0, (dst_bounds[1] - dst_bounds[3]) / dst_shape[-1],
rename kwargs to be compliant with rasterio <I>
diff --git a/celerymon/handlers/api.py b/celerymon/handlers/api.py index <HASH>..<HASH> 100644 --- a/celerymon/handlers/api.py +++ b/celerymon/handlers/api.py @@ -1,6 +1,7 @@ from __future__ import absolute_import from functools import wraps +import types import anyjson from tornado.web import RequestHandler, HTTPError @@ -16,6 +17,8 @@ def JSON(fun): @wraps(fun) def _write_json(self, *args, **kwargs): content = fun(self, *args, **kwargs) + if isinstance(content, types.GeneratorType): + content = list(content) self.write(anyjson.serialize(content)) return _write_json
unrolling generators before json encoding
diff --git a/bootstrap_py/docs.py b/bootstrap_py/docs.py index <HASH>..<HASH> 100644 --- a/bootstrap_py/docs.py +++ b/bootstrap_py/docs.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- """bootstrap_py.docs.""" +import os.path import shlex import subprocess @@ -35,4 +36,13 @@ def build_sphinx(pkg_data, projectdir): version=version, release=pkg_data.version, projectdir=projectdir) - return subprocess.call(shlex.split(args)) + if subprocess.call(shlex.split(args)) is 0: + _touch_gitkeep(projectdir) + + +def _touch_gitkeep(docs_path): + with open(os.path.join(docs_path, + 'source', + '_static', + '.gitkeep'), 'w') as fobj: + fobj.write('')
Adds touching docs/source/_static/.gitkeep.
diff --git a/field/__init__.py b/field/__init__.py index <HASH>..<HASH> 100644 --- a/field/__init__.py +++ b/field/__init__.py @@ -33,6 +33,19 @@ parser.add_argument( '-d', '--delimiter', default=None, help='delimiter between fields', type=str) + +def split_lines(filehandle, delim): + for line in filehandle: + yield line.strip('\n').split(delim) + + +def extract_fields(filehandle, delim, columns): + lines = split_lines(filehandle, delim) + for line in lines: + if max(columns) <= len(line): + yield (line[c-1] for c in columns) + + def main(): """ Main Entry Point @@ -47,8 +60,7 @@ def main(): print line, exit(0) - lines = (line.strip('\n').split(delim) for line in filehandle) - fields = ((line[c-1] for c in columns) for line in lines if max(columns) <= len(line)) + fields = extract_fields(filehandle, delim, columns) for line in fields: print ' '.join(line)
Expand single line generators into functions.
diff --git a/src/Common/QueryConnector.php b/src/Common/QueryConnector.php index <HASH>..<HASH> 100644 --- a/src/Common/QueryConnector.php +++ b/src/Common/QueryConnector.php @@ -30,4 +30,5 @@ class QueryConnector const MATCH = 'match'; const RANGE = 'range'; const TERMS = 'terms'; + const NAME_WILDCARD = 'wildcard'; }
<I> - Added additional constant.
diff --git a/web/concrete/core/controllers/blocks/content.php b/web/concrete/core/controllers/blocks/content.php index <HASH>..<HASH> 100644 --- a/web/concrete/core/controllers/blocks/content.php +++ b/web/concrete/core/controllers/blocks/content.php @@ -98,14 +98,14 @@ public static function replaceImagePlaceHolderOnImport($match) { $filename = $match[1]; $db = Loader::db(); - $fID = $db->GetOne('select fID from FileVersions where filename = ?', array($filename)); + $fID = $db->GetOne('select fID from FileVersions where fvFilename = ?', array($filename)); return '{CCM:FID_' . $fID . '}'; } public static function replaceFilePlaceHolderOnImport($match) { $filename = $match[1]; $db = Loader::db(); - $fID = $db->GetOne('select fID from FileVersions where filename = ?', array($filename)); + $fID = $db->GetOne('select fID from FileVersions where fvFilename = ?', array($filename)); return '{CCM:FID_DL_' . $fID . '}'; }
fixing image and file in content importer Former-commit-id: <I>f<I>af<I>d<I>f<I>a<I>a1afc<I>
diff --git a/test/api.js b/test/api.js index <HASH>..<HASH> 100644 --- a/test/api.js +++ b/test/api.js @@ -65,7 +65,7 @@ describe('Module API', () => { }); }); - describe('_()', () => { + describe('__()', () => { it('should return en translations as expected', () => { i18n.setLocale('en');
api tests ported from i<I>n-node
diff --git a/hugolib/site.go b/hugolib/site.go index <HASH>..<HASH> 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -314,7 +314,7 @@ func (s *Site) CreatePages() (err error) { panic(fmt.Sprintf("s.Source not set %s", s.absContentDir())) } if len(s.Source.Files()) < 1 { - return fmt.Errorf("No source files found in %s", s.absContentDir()) + return } var wg sync.WaitGroup
allow site to be built with empty content Build the site even if there isn't anything in the content directory.
diff --git a/yowsup/common/tools.py b/yowsup/common/tools.py index <HASH>..<HASH> 100644 --- a/yowsup/common/tools.py +++ b/yowsup/common/tools.py @@ -82,7 +82,9 @@ class WATools: b64Hash = base64.b64encode(sha1.digest()) return b64Hash if type(b64Hash) is str else b64Hash.decode() + class StorageTools: + NAME_CONFIG = "config.json" @staticmethod def constructPath(*path): @@ -129,6 +131,13 @@ class StorageTools: def getIdentity(cls, phone): return cls.readPhoneData(phone, 'id') + @classmethod + def writePhoneConfig(cls, phone, config): + cls.writePhoneData(phone, cls.NAME_CONFIG, config) + + @classmethod + def readPhoneConfig(cls, phone, config): + return cls.readPhoneData(phone, cls.NAME_CONFIG) class TimeTools: @staticmethod
[feat] add read/write phone config to StorageTools
diff --git a/scot/parallel.py b/scot/parallel.py index <HASH>..<HASH> 100644 --- a/scot/parallel.py +++ b/scot/parallel.py @@ -21,14 +21,14 @@ def parallel_loop(func, n_jobs=1, verbose=1): ----- Execution of the main script must be guarded with `if __name__ == '__main__':` when using parallelization. """ - try: - if n_jobs: - from joblib import Parallel, delayed - except ImportError: + if n_jobs: try: - from sklearn.externals.joblib import Parallel, delayed + from joblib import Parallel, delayed except ImportError: - n_jobs = None + try: + from sklearn.externals.joblib import Parallel, delayed + except ImportError: + n_jobs = None if not n_jobs: if verbose is not None and verbose >= 10:
fixed joblib import and added debug output
diff --git a/tests/Kwf/Exception/ExceptionTest.php b/tests/Kwf/Exception/ExceptionTest.php index <HASH>..<HASH> 100644 --- a/tests/Kwf/Exception/ExceptionTest.php +++ b/tests/Kwf/Exception/ExceptionTest.php @@ -81,6 +81,7 @@ class Kwf_Exception_ExceptionTest extends Kwf_Test_TestCase private function _processException($exception) { + Kwf_Benchmark::disable(); $view = new Kwf_Exception_TestView(); Kwf_Debug::setView($view); Kwf_Debug::handleException($exception, true);
no benchmark-output on exception-tests i don't know why it started to output, this was the easiest way to stop it
diff --git a/examples/full.js b/examples/full.js index <HASH>..<HASH> 100644 --- a/examples/full.js +++ b/examples/full.js @@ -7,7 +7,7 @@ var proc = new ffmpeg('/path/to/your_movie.avi') // set target codec .withVideoCodec('divx') // set aspect ratio - .withAspectRatio('16:9') + .withAspect('16:9') // set size in percent .withSize('50%') // set fps @@ -25,4 +25,4 @@ var proc = new ffmpeg('/path/to/your_movie.avi') // save to file .saveToFile('/path/to/your_target.avi', function(retcode, error){ console.log('file has been converted succesfully'); - }); \ No newline at end of file + });
Updated the example to use right API method to set aspect-ratio
diff --git a/configuration/configuration.go b/configuration/configuration.go index <HASH>..<HASH> 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -311,6 +311,10 @@ func parseV0_1Registry(in []byte) (*Configuration, error) { config.Reporting.NewRelic.Name = newRelicName } + if httpAddr, ok := envMap["REGISTRY_HTTP_ADDR"]; ok { + config.HTTP.Addr = httpAddr + } + return (*Configuration)(&config), nil }
Allows HTTP bind address to be overridden by an environment variable Uses REGISTRY_HTTP_ADDR
diff --git a/backtrader/analyzers/tradeanalyzer.py b/backtrader/analyzers/tradeanalyzer.py index <HASH>..<HASH> 100644 --- a/backtrader/analyzers/tradeanalyzer.py +++ b/backtrader/analyzers/tradeanalyzer.py @@ -52,9 +52,21 @@ class TradeAnalyzer(Analyzer): - Long/Short Total/Average/Max/Min - Won/Lost Total/Average/Max/Min + + Note: + + The analyzer uses an "auto"dict for the fields, which means that if no + trades are executed, no statistics will be generated. + + In that case there will be a single field/subfield in the dictionary + returned by ``get_analysis``, namely: + + - dictname['total']['total'] which will have a value of 0 (the field is + also reachable with dot notation dictname.total.total ''' def start(self): self.trades = AutoOrderedDict() + self.trades.total.total = 0 def stop(self): self.trades._close()
Fixes #<I> by adding a default of total.total = 0 to indicate that no trades were executed and therefore no statistics
diff --git a/Controller/PageAdminController.php b/Controller/PageAdminController.php index <HASH>..<HASH> 100644 --- a/Controller/PageAdminController.php +++ b/Controller/PageAdminController.php @@ -526,16 +526,17 @@ class PageAdminController extends CRUDController try { $layoutBlock = $repo->find($blockId); + if ($layoutBlock) { + $em = $this->getDoctrine()->getManager(); + $em->persist($layoutBlock); + $em->remove($layoutBlock); + $em->flush(); + } } catch (\Exception $e) { $message = $e->getMessage(); return new JsonResponse(array('messageStatus' => 'error', 'message' => $message)); } - - $em = $this->getDoctrine()->getManager(); - $em->persist($layoutBlock); - $em->remove($layoutBlock); - $em->flush(); } return new JsonResponse(array(
fix bug when deleting layout blocks that have not yet been persisted to the db
diff --git a/src/main/java/com/couchbase/lite/Database.java b/src/main/java/com/couchbase/lite/Database.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/couchbase/lite/Database.java +++ b/src/main/java/com/couchbase/lite/Database.java @@ -3263,6 +3263,7 @@ public class Database { Log.e(Database.TAG, "Error deleting revisions", e); return false; } + revsPurged = new ArrayList<String>(); revsPurged.add("*"); } else { // Iterate over all the revisions of the doc, in reverse sequence order.
fix in Database.purgeRevisions
diff --git a/react/Textarea/Textarea.demo.js b/react/Textarea/Textarea.demo.js index <HASH>..<HASH> 100644 --- a/react/Textarea/Textarea.demo.js +++ b/react/Textarea/Textarea.demo.js @@ -71,13 +71,6 @@ export default { }) }, { - label: 'Secondary Label', - transformProps: props => ({ - ...props, - secondaryLabel: '(secondary)' - }) - }, - { label: 'Show Count', transformProps: props => ({ ...props, diff --git a/react/private/FieldMessage/FieldMessage.demo.js b/react/private/FieldMessage/FieldMessage.demo.js index <HASH>..<HASH> 100644 --- a/react/private/FieldMessage/FieldMessage.demo.js +++ b/react/private/FieldMessage/FieldMessage.demo.js @@ -1,18 +1,5 @@ export default [ { - label: 'Secondary', - type: 'checklist', - states: [ - { - label: 'Secondary message', - transformProps: props => ({ - ...props, - messageProps: { secondary: true } - }) - } - ] - }, - { label: 'Message', type: 'radio', states: [
docs(site): Clean up form element demos (#<I>) Some form element demos were starting to collect a few too many options, but some of them were either an edge case or completely redundant.
diff --git a/javascript/ajaxselect2.init.js b/javascript/ajaxselect2.init.js index <HASH>..<HASH> 100644 --- a/javascript/ajaxselect2.init.js +++ b/javascript/ajaxselect2.init.js @@ -2,6 +2,7 @@ $.entwine("select2", function($) { $("input.ajaxselect2").entwine({ onmatch: function() { + this._super(); var self = this; self.select2({ multiple: self.data('multiple'), diff --git a/javascript/select2.init.js b/javascript/select2.init.js index <HASH>..<HASH> 100644 --- a/javascript/select2.init.js +++ b/javascript/select2.init.js @@ -1,10 +1,10 @@ -jQuery.entwine("select2", function($) { - - $("select.select2").entwine({ - onmatch: function() { - var self = this; - self.select2(); - }, +(function($) { + $.entwine("select2", function($) { + $("select.select2").entwine({ + onmatch: function() { + this._super(); + this.select2(); + } + }); }); -}); - +})(jQuery); \ No newline at end of file
fix(Entwine): Add this._super() to avoid weird breaking issues, Change select2.init.js to be consistent with ajaxselect2.init.js formatting
diff --git a/lib/ffi-geos/coordinate_sequence.rb b/lib/ffi-geos/coordinate_sequence.rb index <HASH>..<HASH> 100644 --- a/lib/ffi-geos/coordinate_sequence.rb +++ b/lib/ffi-geos/coordinate_sequence.rb @@ -160,6 +160,10 @@ module Geos }.read_int end + def to_point + Geos.create_point(self) + end + def to_linear_ring Geos.create_linear_ring(self) end diff --git a/test/coordinate_sequence_tests.rb b/test/coordinate_sequence_tests.rb index <HASH>..<HASH> 100644 --- a/test/coordinate_sequence_tests.rb +++ b/test/coordinate_sequence_tests.rb @@ -123,6 +123,11 @@ class CoordinateSequenceTests < Test::Unit::TestCase end end + def test_to_point + cs = Geos::CoordinateSequence.new([5,7]) + assert_equal('POINT (5 7)', write(cs.to_point, :trim => true)) + end + def test_to_to_linear_ring cs = Geos::CoordinateSequence.new([ [ 0, 0 ],
Add CoordinateSequence#to_point support to match the other geometry constructors.
diff --git a/Classes/TestingFramework.php b/Classes/TestingFramework.php index <HASH>..<HASH> 100644 --- a/Classes/TestingFramework.php +++ b/Classes/TestingFramework.php @@ -9,6 +9,7 @@ use TYPO3\CMS\Core\Database\Query\QueryBuilder; use TYPO3\CMS\Core\TimeTracker\NullTimeTracker; use TYPO3\CMS\Core\TimeTracker\TimeTracker; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Core\Utility\RootlineUtility; use TYPO3\CMS\Core\Utility\VersionNumberUtility; use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication; use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; @@ -945,7 +946,7 @@ final class Tx_Oelib_TestingFramework } } - \TYPO3\CMS\Core\Utility\RootlineUtility::purgeCaches(); + RootlineUtility::purgeCaches(); } /**
[CLEANUP] Import the RootlineUtility in TestingFramework (#<I>)
diff --git a/helpers/config.go b/helpers/config.go index <HASH>..<HASH> 100644 --- a/helpers/config.go +++ b/helpers/config.go @@ -31,11 +31,10 @@ type Config struct { PersistentAppOrg string `json:"persistent_app_org"` PersistentAppQuotaName string `json:"persistent_app_quota_name"` - SkipSSLValidation bool `json:"skip_ssl_validation"` - Backend string `json:"backend"` - IncludeRouteServices bool `json:"include_route_services"` - IncludeDiegoDocker bool `json:"include_diego_docker"` - IncludeTasks bool `json:"include_tasks"` + SkipSSLValidation bool `json:"skip_ssl_validation"` + Backend string `json:"backend"` + IncludeDiegoDocker bool `json:"include_diego_docker"` + IncludeTasks bool `json:"include_tasks"` ArtifactsDirectory string `json:"artifacts_directory"`
Remove include_route_services property from config [#<I>]
diff --git a/docs/next/postcss.config.js b/docs/next/postcss.config.js index <HASH>..<HASH> 100644 --- a/docs/next/postcss.config.js +++ b/docs/next/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { plugins: { - "@tailwindcss/jit": {}, + tailwindcss: {}, autoprefixer: {}, }, };
[docs-infra] Switch css compilation back to purge Summary: Title. JIT might be causing the weird CSS issues we're seeing. Test Plan: bk Reviewers: yuhan Reviewed By: yuhan Differential Revision: <URL>
diff --git a/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/patterns/Match.java b/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/patterns/Match.java index <HASH>..<HASH> 100644 --- a/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/patterns/Match.java +++ b/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/patterns/Match.java @@ -419,6 +419,9 @@ public class Match { * @return Converted string. */ private String convertCase(final String s) { + if (StringTools.isEmpty(s)) { + return s; + } String token = s; switch (caseConversionType) { case NONE:
add emptiness test to avoid nullpointer etc. errors in case of errors
diff --git a/tests/Classes/PHP80.php b/tests/Classes/PHP80.php index <HASH>..<HASH> 100644 --- a/tests/Classes/PHP80.php +++ b/tests/Classes/PHP80.php @@ -6,6 +6,7 @@ namespace Brick\Reflection\Tests\Classes; use Brick\Reflection\Tests\A; use Brick\Reflection\Tests\Attributes\ExpectFunctionSignature; +use Closure; use stdClass; const TEST = 1; @@ -93,6 +94,12 @@ abstract class PHP80 #[ExpectFunctionSignature('public function & returnWithReference(): void')] public function & returnWithReference(): void {} + #[ExpectFunctionSignature('public function iterables(iterable $a, \stdClass|iterable $b): iterable')] + public function iterables(iterable $a, stdClass|iterable $b): iterable {} + + #[ExpectFunctionSignature('public function callables(callable $a, \Closure|callable $b): callable')] + public function callables(callable $a, Closure|callable $b): callable {} + #[ExpectFunctionSignature( 'abstract protected static function & kitchenSink(' . '$a, ' .
Tests for iterable & callable
diff --git a/lib/middleware/copyright.js b/lib/middleware/copyright.js index <HASH>..<HASH> 100644 --- a/lib/middleware/copyright.js +++ b/lib/middleware/copyright.js @@ -18,11 +18,11 @@ var parse = require('parse-copyright'); */ module.exports = function copyright_(verb) { + var copyright = verb.get('data.copyright'); var readme = verb.files('README.md'); var parsed = false; - var copyright; - if (!parsed && readme.length) { + if (!parsed && !copyright && readme.length) { var str = fs.readFileSync(readme[0], 'utf8'); var res = update(str); if (res) { @@ -32,6 +32,10 @@ module.exports = function copyright_(verb) { } return function (file, next) { + if (typeof copyright === 'string') return next(); + if (typeof copyright === 'object' && Object.keys(copyright).length) { + return next(); + } copyright = verb.get('data.copyright') || parse(file.content)[0] || {}; verb.set('data.copyright', copyright); file.data.copyright = copyright;
skip if copyright is defined.
diff --git a/salt/modules/win_repo.py b/salt/modules/win_repo.py index <HASH>..<HASH> 100644 --- a/salt/modules/win_repo.py +++ b/salt/modules/win_repo.py @@ -18,7 +18,7 @@ import salt.output import salt.utils import salt.loader import salt.template -from salt.exceptions import CommandExecutionError +from salt.exceptions import CommandExecutionError, SaltRenderError from salt.runners.winrepo import ( genrepo as _genrepo, update_git_repos as _update_git_repos @@ -165,7 +165,7 @@ def show_sls(name, saltenv='base'): __opts__['renderer']) # Dump return the error if any - except SaltRenderError as exc: # pylint: disable=E0602 + except SaltRenderError as exc: log.debug('Failed to compile {0}.'.format(sls_file)) log.debug('Error: {0}.'.format(exc)) config['Message'] = 'Failed to compile {0}'.format(sls_file)
I incorrectly ignored a lint error in a previous PR
diff --git a/src/StaticGeometry.js b/src/StaticGeometry.js index <HASH>..<HASH> 100644 --- a/src/StaticGeometry.js +++ b/src/StaticGeometry.js @@ -469,7 +469,7 @@ define(function(require) { generateBarycentric: function() { - if (! this.isUniqueVertex()) { + if (!this.isUniqueVertex()) { this.generateUniqueVertex(); } @@ -484,7 +484,7 @@ define(function(require) { for (var i = 0; i < faces.length;) { for (var j = 0; j < 3; j++) { var ii = faces[i++]; - array[ii + j] = 1; + array[ii * 3 + j] = 1; } } this.dirty();
StaticGeometry#generateBarycentric fix
diff --git a/PyFunceble/__init__.py b/PyFunceble/__init__.py index <HASH>..<HASH> 100644 --- a/PyFunceble/__init__.py +++ b/PyFunceble/__init__.py @@ -910,17 +910,6 @@ def _command_line(): # pragma: no cover pylint: disable=too-many-branches,too-m ) PARSER.add_argument( - "--multiprocess", - action="store_true", - help="Switch the value of the multiprocess usage. %s" - % ( - CURRENT_VALUE_FORMAT - + repr(CONFIGURATION["multiprocessing"]) - + Style.RESET_ALL - ), - ) - - PARSER.add_argument( "-n", "--no-files", action="store_true", @@ -1273,11 +1262,6 @@ def _command_line(): # pragma: no cover pylint: disable=too-many-branches,too-m if ARGS.mining: CONFIGURATION.update({"mining": Preset().switch("mining")}) - if ARGS.multiprocess: - CONFIGURATION.update( - {"multiprocessing": Preset().switch("multiprocessing")} - ) - if ARGS.no_files: CONFIGURATION.update({"no_files": Preset().switch("no_files")})
Deletion of unneeded part (Might me reincluded in future version)
diff --git a/src/bitpay/OmnipayMerchant.php b/src/bitpay/OmnipayMerchant.php index <HASH>..<HASH> 100644 --- a/src/bitpay/OmnipayMerchant.php +++ b/src/bitpay/OmnipayMerchant.php @@ -12,14 +12,36 @@ namespace hiqdev\php\merchant\bitpay; use hiqdev\php\merchant\Helper; use hiqdev\php\merchant\RequestInterface; -use Omnipay\BitPay\Message\PurchaseRequest; -use Omnipay\BitPay\Message\PurchaseResponse; +use Omnipay\BitPay\Gateway; +use Omnipay\Common\GatewayInterface; /** * BitPay Omnipay Merchant class. */ class OmnipayMerchant extends \hiqdev\php\merchant\OmnipayMerchant { + /** + * @return Gateway|GatewayInterface + */ + public function getWorker() + { + return parent::getWorker(); + } + + /** + * @param array $data + * @return array + */ + public function prepareData(array $data) + { + return array_merge([ + 'token' => $data['purse'], + 'privateKey' => $data['secret'], + 'publicKey' => $data['secret2'], + 'testMode' => false + ], $data); + } + public function request($type, array $data) { if (!empty($data['inputs'])) {
Updated to use hiqdev/omnipay-bitpay
diff --git a/app/actions/prottable/probability.py b/app/actions/prottable/probability.py index <HASH>..<HASH> 100644 --- a/app/actions/prottable/probability.py +++ b/app/actions/prottable/probability.py @@ -1,12 +1,12 @@ -from app.dataformats import mzidtsv as mzidtsvdata +from app.dataformats import peptable as peptabledata from app.dataformats import prottable as prottabledata def add_nesvi_protein_probability(proteins, peptides, headerfields): protein_probs = {} for peptide in peptides: - protacc = peptide[mzidtsvdata.HEADER_MASTER_PROT] - pep = peptide[mzidtsvdata.HEADER_PEPTIDE_PEP] + protacc = peptide[peptabledata.HEADER_MASTERPROTEINS] + pep = peptide[peptabledata.HEADER_PEP] if ';' in protacc or pep in ['NA', False]: continue pep = float(pep)
Correct header names of peptide table in adding probability data to protein table
diff --git a/karma-minified.conf.js b/karma-minified.conf.js index <HASH>..<HASH> 100644 --- a/karma-minified.conf.js +++ b/karma-minified.conf.js @@ -37,7 +37,7 @@ module.exports = function (config) { ], // list of files to exclude - exclude: ['source-minified/smart-elements.js'], + exclude: ['source-minified/smart.elements.js'], // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
Update karma-minified.conf.js
diff --git a/lancet/cli.py b/lancet/cli.py index <HASH>..<HASH> 100644 --- a/lancet/cli.py +++ b/lancet/cli.py @@ -59,7 +59,7 @@ def get_transition(ctx, lancet, issue, to_status): def assign_issue(lancet, issue, username, active_status=None): with taskstatus('Assigning issue to you') as ts: assignee = issue.fields.assignee - if not assignee or assignee.key != username: + if not assignee or assignee.name != username: if issue.fields.status.name == active_status: ts.abort('Issue already active and not assigned to you') else: @@ -365,7 +365,7 @@ def pull_request(ctx, base_branch, open_pr): ts.abort('No working branch found') assignee = issue.fields.assignee - if not assignee or assignee.key != username: + if not assignee or assignee.name != username: ts.abort('Issue currently not assigned to you') # TODO: Check mergeability
Compare against the assignee name, not key.
diff --git a/lib/ronin/model/has_description.rb b/lib/ronin/model/has_description.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/model/has_description.rb +++ b/lib/ronin/model/has_description.rb @@ -27,8 +27,6 @@ module Ronin # Adds a `description` property to a model. # module HasDescription - include DataMapper::Types - def self.included(base) base.module_eval do include Ronin::Model diff --git a/lib/ronin/platform/cacheable.rb b/lib/ronin/platform/cacheable.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/platform/cacheable.rb +++ b/lib/ronin/platform/cacheable.rb @@ -107,7 +107,7 @@ module Ronin include Ronin::Model # The class-name of the cached object - property :type, DataMapper::Types::Discriminator + property :type, DataMapper::Property::Discriminator # The cached file of the object belongs_to :cached_file,
Do not use DataMapper::Types anymore, use DataMapper::Property instead.
diff --git a/graph/Transitive_Closure_DFS.py b/graph/Transitive_Closure_DFS.py index <HASH>..<HASH> 100644 --- a/graph/Transitive_Closure_DFS.py +++ b/graph/Transitive_Closure_DFS.py @@ -40,7 +40,6 @@ class Graph: print(self.tc) -# Create a graph given in the above diagram g = Graph(4) g.addEdge(0, 1) g.addEdge(0, 2)
Update Transitive_Closure_DFS.py
diff --git a/src/main/java/net/openhft/chronicle/map/NodeDiscoveryHostPortBroadcaster.java b/src/main/java/net/openhft/chronicle/map/NodeDiscoveryHostPortBroadcaster.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/openhft/chronicle/map/NodeDiscoveryHostPortBroadcaster.java +++ b/src/main/java/net/openhft/chronicle/map/NodeDiscoveryHostPortBroadcaster.java @@ -20,6 +20,9 @@ import static net.openhft.chronicle.map.NodeDiscoveryHostPortBroadcaster.BOOTSTR import static net.openhft.chronicle.map.NodeDiscoveryHostPortBroadcaster.LOG; /** + * Broad cast the nodes host ports and identifiers over UDP, to make it easy to join a grid of remote nodes + * just by name, this functionality requires UDP + * * @author Rob Austin. */ public class NodeDiscoveryHostPortBroadcaster extends UdpChannelReplicator { @@ -479,18 +482,15 @@ class BytesExternalizableImpl implements BytesExternalizable { public void sendBootStrap() { bootstrapRequired.set(true); - } public void add(InetSocketAddress interfaceAddress) { allNodes.add(interfaceAddress); - } public void add(byte identifier) { allNodes.activeIdentifierBitSet().set(identifier); - }
HCOLL-<I> ( release draft cut of the code so that I can test it across my network )
diff --git a/app/controllers/admin/admin_controller.rb b/app/controllers/admin/admin_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/admin/admin_controller.rb +++ b/app/controllers/admin/admin_controller.rb @@ -2,14 +2,14 @@ module Admin # Public: Base admin system controller. Contains authentication, a dashboard, and a # style guide. Anything that must affect all admin pages should be added here. class AdminController < ::ApplicationController - # An AdminMiddleware module can be added to change any part of the - # base AdminController class' functionality. - try(:include, ::AdminMiddleware) - before_action :authenticate_admin! layout "admin/application" + # An AdminMiddleware module can be added to change any part of the base + # AdminController class functionality + try(:include, ::AdminMiddleware) + def dashboard render 'admin/dashboard' end
Moves AdminMiddleware inclusion below layout definition in AdminController in order to allow layout overrides
diff --git a/include/datawrappers/connectionwrapper_class.php b/include/datawrappers/connectionwrapper_class.php index <HASH>..<HASH> 100644 --- a/include/datawrappers/connectionwrapper_class.php +++ b/include/datawrappers/connectionwrapper_class.php @@ -37,7 +37,7 @@ class ConnectionWrapper { function BeginTransaction($queryid) { return false; } function Commit($queryid) { return false; } function Rollback($queryid) { return false; } - function Quote($queryid, $str) { return $str; } + function Quote($queryid, $str) { return '"' . addslashes($str) . '"'; } // default fallback string quoting function GenerateIndex($indexby, $item, $separator=".") { $idxby = explode(",", $indexby); foreach ($idxby as $k) {
- Made default DataManager::quote() behavior more consistent with what should be expected
diff --git a/lib/amee/connection.rb b/lib/amee/connection.rb index <HASH>..<HASH> 100644 --- a/lib/amee/connection.rb +++ b/lib/amee/connection.rb @@ -298,7 +298,8 @@ module AMEE def cache_key(path) # We have to make sure cache keys don't get too long for the filesystem, # so we cut them off if they're too long and add a digest for uniqueness. - newpath = (path.length < 255) ? path : path.first(192)+Digest::MD5.hexdigest(path) + newpath = path.gsub(/[^0-9a-z\/]/i, '') + newpath = (newpath.length < 255) ? newpath : newpath.first(192)+Digest::MD5.hexdigest(newpath) (@server+newpath) end diff --git a/spec/cache_spec.rb b/spec/cache_spec.rb index <HASH>..<HASH> 100644 --- a/spec/cache_spec.rb +++ b/spec/cache_spec.rb @@ -75,6 +75,11 @@ describe AMEE::Connection do c.expire_cache i = c.item :label => 'biodiesel' end + + it "removes special characters from cache keys" do + setup_connection + @connection.send(:cache_key, "/%cache/$4/%20test").should eql 'server.example.com/cache/4/20test' + end describe 'and automatic invalidation' do
Remove special chars from cache keys for Rails 3 compatibility. SDK-<I>
diff --git a/geomdl/BSpline.py b/geomdl/BSpline.py index <HASH>..<HASH> 100644 --- a/geomdl/BSpline.py +++ b/geomdl/BSpline.py @@ -324,7 +324,7 @@ class Curve(object): return ret_check # Saves evaluated curve points to a CSV file - def save_surfpts_to_csv(self, filename=""): + def save_curvepts_to_csv(self, filename=""): """ Saves evaluated curve points to a comma separated text file. :param filename: output file name
Corrected function name to save_curvepts_to_csv
diff --git a/lib/generate/fs.js b/lib/generate/fs.js index <HASH>..<HASH> 100644 --- a/lib/generate/fs.js +++ b/lib/generate/fs.js @@ -16,7 +16,8 @@ var getFiles = function(path) { // Add extra rules to ignore common folders ig.addIgnoreRules([ - '.git/' + '.git/', + '.gitignore', ], '__custom_stuff'); // Push each file to our list
Ignore .gitignore file by default in fs.list Partial fix of #<I>
diff --git a/bcbio/variation/freebayes.py b/bcbio/variation/freebayes.py index <HASH>..<HASH> 100644 --- a/bcbio/variation/freebayes.py +++ b/bcbio/variation/freebayes.py @@ -48,8 +48,7 @@ def run_freebayes(align_bams, ref_file, config, dbsnp=None, region=None, with file_transaction(out_file) as tx_out_file: cl = [config_utils.get_program("freebayes", config), "-b", align_bam, "-v", tx_out_file, "-f", ref_file, - "--left-align-indels", "--use-mapping-quality", - "--min-alternate-count", "2"] + "--use-mapping-quality", "--min-alternate-count", "2"] cl += _freebayes_options_from_config(config["algorithm"], out_file, region) subprocess.check_call(cl) _remove_freebayes_refalt_dups(out_file)
Removed --left-align-indels option. It is the default in <I> and throws an error if passed in.
diff --git a/core-bundle/src/Resources/contao/drivers/DC_Folder.php b/core-bundle/src/Resources/contao/drivers/DC_Folder.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Resources/contao/drivers/DC_Folder.php +++ b/core-bundle/src/Resources/contao/drivers/DC_Folder.php @@ -935,7 +935,7 @@ class DC_Folder extends \DataContainer implements \listable, \editable // Upload the files $arrUploaded = $objUploader->uploadTo($strFolder); - if (empty($arrUploaded)) + if (empty($arrUploaded) && !$objUploader->hasError()) { \Message::addError($GLOBALS['TL_LANG']['ERR']['emptyUpload']); $this->reload();
[Core] Fix the file upload error message (see #<I>).
diff --git a/packages/razzle/config/createConfigAsync.js b/packages/razzle/config/createConfigAsync.js index <HASH>..<HASH> 100644 --- a/packages/razzle/config/createConfigAsync.js +++ b/packages/razzle/config/createConfigAsync.js @@ -1022,7 +1022,7 @@ module.exports = ( } if (razzleOptions.debug.config) { console.log(`Printing webpack config for ${target} target`); - console.log(util.inspect(webpackConfig, {depth: null})); + console.log(util.inspect(config, {depth: null})); } resolve(config); });
fix(razzle): webpackConfig undefined webpackConfig undefined, i should be config
diff --git a/src/animanager/add.py b/src/animanager/add.py index <HASH>..<HASH> 100644 --- a/src/animanager/add.py +++ b/src/animanager/add.py @@ -2,8 +2,6 @@ import logging from datetime import date from urllib.parse import urlencode from xml.etree import ElementTree -import html.parser -import re import sys from animanager import inputlib @@ -26,11 +24,7 @@ def main(config, name=None): if not name: name = input("Search for: ") response = ffrequest(mal_search + urlencode({'q': name})) - h = html.parser.HTMLParser() response = response.read().decode() - response = h.unescape(response) - # due to some bug, there are double entities? e.g. &amp;amp; - response = re.sub(r'&.+?;', '', response) tree = ElementTree.fromstring(response) found = [ [_get(e, k) for k in ('id', 'title', 'episodes', 'type')]
Remove weird hack in add.py It was put in there to fix a weird formatting problem in the past from MAL's XML.
diff --git a/tests/tests/lib/ezutils/ezmail_ezc_test.php b/tests/tests/lib/ezutils/ezmail_ezc_test.php index <HASH>..<HASH> 100644 --- a/tests/tests/lib/ezutils/ezmail_ezc_test.php +++ b/tests/tests/lib/ezutils/ezmail_ezc_test.php @@ -49,6 +49,9 @@ class eZMailEzcTest extends ezpTestCase */ public function testTipAFriend() { + $this->markTestSkipped( + 'smtp.ez.no is down for now' + ); $mail = new eZMail(); $mail->setSender( $this->adminEmail, $this->adminName ); $mail->setReceiver( $this->adminEmail, $this->adminName ); @@ -176,6 +179,9 @@ class eZMailEzcTest extends ezpTestCase public function testRegressionWrongPasswordCatchException() { + $this->markTestSkipped( + 'smtp.ez.no is down for now' + ); ezpINIHelper::setINISetting( 'site.ini', 'MailSettings', 'TransportPassword', 'wrong password' ); $mail = new eZMail(); $mail->setSender( $this->adminEmail, $this->adminName );
Skipped unit tests that relies on stmp.ez.no
diff --git a/lib/Thelia/Core/Template/Loop/ProductSaleElements.php b/lib/Thelia/Core/Template/Loop/ProductSaleElements.php index <HASH>..<HASH> 100644 --- a/lib/Thelia/Core/Template/Loop/ProductSaleElements.php +++ b/lib/Thelia/Core/Template/Loop/ProductSaleElements.php @@ -68,6 +68,7 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface, 'quantity', 'quantity_reverse', 'min_price', 'max_price', 'promo', 'new', + 'weight', 'weight_reverse', 'random' ) ) @@ -142,6 +143,12 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface, case "new": $search->orderByNewness(Criteria::DESC); break; + case "weight": + $search->orderByWeight(Criteria::ASC); + break; + case "weight_reverse": + $search->orderByWeight(Criteria::DESC); + break; case "random": $search->clearOrderByColumns(); $search->addAscendingOrderByColumn('RAND()');
add order by weight in loop product sale elements
diff --git a/llvmlite/tests/test_ir.py b/llvmlite/tests/test_ir.py index <HASH>..<HASH> 100644 --- a/llvmlite/tests/test_ir.py +++ b/llvmlite/tests/test_ir.py @@ -2066,7 +2066,7 @@ class TestConstant(TestBase): def test_non_nullable_int(self): constant = ir.Constant(ir.IntType(32), None).constant - assert constant == 0 + self.assertEqual(constant, 0) def test_structs(self): st1 = ir.LiteralStructType((flt, int1))
Use unit-test assertions instead of built-in