cacheable_flash 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,75 @@
1
+ # gem generated
2
+ *.gem
3
+ Gemfile.lock
4
+
5
+ # bundle generated
6
+ .bundle
7
+ lib/bundler/man
8
+
9
+ # rcov generated
10
+ coverage
11
+
12
+ # rdoc generated
13
+ rdoc
14
+
15
+ # yard generated
16
+ doc
17
+ .yardoc
18
+
19
+ # bundler
20
+ .bundle
21
+
22
+ # jeweler generated
23
+ pkg
24
+
25
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
26
+ #
27
+ # * Create a file at ~/.gitignore
28
+ # * Include files you want ignored
29
+ # * Run: git config --global core.excludesfile ~/.gitignore
30
+ #
31
+ # After doing this, these files will be ignored in all your git projects,
32
+ # saving you from having to 'pollute' every project you touch with them
33
+ #
34
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
35
+ #
36
+ # For MacOS:
37
+ #
38
+ .DS_Store
39
+
40
+ # For TextMate
41
+ *.tmproj
42
+ tmtags
43
+
44
+ # For RubyMine
45
+ .idea
46
+
47
+ # For emacs:
48
+ *~
49
+ \#*
50
+ .\#*
51
+
52
+ # For vim:
53
+ *.swp
54
+
55
+ # For redcar:
56
+ .redcar
57
+
58
+ # For rubinius:
59
+ *.rbc
60
+
61
+ # From bundle gem my_gem's .gitignore (good practice?)
62
+ .config
63
+ InstalledFiles
64
+ doc/
65
+ spec/reports
66
+ test/tmp
67
+ test/version_tmp
68
+ tmp
69
+
70
+ # Other
71
+ log/*.log
72
+ spec/dummy/db/*.sqlite3
73
+ spec/dummy/log/*.log
74
+ spec/dummy/tmp/
75
+ spec/dummy/.sass-cache
data/CHANGES CHANGED
@@ -1,3 +1,19 @@
1
+ 0.2.8 - AUG.07.2012
2
+ - switch from jeweler to gem-release for bumping and tagging
3
+ - bundler update (1.0.24)
4
+ - Escape HTML in flash values unless they're html_safe
5
+ - Add CacheableFlash rack middleware
6
+
7
+ 0.2.7 - JUN.21.2012
8
+ - Note: Does not support flash.now feature of the FlashHash in Rails
9
+ - Corrected directory names for controllers/layouts
10
+
11
+ 0.2.6 - unreleased
12
+ - all specs pass with rspec 2.10
13
+
14
+ 0.2.5 - MAR.01.2012
15
+ - Real integration test!
16
+
1
17
  0.2.4 - FEB.27.2012
2
18
  - Dependency diet! No longer requires all of rails - only railties.
3
19
 
@@ -7,14 +23,14 @@
7
23
  - Updated specs, to running and passing condition!
8
24
  - Made rails > 3.0 a dependency, since it is (uses ::Rails::Engine and :Rails::Railtie)
9
25
 
10
- 0.2.2
26
+ 0.2.2 - SEP.10.2011
11
27
  - Improved deprecation warnings about using the generator (not needed with asset pipeline)
12
28
  - Improved README setup instructions
13
29
 
14
- 0.2.1
30
+ 0.2.1 - SEP.10.2011
15
31
  - Fixed bug in generator for those not using asset pipeline, or pre Rails 3.1
16
32
 
17
- 0.2.0 [Peter Boling begins gemification process]
33
+ 0.2.0 - SEP.10.2011 [Peter Boling begins gemification process]
18
34
  - Converted to a gem
19
35
  - Updated to improved, patched jquery.cookie from https://github.com/pboling/jquery-cookie
20
36
  - Merged a few other forks of cacheable-flash
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- #source "http://rubygems.org"
1
+ source "http://rubygems.org"
2
2
 
3
3
  gem "json"
4
4
 
@@ -15,7 +15,7 @@ group :development, :test do
15
15
 
16
16
  gem "rspec-rails", ">= 2.8.0"
17
17
  gem "rdoc", ">= 3.12"
18
- gem "bundler", ">= 1.0.21"
18
+ gem "bundler", ">= 1.0.24"
19
19
  gem "jeweler", ">= 1.6.4"
20
20
  gem "reek", ">= 1.2.8"
21
21
  gem "roodi", ">= 2.1.0"
@@ -1,6 +1,8 @@
1
1
  Copyright (c) 2007-2010 Pivotal Labs
2
2
  Copyright (c) 2011-2012 Peter H. Boling (http://peterboling.com)
3
3
 
4
+ MIT License
5
+
4
6
  Permission is hereby granted, free of charge, to any person obtaining
5
7
  a copy of this software and associated documentation files (the
6
8
  "Software"), to deal in the Software without restriction, including
@@ -1,151 +1,168 @@
1
- = CacheableFlash
2
-
3
- == Description
4
-
5
- This plugin enables greater levels of page caching by rendering flash
6
- messages from a cookie using JavaScript, instead of in your Rails
7
- view template. Flash contents are converted to JSON and placed in
8
- a cookie by an after_filter in a controller.
9
-
10
- == Installation as plugin
11
-
12
- ruby script/plugin install git://github.com/pivotal/cacheable-flash.git
13
-
14
- == Installation as gem
15
-
16
- gem install 'cacheable_flash'
17
-
18
- add to your Gemfile:
19
- gem 'cacheable_flash'
20
-
21
- == Setup
22
-
23
- === Without asset pipeline, or pre-Rails 3.1:
24
-
25
- First copy the JS assets into your app:
26
- rails generate cacheable_flash:install
27
-
28
- CacheableFlash adds its javascript dependencies as a Rails 3 javascript 'expansion',
29
- which are only used if you are NOT using the asset pipeline (apparently?).
30
-
31
- So if you have config.assets.enabled = false in application.rb then in your layout:
32
- javascript_include_tag :cacheable_flash
33
-
34
- Otherwise, in your layout, just source them like normal:
35
- javascript_include_tag 'flash', 'jquery.cookie'
36
-
37
- === With asset pipeline (requires Rails 3.1)
38
-
39
- The asset pipeline should have access to the assets in this gem via your app/assets/javascripts/application.js:
40
- //= require flash
41
- //= require jquery.cookie
42
-
43
- == Mailing List
44
-
45
- http://groups.google.com/group/PivotalLabsOpenSource
46
-
47
- == Bug/Feature Tracker
48
-
49
- https://github.com/pivotal/cacheable-flash/issues
50
-
51
- == Wiki
52
-
53
- Please help document!
54
-
55
- https://github.com/pivotal/cacheable-flash/wiki
56
-
57
- === Usage
58
-
59
- To use, include the CacheableFlash module in your controller.
60
- It's all or none on the actions in your controller, so you can't
61
- mix JS and HTML display of your flash message in a controller.
62
- No other modifications to the controller are needed. You will need
63
- to add divs and some javascript to your view or layout templates
64
- to render the flash in the browser.
65
-
66
- Note that the cookie holding the flash messages is removed as the
67
- page is displayed, so a refresh will clear the flash message (just
68
- as happens normally).
69
-
70
- === Example Controller
71
-
72
- class MyController < ActionController::Base
73
- include CacheableFlash
74
- # ...
75
- end
76
-
77
- === Example Template Markup
78
-
79
- <div id="error_div_id" class="flash flash_error"></div>
80
- <div id="notice_div_id" class="flash flash_notice"></div>
81
- <script type="text/javascript">
82
- Flash.transferFromCookies();
83
- Flash.writeDataTo('error', $('#error_div_id'));
84
- Flash.writeDataTo('notice', $('#notice_div_id'));
85
- </script>
86
-
87
- == Testing
88
- You can test your flash cookies by making assertions on the json of the "flash" cookie.
89
- Cacheable Flash provides test helpers which includes the flash_cookie method.
90
-
91
- === Test::Unit Example
92
- require "cacheable_flash/test_helpers"
93
-
94
- class TestController < ActionController::Base
95
- def index
96
- flash["notice"] = "In index"
97
- end
98
- end
99
-
100
- class ControllerTest < Test::Unit::TestCase
101
- include CacheableFlash::TestHelpers
102
-
103
- def setup
104
- @controller = TestController.new
105
- @request = ActionController::TestRequest.new
106
- @response = ActionController::TestResponse.new
107
- end
108
-
109
- def test_cacheable_flash_action
110
- get :index
111
- asset_equal "In index", flash_cookie["notice"]
112
- end
113
- end
114
-
115
- === Rspec Example
116
- require "cacheable_flash/test_helpers"
117
-
118
- class TestController < ActionController::Base
119
- def index
120
- flash["notice"] = "In index"
121
- end
122
- end
123
-
124
- describe TestController, "#index" do
125
- include CacheableFlash::TestHelpers
126
-
127
- it "writes to the flash cookie" do
128
- get :index
129
- flash_cookie["notice"].should == "In index"
130
- end
131
- end
132
-
133
- == Contributing to cacheable-flash
134
-
135
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
136
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
137
- * Fork the project
138
- * Start a feature/bugfix branch
139
- * Commit and push until you are happy with your contribution
140
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
141
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
142
-
143
- == Copyright
144
-
145
- Licensed under the MIT License.
146
-
147
- - Copyright (c) 2011-2012 Peter H. Boling (http://peterboling.com). See LICENSE.txt for further details.
148
- - Copyright (c) 2007-2010 Pivotal Labs
149
-
150
-
151
-
1
+ = CacheableFlash {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/pivotal/cacheable-flash]
2
+
3
+ == Description
4
+
5
+ This plugin enables greater levels of page caching by rendering flash
6
+ messages from a cookie using JavaScript, instead of in your Rails
7
+ view template. Flash contents are converted to JSON and placed in
8
+ a cookie by an after_filter in a controller or a Rack middleware in
9
+ your application.
10
+
11
+ == Installation as gem
12
+
13
+ gem install 'cacheable_flash'
14
+
15
+ add to your Gemfile:
16
+ gem 'cacheable_flash'
17
+
18
+ == Installation as plugin (For old Rails)
19
+
20
+ ruby script/plugin install git://github.com/pivotal/cacheable-flash.git
21
+
22
+ == Setup
23
+
24
+ === Without asset pipeline, or pre-Rails 3.1:
25
+
26
+ First copy the JS assets into your app:
27
+ rails generate cacheable_flash:install
28
+
29
+ CacheableFlash adds its javascript dependencies as a Rails 3 javascript 'expansion',
30
+ which are only used if you are NOT using the asset pipeline (apparently?).
31
+
32
+ So if you have config.assets.enabled = false in application.rb then in your layout:
33
+ javascript_include_tag :cacheable_flash
34
+
35
+ Otherwise, in your layout, just source them like normal:
36
+ javascript_include_tag 'flash', 'jquery.cookie'
37
+
38
+ === With asset pipeline (requires Rails 3.1)
39
+
40
+ The asset pipeline should have access to the assets in this gem via your app/assets/javascripts/application.js:
41
+ //= require flash
42
+ //= require jquery.cookie
43
+
44
+ == Mailing List
45
+
46
+ http://groups.google.com/group/PivotalLabsOpenSource
47
+
48
+ == Bug/Feature Tracker
49
+
50
+ https://github.com/pivotal/cacheable-flash/issues
51
+
52
+ == Wiki
53
+
54
+ Please help document!
55
+
56
+ https://github.com/pivotal/cacheable-flash/wiki
57
+
58
+ == Usage as an around filter
59
+
60
+ To use as an around filter, include the CacheableFlash module
61
+ in your controller.
62
+ It's all or none on the actions in your controller, so you can't
63
+ mix JS and HTML display of your flash message in a controller.
64
+ No other modifications to the controller are needed. You will need
65
+ to add divs and some javascript to your view or layout templates
66
+ to render the flash in the browser.
67
+
68
+ Note that the cookie holding the flash messages is removed as the
69
+ page is displayed, so a refresh will clear the flash message (just
70
+ as happens normally).
71
+
72
+ === Example Controller
73
+
74
+ class MyController < ActionController::Base
75
+ include CacheableFlash
76
+ # ...
77
+ end
78
+
79
+ == Usage as a Rack middleware (requires Rails 3)
80
+
81
+ To use as a Rack Middleware, swap the Rails flash middleware with the
82
+ Cacheable flash middleware.
83
+ Use this method if you set flash messages inside a rescue_from block:
84
+
85
+ rescue_from CanCan::AccessDenied do |exception|
86
+ redirect_to root_url, :alert => exception.message
87
+ end
88
+
89
+ === In your application.rb:
90
+
91
+ # Swap the ActionDispatch::Flash middleware with the CacheableFlash one
92
+ config.middleware.swap ActionDispatch::Flash, CacheableFlash::Middleware
93
+
94
+ == Example Template Markup
95
+
96
+ <div id="error_div_id" class="flash flash_error"></div>
97
+ <div id="notice_div_id" class="flash flash_notice"></div>
98
+ <script type="text/javascript">
99
+ Flash.transferFromCookies();
100
+ Flash.writeDataTo('error', $('#error_div_id'));
101
+ Flash.writeDataTo('notice', $('#notice_div_id'));
102
+ </script>
103
+
104
+ == Testing
105
+ You can test your flash cookies by making assertions on the json of the "flash" cookie.
106
+ Cacheable Flash provides test helpers which includes the flash_cookie method.
107
+
108
+ === Test::Unit Example
109
+ require "cacheable_flash/test_helpers"
110
+
111
+ class TestController < ActionController::Base
112
+ def index
113
+ flash["notice"] = "In index"
114
+ end
115
+ end
116
+
117
+ class ControllerTest < Test::Unit::TestCase
118
+ include CacheableFlash::TestHelpers
119
+
120
+ def setup
121
+ @controller = TestController.new
122
+ @request = ActionController::TestRequest.new
123
+ @response = ActionController::TestResponse.new
124
+ end
125
+
126
+ def test_cacheable_flash_action
127
+ get :index
128
+ asset_equal "In index", flash_cookie["notice"]
129
+ end
130
+ end
131
+
132
+ === Rspec Example
133
+ require "cacheable_flash/test_helpers"
134
+
135
+ class TestController < ActionController::Base
136
+ def index
137
+ flash["notice"] = "In index"
138
+ end
139
+ end
140
+
141
+ describe TestController, "#index" do
142
+ include CacheableFlash::TestHelpers
143
+
144
+ it "writes to the flash cookie" do
145
+ get :index
146
+ flash_cookie["notice"].should == "In index"
147
+ end
148
+ end
149
+
150
+ == Contributing to cacheable-flash
151
+
152
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
153
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
154
+ * Fork the project
155
+ * Start a feature/bugfix branch
156
+ * Commit and push until you are happy with your contribution
157
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
158
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
159
+
160
+ == Copyright
161
+
162
+ Licensed under the MIT License.
163
+
164
+ - Copyright (c) 2011-2012 Peter H. Boling (http://peterboling.com). See LICENSE for further details.
165
+ - Copyright (c) 2007-2010 Pivotal Labs
166
+
167
+
168
+
data/Rakefile CHANGED
@@ -1,35 +1,8 @@
1
1
  # encoding: utf-8
2
2
  #!/usr/bin/env rake
3
- require 'rubygems'
4
- begin
5
- require 'bundler/setup'
6
- rescue LoadError
7
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
8
- end
9
- begin
10
- Bundler.setup(:default, :development)
11
- rescue Bundler::BundlerError => e
12
- $stderr.puts e.message
13
- $stderr.puts "Run `bundle install` to install missing gems"
14
- exit e.status_code
15
- end
3
+ require "bundler/gem_tasks"
16
4
  require 'rake'
17
5
 
18
- require 'jeweler'
19
- Jeweler::Tasks.new do |gem|
20
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
21
- gem.name = "cacheable_flash"
22
- gem.homepage = "http://github.com/pivotal/cacheable-flash"
23
- gem.license = "MIT"
24
- gem.summary = %Q{Render flash messages from a cookie using JavaScript, instead of in your Rails
25
- view template}
26
- gem.description = %Q{Allows caching of pages with flash messages by rendering flash\nmessages from a cookie using JavaScript, instead of statically in your Rails\nview template. Flash contents are converted to JSON and placed in\na cookie by an after_filter in a controller.}
27
- gem.email = "peter.boling@gmail.com"
28
- gem.authors = ["Peter H. Boling","Brian Takita"]
29
- # dependencies defined in Gemfile
30
- end
31
- Jeweler::RubygemsDotOrgTasks.new
32
-
33
6
  require 'rspec/core'
34
7
  require 'rspec/core/rake_task'
35
8
  RSpec::Core::RakeTask.new(:spec) do |spec|
@@ -69,6 +42,5 @@ RDoc::Task.new(:rdoc) do |rdoc|
69
42
  end
70
43
 
71
44
  APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
72
- load 'rails/tasks/engine.rake'
73
45
 
74
46
  Bundler::GemHelper.install_tasks
@@ -1,94 +1,22 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/cacheable_flash/version', __FILE__)
5
3
 
6
4
  Gem::Specification.new do |s|
7
5
  s.name = "cacheable_flash"
8
- s.version = "0.2.7"
6
+ s.version = CacheableFlash::VERSION
9
7
 
10
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
9
  s.authors = ["Peter H. Boling", "Brian Takita"]
12
- s.date = "2012-06-21"
13
- s.description = "Allows caching of pages with flash messages by rendering flash\nmessages from a cookie using JavaScript, instead of statically in your Rails\nview template. Flash contents are converted to JSON and placed in\na cookie by an after_filter in a controller."
10
+ s.date = "2012-08-07"
11
+ s.description = "Allows caching of pages with flash messages by rendering flash\nmessages from a cookie using JavaScript, instead of statically in your Rails\nview template. Flash contents are converted to JSON and placed in\na cookie by an after_filter (default) or a Rack Middleware (option)."
14
12
  s.email = "peter.boling@gmail.com"
15
13
  s.extra_rdoc_files = [
16
- "LICENSE.txt",
14
+ "LICENSE",
17
15
  "README.rdoc"
18
16
  ]
19
- s.files = [
20
- ".document",
21
- "CHANGES",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE.txt",
25
- "MIT-LICENSE",
26
- "README.rdoc",
27
- "Rakefile",
28
- "VERSION",
29
- "app/assets/images/cacheable_flash/.gitkeep",
30
- "app/assets/javascripts/cacheable_flash/application.js",
31
- "app/assets/stylesheets/cacheable_flash/application.css",
32
- "app/controllers/cacheable_flash/application_controller.rb",
33
- "app/helpers/cacheable_flash/application_helper.rb",
34
- "app/views/layouts/cacheable_flash/application.html.erb",
35
- "cacheable_flash.gemspec",
36
- "config/routes.rb",
37
- "init.rb",
38
- "install.rb",
39
- "lib/cacheable_flash.rb",
40
- "lib/cacheable_flash/engine.rb",
41
- "lib/cacheable_flash/railtie.rb",
42
- "lib/cacheable_flash/version.rb",
43
- "lib/generators/cacheable_flash/install/install_generator.rb",
44
- "lib/tasks/cacheable-flash_tasks.rake",
45
- "script/rails",
46
- "spec/cacheable_flash/cacheable_flash_spec.rb",
47
- "spec/cacheable_flash/install_spec.rb",
48
- "spec/cacheable_flash/test_helpers_spec.rb",
49
- "spec/controllers/dummy_controller_spec.rb",
50
- "spec/dummy/README.rdoc",
51
- "spec/dummy/Rakefile",
52
- "spec/dummy/app/assets/javascripts/application.js",
53
- "spec/dummy/app/assets/stylesheets/application.css",
54
- "spec/dummy/app/controllers/application_controller.rb",
55
- "spec/dummy/app/controllers/dummy_controller.rb",
56
- "spec/dummy/app/helpers/application_helper.rb",
57
- "spec/dummy/app/mailers/.gitkeep",
58
- "spec/dummy/app/models/.gitkeep",
59
- "spec/dummy/app/views/dummy/index.html.erb",
60
- "spec/dummy/app/views/layouts/application.html.erb",
61
- "spec/dummy/config.ru",
62
- "spec/dummy/config/application.rb",
63
- "spec/dummy/config/boot.rb",
64
- "spec/dummy/config/database.yml",
65
- "spec/dummy/config/environment.rb",
66
- "spec/dummy/config/environments/development.rb",
67
- "spec/dummy/config/environments/production.rb",
68
- "spec/dummy/config/environments/test.rb",
69
- "spec/dummy/config/initializers/backtrace_silencers.rb",
70
- "spec/dummy/config/initializers/inflections.rb",
71
- "spec/dummy/config/initializers/mime_types.rb",
72
- "spec/dummy/config/initializers/secret_token.rb",
73
- "spec/dummy/config/initializers/session_store.rb",
74
- "spec/dummy/config/initializers/wrap_parameters.rb",
75
- "spec/dummy/config/locales/en.yml",
76
- "spec/dummy/config/routes.rb",
77
- "spec/dummy/lib/assets/.gitkeep",
78
- "spec/dummy/log/.gitkeep",
79
- "spec/dummy/public/404.html",
80
- "spec/dummy/public/422.html",
81
- "spec/dummy/public/500.html",
82
- "spec/dummy/public/favicon.ico",
83
- "spec/dummy/script/rails",
84
- "spec/js_unit/cookie_test.html",
85
- "spec/js_unit/flash_test.html",
86
- "spec/spec_helper.rb",
87
- "spec/support/test_helpers.rb",
88
- "tasks/cacheable_flash_tasks.rake",
89
- "vendor/assets/javascripts/flash.js",
90
- "vendor/assets/javascripts/jquery.cookie.js"
91
- ]
17
+ s.files = `git ls-files`.split($\)
18
+ s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
19
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
92
20
  s.homepage = "http://github.com/pivotal/cacheable-flash"
93
21
  s.licenses = ["MIT"]
94
22
  s.require_paths = ["lib"]
@@ -104,7 +32,7 @@ Gem::Specification.new do |s|
104
32
  s.add_development_dependency(%q<jquery-rails>, [">= 0"])
105
33
  s.add_development_dependency(%q<rspec-rails>, [">= 2.8.0"])
106
34
  s.add_development_dependency(%q<rdoc>, [">= 3.12"])
107
- s.add_development_dependency(%q<bundler>, [">= 1.0.21"])
35
+ s.add_development_dependency(%q<bundler>, [">= 1.0.24"])
108
36
  s.add_development_dependency(%q<jeweler>, [">= 1.6.4"])
109
37
  s.add_development_dependency(%q<reek>, [">= 1.2.8"])
110
38
  s.add_development_dependency(%q<roodi>, [">= 2.1.0"])
@@ -114,7 +42,7 @@ Gem::Specification.new do |s|
114
42
  s.add_dependency(%q<jquery-rails>, [">= 0"])
115
43
  s.add_dependency(%q<rspec-rails>, [">= 2.8.0"])
116
44
  s.add_dependency(%q<rdoc>, [">= 3.12"])
117
- s.add_dependency(%q<bundler>, [">= 1.0.21"])
45
+ s.add_dependency(%q<bundler>, [">= 1.0.24"])
118
46
  s.add_dependency(%q<jeweler>, [">= 1.6.4"])
119
47
  s.add_dependency(%q<reek>, [">= 1.2.8"])
120
48
  s.add_dependency(%q<roodi>, [">= 2.1.0"])
@@ -125,7 +53,7 @@ Gem::Specification.new do |s|
125
53
  s.add_dependency(%q<jquery-rails>, [">= 0"])
126
54
  s.add_dependency(%q<rspec-rails>, [">= 2.8.0"])
127
55
  s.add_dependency(%q<rdoc>, [">= 3.12"])
128
- s.add_dependency(%q<bundler>, [">= 1.0.21"])
56
+ s.add_dependency(%q<bundler>, [">= 1.0.24"])
129
57
  s.add_dependency(%q<jeweler>, [">= 1.6.4"])
130
58
  s.add_dependency(%q<reek>, [">= 1.2.8"])
131
59
  s.add_dependency(%q<roodi>, [">= 2.1.0"])
data/install.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Only executed when installed as plugin.
2
- # When installed as a gem must use the generator, unless using Rails >= 3.1,
2
+ # When installed as a gem must use the generator, unless using Rails >= 3.1 and asset pipeline,
3
3
  # in which case the asset pipeline takes care of everything
4
4
  require 'fileutils'
5
5
  include FileUtils
@@ -2,16 +2,16 @@ require 'json'
2
2
 
3
3
  module CacheableFlash
4
4
  if defined?(Rails) && ::Rails::VERSION::MAJOR == 3
5
- if ::Rails::VERSION::MINOR >= 1
6
- require "cacheable_flash/engine"
7
- require 'cacheable_flash/railtie'
8
- elsif ::Rails::VERSION::MINOR == 0
9
- require 'cacheable_flash/railtie'
10
- end
11
- else
5
+ require 'cacheable_flash/middleware'
6
+ require 'cacheable_flash/engine' if ::Rails::VERSION::MINOR >= 1
7
+ require 'cacheable_flash/railtie'
8
+ else
12
9
  # For older rails use generator
13
10
  end
14
11
 
12
+ require 'cacheable_flash/cookie_flash'
13
+ include CookieFlash
14
+
15
15
  def self.included(base)
16
16
  #base must define around_filter, as in Rails
17
17
  base.around_filter :write_flash_to_cookie
@@ -19,25 +19,9 @@ module CacheableFlash
19
19
 
20
20
  def write_flash_to_cookie
21
21
  yield if block_given?
22
- cookie_flash = if cookies['flash']
23
- begin
24
- JSON(cookies['flash'])
25
- rescue
26
- {}
27
- end
28
- else
29
- {}
30
- end
31
22
 
32
- flash.each do |key, value|
33
- if cookie_flash[key.to_s].blank?
34
- cookie_flash[key.to_s] = value.kind_of?(Numeric) ? value.to_s : value
35
- else
36
- cookie_flash[key.to_s] << "<br/>#{value}"
37
- end
38
- end
39
23
  # Base must define cookies, as in Rails
40
- cookies['flash'] = cookie_flash.to_json.gsub("+", "%2B")
24
+ cookies['flash'] = cookie_flash(flash, cookies)
41
25
  # Base must define flash, as in Rails
42
26
  # TODO: Does not support flash.now feature of the FlashHash in Rails,
43
27
  # because flashes are only removed from cookies when they are used.
@@ -0,0 +1,15 @@
1
+ module CookieFlash
2
+ def cookie_flash(flash, cookies)
3
+ cookie_flash = (JSON(cookies['flash']) if cookies['flash']) || {} rescue {}
4
+
5
+ flash.each do |key, value|
6
+ value = ERB::Util.html_escape(value) unless value.is_a?(Hash) || value.html_safe?
7
+ if cookie_flash[key.to_s].blank?
8
+ cookie_flash[key.to_s] = value.kind_of?(Numeric) ? value.to_s : value
9
+ else
10
+ cookie_flash[key.to_s] << "<br/>#{value}"
11
+ end
12
+ end
13
+ cookie_flash.to_json.gsub("+", "%2B")
14
+ end
15
+ end
@@ -0,0 +1,26 @@
1
+ module CacheableFlash
2
+ class Middleware
3
+ require 'cacheable_flash/cookie_flash'
4
+ include CookieFlash
5
+ FLASH_HASH_KEY = "action_dispatch.request.flash_hash".freeze
6
+
7
+ def initialize(app)
8
+ @app = app
9
+ end
10
+
11
+ def call(env)
12
+ status, headers, body = @app.call(env)
13
+ flash = env[FLASH_HASH_KEY]
14
+
15
+ if flash
16
+ response = Rack::Response.new(body, status, headers)
17
+
18
+ cookies = env["rack.cookies"] || {}
19
+ response.set_cookie("flash", { :value => cookie_flash(flash, cookies), :path => "/" })
20
+ response.finish
21
+ else
22
+ [status, headers, body]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module CacheableFlash
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
@@ -1,106 +1,118 @@
1
- require 'spec_helper'
2
-
3
- describe 'CacheableFlash' do
4
- attr_reader :controller_class, :controller, :cookies
5
- before do
6
- @controller_class = Struct.new(:cookies, :flash)
7
- @controller_class.stub(:around_filter)
8
- @controller_class.send(:include, CacheableFlash)
9
- @controller = @controller_class.new({}, {})
10
- @cookies = {}
11
- @controller.stub(:cookies).and_return(@cookies)
12
- end
13
-
14
- describe "#write_flash_to_cookie" do
15
- context "when there is not an existing flash cookie" do
16
- it "sets the flash cookie with a JSON representation of the Hash" do
17
- expected_flash = {
18
- 'errors' => "This is an Error",
19
- 'notice' => "This is a Notice"
20
- }
21
- controller.flash = expected_flash.dup
22
- controller.write_flash_to_cookie
23
-
24
- JSON(@controller.cookies['flash']).should == expected_flash
25
- end
26
- end
27
-
28
- context "when there is an existing flash cookie" do
29
- context "when the flash cookie is valid json" do
30
- it "appends new data to existing flash cookie" do
31
- @cookies['flash'] = {
32
- 'notice' => "Existing notice",
33
- 'errors' => "Existing errors",
34
- }.to_json
35
-
36
- @controller.flash = {
37
- 'notice' => 'New notice',
38
- 'errors' => 'New errors',
39
- }
40
-
41
- @controller.write_flash_to_cookie
42
-
43
- expected_flash = {
44
- 'notice' => "Existing notice<br/>New notice",
45
- 'errors' => "Existing errors<br/>New errors",
46
- }
47
- JSON(@controller.cookies['flash']).should == expected_flash
48
- end
49
- end
50
-
51
- context "when the flash cookie is 'invalid' json" do
52
- it "does not have an error and starts with an empty Hash" do
53
- @cookies['flash'] = ""
54
- lambda do
55
- JSON(@cookies['flash'])
56
- end.should raise_error(JSON::ParserError)
57
-
58
- @controller.write_flash_to_cookie
59
-
60
- JSON(@cookies['flash']).should == {}
61
- end
62
- end
63
- end
64
-
65
- it "converts flash value to string before storing in cookie if value is a number" do
66
- @controller.flash = { 'quantity' => 5 }
67
- @controller.write_flash_to_cookie
68
- JSON(@controller.cookies['flash']).should == { 'quantity' => "5" }
69
- end
70
-
71
- it "does not convert flash value to string before storing in cookie if value is anything other than a number" do
72
- @controller.flash = { 'foo' => { 'bar' => 'baz' } }
73
- @controller.write_flash_to_cookie
74
- JSON(@controller.cookies['flash']).should == { 'foo' => { 'bar' => 'baz' } }
75
- end
76
-
77
- it "encodes plus signs in generated JSON before storing in cookie" do
78
- @controller.flash = { 'notice' => 'Life, Love + Liberty' }
79
- @controller.write_flash_to_cookie
80
- # puts "JSON::VERSION: #{JSON::VERSION}, #{JSON::VERSION >= "1.6"}"
81
- # if JSON::VERSION >= "1.6"
82
- @controller.cookies['flash'].should == "{\"notice\":\"Life, Love %2B Liberty\"}"
83
- # else
84
- # @controller.cookies['flash'].should == "{\"notice\": \"Life, Love %2B Liberty\"}"
85
- # end
86
- end
87
-
88
- it "clears the controller.flash hash provided by Rails" do
89
- flash = {
90
- 'errors' => "This is an Error",
91
- 'notice' => "This is a Notice"
92
- }
93
- @controller.flash = flash
94
- @controller.write_flash_to_cookie
95
-
96
- @controller.flash.should == {}
97
- end
98
- end
99
-
100
- describe ".included" do
101
- it "sets the around_filter on the controller to call #write_flash_to_cookie" do
102
- @controller_class.should_receive(:around_filter).with(:write_flash_to_cookie)
103
- @controller_class.send(:include, CacheableFlash)
104
- end
105
- end
106
- end
1
+ require 'spec_helper'
2
+
3
+ describe 'CacheableFlash' do
4
+ attr_reader :controller_class, :controller, :cookies
5
+ before do
6
+ @controller_class = Struct.new(:cookies, :flash)
7
+ @controller_class.stub(:around_filter)
8
+ @controller_class.send(:include, CacheableFlash)
9
+ @controller = @controller_class.new({}, {})
10
+ @cookies = {}
11
+ @controller.stub(:cookies).and_return(@cookies)
12
+ end
13
+
14
+ describe "#write_flash_to_cookie" do
15
+ context "when there is not an existing flash cookie" do
16
+ it "sets the flash cookie with a JSON representation of the Hash" do
17
+ expected_flash = {
18
+ 'errors' => "This is an Error",
19
+ 'notice' => "This is a Notice"
20
+ }
21
+ controller.flash = expected_flash.dup
22
+ controller.write_flash_to_cookie
23
+
24
+ JSON(@controller.cookies['flash']).should == expected_flash
25
+ end
26
+ end
27
+
28
+ context "when there is an existing flash cookie" do
29
+ context "when the flash cookie is valid json" do
30
+ it "appends new data to existing flash cookie" do
31
+ @cookies['flash'] = {
32
+ 'notice' => "Existing notice",
33
+ 'errors' => "Existing errors",
34
+ }.to_json
35
+
36
+ @controller.flash = {
37
+ 'notice' => 'New notice',
38
+ 'errors' => 'New errors',
39
+ }
40
+
41
+ @controller.write_flash_to_cookie
42
+
43
+ expected_flash = {
44
+ 'notice' => "Existing notice<br/>New notice",
45
+ 'errors' => "Existing errors<br/>New errors",
46
+ }
47
+ JSON(@controller.cookies['flash']).should == expected_flash
48
+ end
49
+ end
50
+
51
+ context "when the flash cookie is 'invalid' json" do
52
+ it "does not have an error and starts with an empty Hash" do
53
+ @cookies['flash'] = ""
54
+ lambda do
55
+ JSON(@cookies['flash'])
56
+ end.should raise_error(JSON::ParserError)
57
+
58
+ @controller.write_flash_to_cookie
59
+
60
+ JSON(@cookies['flash']).should == {}
61
+ end
62
+ end
63
+ end
64
+
65
+ it "converts flash value to string before storing in cookie if value is a number" do
66
+ @controller.flash = { 'quantity' => 5 }
67
+ @controller.write_flash_to_cookie
68
+ JSON(@controller.cookies['flash']).should == { 'quantity' => "5" }
69
+ end
70
+
71
+ it "does not convert flash value to string before storing in cookie if value is anything other than a number" do
72
+ @controller.flash = { 'foo' => { 'bar' => 'baz' } }
73
+ @controller.write_flash_to_cookie
74
+ JSON(@controller.cookies['flash']).should == { 'foo' => { 'bar' => 'baz' } }
75
+ end
76
+
77
+ it "encodes plus signs in generated JSON before storing in cookie" do
78
+ @controller.flash = { 'notice' => 'Life, Love + Liberty' }
79
+ @controller.write_flash_to_cookie
80
+ # puts "JSON::VERSION: #{JSON::VERSION}, #{JSON::VERSION >= "1.6"}"
81
+ # if JSON::VERSION >= "1.6"
82
+ @controller.cookies['flash'].should == "{\"notice\":\"Life, Love %2B Liberty\"}"
83
+ # else
84
+ # @controller.cookies['flash'].should == "{\"notice\": \"Life, Love %2B Liberty\"}"
85
+ # end
86
+ end
87
+
88
+ it "clears the controller.flash hash provided by Rails" do
89
+ flash = {
90
+ 'errors' => "This is an Error",
91
+ 'notice' => "This is a Notice"
92
+ }
93
+ @controller.flash = flash
94
+ @controller.write_flash_to_cookie
95
+
96
+ @controller.flash.should == {}
97
+ end
98
+
99
+ it "escapes HTML if the flash value is not html safe" do
100
+ @controller.flash = { 'quantity' => "<div>foobar</div>" }
101
+ @controller.write_flash_to_cookie
102
+ JSON(@controller.cookies['flash']).should == { 'quantity' => "&lt;div&gt;foobar&lt;/div&gt;" }
103
+ end
104
+
105
+ it "does not escape flash HTML if the value is html safe" do
106
+ @controller.flash = { 'quantity' => '<div>foobar</div>'.html_safe }
107
+ @controller.write_flash_to_cookie
108
+ JSON(@controller.cookies['flash']).should == { 'quantity' => "<div>foobar</div>" }
109
+ end
110
+ end
111
+
112
+ describe ".included" do
113
+ it "sets the around_filter on the controller to call #write_flash_to_cookie" do
114
+ @controller_class.should_receive(:around_filter).with(:write_flash_to_cookie)
115
+ @controller_class.send(:include, CacheableFlash)
116
+ end
117
+ end
118
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cacheable_flash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-21 00:00:00.000000000 Z
13
+ date: 2012-08-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -99,7 +99,7 @@ dependencies:
99
99
  requirements:
100
100
  - - ! '>='
101
101
  - !ruby/object:Gem::Version
102
- version: 1.0.21
102
+ version: 1.0.24
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
@@ -107,7 +107,7 @@ dependencies:
107
107
  requirements:
108
108
  - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
- version: 1.0.21
110
+ version: 1.0.24
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: jeweler
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -162,23 +162,21 @@ description: ! 'Allows caching of pages with flash messages by rendering flash
162
162
 
163
163
  view template. Flash contents are converted to JSON and placed in
164
164
 
165
- a cookie by an after_filter in a controller.'
165
+ a cookie by an after_filter (default) or a Rack Middleware (option).'
166
166
  email: peter.boling@gmail.com
167
167
  executables: []
168
168
  extensions: []
169
169
  extra_rdoc_files:
170
- - LICENSE.txt
170
+ - LICENSE
171
171
  - README.rdoc
172
172
  files:
173
173
  - .document
174
+ - .gitignore
174
175
  - CHANGES
175
176
  - Gemfile
176
- - Gemfile.lock
177
- - LICENSE.txt
178
- - MIT-LICENSE
177
+ - LICENSE
179
178
  - README.rdoc
180
179
  - Rakefile
181
- - VERSION
182
180
  - app/assets/images/cacheable_flash/.gitkeep
183
181
  - app/assets/javascripts/cacheable_flash/application.js
184
182
  - app/assets/stylesheets/cacheable_flash/application.css
@@ -190,7 +188,9 @@ files:
190
188
  - init.rb
191
189
  - install.rb
192
190
  - lib/cacheable_flash.rb
191
+ - lib/cacheable_flash/cookie_flash.rb
193
192
  - lib/cacheable_flash/engine.rb
193
+ - lib/cacheable_flash/middleware.rb
194
194
  - lib/cacheable_flash/railtie.rb
195
195
  - lib/cacheable_flash/version.rb
196
196
  - lib/generators/cacheable_flash/install/install_generator.rb
@@ -254,9 +254,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
254
254
  - - ! '>='
255
255
  - !ruby/object:Gem::Version
256
256
  version: '0'
257
- segments:
258
- - 0
259
- hash: -2422206270089663668
260
257
  required_rubygems_version: !ruby/object:Gem::Requirement
261
258
  none: false
262
259
  requirements:
@@ -270,4 +267,46 @@ signing_key:
270
267
  specification_version: 3
271
268
  summary: Render flash messages from a cookie using JavaScript, instead of in your
272
269
  Rails view template
273
- test_files: []
270
+ test_files:
271
+ - spec/cacheable_flash/cacheable_flash_spec.rb
272
+ - spec/cacheable_flash/install_spec.rb
273
+ - spec/cacheable_flash/test_helpers_spec.rb
274
+ - spec/controllers/dummy_controller_spec.rb
275
+ - spec/dummy/README.rdoc
276
+ - spec/dummy/Rakefile
277
+ - spec/dummy/app/assets/javascripts/application.js
278
+ - spec/dummy/app/assets/stylesheets/application.css
279
+ - spec/dummy/app/controllers/application_controller.rb
280
+ - spec/dummy/app/controllers/dummy_controller.rb
281
+ - spec/dummy/app/helpers/application_helper.rb
282
+ - spec/dummy/app/mailers/.gitkeep
283
+ - spec/dummy/app/models/.gitkeep
284
+ - spec/dummy/app/views/dummy/index.html.erb
285
+ - spec/dummy/app/views/layouts/application.html.erb
286
+ - spec/dummy/config.ru
287
+ - spec/dummy/config/application.rb
288
+ - spec/dummy/config/boot.rb
289
+ - spec/dummy/config/database.yml
290
+ - spec/dummy/config/environment.rb
291
+ - spec/dummy/config/environments/development.rb
292
+ - spec/dummy/config/environments/production.rb
293
+ - spec/dummy/config/environments/test.rb
294
+ - spec/dummy/config/initializers/backtrace_silencers.rb
295
+ - spec/dummy/config/initializers/inflections.rb
296
+ - spec/dummy/config/initializers/mime_types.rb
297
+ - spec/dummy/config/initializers/secret_token.rb
298
+ - spec/dummy/config/initializers/session_store.rb
299
+ - spec/dummy/config/initializers/wrap_parameters.rb
300
+ - spec/dummy/config/locales/en.yml
301
+ - spec/dummy/config/routes.rb
302
+ - spec/dummy/lib/assets/.gitkeep
303
+ - spec/dummy/log/.gitkeep
304
+ - spec/dummy/public/404.html
305
+ - spec/dummy/public/422.html
306
+ - spec/dummy/public/500.html
307
+ - spec/dummy/public/favicon.ico
308
+ - spec/dummy/script/rails
309
+ - spec/js_unit/cookie_test.html
310
+ - spec/js_unit/flash_test.html
311
+ - spec/spec_helper.rb
312
+ - spec/support/test_helpers.rb
@@ -1,132 +0,0 @@
1
- GEM
2
- specs:
3
- actionmailer (3.1.3)
4
- actionpack (= 3.1.3)
5
- mail (~> 2.3.0)
6
- actionpack (3.1.3)
7
- activemodel (= 3.1.3)
8
- activesupport (= 3.1.3)
9
- builder (~> 3.0.0)
10
- erubis (~> 2.7.0)
11
- i18n (~> 0.6)
12
- rack (~> 1.3.5)
13
- rack-cache (~> 1.1)
14
- rack-mount (~> 0.8.2)
15
- rack-test (~> 0.6.1)
16
- sprockets (~> 2.0.3)
17
- activemodel (3.1.3)
18
- activesupport (= 3.1.3)
19
- builder (~> 3.0.0)
20
- i18n (~> 0.6)
21
- activerecord (3.1.3)
22
- activemodel (= 3.1.3)
23
- activesupport (= 3.1.3)
24
- arel (~> 2.2.1)
25
- tzinfo (~> 0.3.29)
26
- activeresource (3.1.3)
27
- activemodel (= 3.1.3)
28
- activesupport (= 3.1.3)
29
- activesupport (3.1.3)
30
- multi_json (~> 1.0)
31
- arel (2.2.1)
32
- builder (3.0.0)
33
- diff-lcs (1.1.3)
34
- erubis (2.7.0)
35
- git (1.2.5)
36
- hike (1.2.1)
37
- i18n (0.6.0)
38
- jeweler (1.8.3)
39
- bundler (~> 1.0)
40
- git (>= 1.2.5)
41
- rake
42
- rdoc
43
- jquery-rails (1.0.19)
44
- railties (~> 3.0)
45
- thor (~> 0.14)
46
- json (1.7.3)
47
- mail (2.3.0)
48
- i18n (>= 0.4.0)
49
- mime-types (~> 1.16)
50
- treetop (~> 1.4.8)
51
- mime-types (1.19)
52
- multi_json (1.3.6)
53
- polyglot (0.3.3)
54
- rack (1.3.6)
55
- rack-cache (1.2)
56
- rack (>= 0.4)
57
- rack-mount (0.8.3)
58
- rack (>= 1.0.0)
59
- rack-ssl (1.3.2)
60
- rack
61
- rack-test (0.6.1)
62
- rack (>= 1.0)
63
- rails (3.1.3)
64
- actionmailer (= 3.1.3)
65
- actionpack (= 3.1.3)
66
- activerecord (= 3.1.3)
67
- activeresource (= 3.1.3)
68
- activesupport (= 3.1.3)
69
- bundler (~> 1.0)
70
- railties (= 3.1.3)
71
- railties (3.1.3)
72
- actionpack (= 3.1.3)
73
- activesupport (= 3.1.3)
74
- rack-ssl (~> 1.3.2)
75
- rake (>= 0.8.7)
76
- rdoc (~> 3.4)
77
- thor (~> 0.14.6)
78
- rake (0.9.2.2)
79
- rdoc (3.12)
80
- json (~> 1.4)
81
- reek (1.2.12)
82
- ripper_ruby_parser (~> 0.0.7)
83
- ruby2ruby (~> 1.2.5)
84
- ruby_parser (~> 2.0)
85
- sexp_processor (~> 3.0)
86
- ripper_ruby_parser (0.0.7)
87
- sexp_processor (~> 3.0)
88
- roodi (2.1.0)
89
- ruby_parser
90
- rspec (2.10.0)
91
- rspec-core (~> 2.10.0)
92
- rspec-expectations (~> 2.10.0)
93
- rspec-mocks (~> 2.10.0)
94
- rspec-core (2.10.1)
95
- rspec-expectations (2.10.0)
96
- diff-lcs (~> 1.1.3)
97
- rspec-mocks (2.10.1)
98
- rspec-rails (2.10.1)
99
- actionpack (>= 3.0)
100
- activesupport (>= 3.0)
101
- railties (>= 3.0)
102
- rspec (~> 2.10.0)
103
- ruby2ruby (1.2.5)
104
- ruby_parser (~> 2.0)
105
- sexp_processor (~> 3.0)
106
- ruby_parser (2.3.1)
107
- sexp_processor (~> 3.0)
108
- sexp_processor (3.2.0)
109
- sprockets (2.0.3)
110
- hike (~> 1.2)
111
- rack (~> 1.0)
112
- tilt (~> 1.1, != 1.3.0)
113
- thor (0.14.6)
114
- tilt (1.3.3)
115
- treetop (1.4.10)
116
- polyglot
117
- polyglot (>= 0.3.1)
118
- tzinfo (0.3.33)
119
-
120
- PLATFORMS
121
- ruby
122
-
123
- DEPENDENCIES
124
- bundler (>= 1.0.21)
125
- jeweler (>= 1.6.4)
126
- jquery-rails
127
- json
128
- rails (~> 3.1.3)
129
- rdoc (>= 3.12)
130
- reek (>= 1.2.8)
131
- roodi (>= 2.1.0)
132
- rspec-rails (>= 2.8.0)
@@ -1,21 +0,0 @@
1
- Copyright (c) 2007-2010 Pivotal Labs
2
- Copyright (c) 2011 Peter H. Boling (http://peterboling.com)
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining
5
- a copy of this software and associated documentation files (the
6
- "Software"), to deal in the Software without restriction, including
7
- without limitation the rights to use, copy, modify, merge, publish,
8
- distribute, sublicense, and/or sell copies of the Software, and to
9
- permit persons to whom the Software is furnished to do so, subject to
10
- the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.7