cacheable_flash 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,4 +1,7 @@
1
- 0.2.0 by Peter Boling
1
+ 0.2.1
2
+ - Fixed bug in generator for those not using asset pipeline, or pre Rails 3.1
3
+
4
+ 0.2.0 [Peter Boling begins gemification process]
2
5
  - Converted to a gem
3
6
  - Updated to improved, patched jquery.cookie from https://github.com/pboling/jquery-cookie
4
7
  - Merged a few other forks of cacheable-flash
data/README.rdoc CHANGED
@@ -20,13 +20,16 @@ gem 'cacheable_flash'
20
20
 
21
21
  == Setup
22
22
 
23
- CacheableFlash adds its javascript dependencies as a Rails 3 javascript 'expansion',
24
- which are only used is you are Note using the asset pipeline (apparently?).
23
+ === Without asset pipeline, or pre-Rails 3.1:
25
24
 
26
- So if you have config.assets.enabled = false in application.rb then in your layout:
27
- javascript_include_tag :cacheable_flash
25
+ rails generate cacheable_flash:install
28
26
 
29
- Otherwise, the asset pipeline should have access to the assets in this gem in your app/assets/application.js:
27
+ In your layout:
28
+ javascript_include_tag 'flash', 'jquery.cookie'
29
+
30
+ === With asset pipeline (requires Rails 3.1)
31
+
32
+ The asset pipeline should have access to the assets in this gem via your app/assets/application.js:
30
33
 
31
34
  //= require flash
32
35
  //= require jquery.cookie
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cacheable_flash"
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Peter H. Boling", "Brian Takita"]
@@ -3,6 +3,7 @@ module CacheableFlash
3
3
  require 'cacheable_flash/rails/railtie'
4
4
  elsif ::Rails.version >= "3.1"
5
5
  require 'cacheable_flash/rails/engine'
6
+ require 'cacheable_flash/rails/railtie'
6
7
  else
7
8
  # For older rails use generator
8
9
  end
@@ -8,17 +8,17 @@ module CacheableFlash
8
8
  #
9
9
  # @todo Test with Rails 3.0
10
10
  class InstallGenerator < Rails::Generators::Base
11
- source_root File.expand_path('../../../../vendor/assets/javascripts', __FILE__)
12
- class_option :template_engine
11
+ source_root File.expand_path('../../../../../vendor/assets/javascripts/', __FILE__)
13
12
 
14
13
  # Rails 3.1 has the asset pipeline, no need to copy javascript files anymore
15
14
  # Rails 3.0 doesn't have an asset pipeline, so we copy in javascript files
16
- if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR == 0
17
- desc "Copies some JS files to public/javascripts/"
18
- def copy_files
19
- template 'flash.js', 'public/javascripts/flash.js'
20
- template 'jquery.cookie.js', 'public/javascripts/jquery.cookie.js'
21
- end
15
+ if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR == 1
16
+ ActiveSupport::Deprecation.warn("Rails 3.1 has the asset pipeline, so you only need to copy javascript files if you aren't using it.")
17
+ end
18
+ desc "Copies some JS files to public/javascripts/"
19
+ def copy_files
20
+ template 'flash.js', 'public/javascripts/flash.js'
21
+ template 'jquery.cookie.js', 'public/javascripts/jquery.cookie.js'
22
22
  end
23
23
  end
24
24
  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.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2011-09-10 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
- requirement: &70270132209960 !ruby/object:Gem::Requirement
17
+ requirement: &70234939822020 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70270132209960
25
+ version_requirements: *70234939822020
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: actionpack
28
- requirement: &70270132209460 !ruby/object:Gem::Requirement
28
+ requirement: &70234939821480 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70270132209460
36
+ version_requirements: *70234939821480
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: json
39
- requirement: &70270132208960 !ruby/object:Gem::Requirement
39
+ requirement: &70234939821000 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70270132208960
47
+ version_requirements: *70234939821000
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &70270132208460 !ruby/object:Gem::Requirement
50
+ requirement: &70234939820480 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 2.3.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70270132208460
58
+ version_requirements: *70234939820480
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: yard
61
- requirement: &70270132207920 !ruby/object:Gem::Requirement
61
+ requirement: &70234939820000 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 0.6.0
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70270132207920
69
+ version_requirements: *70234939820000
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: bundler
72
- requirement: &70270132207420 !ruby/object:Gem::Requirement
72
+ requirement: &70234939819500 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.0.0
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *70270132207420
80
+ version_requirements: *70234939819500
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: jeweler
83
- requirement: &70270132206920 !ruby/object:Gem::Requirement
83
+ requirement: &70234939819000 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 1.6.4
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70270132206920
91
+ version_requirements: *70234939819000
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: reek
94
- requirement: &70270132206360 !ruby/object:Gem::Requirement
94
+ requirement: &70234939818500 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ~>
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: 1.2.8
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *70270132206360
102
+ version_requirements: *70234939818500
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: roodi
105
- requirement: &70270132205880 !ruby/object:Gem::Requirement
105
+ requirement: &70234939818000 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,7 +110,7 @@ dependencies:
110
110
  version: 2.1.0
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *70270132205880
113
+ version_requirements: *70234939818000
114
114
  description: ! 'This plugin enables greater levels of page caching by rendering flash
115
115
 
116
116
  messages from a cookie using JavaScript, instead of in your Rails
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  segments:
167
167
  - 0
168
- hash: -1173852377275099503
168
+ hash: -2798967149316645572
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  none: false
171
171
  requirements: