barthes 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,2 +1,18 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
+ desc 'vup'
4
+ task :vup do
5
+ version = ENV['VERSION']
6
+ File.open('lib/barthes/version.rb', 'w') do |f|
7
+ f.write <<-EOF
8
+ module Barthes
9
+ VERSION = "#{version}"
10
+ end
11
+ EOF
12
+ end
13
+ system "git add lib/barthes/version.rb"
14
+ system "git commit -m 'version up to #{version}'"
15
+ system "git push origin master"
16
+ system "rake build"
17
+ system "gem push pkg/barthes-#{version}.gem"
18
+ end
@@ -45,6 +45,9 @@ module Barthes
45
45
  end
46
46
 
47
47
  def extract(config, response)
48
+ if config['xpath']
49
+ xpath(response, config['xpath']).text
50
+ end
48
51
  end
49
52
 
50
53
  def xpath(response, xpath)
@@ -1,3 +1,3 @@
1
1
  module Barthes
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barthes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: