snusnu-dm-is-localizable 0.0.9 → 0.10.0
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.
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/dm-is-localizable.gemspec +11 -11
- data/lib/dm-is-localizable/is/localizable.rb +1 -1
- data/spec/spec_helper.rb +18 -18
- data/spec/unit/language_spec.rb +4 -4
- data/spec/unit/translation_spec.rb +2 -2
- metadata +5 -5
    
        data/Rakefile
    CHANGED
    
    | @@ -12,9 +12,9 @@ begin | |
| 12 12 | 
             
                gem.email = "gamsnjaga@gmail.com"
         | 
| 13 13 | 
             
                gem.homepage = "http://github.com/snusnu/dm-is-localizable"
         | 
| 14 14 | 
             
                gem.authors = ["Martin Gamsjaeger (snusnu)"]
         | 
| 15 | 
            -
                gem.add_dependency('dm-core',         '>= 0. | 
| 16 | 
            -
                gem.add_dependency('dm-is-remixable', '>= 0. | 
| 17 | 
            -
                gem.add_dependency('dm-validations',  '>= 0. | 
| 15 | 
            +
                gem.add_dependency('dm-core',         '>= 0.10.0')
         | 
| 16 | 
            +
                gem.add_dependency('dm-is-remixable', '>= 0.10.0')
         | 
| 17 | 
            +
                gem.add_dependency('dm-validations',  '>= 0.10.0')
         | 
| 18 18 | 
             
              end
         | 
| 19 19 |  | 
| 20 20 | 
             
            rescue LoadError
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.0 | 
| 1 | 
            +
            0.10.0
         | 
    
        data/dm-is-localizable.gemspec
    CHANGED
    
    | @@ -2,11 +2,11 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Gem::Specification.new do |s|
         | 
| 4 4 | 
             
              s.name = %q{dm-is-localizable}
         | 
| 5 | 
            -
              s.version = "0.0 | 
| 5 | 
            +
              s.version = "0.10.0"
         | 
| 6 6 |  | 
| 7 7 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 8 8 | 
             
              s.authors = ["Martin Gamsjaeger (snusnu)"]
         | 
| 9 | 
            -
              s.date = %q{2009-05- | 
| 9 | 
            +
              s.date = %q{2009-05-20}
         | 
| 10 10 | 
             
              s.email = %q{gamsnjaga@gmail.com}
         | 
| 11 11 | 
             
              s.extra_rdoc_files = [
         | 
| 12 12 | 
             
                "LICENSE",
         | 
| @@ -64,17 +64,17 @@ Gem::Specification.new do |s| | |
| 64 64 | 
             
                s.specification_version = 3
         | 
| 65 65 |  | 
| 66 66 | 
             
                if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
         | 
| 67 | 
            -
                  s.add_runtime_dependency(%q<dm-core>, [">= 0. | 
| 68 | 
            -
                  s.add_runtime_dependency(%q<dm-is-remixable>, [">= 0. | 
| 69 | 
            -
                  s.add_runtime_dependency(%q<dm-validations>, [">= 0. | 
| 67 | 
            +
                  s.add_runtime_dependency(%q<dm-core>, [">= 0.10.0"])
         | 
| 68 | 
            +
                  s.add_runtime_dependency(%q<dm-is-remixable>, [">= 0.10.0"])
         | 
| 69 | 
            +
                  s.add_runtime_dependency(%q<dm-validations>, [">= 0.10.0"])
         | 
| 70 70 | 
             
                else
         | 
| 71 | 
            -
                  s.add_dependency(%q<dm-core>, [">= 0. | 
| 72 | 
            -
                  s.add_dependency(%q<dm-is-remixable>, [">= 0. | 
| 73 | 
            -
                  s.add_dependency(%q<dm-validations>, [">= 0. | 
| 71 | 
            +
                  s.add_dependency(%q<dm-core>, [">= 0.10.0"])
         | 
| 72 | 
            +
                  s.add_dependency(%q<dm-is-remixable>, [">= 0.10.0"])
         | 
| 73 | 
            +
                  s.add_dependency(%q<dm-validations>, [">= 0.10.0"])
         | 
| 74 74 | 
             
                end
         | 
| 75 75 | 
             
              else
         | 
| 76 | 
            -
                s.add_dependency(%q<dm-core>, [">= 0. | 
| 77 | 
            -
                s.add_dependency(%q<dm-is-remixable>, [">= 0. | 
| 78 | 
            -
                s.add_dependency(%q<dm-validations>, [">= 0. | 
| 76 | 
            +
                s.add_dependency(%q<dm-core>, [">= 0.10.0"])
         | 
| 77 | 
            +
                s.add_dependency(%q<dm-is-remixable>, [">= 0.10.0"])
         | 
| 78 | 
            +
                s.add_dependency(%q<dm-validations>, [">= 0.10.0"])
         | 
| 79 79 | 
             
              end
         | 
| 80 80 | 
             
            end
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -56,26 +56,26 @@ Dir[Pathname(__FILE__).dirname.to_s + "/fixtures/**/*.rb"].each { |rb| require(r | |
| 56 56 |  | 
| 57 57 | 
             
            Spec::Runner.configure do |config|
         | 
| 58 58 |  | 
| 59 | 
            -
              config.before(:all) do
         | 
| 60 | 
            -
                DataMapper.auto_migrate!
         | 
| 61 | 
            -
              end
         | 
| 62 | 
            -
             | 
| 63 59 | 
             
              config.before(:each) do
         | 
| 64 | 
            -
                DataMapper. | 
| 65 | 
            -
                  transaction = DataMapper::Transaction.new(r)
         | 
| 66 | 
            -
                  transaction.begin
         | 
| 67 | 
            -
                  r.adapter.push_transaction(transaction)
         | 
| 68 | 
            -
                end
         | 
| 60 | 
            +
                DataMapper.auto_migrate!
         | 
| 69 61 | 
             
              end
         | 
| 70 62 |  | 
| 71 | 
            -
              config. | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
               | 
| 63 | 
            +
              # config.before(:each) do
         | 
| 64 | 
            +
              #   DataMapper.repository(:default) do |r|
         | 
| 65 | 
            +
              #     transaction = DataMapper::Transaction.new(r)
         | 
| 66 | 
            +
              #     transaction.begin
         | 
| 67 | 
            +
              #     r.adapter.push_transaction(transaction)
         | 
| 68 | 
            +
              #   end
         | 
| 69 | 
            +
              # end
         | 
| 70 | 
            +
              # 
         | 
| 71 | 
            +
              # config.after(:each) do
         | 
| 72 | 
            +
              #   DataMapper.repository(:default) do |r|
         | 
| 73 | 
            +
              #     adapter = r.adapter
         | 
| 74 | 
            +
              #     while adapter.current_transaction
         | 
| 75 | 
            +
              #       adapter.current_transaction.rollback
         | 
| 76 | 
            +
              #       adapter.pop_transaction
         | 
| 77 | 
            +
              #     end
         | 
| 78 | 
            +
              #   end
         | 
| 79 | 
            +
              # end
         | 
| 80 80 |  | 
| 81 81 | 
             
            end
         | 
    
        data/spec/unit/language_spec.rb
    CHANGED
    
    | @@ -9,8 +9,8 @@ describe "Language" do | |
| 9 9 | 
             
                end
         | 
| 10 10 |  | 
| 11 11 | 
             
                it "should store unique locale string codes" do
         | 
| 12 | 
            -
                  Language.create(:code => "en-US", :name => "English").should_not  | 
| 13 | 
            -
                  Language.create(:code => "en-US", :name => "English").should  | 
| 12 | 
            +
                  Language.create(:code => "en-US", :name => "English").should_not be_new
         | 
| 13 | 
            +
                  Language.create(:code => "en-US", :name => "English").should be_new
         | 
| 14 14 | 
             
                end
         | 
| 15 15 |  | 
| 16 16 | 
             
              end
         | 
| @@ -52,9 +52,9 @@ describe "Language" do | |
| 52 52 |  | 
| 53 53 | 
             
                it "should only allow unique locale string codes" do
         | 
| 54 54 | 
             
                  l1 = Language.create(:code => 'en-US', :name => "English")
         | 
| 55 | 
            -
                  l1.should_not  | 
| 55 | 
            +
                  l1.should_not be_new
         | 
| 56 56 | 
             
                  l2 = Language.create(:code => 'en-US', :name => "English")
         | 
| 57 | 
            -
                  l2.should  | 
| 57 | 
            +
                  l2.should be_new
         | 
| 58 58 | 
             
                  l2.errors.on(:code).should_not be_empty
         | 
| 59 59 | 
             
                  l2.errors.size.should == 1
         | 
| 60 60 | 
             
                end
         | 
| @@ -18,8 +18,8 @@ describe "the remixed translation resource" do | |
| 18 18 |  | 
| 19 19 | 
             
              it "should store unique languages for every resource to translate" do
         | 
| 20 20 | 
             
                @t2 = ItemTranslation.create(:item => @i, :language => @l)
         | 
| 21 | 
            -
                @t1.should_not  | 
| 22 | 
            -
                @t2.should      | 
| 21 | 
            +
                @t1.should_not be_new
         | 
| 22 | 
            +
                @t2.should     be_new
         | 
| 23 23 | 
             
                @t2.errors.should_not be_empty
         | 
| 24 24 | 
             
                @t2.errors.size.should == 1
         | 
| 25 25 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: snusnu-dm-is-localizable
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.0 | 
| 4 | 
            +
              version: 0.10.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Martin Gamsjaeger (snusnu)
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2009-05- | 
| 12 | 
            +
            date: 2009-05-20 00:00:00 -07:00
         | 
| 13 13 | 
             
            default_executable: 
         | 
| 14 14 | 
             
            dependencies: 
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -20,7 +20,7 @@ dependencies: | |
| 20 20 | 
             
                requirements: 
         | 
| 21 21 | 
             
                - - ">="
         | 
| 22 22 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 23 | 
            -
                    version: 0. | 
| 23 | 
            +
                    version: 0.10.0
         | 
| 24 24 | 
             
                version: 
         | 
| 25 25 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 26 26 | 
             
              name: dm-is-remixable
         | 
| @@ -30,7 +30,7 @@ dependencies: | |
| 30 30 | 
             
                requirements: 
         | 
| 31 31 | 
             
                - - ">="
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 33 | 
            -
                    version: 0. | 
| 33 | 
            +
                    version: 0.10.0
         | 
| 34 34 | 
             
                version: 
         | 
| 35 35 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 36 36 | 
             
              name: dm-validations
         | 
| @@ -40,7 +40,7 @@ dependencies: | |
| 40 40 | 
             
                requirements: 
         | 
| 41 41 | 
             
                - - ">="
         | 
| 42 42 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 43 | 
            -
                    version: 0. | 
| 43 | 
            +
                    version: 0.10.0
         | 
| 44 44 | 
             
                version: 
         | 
| 45 45 | 
             
            description: 
         | 
| 46 46 | 
             
            email: gamsnjaga@gmail.com
         |