est 0.2 → 0.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/.rultor.yml +3 -0
- data/bin/est +7 -3
- data/lib/est/version.rb +1 -1
- metadata +1 -1
data/.rultor.yml
CHANGED
@@ -4,6 +4,7 @@ assets:
|
|
4
4
|
|
5
5
|
install: |
|
6
6
|
sudo gem install pdd
|
7
|
+
sudo gem install est
|
7
8
|
|
8
9
|
release:
|
9
10
|
script: |
|
@@ -18,3 +19,5 @@ release:
|
|
18
19
|
s3cmd --no-progress put est.xml --config=../s3cfg s3://pdd.teamed.io/est.xml
|
19
20
|
s3cmd --no-progress put assets/est.xsd --acl-public --config=../s3cfg s3://est-xsd.teamed.io/${tag}.xsd
|
20
21
|
s3cmd --no-progress put assets/est.xsl --acl-public --config=../s3cfg s3://est-xsl.teamed.io/${tag}.xsl
|
22
|
+
est --dir=./est --format=xml --file=est-estimate.xml
|
23
|
+
s3cmd --no-progress put est-estimate.xml --config=../s3cfg s3://est.teamed.io/est.xml
|
data/bin/est
CHANGED
@@ -67,14 +67,19 @@ end
|
|
67
67
|
|
68
68
|
Encoding.default_external = Encoding::UTF_8
|
69
69
|
Encoding.default_internal = Encoding::UTF_8
|
70
|
-
|
70
|
+
if opts.file?
|
71
|
+
file = File.new(opts[:file], 'w')
|
72
|
+
Est.log.info "output saving into #{file.path}"
|
73
|
+
else
|
74
|
+
file = STDOUT
|
75
|
+
end
|
71
76
|
output = Est::Base.new(opts).xml
|
72
77
|
if opts[:format].nil? || opts[:format] == 'text'
|
73
78
|
xslt = File.join(
|
74
79
|
File.dirname(File.dirname(__FILE__)),
|
75
80
|
'assets', 'est-text.xsl'
|
76
81
|
)
|
77
|
-
output = Nokogiri::XSLT(File.read(xslt)).
|
82
|
+
output = Nokogiri::XSLT(File.read(xslt)).apply_to(Nokogiri::XML(output))
|
78
83
|
elsif opts[:format] == 'html'
|
79
84
|
Est.log.info 'using HTML format'
|
80
85
|
xslt = File.join(
|
@@ -88,4 +93,3 @@ else
|
|
88
93
|
fail 'invalid format, use html, text, or xml'
|
89
94
|
end
|
90
95
|
file << output
|
91
|
-
Est.log.info "output saved into #{file}"
|
data/lib/est/version.rb
CHANGED