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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 788dc11470bcf005a872de74625413df4734a170
4
- data.tar.gz: bca2f2b89fe416ea9c3ceb7e2a98cdcc3ca1a24d
3
+ metadata.gz: 241724cbdc5dd7af88711d97ee6ec343143f2b6d
4
+ data.tar.gz: ed32f88c133dfdbc02f33551ae6e264fc0afa613
5
5
  SHA512:
6
- metadata.gz: ed1d7218900e6513b84a49d3669ff6bc7847a36580dd230f56f9d3120ea430736d418adcf5186209867263ca7916ab6a04231459ba5229cc69a6b7c3ac42a0b9
7
- data.tar.gz: 807ba685cc420bae81ca6ebb5288775151fba8b12360fb4e2b382d211bfb4cb9d88d4462b636a41f1cf6d3037ea9725f313c091914e40e72bd61e18957b80c73
6
+ metadata.gz: c696602bd1e1aa277cfc27b8b31b69af599f7378910717e1fd161988a99facfb6958aa21cb9d81084650fb1833946ac65f35d751fc8bf187063578c1d4d0ab75
7
+ data.tar.gz: 8c5052cfa4710cb2c44f030f3592bdea0f300499459001259dc50d309c9889ebe3c5656453a1639fdb5336bf5a3a5b9318ac0e62777695498be15c44d6351270
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require 'project_initializer'
3
+
4
+ ProjectInitializer.call(ARGV, Dir.pwd)
@@ -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>
@@ -1,21 +1,20 @@
1
1
  require 'yaml'
2
2
 
3
3
  class ProjectInitializer
4
- def self.call
5
- puts 'CALLED'
6
- # thing = YAML.load_file('files.yml')
7
- # if ARGV.include?('init')
8
- # thing.keys.each do |key|
9
- # path = key.split('/')
10
- # _path = './'
11
- # path[0...-1].each do |folder|
12
- # Dir.mkdir("#{_path}#{folder}")
13
- # _path += "#{folder}/"
14
- # end
15
- # File.open(key, 'w') do |file_content|
16
- # file_content.write(thing[key])
17
- # end
18
- # end
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.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: