glow 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/lib/glow/version.rb +1 -1
  2. data/test/{dummy → rails3}/Gemfile +0 -0
  3. data/test/{dummy → rails3}/Gemfile.lock +0 -0
  4. data/test/{dummy → rails3}/Rakefile +1 -1
  5. data/test/{dummy → rails3}/app/controllers/application_controller.rb +0 -0
  6. data/test/{dummy → rails3}/app/controllers/flash_controller.rb +0 -0
  7. data/test/{dummy → rails3}/app/views/flash/ajax.js.erb +0 -0
  8. data/test/{dummy → rails3}/app/views/flash/show.html.erb +0 -0
  9. data/test/{dummy → rails3}/app/views/layouts/application.html.erb +0 -0
  10. data/test/{dummy → rails3}/config.ru +0 -0
  11. data/test/{dummy → rails3}/config/application.rb +1 -1
  12. data/test/{dummy → rails3}/config/boot.rb +0 -0
  13. data/test/{dummy → rails3}/config/environment.rb +0 -0
  14. data/test/{dummy → rails3}/config/environments/development.rb +0 -0
  15. data/test/{dummy → rails3}/config/environments/production.rb +0 -0
  16. data/test/{dummy → rails3}/config/environments/test.rb +0 -0
  17. data/test/{dummy → rails3}/config/initializers/backtrace_silencers.rb +0 -0
  18. data/test/{dummy → rails3}/config/initializers/inflections.rb +0 -0
  19. data/test/{dummy → rails3}/config/initializers/mime_types.rb +0 -0
  20. data/test/{dummy → rails3}/config/initializers/secret_token.rb +0 -0
  21. data/test/{dummy → rails3}/config/initializers/session_store.rb +0 -0
  22. data/test/{dummy → rails3}/config/initializers/wrap_parameters.rb +0 -0
  23. data/test/{dummy → rails3}/config/locales/en.yml +0 -0
  24. data/test/{dummy → rails3}/config/routes.rb +1 -1
  25. data/test/{dummy → rails3}/log/development.log +0 -0
  26. data/test/{dummy → rails3}/log/test.log +0 -0
  27. data/test/{dummy → rails3}/public/404.html +0 -0
  28. data/test/{dummy → rails3}/public/422.html +0 -0
  29. data/test/{dummy → rails3}/public/500.html +0 -0
  30. data/test/{dummy → rails3}/public/favicon.ico +0 -0
  31. data/test/{dummy → rails3}/public/javascripts/glow.js +0 -0
  32. data/test/{dummy → rails3}/public/javascripts/jquery.js +0 -0
  33. data/test/{dummy → rails3}/public/javascripts/jquery.min.js +0 -0
  34. data/test/{dummy → rails3}/public/javascripts/jquery_ujs.js +0 -0
  35. data/test/{dummy → rails3}/script/rails +0 -0
  36. data/test/{dummy → rails3}/spec/controllers/flash_controller_spec.rb +0 -0
  37. data/test/{dummy → rails3}/spec/integration/flash_spec.rb +0 -0
  38. data/test/{dummy → rails3}/spec/spec_helper.rb +0 -0
  39. data/test/rails31/Gemfile +33 -0
  40. data/test/rails31/Gemfile.lock +157 -0
  41. data/test/rails31/Rakefile +7 -0
  42. data/test/rails31/app/assets/images/rails.png +0 -0
  43. data/test/{dummy → rails31}/app/assets/javascripts/application.js +1 -0
  44. data/test/{dummy → rails31}/app/assets/stylesheets/application.css +0 -0
  45. data/test/rails31/app/controllers/application_controller.rb +3 -0
  46. data/test/rails31/app/controllers/flash_controller.rb +18 -0
  47. data/test/rails31/app/views/flash/ajax.js.erb +1 -0
  48. data/test/rails31/app/views/flash/show.html.erb +13 -0
  49. data/test/rails31/app/views/layouts/application.html.erb +14 -0
  50. data/test/rails31/config.ru +4 -0
  51. data/test/rails31/config/application.rb +51 -0
  52. data/test/rails31/config/boot.rb +6 -0
  53. data/test/rails31/config/environment.rb +5 -0
  54. data/test/rails31/config/environments/development.rb +30 -0
  55. data/test/rails31/config/environments/production.rb +60 -0
  56. data/test/rails31/config/environments/test.rb +42 -0
  57. data/test/rails31/config/initializers/backtrace_silencers.rb +7 -0
  58. data/test/rails31/config/initializers/inflections.rb +10 -0
  59. data/test/rails31/config/initializers/mime_types.rb +5 -0
  60. data/test/rails31/config/initializers/secret_token.rb +7 -0
  61. data/test/rails31/config/initializers/session_store.rb +8 -0
  62. data/test/rails31/config/initializers/wrap_parameters.rb +10 -0
  63. data/test/rails31/config/locales/en.yml +5 -0
  64. data/test/rails31/config/routes.rb +6 -0
  65. data/test/rails31/log/development.log +59 -0
  66. data/test/rails31/log/test.log +151 -0
  67. data/test/rails31/public/404.html +26 -0
  68. data/test/rails31/public/422.html +26 -0
  69. data/test/rails31/public/500.html +26 -0
  70. data/test/{dummy/db/development.sqlite3 → rails31/public/favicon.ico} +0 -0
  71. data/test/rails31/public/robots.txt +5 -0
  72. data/test/rails31/script/rails +6 -0
  73. data/test/rails31/spec/controllers/flash_controller_spec.rb +33 -0
  74. data/test/rails31/spec/integration/flash_spec.rb +17 -0
  75. data/test/rails31/spec/spec_helper.rb +31 -0
  76. data/test/rails31/tmp/cache/assets/CC6/400/sprockets%2Ffc6d386e5a58972d13920c9cd2528768 +0 -0
  77. data/test/rails31/tmp/cache/assets/CD8/F20/sprockets%2Fd66a691d6f63c00b6b0025ec732734c9 +0 -0
  78. data/test/rails31/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 +0 -0
  79. data/test/rails31/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  80. data/test/rails31/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -0
  81. data/test/rails31/tmp/cache/assets/D5F/DC0/sprockets%2F3bdad2a5487de08b16ac12dcd8411538 +0 -0
  82. data/test/rails31/tmp/cache/assets/D61/A80/sprockets%2Fa4b21f72f1e092ec190a2fc0d679c4c3 +0 -0
  83. data/test/rails31/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
  84. data/test/rails31/tmp/cache/assets/DA0/D40/sprockets%2Fa7b4ee1a4cf4cc742c0d968b2f40c779 +0 -0
  85. data/test/rails31/tmp/cache/assets/DB8/BB0/sprockets%2Fca4a6e5b550132e2e7e5ebd40dcc55a0 +0 -0
  86. data/test/rails31/tmp/cache/assets/DD8/AF0/sprockets%2F4297f5a02e59cff78bd076afd7b7faa1 +0 -0
  87. data/test/rails31/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  88. metadata +184 -95
  89. data/test/dummy/app/helpers/application_helper.rb +0 -2
  90. data/test/dummy/config/database.yml +0 -25
  91. data/test/dummy/db/test.sqlite3 +0 -0
