jelly 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/.gitignore +3 -0
  2. data/MIT-LICENSE +21 -0
  3. data/README.markdown +112 -0
  4. data/Rakefile +39 -0
  5. data/VERSION +1 -0
  6. data/VERSION.yml +4 -0
  7. data/generators/jelly/USAGE +11 -0
  8. data/generators/jelly/jelly_generator.rb +12 -0
  9. data/generators/jelly/templates/javascripts/ajax_with_jelly.js +32 -0
  10. data/generators/jelly/templates/javascripts/jelly.js +81 -0
  11. data/generators/jelly/templates/javascripts/jquery/jquery-1.3.2.js +4376 -0
  12. data/generators/jelly/templates/javascripts/jquery/jquery.protify-0.3.js +345 -0
  13. data/install.rb +1 -0
  14. data/jelly.gemspec +77 -0
  15. data/lib/jelly.rb +16 -0
  16. data/lib/jelly/jelly_controller.rb +23 -0
  17. data/lib/jelly/jelly_helper.rb +42 -0
  18. data/spec/controllers/jelly_controller_spec.rb +118 -0
  19. data/spec/helpers/jelly_helper_spec.rb +54 -0
  20. data/spec/rails_root/app/controllers/application_controller.rb +10 -0
  21. data/spec/rails_root/app/helpers/application_helper.rb +3 -0
  22. data/spec/rails_root/config/boot.rb +110 -0
  23. data/spec/rails_root/config/environment.rb +41 -0
  24. data/spec/rails_root/config/environments/development.rb +17 -0
  25. data/spec/rails_root/config/environments/production.rb +28 -0
  26. data/spec/rails_root/config/environments/test.rb +28 -0
  27. data/spec/rails_root/config/initializers/backtrace_silencers.rb +7 -0
  28. data/spec/rails_root/config/initializers/inflections.rb +10 -0
  29. data/spec/rails_root/config/initializers/mime_types.rb +5 -0
  30. data/spec/rails_root/config/initializers/new_rails_defaults.rb +19 -0
  31. data/spec/rails_root/config/initializers/session_store.rb +15 -0
  32. data/spec/rails_root/config/routes.rb +43 -0
  33. data/spec/rails_root/test/performance/browsing_test.rb +9 -0
  34. data/spec/rails_root/test/test_helper.rb +38 -0
  35. data/spec/spec_helper.rb +22 -0
  36. data/tasks/jelly_tasks.rake +4 -0
  37. data/uninstall.rb +1 -0
  38. 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,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -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,9 @@
1
+ require 'test_helper'
2
+ require 'performance_test_help'
3
+
4
+ # Profiling results for each test method are written to tmp/performance.
5
+ class BrowsingTest < ActionController::PerformanceTest
6
+ def test_homepage
7
+ get '/'
8
+ end
9
+ 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
@@ -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
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :jelly do
3
+ # # Task goes here
4
+ # end
@@ -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