iron_response 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -25,7 +25,7 @@ Assumes you have a worker file called `is_prime.rb`:
25
25
  ```ruby
26
26
  require "iron_response"
27
27
 
28
- IronResponse::Responder.new(binding) do
28
+ IronResponse::Worker.new(binding) do
29
29
  def is_prime?(n)
30
30
  ("1" * n =~ /^1?$|^(11+?)\1+$/) == 0 ? false : true
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module IronResponse
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/iron_response.rb CHANGED
@@ -138,7 +138,7 @@ module IronResponse
138
138
  if @code.nil?
139
139
  @code = IronWorkerNG::Code::Ruby.new(exec: @worker)
140
140
  @code.name = worker_name
141
- @code.merge_gem("iron_response")
141
+ @code.merge_gem("iron_response", ">= 0.1.0")
142
142
  @code.runtime = "ruby"
143
143
  end
144
144
 
@@ -1,14 +1,14 @@
1
1
  require "test_helper"
2
2
 
3
3
  class GemDependencyTest < MiniTest::Unit::TestCase
4
- def test_synopsis
4
+ def test_synopsis_with_iron_cache
5
5
 
6
6
  config = Configuration.keys
7
7
  batch = IronResponse::Batch.new
8
8
 
9
- batch.auto_update_worker = true
9
+ #batch.auto_update_worker = true
10
10
 
11
- batch.config = config
11
+ batch.config[:iron_io] = config[:iron_io]
12
12
 
13
13
  #batch.config[:iron_io] = config[:iron_io]
14
14
  #batch.config[:aws_s3] = config[:aws_s3]
@@ -34,4 +34,36 @@ class GemDependencyTest < MiniTest::Unit::TestCase
34
34
  assert_equal Array, results.class
35
35
  assert_equal batch.params_array.length, results.length
36
36
  end
37
+
38
+ def test_synopsis_with_aws_s3
39
+
40
+ config = Configuration.keys
41
+ batch = IronResponse::Batch.new
42
+
43
+ #batch.auto_update_worker = true
44
+
45
+ batch.config = config
46
+ batch.worker = "test/workers/fcc_filings_counter.rb"
47
+
48
+ batch.code.merge_gem("nokogiri", "< 1.6.0") # keeps the build times low
49
+ batch.code.merge_gem("ecfs")
50
+ batch.code.full_remote_build(true)
51
+
52
+ batch.params_array = [
53
+ "12-375", "12-268",
54
+ "12-238", "12-353",
55
+ "13-150", "13-5",
56
+ "10-71"
57
+ ].map { |i| {docket_number: i} }
58
+
59
+ results = batch.run!
60
+
61
+ total = results.map {|r| r["length"]}.inject(:+)
62
+
63
+ p "There are #{total} total filings in these dockets."
64
+
65
+ assert_equal Array, results.class
66
+ assert_equal batch.params_array.length, results.length
67
+ end
68
+
37
69
  end
@@ -1,7 +1,7 @@
1
1
  require "iron_response"
2
2
  require "ecfs"
3
3
 
4
- IronResponse::Responder.new(binding) do
4
+ IronResponse::Worker.new(binding) do
5
5
  filings = ECFS::Filing.query.tap do |q|
6
6
  q.docket_number = params[:docket_number]
7
7
  end.get
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_response
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: