api_test_gem 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/api_test_gem.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{api_test_gem}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jaqueline Wilde"]
data/lib/api_test.sh CHANGED
@@ -21,6 +21,6 @@ curl -H 'Accept: text/javascript' -H 'Content-Type: application/json' -w '\nHTTP
21
21
  -X $METHOD \
22
22
  -d "$XML" \
23
23
  -u "$AUTH" \
24
- "$DEST" --cookie cookie_for_auth
24
+ "$DEST" --cookie pwd/cookie_for_auth
25
25
 
26
26
  exit 0
data/lib/api_test_gem.rb CHANGED
@@ -4,9 +4,10 @@ def api_test(*args)
4
4
  puts "richtiger Aufruf via: 'api_test [controller] [action]'"
5
5
  else
6
6
  #route_yml=File.expand_path((File.dirname(__FILE__)).chomp('.')+ 'apitest_config.yml')
7
- route_yml=File.expand_path("../projects/ave/tavex2/rails/api_test_config.yml")
7
+ #route_yml=File.expand_path("../projects/ave/tavex2/rails/api_test_config.yml")
8
8
  #for usage
9
- #route_yml=File.expand_path("#{Dir.pwd}/apitest_config.yml")
9
+ route_yml=File.expand_path("#{Dir.pwd}/api_test_config.yml")
10
+ puts route_yml
10
11
  #arg_con=ARGV[0].split('/')
11
12
  arg_con=args[0].split('/')
12
13
  if File.exist?(route_yml)
@@ -31,9 +32,8 @@ def api_test(*args)
31
32
  exit
32
33
  end
33
34
  end
34
-
35
- route_sh=File.expand_path((File.dirname(__FILE__)).chomp('.') + '/api_test.sh')
36
-
35
+
36
+ route_sh=File.expand_path(File.join(File.dirname(__FILE__), '/api_test.sh'))
37
37
  for_exec = "sh #{route_sh} #{config['method']} #{config['url']}"
38
38
 
39
39
  #params in json
data/lib/auth_api_test.sh CHANGED
@@ -1,5 +1,5 @@
1
1
  curl -H 'Content-Type: application/json' \
2
2
  -H 'Accept: text/javascript' \
3
3
  -X POST 'http://localhost:3000/login/renew' \
4
- -d '{ 'token': 'o2OFrPFmFRQBC8HyQF48' }' -c cookie_for_auth
4
+ -d '{ 'token': 'o2OFrPFmFRQBC8HyQF48' }' -c pwd/cookie_for_auth
5
5
  exit 0
@@ -2,6 +2,8 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "ApiTestGem" do
4
4
  before(:each) do
5
+ Dir.chdir("/Users/ds/projects/ave/tavex2/rails")
6
+ puts Dir.getwd
5
7
  api_test('product', 'update')
6
8
  end
7
9
  it "gets the right url" do
@@ -16,6 +18,5 @@ describe "ApiTestGem" do
16
18
  it "returns the result of the curl request" do
17
19
  @result[:result].should_not be_nil
18
20
  @result[:result].is_a?(String).should be true
19
- puts Dir.pwd
20
21
  end
21
22
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_test_gem
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jaqueline Wilde