modular-grid 0.0.10 → 0.0.12

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
2
  SHA1:
3
- metadata.gz: 96c751a5f23a68a596180513fbd6a37a5283965d
4
- data.tar.gz: f8e792375164aa50b0bfa973245229fd567775e7
3
+ metadata.gz: c3edf87ad594f8d23073dad2852335782df49218
4
+ data.tar.gz: 283d728fc30a467def50af5c4697565b0e343c18
5
5
  SHA512:
6
- metadata.gz: 7051b65369024e9b3dd74c9fcb04a4a76bc51e1ca07f8da893c31640ee9b347202f8c37e15fb999491afda28cbf32a0f51639b36f893227f646f0b63941ffabc
7
- data.tar.gz: 33f7809131d7854646199ec200291f43487d748cc452727d37410759873a48e9f5a0b1790e604afcb0cc14951460fd310c5bd8e6ae94669dfeec5bba0a99595f
6
+ metadata.gz: bdcb295883f486cd512dee86745629c08d108dcbf06a41e2c49f00392021018fd7269bb056f132e4a4bf901d8bf1dd510b4019ed66c72134200af944ad726296
7
+ data.tar.gz: d3a93be6a7648e5c51be3330b9b1c097ed1e1a4c2d03438819f4a8d57205b1667f3fbb840ada59a159799df6b9643b97ff2880e3c52ba55672c5be2f66527d9d
@@ -5,5 +5,18 @@ unless defined?(Sass)
5
5
  end
6
6
 
7
7
  module Modular
8
- Sass.load_paths << File.expand_path("../../app/assets/stylesheets", __FILE__)
8
+ if defined?(Rails) && defined?(Rails::Engine)
9
+ class Engine < ::Rails::Engine
10
+ require 'modular/engine'
11
+ end
12
+
13
+ module Rails
14
+ class Railtie < ::Rails::Railtie
15
+ rake_tasks do
16
+ load "tasks/install.rake"
17
+ end
18
+ end
19
+ else
20
+ Sass.load_paths << File.expand_path("../../app/assets/stylesheets", __FILE__)
21
+ end
9
22
  end
@@ -1,3 +1,3 @@
1
1
  module Modular
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -0,0 +1,20 @@
1
+ # Needed for pre-3.1.
2
+
3
+ require "fileutils"
4
+ require "find"
5
+
6
+ namespace :modular do
7
+ desc "Move files to the Rails assets directory."
8
+ task :install, [:sass_path] do |t, args|
9
+ args.with_defaults(:sass_path => 'public/stylesheets/sass')
10
+ source_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
11
+ FileUtils.mkdir_p("#{Rails.root}/#{args.sass_path}/modular")
12
+ FileUtils.cp_r("#{source_root}/app/assets/stylesheets/.", "#{Rails.root}/#{args.sass_path}/modular", { :preserve => true })
13
+ Find.find("#{Rails.root}/#{args.sass_path}/modular") do |path|
14
+ if path.end_with?(".css.scss")
15
+ path_without_css_extension = path.gsub(/\.css\.scss$/, ".scss")
16
+ FileUtils.mv(path, path_without_css_extension)
17
+ end
18
+ end
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modular-grid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Wreggelsworth
@@ -86,6 +86,7 @@ files:
86
86
  - lib/modular.rb
87
87
  - lib/modular/engine.rb
88
88
  - lib/modular/version.rb
89
+ - lib/tasks/install.rake
89
90
  - modular.gemspec
90
91
  - package.json
91
92
  homepage: ''