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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c14edde2815318b76d6600a5d9990d01453450aa
4
- data.tar.gz: f9ab15d2448aea4ddc811e5a8df2b4394cbf8368
2
+ SHA256:
3
+ metadata.gz: aa3ea94e1736e966b7e4c6c806a5d365f2b867db223e8983977e7b072ab946cf
4
+ data.tar.gz: 8d30523f1e3d94e39ba6e7f232a244e90806ba8f54882a59ac2ebeeba504cbca
5
5
  SHA512:
6
- metadata.gz: cc631beedab021077e9989779e8d7db92e411863521ead73daea5adb2f0dde685fdae628df903bc6dedc030de70e7835f4467f17f4ae82079cf1abac44f71d8e
7
- data.tar.gz: 02213c556a58b2f3e8ba7d2a5a41d3425ba9192ef92c779f54001e8e603f9b9d79bd15d94add724bcf3b6bb9913ba412e5f95d3d63c6e61c1d0899f5f2231618
6
+ metadata.gz: df3193f4b68ffb810f0eb43d49309a76b9f37e194c61e5ea5509834eac38bf5d2378fd353eaf0646abb4edec4dd8adf015ea91ff87229633f5619fce0b5bbfff
7
+ data.tar.gz: 9212656c2c365cb2d37bb3b0a4b4c82bde2cce86fa5e0af70d4ff97c11a9fd86c3b57376f894a6971b7c854c5edf69599e7d98101026d695e8fe38d0e36ea664
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /log
11
+ /test/tmp
@@ -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
- gemfile:
10
- - gemfiles/rails4.2.gemfile
11
- - gemfiles/rails4.1.gemfile
12
- - gemfiles/rails4.0.gemfile
13
- - gemfiles/rails3.2.gemfile
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
@@ -1,3 +1,7 @@
1
+ ## 0.0.9
2
+
3
+ * Prevent Forwardable from printing warnings in Ruby 2.4+
4
+
1
5
  ## 0.0.8
2
6
 
3
7
  * Fix testing for `rspec-cells` in combination with Rails 5.1. Thanks @tiagoamaro.
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['test/**/*_test.rb']
9
+ t.test_files = FileList["test/rails#{RAILS_VERSION}/**/*_test.rb"]
8
10
  end
9
11
 
10
12
  task :default => :test
@@ -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", "~> 1.10"
25
- spec.add_development_dependency "rake", "~> 10.0"
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
@@ -15,6 +15,7 @@ module Cell
15
15
  asset_path
16
16
  asset_url
17
17
  image_tag
18
+ video_tag
18
19
  audio_path
19
20
  audio_url
20
21
  compute_asset_extname
@@ -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, :protect_against_forgery?, :form_authenticity_token, :request_forgery_protection_token
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)
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Cells
2
2
  module Rails
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
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.8
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: 2017-05-10 00:00:00.000000000 Z
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: '1.10'
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: '1.10'
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: '10.0'
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: '10.0'
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.6.3
192
+ rubygems_version: 2.7.3
179
193
  signing_key:
180
194
  specification_version: 4
181
195
  summary: Convenient Rails support for Cells.