packr 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. data/README +22 -9
  2. metadata +2 -2
data/README CHANGED
@@ -12,9 +12,22 @@ just a question of how the base-62 word list is ordered -- your scripts
12
12
  will work just like those produced with the online version. The level of
13
13
  compression achieved is identical between the two versions.
14
14
 
15
+ === Installation
16
+
17
+ PackR is available both as a gem and as a Rails plugin. The plugin gives you the
18
+ +Packr+ class from the gem, plus some helpful +rake+ tasks to use during Rails
19
+ development. To get the gem:
20
+
21
+ gem install packr
22
+
23
+ To get the Rails plugin:
24
+
25
+ ruby script/plugin install
26
+ http://svn.jcoglan.com/packr/trunk/packr
27
+
15
28
  === Usage
16
29
 
17
- Usage is dead simple. Within your Rails app, you can compress pieces of code
30
+ Usage is dead simple. Within your Ruby/Rails app, you can compress pieces of code
18
31
  like this:
19
32
 
20
33
  compressed = Packr.pack(script)
@@ -34,11 +47,11 @@ goes wrong and you lose all your source code!
34
47
 
35
48
  === Automated packing
36
49
 
37
- PackR also comes with a rake task to let you batch-pack all your scripts.
38
- To use it, store any files you want to serve in packed form in the directory
39
- <tt>lib/javascripts</tt>. (The idea is that you won't be serving the source files to
40
- the public, so why keep them in the public folder? Also, it keeps the source
41
- files and packed copies nicely separated.) Then run:
50
+ When installed as a Rails plugin, PackR also comes with a +rake+ task to let you
51
+ batch-pack all your scripts. To use it, store any files you want to serve in
52
+ packed form in the directory <tt>lib/javascripts</tt>. (The idea is that you won't
53
+ be serving the source files to the public, so why keep them in the public folder?
54
+ Also, it keeps the source files and packed copies nicely separated.) Then run:
42
55
 
43
56
  rake packr:pack_libs
44
57
 
@@ -51,9 +64,9 @@ PackR will put packed copies of all the scripts from <tt>lib/javascripts</tt> in
51
64
  <tt>public/javascripts</tt>. Again, be careful as this will overwrite any pre-existing
52
65
  files in your public directory.
53
66
 
54
- It is not recommended to run this as part of your deployment process, as
55
- you will need to verfiy that your JavaScript works when packed. PackR works
56
- using regular expressions -- not a true JavaScript interpreter -- and cannot
67
+ It is not recommended to run this as part of your deployment process, as you will
68
+ need to verfiy that your JavaScript works when packed before committing it. PackR
69
+ works using regular expressions -- not a true JavaScript interpreter -- and cannot
57
70
  fix missing semicolons for you.
58
71
 
59
72
  Also, DO NOT use PackR to compress files on-the-fly in response to HTTP
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: packr
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2007-12-04 00:00:00 +00:00
6
+ version: 1.0.1
7
+ date: 2007-12-09 00:00:00 +00:00
8
8
  summary: A Ruby port of Dean Edwards' JavaScript compressor
9
9
  require_paths:
10
10
  - lib