ettu 3.2.0 → 4.0.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +32 -17
- data/ROADMAP.md +1 -1
- data/ettu.gemspec +5 -4
- data/lib/ettu/configuration.rb +18 -28
- data/lib/ettu/fresh_when.rb +14 -4
- data/lib/ettu/railtie.rb +11 -0
- data/lib/ettu/version.rb +1 -1
- data/lib/ettu.rb +16 -4
- data/spec/{ettu/ettu_spec.rb → ettu_spec.rb} +45 -69
- data/spec/fixtures.rb +52 -0
- data/spec/fresh_when_spec.rb +46 -0
- data/spec/spec_helper.rb +10 -19
- metadata +26 -94
- data/spec/controllers/users_controller_spec.rb +0 -66
- data/spec/dummy/.gitignore +0 -3
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/javascripts/test.js +0 -1
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -11
- data/spec/dummy/app/controllers/users_controller.rb +0 -9
- data/spec/dummy/app/models/user.rb +0 -12
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/app/views/users/index.html.erb +0 -1
- data/spec/dummy/config/application.rb +0 -65
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/environment.rb +0 -9
- data/spec/dummy/config/environments/test.rb +0 -35
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -10
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/.keep +0 -0
- data/spec/dummy/public/assets/application-5d535630590bf232c0d869f6b8fa6479.js +0 -15
- data/spec/dummy/public/assets/application-5d535630590bf232c0d869f6b8fa6479.js.gz +0 -0
- data/spec/dummy/public/assets/application-e1e25f5530998b76317739a1762b3401.css +0 -14
- data/spec/dummy/public/assets/application-e1e25f5530998b76317739a1762b3401.css.gz +0 -0
- data/spec/dummy/public/assets/application.css +0 -14
- data/spec/dummy/public/assets/application.css.gz +0 -0
- data/spec/dummy/public/assets/application.js +0 -15
- data/spec/dummy/public/assets/application.js.gz +0 -0
- data/spec/dummy/public/assets/manifest.yml +0 -5
- data/spec/dummy/script/rails +0 -6
- data/spec/ettu/fresh_when_spec.rb +0 -28
- data/spec/support/fixtures.rb +0 -38
- data/spec/support/include_hash.rb +0 -5
- data/spec/support/memory_store.rb +0 -9
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ettu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Ridgewell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2013-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,44 +16,44 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
33
|
+
version: '1.3'
|
34
|
+
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '>='
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: simplecov
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '>='
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description:
|
83
|
+
description: Account for js, css, and views when using ETags.
|
84
84
|
email: jridgewell@cloudspace.com
|
85
85
|
executables: []
|
86
86
|
extensions: []
|
@@ -100,44 +100,10 @@ files:
|
|
100
100
|
- lib/ettu/fresh_when.rb
|
101
101
|
- lib/ettu/railtie.rb
|
102
102
|
- lib/ettu/version.rb
|
103
|
-
- spec/
|
104
|
-
- spec/
|
105
|
-
- spec/
|
106
|
-
- spec/dummy/app/assets/javascripts/application.js
|
107
|
-
- spec/dummy/app/assets/javascripts/test.js
|
108
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
109
|
-
- spec/dummy/app/controllers/application_controller.rb
|
110
|
-
- spec/dummy/app/controllers/users_controller.rb
|
111
|
-
- spec/dummy/app/models/user.rb
|
112
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
113
|
-
- spec/dummy/app/views/users/index.html.erb
|
114
|
-
- spec/dummy/config.ru
|
115
|
-
- spec/dummy/config/application.rb
|
116
|
-
- spec/dummy/config/boot.rb
|
117
|
-
- spec/dummy/config/environment.rb
|
118
|
-
- spec/dummy/config/environments/test.rb
|
119
|
-
- spec/dummy/config/initializers/secret_token.rb
|
120
|
-
- spec/dummy/config/initializers/session_store.rb
|
121
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
122
|
-
- spec/dummy/config/locales/en.yml
|
123
|
-
- spec/dummy/config/routes.rb
|
124
|
-
- spec/dummy/db/.keep
|
125
|
-
- spec/dummy/public/assets/application-5d535630590bf232c0d869f6b8fa6479.js
|
126
|
-
- spec/dummy/public/assets/application-5d535630590bf232c0d869f6b8fa6479.js.gz
|
127
|
-
- spec/dummy/public/assets/application-e1e25f5530998b76317739a1762b3401.css
|
128
|
-
- spec/dummy/public/assets/application-e1e25f5530998b76317739a1762b3401.css.gz
|
129
|
-
- spec/dummy/public/assets/application.css
|
130
|
-
- spec/dummy/public/assets/application.css.gz
|
131
|
-
- spec/dummy/public/assets/application.js
|
132
|
-
- spec/dummy/public/assets/application.js.gz
|
133
|
-
- spec/dummy/public/assets/manifest.yml
|
134
|
-
- spec/dummy/script/rails
|
135
|
-
- spec/ettu/ettu_spec.rb
|
136
|
-
- spec/ettu/fresh_when_spec.rb
|
103
|
+
- spec/ettu_spec.rb
|
104
|
+
- spec/fixtures.rb
|
105
|
+
- spec/fresh_when_spec.rb
|
137
106
|
- spec/spec_helper.rb
|
138
|
-
- spec/support/fixtures.rb
|
139
|
-
- spec/support/include_hash.rb
|
140
|
-
- spec/support/memory_store.rb
|
141
107
|
homepage: http://github.com/cloudspace/ettu
|
142
108
|
licenses:
|
143
109
|
- MIT
|
@@ -158,46 +124,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
124
|
version: '0'
|
159
125
|
requirements: []
|
160
126
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.0.
|
127
|
+
rubygems_version: 2.0.0
|
162
128
|
signing_key:
|
163
129
|
specification_version: 4
|
164
|
-
summary:
|
130
|
+
summary: Account for view code when using ETags.
|
165
131
|
test_files:
|
166
|
-
- spec/
|
167
|
-
- spec/
|
168
|
-
- spec/
|
169
|
-
- spec/dummy/app/assets/javascripts/application.js
|
170
|
-
- spec/dummy/app/assets/javascripts/test.js
|
171
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
172
|
-
- spec/dummy/app/controllers/application_controller.rb
|
173
|
-
- spec/dummy/app/controllers/users_controller.rb
|
174
|
-
- spec/dummy/app/models/user.rb
|
175
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
176
|
-
- spec/dummy/app/views/users/index.html.erb
|
177
|
-
- spec/dummy/config.ru
|
178
|
-
- spec/dummy/config/application.rb
|
179
|
-
- spec/dummy/config/boot.rb
|
180
|
-
- spec/dummy/config/environment.rb
|
181
|
-
- spec/dummy/config/environments/test.rb
|
182
|
-
- spec/dummy/config/initializers/secret_token.rb
|
183
|
-
- spec/dummy/config/initializers/session_store.rb
|
184
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
185
|
-
- spec/dummy/config/locales/en.yml
|
186
|
-
- spec/dummy/config/routes.rb
|
187
|
-
- spec/dummy/db/.keep
|
188
|
-
- spec/dummy/public/assets/application-5d535630590bf232c0d869f6b8fa6479.js
|
189
|
-
- spec/dummy/public/assets/application-5d535630590bf232c0d869f6b8fa6479.js.gz
|
190
|
-
- spec/dummy/public/assets/application-e1e25f5530998b76317739a1762b3401.css
|
191
|
-
- spec/dummy/public/assets/application-e1e25f5530998b76317739a1762b3401.css.gz
|
192
|
-
- spec/dummy/public/assets/application.css
|
193
|
-
- spec/dummy/public/assets/application.css.gz
|
194
|
-
- spec/dummy/public/assets/application.js
|
195
|
-
- spec/dummy/public/assets/application.js.gz
|
196
|
-
- spec/dummy/public/assets/manifest.yml
|
197
|
-
- spec/dummy/script/rails
|
198
|
-
- spec/ettu/ettu_spec.rb
|
199
|
-
- spec/ettu/fresh_when_spec.rb
|
132
|
+
- spec/ettu_spec.rb
|
133
|
+
- spec/fixtures.rb
|
134
|
+
- spec/fresh_when_spec.rb
|
200
135
|
- spec/spec_helper.rb
|
201
|
-
- spec/support/fixtures.rb
|
202
|
-
- spec/support/include_hash.rb
|
203
|
-
- spec/support/memory_store.rb
|
@@ -1,66 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
4
|
-
# It demonstrates how one might use RSpec to specify the controller code that
|
5
|
-
# was generated by Rails when you ran the scaffold generator.
|
6
|
-
#
|
7
|
-
# It assumes that the implementation code is generated by the rails scaffold
|
8
|
-
# generator. If you are using any extension libraries to generate different
|
9
|
-
# controller code, this generated spec may or may not pass.
|
10
|
-
#
|
11
|
-
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
12
|
-
# of tools you can use to make these specs even more expressive, but we're
|
13
|
-
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
14
|
-
#
|
15
|
-
# Compared to earlier versions of this generator, there is very limited use of
|
16
|
-
# stubs and message expectations in this spec. Stubs are only used when there
|
17
|
-
# is no simpler way to get a handle on the object needed for the example.
|
18
|
-
# Message expectations are only used when there is no simpler way to specify
|
19
|
-
# that an instance is receiving a specific message.
|
20
|
-
|
21
|
-
describe UsersController do
|
22
|
-
|
23
|
-
describe 'Integration Test' do
|
24
|
-
before(:each) { get :index }
|
25
|
-
subject(:hash) { assigns(:user) }
|
26
|
-
subject(:user) { User.instance }
|
27
|
-
|
28
|
-
it 'returns fresh_when hash' do
|
29
|
-
expect(hash).to be_a(Hash)
|
30
|
-
end
|
31
|
-
|
32
|
-
describe 'hash[:etag]' do
|
33
|
-
subject(:etags) { hash[:etag] }
|
34
|
-
|
35
|
-
it 'sets :etag to array' do
|
36
|
-
expect(etags).to be_a(Array)
|
37
|
-
end
|
38
|
-
|
39
|
-
it 'includes records cache_key' do
|
40
|
-
expect(etags).to include(user.cache_key)
|
41
|
-
end
|
42
|
-
|
43
|
-
it 'includes all views digest' do
|
44
|
-
path = controller.request.path_parameters
|
45
|
-
page = ::CacheDigests::TemplateDigestor.cache.keys.first
|
46
|
-
|
47
|
-
expect(page).to match(/#{path['controller']}\/#{path['action']}/)
|
48
|
-
expect(etags).to include(::CacheDigests::TemplateDigestor.cache.fetch(page))
|
49
|
-
end
|
50
|
-
|
51
|
-
it 'includes all asset digests' do
|
52
|
-
expect(etags).to include(*(Rails.application.config.assets.digests.values.uniq))
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
describe 'hash[:last_modified]' do
|
57
|
-
subject(:last_modified) { hash[:last_modified] }
|
58
|
-
|
59
|
-
it 'sets last_modified to records updated_at' do
|
60
|
-
expect(last_modified).to eq(user.updated_at)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
data/spec/dummy/.gitignore
DELETED
data/spec/dummy/Rakefile
DELETED
@@ -1,7 +0,0 @@
|
|
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
|
-
Dummy::Application.load_tasks
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// the compiled file.
|
9
|
-
//
|
10
|
-
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
-
// GO AFTER THE REQUIRES BELOW.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
14
|
-
|
15
|
-
var test = true;
|
@@ -1 +0,0 @@
|
|
1
|
-
var test2 = true;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|
@@ -1 +0,0 @@
|
|
1
|
-
<h1>Users Index</h1>
|
@@ -1,65 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
# Pick the frameworks you want:
|
4
|
-
# require "active_record/railtie"
|
5
|
-
require "action_controller/railtie"
|
6
|
-
require "action_mailer/railtie"
|
7
|
-
require "active_resource/railtie"
|
8
|
-
require "sprockets/railtie"
|
9
|
-
# require "rails/test_unit/railtie"
|
10
|
-
|
11
|
-
Bundler.require(*Rails.groups)
|
12
|
-
require "ettu"
|
13
|
-
|
14
|
-
module Dummy
|
15
|
-
class Application < Rails::Application
|
16
|
-
# Settings in config/environments/* take precedence over those specified here.
|
17
|
-
# Application configuration should go into files in config/initializers
|
18
|
-
# -- all .rb files in that directory are automatically loaded.
|
19
|
-
|
20
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
21
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
22
|
-
|
23
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
24
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
25
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
26
|
-
|
27
|
-
# Activate observers that should always be running.
|
28
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
29
|
-
|
30
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
31
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
32
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
33
|
-
|
34
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
35
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
36
|
-
# config.i18n.default_locale = :de
|
37
|
-
|
38
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
39
|
-
config.encoding = "utf-8"
|
40
|
-
|
41
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
42
|
-
config.filter_parameters += [:password]
|
43
|
-
|
44
|
-
# Enable escaping HTML in JSON.
|
45
|
-
config.active_support.escape_html_entities_in_json = true
|
46
|
-
|
47
|
-
# Use SQL instead of Active Record's schema dumper when creating the database.
|
48
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
49
|
-
# like if you have constraints or database-specific column types
|
50
|
-
# config.active_record.schema_format = :sql
|
51
|
-
|
52
|
-
# Enforce whitelist mode for mass assignment.
|
53
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
54
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
55
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
56
|
-
# config.active_record.whitelist_attributes = true
|
57
|
-
|
58
|
-
# Enable the asset pipeline
|
59
|
-
config.assets.enabled = true
|
60
|
-
|
61
|
-
# Version of your assets, change this if you want to expire all your assets
|
62
|
-
config.assets.version = '1.0'
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
data/spec/dummy/config/boot.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.serve_static_assets = true
|
12
|
-
config.static_cache_control = "public, max-age=3600"
|
13
|
-
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
|
-
# Show full error reports and disable caching
|
18
|
-
config.consider_all_requests_local = true
|
19
|
-
config.action_controller.perform_caching = false
|
20
|
-
|
21
|
-
# Raise exceptions instead of rendering exception templates
|
22
|
-
config.action_dispatch.show_exceptions = false
|
23
|
-
|
24
|
-
# Disable request forgery protection in test environment
|
25
|
-
config.action_controller.allow_forgery_protection = false
|
26
|
-
|
27
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
-
# The :test delivery method accumulates sent emails in the
|
29
|
-
# ActionMailer::Base.deliveries array.
|
30
|
-
config.action_mailer.delivery_method = :test
|
31
|
-
|
32
|
-
|
33
|
-
# Print deprecation notices to the stderr
|
34
|
-
config.active_support.deprecation = :stderr
|
35
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies 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
|
-
Dummy::Application.config.secret_token = 'c73defd757d28e3dcebf7d902e6acbb1ec4f5b3587ba7218092142a469af71e50d8cbac772c8963ac4eace9945e6d570cbf6526ca48a76eba528f8e4d0dd9b5f'
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
-
|
5
|
-
# Use the database for sessions instead of the cookie-based default,
|
6
|
-
# which shouldn't be used to store highly confidential information
|
7
|
-
# (create the session table with "rails generate session_migration")
|
8
|
-
# Dummy::Application.config.session_store :active_record_store
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
#
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
9
|
-
end
|
10
|
-
|
data/spec/dummy/config/routes.rb
DELETED
data/spec/dummy/config.ru
DELETED
data/spec/dummy/db/.keep
DELETED
File without changes
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// the compiled file.
|
9
|
-
//
|
10
|
-
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
-
// GO AFTER THE REQUIRES BELOW.
|
12
|
-
//
|
13
|
-
|
14
|
-
|
15
|
-
var test = true;
|
Binary file
|
@@ -1,14 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
|
12
|
-
|
13
|
-
*/
|
14
|
-
|
Binary file
|
@@ -1,14 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
|
12
|
-
|
13
|
-
*/
|
14
|
-
|
Binary file
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// the compiled file.
|
9
|
-
//
|
10
|
-
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
-
// GO AFTER THE REQUIRES BELOW.
|
12
|
-
//
|
13
|
-
|
14
|
-
|
15
|
-
var test = true;
|
Binary file
|
@@ -1,5 +0,0 @@
|
|
1
|
-
---
|
2
|
-
application.js: application-5d535630590bf232c0d869f6b8fa6479.js
|
3
|
-
application/index.js: application-5d535630590bf232c0d869f6b8fa6479.js
|
4
|
-
application.css: application-e1e25f5530998b76317739a1762b3401.css
|
5
|
-
application/index.css: application-e1e25f5530998b76317739a1762b3401.css
|
data/spec/dummy/script/rails
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
-
|
4
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
6
|
-
require 'rails/commands'
|
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
|
4
|
-
describe Ettu::FreshWhen do
|
5
|
-
before(:all) do
|
6
|
-
Ettu.configure { |config| config.template_digestor = Digestor }
|
7
|
-
end
|
8
|
-
|
9
|
-
after(:all) do
|
10
|
-
Ettu.configure { |config| config.reset }
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:record) { Record.new(DateTime.now) }
|
14
|
-
let(:hash) { { random: true, options: true } }
|
15
|
-
subject(:controller) { Controller.new }
|
16
|
-
|
17
|
-
it 'passes nil as the first argument to original fresh_when' do
|
18
|
-
ret = controller.fresh_when record, hash
|
19
|
-
|
20
|
-
expect(ret[0]).to equal(nil)
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'passes extra options to original fresh_when' do
|
24
|
-
ret = controller.fresh_when record, hash
|
25
|
-
|
26
|
-
expect(ret[1]).to include_hash(hash)
|
27
|
-
end
|
28
|
-
end
|