[ 
https://issues.apache.org/jira/browse/CB-6272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942466#comment-13942466
 ] 

ASF GitHub Bot commented on CB-6272:
------------------------------------

Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-plugman/pull/66#discussion_r10821101
  
    --- Diff: spec/install.spec.js ---
    @@ -348,13 +349,58 @@ describe('install', function() {
                     runs(function () {
                         installPromise( install('android', project, 
plugins['G']) );
                     });
    -                waitsFor(function () { return done; }, 'install promise 
never resolved', 500);
    +                waitsFor(function () { return done; }, 'install promise 
never resolved', 200);
                     runs(function () {
                         var install = common.spy.getInstall(emit);
            
                         expect(done.message).toEqual('Cyclic dependency from G 
to H');
                     });
    -            });                            
    +            });    
    +
    +            it('install subdir relative to top level plugin if no fetch 
meta', function() {
    +                runs(function () {
    +                    installPromise(install('android', project, 
plugins['B']));
    +                });
    +                waitsFor(function () { return done; }, 'install promise 
never resolved', 200);
    +                runs(function () {
    +                    var install = common.spy.getInstall(emit);
    +
    +                    expect(install).toEqual([
    +                        'Install start for "D" on android.',
    +                        'Install start for "E" on android.',
    +                        'Install start for "B" on android.'
    +                    ]);
    +                });
    +            });
    +
    +            it('install uses meta data (if available) of top level plugin 
source', function() {
    +                // Fake metadata so plugin 'B' appears from 'meta/B'
    +                var meta = require('../src/util/metadata');
    +                spyOn(meta, 'get_fetch_metadata').andCallFake(function(){  
                                                                                
                                                
    +                    return {
    +                        source: {type: 'dir', url: path.join(plugins['B'], 
'..', 'meta')}
    +                    };
    +                });
    +
    +                runs(function () {
    +                    installPromise(install('android', project, 
plugins['B']));
    +                });
    +                waitsFor(function () { return done; }, 'install promise 
never resolved', 200);
    +                runs(function () {
    +                    var install = common.spy.getInstall(emit);
    +
    +                    expect(install).toEqual([
    +                        'Install start for "D" on android.',
    +                        'Install start for "E" on android.',
    +                        'Install start for "B" on android.'
    +                    ]);
    +
    +                    var copy = common.spy.startsWith(emit, "Copying from");
    +                    expect(copy.length).toBe(3);
    +                    expect(copy[0].indexOf(path.normalize('meta/D')) > 
0).toBe(true);
    +                    
expect(copy[1].indexOf(path.normalize('meta/subdir/E')) > 0).toBe(true);
    +                });
    +            });                    
    --- End diff --
    
    This introduces trailing whitespace. Please don't.


> Fix subdir handling
> -------------------
>
>                 Key: CB-6272
>                 URL: https://issues.apache.org/jira/browse/CB-6272
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugman
>    Affects Versions: 3.5.0
>            Reporter: Josh Soref
>            Assignee: Jonathan Bond
>            Priority: Blocker
>
> CB-6160 landed [~jbondc]'s ae2ce7ac6325d1c6558365b4be82e5a8ff0983b9
> which broke some portion of install:
> +                if (dep.subdir) {
> +                    dep.subdir = path.join(dep.subdir.split('/'));
> ...
> -                    if (dep_subdir) {
> -                        dep_subdir = path.join.apply(null, 
> dep_subdir.split('/'));



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to