btakita-jelly 0.6.0
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 +346 -0
- data/Rakefile +39 -0
- data/VERSION.yml +5 -0
- data/generators/jelly/USAGE +11 -0
- data/generators/jelly/jelly_generator.rb +12 -0
- data/generators/jelly/templates/javascripts/ajax_with_jelly.js +33 -0
- data/generators/jelly/templates/javascripts/jelly.js +97 -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 +45 -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 +38 -0
- data/spec/spec_suite.rb +3 -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,38 @@
|
|
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
|
+
gem "test-unit"
|
8
|
+
require 'test/unit'
|
9
|
+
|
10
|
+
class Test::Unit::TestCase
|
11
|
+
class << self
|
12
|
+
def inherited(sub_class)
|
13
|
+
super
|
14
|
+
DESCENDANTS << sub_class
|
15
|
+
end
|
16
|
+
alias_method :inherited_without_test_unit_gem_inherited_fix, :inherited
|
17
|
+
alias_method :inherited, :inherited_without_test_unit_gem_inherited_fix
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'spec'
|
22
|
+
require 'spec/rails'
|
23
|
+
require 'spec/autorun'
|
24
|
+
|
25
|
+
$LOAD_PATH.unshift(File.expand_path("#{File.dirname(__FILE__)}/../lib"))
|
26
|
+
require "jelly"
|
27
|
+
|
28
|
+
Spec::Runner.configure do |configuration|
|
29
|
+
end
|
30
|
+
|
31
|
+
class Spec::ExampleGroup
|
32
|
+
include ActionController::TestProcess
|
33
|
+
end
|
34
|
+
|
35
|
+
# This is here to allow you to integrate views on all of your controller specs
|
36
|
+
Spec::Runner.configuration.before(:all, :behaviour_type => :controller) do
|
37
|
+
@integrate_views = false
|
38
|
+
end
|
data/spec/spec_suite.rb
ADDED
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: btakita-jelly
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pivotal Labs, Inc
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-11-07 00:00:00 -08: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.yml
|
39
|
+
- generators/jelly/USAGE
|
40
|
+
- generators/jelly/jelly_generator.rb
|
41
|
+
- generators/jelly/templates/javascripts/ajax_with_jelly.js
|
42
|
+
- generators/jelly/templates/javascripts/jelly.js
|
43
|
+
- generators/jelly/templates/javascripts/jquery/jquery-1.3.2.js
|
44
|
+
- generators/jelly/templates/javascripts/jquery/jquery.protify-0.3.js
|
45
|
+
- install.rb
|
46
|
+
- jelly.gemspec
|
47
|
+
- lib/jelly.rb
|
48
|
+
- lib/jelly/jelly_controller.rb
|
49
|
+
- lib/jelly/jelly_helper.rb
|
50
|
+
- tasks/jelly_tasks.rake
|
51
|
+
- uninstall.rb
|
52
|
+
has_rdoc: true
|
53
|
+
homepage: http://github.com/pivotal/jelly
|
54
|
+
licenses: []
|
55
|
+
|
56
|
+
post_install_message:
|
57
|
+
rdoc_options:
|
58
|
+
- --charset=UTF-8
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: "0"
|
66
|
+
version:
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: "0"
|
72
|
+
version:
|
73
|
+
requirements: []
|
74
|
+
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 1.3.5
|
77
|
+
signing_key:
|
78
|
+
specification_version: 3
|
79
|
+
summary: a sweet unobtrusive javascript framework for jQuery and Rails
|
80
|
+
test_files:
|
81
|
+
- spec/spec_suite.rb
|
82
|
+
- spec/helpers/jelly_helper_spec.rb
|
83
|
+
- spec/controllers/jelly_controller_spec.rb
|
84
|
+
- spec/rails_root/test/performance/browsing_test.rb
|
85
|
+
- spec/rails_root/test/test_helper.rb
|
86
|
+
- spec/rails_root/config/environments/production.rb
|
87
|
+
- spec/rails_root/config/environments/development.rb
|
88
|
+
- spec/rails_root/config/environments/test.rb
|
89
|
+
- spec/rails_root/config/boot.rb
|
90
|
+
- spec/rails_root/config/environment.rb
|
91
|
+
- spec/rails_root/config/initializers/new_rails_defaults.rb
|
92
|
+
- spec/rails_root/config/initializers/inflections.rb
|
93
|
+
- spec/rails_root/config/initializers/mime_types.rb
|
94
|
+
- spec/rails_root/config/initializers/session_store.rb
|
95
|
+
- spec/rails_root/config/initializers/backtrace_silencers.rb
|
96
|
+
- spec/rails_root/config/routes.rb
|
97
|
+
- spec/rails_root/app/helpers/application_helper.rb
|
98
|
+
- spec/rails_root/app/controllers/application_controller.rb
|
99
|
+
- spec/spec_helper.rb
|