tb_core 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +29 -3
- data/Rakefile +9 -0
- data/app/controllers/spud/application_controller.rb +12 -0
- data/app/views/admin/setup/new.html.erb +1 -1
- data/app/views/layouts/admin/application.html.erb +1 -1
- data/app/views/layouts/not_found.html.erb +6 -0
- data/config/routes.rb +1 -0
- data/lib/spud_core/configuration.rb +2 -1
- data/lib/spud_core/exceptions.rb +7 -0
- data/lib/spud_core/version.rb +1 -1
- data/spec/controllers/admin/application_controller_spec.rb +0 -1
- data/spec/controllers/spud/application_controller_spec.rb +9 -0
- data/spec/dummy/log/test.log +69964 -0
- data/spec/integration/admin_setup_spec.rb +8 -0
- data/spec/javascripts/date_picker_spec.js +8 -0
- data/spec/javascripts/support/jasmine.yml +88 -0
- data/spec/javascripts/support/jasmine_helper.rb +11 -0
- data/spec/models/spud_user_spec.rb +13 -0
- data/spec/spec_helper.rb +4 -1
- metadata +40 -5
- data/spec/requests/legacy_spec.rb +0 -8
| @@ -0,0 +1,88 @@ | |
| 1 | 
            +
            # src_files
         | 
| 2 | 
            +
            #
         | 
| 3 | 
            +
            # Return an array of filepaths relative to src_dir to include before jasmine specs.
         | 
| 4 | 
            +
            # Default: []
         | 
| 5 | 
            +
            #
         | 
| 6 | 
            +
            # EXAMPLE:
         | 
| 7 | 
            +
            #
         | 
| 8 | 
            +
            # src_files:
         | 
| 9 | 
            +
            #   - lib/source1.js
         | 
| 10 | 
            +
            #   - lib/source2.js
         | 
| 11 | 
            +
            #   - dist/**/*.js
         | 
| 12 | 
            +
            #
         | 
| 13 | 
            +
            src_files:
         | 
| 14 | 
            +
                - app/assets/javascripts/**/*.js
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            # stylesheets
         | 
| 17 | 
            +
            #
         | 
| 18 | 
            +
            # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
         | 
| 19 | 
            +
            # Default: []
         | 
| 20 | 
            +
            #
         | 
| 21 | 
            +
            # EXAMPLE:
         | 
| 22 | 
            +
            #
         | 
| 23 | 
            +
            # stylesheets:
         | 
| 24 | 
            +
            #   - css/style.css
         | 
| 25 | 
            +
            #   - stylesheets/*.css
         | 
| 26 | 
            +
            #
         | 
| 27 | 
            +
            stylesheets:
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            # helpers
         | 
| 30 | 
            +
            #
         | 
| 31 | 
            +
            # Return an array of filepaths relative to spec_dir to include before jasmine specs.
         | 
| 32 | 
            +
            # Default: ["helpers/**/*.js"]
         | 
| 33 | 
            +
            #
         | 
| 34 | 
            +
            # EXAMPLE:
         | 
| 35 | 
            +
            #
         | 
| 36 | 
            +
            # helpers:
         | 
| 37 | 
            +
            #   - helpers/**/*.js
         | 
| 38 | 
            +
            #
         | 
| 39 | 
            +
            helpers:
         | 
| 40 | 
            +
              - 'helpers/**/*.js'
         | 
| 41 | 
            +
            # spec_files
         | 
| 42 | 
            +
            #
         | 
| 43 | 
            +
            #  Return an array of filepaths relative to spec_dir to include.
         | 
| 44 | 
            +
            # Default: ["**/*[sS]pec.js"]
         | 
| 45 | 
            +
            #
         | 
| 46 | 
            +
            # EXAMPLE:
         | 
| 47 | 
            +
            #
         | 
| 48 | 
            +
            # spec_files:
         | 
| 49 | 
            +
            #   - **/*[sS]pec.js
         | 
| 50 | 
            +
            #
         | 
| 51 | 
            +
            spec_files:
         | 
| 52 | 
            +
              - '**/*[sS]pec.js'
         | 
| 53 | 
            +
             | 
| 54 | 
            +
            # src_dir
         | 
| 55 | 
            +
            #
         | 
| 56 | 
            +
            # Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
         | 
| 57 | 
            +
            # Default: project root
         | 
| 58 | 
            +
            #
         | 
| 59 | 
            +
            # EXAMPLE:
         | 
| 60 | 
            +
            #
         | 
| 61 | 
            +
            # src_dir: public
         | 
| 62 | 
            +
            #
         | 
| 63 | 
            +
            src_dir:
         | 
| 64 | 
            +
             | 
| 65 | 
            +
            # spec_dir
         | 
| 66 | 
            +
            #
         | 
| 67 | 
            +
            # Spec directory path. Your spec_files must be returned relative to this path.
         | 
| 68 | 
            +
            # Default: spec/javascripts
         | 
