architecture-js 0.3.7 → 0.3.8
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/VERSION +1 -1
- data/architecture-js.gemspec +1 -1
- data/lib/architecture-js/generator.rb +1 -1
- data/spec/generator_spec.rb +3 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.8
|
data/architecture-js.gemspec
CHANGED
@@ -53,7 +53,7 @@ module ArchitectureJS
|
|
53
53
|
def generate_file(filename, template, path = nil)
|
54
54
|
path ||= File.expand_path(Dir.getwd)
|
55
55
|
File.open("#{path}/#{filename}", "w+") { |f| f.write template }
|
56
|
-
puts ArchitectureJS::Notification.added "#{filename}
|
56
|
+
puts ArchitectureJS::Notification.added "#{filename} added" if File.exists?("#{path}/#{filename}")
|
57
57
|
end
|
58
58
|
|
59
59
|
def render_template(template, filename, arguments, options)
|
data/spec/generator_spec.rb
CHANGED
@@ -45,13 +45,14 @@ describe ArchitectureJS::Generator do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
it 'should generate a file from a template' do
|
48
|
-
@gen.generate_file("test.js", @gen.render_template("test_template_two", "test", [], {}), TMP_DIR)
|
48
|
+
suppress_output { @gen.generate_file("test.js", @gen.render_template("test_template_two", "test", [], {}), TMP_DIR) }
|
49
49
|
File.exists?("#{TMP_DIR}/test.js").should be_true
|
50
50
|
File.open("#{TMP_DIR}/test.js").read.should == File.open("#{FIXTURES}/test_template_two.js").read
|
51
51
|
end
|
52
52
|
|
53
53
|
it 'should pass the arguments to the template' do
|
54
|
-
@gen.generate_file("env-test.js", @gen.render_template("env_template", "env-test", ['module', 'foo', '-f', '--name', 'Something'], {}), TMP_DIR)
|
54
|
+
suppress_output { @gen.generate_file("env-test.js", @gen.render_template("env_template", "env-test", ['module', 'foo', '-f', '--name', 'Something'], {}), TMP_DIR) }
|
55
55
|
File.open("#{TMP_DIR}/env-test.js").read.should == File.open("#{FIXTURES}/env-test.js").read
|
56
56
|
end
|
57
|
+
|
57
58
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: architecture-js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -272,7 +272,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
272
272
|
version: '0'
|
273
273
|
segments:
|
274
274
|
- 0
|
275
|
-
hash:
|
275
|
+
hash: -3369947198155868797
|
276
276
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
277
277
|
none: false
|
278
278
|
requirements:
|