inesita 0.6.0.beta.1 → 0.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -2
- data/README.md +1 -1
- data/inesita.gemspec +4 -2
- data/lib/inesita/cli/template/app/{application.js.rb.tt → application.rb.tt} +1 -0
- data/lib/inesita/cli/template/app/components/counter.rb.tt +32 -0
- data/lib/inesita/cli/template/app/components/home.rb.tt +2 -4
- data/lib/inesita/cli/template/app/store.rb.tt +8 -6
- data/opal/inesita/component/render.rb +2 -1
- data/opal/inesita/injection.rb +1 -1
- metadata +10 -8
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: a4af46b9ab8707bb03968bde0b4beda09894b69b
         | 
| 4 | 
            +
              data.tar.gz: 99f66a30f65e42494ba028884c0d6cd26664385c
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 06617db1b020e60dad7b8c1727a450cadd5de57d70aecd1f99cb95217af26ce818aa10f7582c89e3f86fb4d3dd5cce2f003e04d3df5cd90379f90eba91bdb96a
         | 
| 7 | 
            +
              data.tar.gz: 61cf72bc98ede6785decee36455ca3576ef6cf7d6f2fe60095d59c5e23ef674ca9d3d591e7221d070ae02e417ed83b8f5e8f8e735776bc427e0ea9f5a585bc95
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,8 +1,14 @@ | |
| 1 1 | 
             
            ## [Unreleased]
         | 
| 2 2 |  | 
| 3 | 
            -
            ###  | 
| 4 | 
            -
             | 
| 3 | 
            +
            ### Added
         | 
| 4 | 
            +
            - `inject` class method for `Component`
         | 
| 5 | 
            +
            - `init` callbacks
         | 
| 5 6 |  | 
| 7 | 
            +
            ### Removed
         | 
| 8 | 
            +
            - `router` - moved to separate gem
         | 
| 9 | 
            +
            - `Store` - use `Injection`
         | 
| 10 | 
            +
            - `Application` - use `Component` and `inject`
         | 
| 11 | 
            +
            - `Layout` - use component instead
         | 
| 6 12 |  | 
| 7 13 | 
             
            ## [0.5.1] - 2016.10.29
         | 
| 8 14 |  | 
    
        data/README.md
    CHANGED
    
    
    
        data/inesita.gemspec
    CHANGED
    
    | @@ -1,12 +1,14 @@ | |
| 1 1 | 
             
            Gem::Specification.new do |s|
         | 
| 2 2 | 
             
              s.name        = 'inesita'
         | 
| 3 | 
            -
              s.version     = '0.6.0 | 
| 3 | 
            +
              s.version     = '0.6.0'
         | 
| 4 4 | 
             
              s.authors     = ['Michał Kalbarczyk']
         | 
| 5 5 | 
             
              s.email       = 'fazibear@gmail.com'
         | 
| 6 6 | 
             
              s.homepage    = 'http://github.com/inesita-rb/inesita'
         | 
| 7 7 | 
             
              s.summary     = 'Frontend web framework for Opal'
         | 
| 8 8 | 
             
              s.description = 'Frontent web framework for Opal'
         | 
| 9 9 | 
             
              s.license     = 'MIT'
         | 
| 10 | 
            +
              s.post_install_message = 'Notice! Inesita 0.6.0 includes lots of breaking changes. See documentaion: https://inesita.fazibear.me/'
         | 
| 11 | 
            +
             | 
| 10 12 |  | 
| 11 13 | 
             
              s.files         = `git ls-files`.split("\n")
         | 
| 12 14 | 
             
              s.executables   = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
         | 
| @@ -14,7 +16,7 @@ Gem::Specification.new do |s| | |
| 14 16 | 
             
              s.require_paths = ['lib']
         | 
| 15 17 |  | 
| 16 18 | 
             
              s.add_dependency 'opal', '>= 0.9', '< 0.11'
         | 
| 17 | 
            -
              s.add_dependency 'opal-virtual-dom', '~> 0. | 
| 19 | 
            +
              s.add_dependency 'opal-virtual-dom', '~> 0.5.0'
         | 
