glow 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. data/Gemfile.lock +6 -6
  2. data/lib/glow/filter.rb +7 -7
  3. data/lib/glow/version.rb +1 -1
  4. data/test/rails3/Gemfile +1 -0
  5. data/test/rails3/Gemfile.lock +68 -59
  6. data/test/rails3/spec/spec_helper.rb +1 -1
  7. data/test/rails31/Gemfile +1 -0
  8. data/test/rails31/Gemfile.lock +58 -49
  9. data/test/rails31/spec/spec_helper.rb +1 -1
  10. data/test/rails32/.gitignore +5 -0
  11. data/test/rails32/Gemfile +34 -0
  12. data/test/rails32/Gemfile.lock +161 -0
  13. data/test/rails32/Rakefile +7 -0
  14. data/test/rails32/app/assets/images/rails.png +0 -0
  15. data/test/rails32/app/assets/javascripts/application.js +10 -0
  16. data/test/rails32/app/assets/stylesheets/application.css +7 -0
  17. data/test/rails32/app/controllers/application_controller.rb +3 -0
  18. data/test/rails32/app/controllers/flash_controller.rb +18 -0
  19. data/test/rails32/app/views/flash/ajax.js.erb +1 -0
  20. data/test/rails32/app/views/flash/show.html.erb +13 -0
  21. data/test/rails32/app/views/layouts/application.html.erb +14 -0
  22. data/test/rails32/config.ru +4 -0
  23. data/test/rails32/config/application.rb +51 -0
  24. data/test/rails32/config/boot.rb +6 -0
  25. data/test/rails32/config/environment.rb +5 -0
  26. data/test/rails32/config/environments/development.rb +30 -0
  27. data/test/rails32/config/environments/production.rb +60 -0
  28. data/test/rails32/config/environments/test.rb +42 -0
  29. data/test/rails32/config/initializers/backtrace_silencers.rb +7 -0
  30. data/test/rails32/config/initializers/inflections.rb +10 -0
  31. data/test/rails32/config/initializers/mime_types.rb +5 -0
  32. data/test/rails32/config/initializers/secret_token.rb +7 -0
  33. data/test/rails32/config/initializers/session_store.rb +8 -0
  34. data/test/rails32/config/initializers/wrap_parameters.rb +10 -0
  35. data/test/rails32/config/locales/en.yml +5 -0
  36. data/test/rails32/config/routes.rb +6 -0
  37. data/test/rails32/log/.gitkeep +0 -0
  38. data/test/rails32/public/404.html +26 -0
  39. data/test/rails32/public/422.html +26 -0
  40. data/test/rails32/public/500.html +26 -0
  41. data/test/rails32/public/favicon.ico +0 -0
  42. data/test/rails32/public/robots.txt +5 -0
  43. data/test/rails32/script/rails +6 -0
  44. data/test/rails32/spec/controllers/.flash_controller_spec.rb.swn +0 -0
  45. data/test/rails32/spec/controllers/.flash_controller_spec.rb.swo +0 -0
  46. data/test/rails32/spec/controllers/flash_controller_spec.rb +33 -0
  47. data/test/rails32/spec/integration/flash_spec.rb +17 -0
  48. data/test/rails32/spec/spec_helper.rb +31 -0
  49. metadata +83 -5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- glow (0.0.9)
4
+ glow (0.0.10)
5
5
  jquery-rails
6
6
  rails (>= 3.0.0, < 4.0.0)
7
7
 
@@ -40,17 +40,17 @@ GEM
40
40
  erubis (2.7.0)
41
41
  hike (1.2.1)
42
42
  i18n (0.6.0)
43
- journey (1.0.3)
43
+ journey (1.0.4)
44
44
  jquery-rails (2.0.2)
45
45
  railties (>= 3.2.0, < 5.0)
46
46
  thor (~> 0.14)
47
- json (1.6.6)
47
+ json (1.7.4)
48
48
  mail (2.4.4)
49
49
  i18n (>= 0.4.0)
