Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 92 lines (52 sloc) 2.506 kb
3d524c1 @charly initial release
authored
1 # Jail
2
22b4b12 @charly rephrased README presentation
authored
3 Found a nice Jquery plugin you'd like to try out ? Now starts the RSIs :
4 Download, unpack, find the source files, open your app folder, drag in the javascript folder, drag in the stylesheet folder, drag in the images folder... Oh but wait, there's a better version of (modal/fancybox/slider/datepicker...). Download, unpack, find the source... _This must stop !_
5
5c0442a @charly Updated Readme
authored
6 Meet Jail : it puts all your Javascripts (& cie) in Rails, with just a click!
7
8 **NOW** With the 158 (sept/12) [CDNJS libraries](/cdnjs/cdnjs).
3d524c1 @charly initial release
authored
9
10 ## Install
11
12 gem 'jail', :group => "development"
13
14 config/routes.rb
15
bfd6c75 @charly Readme:engine should only be mounted in development
authored
16 mount Jail::Engine => "/jail" if Rails.env.development?
3d524c1 @charly initial release
authored
17
18 ## Usage
19
20 http://localhost:3000/jail/
21
22 Chose a plugin, follow the link, Install. You're done.
be370d1 @charly fixed routes not accepting :repo name with format & bug
authored
23
5c0442a @charly Updated Readme
authored
24
be370d1 @charly fixed routes not accepting :repo name with format & bug
authored
25 ![jail](/charly/jail/raw/master/jail.png)
26
27 ---
28
09071eb @charly readme quick fix
authored
29 Oh wait you might have to add :
3d524c1 @charly initial release
authored
30
31 //=require myplugin.js
32
09071eb @charly readme quick fix
authored
33 And if you're not happy with the actual set of Jquery plugins proposed. Add your own!
1bb64a6 @charly can add your own list of plugins yey
authored
34
35 config/initializers/jail.rb
36
37 module Jail
38 LOGIN = 'login:password' #optional
09071eb @charly readme quick fix
authored
39 Jail::Github.add_githublist(Rails.root.join("config/jail.backboneplugins.yml"))
40 Jail::Github.add_githublist(Rails.root.join("config/jail.whatever.yml"))
1bb64a6 @charly can add your own list of plugins yey
authored
41 end
42
09071eb @charly readme quick fix
authored
43 Buth the list is bound to grow quickly.
3d524c1 @charly initial release
authored
44
45 ## Usage (alt)
46
47 While waiting for a bin/jail feature:
48
49 rails console
50 > Jail::Github.find("name", "repo").install
51
fb55202 @charly added nice image to README
authored
52 But it must exist in the yaml file !!!
3d524c1 @charly initial release
authored
53
54 ## Contribute
55
09071eb @charly readme quick fix
authored
56 The list of plugins are in a yaml file : config/jail.jqueryplugins.yml
3d524c1 @charly initial release
authored
57 Add more plugins and pull a request!
58 Would it be better to have them in the db ?
59
60
61 ## Why an Engine ?
62
63 Other approaches where :
64 - create a gem for each jquery plugin. But that means updating the gem with the latest release of each plugin and nobody wants to keep track of dozens of repos.
22b4b12 @charly rephrased README presentation
authored
65 - Do a generator instead but, while the thought came to me while writing this gem, I didn't find any remote feature in Thor (may be wrong though since rails templates has it). **update** : it has one (of course)!
3d524c1 @charly initial release
authored
66
67 ## TODO
68
e10d681 @charly v 0.2.0
authored
69 - Pjax for loading plugin
5c0442a @charly Updated Readme
authored
70 - plugin installed? (check file existence)
71 - plugin outdated? (overkill ?)
72 - bin/jail
73
74 ## Changelog
75
2d1177c @charly readme markup bis
authored
76 ### 0.2.0
2e70ef2 @charly readme markup
authored
77
2d1177c @charly readme markup bis
authored
78 - Cdnjs now shows **subfolder content**
79 - fixed bug trying to download a folder
80 - (fix) creates non existing path before downloading
e10d681 @charly v 0.2.0
authored
81
2d1177c @charly readme markup bis
authored
82 ### 0.1.1
83
84 - CDNJS Integration + Some Github Refactoring
5c0442a @charly Updated Readme
authored
85
86 ## Thanks to
3d524c1 @charly initial release
authored
87
5c0442a @charly Updated Readme
authored
88 - [Walter Davis](/walterdavis) for suggesting the awesome idea of including the cdnjs library.
3d524c1 @charly initial release
authored
89
e10d681 @charly v 0.2.0
authored
90 This project rocks and uses MIT-LICENSE.
91
Something went wrong with that request. Please try again.