on_the_spot 0.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +23 -0
- data/Gemfile +5 -0
- data/LICENSE +20 -0
- data/README.markdown +63 -0
- data/Rakefile +29 -0
- data/VERSION +1 -0
- data/lib/generators/on_the_spot/install/install_generator.rb +19 -0
- data/lib/generators/on_the_spot/install/templates/jquery.jeditable.mini.js +38 -0
- data/lib/generators/on_the_spot/install/templates/on_the_spot.js +28 -0
- data/lib/on_the_spot.rb +19 -0
- data/lib/on_the_spot/controller_extension.rb +22 -0
- data/lib/on_the_spot/on_the_spot_helpers.rb +21 -0
- data/on_the_spot.gemspec +61 -0
- data/spec/on_the_spot_spec.rb +7 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +9 -0
- metadata +100 -0
data/.document
ADDED
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 nathanvda
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# on_the_spot
|
2
|
+
|
3
|
+
On-the-spot is a Rails3 compliant unobtrusive javascript in-place-editing plugin, using jEditable.
|
4
|
+
(currently a work in progress, extracted it from a rails3 application)
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Inside your `Gemfile` add the following:
|
9
|
+
|
10
|
+
gem "on_the_spot"
|
11
|
+
|
12
|
+
Run the installation task:
|
13
|
+
|
14
|
+
rails g on_the_spot:install
|
15
|
+
|
16
|
+
Inside your `routes.rb` you provide the catch-all
|
17
|
+
|
18
|
+
match ':controller(/:action(/:id(.:format)))'
|
19
|
+
|
20
|
+
This is not ideal: i am looking for a better solution.
|
21
|
+
|
22
|
+
But that is all you need to do to start using it!
|
23
|
+
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
Inside your controller you write:
|
27
|
+
|
28
|
+
|
29
|
+
class YourController < ApplicationController
|
30
|
+
|
31
|
+
can_edit_on_the_spot
|
32
|
+
|
33
|
+
... leave the rest of your controller alone ...
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
And inside your view you will have to specify the fields you want to be "editable" :
|
38
|
+
|
39
|
+
Username: <%= on_the_spot_edit @user, :name %>
|
40
|
+
|
41
|
+
|
42
|
+
It should be as simple as that :)
|
43
|
+
|
44
|
+
## To do
|
45
|
+
|
46
|
+
- make sure you can overrule ok/cancel texts
|
47
|
+
- make sure user can choose to use a textarea instead of just text
|
48
|
+
- find a clean solution for the routes
|
49
|
+
- add tests!
|
50
|
+
|
51
|
+
## Note on Patches/Pull Requests
|
52
|
+
|
53
|
+
* Fork the project.
|
54
|
+
* Make your feature addition or bug fix.
|
55
|
+
* Add tests for it. This is important so I don't break it in a
|
56
|
+
future version unintentionally.
|
57
|
+
* Commit, do not mess with rakefile, version, or history.
|
58
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
59
|
+
* Send me a pull request. Bonus points for topic branches.
|
60
|
+
|
61
|
+
## Copyright
|
62
|
+
|
63
|
+
Copyright (c) 2010 nathanvda. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "on_the_spot"
|
8
|
+
gem.summary = %Q{unobtrusive in place editing}
|
9
|
+
gem.description = %Q{Unobtrusive in place editing, using jEditable; only works in Rails 3}
|
10
|
+
gem.email = "nathan@dixis.com"
|
11
|
+
gem.homepage = "http://github.com/nathanvda/on_the_spot"
|
12
|
+
gem.authors = ["Nathan Van der Auwera"]
|
13
|
+
gem.add_development_dependency "rspec", ">= 2.0.0.beta20"
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
+
end
|
16
|
+
Jeweler::GemcutterTasks.new
|
17
|
+
rescue LoadError
|
18
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'rake/rdoctask'
|
22
|
+
Rake::RDocTask.new do |rdoc|
|
23
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
24
|
+
|
25
|
+
rdoc.rdoc_dir = 'rdoc'
|
26
|
+
rdoc.title = "on_the_spot #{version}"
|
27
|
+
rdoc.rdoc_files.include('README*')
|
28
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
29
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0.beta2
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module OnTheSpot
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < ::Rails::Generators::Base
|
4
|
+
source_root File.expand_path('../templates', __FILE__)
|
5
|
+
desc "This generator installs jEditable and some glue javascript"
|
6
|
+
|
7
|
+
def download_jeditable
|
8
|
+
# Downloading latest jQuery
|
9
|
+
get "http://www.appelsiini.net/download/jquery.jeditable.mini.js", "public/javascripts/jquery.jeditable.mini.js"
|
10
|
+
end
|
11
|
+
|
12
|
+
def copy_glue_javascript
|
13
|
+
# !!!!! TO DO: check this -> how do a copy?
|
14
|
+
copy_file "on_the_spot.js", "public/javascripts/on_the_spot.js"
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
(function($){$.fn.editable=function(target,options){if('disable'==target){$(this).data('disabled.editable',true);return;}
|
3
|
+
if('enable'==target){$(this).data('disabled.editable',false);return;}
|
4
|
+
if('destroy'==target){$(this).unbind($(this).data('event.editable')).removeData('disabled.editable').removeData('event.editable');return;}
|
5
|
+
var settings=$.extend({},$.fn.editable.defaults,{target:target},options);var plugin=$.editable.types[settings.type].plugin||function(){};var submit=$.editable.types[settings.type].submit||function(){};var buttons=$.editable.types[settings.type].buttons||$.editable.types['defaults'].buttons;var content=$.editable.types[settings.type].content||$.editable.types['defaults'].content;var element=$.editable.types[settings.type].element||$.editable.types['defaults'].element;var reset=$.editable.types[settings.type].reset||$.editable.types['defaults'].reset;var callback=settings.callback||function(){};var onedit=settings.onedit||function(){};var onsubmit=settings.onsubmit||function(){};var onreset=settings.onreset||function(){};var onerror=settings.onerror||reset;if(settings.tooltip){$(this).attr('title',settings.tooltip);}
|
6
|
+
settings.autowidth='auto'==settings.width;settings.autoheight='auto'==settings.height;return this.each(function(){var self=this;var savedwidth=$(self).width();var savedheight=$(self).height();$(this).data('event.editable',settings.event);if(!$.trim($(this).html())){$(this).html(settings.placeholder);}
|
7
|
+
$(this).bind(settings.event,function(e){if(true===$(this).data('disabled.editable')){return;}
|
8
|
+
if(self.editing){return;}
|
9
|
+
if(false===onedit.apply(this,[settings,self])){return;}
|
10
|
+
e.preventDefault();e.stopPropagation();if(settings.tooltip){$(self).removeAttr('title');}
|
11
|
+
if(0==$(self).width()){settings.width=savedwidth;settings.height=savedheight;}else{if(settings.width!='none'){settings.width=settings.autowidth?$(self).width():settings.width;}
|
12
|
+
if(settings.height!='none'){settings.height=settings.autoheight?$(self).height():settings.height;}}
|
13
|
+
if($(this).html().toLowerCase().replace(/(;|")/g,'')==settings.placeholder.toLowerCase().replace(/(;|")/g,'')){$(this).html('');}
|
14
|
+
self.editing=true;self.revert=$(self).html();$(self).html('');var form=$('<form />');if(settings.cssclass){if('inherit'==settings.cssclass){form.attr('class',$(self).attr('class'));}else{form.attr('class',settings.cssclass);}}
|
15
|
+
if(settings.style){if('inherit'==settings.style){form.attr('style',$(self).attr('style'));form.css('display',$(self).css('display'));}else{form.attr('style',settings.style);}}
|
16
|
+
var input=element.apply(form,[settings,self]);var input_content;if(settings.loadurl){var t=setTimeout(function(){input.disabled=true;content.apply(form,[settings.loadtext,settings,self]);},100);var loaddata={};loaddata[settings.id]=self.id;if($.isFunction(settings.loaddata)){$.extend(loaddata,settings.loaddata.apply(self,[self.revert,settings]));}else{$.extend(loaddata,settings.loaddata);}
|
17
|
+
$.ajax({type:settings.loadtype,url:settings.loadurl,data:loaddata,async:false,success:function(result){window.clearTimeout(t);input_content=result;input.disabled=false;}});}else if(settings.data){input_content=settings.data;if($.isFunction(settings.data)){input_content=settings.data.apply(self,[self.revert,settings]);}}else{input_content=self.revert;}
|
18
|
+
content.apply(form,[input_content,settings,self]);input.attr('name',settings.name);buttons.apply(form,[settings,self]);$(self).append(form);plugin.apply(form,[settings,self]);$(':input:visible:enabled:first',form).focus();if(settings.select){input.select();}
|
19
|
+
input.keydown(function(e){if(e.keyCode==27){e.preventDefault();reset.apply(form,[settings,self]);}});var t;if('cancel'==settings.onblur){input.blur(function(e){t=setTimeout(function(){reset.apply(form,[settings,self]);},500);});}else if('submit'==settings.onblur){input.blur(function(e){t=setTimeout(function(){form.submit();},200);});}else if($.isFunction(settings.onblur)){input.blur(function(e){settings.onblur.apply(self,[input.val(),settings]);});}else{input.blur(function(e){});}
|
20
|
+
form.submit(function(e){if(t){clearTimeout(t);}
|
21
|
+
e.preventDefault();if(false!==onsubmit.apply(form,[settings,self])){if(false!==submit.apply(form,[settings,self])){if($.isFunction(settings.target)){var str=settings.target.apply(self,[input.val(),settings]);$(self).html(str);self.editing=false;callback.apply(self,[self.innerHTML,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder);}}else{var submitdata={};submitdata[settings.name]=input.val();submitdata[settings.id]=self.id;if($.isFunction(settings.submitdata)){$.extend(submitdata,settings.submitdata.apply(self,[self.revert,settings]));}else{$.extend(submitdata,settings.submitdata);}
|
22
|
+
if('PUT'==settings.method){submitdata['_method']='put';}
|
23
|
+
$(self).html(settings.indicator);var ajaxoptions={type:'POST',data:submitdata,dataType:'html',url:settings.target,success:function(result,status){if(ajaxoptions.dataType=='html'){$(self).html(result);}
|
24
|
+
self.editing=false;callback.apply(self,[result,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder);}},error:function(xhr,status,error){onerror.apply(form,[settings,self,xhr]);}};$.extend(ajaxoptions,settings.ajaxoptions);$.ajax(ajaxoptions);}}}
|
25
|
+
$(self).attr('title',settings.tooltip);return false;});});this.reset=function(form){if(this.editing){if(false!==onreset.apply(form,[settings,self])){$(self).html(self.revert);self.editing=false;if(!$.trim($(self).html())){$(self).html(settings.placeholder);}
|
26
|
+
if(settings.tooltip){$(self).attr('title',settings.tooltip);}}}};});};$.editable={types:{defaults:{element:function(settings,original){var input=$('<input type="hidden"></input>');$(this).append(input);return(input);},content:function(string,settings,original){$(':input:first',this).val(string);},reset:function(settings,original){original.reset(this);},buttons:function(settings,original){var form=this;if(settings.submit){if(settings.submit.match(/>$/)){var submit=$(settings.submit).click(function(){if(submit.attr("type")!="submit"){form.submit();}});}else{var submit=$('<button type="submit" />');submit.html(settings.submit);}
|
27
|
+
$(this).append(submit);}
|
28
|
+
if(settings.cancel){if(settings.cancel.match(/>$/)){var cancel=$(settings.cancel);}else{var cancel=$('<button type="cancel" />');cancel.html(settings.cancel);}
|
29
|
+
$(this).append(cancel);$(cancel).click(function(event){if($.isFunction($.editable.types[settings.type].reset)){var reset=$.editable.types[settings.type].reset;}else{var reset=$.editable.types['defaults'].reset;}
|
30
|
+
reset.apply(form,[settings,original]);return false;});}}},text:{element:function(settings,original){var input=$('<input />');if(settings.width!='none'){input.width(settings.width);}
|
31
|
+
if(settings.height!='none'){input.height(settings.height);}
|
32
|
+
input.attr('autocomplete','off');$(this).append(input);return(input);}},textarea:{element:function(settings,original){var textarea=$('<textarea />');if(settings.rows){textarea.attr('rows',settings.rows);}else if(settings.height!="none"){textarea.height(settings.height);}
|
33
|
+
if(settings.cols){textarea.attr('cols',settings.cols);}else if(settings.width!="none"){textarea.width(settings.width);}
|
34
|
+
$(this).append(textarea);return(textarea);}},select:{element:function(settings,original){var select=$('<select />');$(this).append(select);return(select);},content:function(data,settings,original){if(String==data.constructor){eval('var json = '+data);}else{var json=data;}
|
35
|
+
for(var key in json){if(!json.hasOwnProperty(key)){continue;}
|
36
|
+
if('selected'==key){continue;}
|
37
|
+
var option=$('<option />').val(key).append(json[key]);$('select',this).append(option);}
|
38
|
+
$('select',this).children().each(function(){if($(this).val()==json['selected']||$(this).text()==$.trim(original.revert)){$(this).attr('selected','selected');}});}}},addInputType:function(name,input){$.editable.types[name]=input;}};$.fn.editable.defaults={name:'value',id:'id',type:'text',width:'auto',height:'auto',event:'click.editable',onblur:'cancel',loadtype:'GET',loadtext:'Loading...',placeholder:'Click to edit',loaddata:{},submitdata:{},ajaxoptions:{}};})(jQuery);
|
@@ -0,0 +1,28 @@
|
|
1
|
+
$(document).ready(function() {
|
2
|
+
|
3
|
+
$(".on_the_spot_editing").mouseover(function() {
|
4
|
+
$(this).css('background-color', '#EEF2A0');
|
5
|
+
});
|
6
|
+
$(".on_the_spot_editing").mouseout(function() {
|
7
|
+
$(this).css('background-color', 'inherit');
|
8
|
+
});
|
9
|
+
/* $('.on_the_spot_editing').editable(this.attr('data-url'), {
|
10
|
+
tooltip: 'Click to edit...',
|
11
|
+
cancel : 'Cancel',
|
12
|
+
submit : 'OK'
|
13
|
+
});*/
|
14
|
+
$('.on_the_spot_editing').each(function(n){
|
15
|
+
var el = $(this),
|
16
|
+
data_url = el.attr('data-url'),
|
17
|
+
ok_text = el.attr('data-ok') || 'OK',
|
18
|
+
cancel_text = el.attr('data-cancel') || 'Cancel',
|
19
|
+
tooltip_text = el.attr('data-tooltip') || 'Click to edit ...';
|
20
|
+
|
21
|
+
el.editable(data_url, {
|
22
|
+
tooltip: tooltip_text,
|
23
|
+
cancel: cancel_text,
|
24
|
+
submit: ok_text
|
25
|
+
})
|
26
|
+
})
|
27
|
+
|
28
|
+
});
|
data/lib/on_the_spot.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'on_the_spot/controller_extension'
|
2
|
+
require 'on_the_spot/on_the_spot_helpers'
|
3
|
+
|
4
|
+
module OnTheSpot
|
5
|
+
class Railtie < ::Rails::Railtie
|
6
|
+
|
7
|
+
config.before_initialize do
|
8
|
+
config.action_view.javascript_expansions[:on_the_spot] = %w(jquery.jeditable.mini.js on_the_spot)
|
9
|
+
end
|
10
|
+
|
11
|
+
# configure our plugin on boot. other extension points such
|
12
|
+
# as configuration, rake tasks, etc, are also available
|
13
|
+
initializer "on_the_spot.initialize" do |app|
|
14
|
+
ActionController::Base.send :include, OnTheSpot::ControllerExtension
|
15
|
+
ActionView::Base.send :include, OnTheSpot::Helpers
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module OnTheSpot
|
2
|
+
module ControllerExtension
|
3
|
+
|
4
|
+
def self.included(base)
|
5
|
+
base.extend ClassMethods
|
6
|
+
end
|
7
|
+
|
8
|
+
# if this method is called inside a controller, the edit-on-the-spot
|
9
|
+
# controller action is added that will allow to edit fields in place
|
10
|
+
module ClassMethods
|
11
|
+
def can_edit_on_the_spot
|
12
|
+
define_method :update_attribute_on_the_spot do
|
13
|
+
klass, field, id = params[:id].split('__')
|
14
|
+
object = klass.camelize.constantize.find(id)
|
15
|
+
object.update_attribute(field, params[:value])
|
16
|
+
render :text => CGI::escapeHTML(object.send(field).to_s)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module OnTheSpot
|
2
|
+
module Helpers
|
3
|
+
|
4
|
+
def on_the_spot_edit(object, field, options={})
|
5
|
+
#!!! to do: translate options to data-fields
|
6
|
+
# Possible fields:
|
7
|
+
# url?
|
8
|
+
# type: textarea or not
|
9
|
+
# button-translations ok-Text, cancel-Text
|
10
|
+
#
|
11
|
+
update_url = url_for(:action => 'update_attribute_on_the_spot')
|
12
|
+
|
13
|
+
content_tag("span", :id => "#{object.class.name.underscore}__#{field}__#{object.id}",
|
14
|
+
:class => 'on_the_spot_editing',
|
15
|
+
:'data-url' => update_url) do
|
16
|
+
object.send(field.to_sym).to_s
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
data/on_the_spot.gemspec
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{on_the_spot}
|
8
|
+
s.version = "0.0.0.beta2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Nathan Van der Auwera"]
|
12
|
+
s.date = %q{2010-09-05}
|
13
|
+
s.description = %q{Unobtrusive in place editing, using jEditable; only works in Rails 3}
|
14
|
+
s.email = %q{nathan@dixis.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.markdown"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"Gemfile",
|
23
|
+
"LICENSE",
|
24
|
+
"README.markdown",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"lib/generators/on_the_spot/install/install_generator.rb",
|
28
|
+
"lib/generators/on_the_spot/install/templates/jquery.jeditable.mini.js",
|
29
|
+
"lib/generators/on_the_spot/install/templates/on_the_spot.js",
|
30
|
+
"lib/on_the_spot.rb",
|
31
|
+
"lib/on_the_spot/controller_extension.rb",
|
32
|
+
"lib/on_the_spot/on_the_spot_helpers.rb",
|
33
|
+
"on_the_spot.gemspec",
|
34
|
+
"spec/on_the_spot_spec.rb",
|
35
|
+
"spec/spec.opts",
|
36
|
+
"spec/spec_helper.rb"
|
37
|
+
]
|
38
|
+
s.homepage = %q{http://github.com/nathanvda/on_the_spot}
|
39
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
40
|
+
s.require_paths = ["lib"]
|
41
|
+
s.rubygems_version = %q{1.3.7}
|
42
|
+
s.summary = %q{unobtrusive in place editing}
|
43
|
+
s.test_files = [
|
44
|
+
"spec/spec_helper.rb",
|
45
|
+
"spec/on_the_spot_spec.rb"
|
46
|
+
]
|
47
|
+
|
48
|
+
if s.respond_to? :specification_version then
|
49
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
50
|
+
s.specification_version = 3
|
51
|
+
|
52
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
53
|
+
s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta20"])
|
54
|
+
else
|
55
|
+
s.add_dependency(%q<rspec>, [">= 2.0.0.beta20"])
|
56
|
+
end
|
57
|
+
else
|
58
|
+
s.add_dependency(%q<rspec>, [">= 2.0.0.beta20"])
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: on_the_spot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: true
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- beta2
|
10
|
+
version: 0.0.0.beta2
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Nathan Van der Auwera
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-09-05 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rspec
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
segments:
|
30
|
+
- 2
|
31
|
+
- 0
|
32
|
+
- 0
|
33
|
+
- beta20
|
34
|
+
version: 2.0.0.beta20
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
37
|
+
description: Unobtrusive in place editing, using jEditable; only works in Rails 3
|
38
|
+
email: nathan@dixis.com
|
39
|
+
executables: []
|
40
|
+
|
41
|
+
extensions: []
|
42
|
+
|
43
|
+
extra_rdoc_files:
|
44
|
+
- LICENSE
|
45
|
+
- README.markdown
|
46
|
+
files:
|
47
|
+
- .document
|
48
|
+
- .gitignore
|
49
|
+
- Gemfile
|
50
|
+
- LICENSE
|
51
|
+
- README.markdown
|
52
|
+
- Rakefile
|
53
|
+
- VERSION
|
54
|
+
- lib/generators/on_the_spot/install/install_generator.rb
|
55
|
+
- lib/generators/on_the_spot/install/templates/jquery.jeditable.mini.js
|
56
|
+
- lib/generators/on_the_spot/install/templates/on_the_spot.js
|
57
|
+
- lib/on_the_spot.rb
|
58
|
+
- lib/on_the_spot/controller_extension.rb
|
59
|
+
- lib/on_the_spot/on_the_spot_helpers.rb
|
60
|
+
- on_the_spot.gemspec
|
61
|
+
- spec/on_the_spot_spec.rb
|
62
|
+
- spec/spec.opts
|
63
|
+
- spec/spec_helper.rb
|
64
|
+
has_rdoc: true
|
65
|
+
homepage: http://github.com/nathanvda/on_the_spot
|
66
|
+
licenses: []
|
67
|
+
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options:
|
70
|
+
- --charset=UTF-8
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
version: "0"
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ">"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
segments:
|
87
|
+
- 1
|
88
|
+
- 3
|
89
|
+
- 1
|
90
|
+
version: 1.3.1
|
91
|
+
requirements: []
|
92
|
+
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 1.3.7
|
95
|
+
signing_key:
|
96
|
+
specification_version: 3
|
97
|
+
summary: unobtrusive in place editing
|
98
|
+
test_files:
|
99
|
+
- spec/spec_helper.rb
|
100
|
+
- spec/on_the_spot_spec.rb
|