Skip to content

Commit

Permalink
fixed version output to not include library type
Browse files Browse the repository at this point in the history
  • Loading branch information
jsand-minimal committed Sep 24, 2015
1 parent c331c4f commit 46ca03e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
#require "bundler/gem_tasks"
#require 'rake/extensiontask'
require 'rake/testtask'
require 'pry'

Rake::TestTask.new do |t|
t.libs << 'test'
t.test_files = FileList['test/*/*.rb'] | FileList['test/*/*/*.rb']
t.options = '-p'
end

task :package do
prys = `grep -Rn ^[^#]*pry lib/*`
if prys.length > 0
puts "Gem packaging failed: please remove all prys" and return
end

`rm wovnrb-*`
`bundle exec gem build wovnrb.gemspec`
`bundle exec gem push wovnrb-*`
`rm wovnrb-*`
end

desc 'Run tests'
task :default => :test

Expand Down
2 changes: 1 addition & 1 deletion lib/wovnrb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def switch_lang(body, values, url, lang=STORE.settings['default_lang'], headers)
insert_node = Nokogiri::XML::Node.new('script', d)
insert_node['src'] = '//j.wovn.io/0'
version = defined?(VERSION) ? VERSION : ''
insert_node['data-wovnio'] = "key=#{STORE.settings['user_token']}&backend=true&currentLang=#{lang}&defaultLang=#{STORE.settings['default_lang']}&urlPattern=#{STORE.settings['url_pattern']}&backendVersion=#{version}-wovnrb"
insert_node['data-wovnio'] = "key=#{STORE.settings['user_token']}&backend=true&currentLang=#{lang}&defaultLang=#{STORE.settings['default_lang']}&urlPattern=#{STORE.settings['url_pattern']}&version=#{version}"
# do this so that there will be a closing tag (better compatibility with browsers)
insert_node.content = ' '
if parent_node.children.size > 0
Expand Down
2 changes: 1 addition & 1 deletion lib/wovnrb/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Wovnrb
VERSION = "0.1.63"
VERSION = "0.1.64"
end

0 comments on commit 46ca03e

Please sign in to comment.