| 18 20 | 
             
              s.add_dependency 'slim', '~> 3.0'
         | 
| 19 21 | 
             
              s.add_dependency 'sass', '~> 3.4'
         | 
| 20 22 | 
             
              s.add_dependency 'thor', '~> 0.19'
         | 
| @@ -0,0 +1,32 @@ | |
| 1 | 
            +
            class Counter
         | 
| 2 | 
            +
              include Inesita::Component
         | 
| 3 | 
            +
             | 
| 4 | 
            +
              def inc
         | 
| 5 | 
            +
                store.increase
         | 
| 6 | 
            +
                render!
         | 
| 7 | 
            +
              end
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              def dec
         | 
| 10 | 
            +
                store.decrease
         | 
| 11 | 
            +
                render!
         | 
| 12 | 
            +
              end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              def render
         | 
| 15 | 
            +
                h4 do
         | 
| 16 | 
            +
                  text props[:header]
         | 
| 17 | 
            +
                end
         | 
| 18 | 
            +
                div class: 'input-group' do
         | 
| 19 | 
            +
                  span class: 'input-group-btn' do
         | 
| 20 | 
            +
                    button class: 'btn btn-default', onclick: method(:dec) do
         | 
| 21 | 
            +
                      text '-'
         | 
| 22 | 
            +
                    end
         | 
| 23 | 
            +
                  end
         | 
| 24 | 
            +
                  input type: "text", class: "form-control", value: store.counter, disabled: true
         | 
| 25 | 
            +
                  span class: 'input-group-btn' do
         | 
| 26 | 
            +
                    button class: 'btn btn-default', onclick: -> { inc } do
         | 
| 27 | 
            +
                      text '+'
         | 
| 28 | 
            +
                    end
         | 
| 29 | 
            +
                  end
         | 
| 30 | 
            +
                end
         | 
| 31 | 
            +
              end
         | 
| 32 | 
            +
            end
         | 
| @@ -2,14 +2,12 @@ class Home | |
| 2 2 | 
             
              include Inesita::Component
         | 
| 3 3 |  | 
| 4 4 | 
             
              def render
         | 
| 5 | 
            -
                div class: ' | 
| 5 | 
            +
                div.jumbotron class: 'text-center' do
         | 
| 6 6 | 
             
                  img src: '/static/inesita-rb.png'
         | 
| 7 7 | 
             
                  h1 do
         | 
| 8 8 | 
             
                    text "Hello I'm Inesita"
         | 
| 9 9 | 
             
                  end
         | 
| 10 | 
            -
                   | 
| 11 | 
            -
                    text 'This is a sample component'
         | 
| 12 | 
            -
                  end
         | 
| 10 | 
            +
                  component Counter, props: {header: 'This is a sample counter'}
         | 
| 13 11 | 
             
                end
         | 
| 14 12 | 
             
              end
         | 
| 15 13 | 
             
            end
         | 
| @@ -1,15 +1,17 @@ | |
| 1 1 | 
             
            class Store
         | 
| 2 2 | 
             
              include Inesita::Injection
         | 
| 3 3 |  | 
| 4 | 
            -
               | 
| 5 | 
            -
             | 
| 4 | 
            +
              attr_accessor :counter
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              def init
         | 
| 7 | 
            +
                @counter = 0
         | 
| 6 8 | 
             
              end
         | 
| 7 9 |  | 
| 8 | 
            -
              def  | 
| 9 | 
            -
                @ | 
| 10 | 
            +
              def increase
         | 
| 11 | 
            +
                @counter += 1
         | 
| 10 12 | 
             
              end
         | 
| 11 13 |  | 
| 12 | 
            -
              def  | 
| 13 | 
            -
                @ | 
| 14 | 
            +
              def decrease
         | 
| 15 | 
            +
                @counter -= 1
         | 
| 14 16 | 
             
              end
         | 
| 15 17 | 
             
            end
         | 
    
        data/opal/inesita/injection.rb
    CHANGED
    
    | @@ -24,12 +24,12 @@ module Inesita | |
| 24 24 | 
             
                      @injections[name] = clazz
         | 
