ggem 1.2.0 → 1.2.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.
- data/Gemfile.lock +1 -1
- data/lib/ggem/template.rb +1 -0
- data/lib/ggem/version.rb +1 -1
- data/test/gem_test.rb +17 -5
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/lib/ggem/template.rb
CHANGED
@@ -45,6 +45,7 @@ module GGem
|
|
45
45
|
output_file = File.join(@gem.root_path, @gem.name, output)
|
46
46
|
|
47
47
|
if File.exists?(source_file)
|
48
|
+
FileUtils.mkdir_p(File.dirname(output_file))
|
48
49
|
erb = ERB.new(File.read(source_file))
|
49
50
|
File.open(output_file, 'w') {|f| f << erb.result(binding) }
|
50
51
|
else
|
data/lib/ggem/version.rb
CHANGED
data/test/gem_test.rb
CHANGED
@@ -30,23 +30,35 @@ module GGem
|
|
30
30
|
end
|
31
31
|
|
32
32
|
class SaveTest < GGemTest
|
33
|
-
|
33
|
+
NS_SIMPLE = GGem::NameSet::Simple.new
|
34
|
+
NS_UNDER = GGem::NameSet::Underscored.new
|
35
|
+
NS_HYPHEN = GGem::NameSet::HyphenatedOther.new
|
34
36
|
|
35
37
|
desc "after it's been saved"
|
36
38
|
setup_once do
|
37
39
|
FileUtils.mkdir_p(TMP_PATH)
|
38
|
-
Gem.new(TMP_PATH,
|
40
|
+
Gem.new(TMP_PATH, NS_SIMPLE.variations.first).save
|
41
|
+
Gem.new(TMP_PATH, NS_UNDER.variations.first).save
|
42
|
+
Gem.new(TMP_PATH, NS_HYPHEN.variations.first).save
|
39
43
|
end
|
40
44
|
teardown_once do
|
41
45
|
FileUtils.rm_rf(TMP_PATH)
|
42
46
|
end
|
43
47
|
|
44
|
-
should create_paths((
|
45
|
-
File.join(TMP_PATH,
|
48
|
+
should create_paths((NS_SIMPLE.expected_folders + NS_SIMPLE.expected_files).collect do |p|
|
49
|
+
File.join(TMP_PATH, NS_SIMPLE.name, p)
|
50
|
+
end)
|
51
|
+
|
52
|
+
should create_paths((NS_UNDER.expected_folders + NS_UNDER.expected_files).collect do |p|
|
53
|
+
File.join(TMP_PATH, NS_UNDER.name, p)
|
54
|
+
end)
|
55
|
+
|
56
|
+
should create_paths((NS_HYPHEN.expected_folders + NS_HYPHEN.expected_files).collect do |p|
|
57
|
+
File.join(TMP_PATH, NS_HYPHEN.name, p)
|
46
58
|
end)
|
47
59
|
|
48
60
|
should "init a git repo in the gem path" do
|
49
|
-
assert File.exists?(File.join(TMP_PATH,
|
61
|
+
assert File.exists?(File.join(TMP_PATH, NS_SIMPLE.name, '.git')), ".git repo config doesn't exist"
|
50
62
|
end
|
51
63
|
end
|
52
64
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ggem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 1
|
10
|
+
version: 1.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kelly Redding
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-03-
|
18
|
+
date: 2012-03-20 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
type: :development
|