Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3e326e5
Showing
4 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bin/*.js | ||
!bin/*.min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>pwnfx_js</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.aptana.ide.core.unifiedBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.aptana.projects.webnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (c) 2011 Victor Costan | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
PwnFX is an attempt to restore Rails 2's ease of sprinkling ajax, using the | ||
UJS (Unobtrusive JavaScript) approach in Rails 3. | ||
|
||
|
||
REQUIREMENTS | ||
|
||
The PwnFX JS has been tested and works against the following browsers: | ||
* Chromium / Google Chrome 11.0+ | ||
* Firefox 4.0+ | ||
* (TODO) Mobile Safari in iOS 3+ | ||
* (TODO) Internet Explorer 9+ | ||
|
||
Patches for extending compatibility are always welcome. | ||
|
||
|
||
USAGE | ||
|
||
The PwnFX functionality is divided into orthogonal pieces, called effects, which | ||
are activated by HTML5 data- attributes. The attributes for invoking an effect, | ||
such as "move" are prefixed with data-pwnfx-effectname (e.g., data-pwnfx-move). | ||
|
||
When using DOM inspectors such as firebug, it might be useful to know that after | ||
parsing, the main attribute for an effect (such as data-pwnfx-move) receives | ||
a -done suffix (e.g., data-pwnfx-move-done), so that the effect is not invoked | ||
again when the DOM is re-parsed. | ||
|
||
|
||
|
||
|
||
BUILDING | ||
|
||
PwnFX requires RubyGems, Jasmine, and Juicer with the YUI Compressor and | ||
JSLint extensions. Once dependencies are installed, the following command will | ||
build and test both the development and production versions of the library. | ||
|
||
rake | ||
|
||
The dependencies can be downloaded from the following locations: | ||
* RubyGems -- http://rubygems.org/ | ||
* Jasmine -- gem install jasmine | ||
* Juicer -- gem install juicer | ||
* Juicer extensions -- juicer install jslint; juicer install yui_compressor | ||
|
||
|
||
TESTING | ||
|
||
(TODO) | ||
|
||
Testing is fully automated using Jasmine. All patches should add tests for the | ||
changed functionality in the spec/ directory. | ||
|
||
For maximum iterating speed, keep a Jasmine testing server running. | ||
|
||
1. Start the server by running | ||
|
||
rake jasmine | ||
|
||
2. Make some changes to the source code, then rebuild | ||
|
||
rake build | ||
|
||
3. Load or refresh http://localhost:8888 in your browser. |