| 69 | 
            +
            #
         | 
| 70 | 
            +
            # EXAMPLE:
         | 
| 71 | 
            +
            #
         | 
| 72 | 
            +
            # spec_dir: spec/javascripts
         | 
| 73 | 
            +
            #
         | 
| 74 | 
            +
            spec_dir:
         | 
| 75 | 
            +
             | 
| 76 | 
            +
            # spec_helper
         | 
| 77 | 
            +
            #
         | 
| 78 | 
            +
            # Ruby file that Jasmine server will require before starting.
         | 
| 79 | 
            +
            # Returned relative to your root path
         | 
| 80 | 
            +
            # Default spec/support/jasmine_helper.rb
         | 
| 81 | 
            +
            #
         | 
| 82 | 
            +
            # EXAMPLE:
         | 
| 83 | 
            +
            #
         | 
| 84 | 
            +
            # spec_helper: spec/support/jasmine_helper.rb
         | 
| 85 | 
            +
            #
         | 
| 86 | 
            +
            spec_helper: spec/support/jasmine_helper.rb
         | 
| 87 | 
            +
             | 
| 88 | 
            +
             | 
| @@ -0,0 +1,11 @@ | |
| 1 | 
            +
            #Use this file to set/override Jasmine configuration options
         | 
| 2 | 
            +
            #You can remove it if you don't need it.
         | 
| 3 | 
            +
            #This file is loaded *after* jasmine.yml is interpreted.
         | 
| 4 | 
            +
            #
         | 
| 5 | 
            +
            #Example: using a different boot file.
         | 
| 6 | 
            +
            #Jasmine.configure do |config|
         | 
| 7 | 
            +
            #   config.boot_dir = '/absolute/path/to/boot_dir'
         | 
| 8 | 
            +
            #   config.boot_files = lambda { ['/absolute/path/to/boot_dir/file.js'] }
         | 
| 9 | 
            +
            #end
         | 
| 10 | 
            +
            #
         | 
| 11 | 
            +
             | 
| @@ -23,4 +23,17 @@ describe SpudUser do | |
| 23 23 | 
             
                  u.full_name.should == u.login
         | 
| 24 24 | 
             
                end
         | 
| 25 25 | 
             
              end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
              it { should_not allow_value('').for(:login) }
         | 
| 28 | 
            +
              it { should ensure_length_of(:login).is_at_least(3) }
         | 
| 29 | 
            +
              it { should ensure_length_of(:password).is_at_least(4) }
         | 
| 30 | 
            +
              it { should_not allow_value('@mail.com').for(:email) }
         | 
| 31 | 
            +
              it { should_not allow_value('mail.com').for(:email) }
         | 
| 32 | 
            +
              it { should allow_value('test@mail.com').for(:email) }
         | 
| 33 | 
            +
             | 
| 34 | 
            +
              it "must match password confirmation before saving a new user" do
         | 
| 35 | 
            +
                u = FactoryGirl.build(:spud_user, :password_confirmation => '')
         | 
| 36 | 
            +
                u.save.should == false
         | 
| 37 | 
            +
              end
         | 
| 38 | 
            +
             | 
| 26 39 | 
             
            end
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -14,6 +14,8 @@ require 'database_cleaner' | |
| 14 14 | 
             
            require 'shoulda'
         | 
| 15 15 | 
             
            require 'factory_girl'
         | 
| 16 16 | 
             
            require 'mocha'
         | 
| 17 | 
            +
            require 'capybara/rspec'
         | 
| 18 | 
            +
            require 'capybara/rails'
         | 
| 17 19 |  | 
| 18 20 | 
             
            # Requires supporting ruby files with custom matchers and macros, etc,
         | 
| 19 21 | 
             
            # in spec/support/ and its subdirectories.
         | 
| @@ -24,7 +26,8 @@ RSpec.configure do |config| | |
| 24 26 | 
             
              config.mock_with :mocha
         | 
| 25 27 | 
             
              config.use_transactional_fixtures = true
         | 
| 26 28 | 
             
              config.infer_base_class_for_anonymous_controllers = false
         | 
| 27 | 
            -
             | 
| 29 | 
            +
              config.include Capybara::DSL
         | 
| 30 | 
            +
              
         | 
| 28 31 | 
             
              config.before(:suite) do
         | 
| 29 32 | 
             
                DatabaseCleaner.strategy = :transaction
         | 
| 30 33 | 
             
                DatabaseCleaner.clean_with(:truncation)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: tb_core
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.1. | 
| 4 | 
            +
              version: 1.1.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Greg Woods
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2013- | 
| 11 | 
            +
            date: 2013-09-05 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -248,6 +248,34 @@ dependencies: | |
| 248 248 | 
             
                - - ~>
         | 
| 249 249 | 
             
                  - !ruby/object:Gem::Version
         | 
| 250 250 | 
             
                    version: 0.6.4
         | 
