diff --git a/motion/ruby_motion_query/grid.rb b/motion/ruby_motion_query/grid.rb index e80fe31..62bb481 100644 --- a/motion/ruby_motion_query/grid.rb +++ b/motion/ruby_motion_query/grid.rb @@ -148,6 +148,10 @@ module RubyMotionQuery @content_left_margin = value clear_cache end + def content_right_margin=(value) + @content_right_margin = value + clear_cache + end def content_top_margin=(value) @content_top_margin = value clear_cache diff --git a/ruby_motion_query.gemspec b/ruby_motion_query.gemspec index 9fc2d1c..55dae02 100755 --- a/ruby_motion_query.gemspec +++ b/ruby_motion_query.gemspec @@ -6,10 +6,10 @@ require "ruby_motion_query/version" Gem::Specification.new do |spec| spec.name = 'ruby_motion_query' spec.summary = 'RubyMotionQuery - RMQ' - spec.description = 'RubyMotionQuery - RMQ - A fast, non-magical, non-polluting, jQuery-like library for RubyMotion' + spec.description = 'RubyMotionQuery - RMQ - A fast, non-magical, non-polluting, jQuery-like front-end library for RubyMotion' spec.authors = ["Todd Werth", "InfiniteRed"] spec.email = 'todd@infinitered.com' - spec.homepage = "http://infinitered.com/rmq" + spec.homepage = "http://rubymotionquery.com" spec.version = RubyMotionQuery::VERSION spec.license = 'MIT' diff --git a/spec/grid.rb b/spec/grid.rb index 60646c6..5be44d0 100644 --- a/spec/grid.rb +++ b/spec/grid.rb @@ -17,6 +17,29 @@ describe 'grid' do rmq.app.grid.should != nil end + should 'be able to change apps default grid' do + rmq.app.grid.tap do |g| + g.content_left_margin = 1 + g.content_right_margin = 2 + g.content_top_margin = 3 + g.content_bottom_margin = 4 + g.num_columns = 5 + g.column_gutter = 6 + g.num_rows = 7 + g.row_gutter = 8 + + g.content_left_margin.should == 1 + g.content_right_margin.should == 2 + g.content_top_margin.should == 3 + g.content_bottom_margin.should == 4 + + g.num_columns.should == 5 + g.column_gutter.should == 6 + g.num_rows.should == 7 + g.row_gutter.should == 8 + end + end + should 'clear cache when changing settings' do was_row = @grid['1:3'] was_column = @grid['a:d']