| 25 25 | 
             
                        .new
         | 
| 26 26 | 
             
                        .with_root_component(@root_component)
         | 
| 27 | 
            -
                        .inject
         | 
| 28 27 | 
             
                    else
         | 
| 29 28 | 
             
                      raise Error, "Invalid #{clazz} class, should mixin Inesita::Injection"
         | 
| 30 29 | 
             
                    end
         | 
| 31 30 | 
             
                  end
         | 
| 32 31 | 
             
                  @injections.each do |key, instance|
         | 
| 32 | 
            +
                    instance.inject
         | 
| 33 33 | 
             
                    instance.init
         | 
| 34 34 | 
             
                  end
         | 
| 35 35 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: inesita
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.6.0 | 
| 4 | 
            +
              version: 0.6.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Michał Kalbarczyk
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2016-11- | 
| 11 | 
            +
            date: 2016-11-07 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: opal
         | 
| @@ -36,14 +36,14 @@ dependencies: | |
| 36 36 | 
             
                requirements:
         | 
| 37 37 | 
             
                - - "~>"
         | 
| 38 38 | 
             
                  - !ruby/object:Gem::Version
         | 
| 39 | 
            -
                    version: 0. | 
| 39 | 
            +
                    version: 0.5.0
         | 
| 40 40 | 
             
              type: :runtime
         | 
| 41 41 | 
             
              prerelease: false
         | 
| 42 42 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 43 43 | 
             
                requirements:
         | 
| 44 44 | 
             
                - - "~>"
         | 
| 45 45 | 
             
                  - !ruby/object:Gem::Version
         | 
| 46 | 
            -
                    version: 0. | 
| 46 | 
            +
                    version: 0.5.0
         | 
| 47 47 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 48 48 | 
             
              name: slim
         | 
| 49 49 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -194,7 +194,8 @@ files: | |
| 194 194 | 
             
            - lib/inesita/cli/template/.gitignore.tt
         | 
| 195 195 | 
             
            - lib/inesita/cli/template/Gemfile.tt
         | 
| 196 196 | 
             
            - lib/inesita/cli/template/README.md.tt
         | 
| 197 | 
            -
            - lib/inesita/cli/template/app/application. | 
| 197 | 
            +
            - lib/inesita/cli/template/app/application.rb.tt
         | 
| 198 | 
            +
            - lib/inesita/cli/template/app/components/counter.rb.tt
         | 
| 198 199 | 
             
            - lib/inesita/cli/template/app/components/description.rb.tt
         | 
| 199 200 | 
             
            - lib/inesita/cli/template/app/components/home.rb.tt
         | 
| 200 201 | 
             
            - lib/inesita/cli/template/app/components/navbar.rb.tt
         | 
| @@ -228,7 +229,8 @@ homepage: http://github.com/inesita-rb/inesita | |
| 228 229 | 
             
            licenses:
         | 
| 229 230 | 
             
            - MIT
         | 
| 230 231 | 
             
            metadata: {}
         | 
| 231 | 
            -
            post_install_message: 
         | 
| 232 | 
            +
            post_install_message: 'Notice! Inesita 0.6.0 includes lots of breaking changes. See
         | 
| 233 | 
            +
              documentaion: https://inesita.fazibear.me/'
         | 
| 232 234 | 
             
            rdoc_options: []
         | 
| 233 235 | 
             
            require_paths:
         | 
| 234 236 | 
             
            - lib
         | 
| @@ -239,9 +241,9 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 239 241 | 
             
                  version: '0'
         | 
| 240 242 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 241 243 | 
             
              requirements:
         | 
| 242 | 
            -
              - - " | 
| 244 | 
            +
              - - ">="
         | 
| 243 245 | 
             
                - !ruby/object:Gem::Version
         | 
| 244 | 
            -
                  version:  | 
| 246 | 
            +
                  version: '0'
         | 
| 245 247 | 
             
            requirements: []
         | 
| 246 248 | 
             
            rubyforge_project: 
         | 
| 247 249 | 
             
            rubygems_version: 2.5.1
         |