global_assets 0.0.0 → 0.0.1
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 +8 -8
- data/lib/global_assets.rb +17 -15
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGE0ODRjNzI3M2JiNzljM2JiZTU3NTdkMjc0ZWJhNzllNTRjYmI1NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmQ2YzhiZTc0OGJjNTcxZDk3ZTNkM2QyZDc0NDYwZGIyMzZhOGJhYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmU2NGFlNWU3MGRiNjJjNGY5ZjM2ZDZmMWUxMzMxOTYyOTJiNDM5MjI4YmRi
|
10
|
+
ZDhkNTY3NWNiY2MyOWJkMWI5NjNlYzIxOTJmNDJhYWViYjFmOTc2MDI2NDg4
|
11
|
+
Yjk3YmNjNWFhNmM3ZDZmMzk2ZWY4MDI5YzZiYTVkZTQ0YmRlNjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTRlNWFlNmVjNGM1OWZjODU2OTJlOTZmYzRhMDU2ODdmZTg1OWY3ZjUwMDE4
|
14
|
+
ZjQ5OThlMmY5MTg3ZTUzMTRlNmI3NDZkZjBjZDhjZjI2Nzg2NWQxYTBhMTIw
|
15
|
+
NmJiNTZmMGU5NzRlZGJmYzlmMzhlMWQ1MzQ1MmYxYjA5NjlkYTc=
|
data/lib/global_assets.rb
CHANGED
@@ -28,17 +28,25 @@ class GlobalAssets
|
|
28
28
|
def move_global_files
|
29
29
|
# delete all 3 target directories
|
30
30
|
puts "Wiping old global directories..."
|
31
|
-
[settings[:target_js], settings[:
|
32
|
-
|
33
|
-
|
31
|
+
[settings[:target_js], settings[:target_css], settings[:target_img]].each do |dir|
|
32
|
+
if dir
|
33
|
+
FileUtils.rm_rf(dir)
|
34
|
+
FileUtils.mkdir_p(dir)
|
35
|
+
end
|
34
36
|
end
|
35
37
|
# copy over all 3 source directories to the target dirs
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
if settings[:target_js]
|
39
|
+
puts "Moving global JS..."
|
40
|
+
FileUtils.cp_r(File.join(settings[:source_dir], "js/."), settings[:target_js])
|
41
|
+
end
|
42
|
+
if settings[:target_css]
|
43
|
+
puts "Moving global CSS..."
|
44
|
+
FileUtils.cp_r(File.join(settings[:source_dir], "css/."), settings[:target_css])
|
45
|
+
end
|
46
|
+
if settings[:target_img]
|
47
|
+
puts "Moving global Images..."
|
48
|
+
FileUtils.cp_r(File.join(settings[:source_dir], "img/."), settings[:target_img])
|
49
|
+
end
|
42
50
|
end
|
43
51
|
|
44
52
|
def set(key, val)
|
@@ -59,9 +67,3 @@ class GlobalAssets
|
|
59
67
|
end
|
60
68
|
end
|
61
69
|
end
|
62
|
-
|
63
|
-
__END__
|
64
|
-
|
65
|
-
require './lib/global_assets'
|
66
|
-
class EMEGlobalAssets; include GlobalAssets; end
|
67
|
-
EMEGlobalAssets.snippet(:test)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: global_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Reister
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -24,8 +24,8 @@ dependencies:
|
|
24
24
|
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: Share
|
28
|
-
repo.
|
27
|
+
description: Share HTML snippets, JS, CSS/SASS, and images between all your projects
|
28
|
+
via personal gem/git repo.
|
29
29
|
email:
|
30
30
|
- chris@chrisreister.com
|
31
31
|
executables: []
|