bpm 0.1.4 → 1.0.0.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +20 -0
- data/README.md +1 -1
- data/TODO.md +90 -2
- data/bpm.gemspec +3 -3
- data/lib/bpm/cli/base.rb +103 -52
- data/lib/bpm/errors.rb +51 -0
- data/lib/bpm/init_generator.rb +1 -8
- data/lib/bpm/libgems_ext/libgems.rb +9 -0
- data/lib/bpm/local.rb +6 -11
- data/lib/bpm/package.rb +272 -178
- data/lib/bpm/pipeline/generated_asset.rb +88 -28
- data/lib/bpm/pipeline/plugin_asset.rb +8 -2
- data/lib/bpm/pipeline/source_url_processor.rb +16 -0
- data/lib/bpm/pipeline/transport_processor.rb +5 -3
- data/lib/bpm/pipeline.rb +33 -23
- data/lib/bpm/project.rb +492 -167
- data/lib/bpm/project_generator.rb +14 -1
- data/lib/bpm/remote.rb +6 -4
- data/lib/bpm/server.rb +4 -15
- data/lib/bpm/version.rb +2 -1
- data/lib/bpm.rb +2 -0
- data/man/bpm-add.1.ronn +22 -0
- data/man/bpm-build.1.ronn +22 -0
- data/man/bpm-compile.1.ronn +23 -0
- data/man/bpm-config.7.ronn +21 -0
- data/man/bpm-fetch.1.ronn +22 -0
- data/man/bpm-fetched.1.ronn +22 -0
- data/man/bpm-init.1.ronn +22 -0
- data/man/bpm-list.1.ronn +22 -0
- data/man/bpm-login.1.ronn +22 -0
- data/man/bpm-new.1.ronn +22 -0
- data/man/bpm-owner.1.ronn +22 -0
- data/man/bpm-preview.1.ronn +22 -0
- data/man/bpm-push.1.ronn +22 -0
- data/man/bpm-remove.1.ronn +22 -0
- data/man/bpm-unpack.1.ronn +22 -0
- data/man/bpm-yank.1.ronn +22 -0
- data/man/bpm.1.ronn +31 -0
- data/spec/cli/add_spec.rb +26 -7
- data/spec/cli/fetch_spec.rb +15 -6
- data/spec/cli/init_spec.rb +165 -25
- data/spec/cli/{build_spec.rb → pack_spec.rb} +9 -10
- data/spec/cli/push_spec.rb +4 -4
- data/spec/cli/rebuild_spec.rb +181 -0
- data/spec/cli/remove_spec.rb +3 -4
- data/spec/cli/unpack_spec.rb +6 -6
- data/spec/fixtures/gems/core-test-0.4.9.bpkg +0 -0
- data/spec/fixtures/{core-test-0.4.9.bpkg → gems/uglify-js-1.0.4.bpkg} +0 -0
- data/spec/fixtures/packages/core-test/extras/extra_file.html +3 -0
- data/spec/fixtures/packages/core-test/index.html +3 -0
- data/spec/fixtures/{core-test → packages/core-test}/package.json +9 -3
- data/spec/fixtures/packages/invalid_json/package.json +3 -0
- data/spec/fixtures/packages/uglify-js/README.html +825 -0
- data/spec/fixtures/packages/uglify-js/README.org +431 -0
- data/spec/fixtures/packages/uglify-js/bin/uglifyjs +305 -0
- data/spec/fixtures/packages/uglify-js/docstyle.css +75 -0
- data/spec/fixtures/packages/uglify-js/lib/parse-js.js +1 -0
- data/spec/fixtures/packages/uglify-js/lib/process.js +1 -0
- data/spec/fixtures/packages/uglify-js/lib/squeeze-more.js +1 -0
- data/spec/fixtures/packages/uglify-js/package.json +27 -0
- data/spec/fixtures/packages/uglify-js/plugins/minifier.js +6 -0
- data/spec/fixtures/packages/uglify-js/uglify-js.js +17 -0
- data/spec/fixtures/projects/hello2/README.md +21 -0
- data/{templates/init → spec/fixtures/projects/hello2}/assets/bpm_packages.js +6 -1
- data/{templates/init → spec/fixtures/projects/hello2}/assets/bpm_styles.css +1 -1
- data/spec/fixtures/projects/hello2/hello2.json +16 -0
- data/spec/fixtures/projects/hello2/index.html +13 -0
- data/spec/fixtures/projects/hello2/packages/a/lib/main.js +2 -0
- data/spec/fixtures/projects/hello2/packages/a/package.json +17 -0
- data/spec/fixtures/projects/hello2/packages/b/lib/main.js +2 -0
- data/spec/fixtures/projects/hello2/packages/b/package.json +17 -0
- data/spec/fixtures/projects/hello2/packages/c/lib/main.js +2 -0
- data/spec/fixtures/projects/hello2/packages/c/package.json +16 -0
- data/spec/fixtures/projects/hello_dev/LICENSE +19 -0
- data/spec/fixtures/projects/hello_dev/README.md +21 -0
- data/spec/fixtures/projects/hello_dev/app/main.js +6 -0
- data/spec/fixtures/projects/hello_dev/assets/bpm_libs.js +5 -0
- data/spec/fixtures/projects/hello_dev/assets/bpm_styles.css +6 -0
- data/spec/fixtures/projects/hello_dev/css/main.css +1 -0
- data/spec/fixtures/projects/hello_dev/hello_dev.json +25 -0
- data/spec/fixtures/projects/hello_dev/index.html +14 -0
- data/spec/fixtures/projects/hello_dev/packages/style_package/css/some_style.css +3 -0
- data/spec/fixtures/{minitest/minitest.json → projects/hello_dev/packages/style_package/package.json} +5 -9
- data/spec/fixtures/projects/hello_world/LICENSE +19 -0
- data/spec/fixtures/projects/hello_world/assets/bpm_packages.js +1 -0
- data/spec/fixtures/projects/hello_world/assets/bpm_styles.css +1 -0
- data/spec/fixtures/projects/hello_world/custom_dir/custom.js +1 -0
- data/spec/fixtures/projects/hello_world/hello_world.json +41 -0
- data/spec/fixtures/projects/hello_world/lib/another.js +1 -0
- data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/package.json +5 -2
- data/spec/fixtures/projects/hello_world/vendor/lib/something.js +1 -0
- data/spec/fixtures/projects/init_app/assets/bpm_libs.js +6 -0
- data/spec/fixtures/projects/init_app/assets/bpm_styles.css +5 -0
- data/spec/fixtures/projects/init_app/assets/new_project/bpm_libs.js +6 -0
- data/spec/fixtures/projects/init_app/assets/new_project/bpm_styles.css +5 -0
- data/spec/fixtures/projects/init_app/new_project.json +27 -0
- data/spec/fixtures/projects/init_default/assets/bpm_libs.js +6 -0
- data/spec/fixtures/projects/init_default/assets/bpm_styles.css +5 -0
- data/spec/fixtures/projects/init_default/new_project.json +15 -0
- data/spec/fixtures/projects/minitest/minitest.json +26 -0
- data/spec/fixtures/{minitest → projects/minitest}/packages/uglyduck/package.json +1 -1
- data/spec/fixtures/projects/needs_rake/needs_rake.json +7 -0
- data/spec/fixtures/{transporter → projects/transporter}/packages/transport/package.json +1 -1
- data/spec/package_spec.rb +343 -315
- data/spec/pipeline_spec.rb +89 -71
- data/spec/plugins/minifier_spec.rb +25 -16
- data/spec/plugins/transport_spec.rb +1 -1
- data/spec/project_spec.rb +97 -34
- data/spec/spec_helper.rb +41 -0
- data/spec/support/fake_gem_server.rb +8 -4
- data/spec/support/path.rb +8 -0
- data/spec/support/project.rb +50 -17
- data/templates/init/project.json +12 -14
- data/templates/project/LICENSE +1 -1
- data/templates/project/app/main.js +6 -0
- data/templates/project/css/main.css +1 -0
- data/templates/project/index.html +4 -3
- data/vendor/sprockets/.travis.yml +3 -2
- data/vendor/sprockets/Gemfile +0 -6
- data/vendor/sprockets/lib/sprockets/asset.rb +7 -12
- data/vendor/sprockets/lib/sprockets/asset_attributes.rb +70 -53
- data/vendor/sprockets/lib/sprockets/base.rb +1 -14
- data/vendor/sprockets/lib/sprockets/bundled_asset.rb +72 -45
- data/vendor/sprockets/lib/sprockets/caching.rb +28 -23
- data/vendor/sprockets/lib/sprockets/context.rb +56 -26
- data/vendor/sprockets/lib/sprockets/directive_processor.rb +21 -4
- data/vendor/sprockets/lib/sprockets/eco_template.rb +3 -4
- data/vendor/sprockets/lib/sprockets/ejs_template.rb +3 -4
- data/vendor/sprockets/lib/sprockets/engines.rb +26 -1
- data/vendor/sprockets/lib/sprockets/environment.rb +2 -1
- data/vendor/sprockets/lib/sprockets/index.rb +1 -0
- data/vendor/sprockets/lib/sprockets/mime.rb +38 -0
- data/vendor/sprockets/lib/sprockets/processing.rb +4 -45
- data/vendor/sprockets/lib/sprockets/static_asset.rb +5 -6
- data/vendor/sprockets/lib/sprockets/static_compilation.rb +4 -12
- data/vendor/sprockets/lib/sprockets/trail.rb +2 -1
- data/vendor/sprockets/test/fixtures/default/blank.gif +0 -0
- data/vendor/sprockets/test/fixtures/default/with_data_uri.css.erb +3 -0
- data/vendor/sprockets/test/test_asset.rb +121 -15
- data/vendor/sprockets/test/test_asset_attributes.rb +85 -21
- data/vendor/sprockets/test/test_environment.rb +13 -36
- metadata +564 -444
- data/spec/cli/new_spec.rb +0 -118
- data/spec/fixtures/hello_world/assets/bpm_packages.js +0 -13
- data/spec/fixtures/hello_world/assets/bpm_styles.css +0 -14
- data/spec/fixtures/hello_world/hello_world.json +0 -20
- /data/spec/fixtures/{badrake-0.8.7.bpkg → gems/badrake-0.8.7.bpkg} +0 -0
- /data/spec/fixtures/{builder-3.0.0.bpkg → gems/builder-3.0.0.bpkg} +0 -0
- /data/spec/fixtures/{bundler-1.1.pre.bpkg → gems/bundler-1.1.pre.bpkg} +0 -0
- /data/spec/fixtures/{coffee-1.0.1.pre.bpkg → gems/coffee-1.0.1.pre.bpkg} +0 -0
- /data/spec/fixtures/{custom_generator-1.0.bpkg → gems/custom_generator-1.0.bpkg} +0 -0
- /data/spec/fixtures/{highline-1.6.1.bpkg → gems/highline-1.6.1.bpkg} +0 -0
- /data/spec/fixtures/{ivory-0.0.1.bpkg → gems/ivory-0.0.1.bpkg} +0 -0
- /data/spec/fixtures/{jquery-1.4.3.bpkg → gems/jquery-1.4.3.bpkg} +0 -0
- /data/spec/fixtures/{optparse-1.0.1.bpkg → gems/optparse-1.0.1.bpkg} +0 -0
- /data/spec/fixtures/{rake-0.8.6.bpkg → gems/rake-0.8.6.bpkg} +0 -0
- /data/spec/fixtures/{rake-0.8.7.bpkg → gems/rake-0.8.7.bpkg} +0 -0
- /data/spec/fixtures/{spade-0.5.0.bpkg → gems/spade-0.5.0.bpkg} +0 -0
- /data/spec/fixtures/{src → packages}/README.txt +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/.gitignore +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/CHANGELOG.md +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/ISSUES.md +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/LICENSE +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/README.md +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/UPGRADING.md +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/bin/bundle +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler/definition.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler/dependency.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler/dsl.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler/ui.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-config.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-exec.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-install.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-package.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-update.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/gemfile.5.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/index.txt +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/package.json +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/bin/cake +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/bin/coffee +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/lib/coffee/base.js +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/lib/coffee/mocha/chai.js +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/lib/coffee.js +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/package.json +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/qunit/coffee/test.js +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/qunit/test.js +0 -0
- /data/spec/fixtures/{core-test → packages/core-test}/bin/cot +0 -0
- /data/spec/fixtures/{core-test → packages/core-test}/lib/main.js +0 -0
- /data/spec/fixtures/{core-test → packages/core-test}/resources/runner.css +0 -0
- /data/spec/fixtures/{core-test → packages/core-test}/tests/test.js +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/lib/main.js +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/package.json +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/templates/init/project.json +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/templates/project/app.js +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/templates/project/lib/main.js +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/templates/project_generator.rb +0 -0
- /data/spec/fixtures/{src → packages}/jquery/lib/main.js +0 -0
- /data/spec/fixtures/{src → packages}/jquery/package.json +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/CHANGES +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/MIT-LICENSE +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/README +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/Rakefile +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/TODO +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/bin/rake +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/command_line_usage.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/Rakefile1 +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/Rakefile2 +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/a.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/b.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/main.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/glossary.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/jamis.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/proto_rake.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/rake.1.gz +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/rakefile.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/rational.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.4.14.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.4.15.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.5.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.5.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.5.4.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.6.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.7.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.7.1.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.7.2.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.7.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.2.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.4.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.5.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.6.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/install.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/alt_system.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/classic_namespace.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/clean.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/compositepublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/ftptools.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/publisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/rubyforgepublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/sshpublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/sys.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/gempackagetask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/loaders/makefile.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/packagetask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/rake_test_loader.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/rdoctask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/ruby182_test_unit_fix.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/runtest.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/tasklib.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/testtask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/win32.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/package.json +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/test/capture_stdout.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/CHANGES +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/MIT-LICENSE +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/README +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/Rakefile +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/TODO +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/bin/rake +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/command_line_usage.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/Rakefile1 +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/Rakefile2 +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/a.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/b.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/main.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/glossary.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/jamis.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/proto_rake.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/rake.1.gz +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/rakefile.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/rational.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.4.14.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.4.15.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.5.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.5.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.5.4.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.6.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.7.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.7.1.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.7.2.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.7.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.2.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.4.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.5.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.6.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.7.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/install.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/alt_system.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/classic_namespace.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/clean.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/compositepublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/ftptools.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/publisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/rubyforgepublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/sshpublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/sys.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/gempackagetask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/loaders/makefile.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/packagetask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/rake_test_loader.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/rdoctask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/ruby182_test_unit_fix.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/runtest.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/tasklib.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/testtask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/win32.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/package.json +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/test/capture_stdout.rb +0 -0
- /data/spec/fixtures/{src → packages}/spade/lib/main.js +0 -0
- /data/spec/fixtures/{src → packages}/spade/package.json +0 -0
- /data/spec/fixtures/{custom_name → projects/custom_name}/MyProject.json +0 -0
- /data/spec/fixtures/{hello_world → projects/hello2}/LICENSE +0 -0
- /data/{templates/project → spec/fixtures/projects/hello2}/app.js +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/README.md +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/assets/papa-smurf.jpg +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/css/dummy.css +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/lib/main.js +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/assets/dummy.txt +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/css/sample_styles.css +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/custom_dir/basic-module.js +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/lib/main.js +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/tests/main-test.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/assets/bpm_packages.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/assets/bpm_styles.css +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/assets/minitest/app_package.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/lib/main.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/packages/uglyduck/lib/main.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/packages/uglyduck/minifier/main.js +0 -0
- /data/spec/fixtures/{simple_hello/assets/bpm_packages.js → projects/simple_hello/assets/bpm_libs.js} +0 -0
- /data/spec/fixtures/{simple_hello → projects/simple_hello}/lib/main.js +0 -0
- /data/spec/fixtures/{transporter → projects/transporter}/lib/main.js +0 -0
- /data/spec/fixtures/{transporter → projects/transporter}/packages/transport/lib/main.js +0 -0
- /data/spec/fixtures/{transporter → projects/transporter}/packages/transport/transports/wrapper.js +0 -0
- /data/spec/fixtures/{transporter → projects/transporter}/transporter.json +0 -0
@@ -7,19 +7,32 @@ module BPM
|
|
7
7
|
return false if directory_exists?
|
8
8
|
|
9
9
|
empty_directory '.', :verbose => false
|
10
|
+
empty_directory 'app'
|
10
11
|
|
11
12
|
create_files
|
12
13
|
|
13
14
|
true
|
14
15
|
end
|
15
16
|
|
17
|
+
def company_name
|
18
|
+
ENV['COMPANY_NAME'] || "My Company Inc."
|
19
|
+
end
|
20
|
+
|
16
21
|
private
|
17
22
|
|
18
23
|
def create_files
|
19
24
|
template "LICENSE"
|
20
25
|
template "README.md"
|
21
26
|
template "index.html"
|
22
|
-
|
27
|
+
|
28
|
+
inside 'app' do
|
29
|
+
template 'main.js'
|
30
|
+
end
|
31
|
+
|
32
|
+
inside 'css' do
|
33
|
+
template 'main.css'
|
34
|
+
end
|
35
|
+
|
23
36
|
end
|
24
37
|
|
25
38
|
def directory_exists?
|
data/lib/bpm/remote.rb
CHANGED
@@ -78,16 +78,18 @@ module BPM
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def install(package, version, prerelease)
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
LibGems.with_silence do
|
82
|
+
inst = LibGems::DependencyInstaller.new(:prerelease => prerelease)
|
83
|
+
inst.install package, LibGems::Requirement.new([version])
|
84
|
+
inst.installed_gems
|
85
|
+
end
|
84
86
|
end
|
85
87
|
|
86
88
|
private
|
87
89
|
|
88
90
|
def raw_request(method, path, &block)
|
89
91
|
require 'net/http'
|
90
|
-
host = ENV['
|
92
|
+
host = ENV['BPM_HOST'] || LibGems.host
|
91
93
|
uri = URI.parse "#{host}/#{path}"
|
92
94
|
|
93
95
|
request_method = Net::HTTP.const_get method.to_s.capitalize
|
data/lib/bpm/server.rb
CHANGED
@@ -3,24 +3,11 @@ require 'sprockets'
|
|
3
3
|
|
4
4
|
module BPM
|
5
5
|
|
6
|
-
class Trial
|
7
|
-
|
8
|
-
def initialize(app)
|
9
|
-
@app = app
|
10
|
-
end
|
11
|
-
|
12
|
-
def call(env)
|
13
|
-
puts env.to_json
|
14
|
-
ret = @app.call(env)
|
15
|
-
puts "RET = \n #{ret * "\n "}"
|
16
|
-
ret
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
6
|
class Server < Rack::Server
|
21
7
|
|
22
8
|
def initialize(project, options=nil)
|
23
9
|
@project = project
|
10
|
+
@mode = (options && options[:mode]) || :debug
|
24
11
|
super options
|
25
12
|
end
|
26
13
|
|
@@ -29,13 +16,15 @@ module BPM
|
|
29
16
|
end
|
30
17
|
|
31
18
|
attr_reader :project
|
19
|
+
attr_reader :mode
|
32
20
|
|
33
21
|
def app
|
34
22
|
cur_project = @project
|
23
|
+
cur_mode = @mode
|
35
24
|
|
36
25
|
@app ||= Rack::Builder.new do
|
37
26
|
map '/assets' do
|
38
|
-
run BPM::
|
27
|
+
run BPM::Pipeline.new cur_project, cur_mode, true
|
39
28
|
end
|
40
29
|
|
41
30
|
map '/' do
|
data/lib/bpm/version.rb
CHANGED
data/lib/bpm.rb
CHANGED
@@ -17,9 +17,11 @@ module BPM
|
|
17
17
|
autoload :DirectiveProcessor, 'bpm/pipeline/directive_processor'
|
18
18
|
autoload :GeneratedAsset, 'bpm/pipeline/generated_asset'
|
19
19
|
autoload :TransportProcessor, 'bpm/pipeline/transport_processor'
|
20
|
+
autoload :SourceURLProcessor, 'bpm/pipeline/source_url_processor'
|
20
21
|
autoload :PluginAsset, 'bpm/pipeline/plugin_asset'
|
21
22
|
end
|
22
23
|
|
23
24
|
# The BPM constants need to be defined first
|
24
25
|
require 'bpm/libgems_ext'
|
26
|
+
require 'bpm/errors'
|
25
27
|
|
data/man/bpm-add.1.ronn
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-add(1) -- Adds one or more packages to a bpm project
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm add` <PACKAGE> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-init(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-build(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm build` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
bpm-compile(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm compile` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1) bpm-preview(1)
|
21
|
+
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
bpm-config(7) -- BPM project config options
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
|
7
|
+
## DESCRIPTION
|
8
|
+
|
9
|
+
## OPTIONS
|
10
|
+
|
11
|
+
## DISCUSSION
|
12
|
+
|
13
|
+
## COPYRIGHT
|
14
|
+
|
15
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
16
|
+
|
17
|
+
## SEE ALSO
|
18
|
+
|
19
|
+
bpm-init(1) bpm-remove(1)
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-fetch(1) -- Fetch one or many bpm packages to local cache
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm fetch` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-fetched(1) bpm-list(1)
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-fetched(1) -- Displays what bpm packages have been fetched
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm fetched`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-fetch(1) bpm-list(1)
|
21
|
+
|
22
|
+
|
data/man/bpm-init.1.ronn
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-init(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm init` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
data/man/bpm-list.1.ronn
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-list(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm list` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-login(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm login` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
data/man/bpm-new.1.ronn
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-new(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm new` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-owner(1) -- Manage users for a package
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm owner` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-preview(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm preview` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
data/man/bpm-push.1.ronn
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-push(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm push` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-remove(1) -- Removes one or more packages from a bpm project
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm remove` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-init(1)
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-unpack(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm unpack` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
data/man/bpm-yank.1.ronn
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
bpm-yank(1) -- converts a project to use bpm
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm yank` <PATH> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
## DISCUSSION
|
13
|
+
|
14
|
+
## COPYRIGHT
|
15
|
+
|
16
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
17
|
+
|
18
|
+
## SEE ALSO
|
19
|
+
|
20
|
+
bpm-add(1) bpm-remove(1)
|
21
|
+
|
22
|
+
|
data/man/bpm.1.ronn
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
bpm(1) -- browser package manager
|
2
|
+
==================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bpm` <command> <flags>
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
## WORKFLOW
|
11
|
+
|
12
|
+
bpm init | bpm new - create the new project
|
13
|
+
bpm add spade - adds the dependency, fetches, compiles.
|
14
|
+
bpm remove spade - removes the dependency, compiles
|
15
|
+
|
16
|
+
bpm fetch - fetches any dependencies locally
|
17
|
+
bpm compile - rebuilds the project; uses any current dependencies
|
18
|
+
bpm preview - allows you to preview the files. creates any needed files
|
19
|
+
|
20
|
+
|
21
|
+
## DISCUSSION
|
22
|
+
|
23
|
+
## COPYRIGHT
|
24
|
+
|
25
|
+
2011 Strobe Inc. and contributors. Available under MIT license.
|
26
|
+
|
27
|
+
## SEE ALSO
|
28
|
+
|
29
|
+
bpm-add(1) bpm-remove(1)
|
30
|
+
|
31
|
+
|
data/spec/cli/add_spec.rb
CHANGED
@@ -7,10 +7,10 @@ describe 'bpm add' do
|
|
7
7
|
goto_home
|
8
8
|
set_host
|
9
9
|
start_fake(FakeGemServer.new)
|
10
|
-
FileUtils.cp_r(
|
10
|
+
FileUtils.cp_r(project_fixture('hello_world'), '.')
|
11
11
|
cd home('hello_world')
|
12
12
|
|
13
|
-
bpm '
|
13
|
+
bpm 'fetch'
|
14
14
|
wait
|
15
15
|
end
|
16
16
|
|
@@ -57,7 +57,7 @@ describe 'bpm add' do
|
|
57
57
|
it "adds no packages when any are invalid" do
|
58
58
|
bpm "add", "jquery", "fake", :track_stderr => true
|
59
59
|
|
60
|
-
stderr.read.should == "Could not find
|
60
|
+
stderr.read.should == "Could not find eligible package for 'fake' (>= 0)\n"
|
61
61
|
|
62
62
|
no_dependency 'jquery'
|
63
63
|
no_dependency 'fake'
|
@@ -66,7 +66,7 @@ describe 'bpm add' do
|
|
66
66
|
it "fails when adding invalid package" do
|
67
67
|
bpm "add", "fake", :track_stderr => true
|
68
68
|
|
69
|
-
stderr.read.should == "Could not find
|
69
|
+
stderr.read.should == "Could not find eligible package for 'fake' (>= 0)\n"
|
70
70
|
no_dependency 'fake'
|
71
71
|
end
|
72
72
|
|
@@ -117,7 +117,7 @@ describe 'bpm add' do
|
|
117
117
|
it "does not add the normal package when asking for a prerelease" do
|
118
118
|
bpm "add", "rake", "--pre", :track_stderr => true
|
119
119
|
wait
|
120
|
-
stderr.read.should == "Could not find
|
120
|
+
stderr.read.should == "Could not find eligible package for 'rake' (>= 0-pre)\n"
|
121
121
|
no_dependency 'rake'
|
122
122
|
end
|
123
123
|
|
@@ -156,7 +156,26 @@ describe 'bpm add' do
|
|
156
156
|
|
157
157
|
it "should verify working with config-less projects"
|
158
158
|
|
159
|
-
it "should work with .bpkg file"
|
160
|
-
|
159
|
+
it "should work with .bpkg file" do
|
160
|
+
FileUtils.cp fixtures('gems', "custom_generator-1.0.bpkg"), '.'
|
161
|
+
bpm "add", "custom_generator-1.0.bpkg" and wait
|
162
|
+
output = stdout.read
|
163
|
+
output.should include("Added package 'custom_generator' (1.0)")
|
164
|
+
has_dependency 'custom_generator', '1.0', '1.0'
|
165
|
+
end
|
166
|
+
|
167
|
+
describe "--dev" do
|
168
|
+
|
169
|
+
it "should add as a development dependency" do
|
170
|
+
bpm "add", "custom_generator", "--dev" and wait
|
171
|
+
output = stdout.read
|
172
|
+
output.should include("Added development package 'custom_generator' (1.0)")
|
173
|
+
|
174
|
+
bpm 'compile', '--mode=debug' and wait
|
175
|
+
has_development_dependency 'custom_generator', '1.0'
|
176
|
+
no_dependency 'custom_generator', false
|
177
|
+
end
|
178
|
+
|
179
|
+
end
|
161
180
|
|
162
181
|
end
|
data/spec/cli/fetch_spec.rb
CHANGED
@@ -1,22 +1,31 @@
|
|
1
1
|
require "spec_helper"
|
2
|
-
|
2
|
+
require "json"
|
3
3
|
describe 'bpm fetch' do
|
4
4
|
|
5
5
|
before do
|
6
6
|
goto_home
|
7
|
-
FileUtils.cp_r(
|
7
|
+
FileUtils.cp_r(project_fixture('hello_world'), '.')
|
8
8
|
set_host
|
9
9
|
start_fake(FakeGemServer.new)
|
10
10
|
end
|
11
11
|
|
12
12
|
it "fetches all dependencies in a project when called without command" do
|
13
13
|
cd home('hello_world')
|
14
|
-
bpm "fetch"
|
15
14
|
|
16
|
-
|
15
|
+
# add custom_package as a dependency to test local deps with fetching
|
16
|
+
package_info = JSON.load File.read(home('hello_world', 'hello_world.json'))
|
17
|
+
package_info['dependencies']['custom_package'] = '>= 0'
|
18
|
+
File.open(home('hello_world', 'hello_world.json'), 'w+') { |fd| fd << package_info.to_json }
|
19
|
+
|
20
|
+
bpm "fetch", '--verbose'
|
21
|
+
out = stdout.read
|
22
|
+
puts out
|
23
|
+
out.should include("Fetched dependent packages for hello_world")
|
17
24
|
|
18
25
|
# note: ivory is a soft dependency from core-test
|
19
|
-
|
26
|
+
# jquery is a development dependency of hello_world
|
27
|
+
# rake is a dependency of custom_package (a dep of hello_world)
|
28
|
+
%w(spade-0.5.0 core-test-0.4.9 ivory-0.0.1 optparse-1.0.1 jquery-1.4.3 uglify-js-1.0.4 rake-0.8.6).each do |package_name|
|
20
29
|
package_name.should be_fetched
|
21
30
|
package_name.should be_unpacked
|
22
31
|
end
|
@@ -131,5 +140,5 @@ describe 'bpm fetch' do
|
|
131
140
|
name.should be_unpacked
|
132
141
|
end
|
133
142
|
end
|
134
|
-
|
143
|
+
|
135
144
|
end
|