Skip to content

Commit

Permalink
Simplify version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tombell committed Jun 25, 2013
1 parent c5fe2c2 commit e7dc56d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/robot.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,8 @@ class Robot
# Returns a String of the version number.
parseVersion: ->
package_path = Path.join __dirname, '..', 'package.json'
data = Fs.readFileSync package_path, 'utf8'
content = JSON.parse data
@version = content.version
pkg = require package_path
@version = pkg.version

# Public: Creates a scoped http client with chainable methods for
# modifying the request. This doesn't actually make a request though.
Expand Down

0 comments on commit e7dc56d

Please sign in to comment.