s3ff 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa68843504870dde78c2146cbd742ec26a9c5826
4
- data.tar.gz: a90a1ceb009cc4488aef06886bdac71806667a62
3
+ metadata.gz: f22ad02b8e3eeca86cbd5349b62531a764b43614
4
+ data.tar.gz: 43199824a91fbad288a0507b8f0391d951946089
5
5
  SHA512:
6
- metadata.gz: dca77539e239ef3ca2c666861f75a9adac27945d461615f6bb7132bffe77aa8faf5a0ceb7c60e565edb127b9a41fced54580e97d65dc13231194a6ee6741070b
7
- data.tar.gz: 60e7ed6509d3a9ef284c754df7380cf7b4b3f6955435790bff7c78b5fbd1cb2558dfc551d3823cef0507208cc163005aaf55af3d7e2dbc32cdfb1330563f8e1e
6
+ metadata.gz: 8ad7fdfba1a7ba04ab13530c8d049d41cf9360605e7db8d6aa8e4072891594f824302d4750e8dbd016fe6c66955802b076d10a9b3063f003912b7ac9c9ffd5d6
7
+ data.tar.gz: dc89543f7ef182df36d1c94183fb18287de533f536ac34983ebf25524db944c1ece6fb7b6ad7df644409aa7886115af942c19e9bc9648a3ab47392f76ffecad3
data/README.md CHANGED
@@ -1,8 +1,53 @@
1
1
  # S3FF
2
2
 
3
- Using `s3_file_field` with `paperclip`
3
+ Using [s3_file_field][] with [paperclip][].
4
4
 
5
- ## Install
5
+ [s3_file_field]: https://github.com/sheerun/s3_file_field
6
+ [paperclip]: https://github.com/thoughtbot/paperclip
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 's3ff'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install s3ff
21
+
22
+ ## Usage
23
+
24
+ ### 0. Add initializer for s3_file_field:
25
+
26
+ ```ruby
27
+ if defined?(S3FileField) && ENV['AWS_KEY']
28
+ cdn_hostname = ENV.fetch('CDN_HOSTNAME') { ENV['S3_BUCKET'] && "#{ENV['S3_BUCKET']}.s3.amazonaws.com" }
29
+ S3FileField.config do |c|
30
+ c.access_key_id = ENV['AWS_KEY']
31
+ c.secret_access_key = ENV['AWS_SECRET']
32
+ c.bucket = ENV['S3_BUCKET']
33
+ c.region = ENV['S3_BUCKET_REGION'] || 'us-west-2'
34
+ c.url = "//#{cdn_hostname}" if cdn_hostname # S3 API endpoint (optional), eg. "https://#{c.bucket}.s3.amazonaws.com/"
35
+ # c.acl = "public-read"
36
+ # c.expiration = 10.hours.from_now.utc.iso8601
37
+ # c.max_file_size = 100.megabytes
38
+ # c.conditions = []
39
+ # c.key_starts_with = 'uploads/
40
+ # c.ssl = true # if true, force SSL connection
41
+ end
42
+
43
+ elsif defined?(S3FileField) # for when no S3 is configured, fallback to regular `file_field`
44
+ S3FileField::FormBuilder.class_eval do
45
+ def s3_file_field(method, options = {})
46
+ @template.file_field(@object_name, method, options)
47
+ end
48
+ end
49
+ end
50
+ ```
6
51
 
7
52
  ### 1. Add javascript
8
53
 
@@ -100,8 +145,14 @@ class User < ActiveRecord::Base
100
145
  end