50
50
  mime-types (~> 1.16)
51
51
  treetop (~> 1.4.8)
52
- mime-types (1.18)
53
- multi_json (1.2.0)
52
+ mime-types (1.19)
53
+ multi_json (1.3.6)
54
54
  polyglot (0.3.3)
55
55
  rack (1.4.1)
56
56
  rack-cache (1.2)
@@ -77,7 +77,7 @@ GEM
77
77
  rake (0.9.2.2)
78
78
  rdoc (3.12)
79
79
  json (~> 1.4)
80
- sprockets (2.1.2)
80
+ sprockets (2.1.3)
81
81
  hike (~> 1.2)
82
82
  rack (~> 1.0)
83
83
  tilt (~> 1.1, != 1.3.0)
data/lib/glow/filter.rb CHANGED
@@ -6,14 +6,14 @@ module Glow
6
6
  included do
7
7
  after_filter :flash_to_headers
8
8
  end
9
- module InstanceMethods
10
- def flash_to_headers
11
- return unless flash.any? && request.xhr?
12
- type, message = flash.first
13
- response.headers['X-Message'] = message.to_s.unpack('U*').map{ |i| "&##{i};" }.join
9
+
10
+ def flash_to_headers
11
+ return unless flash.any? && request.xhr?
12
+ type, message = flash.first
13
+ response.headers['X-Message'] = message.to_s.unpack('U*').map{ |i| "&##{i};" }.join
14
14
  response.headers['X-Message-Type'] = type.to_s
15
- flash.discard # don't want the flash to appear when you reload page
16
- end
15
+ flash.discard # don't want the flash to appear when you reload page
17
16
  end
17
+
18
18
  end
19
19
  end
data/lib/glow/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Glow
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
data/test/rails3/Gemfile CHANGED
@@ -6,4 +6,5 @@ gem 'glow', path: '../..'
6
6
  gem 'rspec-rails'
7
7
  gem 'capybara'
8
8
  gem 'htmlentities'
9
+ gem 'capybara-webkit'
9
10
  #end
@@ -1,114 +1,122 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- glow (0.0.7)
4
+ glow (0.0.10)
5
5
  jquery-rails
