If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-ui-router/src/viewScroll.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc object
3 | * @name ui.router.state.$uiViewScrollProvider
4 | *
5 | * @description
6 | * Provider that returns the {@link ui.router.state.$uiViewScroll} service function.
7 | */
8 | function $ViewScrollProvider() {
9 |
10 | var useAnchorScroll = false;
11 |
12 | /**
13 | * @ngdoc function
14 | * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll
15 | * @methodOf ui.router.state.$uiViewScrollProvider
16 | *
17 | * @description
18 | * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for
19 | * scrolling based on the url anchor.
20 | */
21 | this.useAnchorScroll = function () {
22 | useAnchorScroll = true;
23 | };
24 |
25 | /**
26 | * @ngdoc object
27 | * @name ui.router.state.$uiViewScroll
28 | *
29 | * @requires $anchorScroll
30 | * @requires $timeout
31 | *
32 | * @description
33 | * When called with a jqLite element, it scrolls the element into view (after a
34 | * `$timeout` so the DOM has time to refresh).
35 | *
36 | * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,
37 | * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}.
38 | */
39 | this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) {
40 | if (useAnchorScroll) {
41 | return $anchorScroll;
42 | }
43 |
44 | return function ($element) {
45 | $timeout(function () {
46 | $element[0].scrollIntoView();
47 | }, 0, false);
48 | };
49 | }];
50 | }
51 |
52 | angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);
53 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/framework_and_overrides.css.scss:
--------------------------------------------------------------------------------
1 | // import the CSS framework
2 | @import "bootstrap-sprockets";
3 | @import "bootstrap";
4 |
5 | // make all images responsive by default
6 | img {
7 | @extend .img-responsive;
8 | margin: 0 auto;
9 | }
10 | // override for the 'Home' navigation link
11 | .navbar-brand {
12 | font-size: inherit;
13 | }
14 |
15 | // THESE ARE EXAMPLES YOU CAN MODIFY
16 | // create your own classes
17 | // to make views framework-neutral
18 | .column {
19 | @extend .col-md-6;
20 | @extend .text-center;
21 | }
22 | .form {
23 | @extend .col-md-6;
24 | }
25 | .form-centered {
26 | @extend .col-md-6;
27 | @extend .text-center;
28 | }
29 | .submit {
30 | @extend .btn;
31 | @extend .btn-primary;
32 | @extend .btn-lg;
33 | }
34 | // apply styles to HTML elements
35 | // to make views framework-neutral
36 | main {
37 | @extend .container;
38 | background-color: #FFF;
39 | padding-bottom: 80px;
40 | width: 100%;
41 | margin-top: 51px; // accommodate the navbar
42 | }
43 | section {
44 | @extend .row;
45 | margin-top: 20px;
46 | }
47 |
48 | // Styles for form views
49 | // using Bootstrap
50 | // generated by the rails_layout gem
51 | .authform {
52 | padding-top: 30px;
53 | max-width: 320px;
54 | margin: 0 auto;
55 | }
56 | .authform form {
57 | @extend .well;
58 | @extend .well-lg;
59 | padding-bottom: 40px;
60 | }
61 | .authform .right {
62 | float: right !important;
63 | }
64 | .authform .button {
65 | @extend .btn;
66 | @extend .btn-primary;
67 | }
68 | .authform fieldset {
69 | @extend .well;
70 | }
71 | #error_explanation {
72 | @extend .alert;
73 | @extend .alert-danger;
74 | }
75 | #error_explanation h2 {
76 | font-size: 16px;
77 | }
78 | .button-xs {
79 | @extend .btn;
80 | @extend .btn-primary;
81 | @extend .btn-xs;
82 | }
83 |
--------------------------------------------------------------------------------
/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The change you wanted was rejected.
62 |
Maybe you tried to change something you didn't have access to.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The page you were looking for doesn't exist.
62 |
You may have mistyped the address or the page may have moved.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/db/migrate/20150303003938_devise_token_auth_create_users.rb:
--------------------------------------------------------------------------------
1 | class DeviseTokenAuthCreateUsers < ActiveRecord::Migration
2 | def change
3 | create_table(:users) do |t|
4 | ## Required
5 | t.string :provider, :null => false
6 | t.string :uid, :null => false, :default => ""
7 |
8 | ## Database authenticatable
9 | t.string :encrypted_password, :null => false, :default => ""
10 |
11 | ## Recoverable
12 | t.string :reset_password_token
13 | t.datetime :reset_password_sent_at
14 |
15 | ## Rememberable
16 | t.datetime :remember_created_at
17 |
18 | ## Trackable
19 | t.integer :sign_in_count, :default => 0, :null => false
20 | t.datetime :current_sign_in_at
21 | t.datetime :last_sign_in_at
22 | t.string :current_sign_in_ip
23 | t.string :last_sign_in_ip
24 |
25 | ## Confirmable
26 | t.string :confirmation_token
27 | t.datetime :confirmed_at
28 | t.datetime :confirmation_sent_at
29 | t.string :unconfirmed_email # Only if using reconfirmable
30 |
31 | ## Lockable
32 | # t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
33 | # t.string :unlock_token # Only if unlock strategy is :email or :both
34 | # t.datetime :locked_at
35 |
36 | ## User Info
37 | t.string :name
38 | t.string :nickname
39 | t.string :image
40 | t.string :email
41 |
42 | ## Tokens
43 | t.text :tokens
44 |
45 | t.timestamps
46 | end
47 |
48 | add_index :users, :email
49 | add_index :users, [:uid, :provider], :unique => true
50 | add_index :users, :reset_password_token, :unique => true
51 | # add_index :users, :confirmation_token, :unique => true
52 | # add_index :users, :unlock_token, :unique => true
53 | end
54 | end
55 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #----------------------------------------------------------------------------
2 | # Ignore these files when commiting to a git repository.
3 | #
4 | # See http://help.github.com/ignore-files/ for more about ignoring files.
5 | #
6 | # The original version of this file is found here:
7 | # https://github.com/RailsApps/rails-composer/blob/master/files/gitignore.txt
8 | #
9 | # Corrections? Improvements? Create a GitHub issue:
10 | # http://github.com/RailsApps/rails-composer/issues
11 | #----------------------------------------------------------------------------
12 |
13 | # bundler state
14 | /.bundle
15 | /vendor/bundle/
16 | /vendor/ruby/
17 |
18 | # minimal Rails specific artifacts
19 | db/*.sqlite3
20 | /db/*.sqlite3-journal
21 | /log/*
22 | /tmp/*
23 |
24 | # various artifacts
25 | **.war
26 | *.rbc
27 | *.sassc
28 | .redcar/
29 | .sass-cache
30 | /config/config.yml
31 | /config/database.yml
32 | /coverage.data
33 | /coverage/
34 | /db/*.javadb/
35 | /db/*.sqlite3
36 | /doc/api/
37 | /doc/app/
38 | /doc/features.html
39 | /doc/specs.html
40 | /public/cache
41 | /public/stylesheets/compiled
42 | /public/system/*
43 | /spec/tmp/*
44 | /cache
45 | /capybara*
46 | /capybara-*.html
47 | /gems
48 | /specifications
49 | rerun.txt
50 | pickle-email-*.html
51 | .zeus.sock
52 |
53 | # If you find yourself ignoring temporary files generated by your text editor
54 | # or operating system, you probably want to add a global ignore instead:
55 | # git config --global core.excludesfile ~/.gitignore_global
56 | #
57 | # Here are some files you may want to ignore globally:
58 |
59 | # scm revert files
60 | **.orig
61 |
62 | # Mac finder artifacts
63 | .DS_Store
64 |
65 | # Netbeans project directory
66 | /nbproject/
67 |
68 | # RubyMine project files
69 | .idea
70 |
71 | # Textmate project files
72 | /*.tmproj
73 |
74 | # vim artifacts
75 | **.swp
76 |
77 | # Environment files that may contain sensitive data
78 | .env
79 | .powenv
80 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure static file server for tests with Cache-Control for performance.
16 | config.serve_static_files = true
17 | config.static_cache_control = 'public, max-age=3600'
18 |
19 | # Show full error reports and disable caching.
20 | config.consider_all_requests_local = true
21 | config.action_controller.perform_caching = false
22 |
23 | # Raise exceptions instead of rendering exception templates.
24 | config.action_dispatch.show_exceptions = false
25 |
26 | # Disable request forgery protection in test environment.
27 | config.action_controller.allow_forgery_protection = false
28 |
29 | # Tell Action Mailer not to deliver emails to the real world.
30 | # The :test delivery method accumulates sent emails in the
31 | # ActionMailer::Base.deliveries array.
32 | config.action_mailer.delivery_method = :test
33 |
34 | # Randomize the order test cases are executed.
35 | config.active_support.test_order = :random
36 |
37 | # Print deprecation notices to the stderr.
38 | config.active_support.deprecation = :stderr
39 |
40 | # Raises error for missing translations
41 | # config.action_view.raise_on_missing_translations = true
42 | end
43 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports and disable caching.
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send.
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger.
20 | config.active_support.deprecation = :log
21 |
22 | # Raise an error on page load if there are pending migrations.
23 | config.active_record.migration_error = :page_load
24 |
25 | # Debug mode disables concatenation and preprocessing of assets.
26 | # This option may cause significant delays in view rendering with a large
27 | # number of complex assets.
28 | config.assets.debug = true
29 |
30 | # ActionMailer Config
31 | config.action_mailer.default_url_options = { :host => 'localhost:3000' }
32 | config.action_mailer.delivery_method = :letter_opener
33 |
34 | # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35 | # yet still be able to expire them through the digest params.
36 | config.assets.digest = true
37 |
38 | # Adds additional error checking when serving assets at runtime.
39 | # Checks for improperly declared sprockets dependencies.
40 | # Raises helpful error messages.
41 | config.assets.raise_runtime_errors = true
42 |
43 | # Raises error for missing translations
44 | # config.action_view.raise_on_missing_translations = true
45 | end
46 |
--------------------------------------------------------------------------------
/spec/features/users/sign_in_spec.rb:
--------------------------------------------------------------------------------
1 | # Feature: Sign in
2 | # As a user
3 | # I want to sign in
4 | # So I can visit protected areas of the site
5 | feature 'Sign in', :devise do
6 |
7 | # Scenario: User cannot sign in if not registered
8 | # Given I do not exist as a user
9 | # When I sign in with valid credentials
10 | # Then I see an invalid credentials message
11 | scenario 'user cannot sign in if not registered' do
12 | signin('test@example.com', 'please123')
13 | expect(page).to have_content I18n.t 'devise.failure.not_found_in_database', authentication_keys: 'email'
14 | end
15 |
16 | # Scenario: User can sign in with valid credentials
17 | # Given I exist as a user
18 | # And I am not signed in
19 | # When I sign in with valid credentials
20 | # Then I see a success message
21 | scenario 'user can sign in with valid credentials' do
22 | user = FactoryGirl.create(:user)
23 | signin(user.email, user.password)
24 | expect(page).to have_content I18n.t 'devise.sessions.signed_in'
25 | end
26 |
27 | # Scenario: User cannot sign in with wrong email
28 | # Given I exist as a user
29 | # And I am not signed in
30 | # When I sign in with a wrong email
31 | # Then I see an invalid email message
32 | scenario 'user cannot sign in with wrong email' do
33 | user = FactoryGirl.create(:user)
34 | signin('invalid@email.com', user.password)
35 | expect(page).to have_content I18n.t 'devise.failure.not_found_in_database', authentication_keys: 'email'
36 | end
37 |
38 | # Scenario: User cannot sign in with wrong password
39 | # Given I exist as a user
40 | # And I am not signed in
41 | # When I sign in with a wrong password
42 | # Then I see an invalid password message
43 | scenario 'user cannot sign in with wrong password' do
44 | user = FactoryGirl.create(:user)
45 | signin(user.email, 'invalidpass')
46 | expect(page).to have_content I18n.t 'devise.failure.invalid', authentication_keys: 'email'
47 | end
48 |
49 | end
50 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular
15 | ```
16 |
17 | Then add a `
21 | ```
22 |
23 | Or `require('angular')` from your code.
24 |
25 | ### bower
26 |
27 | ```shell
28 | bower install angular
29 | ```
30 |
31 | Then add a `
35 | ```
36 |
37 | ## Documentation
38 |
39 | Documentation is available on the
40 | [AngularJS docs site](http://docs.angularjs.org/).
41 |
42 | ## License
43 |
44 | The MIT License
45 |
46 | Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
47 |
48 | Permission is hereby granted, free of charge, to any person obtaining a copy
49 | of this software and associated documentation files (the "Software"), to deal
50 | in the Software without restriction, including without limitation the rights
51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52 | copies of the Software, and to permit persons to whom the Software is
53 | furnished to do so, subject to the following conditions:
54 |
55 | The above copyright notice and this permission notice shall be included in
56 | all copies or substantial portions of the Software.
57 |
58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
64 | THE SOFTWARE.
65 |
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
1 | # encoding: UTF-8
2 | # This file is auto-generated from the current state of the database. Instead
3 | # of editing this file, please use the migrations feature of Active Record to
4 | # incrementally modify your database, and then regenerate this schema definition.
5 | #
6 | # Note that this schema.rb definition is the authoritative source for your
7 | # database schema. If you need to create the application database on another
8 | # system, you should be using db:schema:load, not running all the migrations
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 | # you'll amass, the slower it'll run and the greater likelihood for issues).
11 | #
12 | # It's strongly recommended that you check this file into your version control system.
13 |
14 | ActiveRecord::Schema.define(version: 20150303003938) do
15 |
16 | # These are extensions that must be enabled in order to support this database
17 | enable_extension "plpgsql"
18 |
19 | create_table "users", force: :cascade do |t|
20 | t.string "provider", null: false
21 | t.string "uid", default: "", null: false
22 | t.string "encrypted_password", default: "", null: false
23 | t.string "reset_password_token"
24 | t.datetime "reset_password_sent_at"
25 | t.datetime "remember_created_at"
26 | t.integer "sign_in_count", default: 0, null: false
27 | t.datetime "current_sign_in_at"
28 | t.datetime "last_sign_in_at"
29 | t.string "current_sign_in_ip"
30 | t.string "last_sign_in_ip"
31 | t.string "confirmation_token"
32 | t.datetime "confirmed_at"
33 | t.datetime "confirmation_sent_at"
34 | t.string "unconfirmed_email"
35 | t.string "name"
36 | t.string "nickname"
37 | t.string "image"
38 | t.string "email"
39 | t.text "tokens"
40 | t.datetime "created_at"
41 | t.datetime "updated_at"
42 | end
43 |
44 | add_index "users", ["email"], name: "index_users_on_email", using: :btree
45 | add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
46 | add_index "users", ["uid", "provider"], name: "index_users_on_uid_and_provider", unique: true, using: :btree
47 |
48 | end
49 |
--------------------------------------------------------------------------------
/public/assets/manifest-f2ab46698968d41fff061e470ae58d66.json:
--------------------------------------------------------------------------------
1 | {"files":{"application-47cdf73a3a390fa140dca78a7b5879c9.js":{"logical_path":"application.js","mtime":"2015-03-07T18:20:46+09:00","size":1543579,"digest":"47cdf73a3a390fa140dca78a7b5879c9"},"application-24f2e639150abde7f2ff1a2ff8008d45.css":{"logical_path":"application.css","mtime":"2015-03-07T16:58:12+09:00","size":373981,"digest":"24f2e639150abde7f2ff1a2ff8008d45"},"bootstrap/glyphicons-halflings-regular-033c875f6430c263e4f6fe9c06ec9015.eot":{"logical_path":"bootstrap/glyphicons-halflings-regular.eot","mtime":"2015-01-30T11:27:55+09:00","size":20127,"digest":"033c875f6430c263e4f6fe9c06ec9015"},"bootstrap/glyphicons-halflings-regular-85621c2e97137c357e0abe92bbdae3ee.svg":{"logical_path":"bootstrap/glyphicons-halflings-regular.svg","mtime":"2015-01-30T11:27:55+09:00","size":108738,"digest":"85621c2e97137c357e0abe92bbdae3ee"},"bootstrap/glyphicons-halflings-regular-643c8cde216f66208ee65c779cfcfe68.ttf":{"logical_path":"bootstrap/glyphicons-halflings-regular.ttf","mtime":"2015-01-30T11:27:55+09:00","size":45404,"digest":"643c8cde216f66208ee65c779cfcfe68"},"bootstrap/glyphicons-halflings-regular-08d958181d41ba7686e0630203a4348c.woff":{"logical_path":"bootstrap/glyphicons-halflings-regular.woff","mtime":"2015-01-30T11:27:55+09:00","size":23424,"digest":"08d958181d41ba7686e0630203a4348c"},"bootstrap/glyphicons-halflings-regular-85394b6c7572ced6a6e6b73186cac73c.woff2":{"logical_path":"bootstrap/glyphicons-halflings-regular.woff2","mtime":"2015-01-30T11:27:55+09:00","size":18028,"digest":"85394b6c7572ced6a6e6b73186cac73c"}},"assets":{"application.js":"application-47cdf73a3a390fa140dca78a7b5879c9.js","application.css":"application-24f2e639150abde7f2ff1a2ff8008d45.css","bootstrap/glyphicons-halflings-regular.eot":"bootstrap/glyphicons-halflings-regular-033c875f6430c263e4f6fe9c06ec9015.eot","bootstrap/glyphicons-halflings-regular.svg":"bootstrap/glyphicons-halflings-regular-85621c2e97137c357e0abe92bbdae3ee.svg","bootstrap/glyphicons-halflings-regular.ttf":"bootstrap/glyphicons-halflings-regular-643c8cde216f66208ee65c779cfcfe68.ttf","bootstrap/glyphicons-halflings-regular.woff":"bootstrap/glyphicons-halflings-regular-08d958181d41ba7686e0630203a4348c.woff","bootstrap/glyphicons-halflings-regular.woff2":"bootstrap/glyphicons-halflings-regular-85394b6c7572ced6a6e6b73186cac73c.woff2"}}
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | require 'rails/all'
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module DeviseTokenAuthDemo
10 | class Application < Rails::Application
11 |
12 | config.generators do |g|
13 | g.test_framework :rspec,
14 | fixtures: true,
15 | view_specs: false,
16 | helper_specs: false,
17 | routing_specs: false,
18 | controller_specs: false,
19 | request_specs: false
20 | g.fixture_replacement :factory_girl, dir: "spec/factories"
21 | end
22 |
23 | # Settings in config/environments/* take precedence over those specified here.
24 | # Application configuration should go into files in config/initializers
25 | # -- all .rb files in that directory are automatically loaded.
26 |
27 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
28 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
29 | # config.time_zone = 'Central Time (US & Canada)'
30 |
31 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
32 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
33 | # config.i18n.default_locale = :de
34 |
35 | # Do not swallow errors in after_commit/after_rollback callbacks.
36 | config.active_record.raise_in_transactional_callbacks = true
37 |
38 | # for grape api
39 | config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
40 | config.autoload_paths += Dir[Rails.root.join('app', 'api', '*')]
41 | config.autoload_paths += %W(#{config.root}/lib)
42 | config.middleware.use(Rack::Config) do |env|
43 | env['api.tilt.root'] = Rails.root.join 'app', 'views', 'api', 'v1'
44 | end
45 |
46 | config.middleware.insert_before 0, "Rack::Cors" do
47 | allow do
48 | origins '*'
49 | resource '*',
50 | :headers => :any,
51 | :expose => ['access-token', 'expiry', 'token-type', 'uid', 'client'],
52 | :methods => [:get, :post, :options, :delete, :put]
53 | end
54 | end
55 |
56 | end
57 | end
58 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-resource/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular-resource
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngResource).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular-resource
15 | ```
16 |
17 | Then add `ngResource` as a dependency for your app:
18 |
19 | ```javascript
20 | angular.module('myApp', [require('angular-resource')]);
21 | ```
22 |
23 | ### bower
24 |
25 | ```shell
26 | bower install angular-resource
27 | ```
28 |
29 | Add a `
33 | ```
34 |
35 | Then add `ngResource` as a dependency for your app:
36 |
37 | ```javascript
38 | angular.module('myApp', ['ngResource']);
39 | ```
40 |
41 | ## Documentation
42 |
43 | Documentation is available on the
44 | [AngularJS docs site](http://docs.angularjs.org/api/ngResource).
45 |
46 | ## License
47 |
48 | The MIT License
49 |
50 | Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
51 |
52 | Permission is hereby granted, free of charge, to any person obtaining a copy
53 | of this software and associated documentation files (the "Software"), to deal
54 | in the Software without restriction, including without limitation the rights
55 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
56 | copies of the Software, and to permit persons to whom the Software is
57 | furnished to do so, subject to the following conditions:
58 |
59 | The above copyright notice and this permission notice shall be included in
60 | all copies or substantial portions of the Software.
61 |
62 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
66 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
67 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
68 | THE SOFTWARE.
69 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-ui-router/src/view.js:
--------------------------------------------------------------------------------
1 |
2 | $ViewProvider.$inject = [];
3 | function $ViewProvider() {
4 |
5 | this.$get = $get;
6 | /**
7 | * @ngdoc object
8 | * @name ui.router.state.$view
9 | *
10 | * @requires ui.router.util.$templateFactory
11 | * @requires $rootScope
12 | *
13 | * @description
14 | *
15 | */
16 | $get.$inject = ['$rootScope', '$templateFactory'];
17 | function $get( $rootScope, $templateFactory) {
18 | return {
19 | // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })
20 | /**
21 | * @ngdoc function
22 | * @name ui.router.state.$view#load
23 | * @methodOf ui.router.state.$view
24 | *
25 | * @description
26 | *
27 | * @param {string} name name
28 | * @param {object} options option object.
29 | */
30 | load: function load(name, options) {
31 | var result, defaults = {
32 | template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}
33 | };
34 | options = extend(defaults, options);
35 |
36 | if (options.view) {
37 | result = $templateFactory.fromConfig(options.view, options.params, options.locals);
38 | }
39 | if (result && options.notify) {
40 | /**
41 | * @ngdoc event
42 | * @name ui.router.state.$state#$viewContentLoading
43 | * @eventOf ui.router.state.$view
44 | * @eventType broadcast on root scope
45 | * @description
46 | *
47 | * Fired once the view **begins loading**, *before* the DOM is rendered.
48 | *
49 | * @param {Object} event Event object.
50 | * @param {Object} viewConfig The view config properties (template, controller, etc).
51 | *
52 | * @example
53 | *
54 | *
55 | * $scope.$on('$viewContentLoading',
56 | * function(event, viewConfig){
57 | * // Access to all the view config properties.
58 | * // and one special property 'targetView'
59 | * // viewConfig.targetView
60 | * });
61 | *
62 | */
63 | $rootScope.$broadcast('$viewContentLoading', options);
64 | }
65 | return result;
66 | }
67 | };
68 | }
69 | }
70 |
71 | angular.module('ui.router.state').provider('$view', $ViewProvider);
72 |
--------------------------------------------------------------------------------
/spec/rails_helper.rb:
--------------------------------------------------------------------------------
1 | # This file is copied to spec/ when you run 'rails generate rspec:install'
2 | ENV['RAILS_ENV'] ||= 'test'
3 | require 'spec_helper'
4 | require File.expand_path('../../config/environment', __FILE__)
5 | require 'rspec/rails'
6 | # Add additional requires below this line. Rails is not loaded until this point!
7 |
8 | # Requires supporting ruby files with custom matchers and macros, etc, in
9 | # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
10 | # run as spec files by default. This means that files in spec/support that end
11 | # in _spec.rb will both be required and run as specs, causing the specs to be
12 | # run twice. It is recommended that you do not name files matching this glob to
13 | # end with _spec.rb. You can configure this pattern with the --pattern
14 | # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
15 | #
16 | # The following line is provided for convenience purposes. It has the downside
17 | # of increasing the boot-up time by auto-requiring all files in the support
18 | # directory. Alternatively, in the individual `*_spec.rb` files, manually
19 | # require only the support files necessary.
20 | #
21 | Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
22 |
23 | # Checks for pending migrations before tests are run.
24 | # If you are not using ActiveRecord, you can remove this line.
25 | ActiveRecord::Migration.maintain_test_schema!
26 |
27 | RSpec.configure do |config|
28 | # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
29 | config.fixture_path = "#{::Rails.root}/spec/fixtures"
30 |
31 | # If you're not using ActiveRecord, or you'd prefer not to run each of your
32 | # examples within a transaction, remove the following line or assign false
33 | # instead of true.
34 | config.use_transactional_fixtures = false
35 |
36 | # RSpec Rails can automatically mix in different behaviours to your tests
37 | # based on their file location, for example enabling you to call `get` and
38 | # `post` in specs under `spec/controllers`.
39 | #
40 | # You can disable this behaviour by removing the line below, and instead
41 | # explicitly tag your specs with their type, e.g.:
42 | #
43 | # RSpec.describe UsersController, :type => :controller do
44 | # # ...
45 | # end
46 | #
47 | # The different available types are documented in the features, such as in
48 | # https://relishapp.com/rspec/rspec-rails/docs
49 | config.infer_spec_type_from_file_location!
50 | end
51 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Devise Token Auth Demo
2 | ================
3 |
4 | Rails Composer, open source, supported by subscribers.
5 | Please join RailsApps to support development of Rails Composer.
6 | Need help? Ask on Stack Overflow with the tag 'railsapps.'
7 | Problems? Submit an issue: https://github.com/RailsApps/rails_apps_composer/issues
8 | Your application contains diagnostics in this README file.
9 | Please provide a copy of this README file when reporting any issues.
10 |
11 |
12 | option Build a starter application?
13 | choose Enter your selection: [none]
14 | option Get on the mailing list for Rails Composer news?
15 | choose Enter your selection: [none]
16 | option Web server for development?
17 | choose Enter your selection: [webrick]
18 | option Web server for production?
19 | choose Enter your selection: [unicorn]
20 | option Database used in development?
21 | choose Enter your selection: [postgresql]
22 | option Template engine?
23 | choose Enter your selection: [erb]
24 | option Test framework?
25 | choose Enter your selection: [rspec]
26 | option Continuous testing?
27 | choose Enter your selection: [guard]
28 | option Front-end framework?
29 | choose Enter your selection: [bootstrap3]
30 | option Add support for sending email?
31 | choose Enter your selection: [gmail]
32 | option Authentication?
33 | choose Enter your selection: [devise]
34 | option Devise modules?
35 | choose Enter your selection: [default]
36 | option OmniAuth provider?
37 | choose Enter your selection: []
38 | option Authorization?
39 | choose Enter your selection: [none]
40 | option Use a form builder gem?
41 | choose Enter your selection: [none]
42 | option Add pages?
43 | choose Enter your selection: [home]
44 | option Set a locale?
45 | choose Enter your selection: [none]
46 | option Install page-view analytics?
47 | choose Enter your selection: [none]
48 | option Add a deployment mechanism?
49 | choose Enter your selection: [heroku]
50 | option Set a robots.txt file to ban spiders?
51 | choose Enter your selection: []
52 | option Create a GitHub repository? (y/n)
53 | choose Enter your selection: [true]
54 | option Add gem and file for environment variables?
55 | choose Enter your selection: [foreman]
56 | option Reduce assets logger noise during development?
57 | choose Enter your selection: [true]
58 | option Improve error reporting with 'better_errors' during development?
59 | choose Enter your selection: [true]
60 | option Use 'pry' as console replacement during development and test?
61 | choose Enter your selection: [true]
62 | option Use or create a project-specific rvm gemset?
63 | choose Enter your selection: [false]
64 |
--------------------------------------------------------------------------------
/spec/features/visitors/sign_up_spec.rb:
--------------------------------------------------------------------------------
1 | # Feature: Sign up
2 | # As a visitor
3 | # I want to sign up
4 | # So I can visit protected areas of the site
5 | feature 'Sign Up', :devise do
6 |
7 | # Scenario: Visitor can sign up with valid email address and password
8 | # Given I am not signed in
9 | # When I sign up with a valid email address and password
10 | # Then I see a successful sign up message
11 | scenario 'visitor can sign up with valid email address and password' do
12 | sign_up_with('test@example.com', 'please123', 'please123')
13 | txts = [I18n.t( 'devise.registrations.signed_up'), I18n.t( 'devise.registrations.signed_up_but_unconfirmed')]
14 | expect(page).to have_content(/.*#{txts[0]}.*|.*#{txts[1]}.*/)
15 | end
16 |
17 | # Scenario: Visitor cannot sign up with invalid email address
18 | # Given I am not signed in
19 | # When I sign up with an invalid email address
20 | # Then I see an invalid email message
21 | scenario 'visitor cannot sign up with invalid email address' do
22 | sign_up_with('bogus', 'please123', 'please123')
23 | expect(page).to have_content 'Email is invalid'
24 | end
25 |
26 | # Scenario: Visitor cannot sign up without password
27 | # Given I am not signed in
28 | # When I sign up without a password
29 | # Then I see a missing password message
30 | scenario 'visitor cannot sign up without password' do
31 | sign_up_with('test@example.com', '', '')
32 | expect(page).to have_content "Password can't be blank"
33 | end
34 |
35 | # Scenario: Visitor cannot sign up with a short password
36 | # Given I am not signed in
37 | # When I sign up with a short password
38 | # Then I see a 'too short password' message
39 | scenario 'visitor cannot sign up with a short password' do
40 | sign_up_with('test@example.com', 'please', 'please')
41 | expect(page).to have_content "Password is too short"
42 | end
43 |
44 | # Scenario: Visitor cannot sign up without password confirmation
45 | # Given I am not signed in
46 | # When I sign up without a password confirmation
47 | # Then I see a missing password confirmation message
48 | scenario 'visitor cannot sign up without password confirmation' do
49 | sign_up_with('test@example.com', 'please123', '')
50 | expect(page).to have_content "Password confirmation doesn't match"
51 | end
52 |
53 | # Scenario: Visitor cannot sign up with mismatched password and confirmation
54 | # Given I am not signed in
55 | # When I sign up with a mismatched password confirmation
56 | # Then I should see a mismatched password message
57 | scenario 'visitor cannot sign up with mismatched password and confirmation' do
58 | sign_up_with('test@example.com', 'please123', 'mismatch')
59 | expect(page).to have_content "Password confirmation doesn't match"
60 | end
61 |
62 | end
63 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-resource/angular-resource.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | AngularJS v1.3.14
3 | (c) 2010-2014 Google, Inc. http://angularjs.org
4 | License: MIT
5 | */
6 | (function(I,d,B){'use strict';function D(f,q){q=q||{};d.forEach(q,function(d,h){delete q[h]});for(var h in f)!f.hasOwnProperty(h)||"$"===h.charAt(0)&&"$"===h.charAt(1)||(q[h]=f[h]);return q}var w=d.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var f=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};
7 | this.$get=["$http","$q",function(q,h){function t(d,g){this.template=d;this.defaults=s({},f.defaults,g);this.urlParams={}}function v(x,g,l,m){function c(b,k){var c={};k=s({},g,k);r(k,function(a,k){u(a)&&(a=a());var d;if(a&&a.charAt&&"@"==a.charAt(0)){d=b;var e=a.substr(1);if(null==e||""===e||"hasOwnProperty"===e||!C.test("."+e))throw w("badmember",e);for(var e=e.split("."),n=0,g=e.length;n Rails.application.secrets.domain_name }
85 | config.action_mailer.delivery_method = :smtp
86 | config.action_mailer.perform_deliveries = true
87 | config.action_mailer.raise_delivery_errors = false
88 |
89 |
90 | # Use default logging formatter so that PID and timestamp are not suppressed.
91 | config.log_formatter = ::Logger::Formatter.new
92 |
93 | # Do not dump schema after migrations.
94 | config.active_record.dump_schema_after_migration = false
95 | end
96 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-cookie/angular-cookie.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Ivan Pusic
3 | * Contributors:
4 | * Matjaz Lipus
5 | */
6 | angular.module('ivpusic.cookie', ['ipCookie']);
7 | angular.module('ipCookie', ['ng']).
8 | factory('ipCookie', ['$document',
9 | function ($document) {
10 | 'use strict';
11 |
12 | function tryDecodeURIComponent(value) {
13 | try {
14 | return decodeURIComponent(value);
15 | } catch(e) {
16 | // Ignore any invalid uri component
17 | }
18 | }
19 |
20 | return (function () {
21 | function cookieFun(key, value, options) {
22 |
23 | var cookies,
24 | list,
25 | i,
26 | cookie,
27 | pos,
28 | name,
29 | hasCookies,
30 | all,
31 | expiresFor;
32 |
33 | options = options || {};
34 |
35 | if (value !== undefined) {
36 | // we are setting value
37 | value = typeof value === 'object' ? JSON.stringify(value) : String(value);
38 |
39 | if (typeof options.expires === 'number') {
40 | expiresFor = options.expires;
41 | options.expires = new Date();
42 | // Trying to delete a cookie; set a date far in the past
43 | if (expiresFor === -1) {
44 | options.expires = new Date('Thu, 01 Jan 1970 00:00:00 GMT');
45 | // A new
46 | } else if (options.expirationUnit !== undefined) {
47 | if (options.expirationUnit === 'hours') {
48 | options.expires.setHours(options.expires.getHours() + expiresFor);
49 | } else if (options.expirationUnit === 'minutes') {
50 | options.expires.setMinutes(options.expires.getMinutes() + expiresFor);
51 | } else if (options.expirationUnit === 'seconds') {
52 | options.expires.setSeconds(options.expires.getSeconds() + expiresFor);
53 | } else {
54 | options.expires.setDate(options.expires.getDate() + expiresFor);
55 | }
56 | } else {
57 | options.expires.setDate(options.expires.getDate() + expiresFor);
58 | }
59 | }
60 | return ($document[0].cookie = [
61 | encodeURIComponent(key),
62 | '=',
63 | encodeURIComponent(value),
64 | options.expires ? '; expires=' + options.expires.toUTCString() : '',
65 | options.path ? '; path=' + options.path : '',
66 | options.domain ? '; domain=' + options.domain : '',
67 | options.secure ? '; secure' : ''
68 | ].join(''));
69 | }
70 |
71 | list = [];
72 | all = $document[0].cookie;
73 | if (all) {
74 | list = all.split('; ');
75 | }
76 |
77 | cookies = {};
78 | hasCookies = false;
79 |
80 | for (i = 0; i < list.length; ++i) {
81 | if (list[i]) {
82 | cookie = list[i];
83 | pos = cookie.indexOf('=');
84 | name = cookie.substring(0, pos);
85 | value = tryDecodeURIComponent(cookie.substring(pos + 1));
86 | if(angular.isUndefined(value))
87 | continue;
88 |
89 | if (key === undefined || key === name) {
90 | try {
91 | cookies[name] = JSON.parse(value);
92 | } catch (e) {
93 | cookies[name] = value;
94 | }
95 | if (key === name) {
96 | return cookies[name];
97 | }
98 | hasCookies = true;
99 | }
100 | }
101 | }
102 | if (hasCookies && key === undefined) {
103 | return cookies;
104 | }
105 | }
106 | cookieFun.remove = function (key, options) {
107 | var hasCookie = cookieFun(key) !== undefined;
108 |
109 | if (hasCookie) {
110 | if (!options) {
111 | options = {};
112 | }
113 | options.expires = -1;
114 | cookieFun(key, '', options);
115 | }
116 | return hasCookie;
117 | };
118 | return cookieFun;
119 | }());
120 | }
121 | ]);
122 |
--------------------------------------------------------------------------------
/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2 | # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3 | # The generated `.rspec` file contains `--require spec_helper` which will cause
4 | # this file to always be loaded, without a need to explicitly require it in any
5 | # files.
6 | #
7 | # Given that it is always loaded, you are encouraged to keep this file as
8 | # light-weight as possible. Requiring heavyweight dependencies from this file
9 | # will add to the boot time of your test suite on EVERY test run, even for an
10 | # individual file that may not need all of that loaded. Instead, consider making
11 | # a separate helper file that requires the additional dependencies and performs
12 | # the additional setup, and require it from the spec files that actually need
13 | # it.
14 | #
15 | # The `.rspec` file also contains a few flags that are not defaults but that
16 | # users commonly want.
17 | #
18 | # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19 | RSpec.configure do |config|
20 | # rspec-expectations config goes here. You can use an alternate
21 | # assertion/expectation library such as wrong or the stdlib/minitest
22 | # assertions if you prefer.
23 | config.expect_with :rspec do |expectations|
24 | # This option will default to `true` in RSpec 4. It makes the `description`
25 | # and `failure_message` of custom matchers include text for helper methods
26 | # defined using `chain`, e.g.:
27 | # be_bigger_than(2).and_smaller_than(4).description
28 | # # => "be bigger than 2 and smaller than 4"
29 | # ...rather than:
30 | # # => "be bigger than 2"
31 | expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32 | end
33 |
34 | # rspec-mocks config goes here. You can use an alternate test double
35 | # library (such as bogus or mocha) by changing the `mock_with` option here.
36 | config.mock_with :rspec do |mocks|
37 | # Prevents you from mocking or stubbing a method that does not exist on
38 | # a real object. This is generally recommended, and will default to
39 | # `true` in RSpec 4.
40 | mocks.verify_partial_doubles = true
41 | end
42 |
43 | # The settings below are suggested to provide a good initial experience
44 | # with RSpec, but feel free to customize to your heart's content.
45 | =begin
46 | # These two settings work together to allow you to limit a spec run
47 | # to individual examples or groups you care about by tagging them with
48 | # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49 | # get run.
50 | config.filter_run :focus
51 | config.run_all_when_everything_filtered = true
52 |
53 | # Limits the available syntax to the non-monkey patched syntax that is
54 | # recommended. For more details, see:
55 | # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
56 | # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
57 | # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
58 | config.disable_monkey_patching!
59 |
60 | # Many RSpec users commonly either run the entire suite or an individual
61 | # file, and it's useful to allow more verbose output when running an
62 | # individual spec file.
63 | if config.files_to_run.one?
64 | # Use the documentation formatter for detailed output,
65 | # unless a formatter has already been configured
66 | # (e.g. via a command-line flag).
67 | config.default_formatter = 'doc'
68 | end
69 |
70 | # Print the 10 slowest examples and example groups at the
71 | # end of the spec run, to help surface which specs are running
72 | # particularly slow.
73 | config.profile_examples = 10
74 |
75 | # Run specs in random order to surface order dependencies. If you find an
76 | # order dependency and want to debug it, you can fix the order by providing
77 | # the seed, which is printed after each run.
78 | # --seed 1234
79 | config.order = :random
80 |
81 | # Seed global randomization in this process using the `--seed` CLI option.
82 | # Setting this allows you to use `--seed` to deterministically reproduce
83 | # test failures related to randomization by passing the same `--seed` value
84 | # as the one that triggered the failure.
85 | Kernel.srand config.seed
86 | =end
87 | end
88 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-ui-router/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
2 | # Report an Issue
3 |
4 | Help us make UI-Router better! If you think you might have found a bug, or some other weirdness, start by making sure
5 | it hasn't already been reported. You can [search through existing issues](https://github.com/angular-ui/ui-router/search?q=wat%3F&type=Issues)
6 | to see if someone's reported one similar to yours.
7 |
8 | If not, then [create a plunkr](http://bit.ly/UIR-Plunk) that demonstrates the problem (try to use as little code
9 | as possible: the more minimalist, the faster we can debug it).
10 |
11 | Next, [create a new issue](https://github.com/angular-ui/ui-router/issues/new) that briefly explains the problem,
12 | and provides a bit of background as to the circumstances that triggered it. Don't forget to include the link to
13 | that plunkr you created!
14 |
15 | **Note**: If you're unsure how a feature is used, or are encountering some unexpected behavior that you aren't sure
16 | is a bug, it's best to talk it out on
17 | [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) before reporting it. This
18 | keeps development streamlined, and helps us focus on building great software.
19 |
20 |
21 | Issues only! |
22 | -------------|
23 | Please keep in mind that the issue tracker is for *issues*. Please do *not* post an issue if you need help or support. Instead, see one of the above-mentioned forums or [IRC](irc://irc.freenode.net/#angularjs). |
24 |
25 | ####Purple Labels
26 | A purple label means that **you** need to take some further action.
27 | - : Your issue is not specific enough, or there is no clear action that we can take. Please clarify and refine your issue.
28 | - : Please [create a plunkr](http://bit.ly/UIR-Plunk)
29 | - : We suspect your issue is really a help request, or could be answered by the community. Please ask your question on [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router). If you determine that is an actual issue, please explain why.
30 |
31 | If your issue gets labeled with purple label, no further action will be taken until you respond to the label appropriately.
32 |
33 | # Contribute
34 |
35 | **(1)** See the **[Developing](#developing)** section below, to get the development version of UI-Router up and running on your local machine.
36 |
37 | **(2)** Check out the [roadmap](https://github.com/angular-ui/ui-router/milestones) to see where the project is headed, and if your feature idea fits with where we're headed.
38 |
39 | **(3)** If you're not sure, [open an RFC](https://github.com/angular-ui/ui-router/issues/new?title=RFC:%20My%20idea) to get some feedback on your idea.
40 |
41 | **(4)** Finally, commit some code and open a pull request. Code & commits should abide by the following rules:
42 |
43 | - *Always* have test coverage for new features (or regression tests for bug fixes), and *never* break existing tests
44 | - Commits should represent one logical change each; if a feature goes through multiple iterations, squash your commits down to one
45 | - Make sure to follow the [Angular commit message format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) so your change will appear in the changelog of the next release.
46 | - Changes should always respect the coding style of the project
47 |
48 |
49 |
50 | # Developing
51 |
52 | UI-Router uses grunt >= 0.4.x. Make sure to upgrade your environment and read the
53 | [Migration Guide](http://gruntjs.com/upgrading-from-0.3-to-0.4).
54 |
55 | Dependencies for building from source and running tests:
56 |
57 | * [grunt-cli](https://github.com/gruntjs/grunt-cli) - run: `$ npm install -g grunt-cli`
58 | * Then, install the development dependencies by running `$ npm install` from the project directory
59 |
60 | There are a number of targets in the gruntfile that are used to generating different builds:
61 |
62 | * `grunt`: Perform a normal build, runs jshint and karma tests
63 | * `grunt build`: Perform a normal build
64 | * `grunt dist`: Perform a clean build and generate documentation
65 | * `grunt dev`: Run dev server (sample app) and watch for changes, builds and runs karma tests on changes.
66 |
--------------------------------------------------------------------------------
/Guardfile:
--------------------------------------------------------------------------------
1 | # A sample Guardfile
2 | # More info at https://github.com/guard/guard#readme
3 |
4 | ## Uncomment and set this to only include directories you want to watch
5 | # directories %w(app lib config test spec features)
6 |
7 | ## Uncomment to clear the screen before every task
8 | # clearing :on
9 |
10 | ## Guard internally checks for changes in the Guardfile and exits.
11 | ## If you want Guard to automatically start up again, run guard in a
12 | ## shell loop, e.g.:
13 | ##
14 | ## $ while bundle exec guard; do echo "Restarting Guard..."; done
15 | ##
16 | ## Note: if you are using the `directories` clause above and you are not
17 | ## watching the project directory ('.'), then you will want to move
18 | ## the Guardfile to a watched dir and symlink it back, e.g.
19 | #
20 | # $ mkdir config
21 | # $ mv Guardfile config/
22 | # $ ln -s config/Guardfile .
23 | #
24 | # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
25 |
26 | guard :bundler do
27 | require 'guard/bundler'
28 | require 'guard/bundler/verify'
29 | helper = Guard::Bundler::Verify.new
30 |
31 | files = ['Gemfile']
32 | files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
33 |
34 | # Assume files are symlinked from somewhere
35 | files.each { |file| watch(helper.real_path(file)) }
36 | end
37 |
38 | # Guard-Rails supports a lot options with default values:
39 | # daemon: false # runs the server as a daemon.
40 | # debugger: false # enable ruby-debug gem.
41 | # environment: 'development' # changes server environment.
42 | # force_run: false # kills any process that's holding the listen port before attempting to (re)start Rails.
43 | # pid_file: 'tmp/pids/[RAILS_ENV].pid' # specify your pid_file.
44 | # host: 'localhost' # server hostname.
45 | # port: 3000 # server port number.
46 | # root: '/spec/dummy' # Rails' root path.
47 | # server: thin # webserver engine.
48 | # start_on_start: true # will start the server when starting Guard.
49 | # timeout: 30 # waits untill restarting the Rails server, in seconds.
50 | # zeus_plan: server # custom plan in zeus, only works with `zeus: true`.
51 | # zeus: false # enables zeus gem.
52 | # CLI: 'rails server' # customizes runner command. Omits all options except `pid_file`!
53 |
54 | guard 'rails' do
55 | watch('Gemfile.lock')
56 | watch(%r{^(config|lib)/.*})
57 | end
58 |
59 | # Note: The cmd option is now required due to the increasing number of ways
60 | # rspec may be run, below are examples of the most common uses.
61 | # * bundler: 'bundle exec rspec'
62 | # * bundler binstubs: 'bin/rspec'
63 | # * spring: 'bin/rspec' (This will use spring if running and you have
64 | # installed the spring binstubs per the docs)
65 | # * zeus: 'zeus rspec' (requires the server to be started separately)
66 | # * 'just' rspec: 'rspec'
67 |
68 | guard :rspec, cmd: "bundle exec rspec" do
69 | require "guard/rspec/dsl"
70 | dsl = Guard::RSpec::Dsl.new(self)
71 |
72 | # Feel free to open issues for suggestions and improvements
73 |
74 | # RSpec files
75 | rspec = dsl.rspec
76 | watch(rspec.spec_helper) { rspec.spec_dir }
77 | watch(rspec.spec_support) { rspec.spec_dir }
78 | watch(rspec.spec_files)
79 |
80 | # Ruby files
81 | ruby = dsl.ruby
82 | dsl.watch_spec_files_for(ruby.lib_files)
83 |
84 | # Rails files
85 | rails = dsl.rails(view_extensions: %w(erb haml slim))
86 | dsl.watch_spec_files_for(rails.app_files)
87 | dsl.watch_spec_files_for(rails.views)
88 |
89 | watch(rails.controllers) do |m|
90 | [
91 | rspec.spec.("routing/#{m[1]}_routing"),
92 | rspec.spec.("controllers/#{m[1]}_controller"),
93 | rspec.spec.("acceptance/#{m[1]}")
94 | ]
95 | end
96 |
97 | # Rails config changes
98 | watch(rails.spec_helper) { rspec.spec_dir }
99 | watch(rails.routes) { "#{rspec.spec_dir}/routing" }
100 | watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
101 |
102 | # Capybara features specs
103 | watch(rails.view_dirs) { |m| rspec.spec.("features/#{m[1]}") }
104 |
105 | # Turnip features and steps
106 | watch(%r{^spec/acceptance/(.+)\.feature$})
107 | watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
108 | Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
109 | end
110 | end
111 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-ui-router/src/templateFactory.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc object
3 | * @name ui.router.util.$templateFactory
4 | *
5 | * @requires $http
6 | * @requires $templateCache
7 | * @requires $injector
8 | *
9 | * @description
10 | * Service. Manages loading of templates.
11 | */
12 | $TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];
13 | function $TemplateFactory( $http, $templateCache, $injector) {
14 |
15 | /**
16 | * @ngdoc function
17 | * @name ui.router.util.$templateFactory#fromConfig
18 | * @methodOf ui.router.util.$templateFactory
19 | *
20 | * @description
21 | * Creates a template from a configuration object.
22 | *
23 | * @param {object} config Configuration object for which to load a template.
24 | * The following properties are search in the specified order, and the first one
25 | * that is defined is used to create the template:
26 | *
27 | * @param {string|object} config.template html string template or function to
28 | * load via {@link ui.router.util.$templateFactory#fromString fromString}.
29 | * @param {string|object} config.templateUrl url to load or a function returning
30 | * the url to load via {@link ui.router.util.$templateFactory#fromUrl fromUrl}.
31 | * @param {Function} config.templateProvider function to invoke via
32 | * {@link ui.router.util.$templateFactory#fromProvider fromProvider}.
33 | * @param {object} params Parameters to pass to the template function.
34 | * @param {object} locals Locals to pass to `invoke` if the template is loaded
35 | * via a `templateProvider`. Defaults to `{ params: params }`.
36 | *
37 | * @return {string|object} The template html as a string, or a promise for
38 | * that string,or `null` if no template is configured.
39 | */
40 | this.fromConfig = function (config, params, locals) {
41 | return (
42 | isDefined(config.template) ? this.fromString(config.template, params) :
43 | isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :
44 | isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :
45 | null
46 | );
47 | };
48 |
49 | /**
50 | * @ngdoc function
51 | * @name ui.router.util.$templateFactory#fromString
52 | * @methodOf ui.router.util.$templateFactory
53 | *
54 | * @description
55 | * Creates a template from a string or a function returning a string.
56 | *
57 | * @param {string|object} template html template as a string or function that
58 | * returns an html template as a string.
59 | * @param {object} params Parameters to pass to the template function.
60 | *
61 | * @return {string|object} The template html as a string, or a promise for that
62 | * string.
63 | */
64 | this.fromString = function (template, params) {
65 | return isFunction(template) ? template(params) : template;
66 | };
67 |
68 | /**
69 | * @ngdoc function
70 | * @name ui.router.util.$templateFactory#fromUrl
71 | * @methodOf ui.router.util.$templateFactory
72 | *
73 | * @description
74 | * Loads a template from the a URL via `$http` and `$templateCache`.
75 | *
76 | * @param {string|Function} url url of the template to load, or a function
77 | * that returns a url.
78 | * @param {Object} params Parameters to pass to the url function.
79 | * @return {string|Promise.} The template html as a string, or a promise
80 | * for that string.
81 | */
82 | this.fromUrl = function (url, params) {
83 | if (isFunction(url)) url = url(params);
84 | if (url == null) return null;
85 | else return $http
86 | .get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})
87 | .then(function(response) { return response.data; });
88 | };
89 |
90 | /**
91 | * @ngdoc function
92 | * @name ui.router.util.$templateFactory#fromProvider
93 | * @methodOf ui.router.util.$templateFactory
94 | *
95 | * @description
96 | * Creates a template by invoking an injectable provider function.
97 | *
98 | * @param {Function} provider Function to invoke via `$injector.invoke`
99 | * @param {Object} params Parameters for the template.
100 | * @param {Object} locals Locals to pass to `invoke`. Defaults to
101 | * `{ params: params }`.
102 | * @return {string|Promise.} The template html as a string, or a promise
103 | * for that string.
104 | */
105 | this.fromProvider = function (provider, params, locals) {
106 | return $injector.invoke(provider, null, locals || { params: params });
107 | };
108 | }
109 |
110 | angular.module('ui.router.util').service('$templateFactory', $TemplateFactory);
111 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-ui-router/api/angular-ui-router.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for Angular JS 1.1.5+ (ui.router module)
2 | // Project: https://github.com/angular-ui/ui-router
3 | // Definitions by: Michel Salib
4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
5 |
6 | declare module ng.ui {
7 |
8 | interface IState {
9 | name?: string;
10 | template?: string;
11 | templateUrl?: any; // string || () => string
12 | templateProvider?: any; // () => string || IPromise
13 | controller?: any;
14 | controllerAs?: string;
15 | controllerProvider?: any;
16 | resolve?: {};
17 | url?: string;
18 | params?: any;
19 | views?: {};
20 | abstract?: boolean;
21 | onEnter?: (...args: any[]) => void;
22 | onExit?: (...args: any[]) => void;
23 | data?: any;
24 | reloadOnSearch?: boolean;
25 | }
26 |
27 | interface ITypedState extends IState {
28 | data?: T;
29 | }
30 |
31 | interface IStateProvider extends IServiceProvider {
32 | state(name: string, config: IState): IStateProvider;
33 | state(config: IState): IStateProvider;
34 | decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
35 | }
36 |
37 | interface IUrlMatcher {
38 | concat(pattern: string): IUrlMatcher;
39 | exec(path: string, searchParams: {}): {};
40 | parameters(): string[];
41 | format(values: {}): string;
42 | }
43 |
44 | interface IUrlMatcherFactory {
45 | compile(pattern: string): IUrlMatcher;
46 | isMatcher(o: any): boolean;
47 | }
48 |
49 | interface IUrlRouterProvider extends IServiceProvider {
50 | when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
51 | when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
52 | when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
53 | when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider;
54 | when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider;
55 | when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider;
56 | when(whenPath: string, handler: Function): IUrlRouterProvider;
57 | when(whenPath: string, handler: any[]): IUrlRouterProvider;
58 | when(whenPath: string, toPath: string): IUrlRouterProvider;
59 | otherwise(handler: Function): IUrlRouterProvider;
60 | otherwise(handler: any[]): IUrlRouterProvider;
61 | otherwise(path: string): IUrlRouterProvider;
62 | rule(handler: Function): IUrlRouterProvider;
63 | rule(handler: any[]): IUrlRouterProvider;
64 | }
65 |
66 | interface IStateOptions {
67 | location?: any;
68 | inherit?: boolean;
69 | relative?: IState;
70 | notify?: boolean;
71 | reload?: boolean;
72 | }
73 |
74 | interface IHrefOptions {
75 | lossy?: boolean;
76 | inherit?: boolean;
77 | relative?: IState;
78 | absolute?: boolean;
79 | }
80 |
81 | interface IStateService {
82 | go(to: string, params?: {}, options?: IStateOptions): IPromise;
83 | transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
84 | transitionTo(state: string, params?: {}, options?: IStateOptions): void;
85 | includes(state: string, params?: {}): boolean;
86 | is(state:string, params?: {}): boolean;
87 | is(state: IState, params?: {}): boolean;
88 | href(state: IState, params?: {}, options?: IHrefOptions): string;
89 | href(state: string, params?: {}, options?: IHrefOptions): string;
90 | get(state: string): IState;
91 | get(): IState[];
92 | current: IState;
93 | params: any;
94 | reload(): void;
95 | }
96 |
97 | interface IStateParamsService {
98 | [key: string]: any;
99 | }
100 |
101 | interface IStateParams {
102 | [key: string]: any;
103 | }
104 |
105 | interface IUrlRouterService {
106 | /*
107 | * Triggers an update; the same update that happens when the address bar
108 | * url changes, aka $locationChangeSuccess.
109 | *
110 | * This method is useful when you need to use preventDefault() on the
111 | * $locationChangeSuccess event, perform some custom logic (route protection,
112 | * auth, config, redirection, etc) and then finally proceed with the transition
113 | * by calling $urlRouter.sync().
114 | *
115 | */
116 | sync(): void;
117 | }
118 |
119 | interface IUiViewScrollProvider {
120 | /*
121 | * Reverts back to using the core $anchorScroll service for scrolling
122 | * based on the url anchor.
123 | */
124 | useAnchorScroll(): void;
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-resource/angular-resource.min.js.map:
--------------------------------------------------------------------------------
1 | {
2 | "version":3,
3 | "file":"angular-resource.min.js",
4 | "lineCount":12,
5 | "mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6BtCC,QAASA,EAAmB,CAACC,CAAD,CAAMC,CAAN,CAAW,CACrCA,CAAA,CAAMA,CAAN,EAAa,EAEbJ,EAAAK,QAAA,CAAgBD,CAAhB,CAAqB,QAAQ,CAACE,CAAD,CAAQC,CAAR,CAAa,CACxC,OAAOH,CAAA,CAAIG,CAAJ,CADiC,CAA1C,CAIA,KAASA,IAAAA,CAAT,GAAgBJ,EAAhB,CACM,CAA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C,CAoBIb,EAAAxE,SAAAC,qBAAJ,GACEY,CADF,CACQA,CAAAgE,QAAA,CAAY,MAAZ,CAAoB,EAApB,CADR,EACmC,GADnC,CAMAhE,EAAA,CAAMA,CAAAgE,QAAA,CAAY,mBAAZ,CAAiC,GAAjC,CAENP,EAAAzD,IAAA,CAAaA,CAAAgE,QAAA,CAAY,QAAZ,CAAsB,IAAtB,CAIbvF,EAAA,CAAQwD,CAAR,CAAgB,QAAQ,CAACvD,CAAD,CAAQC,CAAR,CAAa,CAC9BgF,CAAA7D,UAAA,CAAenB,CAAf,CAAL,GACE8E,CAAAxB,OACA,CADgBwB,CAAAxB,OAChB,EADiC,EACjC,CAAAwB,CAAAxB,OAAA,CAActD,CAAd,CAAA,CAAqBD,CAFvB,CADmC,CAArC,CAnDgD,CADlC,CA+OlB,OAAOqB,EApSuC,CAApC,CAjBmB,CADnC,CA3VsC,CAArC,CAAD,CAspBG5B,MAtpBH,CAspBWA,MAAAC,QAtpBX;",
6 | "sources":["angular-resource.js"],
7 | "names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","charAt","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","provider","defaults","stripTrailingSlashes","actions","method","isArray","$get","$http","$q","Route","template","extend","urlParams","resourceFactory","url","paramDefaults","options","extractParams","data","actionParams","ids","isFunction","path","test","keys","split","i","ii","length","obj","defaultResponseInterceptor","response","resource","Resource","route","prototype","toJSON","Resource.prototype.toJSON","$promise","$resolved","action","name","hasBody","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","copy","setUrlParams","promise","then","item","push","noop","reject","headers","result","call","bind","Resource.bind","additionalParamDefaults","config","actionUrl","self","val","encodedVal","param","RegExp","replace","_","urlParam","isDefined","encodeURIComponent","match","p1","leadingSlashes","tail"]
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-ui-router/src/common.js:
--------------------------------------------------------------------------------
1 | /*jshint globalstrict:true*/
2 | /*global angular:false*/
3 | 'use strict';
4 |
5 | var isDefined = angular.isDefined,
6 | isFunction = angular.isFunction,
7 | isString = angular.isString,
8 | isObject = angular.isObject,
9 | isArray = angular.isArray,
10 | forEach = angular.forEach,
11 | extend = angular.extend,
12 | copy = angular.copy;
13 |
14 | function inherit(parent, extra) {
15 | return extend(new (extend(function() {}, { prototype: parent }))(), extra);
16 | }
17 |
18 | function merge(dst) {
19 | forEach(arguments, function(obj) {
20 | if (obj !== dst) {
21 | forEach(obj, function(value, key) {
22 | if (!dst.hasOwnProperty(key)) dst[key] = value;
23 | });
24 | }
25 | });
26 | return dst;
27 | }
28 |
29 | /**
30 | * Finds the common ancestor path between two states.
31 | *
32 | * @param {Object} first The first state.
33 | * @param {Object} second The second state.
34 | * @return {Array} Returns an array of state names in descending order, not including the root.
35 | */
36 | function ancestors(first, second) {
37 | var path = [];
38 |
39 | for (var n in first.path) {
40 | if (first.path[n] !== second.path[n]) break;
41 | path.push(first.path[n]);
42 | }
43 | return path;
44 | }
45 |
46 | /**
47 | * IE8-safe wrapper for `Object.keys()`.
48 | *
49 | * @param {Object} object A JavaScript object.
50 | * @return {Array} Returns the keys of the object as an array.
51 | */
52 | function objectKeys(object) {
53 | if (Object.keys) {
54 | return Object.keys(object);
55 | }
56 | var result = [];
57 |
58 | angular.forEach(object, function(val, key) {
59 | result.push(key);
60 | });
61 | return result;
62 | }
63 |
64 | /**
65 | * IE8-safe wrapper for `Array.prototype.indexOf()`.
66 | *
67 | * @param {Array} array A JavaScript array.
68 | * @param {*} value A value to search the array for.
69 | * @return {Number} Returns the array index value of `value`, or `-1` if not present.
70 | */
71 | function indexOf(array, value) {
72 | if (Array.prototype.indexOf) {
73 | return array.indexOf(value, Number(arguments[2]) || 0);
74 | }
75 | var len = array.length >>> 0, from = Number(arguments[2]) || 0;
76 | from = (from < 0) ? Math.ceil(from) : Math.floor(from);
77 |
78 | if (from < 0) from += len;
79 |
80 | for (; from < len; from++) {
81 | if (from in array && array[from] === value) return from;
82 | }
83 | return -1;
84 | }
85 |
86 | /**
87 | * Merges a set of parameters with all parameters inherited between the common parents of the
88 | * current state and a given destination state.
89 | *
90 | * @param {Object} currentParams The value of the current state parameters ($stateParams).
91 | * @param {Object} newParams The set of parameters which will be composited with inherited params.
92 | * @param {Object} $current Internal definition of object representing the current state.
93 | * @param {Object} $to Internal definition of object representing state to transition to.
94 | */
95 | function inheritParams(currentParams, newParams, $current, $to) {
96 | var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = [];
97 |
98 | for (var i in parents) {
99 | if (!parents[i].params) continue;
100 | parentParams = objectKeys(parents[i].params);
101 | if (!parentParams.length) continue;
102 |
103 | for (var j in parentParams) {
104 | if (indexOf(inheritList, parentParams[j]) >= 0) continue;
105 | inheritList.push(parentParams[j]);
106 | inherited[parentParams[j]] = currentParams[parentParams[j]];
107 | }
108 | }
109 | return extend({}, inherited, newParams);
110 | }
111 |
112 | /**
113 | * Performs a non-strict comparison of the subset of two objects, defined by a list of keys.
114 | *
115 | * @param {Object} a The first object.
116 | * @param {Object} b The second object.
117 | * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,
118 | * it defaults to the list of keys in `a`.
119 | * @return {Boolean} Returns `true` if the keys match, otherwise `false`.
120 | */
121 | function equalForKeys(a, b, keys) {
122 | if (!keys) {
123 | keys = [];
124 | for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility
125 | }
126 |
127 | for (var i=0; i
274 | *
275 | *
276 | *
277 | *
278 | *
279 | *
280 | *
284 | *
285 | *
286 | *
287 | *
288 | *
289 | */
290 | angular.module('ui.router', ['ui.router.state']);
291 |
292 | angular.module('ui.router.compat', ['ui.router']);
293 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-ui-router/README.md:
--------------------------------------------------------------------------------
1 | # AngularUI Router [](https://travis-ci.org/angular-ui/ui-router)
2 |
3 | #### The de-facto solution to flexible routing with nested views
4 | ---
5 | **[Download 0.2.11](http://angular-ui.github.io/ui-router/release/angular-ui-router.js)** (or **[Minified](http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js)**) **|**
6 | **[Guide](https://github.com/angular-ui/ui-router/wiki) |**
7 | **[API](http://angular-ui.github.io/ui-router/site) |**
8 | **[Sample](http://angular-ui.github.com/ui-router/sample/) ([Src](https://github.com/angular-ui/ui-router/tree/gh-pages/sample)) |**
9 | **[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions) |**
10 | **[Resources](#resources) |**
11 | **[Report an Issue](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#report-an-issue) |**
12 | **[Contribute](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#contribute) |**
13 | **[Help!](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) |**
14 | **[Discuss](https://groups.google.com/forum/#!categories/angular-ui/router)**
15 |
16 | ---
17 |
18 | AngularUI Router is a routing framework for [AngularJS](http://angularjs.org), which allows you to organize the
19 | parts of your interface into a [*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine). Unlike the
20 | [`$route` service](http://docs.angularjs.org/api/ngRoute.$route) in the Angular ngRoute module, which is organized around URL
21 | routes, UI-Router is organized around [*states*](https://github.com/angular-ui/ui-router/wiki),
22 | which may optionally have routes, as well as other behavior, attached.
23 |
24 | States are bound to *named*, *nested* and *parallel views*, allowing you to powerfully manage your application's interface.
25 |
26 | Check out the sample app: http://angular-ui.github.io/ui-router/sample/
27 |
28 | -
29 | **Note:** *UI-Router is under active development. As such, while this library is well-tested, the API may change. Consider using it in production applications only if you're comfortable following a changelog and updating your usage accordingly.*
30 |
31 |
32 | ## Get Started
33 |
34 | **(1)** Get UI-Router in one of the following ways:
35 | - clone & [build](CONTRIBUTING.md#developing) this repository
36 | - [download the release](http://angular-ui.github.io/ui-router/release/angular-ui-router.js) (or [minified](http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js))
37 | - via **[Bower](http://bower.io/)**: by running `$ bower install angular-ui-router` from your console
38 | - or via **[npm](https://www.npmjs.org/)**: by running `$ npm install angular-ui-router` from your console
39 | - or via **[Component](https://github.com/component/component)**: by running `$ component install angular-ui/ui-router` from your console
40 |
41 | **(2)** Include `angular-ui-router.js` (or `angular-ui-router.min.js`) in your `index.html`, after including Angular itself (For Component users: ignore this step)
42 |
43 | **(3)** Add `'ui.router'` to your main module's list of dependencies (For Component users: replace `'ui.router'` with `require('angular-ui-router')`)
44 |
45 | When you're done, your setup should look similar to the following:
46 |
47 | >
48 | ```html
49 |
50 |
51 |
52 |
53 |
54 |
59 | ...
60 |
61 |
62 | ...
63 |
64 |
65 | ```
66 |
67 | ### [Nested States & Views](http://plnkr.co/edit/u18KQc?p=preview)
68 |
69 | The majority of UI-Router's power is in its ability to nest states & views.
70 |
71 | **(1)** First, follow the [setup](#get-started) instructions detailed above.
72 |
73 | **(2)** Then, add a [`ui-view` directive](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#ui-view) to the `` of your app.
74 |
75 | >
76 | ```html
77 |
78 |
79 |
80 |
81 | State 1
82 | State 2
83 |
84 | ```
85 |
86 | **(3)** You'll notice we also added some links with [`ui-sref` directives](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#ui-sref). In addition to managing state transitions, this directive auto-generates the `href` attribute of the `` element it's attached to, if the corresponding state has a URL. Next we'll add some templates. These will plug into the `ui-view` within `index.html`. Notice that they have their own `ui-view` as well! That is the key to nesting states and views.
87 |
88 | >
89 | ```html
90 |
91 |
State 1
92 |
93 | Show List
94 |
95 | ```
96 | ```html
97 |
98 |
State 2
99 |
100 | Show List
101 |
102 | ```
103 |
104 | **(4)** Next, we'll add some child templates. *These* will get plugged into the `ui-view` of their parent state templates.
105 |
106 | >
107 | ```html
108 |
109 |
List of State 1 Items
110 |
111 |
{{ item }}
112 |
113 | ```
114 |
115 | >
116 | ```html
117 |
118 |
List of State 2 Things
119 |
120 |
{{ thing }}
121 |
122 | ```
123 |
124 | **(5)** Finally, we'll wire it all up with `$stateProvider`. Set up your states in the module config, as in the following:
125 |
126 |
127 | >
128 | ```javascript
129 | myApp.config(function($stateProvider, $urlRouterProvider) {
130 | //
131 | // For any unmatched url, redirect to /state1
132 | $urlRouterProvider.otherwise("/state1");
133 | //
134 | // Now set up the states
135 | $stateProvider
136 | .state('state1', {
137 | url: "/state1",
138 | templateUrl: "partials/state1.html"
139 | })
140 | .state('state1.list', {
141 | url: "/list",
142 | templateUrl: "partials/state1.list.html",
143 | controller: function($scope) {
144 | $scope.items = ["A", "List", "Of", "Items"];
145 | }
146 | })
147 | .state('state2', {
148 | url: "/state2",
149 | templateUrl: "partials/state2.html"
150 | })
151 | .state('state2.list', {
152 | url: "/list",
153 | templateUrl: "partials/state2.list.html",
154 | controller: function($scope) {
155 | $scope.things = ["A", "Set", "Of", "Things"];
156 | }
157 | });
158 | });
159 | ```
160 |
161 | **(6)** See this quick start example in action.
162 | >**[Go to Quick Start Plunker for Nested States & Views](http://plnkr.co/edit/u18KQc?p=preview)**
163 |
164 | **(7)** This only scratches the surface
165 | >**[Dive Deeper!](https://github.com/angular-ui/ui-router/wiki)**
166 |
167 |
168 | ### [Multiple & Named Views](http://plnkr.co/edit/SDOcGS?p=preview)
169 |
170 | Another great feature is the ability to have multiple `ui-view`s view per template.
171 |
172 | **Pro Tip:** *While multiple parallel views are a powerful feature, you'll often be able to manage your
173 | interfaces more effectively by nesting your views, and pairing those views with nested states.*
174 |
175 | **(1)** Follow the [setup](#get-started) instructions detailed above.
176 |
177 | **(2)** Add one or more `ui-view` to your app, give them names.
178 | >
179 | ```html
180 |
181 |
182 |
183 |
184 |
185 | Route 1
186 | Route 2
187 |
188 | ```
189 |
190 | **(3)** Set up your states in the module config:
191 | >
192 | ```javascript
193 | myApp.config(function($stateProvider) {
194 | $stateProvider
195 | .state('index', {
196 | url: "",
197 | views: {
198 | "viewA": { template: "index.viewA" },
199 | "viewB": { template: "index.viewB" }
200 | }
201 | })
202 | .state('route1', {
203 | url: "/route1",
204 | views: {
205 | "viewA": { template: "route1.viewA" },
206 | "viewB": { template: "route1.viewB" }
207 | }
208 | })
209 | .state('route2', {
210 | url: "/route2",
211 | views: {
212 | "viewA": { template: "route2.viewA" },
213 | "viewB": { template: "route2.viewB" }
214 | }
215 | })
216 | });
217 | ```
218 |
219 | **(4)** See this quick start example in action.
220 | >**[Go to Quick Start Plunker for Multiple & Named Views](http://plnkr.co/edit/SDOcGS?p=preview)**
221 |
222 |
223 | ## Resources
224 |
225 | * [In-Depth Guide](https://github.com/angular-ui/ui-router/wiki)
226 | * [API Reference](http://angular-ui.github.io/ui-router/site)
227 | * [Sample App](http://angular-ui.github.com/ui-router/sample/) ([Source](https://github.com/angular-ui/ui-router/tree/gh-pages/sample))
228 | * [FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions)
229 | * [Slides comparing ngRoute to ui-router](http://slid.es/timkindberg/ui-router#/)
230 | * [UI-Router Extras / Addons](http://christopherthielen.github.io/ui-router-extras/#/home) (@christopherthielen)
231 |
232 | ### Videos
233 |
234 | * [Introduction Video](https://egghead.io/lessons/angularjs-introduction-ui-router) (egghead.io)
235 | * [Tim Kindberg on Angular UI-Router](https://www.youtube.com/watch?v=lBqiZSemrqg)
236 | * [Activating States](https://egghead.io/lessons/angularjs-ui-router-activating-states) (egghead.io)
237 | * [Learn Angular.js using UI-Router](http://youtu.be/QETUuZ27N0w) (LearnCode.academy)
238 |
239 |
240 |
241 | ## Reporting issues and Contributing
242 |
243 | Please read our [Contributor guidelines](CONTRIBUTING.md) before reporting an issue or creating a pull request.
244 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/angular-ui-router/src/viewDirective.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc directive
3 | * @name ui.router.state.directive:ui-view
4 | *
5 | * @requires ui.router.state.$state
6 | * @requires $compile
7 | * @requires $controller
8 | * @requires $injector
9 | * @requires ui.router.state.$uiViewScroll
10 | * @requires $document
11 | *
12 | * @restrict ECA
13 | *
14 | * @description
15 | * The ui-view directive tells $state where to place your templates.
16 | *
17 | * @param {string=} name A view name. The name should be unique amongst the other views in the
18 | * same state. You can have views of the same name that live in different states.
19 | *
20 | * @param {string=} autoscroll It allows you to set the scroll behavior of the browser window
21 | * when a view is populated. By default, $anchorScroll is overridden by ui-router's custom scroll
22 | * service, {@link ui.router.state.$uiViewScroll}. This custom service let's you
23 | * scroll ui-view elements into view when they are populated during a state activation.
24 | *
25 | * *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)
26 | * functionality, call `$uiViewScrollProvider.useAnchorScroll()`.*
27 | *
28 | * @param {string=} onload Expression to evaluate whenever the view updates.
29 | *
30 | * @example
31 | * A view can be unnamed or named.
32 | *
33 | *
34 | *
35 | *
36 | *
37 | *
38 | *
39 | *
40 | * You can only have one unnamed view within any template (or root html). If you are only using a
41 | * single view and it is unnamed then you can populate it like so:
42 | *
48 | *
49 | * The above is a convenient shortcut equivalent to specifying your view explicitly with the {@link ui.router.state.$stateProvider#views `views`}
50 | * config property, by name, in this case an empty name:
51 | *
60 | *
61 | * But typically you'll only use the views property if you name your view or have more than one view
62 | * in the same template. There's not really a compelling reason to name a view if its the only one,
63 | * but you could if you wanted, like so:
64 | *
183 | *
184 | *
185 | *
186 | * When the app state is "app.user" (or any children states), and contains the state parameter "user" with value "bilbobaggins",
187 | * the resulting HTML will appear as (note the 'active' class):
188 | *
194 | *
195 | *
196 | * The class name is interpolated **once** during the directives link time (any further changes to the
197 | * interpolated value are ignored).
198 | *
199 | * Multiple classes may be specified in a space-separated format:
200 | *