twtest 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,11 @@ language: ruby
2
2
 
3
3
  rvm:
4
4
  - 1.9.3
5
+ - jruby-19mode
5
6
 
6
7
  before_script:
7
8
  - mkdir ~/.task
8
9
  - echo data.location=~/.task > ~/.taskrc
9
- - task count
10
10
 
11
11
  before_install:
12
12
  - echo | sudo add-apt-repository ppa:ultrafredde/ppa
@@ -1,8 +1,13 @@
1
+ require 'test/unit'
2
+ require 'tmpdir'
3
+ require 'erb'
4
+ require 'shellwords'
5
+ require 'tempfile'
6
+ require 'multi_json'
7
+
1
8
  require "twtest/version"
2
9
  require "twtest/testcase"
3
10
 
4
- require 'tempfile'
5
-
6
11
  module TaskWarrior
7
12
  module Test
8
13
  module Integration
@@ -1,10 +1,3 @@
1
- require 'test/unit'
2
-
3
- require 'tmpdir'
4
- require 'erb'
5
- require 'json'
6
- require 'shellwords'
7
-
8
1
  module TaskWarrior
9
2
  module Test
10
3
  module Integration
@@ -24,7 +17,7 @@ module TaskWarrior
24
17
  def export_tasks(args = {})
25
18
  json = task('export', args)
26
19
  raise "Empty JSON returned by task command" if json.nil? || json.empty?
27
- JSON[json]
20
+ MultiJson.load(json)
28
21
  end
29
22
 
30
23
  def task(cmd, args = {})
@@ -1,7 +1,7 @@
1
1
  module TaskWarrior
2
2
  module Test
3
3
  module Integration
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
6
6
  end
7
7
  end
@@ -15,11 +15,11 @@ class TestTestCase < TaskWarrior::Test::Integration::TestCase
15
15
  input_file = Tempfile.new('test_simple')
16
16
 
17
17
  begin
18
- input_file.write(contents.to_json)
18
+ input_file.write(MultiJson.dump(contents))
19
19
  input_file.close
20
20
 
21
21
  # TODO Replace temp file with in-process version
22
- # task("import <(echo '#{contents.to_json}')")
22
+ # task("import <(echo '#{MultiJson.dump(contents)}')")
23
23
  task("import #{input_file.path}")
24
24
 
25
25
  tasks = export_tasks
@@ -14,6 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.require_paths = ["lib"]
15
15
  gem.version = TaskWarrior::Test::Integration::VERSION
16
16
 
17
+ gem.add_development_dependency 'multi_json', '~> 1.3'
17
18
  gem.add_development_dependency 'guard-test', '~> 0.5'
18
19
  gem.add_development_dependency 'guard-bundler', '~> 1.0'
19
20
  gem.add_development_dependency 'rake', '~> 0.9'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twtest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-07 00:00:00.000000000 Z
12
+ date: 2012-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: multi_json
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: guard-test
16
32
  requirement: !ruby/object:Gem::Requirement