6
- rails (>= 3.0.0, < 3.2.0)
6
+ rails (>= 3.0.0, < 4.0.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
11
  abstract (1.0.0)
12
- actionmailer (3.0.10)
13
- actionpack (= 3.0.10)
12
+ actionmailer (3.0.17)
13
+ actionpack (= 3.0.17)
14
14
  mail (~> 2.2.19)
15
- actionpack (3.0.10)
16
- activemodel (= 3.0.10)
17
- activesupport (= 3.0.10)
15
+ actionpack (3.0.17)
16
+ activemodel (= 3.0.17)
17
+ activesupport (= 3.0.17)
18
18
  builder (~> 2.1.2)
19
19
  erubis (~> 2.6.6)
20
20
  i18n (~> 0.5.0)
21
- rack (~> 1.2.1)
21
+ rack (~> 1.2.5)
22
22
  rack-mount (~> 0.6.14)
23
23
  rack-test (~> 0.5.7)
24
24
  tzinfo (~> 0.3.23)
25
- activemodel (3.0.10)
26
- activesupport (= 3.0.10)
25
+ activemodel (3.0.17)
26
+ activesupport (= 3.0.17)
27
27
  builder (~> 2.1.2)
28
28
  i18n (~> 0.5.0)
29
- activerecord (3.0.10)
30
- activemodel (= 3.0.10)
31
- activesupport (= 3.0.10)
29
+ activerecord (3.0.17)
30
+ activemodel (= 3.0.17)
31
+ activesupport (= 3.0.17)
32
32
  arel (~> 2.0.10)
33
33
  tzinfo (~> 0.3.23)
34
- activeresource (3.0.10)
35
- activemodel (= 3.0.10)
36
- activesupport (= 3.0.10)
37
- activesupport (3.0.10)
34
+ activeresource (3.0.17)
35
+ activemodel (= 3.0.17)
36
+ activesupport (= 3.0.17)
37
+ activesupport (3.0.17)
38
+ addressable (2.3.2)
38
39
  arel (2.0.10)
39
40
  builder (2.1.2)
40
- capybara (1.0.1)
41
+ capybara (1.1.2)
41
42
  mime-types (>= 1.16)
42
43
  nokogiri (>= 1.3.3)
43
44
  rack (>= 1.0.0)
44
45
  rack-test (>= 0.5.4)
45
46
  selenium-webdriver (~> 2.0)
46
47
  xpath (~> 0.1.4)
47
- childprocess (0.2.1)
48
- ffi (~> 1.0.6)
48
+ capybara-webkit (0.12.1)
49
+ capybara (>= 1.0.0, < 1.2)
50
+ json
51
+ childprocess (0.3.5)
52
+ ffi (~> 1.0, >= 1.0.6)
49
53
  diff-lcs (1.1.3)
50
54
  erubis (2.6.6)
51
55
  abstract (>= 1.0.0)
52
- ffi (1.0.9)
53
- htmlentities (4.3.0)
56
+ ffi (1.1.5)
57
+ htmlentities (4.3.1)
54
58
  i18n (0.5.0)
55
- jquery-rails (1.0.13)
59
+ jquery-rails (1.0.19)
56
60
  railties (~> 3.0)
57
61
  thor (~> 0.14)
58
- json_pure (1.5.3)
62
+ json (1.7.4)
63
+ libwebsocket (0.1.5)
64
+ addressable
59
65
  mail (2.2.19)
60
66
  activesupport (>= 2.3.6)
61
67
  i18n (>= 0.4.0)
62
68
  mime-types (~> 1.16)
63
69
  treetop (~> 1.4.8)
64
- mime-types (1.16)
65
- nokogiri (1.5.0)
66
- polyglot (0.3.2)
67
- rack (1.2.3)
70
+ mime-types (1.19)
71
+ multi_json (1.3.6)
72
+ nokogiri (1.5.5)
73
+ polyglot (0.3.3)
74
+ rack (1.2.5)
68
75
  rack-mount (0.6.14)
69
76
  rack (>= 1.0.0)
70
77
  rack-test (0.5.7)
71
78
  rack (>= 1.0)
72
- rails (3.0.10)
73
- actionmailer (= 3.0.10)
74
- actionpack (= 3.0.10)
75
- activerecord (= 3.0.10)
76
- activeresource (= 3.0.10)
77
- activesupport (= 3.0.10)
79
+ rails (3.0.17)
80
+ actionmailer (= 3.0.17)
81
+ actionpack (= 3.0.17)
82
+ activerecord (= 3.0.17)
83
+ activeresource (= 3.0.17)
84
+ activesupport (= 3.0.17)
78
85
  bundler (~> 1.0)
79
- railties (= 3.0.10)
80
- railties (3.0.10)
81
- actionpack (= 3.0.10)
82
- activesupport (= 3.0.10)
86
+ railties (= 3.0.17)
87
+ railties (3.0.17)
88
+ actionpack (= 3.0.17)
89
+ activesupport (= 3.0.17)
83
90
  rake (>= 0.8.7)
84
91
  rdoc (~> 3.4)
85
92
  thor (~> 0.14.4)
86
- rake (0.9.2)
87
- rdoc (3.9.3)
88
- rspec (2.6.0)
89
- rspec-core (~> 2.6.0)
90
- rspec-expectations (~> 2.6.0)
91
- rspec-mocks (~> 2.6.0)
92
- rspec-core (2.6.4)
93
- rspec-expectations (2.6.0)
94
- diff-lcs (~> 1.1.2)
95
- rspec-mocks (2.6.0)
96
- rspec-rails (2.6.1)
97
- actionpack (~> 3.0)
98
- activesupport (~> 3.0)
99
- railties (~> 3.0)
100
- rspec (~> 2.6.0)
101
- rubyzip (0.9.4)
102
- selenium-webdriver (2.4.0)
103
- childprocess (>= 0.2.1)
104
- ffi (>= 1.0.7)
105
- json_pure
93
+ rake (0.9.2.2)
94
+ rdoc (3.12)
95
+ json (~> 1.4)
96
+ rspec (2.11.0)
97
+ rspec-core (~> 2.11.0)
98
+ rspec-expectations (~> 2.11.0)
99
+ rspec-mocks (~> 2.11.0)
100
+ rspec-core (2.11.1)
101
+ rspec-expectations (2.11.2)
102
+ diff-lcs (~> 1.1.3)
103
+ rspec-mocks (2.11.2)
104
+ rspec-rails (2.11.0)
105
+ actionpack (>= 3.0)
106
+ activesupport (>= 3.0)
107
+ railties (>= 3.0)
108
+ rspec (~> 2.11.0)
109
+ rubyzip (0.9.9)
110
+ selenium-webdriver (2.25.0)
111
+ childprocess (>= 0.2.5)
112
+ libwebsocket (~> 0.1.3)
113
+ multi_json (~> 1.0)
106
114
  rubyzip
107
115
  thor (0.14.6)
108
116
  treetop (1.4.10)
109
117
  polyglot
110
118
  polyglot (>= 0.3.1)
111
- tzinfo (0.3.29)
119
+ tzinfo (0.3.33)
112
120
  xpath (0.1.4)
113
121
  nokogiri (~> 1.3)
114
122
 
@@ -117,6 +125,7 @@ PLATFORMS
117
125
 
118
126
  DEPENDENCIES
119
127
  capybara
128
+ capybara-webkit
120
129
  glow!
121
130
  htmlentities
122
131
  jquery-rails
@@ -5,7 +5,7 @@ require 'rspec/rails'
5
5
  require 'capybara/rspec'
6
6
  require 'capybara/rails'
7
7
 
8
- Capybara.default_driver = :selenium
8
+ Capybara.default_driver = :webkit
9
9
 
10
10
  # Requires supporting ruby files with custom matchers and macros, etc,
11
11
  # in spec/support/ and its subdirectories.
data/test/rails31/Gemfile CHANGED
@@ -21,6 +21,7 @@ gem 'jquery-rails'
21
21
  gem 'rspec-rails'
22
22
  gem 'capybara'
23
23
  gem 'htmlentities'
24
+ gem 'capybara-webkit'
24
25
 
25
26
  # Use unicorn as the web server
26
27
  # gem 'unicorn'
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- glow (0.0.7)
4
+ glow (0.0.10)
5
5
  jquery-rails
6
- rails (>= 3.0.0, < 3.2.0)
6
+ rails (>= 3.0.0, < 4.0.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
@@ -37,46 +37,52 @@ GEM
37
37
  activesupport (= 3.1.0)
38
38
  activesupport (3.1.0)
39
39
  multi_json (~> 1.0)
40
- arel (2.2.1)
41
- bcrypt-ruby (3.0.0)
40
+ addressable (2.3.2)
41
+ arel (2.2.3)
42
+ bcrypt-ruby (3.0.1)
42
43
  builder (3.0.0)
43
- capybara (1.0.1)
44
+ capybara (1.1.2)
44
45
  mime-types (>= 1.16)
45
46
  nokogiri (>= 1.3.3)
46
47
  rack (>= 1.0.0)
47
48
  rack-test (>= 0.5.4)
48
49
  selenium-webdriver (~> 2.0)
49
50
  xpath (~> 0.1.4)
50
- childprocess (0.2.1)
51
- ffi (~> 1.0.6)
52
- coffee-rails (3.1.0)
51
+ capybara-webkit (0.12.1)
52
+ capybara (>= 1.0.0, < 1.2)
53
+ json
54
+ childprocess (0.3.5)
55
+ ffi (~> 1.0, >= 1.0.6)
56
+ coffee-rails (3.1.1)
53
57
  coffee-script (>= 2.2.0)
54
- railties (~> 3.1.0.rc1)
58
+ railties (~> 3.1.0)
55
59
  coffee-script (2.2.0)
56
60
  coffee-script-source
57
61
  execjs
58
- coffee-script-source (1.1.2)
62
+ coffee-script-source (1.3.3)
59
63
  diff-lcs (1.1.3)
60
64
  erubis (2.7.0)
61
- execjs (1.2.4)
65
+ execjs (1.4.0)
62
66
  multi_json (~> 1.0)
63
- ffi (1.0.9)
67
+ ffi (1.1.5)
64
68
  hike (1.2.1)
65
- htmlentities (4.3.0)
69
+ htmlentities (4.3.1)
66
70
  i18n (0.6.0)
67
- jquery-rails (1.0.13)
71
+ jquery-rails (1.0.19)
68
72
  railties (~> 3.0)
69
73
  thor (~> 0.14)
70
- json_pure (1.5.3)
71
- mail (2.3.0)
74
+ json (1.7.4)
75
+ libwebsocket (0.1.5)
76
+ addressable
77
+ mail (2.3.3)
72
78
  i18n (>= 0.4.0)
73
79
  mime-types (~> 1.16)
74
80
  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)
81
+ mime-types (1.19)
82
+ multi_json (1.3.6)
83
+ nokogiri (1.5.5)
84
+ polyglot (0.3.3)
85
+ rack (1.3.6)
80
86
  rack-cache (1.0.3)
81
87
  rack (>= 0.4)
82
88
  rack-mount (0.8.3)
@@ -100,45 +106,47 @@ GEM
100
106
  rake (>= 0.8.7)
101
107
  rdoc (~> 3.4)
102
108
  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)
