neutral 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47e943ceb407adc760f1479e7182d92ff5aee8a8
|
|
4
|
+
data.tar.gz: 50b736f3249bdcb0503edfdf12d3bf1832690bd0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7605723d401c0910676a5b8d2fddc03530b468815200fa454754dcc809c7aa3efb4fee9b0348b8103ef8096c4a87070472e06f6b80e595b7dcb501a02711265a
|
|
7
|
+
data.tar.gz: 59cdfe876d341064ff5db1344c70902af07369d2f4638f8088b86b674d5f6d4a693d1f18483252978bd4005776ce7dc41a6f46782bf1ee7c9aed8b597c35e5e1
|
data/Gemfile.lock
CHANGED
|
@@ -26,7 +26,7 @@ module Neutral
|
|
|
26
26
|
if File.binread(css_format[0]).include? "require neutral"
|
|
27
27
|
say_status "skipped", "insert into '#{css_format[0]}'", :yellow
|
|
28
28
|
else
|
|
29
|
-
|
|
29
|
+
insert_into_css
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -35,6 +35,14 @@ module Neutral
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
private
|
|
38
|
+
def insert_into_css
|
|
39
|
+
if File.binread(css_format[0]).include? "require_self"
|
|
40
|
+
insert_into_file css_format[0], "\n#{css_format[1]} require neutral\n", after: /require_self/
|
|
41
|
+
else
|
|
42
|
+
prepend_to_file css_format[0], "/*\n#{css_format[1]} require neutral\n*/\n"
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
38
46
|
def self.next_migration_number(dirname)
|
|
39
47
|
if ActiveRecord::Base.timestamped_migrations
|
|
40
48
|
Time.now.utc.strftime("%Y%m%d%H%M%S%6N")
|
|
@@ -18,7 +18,7 @@ module Neutral
|
|
|
18
18
|
|
|
19
19
|
def remove_stylesheet
|
|
20
20
|
if File.binread(css_format[0]).include? "require neutral"
|
|
21
|
-
gsub_file css_format[0],
|
|
21
|
+
gsub_file css_format[0], /#{css_format[1]} require neutral/, ""
|
|
22
22
|
else
|
|
23
23
|
say_status("skipped", "remove from '#{css_format[0]}'", :yellow)
|
|
24
24
|
end
|
data/lib/neutral/version.rb
CHANGED