cells-rails 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/.travis.yml +12 -5
- data/CHANGES.md +4 -0
- data/Gemfile +6 -0
- data/Rakefile +3 -1
- data/cells-rails.gemspec +3 -2
- data/lib/cell/helper/asset_helper.rb +1 -0
- data/lib/cell/rails.rb +16 -2
- data/lib/cell/railtie.rb +3 -0
- data/lib/cells/rails/version.rb +1 -1
- metadata +25 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: aa3ea94e1736e966b7e4c6c806a5d365f2b867db223e8983977e7b072ab946cf
|
4
|
+
data.tar.gz: 8d30523f1e3d94e39ba6e7f232a244e90806ba8f54882a59ac2ebeeba504cbca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df3193f4b68ffb810f0eb43d49309a76b9f37e194c61e5ea5509834eac38bf5d2378fd353eaf0646abb4edec4dd8adf015ea91ff87229633f5619fce0b5bbfff
|
7
|
+
data.tar.gz: 9212656c2c365cb2d37bb3b0a4b4c82bde2cce86fa5e0af70d4ff97c11a9fd86c3b57376f894a6971b7c854c5edf69599e7d98101026d695e8fe38d0e36ea664
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,13 +1,20 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
+
- 2.5.0
|
4
|
+
- 2.4.3
|
3
5
|
- 2.3
|
4
6
|
- 2.2
|
5
7
|
- 2.1
|
6
8
|
- 2.0.0
|
7
9
|
- 1.9.3
|
8
10
|
- jruby-19mode
|
9
|
-
|
10
|
-
-
|
11
|
-
-
|
12
|
-
|
13
|
-
|
11
|
+
env:
|
12
|
+
- "RAILS_VERSION=4.2"
|
13
|
+
- "RAILS_VERSION=5.0"
|
14
|
+
matrix:
|
15
|
+
fast_finish: true
|
16
|
+
exclude:
|
17
|
+
- rvm: 2.1.10
|
18
|
+
env: "RAILS_VERSION=5.0"
|
19
|
+
- rvm: 2.4.0
|
20
|
+
env: "RAILS_VERSION=4.2"
|
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
@@ -8,6 +8,12 @@ gemspec
|
|
8
8
|
# gem 'sass-rails', "~> 4.0.3"#, " ~> 3.1.0"
|
9
9
|
# gem "sprockets", "~> 2.12.3"
|
10
10
|
|
11
|
+
rails_version = ENV['RAILS_VERSION'] || '5.0'
|
12
|
+
gem "railties", "~> #{rails_version}"
|
13
|
+
gem "activerecord", "~> #{rails_version}"
|
14
|
+
|
15
|
+
gem "my_engine", path: "test/rails#{rails_version}/engines/my_engine"
|
16
|
+
|
11
17
|
group :development, :test do
|
12
18
|
gem "minitest-spec-rails"
|
13
19
|
gem "capybara_minitest_spec"
|
data/Rakefile
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/testtask"
|
3
3
|
|
4
|
+
RAILS_VERSION = ENV['RAILS_VERSION'] || '5.0'
|
5
|
+
|
4
6
|
Rake::TestTask.new(:test) do |t|
|
5
7
|
t.libs << "test"
|
6
8
|
t.libs << "lib"
|
7
|
-
t.test_files = FileList[
|
9
|
+
t.test_files = FileList["test/rails#{RAILS_VERSION}/**/*_test.rb"]
|
8
10
|
end
|
9
11
|
|
10
12
|
task :default => :test
|
data/cells-rails.gemspec
CHANGED
@@ -21,9 +21,10 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency "actionpack", ">= 3.0"
|
22
22
|
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler"
|
25
|
-
spec.add_development_dependency "rake"
|
24
|
+
spec.add_development_dependency "bundler"
|
25
|
+
spec.add_development_dependency "rake"
|
26
26
|
spec.add_development_dependency "minitest"
|
27
27
|
spec.add_development_dependency "rails"
|
28
28
|
spec.add_development_dependency "cells-erb"
|
29
|
+
spec.add_development_dependency "sass-rails"
|
29
30
|
end
|
data/lib/cell/rails.rb
CHANGED
@@ -45,9 +45,9 @@ module Cell
|
|
45
45
|
# include ActionController::RequestForgeryProtection
|
46
46
|
included do
|
47
47
|
extend Uber::Delegates
|
48
|
-
delegates :parent_controller, :session, :params, :request, :config, :env, :url_options
|
48
|
+
delegates :parent_controller, :session, :params, :request, :config, :env, :url_options, :default_url_options
|
49
49
|
# forgery protection.
|
50
|
-
delegates :parent_controller, :
|
50
|
+
delegates :parent_controller, :request_forgery_protection_token
|
51
51
|
end
|
52
52
|
|
53
53
|
def call(*)
|
@@ -67,6 +67,20 @@ module Cell
|
|
67
67
|
::ActionController::Base.cache_store
|
68
68
|
end
|
69
69
|
|
70
|
+
# In Ruby 2.4.0+, Forwardable prints a warning when you delegate
|
71
|
+
# to a private or protected method - so `delegates :protect_against_forgery?`
|
72
|
+
# or `delegates :form_authenticity_token` will print warnings all
|
73
|
+
# over the place
|
74
|
+
#
|
75
|
+
# This workaround prevents warnings being printed
|
76
|
+
def protect_against_forgery?
|
77
|
+
controller.send(:protect_against_forgery?)
|
78
|
+
end
|
79
|
+
|
80
|
+
def form_authenticity_token(*args)
|
81
|
+
controller.send(:form_authenticity_token, *args)
|
82
|
+
end
|
83
|
+
|
70
84
|
module ClassMethods
|
71
85
|
def expand_cache_key(key)
|
72
86
|
::ActiveSupport::Cache.expand_cache_key(key, :cells)
|
data/lib/cell/railtie.rb
CHANGED
@@ -14,6 +14,9 @@ module Cell
|
|
14
14
|
|
15
15
|
# ruthlessly stolen from the zurb-foundation gem.
|
16
16
|
initializer "cells.update_asset_paths" do |app|
|
17
|
+
# Add Rails.root to view_paths
|
18
|
+
Cell::ViewModel.view_paths = [Rails.root.join("app", "cells")]
|
19
|
+
|
17
20
|
Array(app.config.cells.with_assets).each do |cell_class|
|
18
21
|
# puts "@@@@@ #{cell_class.camelize.constantize.prefixes}"
|
19
22
|
app.config.assets.paths += cell_class.camelize.constantize.prefixes # Song::Cell.prefixes
|
data/lib/cells/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cells-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cells
|
@@ -48,30 +48,30 @@ dependencies:
|
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rake
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: minitest
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,6 +114,20 @@ dependencies:
|
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: sass-rails
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
117
131
|
description:
|
118
132
|
email:
|
119
133
|
- apotonick@gmail.com
|
@@ -175,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
189
|
version: '0'
|
176
190
|
requirements: []
|
177
191
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.
|
192
|
+
rubygems_version: 2.7.3
|
179
193
|
signing_key:
|
180
194
|
specification_version: 4
|
181
195
|
summary: Convenient Rails support for Cells.
|