project_initializer 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 +4 -4
- data/bin/initialize +4 -0
- data/config/html.yml +35 -0
- data/lib/project_initializer.rb +15 -16
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 241724cbdc5dd7af88711d97ee6ec343143f2b6d
|
4
|
+
data.tar.gz: ed32f88c133dfdbc02f33551ae6e264fc0afa613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c696602bd1e1aa277cfc27b8b31b69af599f7378910717e1fd161988a99facfb6958aa21cb9d81084650fb1833946ac65f35d751fc8bf187063578c1d4d0ab75
|
7
|
+
data.tar.gz: 8c5052cfa4710cb2c44f030f3592bdea0f300499459001259dc50d309c9889ebe3c5656453a1639fdb5336bf5a3a5b9318ac0e62777695498be15c44d6351270
|
data/bin/initialize
ADDED
data/config/html.yml
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
css/style.css: >
|
2
|
+
.wraper {
|
3
|
+
display: block;
|
4
|
+
width: auto;
|
5
|
+
height: auto;
|
6
|
+
}
|
7
|
+
js/script.js: >
|
8
|
+
index.html: >
|
9
|
+
<!DOCTYPE html>
|
10
|
+
<html>
|
11
|
+
<head>
|
12
|
+
<meta charset="utf-8">
|
13
|
+
<title>EXAMPLE TITLE</title>
|
14
|
+
<!-- Bootstrap -->
|
15
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
16
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
17
|
+
<!-- JQuery -->
|
18
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
19
|
+
<!-- Custom CSS -->
|
20
|
+
<link rel="stylesheet" type="text/css" href="css/style.css">
|
21
|
+
<!-- Custom JS -->
|
22
|
+
<script src="js/script.js"></script>
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
<div class="wraper">
|
26
|
+
<div class="header"></div>
|
27
|
+
<div class="main">
|
28
|
+
<div class="sidebar"></div>
|
29
|
+
<div class="content"></div>
|
30
|
+
<div class="a-sidebar"></div>
|
31
|
+
</div>
|
32
|
+
<div class="footer"></div>
|
33
|
+
</div>
|
34
|
+
</body>
|
35
|
+
</html>
|
data/lib/project_initializer.rb
CHANGED
@@ -1,21 +1,20 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
|
3
3
|
class ProjectInitializer
|
4
|
-
def self.call
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
# end
|
4
|
+
def self.call(argv, a_path)
|
5
|
+
if argv.include?('html')
|
6
|
+
thing = YAML.load_file("#{__dir__}/../config/html.yml")
|
7
|
+
thing.keys.each do |key|
|
8
|
+
path = key.split('/')
|
9
|
+
_path = "#{a_path}/"
|
10
|
+
path[0...-1].each do |folder|
|
11
|
+
Dir.mkdir("#{_path}#{folder}")
|
12
|
+
_path += "#{folder}/"
|
13
|
+
File.open(key, 'w') do |file_content|
|
14
|
+
file_content.write(thing[key])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
20
19
|
end
|
21
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: project_initializer
|
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
|
- sorefull
|
@@ -13,10 +13,13 @@ dependencies: []
|
|
13
13
|
description: Gem for initializing different projects, html for start. For a future
|
14
14
|
I want to add another templates.
|
15
15
|
email: olegh.cherednichenko@icloud.com
|
16
|
-
executables:
|
16
|
+
executables:
|
17
|
+
- initialize
|
17
18
|
extensions: []
|
18
19
|
extra_rdoc_files: []
|
19
20
|
files:
|
21
|
+
- bin/initialize
|
22
|
+
- config/html.yml
|
20
23
|
- lib/project_initializer.rb
|
21
24
|
homepage: http://rubygems.org/gems/project_initializer
|
22
25
|
licenses:
|