espresso 0.0.16 → 0.1.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 +1 -1
- data/VERSION +1 -1
- data/espresso.gemspec +3 -3
- data/lib/espresso/helpers.rb +16 -6
- data/lib/espresso/model.rb +2 -2
- metadata +3 -3
    
        data/Rakefile
    CHANGED
    
    | @@ -7,7 +7,7 @@ begin | |
| 7 7 | 
             
                gem.name = "espresso"
         | 
| 8 8 | 
             
                gem.summary = %Q{Rails extender to simplify rails development}
         | 
| 9 9 | 
             
                gem.description = %Q{Useful templates for controller and model functions}
         | 
| 10 | 
            -
                gem.email = "rotuka@ | 
| 10 | 
            +
                gem.email = "rotuka@tokak.ru"
         | 
| 11 11 | 
             
                gem.homepage = "http://github.com/krasivotokak/espresso"
         | 
| 12 12 | 
             
                gem.authors = ["Alexander Semyonov"]
         | 
| 13 13 | 
             
                gem.add_development_dependency "thoughtbot-shoulda"
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.0 | 
| 1 | 
            +
            0.1.0
         | 
    
        data/espresso.gemspec
    CHANGED
    
    | @@ -5,13 +5,13 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{espresso}
         | 
| 8 | 
            -
              s.version = "0.0 | 
| 8 | 
            +
              s.version = "0.1.0"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Alexander Semyonov"]
         | 
| 12 | 
            -
              s.date = %q{2009-09- | 
| 12 | 
            +
              s.date = %q{2009-09-16}
         | 
| 13 13 | 
             
              s.description = %q{Useful templates for controller and model functions}
         | 
| 14 | 
            -
              s.email = %q{rotuka@ | 
| 14 | 
            +
              s.email = %q{rotuka@tokak.ru}
         | 
| 15 15 | 
             
              s.extra_rdoc_files = [
         | 
| 16 16 | 
             
                "LICENSE",
         | 
| 17 17 | 
             
                 "README.rdoc"
         | 
    
        data/lib/espresso/helpers.rb
    CHANGED
    
    | @@ -3,12 +3,22 @@ module Espresso | |
| 3 3 | 
             
                include WillPaginate::ViewHelpers
         | 
| 4 4 |  | 
| 5 5 | 
             
                def simple_search
         | 
| 6 | 
            -
                   | 
| 7 | 
            -
                     | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 6 | 
            +
                  returning '' do |form|
         | 
| 7 | 
            +
                    form << form_tag(url_for(:action => :index), :method => :get)
         | 
| 8 | 
            +
                    form << content_tag(:table, :class => 'b_search') do
         | 
| 9 | 
            +
                              content_tag(:tr) do
         | 
| 10 | 
            +
                                returning '' do |result|
         | 
| 11 | 
            +
                                  result << content_tag(:td,
         | 
| 12 | 
            +
                                                        content_tag(:div, text_field_tag(:q, params[:q], :type => 'search'), :class => 'b_input'),
         | 
| 13 | 
            +
                                                        :class => 'input')
         | 
| 14 | 
            +
                                  result << content_tag(:td,
         | 
| 15 | 
            +
                                                        submit_tag(t('krasivotokak.espresso.find', :default => 'Find!'), :class => 'submit'),
         | 
| 16 | 
            +
                                                        :class => 'button')
         | 
| 17 | 
            +
                                end
         | 
| 18 | 
            +
                              end
         | 
| 19 | 
            +
                            end
         | 
| 20 | 
            +
                    form << yield if block_given?
         | 
| 21 | 
            +
                    form << '</form>'
         | 
| 12 22 | 
             
                  end
         | 
| 13 23 | 
             
                end
         | 
| 14 24 |  | 
    
        data/lib/espresso/model.rb
    CHANGED
    
    | @@ -17,9 +17,9 @@ module Espresso | |
| 17 17 | 
             
                  # @return [Array] searchlogic object and collection of results
         | 
| 18 18 | 
             
                  #
         | 
| 19 19 | 
             
                  # @todo Add an options to paginating
         | 
| 20 | 
            -
                  def paginate_found(page = nil, query =  | 
| 20 | 
            +
                  def paginate_found(page = nil, query = {}, simple_query = nil)
         | 
| 21 21 | 
             
                    query ||= {}
         | 
| 22 | 
            -
                    query.merge!(parse_simple_query(simple_query)) if simple_query | 
| 22 | 
            +
                    query.merge!(self.parse_simple_query(simple_query)) if simple_query
         | 
| 23 23 | 
             
                    @search = search(query)
         | 
| 24 24 | 
             
                    @results = @search.paginate(:page => page)
         | 
| 25 25 | 
             
                    [@search, @results]
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: espresso
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.0 | 
| 4 | 
            +
              version: 0.1.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Alexander Semyonov
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2009-09- | 
| 12 | 
            +
            date: 2009-09-16 00:00:00 +04:00
         | 
| 13 13 | 
             
            default_executable: 
         | 
| 14 14 | 
             
            dependencies: 
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -53,7 +53,7 @@ dependencies: | |
| 53 53 | 
             
                    version: 2.3.11
         | 
| 54 54 | 
             
                version: 
         | 
| 55 55 | 
             
            description: Useful templates for controller and model functions
         | 
| 56 | 
            -
            email: rotuka@ | 
| 56 | 
            +
            email: rotuka@tokak.ru
         | 
| 57 57 | 
             
            executables: []
         | 
| 58 58 |  | 
| 59 59 | 
             
            extensions: []
         |