tamebou 0.0.2 → 0.0.3

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: 6cdb56ad5fbd46ce7bd91b2ca9a2d56ada5dbdec
4
- data.tar.gz: 5b5f33e3dc4a952364b6a0e2e49fb5b91b603692
3
+ metadata.gz: 8af5b5b306b31cc8c543b0176bd88436ffed24eb
4
+ data.tar.gz: b34ec9b9120a789d7670e96624f66c202b7835f3
5
5
  SHA512:
6
- metadata.gz: f07347a5aeff0edc8db70de5addaa065a2ad1538d320ab4904f990c78b0ff10f1c2adeb3583f7226238fb450c5b3b8597a2acd2bae579a89200a78d79b286031
7
- data.tar.gz: e5809d9339b8d8900e24aa7e4e9365e7a14da920cb2fffd57c0620c364e7bc5bad2fb41a54d8966a88a6f6849aa50b23941d3659578571affb3f39df4a592021
6
+ metadata.gz: 489b186541cbe1c4c6b18c856cbd117cc4d3b77064a2f31e7cb15cf95b40abf7d0f7b9a3d4abeeb48a515feac2e2234d34a68fcf809ed43ae33b0d2ae8a4e85e
7
+ data.tar.gz: a37325b0b3ff24d5edaa33cca6f3d1a7789bf51af5635ca62c91d1a0c93565ced413f0144372f021b10b69562bd14deac519731054e52971f74adefa7e5c9e27
@@ -1,3 +1,3 @@
1
1
  module Tamebou
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,7 +1,19 @@
1
1
  module Tamebou
2
2
  class Writer
3
- def initialize(path, template='../templates/minitest.txt.erb', is_warning_parse_failure=false)
4
- @path = path
3
+ module DefaultTemplate
4
+ MINITEST = 1
5
+ RSPEC = 2
6
+ end
7
+
8
+ def initialize(path, template_path=DefaultTemplate::MINITEST, is_warning_parse_failure=false)
9
+ @path = case template_path
10
+ when DefaultTemplate::MINITEST
11
+ File.join(File.dirname(__FILE__), '../templates/minitest.txt.erb')
12
+ when DefaultTemplate::RSPEC
13
+ File.join(File.dirname(__FILE__), '../templates/rspec.txt.erb')
14
+ else
15
+ template_path
16
+ end
5
17
  @is_warning_parse_failure = is_warning_parse_failure
6
18
  @template = template
7
19
  set_model_name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tamebou
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - woshidan