aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/templates/index.html
AgeCommit message (Expand)Author
2012-08-28chore(docs): use symlinks to build docsIgor Minar
2012-08-24chore(docs): use GAE and Google CDN for docsIgor Minar
2012-06-15fix(doc) firefox icon renderingMisko Hevery
2012-05-04chore(docs): re-skin main documentationMisko Hevery
2012-04-11chore(ngSanitize): extract $sanitize, ngBindHtml, linkyFilter into a moduleVojta Jina
2012-04-05chore(docs): add nonminified jquery debug version of docsIgor Minar
2012-04-04docs(tutorial): update tutorial intro + steps 0-3Igor Minar
2012-04-04fix(docs): remove ngModelInstant from all examplesIgor Minar
2012-03-28chore(ngCookies): moved to moduleMisko Hevery
2012-03-28chore(resource): moved to moduleMisko Hevery
2012-02-28reafactor: Rename ng:bind-immediate -> ng:model-instantVojta Jina
2012-02-28refactor(forms): Even better formsVojta Jina
2012-01-17fix(docs): disable appcache - causing too much troubleIgor Minar
2012-01-17docs(*): more fixesIgor Minar
2012-01-17docs(*): various doc fixesIgor Minar
2012-01-13fix($autoScroll): scroll even if $location is in html5 modeVojta Jina
2012-01-10feat(module): new module loaderMisko Hevery
2011-11-14refactor(docs): improved the visual rendering of the documentation pagesMisko Hevery
2011-11-14refactor(api): remove type augmentationMisko Hevery
2011-10-30feat(docs): remove the Report Issue link - duplication of disqusIgor Minar
2011-10-30feat(docs): disqus integrationdandoyon
2011-10-22feat(docs): add "Loading..." notificationIgor Minar
2011-10-13fix(docs): set proper base href when hashbang url requestedVojta Jina
2011-10-11feat(forms): new and improved formsMisko Hevery
2011-09-26feat(docs): use html5 history api for all routing in the docs appVojta Jina
2011-08-24feat(doc): generate both normal and debug version of index.htmlDi Peng
2011-08-24feat(ng:cloak): add ng:cloak directiveIgor Minar
2011-08-21fix(docs): work around the lame ng:show directiveIgor Minar
2011-07-29doc(index.html): change the order of elements in the navbarIgor Minar
2011-07-26feat(docs): add full offline supportDi Peng
2011-07-26feat(docs): add a changelog link to the footerDi Peng
2011-07-20refactor(gen-docs): use q, qq, q-fs (node modules) to write gen-docsDi Peng
2011-07-17refactor(docs): run e2e tests with and without jqueryDi Peng
2011-07-08docs:template: rename <angular/> to AngularJSIgor Minar
2011-07-08docs:css: remove bullet points from tutorial sidebarIgor Minar
2011-06-07add appcache for docs site - caches only css/js/img resourcesIgor Minar
2011-06-07remove $script loader because incompatibilities with e2e runnerIgor Minar
2011-06-06make *.angularjs.org analytics work on subdomainsIgor Minar
2011-06-06fix hashpath prefix for docs/sitemap/etcIgor Minar
2011-06-06docs app css/js/html rewriteIgor Minar
2011-06-06work in progressIgor Minar
2011-06-06Load GA script using $script loaderVojta Jina
2011-06-06Google Analytics - basic page tracking for docsVojta Jina
2011-06-06reorder docs main menu itemsIgor Minar
2011-06-06new docs skin - WIPIgor Minar
2011-06-06add resource mergingIgor Minar
2011-06-06fix link to the tutorial pageIgor Minar
2011-06-06Move documentation under individual headingsMisko Hevery
2011-02-03addded cookbookMisko Hevery
2011-01-26Added part of guide documentation and supporting changes to doc generatorMisko Hevery
(:exit).returns 1 shutup { odie "foo" } end def test_pretty_installed $stdout.stubs(:tty?).returns false assert_equal "foo", pretty_installed("foo") end def test_pretty_uninstalled $stdout.stubs(:tty?).returns false assert_equal "foo", pretty_uninstalled("foo") end def test_interactive_shell mktmpdir do |path| shell = "#{path}/myshell" File.open(shell, "w") do |file| file.write "#!/bin/sh\necho called > #{path}/called\n" end FileUtils.chmod 0755, shell ENV["SHELL"] = shell assert_nothing_raised { interactive_shell } assert File.exist? "#{path}/called" end end def test_with_custom_locale ENV["LC_ALL"] = "en_US.UTF-8" with_custom_locale("C") do assert_equal "C", ENV["LC_ALL"] end assert_equal "en_US.UTF-8", ENV["LC_ALL"] end def test_run_as_not_developer ENV["HOMEBREW_DEVELOPER"] = "foo" run_as_not_developer do assert_nil ENV["HOMEBREW_DEVELOPER"] end assert_equal "foo", ENV["HOMEBREW_DEVELOPER"] end def test_put_columns_empty # Issue #217 put columns with no results fails. assert_silent { puts_columns [] } end def test_which cmd = @dir/"foo" FileUtils.touch cmd cmd.chmod 0744 assert_equal Pathname.new(cmd), which(File.basename(cmd), File.dirname(cmd)) end def test_which_skip_non_executables cmd = @dir/"foo" FileUtils.touch cmd assert_nil which(File.basename(cmd), File.dirname(cmd)) end def test_which_skip_malformed_path # 'which' should not fail if a path is malformed # see https://github.com/Homebrew/legacy-homebrew/issues/32789 for an example cmd = @dir/"foo" FileUtils.touch cmd cmd.chmod 0744 # ~~ will fail because ~foo resolves to foo's home and there is no '~' user # here assert_equal Pathname.new(cmd), which(File.basename(cmd), "~~#{File::PATH_SEPARATOR}#{File.dirname(cmd)}") end def test_which_all (@dir/"bar/baz").mkpath cmd1 = @dir/"foo" cmd2 = @dir/"bar/foo" cmd3 = @dir/"bar/baz/foo" FileUtils.touch cmd2 [cmd1, cmd3].each do |cmd| FileUtils.touch cmd cmd.chmod 0744 end assert_equal [cmd3, cmd1], which_all("foo", "#{@dir}/bar/baz:#{@dir}/baz:#{@dir}:~baduserpath") end def test_which_editor ENV["HOMEBREW_EDITOR"] = "vemate" assert_equal "vemate", which_editor end def test_gzip mktmpdir do |path| somefile = "#{path}/somefile" FileUtils.touch somefile assert_equal "#{somefile}.gz", gzip(somefile)[0].to_s assert File.exist?("#{somefile}.gz") end end def test_shell_profile ENV["SHELL"] = "/bin/sh" assert_equal "~/.bash_profile", shell_profile ENV["SHELL"] = "/bin/bash" assert_equal "~/.bash_profile", shell_profile ENV["SHELL"] = "/bin/another_shell" assert_equal "~/.bash_profile", shell_profile ENV["SHELL"] = "/bin/zsh" assert_equal "~/.zshrc", shell_profile ENV["SHELL"] = "/bin/ksh" assert_equal "~/.kshrc", shell_profile end def test_popen_read out = Utils.popen_read("sh", "-c", "echo success").chomp assert_equal "success", out assert_predicate $?, :success? end def test_popen_read_with_block out = Utils.popen_read("sh", "-c", "echo success") do |pipe| pipe.read.chomp end assert_equal "success", out assert_predicate $?, :success? end def test_popen_write_with_block Utils.popen_write("grep", "-q", "success") do |pipe| pipe.write("success\n") end assert_predicate $?, :success? end def test_pretty_duration assert_equal "1 second", pretty_duration(1) assert_equal "2 seconds", pretty_duration(2.5) assert_equal "42 seconds", pretty_duration(42) assert_equal "4 minutes", pretty_duration(240) assert_equal "4 minutes 12 seconds", pretty_duration(252.45) end def test_plural assert_equal "", plural(1) assert_equal "s", plural(0) assert_equal "s", plural(42) assert_equal "", plural(42, "") end def test_disk_usage_readable assert_equal "1B", disk_usage_readable(1) assert_equal "1000B", disk_usage_readable(1000) assert_equal "1K", disk_usage_readable(1024) assert_equal "1K", disk_usage_readable(1025) assert_equal "4.2M", disk_usage_readable(4_404_020) assert_equal "4.2G", disk_usage_readable(4_509_715_660) end def test_number_readable assert_equal "1", number_readable(1) assert_equal "1,000", number_readable(1_000) assert_equal "1,000,000", number_readable(1_000_000) end def test_truncate_text_to_approximate_size glue = "\n[...snip...]\n" # hard-coded copy from truncate_text_to_approximate_size n = 20 long_s = "x" * 40 s = truncate_text_to_approximate_size(long_s, n) assert_equal n, s.length assert_match(/^x+#{Regexp.escape(glue)}x+$/, s) s = truncate_text_to_approximate_size(long_s, n, :front_weight => 0.0) assert_equal glue + ("x" * (n - glue.length)), s s = truncate_text_to_approximate_size(long_s, n, :front_weight => 1.0) assert_equal(("x" * (n - glue.length)) + glue, s) end def test_odeprecated ARGV.stubs(:homebrew_developer?).returns false e = assert_raises(FormulaMethodDeprecatedError) do odeprecated("method", "replacement", :caller => ["#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core/"], :die => true) end assert_match "method", e.message assert_match "replacement", e.message assert_match "homebrew/homebrew-core", e.message assert_match "homebrew/core", e.message end end