est 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/.rultor.yml +3 -0
  2. data/bin/est +7 -3
  3. data/lib/est/version.rb +1 -1
  4. 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
- file = opts.file? ? File.new(opts[:file], 'w') : STDOUT
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)).transform(Nokogiri::XML(output))
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
@@ -26,5 +26,5 @@
26
26
  # Copyright:: Copyright (c) 2014 Yegor Bugayenko
27
27
  # License:: MIT
28
28
  module Est
29
- VERSION = '0.2'
29
+ VERSION = '0.2.1'
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: est
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: