restbox 0.1.1 → 0.1.2

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/README.rdoc CHANGED
@@ -2,12 +2,19 @@
2
2
 
3
3
  == Install
4
4
 
5
- To install as a Rails plugin, run this command.
6
-
5
+ To install as a Rails plugin:
6
+
7
7
  script/plugin install http://github.com/richardiux/restbox.git
8
+
9
+ To install as a gem:
10
+
11
+ gem install restbox
12
+
13
+
14
+ Copy javascript, CSS, and images files to public
15
+
16
+ script/generate restbox
8
17
 
9
- === Prerequisites
10
- JQuery 1.3.2
11
18
 
12
19
  == Setup
13
20
 
@@ -58,13 +65,17 @@ To put content in the restbox
58
65
  To manually display loading restbox
59
66
  $.restbox({})
60
67
 
68
+
69
+ == Prerequisites
70
+ JQuery 1.3.2
71
+
61
72
  == Upgrading
62
73
 
63
74
  === Reinstall the plugin
64
75
  script/plugin install http://github.com/richardiux/restbox.git -f
65
76
 
66
77
  === Regenerate JS and CSS
67
- cd vendor/plugins/restbox/; ruby install.rb
78
+ script/generate restbox
68
79
 
69
80
  == Bug Reports
70
81
 
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 1
3
+ :patch: 2
4
4
  :build:
5
5
  :major: 0
@@ -13,8 +13,8 @@ class RestboxGenerator < Rails::Generator::Base
13
13
  m.template 'javascripts/restbox.js', File.join('public', 'javascripts', 'restbox.js')
14
14
 
15
15
  m.directory File.join('public', 'images')
16
- m.template 'images/loader.gif', File.join('public', 'images', 'loader.gif')
17
- m.template 'images/restbox_close.png', File.join('public', 'images', 'restbox_close.png')
16
+ m.template 'images/loader.gif', File.join('public', 'images', 'restbox', 'loader.gif')
17
+ m.template 'images/restbox_close.png', File.join('public', 'images', 'restbox' , 'restbox_close.png')
18
18
  end
19
19
  end
20
20
 
@@ -11,7 +11,10 @@ module ActionView
11
11
  module InstanceMethods
12
12
  def restbox(options = {})
13
13
  content = escape_javascript(options[:content].to_s || '')
14
- "jQuery.restbox({content: \"#{content}\"});"
14
+ container_class = escape_javascript(options[:container_class].to_s || '')
15
+ params = "content: \"#{content}\""
16
+ params += ", container_class: \"#{container_class}\"" unless container_class.empty?
17
+ "jQuery.restbox({#{params}});"
15
18
  end
16
19
  end
17
20
  end
data/restbox.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{restbox}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Richard Millan"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Millan