101
146
  ```
102
147
 
148
+ ## Contributing
103
149
 
150
+ 1. Fork it ( http://github.com/jollygoodcode/s3ff/fork )
151
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
152
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
153
+ 4. Push to the branch (`git push origin my-new-feature`)
154
+ 5. Create new Pull Request
104
155
 
105
- ### License
156
+ ## License
106
157
 
107
- This repository is MIT-licensed.
158
+ This repository is MIT-licensed, see [LICENSE](LICENSE).
data/lib/s3ff/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module S3FF
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
@@ -0,0 +1,6 @@
1
+ /*! JsRender v1.0.0-beta: http://github.com/BorisMoore/jsrender and http://jsviews.com/jsviews
2
+ informal pre V1.0 commit counter: 60 */
3
+ (function(n,t,i){"use strict";function et(n,t){for(var i in t.props)wt.test(i)&&(n[i]=t.props[i])}function ot(n){return n}function ir(n){return n}function dt(n){s._dbgMode=n;pt=n?"Unavailable (nested view): use #getIndex()":"";it("dbg",ci.dbg=tt.dbg=n?ir:ot)}function st(n){this.name=(u.link?"JsViews":"JsRender")+" Error";this.message=n||this.name}function f(n,t){for(var i in t)n[i]=t[i];return n}function d(n){return typeof n=="function"}function gt(n,t,i){return(!o.rTag||n)&&(p=n?n.charAt(0):p,w=n?n.charAt(1):w,h=t?t.charAt(0):h,v=t?t.charAt(1):v,nt=i||nt,n="\\"+p+"(\\"+nt+")?\\"+w,t="\\"+h+"\\"+v,y="(?:(?:(\\w+(?=[\\/\\s\\"+h+"]))|(?:(\\w+)?(:)|(>)|!--((?:[^-]|-(?!-))*)--|(\\*)))\\s*((?:[^\\"+h+"]|\\"+h+"(?!\\"+v+"))*?)",o.rTag=y+")",y=new RegExp(n+y+"(\\/)?|(?:\\/(\\w+)))"+t,"g"),yt=new RegExp("<.*>|([^\\\\]|^)[{}]|"+n+".*"+t)),[p,w,h,v,nt]}function rr(n,t){t||(t=n,n=i);var e,f,o,u,r=this,s=!t||t==="root";if(n){if(u=r.type===t?r:i,!u)if(e=r.views,r._.useKey){for(f in e)if(u=e[f].get(n,t))break}else for(f=0,o=e.length;!u&&f<o;f++)u=e[f].get(n,t)}else if(s)while(r.parent.parent)u=r=r.parent;else while(r&&!u)u=r.type===t?r:i,r=r.parent;return u}function ni(){var n=this.get("item");return n?n.index:i}function ti(){return this.index}function ur(t){var u,e=this,o=e.linkCtx,r=(e.ctx||{})[t];return r===i&&o&&o.ctx&&(r=o.ctx[t]),r===i&&(r=ci[t]),r&&d(r)&&!r._wrp&&(u=function(){return r.apply(!this||this===n?e:this,arguments)},u._wrp=!0,f(u,r)),u||r}function fr(n,t,u,f){var e,s,c=+u===u&&t.tmpl.bnds[u-1],h=t.linkCtx;return f=f!==i&&{props:{},args:[f]},u=f||(c?c(t.data,t,r):u),s=u.args[0],(n||c)&&(e=h&&h.tag,e||(e={_:{inline:!h,bnd:c},tagName:":",cvt:n,flow:!0,tagCtx:u,_is:"tag"},h&&(h.tag=e,e.linkCtx=h,u.ctx=a(u.ctx,h.view.ctx)),o._lnk(e)),e._er=f&&s,et(e,u),u.view=t,e.ctx=u.ctx||{},delete u.ctx,t._.tag=e,s=ht(e,e.convert||n!=="true"&&n)[0],s=c&&t._.onRender?t._.onRender(s,t,c):s,t._.tag=i),s!=i?s:""}function ht(n,t){var r=n.tagCtx,u=r.view,i=r.args;return t=t&&(""+t===t?u.getRsc("converters",t)||c("Unknown converter: '"+t+"'"):t),i=!i.length&&!r.index?[u.data]:t?i.slice():i,t&&(t.depends&&(n.depends=o.getDeps(n.depends,n,t.depends,t)),i[0]=t.apply(n,i)),i}function er(n,t){for(var f,e,u=this;f===i&&u;)e=u.tmpl[n],f=e&&e[t],u=u.parent;return f||r[n][t]}function or(n,t,u,s,h,l){var v,lt,at,ot,p,vt,nt,y,st,rt,it,yt,pt,d,k,ct,wt,g="",w=t.linkCtx||0,ut=t.ctx,bt=u||t.tmpl,ft=+s===s&&bt.bnds[s-1];for(n._is==="tag"&&(v=n,n=v.tagName,s=v.tagCtxs),v=v||w.tag,l=l!==i&&(g+=l,[{props:{},args:[]}]),s=l||(ft?ft(t.data,t,r):s),vt=s.length,p=0;p<vt;p++)p||u&&v||(it=t.getRsc("tags",n)||c("Unknown tag: {{"+n+"}}")),y=s[p],(!w.tag||v._er)&&(rt=y.tmpl,rt=y.content=rt&&bt.tmpls[rt-1],f(y,{tmpl:(v?v:it).template||rt,render:ei,index:p,view:t,ctx:a(y.ctx,ut)})),(u=y.props.tmpl)&&(u=""+u===u?t.getRsc("templates",u)||e(u):u,y.tmpl=u),v||(it._ctr?(v=new it._ctr,yt=!!v.init):o._lnk(v={render:it.render}),v._={inline:!w},w&&(w.tag=v,v.linkCtx=w),(v._.bnd=ft||w.fn)?v._.arrVws={}:v.dataBoundOnly&&c("{^{"+n+"}} tag must be data-bound"),v.tagName=n,v.parent=ot=ut&&ut.tag,v._is="tag",v._def=it,v.tagCtxs=s),y.tag=v,v.dataMap&&v.tagCtxs&&(y.map=v.tagCtxs[p].map),v.flow||(st=y.ctx=y.ctx||{},lt=v.parents=st.parentTags=ut&&a(st.parentTags,ut.parentTags)||{},ot&&(lt[ot.tagName]=ot),lt[v.tagName]=st.tag=v);if(t._.tag=v,!(v._er=l)){for(et(v,s[0]),v.rendering={},p=0;p<vt;p++)y=v.tagCtx=v.tagCtxs[p],ct=y.props,k=ht(v,v.convert),(pt=ct.dataMap||v.dataMap)&&(k.length||ct.dataMap)&&(d=y.map,(!d||d.src!==k[0]||h)&&(d&&d.src&&d.unmap(),d=y.map=pt.map(k[0],ct)),k=[d.tgt]),v.ctx=y.ctx,!p&&yt&&(wt=v.template,v.init(y,w,v.ctx),yt=i,v.template!==wt&&(v._.tmpl=v.template),w&&(w.attr=v.attr=w.attr||v.attr)),nt=i,v.render&&(nt=v.render.apply(v,k)),k=k.length?k:[t],nt=nt!==i?nt:y.render(k[0],!0)||(h?i:""),g=g?g+(nt||""):nt;delete v.rendering}return v.tagCtx=v.tagCtxs[0],v.ctx=v.tagCtx.ctx,v._.inline&&(at=v.attr)&&at!==b&&(g=at==="text"?tt.html(g):""),ft&&t._.onRender?t._.onRender(g,t,ft):g}function g(n,t,i,r,u,f,e,o){var a,h,c,s=this,v=t==="array",l={key:0,useKey:v?0:1,id:""+tr++,onRender:o,bnds:{}};s.data=r;s.tmpl=u;s.content=e;s.views=v?[]:{};s.parent=i;s.type=t||"top";s._=l;s.linked=!!o;i?(a=i.views,h=i._,h.useKey?(a[l.key="_"+h.useKey++]=s,s.index=pt,s.getIndex=ni,c=h.tag,l.bnd=v&&(!c||!!c._.bnd&&c)):a.splice(l.key=s.index=f,0,s),s.ctx=n||i.ctx):s.ctx=n}function sr(n){var i,r,t,u,e,f,s;for(i in k)if(e=k[i],(f=e.compile)&&(r=n[i+"s"]))for(t in r)u=r[t]=f(t,r[t],n),u&&(s=o.onStore[i])&&s(t,u,f)}function hr(n,t,r){var o,u;return d(t)?t={depends:t.depends,render:t}:(t.baseTag&&(t.flow=!!t.flow,t=f(f({},t.baseTag),t)),(u=t.template)!==i&&(t.template=""+u===u?e[u]||e(u):u),t.init!==!1&&(o=t._ctr=function(){},(o.prototype=t).constructor=o)),r&&(t._parentTmpl=r),t}function ii(r,u,f,o){function c(u){if(""+u===u||u.nodeType>0){try{h=u.nodeType>0?u:!yt.test(u)&&t&&t(n.document).find(u)[0]}catch(s){}return h&&(u=e[r=r||h.getAttribute(ft)],u||(r=r||"_"+nr++,h.setAttribute(ft,r),u=e[r]=ii(r,h.innerHTML,f,o)),h=i),u}}var s,h;return u=u||"",s=c(u),o=o||(u.markup?u:{}),o.tmplName=r,f&&(o._parentTmpl=f),!s&&u.markup&&(s=c(u.markup))&&s.fn&&(s.debug!==u.debug||s.allowCode!==u.allowCode)&&(s=s.markup),s!==i?(r&&!f&&(kt[r]=function(){return u.render.apply(u,arguments)}),s.fn||u.fn?s.fn&&(u=r&&r!==s.tmplName?a(o,s):s):(u=ui(s,o),lt(s.replace(pi,"\\$&"),u)),sr(o),u):void 0}function ri(n){function t(t,i){this.tgt=n.getTgt(t,i)}return d(n)&&(n={getTgt:n}),n.baseMap&&(n=f(f({},n.baseMap),n)),n.map=function(n,i){return new t(n,i)},n}function ui(n,t){var i,e=s.wrapMap||{},r=f({markup:n,tmpls:[],links:{},tags:{},bnds:[],_is:"template",render:fi},t);return t.htmlTag||(i=ki.exec(n),r.htmlTag=i?i[1].toLowerCase():""),i=e[r.htmlTag],i&&i!==e.div&&(r.markup=u.trim(r.markup)),r}function cr(n,t){function u(e,s,h){var v,c,l,a;if(e&&typeof e=="object"&&!e.nodeType&&!e.markup&&!e.getTgt){for(l in e)u(l,e[l],s);return r}return s===i&&(s=e,e=i),e&&""+e!==e&&(h=s,s=e,e=i),a=h?h[f]=h[f]||{}:u,c=t.compile,s===null?e&&delete a[e]:(s=c?s=c(e,s,h):s,e&&(a[e]=s)),c&&s&&(s._is=n),s&&(v=o.onStore[n])&&v(e,s,c),s}var f=n+"s";r[f]=u;k[n]=t}function lr(n,t,i){var r=this.jquery&&(this[0]||c('Unknown template: "'+this.selector+'"')),u=r.getAttribute(ft);return fi.call(u?e[u]:e(r),n,t,i)}function ct(n,t,i){if(s._dbgMode)try{return n.fn(t,i,r)}catch(u){return c(u,i)}return n.fn(t,i,r)}function fi(n,t,i,r,f,e){var o=this;return!r&&o.fn._nvw&&!u.isArray(n)?ct(o,n,{tmpl:o}):ei.call(o,n,t,i,r,f,e)}function ei(n,t,r,f,o,s){var y,ut,d,l,nt,tt,it,p,v,rt,w,ft,h,et,c=this,k="";if(!!t===t&&(r=t,t=i),o===!0&&(it=!0,o=0),c.tag?(p=c,c=c.tag,rt=c._,ft=c.tagName,h=rt.tmpl||p.tmpl,et=c.attr&&c.attr!==b,t=a(t,c.ctx),v=p.content,p.props.link===!1&&(t=t||{},t.link=!1),f=f||p.view,n=arguments.length?n:f):h=c,h&&(!f&&n&&n._is==="view"&&(f=n),f&&(v=v||f.content,s=s||f._.onRender,n===f&&(n=f.data),t=a(t,f.ctx)),f&&f.type!=="top"||((t=t||{}).root=n),h.fn||(h=e[h]||e(h)),h)){if(s=(t&&t.link)!==!1&&!et&&s,w=s,s===!0&&(w=i,s=f._.onRender),t=h.helpers?a(h.helpers,t):t,u.isArray(n)&&!r)for(l=it?f:o!==i&&f||new g(t,"array",f,n,h,o,v,s),y=0,ut=n.length;y<ut;y++)d=n[y],nt=new g(t,"item",l,d,h,(o||0)+y,v,s),tt=ct(h,d,nt),k+=l._.onRender?l._.onRender(tt,nt):tt;else(f||!h.fn._nvw)&&(l=it?f:new g(t,ft||"data",f,n,h,o,v,s),rt&&!c.flow&&(l.tag=c)),k+=ct(h,n,l);return w?w(k,l):k}return""}function c(n,t,i){var r=s.onError(n,t,i);if(""+n===n)throw new o.Err(r);return!t.linkCtx&&t.linked?tt.html(r):r}function l(n){c("Syntax error\n"+n)}function lt(n,t,i,r){function k(t){t-=f;t&&h.push(n.substr(f,t).replace(ut,"\\n"))}function c(t){t&&l('Unmatched or missing tag: "{{/'+t+'}}" in template:\n'+n)}function d(e,o,v,y,p,d,nt,tt,it,rt,ft,et){d&&(p=":",y=b);rt=rt||i;var ot=(o||i)&&[[]],ht="",ct="",lt="",at="",vt="",yt="",pt="",bt="",st=!rt&&!p&&!nt;v=v||(it=it||"#data",p);k(et);f=et+e.length;tt?g&&h.push(["*","\n"+it.replace(yi,"$1")+"\n"]):v?(v==="else"&&(bi.test(it)&&l('for "{{else if expr}}" use "{{else expr}}"'),ot=u[7],u[8]=n.substring(u[8],et),u=s.pop(),h=u[2],st=!0),it&&(hi(it.replace(ut," "),ot,t).replace(wi,function(n,t,i,r,u,f,e,o){return e?(ct+=f+",",at+="'"+o+"',"):i?(lt+=r+f+",",yt+=r+"'"+o+"',"):t?pt+=f:(u==="trigger"&&(bt+=f),ht+=r+f+",",vt+=r+"'"+o+"',",w=w||wt.test(u)),""}).slice(0,-1),ot&&ot[0]&&ot.pop()),a=[v,y||!!r||w||"",st&&[],oi(at,vt,yt),oi(ct,ht,lt),pt,bt,ot||0],h.push(a),st&&(s.push(u),u=a,u[8]=f)):ft&&(c(ft!==u[0]&&u[0]!=="else"&&ft),u[8]=n.substring(u[8],et),u=s.pop());c(!u&&ft);h=u[2]}var o,a,w,g=t&&t.allowCode,e=[],f=0,s=[],h=e,u=[,,e];return i&&(n=p+n+v),c(s[0]&&s[0][2].pop()[0]),n.replace(y,d),k(n.length),(f=e[e.length-1])&&c(""+f!==f&&+f[8]===f[8]&&f[0]),i?(o=vt(e,n,i),at(o,e[0][7])):o=vt(e,t),o._nvw&&(o._nvw=!/[~#]/.test(n)),o}function at(n,t){n.deps=[];for(var i in t)i!=="_jsvto"&&t[i].length&&(n.deps=n.deps.concat(t[i]));n.paths=t}function oi(n,t,i){return[n.slice(0,-1),t.slice(0,-1),i.slice(0,-1)]}function si(n,t){return"\n\t"+(t?t+":{":"")+"args:["+n[0]+"]"+(n[1]||!t?",\n\tprops:{"+n[1]+"}":"")+(n[2]?",\n\tctx:{"+n[2]+"}":"")}function hi(n,t,i){function b(b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,at,vt,yt,pt,wt){function ni(n,i,u,e,o,h,c,l){if(u&&(r&&(f==="linkTo"&&(s=t._jsvto=t._jsvto||[],s.push(nt)),(!f||a)&&r.push(nt.slice(i.length))),u!==".")){var v=(e?'view.hlp("'+e+'")':o?"view":"data")+(l?(h?"."+h:e?"":o?"":"."+u)+(c||""):(l=e?"":o?h||"":u,""));return v=v+(l?"."+l:""),i+(v.slice(0,9)==="view.data"?v.slice(5):v)}return n}tt=tt||"";d=d||k||ot;nt=nt||ut;ft=ft||vt||"";var kt,dt,bt,gt=wt.length-1;if(!it||o||e)return r&&at&&!o&&!e&&(!f||a||s)&&(kt=p[u],gt>pt-kt&&(kt=wt.slice(kt,pt+1),at=w+":"+kt+" onerror=''"+h,bt=y[at],bt||(y[at]=!0,y[at]=bt=lt(at,i||r,!0),bt.paths.push({_jsvOb:bt})),bt!==!0&&(s||r).push({_jsvOb:bt}))),o?(o=!st,o?b:'"'):e?(e=!ht,e?b:'"'):(d?(u++,p[u]=pt++,d):"")+(yt?u?"":(c=wt.slice(c,pt),f?(f=a=s=!1,"\b"):"\b,")+c+(c=pt+b.length,r&&t.push(r=[]),"\b"):rt?(u&&l(n),r&&t.pop(),f=nt,a=g,c=pt+b.length,g&&(r=t[f]=[]),nt+":"):nt?nt.split("^").join(".").replace(ai,ni)+(ft?(v[++u]=!0,nt.charAt(0)!=="."&&(p[u]=pt),dt?"":ft):tt):tt?tt:ct?(v[u--]=!1,ct)+(ft?(v[++u]=!0,ft):""):et?(v[u]||l(n),","):k?"":(o=st,e=ht,'"'));l(n)}var f,s,a,e,o,r=t&&t[0],c=0,y=i?i.links:r&&(r.links=r.links||{}),v={},p={0:-1},u=0;return(n+(i?" ":"")).replace(/\)\^/g,").").replace(vi,b)}function vt(n,t,r){var p,f,e,c,g,yt,pt,ni,wt,nt,ot,w,s,st,tt,it,v,ht,y,rt,k,ft,bt,d,kt,dt,ct,h,a,lt,gt,o=0,u="",et={},ti=n.length;for(""+t===t?(y=r?'data-link="'+t.replace(ut," ").slice(1,-1)+'"':t,t=0):(y=t.tmplName||"unnamed",t.allowCode&&(et.allowCode=!0),t.debug&&(et.debug=!0),w=t.bnds,ht=t.tmpls),p=0;p<ti;p++)if(f=n[p],""+f===f)u+='\n+"'+f+'"';else if(e=f[0],e==="*")u+=";\n"+f[1]+"\nret=ret";else{if(c=f[1],ft=f[2],g=si(f[3],"params")+"},"+si(st=f[4]),a=f[5],gt=f[6],bt=f[8],(dt=e==="else")||(o=0,w&&(s=f[7])&&(o=w.push(s))),(ct=e===":")?c&&(e=c===b?">":c+e):(ft&&(rt=ui(bt,et),rt.tmplName=y+"/"+e,vt(ft,rt),ht.push(rt)),dt||(k=e,kt=u,u=""),d=n[p+1],d=d&&d[0]==="else"),lt=a?";\ntry{\nret+=":"\n+",tt="",it="",ct&&(s||gt||c&&c!==b)){if(h="return {"+g+"};",v='c("'+c+'",view,',h=new Function("data,view,j,u"," // "+y+" "+o+" "+e+"\n"+h),h._er=a,tt=v+o+",",it=")",h._tag=e,r)return h;at(h,s);ot=!0}if(u+=ct?(r?(a?"\ntry{\n":"")+"return ":lt)+(ot?(ot=i,nt=wt=!0,v+(s?(w[o-1]=h,o):"{"+g+"}")+")"):e===">"?(pt=!0,"h("+st[0]+")"):(ni=!0,"((v="+st[0]+')!=null?v:"")')):(nt=yt=!0,"\n{view:view,tmpl:"+(ft?ht.length:"0")+","+g+"},"),k&&!d){if(u="["+u.slice(0,-1)+"]",v='t("'+k+'",view,this,',r||s){if(u=new Function("data,view,j,u"," // "+y+" "+o+" "+k+"\nreturn "+u+";"),u._er=a,u._tag=e,s&&at(w[o-1]=u,s),r)return u;tt=v+o+",undefined,";it=")"}u=kt+lt+v+(o||u)+")";s=0;k=0}a&&(nt=!0,u+=";\n}catch(e){ret"+(r?"urn ":"+=")+tt+"j._err(e,view,"+a+")"+it+";}\n"+(r?"":"ret=ret"))}u="// "+y+"\nvar v"+(yt?",t=j._tag":"")+(wt?",c=j._cnvt":"")+(pt?",h=j.converters.html":"")+(r?";\n":',ret=""\n')+(et.debug?"debugger;":"")+u+(r?"\n":";\nreturn ret;");try{u=new Function("data,view,j,u",u)}catch(ii){l("Compiled template code:\n\n"+u+'\n: "'+ii.message+'"')}return t&&(t.fn=u),nt||(u._nvw=!0),u}function a(n,t){return n&&n!==t?t?f(f({},t),n):n:t&&f({},t)}function ar(n){return bt[n]||(bt[n]="&#"+n.charCodeAt(0)+";")}function vr(n){var i,t,r=[];if(typeof n=="object")for(i in n)t=n[i],t&&t.toJSON&&!t.toJSON()||d(t)||r.push({key:i,prop:t});return r}function li(n){return n!=null?di.test(n)&&(""+n).replace(gi,ar)||n:""}if((!t||!t.render)&&!n.jsviews){var u,rt,y,yt,pt,p="{",w="{",h="}",v="}",nt="^",ai=/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,vi=/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*\.|\s*\^|\s*$)|[)\]])([([]?))|(\s+)/g,ut=/[ \t]*(\r\n|\n|\r)/g,yi=/\\(['"])/g,pi=/['"\\]/g,wi=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,bi=/^if\s/,ki=/<(\w+)[>\s]/,di=/[\x00`><\"'&]/,wt=/^on[A-Z]|^convert(Back)?$/,gi=/[\x00`><"'&]/g,nr=0,tr=0,bt={"&":"&amp;","<":"&lt;",">":"&gt;","\x00":"&#0;","'":"&#39;",'"':"&#34;","`":"&#96;"},b="html",ft="data-jsv-tmpl",kt={},k={template:{compile:ii},tag:{compile:hr},helper:{},converter:{}},r={jsviews:"v1.0.0-beta",settings:function(n){f(s,n);dt(s._dbgMode);s.jsv&&s.jsv()},sub:{View:g,Err:st,tmplFn:lt,cvt:ht,parse:hi,extend:f,syntaxErr:l,onStore:{},_lnk:ot,_ths:et},map:ri,_cnvt:fr,_tag:or,_err:c};(st.prototype=new Error).constructor=st;ni.depends=function(){return[this.get("item"),"index"]};ti.depends=function(){return["index"]};g.prototype={get:rr,getIndex:ti,getRsc:er,hlp:ur,_is:"view"};for(rt in k)cr(rt,k[rt]);var e=r.templates,tt=r.converters,ci=r.helpers,it=r.tags,o=r.sub,s=r.settings;t?(u=t,u.fn.render=lr,u.observable&&(f(o,u.views.sub),r.map=u.views.map)):(u=n.jsviews={},u.isArray=Array&&Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"});u.render=kt;u.views=r;u.templates=e=r.templates;s({debugMode:dt,delimiters:gt,onError:function(n,t,r){return t&&(n=r===i?"{Error: "+n+"}":d(r)?r(n,t):r),n==i?"":n},_dbgMode:!0});it({"else":function(){},"if":{render:function(n){var t=this;return t.rendering.done||!n&&(arguments.length||!t.tagCtx.index)?"":(t.rendering.done=!0,t.selected=t.tagCtx.index,t.tagCtx.render(t.tagCtx.view,!0))},onUpdate:function(n,t,i){for(var r,f,u=0;(r=this.tagCtxs[u])&&r.args.length;u++)if(r=r.args[0],f=!r!=!i[u].args[0],!this.convert&&!!r||f)return f;return!1},flow:!0},"for":{render:function(n){var f,t=this,r=t.tagCtx,e="",o=0;return t.rendering.done||((f=!arguments.length)&&(n=r.view.data),n!==i&&(e+=r.render(n,f),o+=u.isArray(n)?n.length:1),(t.rendering.done=o)&&(t.selected=r.index)),e},flow:!0},include:{flow:!0},"*":{render:ot,flow:!0}});it("props",{baseTag:it["for"],dataMap:ri(vr)});tt({html:li,attr:li,url:function(n){return n!=i?encodeURI(""+n):n===null?n:""}});gt()}})(this,this.jQuery);
4
+ /*
5
+ //# sourceMappingURL=jsrender.min.js.map
6
+ */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3ff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chew Choon Keat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-27 00:00:00.000000000 Z
11
+ date: 2014-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: s3_file_field
@@ -80,7 +80,8 @@ files:
80
80
  - lib/s3ff/railtie.rb
81
81
  - lib/s3ff/version.rb
82
82
  - lib/s3ff/view_helper.rb
83
- homepage: https://github.com/choonkeat/s3ff
83
+ - vendor/assets/javascripts/jsrender.min.js
84
+ homepage: https://github.com/jollygoodcode/s3ff
84
85
  licenses:
85
86
  - MIT
86
87
  metadata: {}