109
+ rake (0.9.2.2)
110
+ rdoc (3.12)
111
+ json (~> 1.4)
112
+ rspec (2.11.0)
113
+ rspec-core (~> 2.11.0)
114
+ rspec-expectations (~> 2.11.0)
115
+ rspec-mocks (~> 2.11.0)
116
+ rspec-core (2.11.1)
117
+ rspec-expectations (2.11.2)
118
+ diff-lcs (~> 1.1.3)
119
+ rspec-mocks (2.11.2)
120
+ rspec-rails (2.11.0)
121
+ actionpack (>= 3.0)
122
+ activesupport (>= 3.0)
123
+ railties (>= 3.0)
124
+ rspec (~> 2.11.0)
125
+ rubyzip (0.9.9)
126
+ sass (3.2.0)
127
+ sass-rails (3.1.6)
121
128
  actionpack (~> 3.1.0)
122
129
  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
130
+ sass (>= 3.1.10)
131
+ tilt (~> 1.3.2)
132
+ selenium-webdriver (2.25.0)
133
+ childprocess (>= 0.2.5)
134
+ libwebsocket (~> 0.1.3)
135
+ multi_json (~> 1.0)
128
136
  rubyzip
129
- sprockets (2.0.0)
137
+ sprockets (2.0.4)
130
138
  hike (~> 1.2)
131
139
  rack (~> 1.0)
132
- tilt (!= 1.3.0, ~> 1.1)
140
+ tilt (~> 1.1, != 1.3.0)
133
141
  thor (0.14.6)
134
142
  tilt (1.3.3)
135
143
  treetop (1.4.10)
136
144
  polyglot
137
145
  polyglot (>= 0.3.1)
138
- tzinfo (0.3.29)
139
- uglifier (1.0.2)
146
+ tzinfo (0.3.33)
147
+ uglifier (1.2.7)
140
148
  execjs (>= 0.3.0)
141
- multi_json (>= 1.0.2)
149
+ multi_json (~> 1.3)
142
150
  xpath (0.1.4)
143
151
  nokogiri (~> 1.3)
144
152
 
@@ -147,6 +155,7 @@ PLATFORMS
147
155
 
148
156
  DEPENDENCIES
149
157
  capybara
158
+ capybara-webkit
150
159
  coffee-rails (~> 3.1.0)
151
160
  glow!
152
161
  htmlentities