jquery_expand_assets 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -4,6 +4,10 @@ A Sprockets processor that wraps html in a jquery.expand function. It is specifi
4
4
 
5
5
  The processor outputs CoffeeScript, so you'll need to have the result be processed by the CoffeeScript processor.
6
6
 
7
+ ## Requirements
8
+
9
+ This gem is syntax compatible with Ruby 1.9. It does not run on older Rubies.
10
+
7
11
  ## Creating and using templates
8
12
 
9
13
  Create your templates in a directory named `app/assets/javascripts/templates`. Organize your templats within subdirectories. I personally organize them based on what resource they're associated with.
@@ -11,6 +15,7 @@ Create your templates in a directory named `app/assets/javascripts/templates`. O
11
15
  Write your template and wrap it in a root element.
12
16
 
13
17
  Example: `app/assets/javascripts/templates/articles/_entry.js.coffee.expand`
18
+
14
19
  <div>
15
20
  <h2 class='name'></h2>
16
21
  <p class='content'></p>
@@ -19,17 +24,19 @@ Example: `app/assets/javascripts/templates/articles/_entry.js.coffee.expand`
19
24
  Your template is now available to Javascript as a function on the `JST` object. Pass an expand directive to the function and you'll be given the result minus the wrapper element.
20
25
 
21
26
  Example: see `articles/_entry.js.coffee.expand` above
27
+
22
28
  directive = { name: 'Joe', content: 'I love Smurfs.' }
23
29
  html = JST['articles/entry'](directive)
24
30
  $('body').append(html)
25
31
 
26
32
  In this example, the result html will be:
33
+
27
34
  <h2 class='name'>Joe<h2>
28
35
  <p class='content'>I love Smurfs.</p>
29
36
 
30
37
  ## Naming conventions
31
38
 
32
- Templates are named on the `JST` object based on their filename. Directories under `app/assets/javascripts/templates` are preserved. If the template's filename starts with an underscore, the underscore is removed from the name.
39
+ Templates are named on the `JST` object based on their filename. Directories under `app/assets/javascripts/templates` are preserved. If the template's filename starts with an underscore, then the underscore is removed from the name.
33
40
 
34
41
  Examples:
35
42
 
@@ -42,6 +49,10 @@ Examples:
42
49
  * [jquery.expand](https://github.com/atomicobject/jquery.expand)
43
50
  * [jquery.expand examples](http://spin.atomicobject.com/2011/07/10/jquery-expand-examples/)
44
51
 
52
+ ## Development
53
+
54
+ This project depends on bundler for installing and using development gems. You'll need to `bundle install` and `bundle exec rake` to run the tests.
55
+
45
56
  ## Thanks so much!
46
57
 
47
58
  I'd like to give a huge 'thank you' to the [Sprockets](https://github.com/sstephenson/sprockets), [haml_assets](https://github.com/infbio/haml_assets), and [haml_coffee_assets](https://github.com/netzpirat/haml_coffee_assets) projects. Without their examples, I'm not sure I would have figured out the code required to create the Rails engine and Tilt template.
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["fletcher@atomicobject.com"]
7
7
  gem.description = %q{Sprockets processor for jquery.expand templates}
8
8
  gem.summary = %q{Sprockets processor for jquery.expand templates}
9
- gem.homepage = ""
9
+ gem.homepage = "https://github.com/atomicobject/jquery_expand_assets"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -1,3 +1,3 @@
1
1
  module JqueryExpandAssets
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery_expand_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -77,7 +77,7 @@ files:
77
77
  - lib/jquery_expand_assets/jquery_expand_processor.rb
78
78
  - lib/jquery_expand_assets/version.rb
79
79
  - test/jquery_expand_processor_test.rb
80
- homepage: ''
80
+ homepage: https://github.com/atomicobject/jquery_expand_assets
81
81
  licenses: []
82
82
  post_install_message:
83
83
  rdoc_options: []
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: -3627693289123550229
94
+ hash: 1418485936274559627
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: -3627693289123550229
103
+ hash: 1418485936274559627
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 1.8.24