@@ -1,3 +1,3 @@
1
1
  module Glow
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
File without changes
File without changes
@@ -4,4 +4,4 @@
4
4
 
5
5
  require File.expand_path('../config/application', __FILE__)
6
6
 
7
- Dummy::Application.load_tasks
7
+ Rails3::Application.load_tasks
File without changes
@@ -6,7 +6,7 @@ require "rails/test_unit/railtie"
6
6
 
7
7
  Bundler.require
8
8
 
9
- module Dummy
9
+ module Rails3
10
10
  class Application < Rails::Application
11
11
  # Settings in config/environments/* take precedence over those specified here.
12
12
  # Application configuration should go into files in config/initializers
File without changes
@@ -1,4 +1,4 @@
1
- Dummy::Application.routes.draw do
1
+ Rails3::Application.routes.draw do
2
2
  match '/flash/:type' => 'flash#redirect', via: [:get, :post]
3
3
  match '/flash' => 'flash#show'
4
4
  match '/flashajax/:type' => 'flash#ajax', via: [:get, :post]
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,33 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rails', '3.1.0'
4
+
5
+ # Bundle edge Rails instead:
6
+ # gem 'rails', :git => 'git://github.com/rails/rails.git'
7
+
8
+
9
+
10
+ # Gems used only for assets and not required
11
+ # in production environments by default.
12
+ group :assets do
13
+ gem 'sass-rails', " ~> 3.1.0"
14
+ gem 'coffee-rails', "~> 3.1.0"
15
+ gem 'uglifier'
16
+ end
17
+
18
+ gem 'glow', path: '../..'
19
+
20
+ gem 'jquery-rails'
21
+ gem 'rspec-rails'
22
+ gem 'capybara'
23
+ gem 'htmlentities'
24
+
25
+ # Use unicorn as the web server
26
+ # gem 'unicorn'
27
+
28
+ # Deploy with Capistrano
29
+ # gem 'capistrano'
30
+
31
+ # To use debugger
32
+ # gem 'ruby-debug19', :require => 'ruby-debug'
33
+
@@ -0,0 +1,157 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ glow (0.0.2)
5
+ jquery-rails
6
+ rails (>= 3.0.0, < 3.2.0)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actionmailer (3.1.0)
12
+ actionpack (= 3.1.0)
13
+ mail (~> 2.3.0)
14
+ actionpack (3.1.0)
15
+ activemodel (= 3.1.0)
16
+ activesupport (= 3.1.0)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ i18n (~> 0.6)
20
+ rack (~> 1.3.2)
21
+ rack-cache (~> 1.0.3)
22
+ rack-mount (~> 0.8.2)
23
+ rack-test (~> 0.6.1)
24
+ sprockets (~> 2.0.0)
25
+ activemodel (3.1.0)
26
+ activesupport (= 3.1.0)
27
+ bcrypt-ruby (~> 3.0.0)
28
+ builder (~> 3.0.0)
29
+ i18n (~> 0.6)
30
+ activerecord (3.1.0)
31
+ activemodel (= 3.1.0)
32
+ activesupport (= 3.1.0)
33
+ arel (~> 2.2.1)
34
+ tzinfo (~> 0.3.29)
35
+ activeresource (3.1.0)
36
+ activemodel (= 3.1.0)
37
+ activesupport (= 3.1.0)
38
+ activesupport (3.1.0)
39
+ multi_json (~> 1.0)
40
+ arel (2.2.1)
41
+ bcrypt-ruby (3.0.0)
42
+ builder (3.0.0)
43
+ capybara (1.0.1)
44
+ mime-types (>= 1.16)
45
+ nokogiri (>= 1.3.3)
46
+ rack (>= 1.0.0)
47
+ rack-test (>= 0.5.4)
48
+ selenium-webdriver (~> 2.0)
49
+ xpath (~> 0.1.4)
50
+ childprocess (0.2.1)
51
+ ffi (~> 1.0.6)
52
+ coffee-rails (3.1.0)
53
+ coffee-script (>= 2.2.0)
54
+ railties (~> 3.1.0.rc1)
55
+ coffee-script (2.2.0)
56
+ coffee-script-source
57
+ execjs
58
+ coffee-script-source (1.1.2)
59
+ diff-lcs (1.1.3)
60
+ erubis (2.7.0)
61
+ execjs (1.2.4)
62
+ multi_json (~> 1.0)
63
+ ffi (1.0.9)
64
+ hike (1.2.1)
65
+ htmlentities (4.3.0)
66
+ i18n (0.6.0)
67
+ jquery-rails (1.0.13)
68
+ railties (~> 3.0)
69
+ thor (~> 0.14)
70
+ json_pure (1.5.3)
71
+ mail (2.3.0)
72
+ i18n (>= 0.4.0)
73
+ mime-types (~> 1.16)
74
+ treetop (~> 1.4.8)
75
+ mime-types (1.16)
76
+ multi_json (1.0.3)
77
+ nokogiri (1.5.0)
78
+ polyglot (0.3.2)
79
+ rack (1.3.2)
80
+ rack-cache (1.0.3)
81
+ rack (>= 0.4)
82
+ rack-mount (0.8.3)
83
+ rack (>= 1.0.0)
84
+ rack-ssl (1.3.2)
85
+ rack
86
+ rack-test (0.6.1)
87
+ rack (>= 1.0)
88
+ rails (3.1.0)
89
+ actionmailer (= 3.1.0)
90
+ actionpack (= 3.1.0)
91
+ activerecord (= 3.1.0)
92
+ activeresource (= 3.1.0)
93
+ activesupport (= 3.1.0)
94
+ bundler (~> 1.0)
95
+ railties (= 3.1.0)
96
+ railties (3.1.0)
97
+ actionpack (= 3.1.0)
98
+ activesupport (= 3.1.0)
99
+ rack-ssl (~> 1.3.2)
100
+ rake (>= 0.8.7)
101
+ rdoc (~> 3.4)
102
+ thor (~> 0.14.6)
103
+ rake (0.9.2)
104
+ rdoc (3.9.4)
105
+ rspec (2.6.0)
106
+ rspec-core (~> 2.6.0)
107
+ rspec-expectations (~> 2.6.0)
108
+ rspec-mocks (~> 2.6.0)
109
+ rspec-core (2.6.4)
110
+ rspec-expectations (2.6.0)
111
+ diff-lcs (~> 1.1.2)
112
+ rspec-mocks (2.6.0)
113
+ rspec-rails (2.6.1)
114
+ actionpack (~> 3.0)
115
+ activesupport (~> 3.0)
116
+ railties (~> 3.0)
117
+ rspec (~> 2.6.0)
118
+ rubyzip (0.9.4)
119
+ sass (3.1.7)
120
+ sass-rails (3.1.0)
121
+ actionpack (~> 3.1.0)
122
+ railties (~> 3.1.0)
123
+ sass (>= 3.1.4)
124
+ selenium-webdriver (2.4.0)
125
+ childprocess (>= 0.2.1)
126
+ ffi (>= 1.0.7)
127
+ json_pure
128
+ rubyzip
129
+ sprockets (2.0.0)
130
+ hike (~> 1.2)
131
+ rack (~> 1.0)
132
+ tilt (!= 1.3.0, ~> 1.1)
133
+ thor (0.14.6)
134
+ tilt (1.3.3)
135
+ treetop (1.4.10)
136
+ polyglot
137
+ polyglot (>= 0.3.1)
138
+ tzinfo (0.3.29)
139
+ uglifier (1.0.2)
140
+ execjs (>= 0.3.0)
141
+ multi_json (>= 1.0.2)
142
+ xpath (0.1.4)
143
+ nokogiri (~> 1.3)
144
+
145
+ PLATFORMS
146
+ ruby
147
+
148
+ DEPENDENCIES
149
+ capybara
150
+ coffee-rails (~> 3.1.0)
151
+ glow!
152
+ htmlentities
153
+ jquery-rails
154
+ rails (= 3.1.0)
155
+ rspec-rails
156
+ sass-rails (~> 3.1.0)
157
+ uglifier
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ Rails31::Application.load_tasks
@@ -6,4 +6,5 @@
6
6
  //
