golf 0.3.6 → 0.3.7

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.
data/lib/golf/cli.rb CHANGED
@@ -32,12 +32,13 @@ module Golf
32
32
  if name.include?('.')
33
33
  component_name = name.split('.').last
34
34
  package_name = name.gsub('.','/').split('/')[0...-1].join('/')
35
+ create_file "golfapp/components/#{package_name}/#{component_name}/#{component_name}.html" do
36
+ File.read(File.expand_path("../../../templates/component/Component.html", __FILE__))
37
+ end
35
38
  else
36
- component_name = name
37
- package_name = name
38
- end
39
- create_file "golfapp/components/#{package_name}/#{component_name}.html" do
40
- File.read(File.expand_path("../../../templates/component/Component.html", __FILE__))
39
+ create_file "golfapp/components/#{name}/#{name}.html" do
40
+ File.read(File.expand_path("../../../templates/component/Component.html", __FILE__))
41
+ end
41
42
  end
42
43
  end
43
44
  end
data/lib/golf/compiler.rb CHANGED
@@ -42,6 +42,9 @@ module Golf
42
42
  Dir["#{dir}/**/*.#{type}"].each do |path|
43
43
  if type == "html"
44
44
  name = package_name(path)
45
+ arr = path.split('/')
46
+ last_two = arr.slice(arr.length - 2 ,2)
47
+ next if last_two[0] != last_two[1].gsub('.html','')
45
48
  else
46
49
  name = path.split('/').last.gsub(".#{type}",'')
47
50
  end
data/lib/golf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Golf
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: golf
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.6
5
+ version: 0.3.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Micha Niskin, Alan Dipert, Julio Capote