somefixtures 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,8 +2,8 @@ require 'rake/gempackagetask'
2
2
 
3
3
  spec = Gem::Specification.new do |s|
4
4
  s.name = 'somefixtures'
5
- s.version = '0.2.0'
6
- s.date = '2010-08-08'
5
+ s.version = '0.2.2'
6
+ s.date = '2010-09-01'
7
7
  s.description = "Testing fixture automator. Easies the pain of getting sample data for testing."
8
8
  s.summary = s.description
9
9
 
@@ -20,7 +20,17 @@ module SomeFixtures
20
20
  def make_fixtures!
21
21
  save query_fixtures
22
22
  end
23
-
23
+
24
+ def list
25
+ if @fixtures != {}
26
+ @fixtures.each{|f|
27
+ puts f
28
+ }
29
+ else
30
+ print "Empty\n"
31
+ end
32
+ end
33
+
24
34
  private
25
35
  def is_duplicate? name
26
36
  value = false
@@ -29,7 +39,9 @@ module SomeFixtures
29
39
  return value
30
40
  end
31
41
  def add_fixture option, query, name, authenticate=false
42
+
32
43
  return true if is_duplicate? name
44
+ print "Added #{name}\n"
33
45
  @fixtures[name] = { :option => option, :query => query, :authenticate => authenticate }
34
46
  end
35
47
  def query_fixtures
@@ -41,7 +53,7 @@ module SomeFixtures
41
53
  responses << ( get fixture )
42
54
  end
43
55
  end
44
- responses
56
+ return responses
45
57
  end
46
58
  def get fixture
47
59
  Net::HTTP.start(get_uri[:location]) do |http|
@@ -70,7 +82,7 @@ module SomeFixtures
70
82
  fixtures.each do |f|
71
83
  File.new(File.join(@save_to, name.first + "." + @format), "w").puts f
72
84
  name.shift
73
- return f.gsub("\"", "")
85
+ f.gsub("\"", "")
74
86
  end
75
87
  end
76
88
  def authenticate_if_values_given fixture, request
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'somefixtures'
3
- s.version = '0.2.0'
4
- s.date = '2010-08-08'
3
+ s.version = '0.2.2'
4
+ s.date = '2010-09-01'
5
5
  s.description = "Testing fixture automator. Easies the pain of getting sample data for testing."
6
6
  s.summary = s.description
7
7
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: somefixtures
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Watson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-08 00:00:00 +01:00
18
+ date: 2010-09-01 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21