7
7
  //= require jquery
8
8
  //= require jquery_ujs
9
+ //= require glow
9
10
  //= require_tree .
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,18 @@
1
+ class FlashController < ApplicationController
2
+ def show
3
+ # show.html.erb
4
+ end
5
+
6
+ def redirect
7
+ flash[params[:type].to_sym] = params[:message]
8
+ redirect_to action: 'show'
9
+ end
10
+
11
+ def ajax
12
+ respond_to do |wants|
13
+ wants.js {
14
+ flash[params[:type].to_sym] = params[:message]
15
+ }
16
+ end
17
+ end
18
+ end
@@ -0,0 +1 @@
1
+ console.log('ajax response');
@@ -0,0 +1,13 @@
1
+ <script type="application/javascript">
2
+ // Flash handling
3
+ $(document).bind('glow:flash', function(evt, flash) { console.log('glow flash'); $('#flash').html(flash.message); });
4
+ </script>
5
+
6
+ <p id="flash"><%= flash.map { |type, message| message }.join %></p>
7
+ <p><%= link_to 'redirect', action: :redirect, type: :notice, message: 'utf8: ✓ ' %></p>
8
+ <p><%= link_to 'rails ajax', {action: :ajax, type: :notice, message: 'rails ajax: ✓ '}, remote: true %></p>
9
+ <p><%= link_to 'jquery ajax', '#', id: 'ajax' %></p>
10
+
11
+ <script type="application/javascript">
12
+ $('#ajax').click(function(){$.get('<%= url_for action: :ajax, type: :notice, message: 'jquery utf8: ✓', format: :js %>'); return false;});
13
+ </script>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Rails31</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails31::Application
@@ -0,0 +1,51 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require "action_controller/railtie"
4
+ require "action_mailer/railtie"
5
+ require "active_resource/railtie"
6
+ require "sprockets/railtie"
7
+
8
+ if defined?(Bundler)
9
+ # If you precompile assets before deploying to production, use this line
10
+ Bundler.require *Rails.groups(:assets => %w(development test))
11
+ # If you want your assets lazily compiled in production, use this line
12
+ # Bundler.require(:default, :assets, Rails.env)
13
+ end
14
+
15
+ module Rails31
16
+ class Application < Rails::Application
17
+ # Settings in config/environments/* take precedence over those specified here.
18
+ # Application configuration should go into files in config/initializers
19
+ # -- all .rb files in that directory are automatically loaded.
20
+
21
+ # Custom directories with classes and modules you want to be autoloadable.
22
+ # config.autoload_paths += %W(#{config.root}/extras)
23
+
24
+ # Only load the plugins named here, in the order given (default is alphabetical).
25
+ # :all can be used as a placeholder for all plugins not explicitly named.
26
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
27
+
28
+ # Activate observers that should always be running.
29
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
30
+
31
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
32
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
33
+ # config.time_zone = 'Central Time (US & Canada)'
34
+
35
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
36
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
37
+ # config.i18n.default_locale = :de
38
+
39
+ # Configure the default encoding used in templates for Ruby 1.9.
40
+ config.encoding = "utf-8"
41
+
42
+ # Configure sensitive parameters which will be filtered from the log file.
43
+ config.filter_parameters += [:password]
44
+
45
+ # Enable the asset pipeline
46
+ config.assets.enabled = true
47
+
48
+ # Version of your assets, change this if you want to expire all your assets
49
+ config.assets.version = '1.0'
50
+ end
51
+ end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Rails31::Application.initialize!
@@ -0,0 +1,30 @@
1
+ Rails31::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Do not compress assets
26
+ config.assets.compress = false
27
+
28
+ # Expands the lines which load the assets
29
+ config.assets.debug = true
30
+ end