on_the_spot 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/.bundle/config +2 -0
- data/Gemfile +10 -6
- data/Gemfile.lock +84 -38
- data/History.md +25 -0
- data/VERSION +1 -1
- data/app/assets/javascripts/jquery.jeditable.mini.js +38 -0
- data/{lib/generators/on_the_spot/install/templates → app/assets/javascripts}/on_the_spot.js +0 -0
- data/lib/generators/on_the_spot/install/install_generator.rb +14 -6
- data/lib/on_the_spot.rb +1 -1
- data/on_the_spot.gemspec +57 -32
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +45 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/javascripts/application.js +2 -0
- data/spec/dummy/public/javascripts/controls.js +965 -0
- data/spec/dummy/public/javascripts/dragdrop.js +974 -0
- data/spec/dummy/public/javascripts/effects.js +1123 -0
- data/spec/dummy/public/javascripts/prototype.js +6001 -0
- data/spec/dummy/public/javascripts/rails.js +175 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/generators/install_generator_spec.rb +47 -0
- data/spec/spec_helper.rb +32 -7
- metadata +62 -25
- data/.gitignore +0 -23
- data/.rspec +0 -1
- data/autotest/discover.rb +0 -1
- data/spec/spec.opts +0 -1
data/.bundle/config
ADDED
data/Gemfile
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
|
3
|
-
gem "rake"
|
4
|
-
gem "jeweler"
|
5
|
-
gem "json_pure"
|
6
3
|
|
7
4
|
group :test do
|
8
|
-
gem "
|
9
|
-
gem "
|
10
|
-
|
5
|
+
gem "rake", '0.8.7'
|
6
|
+
gem "jeweler"
|
7
|
+
gem "json_pure"
|
8
|
+
gem "rspec", ">= 2.6.0"
|
9
|
+
gem "rails", ">=3.0.9"
|
10
|
+
gem "sqlite3-ruby", :require => "sqlite3" #gem "rcov"
|
11
11
|
gem "simplecov", :require => false
|
12
|
+
|
13
|
+
gem "rspec-rails"
|
14
|
+
|
15
|
+
gem "generator_spec"
|
12
16
|
end
|
data/Gemfile.lock
CHANGED
@@ -2,63 +2,109 @@ GEM
|
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
4
|
abstract (1.0.0)
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
actionmailer (3.0.9)
|
6
|
+
actionpack (= 3.0.9)
|
7
|
+
mail (~> 2.2.19)
|
8
|
+
actionpack (3.0.9)
|
9
|
+
activemodel (= 3.0.9)
|
10
|
+
activesupport (= 3.0.9)
|
8
11
|
builder (~> 2.1.2)
|
9
12
|
erubis (~> 2.6.6)
|
10
|
-
i18n (~> 0.
|
13
|
+
i18n (~> 0.5.0)
|
11
14
|
rack (~> 1.2.1)
|
12
|
-
rack-mount (~> 0.6.
|
13
|
-
rack-test (~> 0.5.
|
15
|
+
rack-mount (~> 0.6.14)
|
16
|
+
rack-test (~> 0.5.7)
|
14
17
|
tzinfo (~> 0.3.23)
|
15
|
-
activemodel (3.0.
|
16
|
-
activesupport (= 3.0.
|
18
|
+
activemodel (3.0.9)
|
19
|
+
activesupport (= 3.0.9)
|
17
20
|
builder (~> 2.1.2)
|
18
|
-
i18n (~> 0.
|
19
|
-
|
21
|
+
i18n (~> 0.5.0)
|
22
|
+
activerecord (3.0.9)
|
23
|
+
activemodel (= 3.0.9)
|
24
|
+
activesupport (= 3.0.9)
|
25
|
+
arel (~> 2.0.10)
|
26
|
+
tzinfo (~> 0.3.23)
|
27
|
+
activeresource (3.0.9)
|
28
|
+
activemodel (= 3.0.9)
|
29
|
+
activesupport (= 3.0.9)
|
30
|
+
activesupport (3.0.9)
|
31
|
+
arel (2.0.10)
|
20
32
|
builder (2.1.2)
|
21
33
|
diff-lcs (1.1.2)
|
22
34
|
erubis (2.6.6)
|
23
35
|
abstract (>= 1.0.0)
|
24
|
-
|
36
|
+
generator_spec (0.8.3)
|
37
|
+
rails (~> 3.0)
|
38
|
+
rspec-rails
|
25
39
|
git (1.2.5)
|
26
|
-
i18n (0.
|
27
|
-
jeweler (1.4
|
28
|
-
|
40
|
+
i18n (0.5.0)
|
41
|
+
jeweler (1.6.4)
|
42
|
+
bundler (~> 1.0)
|
29
43
|
git (>= 1.2.5)
|
30
|
-
|
31
|
-
json_pure (1.
|
32
|
-
|
33
|
-
|
44
|
+
rake
|
45
|
+
json_pure (1.5.3)
|
46
|
+
mail (2.2.19)
|
47
|
+
activesupport (>= 2.3.6)
|
48
|
+
i18n (>= 0.4.0)
|
49
|
+
mime-types (~> 1.16)
|
50
|
+
treetop (~> 1.4.8)
|
51
|
+
mime-types (1.16)
|
52
|
+
polyglot (0.3.1)
|
53
|
+
rack (1.2.3)
|
54
|
+
rack-mount (0.6.14)
|
34
55
|
rack (>= 1.0.0)
|
35
|
-
rack-test (0.5.
|
56
|
+
rack-test (0.5.7)
|
36
57
|
rack (>= 1.0)
|
58
|
+
rails (3.0.9)
|
59
|
+
actionmailer (= 3.0.9)
|
60
|
+
actionpack (= 3.0.9)
|
61
|
+
activerecord (= 3.0.9)
|
62
|
+
activeresource (= 3.0.9)
|
63
|
+
activesupport (= 3.0.9)
|
64
|
+
bundler (~> 1.0)
|
65
|
+
railties (= 3.0.9)
|
66
|
+
railties (3.0.9)
|
67
|
+
actionpack (= 3.0.9)
|
68
|
+
activesupport (= 3.0.9)
|
69
|
+
rake (>= 0.8.7)
|
70
|
+
rdoc (~> 3.4)
|
71
|
+
thor (~> 0.14.4)
|
37
72
|
rake (0.8.7)
|
38
|
-
|
39
|
-
|
40
|
-
rspec-
|
41
|
-
rspec-
|
42
|
-
|
43
|
-
rspec-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
simplecov
|
53
|
-
|
73
|
+
rdoc (3.8)
|
74
|
+
rspec (2.6.0)
|
75
|
+
rspec-core (~> 2.6.0)
|
76
|
+
rspec-expectations (~> 2.6.0)
|
77
|
+
rspec-mocks (~> 2.6.0)
|
78
|
+
rspec-core (2.6.4)
|
79
|
+
rspec-expectations (2.6.0)
|
80
|
+
diff-lcs (~> 1.1.2)
|
81
|
+
rspec-mocks (2.6.0)
|
82
|
+
rspec-rails (2.6.1)
|
83
|
+
actionpack (~> 3.0)
|
84
|
+
activesupport (~> 3.0)
|
85
|
+
railties (~> 3.0)
|
86
|
+
rspec (~> 2.6.0)
|
87
|
+
simplecov (0.4.2)
|
88
|
+
simplecov-html (~> 0.4.4)
|
89
|
+
simplecov-html (0.4.5)
|
90
|
+
sqlite3 (1.3.3)
|
91
|
+
sqlite3-ruby (1.3.3)
|
92
|
+
sqlite3 (>= 1.3.3)
|
93
|
+
thor (0.14.6)
|
94
|
+
treetop (1.4.9)
|
95
|
+
polyglot (>= 0.3.1)
|
96
|
+
tzinfo (0.3.29)
|
54
97
|
|
55
98
|
PLATFORMS
|
56
99
|
ruby
|
57
100
|
|
58
101
|
DEPENDENCIES
|
59
|
-
|
102
|
+
generator_spec
|
60
103
|
jeweler
|
61
104
|
json_pure
|
62
|
-
|
63
|
-
|
105
|
+
rails (>= 3.0.9)
|
106
|
+
rake (= 0.8.7)
|
107
|
+
rspec (>= 2.6.0)
|
108
|
+
rspec-rails
|
64
109
|
simplecov
|
110
|
+
sqlite3-ruby
|
data/History.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Change History / Release Notes
|
2
|
+
|
3
|
+
## Version 0.0.12 (02/07/2011)
|
4
|
+
|
5
|
+
* Added the option to execute a callback after editing
|
6
|
+
|
7
|
+
You will have to upgrade the javascript files as well after update:
|
8
|
+
|
9
|
+
rails g on_the_spot:install
|
10
|
+
|
11
|
+
This will copy the new `on_the_spot.js` files to your `public/javascripts` folder.
|
12
|
+
|
13
|
+
## Version 0.0.11 (29/05/2011)
|
14
|
+
|
15
|
+
* refactored the JS to allow dynamically adding on_the_spot fields (more cleanly).
|
16
|
+
|
17
|
+
There is no real need to update, unless you need or want to use this functionality.
|
18
|
+
|
19
|
+
You will have to upgrade the javascript files as well after update:
|
20
|
+
|
21
|
+
rails g on_the_spot:install
|
22
|
+
|
23
|
+
This will copy the new `on_the_spot.js` files to your `public/javascripts` folder.
|
24
|
+
|
25
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.13
|
@@ -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);
|
File without changes
|
@@ -2,15 +2,23 @@ module OnTheSpot
|
|
2
2
|
module Generators
|
3
3
|
class InstallGenerator < ::Rails::Generators::Base
|
4
4
|
source_root File.expand_path('../templates', __FILE__)
|
5
|
-
desc "This generator installs jEditable and some glue javascript"
|
5
|
+
desc "This generator installs jEditable and some glue javascript (if rails < 3.1) and installs the locale"
|
6
6
|
|
7
|
-
def download_jeditable
|
8
|
-
|
9
|
-
|
7
|
+
#def download_jeditable
|
8
|
+
# # Downloading latest jEditable
|
9
|
+
# get "http://www.appelsiini.net/download/jquery.jeditable.mini.js", "public/javascripts/jquery.jeditable.mini.js"
|
10
|
+
#end
|
11
|
+
|
12
|
+
def copy_javascripts
|
13
|
+
if ::Rails.version[0..2].to_f >= 3.1
|
14
|
+
#puts "The javascripts do not need to be installed since Rails 3.1"
|
15
|
+
else
|
16
|
+
copy_file "../../../../../app/assets/javascripts/on_the_spot.js", "public/javascripts/on_the_spot.js"
|
17
|
+
copy_file "../../../../../app/assets/javascripts/jquery.jeditable.mini.js", "public/javascripts/jquery.jeditable.mini.js"
|
18
|
+
end
|
10
19
|
end
|
11
20
|
|
12
|
-
def
|
13
|
-
copy_file "on_the_spot.js", "public/javascripts/on_the_spot.js"
|
21
|
+
def copy_locales
|
14
22
|
copy_file "on_the_spot.en.yml", "config/locales/on_the_spot.en.yml"
|
15
23
|
end
|
16
24
|
|
data/lib/on_the_spot.rb
CHANGED
@@ -2,7 +2,7 @@ require 'on_the_spot/controller_extension'
|
|
2
2
|
require 'on_the_spot/on_the_spot_helpers'
|
3
3
|
|
4
4
|
module OnTheSpot
|
5
|
-
class
|
5
|
+
class Engine < ::Rails::Engine
|
6
6
|
|
7
7
|
config.before_initialize do
|
8
8
|
config.action_view.javascript_expansions[:on_the_spot] = %w(jquery.jeditable.mini.js on_the_spot)
|
data/on_the_spot.gemspec
CHANGED
@@ -1,57 +1,82 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{on_the_spot}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.13"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nathan Van der Auwera"]
|
12
|
-
s.date = %q{2011-07-
|
12
|
+
s.date = %q{2011-07-24}
|
13
13
|
s.description = %q{Unobtrusive in place editing, using jEditable; only works in Rails 3}
|
14
14
|
s.email = %q{nathan@dixis.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.markdown"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
|
+
".bundle/config",
|
20
21
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
22
|
+
".travis.yml",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"History.md",
|
26
|
+
"LICENSE",
|
27
|
+
"README.markdown",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"app/assets/javascripts/jquery.jeditable.mini.js",
|
31
|
+
"app/assets/javascripts/on_the_spot.js",
|
32
|
+
"lib/generators/on_the_spot/install/install_generator.rb",
|
33
|
+
"lib/generators/on_the_spot/install/templates/jquery.jeditable.mini.js",
|
34
|
+
"lib/generators/on_the_spot/install/templates/on_the_spot.en.yml",
|
35
|
+
"lib/on_the_spot.rb",
|
36
|
+
"lib/on_the_spot/controller_extension.rb",
|
37
|
+
"lib/on_the_spot/on_the_spot_helpers.rb",
|
38
|
+
"on_the_spot.gemspec",
|
39
|
+
"spec/dummy/Rakefile",
|
40
|
+
"spec/dummy/app/controllers/application_controller.rb",
|
41
|
+
"spec/dummy/app/helpers/application_helper.rb",
|
42
|
+
"spec/dummy/app/views/layouts/application.html.erb",
|
43
|
+
"spec/dummy/config.ru",
|
44
|
+
"spec/dummy/config/application.rb",
|
45
|
+
"spec/dummy/config/boot.rb",
|
46
|
+
"spec/dummy/config/database.yml",
|
47
|
+
"spec/dummy/config/environment.rb",
|
48
|
+
"spec/dummy/config/environments/development.rb",
|
49
|
+
"spec/dummy/config/environments/production.rb",
|
50
|
+
"spec/dummy/config/environments/test.rb",
|
51
|
+
"spec/dummy/config/initializers/backtrace_silencers.rb",
|
52
|
+
"spec/dummy/config/initializers/inflections.rb",
|
53
|
+
"spec/dummy/config/initializers/mime_types.rb",
|
54
|
+
"spec/dummy/config/initializers/secret_token.rb",
|
55
|
+
"spec/dummy/config/initializers/session_store.rb",
|
56
|
+
"spec/dummy/config/locales/en.yml",
|
57
|
+
"spec/dummy/config/routes.rb",
|
58
|
+
"spec/dummy/public/404.html",
|
59
|
+
"spec/dummy/public/422.html",
|
60
|
+
"spec/dummy/public/500.html",
|
61
|
+
"spec/dummy/public/favicon.ico",
|
62
|
+
"spec/dummy/public/javascripts/application.js",
|
63
|
+
"spec/dummy/public/javascripts/controls.js",
|
64
|
+
"spec/dummy/public/javascripts/dragdrop.js",
|
65
|
+
"spec/dummy/public/javascripts/effects.js",
|
66
|
+
"spec/dummy/public/javascripts/prototype.js",
|
67
|
+
"spec/dummy/public/javascripts/rails.js",
|
68
|
+
"spec/dummy/public/stylesheets/.gitkeep",
|
69
|
+
"spec/dummy/script/rails",
|
70
|
+
"spec/generators/install_generator_spec.rb",
|
71
|
+
"spec/on_the_spot_spec.rb",
|
72
|
+
"spec/spec_helper.rb"
|
42
73
|
]
|
43
74
|
s.homepage = %q{http://github.com/nathanvda/on_the_spot}
|
44
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
45
75
|
s.require_paths = ["lib"]
|
46
|
-
s.rubygems_version = %q{1.
|
76
|
+
s.rubygems_version = %q{1.6.2}
|
47
77
|
s.summary = %q{unobtrusive in place editing}
|
48
|
-
s.test_files = [
|
49
|
-
"spec/spec_helper.rb",
|
50
|
-
"spec/on_the_spot_spec.rb"
|
51
|
-
]
|
52
78
|
|
53
79
|
if s.respond_to? :specification_version then
|
54
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
55
80
|
s.specification_version = 3
|
56
81
|
|
57
82
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require File.expand_path('../config/application', __FILE__)
|
5
|
+
require 'rake'
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "active_model/railtie"
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_view/railtie"
|
7
|
+
require "action_mailer/railtie"
|
8
|
+
|
9
|
+
Bundler.require
|
10
|
+
require "on_the_spot"
|
11
|
+
|
12
|
+
module Dummy
|
13
|
+
class Application < Rails::Application
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
15
|
+
# Application configuration should go into files in config/initializers
|
16
|
+
# -- all .rb files in that directory are automatically loaded.
|
17
|
+
|
18
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
+
|
21
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
+
|
25
|
+
# Activate observers that should always be running.
|
26
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
+
|
28
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
31
|
+
|
32
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
|
+
# config.i18n.default_locale = :de
|
35
|
+
|
36
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
37
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
38
|
+
|
39
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
40
|
+
config.encoding = "utf-8"
|
41
|
+
|
42
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
43
|
+
config.filter_parameters += [:password]
|
44
|
+
end
|
45
|
+
end
|