Skip to content

Commit

Permalink
Move from vendor to app because of rails 4 (rails/rails#7968)
Browse files Browse the repository at this point in the history
  • Loading branch information
reflection committed Aug 7, 2013
1 parent 53251c8 commit 55f6d67
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions designmodo-flatuipro-rails.gemspec
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'jquery-ui-rails', '>= 4.0.3'
spec.post_install_message = "" \
"**********************************************\n\n" \
"One *must* run the `rails generate flatuipro:install <Flat UI Pro Directory>` generator\n" \
"when gem updated to support new FLat UI Pro version\n\n" \
"One *must* run `rails generate flatuipro:install <Flat UI Pro Directory>`\n" \
"when gem updated\n\n" \
"**********************************************"
end
2 changes: 1 addition & 1 deletion lib/designmodo/flatuipro/rails.rb
Expand Up @@ -8,7 +8,7 @@ class Engine < ::Rails::Engine
:after => 'less-rails.after.load_config_initializers',
:group => :all do |app|
if defined?(Less)
app.config.less.paths << File.join(config.root, 'vendor', 'less')
app.config.less.paths << File.join(config.root, 'app', 'less')
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/generators/flatuipro/demo/demo_generator.rb
Expand Up @@ -5,11 +5,11 @@ module Flatuipro
module Generators
class DemoGenerator < Rails::Generators::Base
desc "Setup Flat UI Pro Demo page."
source_root File.expand_path("../../../../../vendor/assets/demo", __FILE__)
source_root File.expand_path("../../../../../app/assets/demo", __FILE__)

# Detect if Flat UI Pro assets copied over to gem
def check_flatuipro_install
unless File.exist?(File.expand_path("../../../../../vendor/assets", __FILE__))
unless File.exist?(File.expand_path("../../../../../app/assets", __FILE__))
raise "Please run install generator first"
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/generators/flatuipro/install/install_generator.rb
Expand Up @@ -9,7 +9,7 @@ class InstallGenerator < Rails::Generators::Base
source_root File.expand_path("../templates", __FILE__)

def copy_assets
gem_assets_dir = File.expand_path("../../../../../vendor/assets", __FILE__)
gem_assets_dir = File.expand_path("../../../../../app/assets", __FILE__)
pro_dir = flatuipro_dir

unless File.exist?(File.join(pro_dir, "index.html"))
Expand Down Expand Up @@ -83,7 +83,7 @@ def add_assets
end

def patch_assets
gem_assets_dir = File.expand_path("../../../../../vendor/assets", __FILE__)
gem_assets_dir = File.expand_path("../../../../../app/assets", __FILE__)

# Stylesheets patches
# image url() -> image-url()
Expand Down

0 comments on commit 55f6d67

Please sign in to comment.