jelly 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/MIT-LICENSE +21 -0
- data/README.markdown +112 -0
- data/Rakefile +39 -0
- data/VERSION +1 -0
- data/VERSION.yml +4 -0
- data/generators/jelly/USAGE +11 -0
- data/generators/jelly/jelly_generator.rb +12 -0
- data/generators/jelly/templates/javascripts/ajax_with_jelly.js +32 -0
- data/generators/jelly/templates/javascripts/jelly.js +81 -0
- data/generators/jelly/templates/javascripts/jquery/jquery-1.3.2.js +4376 -0
- data/generators/jelly/templates/javascripts/jquery/jquery.protify-0.3.js +345 -0
- data/install.rb +1 -0
- data/jelly.gemspec +77 -0
- data/lib/jelly.rb +16 -0
- data/lib/jelly/jelly_controller.rb +23 -0
- data/lib/jelly/jelly_helper.rb +42 -0
- data/spec/controllers/jelly_controller_spec.rb +118 -0
- data/spec/helpers/jelly_helper_spec.rb +54 -0
- data/spec/rails_root/app/controllers/application_controller.rb +10 -0
- data/spec/rails_root/app/helpers/application_helper.rb +3 -0
- data/spec/rails_root/config/boot.rb +110 -0
- data/spec/rails_root/config/environment.rb +41 -0
- data/spec/rails_root/config/environments/development.rb +17 -0
- data/spec/rails_root/config/environments/production.rb +28 -0
- data/spec/rails_root/config/environments/test.rb +28 -0
- data/spec/rails_root/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails_root/config/initializers/inflections.rb +10 -0
- data/spec/rails_root/config/initializers/mime_types.rb +5 -0
- data/spec/rails_root/config/initializers/new_rails_defaults.rb +19 -0
- data/spec/rails_root/config/initializers/session_store.rb +15 -0
- data/spec/rails_root/config/routes.rb +43 -0
- data/spec/rails_root/test/performance/browsing_test.rb +9 -0
- data/spec/rails_root/test/test_helper.rb +38 -0
- data/spec/spec_helper.rb +22 -0
- data/tasks/jelly_tasks.rake +4 -0
- data/uninstall.rb +1 -0
- metadata +99 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# These settings change the behavior of Rails 2 apps and will be defaults
|
4
|
+
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
5
|
+
|
6
|
+
if defined?(ActiveRecord)
|
7
|
+
# Include Active Record class name as root for JSON serialized output.
|
8
|
+
ActiveRecord::Base.include_root_in_json = true
|
9
|
+
|
10
|
+
# Store the full class name (including module namespace) in STI type column.
|
11
|
+
ActiveRecord::Base.store_full_sti_class = true
|
12
|
+
end
|
13
|
+
|
14
|
+
# Use ISO 8601 format for JSON serialized times and dates.
|
15
|
+
ActiveSupport.use_standard_json_time_format = true
|
16
|
+
|
17
|
+
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
18
|
+
# if you're including raw json in an HTML page.
|
19
|
+
ActiveSupport.escape_html_entities_in_json = false
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying cookie session data integrity.
|
4
|
+
# If you change this key, all old sessions will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
ActionController::Base.session = {
|
8
|
+
:key => '_rails_root_session',
|
9
|
+
:secret => '7bc680488f32703dcc8d4f0b02f629e0a913e3877e67408c83dc7d83d06532806585afbe4d27aa0c91c4341cc0a09e143b50b586da9dfc842de3474a5af40a6b'
|
10
|
+
}
|
11
|
+
|
12
|
+
# Use the database for sessions instead of the cookie-based default,
|
13
|
+
# which shouldn't be used to store highly confidential information
|
14
|
+
# (create the session table with "rake db:sessions:create")
|
15
|
+
# ActionController::Base.session_store = :active_record_store
|
@@ -0,0 +1,43 @@
|
|
1
|
+
ActionController::Routing::Routes.draw do |map|
|
2
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
+
|
4
|
+
# Sample of regular route:
|
5
|
+
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
6
|
+
# Keep in mind you can assign values other than :controller and :action
|
7
|
+
|
8
|
+
# Sample of named route:
|
9
|
+
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
10
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
11
|
+
|
12
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
13
|
+
# map.resources :products
|
14
|
+
|
15
|
+
# Sample resource route with options:
|
16
|
+
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
17
|
+
|
18
|
+
# Sample resource route with sub-resources:
|
19
|
+
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
20
|
+
|
21
|
+
# Sample resource route with more complex sub-resources
|
22
|
+
# map.resources :products do |products|
|
23
|
+
# products.resources :comments
|
24
|
+
# products.resources :sales, :collection => { :recent => :get }
|
25
|
+
# end
|
26
|
+
|
27
|
+
# Sample resource route within a namespace:
|
28
|
+
# map.namespace :admin do |admin|
|
29
|
+
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
30
|
+
# admin.resources :products
|
31
|
+
# end
|
32
|
+
|
33
|
+
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
34
|
+
# map.root :controller => "welcome"
|
35
|
+
|
36
|
+
# See how all your routes lay out with "rake routes"
|
37
|
+
|
38
|
+
# Install the default routes as the lowest priority.
|
39
|
+
# Note: These default routes make all actions in every controller accessible via GET requests. You should
|
40
|
+
# consider removing or commenting them out if you're using named routes and resources.
|
41
|
+
map.connect ':controller/:action/:id'
|
42
|
+
map.connect ':controller/:action/:id.:format'
|
43
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
3
|
+
require 'test_help'
|
4
|
+
|
5
|
+
class ActiveSupport::TestCase
|
6
|
+
# Transactional fixtures accelerate your tests by wrapping each test method
|
7
|
+
# in a transaction that's rolled back on completion. This ensures that the
|
8
|
+
# test database remains unchanged so your fixtures don't have to be reloaded
|
9
|
+
# between every test method. Fewer database queries means faster tests.
|
10
|
+
#
|
11
|
+
# Read Mike Clark's excellent walkthrough at
|
12
|
+
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
|
13
|
+
#
|
14
|
+
# Every Active Record database supports transactions except MyISAM tables
|
15
|
+
# in MySQL. Turn off transactional fixtures in this case; however, if you
|
16
|
+
# don't care one way or the other, switching from MyISAM to InnoDB tables
|
17
|
+
# is recommended.
|
18
|
+
#
|
19
|
+
# The only drawback to using transactional fixtures is when you actually
|
20
|
+
# need to test transactions. Since your test is bracketed by a transaction,
|
21
|
+
# any transactions started in your code will be automatically rolled back.
|
22
|
+
self.use_transactional_fixtures = true
|
23
|
+
|
24
|
+
# Instantiated fixtures are slow, but give you @david where otherwise you
|
25
|
+
# would need people(:david). If you don't want to migrate your existing
|
26
|
+
# test cases which use the @david style and don't mind the speed hit (each
|
27
|
+
# instantiated fixtures translates to a database query per test method),
|
28
|
+
# then set this back to true.
|
29
|
+
self.use_instantiated_fixtures = false
|
30
|
+
|
31
|
+
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
32
|
+
#
|
33
|
+
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
34
|
+
# -- they do not yet inherit this setting
|
35
|
+
fixtures :all
|
36
|
+
|
37
|
+
# Add more helper methods to be used by all tests here...
|
38
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
|
2
|
+
# from the project root directory.
|
3
|
+
ENV["RAILS_ENV"] ||= 'test'
|
4
|
+
ENV['RAILS_ROOT'] ||= File.dirname(__FILE__) + '/rails_root'
|
5
|
+
require File.expand_path(File.join(ENV['RAILS_ROOT'], 'config/environment.rb'))
|
6
|
+
require 'rubygems'
|
7
|
+
require 'spec'
|
8
|
+
require 'spec/rails'
|
9
|
+
|
10
|
+
require File.dirname(__FILE__) + "/../lib/jelly"
|
11
|
+
|
12
|
+
Spec::Runner.configure do |configuration|
|
13
|
+
end
|
14
|
+
|
15
|
+
class Spec::ExampleGroup
|
16
|
+
include ActionController::TestProcess
|
17
|
+
end
|
18
|
+
|
19
|
+
# This is here to allow you to integrate views on all of your controller specs
|
20
|
+
Spec::Runner.configuration.before(:all, :behaviour_type => :controller) do
|
21
|
+
@integrate_views = false
|
22
|
+
end
|
data/uninstall.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Uninstall hook code here
|
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jelly
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pivotal Labs, Inc
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-09-28 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rails
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.3.0
|
24
|
+
version:
|
25
|
+
description: Jelly provides a set of tools and conventions for creating rich ajax/javascript web applications with jQuery and Ruby on Rails.
|
26
|
+
email: opensource@pivotallabs.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- README.markdown
|
33
|
+
files:
|
34
|
+
- .gitignore
|
35
|
+
- MIT-LICENSE
|
36
|
+
- README.markdown
|
37
|
+
- Rakefile
|
38
|
+
- VERSION
|
39
|
+
- VERSION.yml
|
40
|
+
- generators/jelly/USAGE
|
41
|
+
- generators/jelly/jelly_generator.rb
|
42
|
+
- generators/jelly/templates/javascripts/ajax_with_jelly.js
|
43
|
+
- generators/jelly/templates/javascripts/jelly.js
|
44
|
+
- generators/jelly/templates/javascripts/jquery/jquery-1.3.2.js
|
45
|
+
- generators/jelly/templates/javascripts/jquery/jquery.protify-0.3.js
|
46
|
+
- install.rb
|
47
|
+
- jelly.gemspec
|
48
|
+
- lib/jelly.rb
|
49
|
+
- lib/jelly/jelly_controller.rb
|
50
|
+
- lib/jelly/jelly_helper.rb
|
51
|
+
- tasks/jelly_tasks.rake
|
52
|
+
- uninstall.rb
|
53
|
+
has_rdoc: true
|
54
|
+
homepage: http://github.com/pivotal/jelly
|
55
|
+
licenses: []
|
56
|
+
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options:
|
59
|
+
- --charset=UTF-8
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: "0"
|
67
|
+
version:
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: "0"
|
73
|
+
version:
|
74
|
+
requirements: []
|
75
|
+
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 1.3.5
|
78
|
+
signing_key:
|
79
|
+
specification_version: 3
|
80
|
+
summary: a sweet unobtrusive javascript framework for jQuery and Rails
|
81
|
+
test_files:
|
82
|
+
- spec/controllers/jelly_controller_spec.rb
|
83
|
+
- spec/helpers/jelly_helper_spec.rb
|
84
|
+
- spec/rails_root/app/controllers/application_controller.rb
|
85
|
+
- spec/rails_root/app/helpers/application_helper.rb
|
86
|
+
- spec/rails_root/config/boot.rb
|
87
|
+
- spec/rails_root/config/environment.rb
|
88
|
+
- spec/rails_root/config/environments/development.rb
|
89
|
+
- spec/rails_root/config/environments/production.rb
|
90
|
+
- spec/rails_root/config/environments/test.rb
|
91
|
+
- spec/rails_root/config/initializers/backtrace_silencers.rb
|
92
|
+
- spec/rails_root/config/initializers/inflections.rb
|
93
|
+
- spec/rails_root/config/initializers/mime_types.rb
|
94
|
+
- spec/rails_root/config/initializers/new_rails_defaults.rb
|
95
|
+
- spec/rails_root/config/initializers/session_store.rb
|
96
|
+
- spec/rails_root/config/routes.rb
|
97
|
+
- spec/rails_root/test/performance/browsing_test.rb
|
98
|
+
- spec/rails_root/test/test_helper.rb
|
99
|
+
- spec/spec_helper.rb
|