Skip to content

Commit

Permalink
Merge 164c441 into 0473938
Browse files Browse the repository at this point in the history
  • Loading branch information
bricesanchez committed Jun 2, 2018
2 parents 0473938 + 164c441 commit fd306d8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions core/app/helpers/refinery/tag_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def refinery_help_tag(title='Tip')
# This is just a quick wrapper to render an image tag that lives inside refinery/icons.
# They are all 16x16 so this is the default but is able to be overriden with supplied options.
def refinery_icon_tag(filename, options = {})
Refinery.deprecate('Refinery::TagHelper.refinery_icon_tag', when: '4.1', replacement: 'Refinery::TagHelper.action_icon')

filename = "#{filename}.png" unless filename.split('.').many?
path = image_path "refinery/icons/#{filename}", skip_pipeline: true
image_tag path, {:width => 16, :height => 16}.merge(options)
Expand Down
4 changes: 3 additions & 1 deletion core/lib/generators/refinery/dummy/dummy_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def self.source_paths
end

PASSTHROUGH_OPTIONS = [
:skip_active_record, :skip_javascript, :skip_action_cable, :skip_action_mailer, :database, :javascript, :quiet, :pretend, :force, :skip
:skip_active_record, :skip_javascript, :skip_action_cable, :skip_action_mailer, :skip_active_storage, :database,
:javascript, :quiet, :pretend, :force, :skip
]

def generate_test_dummy
Expand All @@ -24,6 +25,7 @@ def generate_test_dummy
opts[:skip_bundle] = true
opts[:skip_action_cable] = true
opts[:skip_action_mailer] = true
opts[:skip_active_storage] = true

invoke Rails::Generators::AppGenerator, [ File.expand_path(dummy_path, destination_root) ], opts
end
Expand Down
2 changes: 1 addition & 1 deletion core/refinerycms-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require File.expand_path('../../core/lib/refinery/version', __FILE__)

version = Refinery::Version.to_s
rails_version = ['>= 5.1.0', '< 5.2']
rails_version = ['>= 5.2.0', '< 6']

Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
Expand Down
2 changes: 1 addition & 1 deletion core/spec/controllers/refinery/sitemap_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Refinery
it "shows a valid xml response" do
get :index

expect(response).to be_success
expect(response).to be_successful
end
end
end
2 changes: 1 addition & 1 deletion core/spec/helpers/refinery/tag_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Refinery
end

it "wraps image_tag with some options preset" do
expect(helper.refinery_icon_tag("ugis.ozols.jpg")).to xml_eq(%Q{<img alt="Ugis.ozols" height="16" src="/images/refinery/icons/ugis.ozols.jpg" width="16" />})
expect(helper.refinery_icon_tag("ugis.ozols.jpg", { alt: "Ugis.ozols"})).to xml_eq(%Q{<img alt="Ugis.ozols" height="16" src="/images/refinery/icons/ugis.ozols.jpg" width="16" />})
end
end

Expand Down
6 changes: 3 additions & 3 deletions core/spec/lib/generators/refinery/cms/cms_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ module Refinery
end

def copy_routes
routes = File.join(Gem.loaded_specs['railties'].full_gem_path, 'lib', 'rails', 'generators', 'rails', 'app', 'templates', 'config', 'routes.rb')
routes = File.join(Gem.loaded_specs['railties'].
full_gem_path, 'lib', 'rails', 'generators', 'rails', 'app', 'templates', 'config', 'routes.rb.tt')
destination = File.join(destination_root, "config")

FileUtils.mkdir_p(destination)
FileUtils.cp routes, destination
FileUtils.cp routes, File.join(destination, "routes.rb")
end

end
end

0 comments on commit fd306d8

Please sign in to comment.