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 +4 -4
- data/lib/modular.rb +14 -1
- data/lib/modular/version.rb +1 -1
- data/lib/tasks/install.rake +20 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3edf87ad594f8d23073dad2852335782df49218
|
4
|
+
data.tar.gz: 283d728fc30a467def50af5c4697565b0e343c18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdcb295883f486cd512dee86745629c08d108dcbf06a41e2c49f00392021018fd7269bb056f132e4a4bf901d8bf1dd510b4019ed66c72134200af944ad726296
|
7
|
+
data.tar.gz: d3a93be6a7648e5c51be3330b9b1c097ed1e1a4c2d03438819f4a8d57205b1667f3fbb840ada59a159799df6b9643b97ff2880e3c52ba55672c5be2f66527d9d
|
data/lib/modular.rb
CHANGED
@@ -5,5 +5,18 @@ unless defined?(Sass)
|
|
5
5
|
end
|
6
6
|
|
7
7
|
module Modular
|
8
|
-
|
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
|
data/lib/modular/version.rb
CHANGED
@@ -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.
|
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: ''
|