| 251 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 252 | 
            +
              name: capybara
         | 
| 253 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 254 | 
            +
                requirements:
         | 
| 255 | 
            +
                - - '='
         | 
| 256 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 257 | 
            +
                    version: 2.0.1
         | 
| 258 | 
            +
              type: :development
         | 
| 259 | 
            +
              prerelease: false
         | 
| 260 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 261 | 
            +
                requirements:
         | 
| 262 | 
            +
                - - '='
         | 
| 263 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 264 | 
            +
                    version: 2.0.1
         | 
| 265 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 266 | 
            +
              name: jasmine
         | 
| 267 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 268 | 
            +
                requirements:
         | 
| 269 | 
            +
                - - ! '>='
         | 
| 270 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 271 | 
            +
                    version: '0'
         | 
| 272 | 
            +
              type: :development
         | 
| 273 | 
            +
              prerelease: false
         | 
| 274 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 275 | 
            +
                requirements:
         | 
| 276 | 
            +
                - - ! '>='
         | 
| 277 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 278 | 
            +
                    version: '0'
         | 
| 251 279 | 
             
            description: Twice Baked Core Engine
         | 
| 252 280 | 
             
            email:
         | 
| 253 281 | 
             
            - greg@westlakedesign.com
         | 
| @@ -477,6 +505,7 @@ files: | |
| 477 505 | 
             
            - app/views/layouts/admin/application.html.erb
         | 
| 478 506 | 
             
            - app/views/layouts/admin/detail.html.erb
         | 
| 479 507 | 
             
            - app/views/layouts/admin/login.html.erb
         | 
| 508 | 
            +
            - app/views/layouts/not_found.html.erb
         | 
| 480 509 | 
             
            - app/views/layouts/spud/admin/detail.html.erb
         | 
| 481 510 | 
             
            - app/views/password_resets/index.html.erb
         | 
| 482 511 | 
             
            - app/views/password_resets/show.html.erb
         | 
| @@ -548,10 +577,13 @@ files: | |
| 548 577 | 
             
            - spec/dummy/script/rails
         | 
| 549 578 | 
             
            - spec/helpers/spud/admin/application_helper_spec.rb
         | 
| 550 579 | 
             
            - spec/helpers/spud/application_helper_spec.rb
         | 
| 580 | 
            +
            - spec/integration/admin_setup_spec.rb
         | 
| 581 | 
            +
            - spec/javascripts/date_picker_spec.js
         | 
| 582 | 
            +
            - spec/javascripts/support/jasmine.yml
         | 
| 583 | 
            +
            - spec/javascripts/support/jasmine_helper.rb
         | 
| 551 584 | 
             
            - spec/lib/spud_core/configuration_spec.rb
         | 
| 552 585 | 
             
            - spec/models/spud_role_spec.rb
         | 
| 553 586 | 
             
            - spec/models/spud_user_spec.rb
         | 
| 554 | 
            -
            - spec/requests/legacy_spec.rb
         | 
| 555 587 | 
             
            - spec/spec_helper.rb
         | 
| 556 588 | 
             
            - spec/support/authlogic_helper.rb
         | 
| 557 589 | 
             
            homepage: http://bitbucket.org/westlakedesign/tb_core
         | 
| @@ -573,7 +605,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 573 605 | 
             
                  version: '0'
         | 
| 574 606 | 
             
            requirements: []
         | 
| 575 607 | 
             
            rubyforge_project: 
         | 
| 576 | 
            -
            rubygems_version: 2.0. | 
| 608 | 
            +
            rubygems_version: 2.0.7
         | 
| 577 609 | 
             
            signing_key: 
         | 
| 578 610 | 
             
            specification_version: 4
         | 
| 579 611 | 
             
            summary: Twice Baked Core Engine
         | 
| @@ -620,9 +652,12 @@ test_files: | |
| 620 652 | 
             
            - spec/dummy/script/rails
         | 
| 621 653 | 
             
            - spec/helpers/spud/admin/application_helper_spec.rb
         | 
| 622 654 | 
             
            - spec/helpers/spud/application_helper_spec.rb
         | 
| 655 | 
            +
            - spec/integration/admin_setup_spec.rb
         | 
| 656 | 
            +
            - spec/javascripts/date_picker_spec.js
         | 
| 657 | 
            +
            - spec/javascripts/support/jasmine.yml
         | 
| 658 | 
            +
            - spec/javascripts/support/jasmine_helper.rb
         | 
| 623 659 | 
             
            - spec/lib/spud_core/configuration_spec.rb
         | 
| 624 660 | 
             
            - spec/models/spud_role_spec.rb
         | 
| 625 661 | 
             
            - spec/models/spud_user_spec.rb
         | 
| 626 | 
            -
            - spec/requests/legacy_spec.rb
         | 
| 627 662 | 
             
            - spec/spec_helper.rb
         | 
| 628 663 | 
             
            - spec/support/authlogic_helper.rb
         |