g5-jobbing 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06231aa354b5e054e70e76dce1e0d59ce010e1ff
4
- data.tar.gz: c90f2d535edbd1ecd1532785b27748d7c5bc2231
3
+ metadata.gz: 7e30f529ca533322a60549b99895be6386ea4932
4
+ data.tar.gz: 43e81be341fdcdfbc181896aba68e40b7a4b0e7e
5
5
  SHA512:
6
- metadata.gz: 1162b1cbe204c0799e93d06aa34f522ee4d79a7d533a0a2885f6d893fca4d38392d58b679444ced94c302139f3bdd319578599429c9267c9c289a7c67d831949
7
- data.tar.gz: 67ba8ad6fb6aff7ea1e0640c54bd738d2834cf72fed3aada9eebc47151c31cf76ec5bbfa5e20e9abb3586d61457cf3329117cba6ab081d11bbd7ca563568f3f1
6
+ metadata.gz: 535cf88ad0bdf15b1d524ffecfe2a3d1ddbad6d79196cf8dcd57e281abbf1020aa7eff5a9b80286e30f814f72875df1f1a24098348309cb44623bca11e24818b
7
+ data.tar.gz: d39648c0d0da8890cf2a34eeaffc0da917246caeda7ae27b59a5a49a4d879b9e21698bdaa933cc855e07a160fcd7c6260d12be57ed4b2a8e1a72b687805ba9b4
@@ -6,8 +6,8 @@ class G5::Jobbing::Job
6
6
  attribute :state, String
7
7
  attribute :created_at, DateTime
8
8
  attribute :updated_at, DateTime
9
- attribute :integration_setting_uid, String
10
- attribute :integration_setting_urn, String
9
+ attribute :location_setting_uid, String
10
+ attribute :location_setting_urn, String
11
11
  attribute :message, String
12
12
  attribute :error_state, Boolean
13
13
  attribute :success_state, Boolean
@@ -11,7 +11,7 @@ class G5::Jobbing::JobRetriever
11
11
  end
12
12
 
13
13
  def jobs_url_for_locations
14
- "#{jobs_base_url}?current=true&integration_setting_urn=#{locations_as_parameter}"
14
+ "#{jobs_base_url}?current=true&location_setting_urn=#{locations_as_parameter}"
15
15
  end
16
16
 
17
17
  def locations_as_parameter
@@ -15,6 +15,6 @@ class G5::Jobbing::JobStarter
15
15
  end
16
16
 
17
17
  def start_job_url
18
- "#{ENV['JOBS_URL']}/api/v1/job_runners?integration_setting_urn=#{self.location_setting_urn}"
18
+ "#{ENV['JOBS_URL']}/api/v1/job_runners?location_setting_urn=#{self.location_setting_urn}"
19
19
  end
20
20
  end
@@ -23,7 +23,7 @@ class G5::Jobbing::JobStatRetriever
23
23
  end
24
24
 
25
25
  def find_matching_job_stat(job)
26
- parent = self.rollup_by.detect { |key_values| key_values.last.include?(job.integration_setting_urn) }.try(:first)
26
+ parent = self.rollup_by.detect { |key_values| key_values.last.include?(job.location_setting_urn) }.try(:first)
27
27
  return unless parent
28
28
 
29
29
  job_stat_key = @job_stats.keys.detect { |js_key| parent == js_key }
@@ -1,5 +1,5 @@
1
1
  module G5
2
2
  module Jobbing
3
- VERSION = '0.0.4'
3
+ VERSION = '0.1.0'
4
4
  end
5
5
  end
@@ -6,8 +6,8 @@
6
6
  "state": "inventory_etl_transform_failure",
7
7
  "created_at": "2014-11-14T11:32:40.385-08:00",
8
8
  "updated_at": "2014-11-14T11:32:44.968-08:00",
9
- "integration_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-i27shqbr-value-self-storage-sitelink-unit-categorization/locations_integration_settings/g5-lis-1t0thzui",
10
- "integration_setting_urn": "g5-lis-1t0thzui",
9
+ "location_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-i27shqbr-value-self-storage-sitelink-unit-categorization/locations_integration_settings/g5-lis-1t0thzui",
10
+ "location_setting_urn": "g5-lis-1t0thzui",
11
11
  "message": "undefined method `*' for nil:NilClass\n/app/app/services/site_link/transformation/compute_in_store_rate_and_web_rate.rb:29:in `in_store_rate_from_web_rate'\n/app/app/services/site_link/transformation/compute_in_store_rate_and_web_rate.rb:13:in `block in \u003cclass:ComputeInStoreRateAndWebRate\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:15:in `block in reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `each'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer_log_decorator.rb:21:in `reduce'\n/app/app/services/site_link/transformation/transform_storage_unit.rb:10:in `block in \u003cclass:TransformStorageUnit\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/app/services/site_link/transformation/transform_storage_units.rb:18:in `block (2 levels) in \u003cclass:TransformStorageUnits\u003e'\n/app/app/services/site_link/transformation/transform_storage_units.rb:17:in `map'\n/app/app/services/site_link/transformation/transform_storage_units.rb:17:in `block in \u003cclass:TransformStorageUnits\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:15:in `block in reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `each'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer_log_decorator.rb:21:in `reduce'\n/app/app/services/site_link/transform.rb:9:in `block in \u003cclass:Transform\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/app/etl_strategies/site_link_etl_strategy.rb:10:in `transform'\n/app/app/etl_strategies/base_etl_strategy.rb:12:in `block in execute'\n/app/app/etl_strategies/base_etl_strategy.rb:25:in `safe'\n/app/app/etl_strategies/base_etl_strategy.rb:12:in `execute'\n/app/app/workers/etl_worker.rb:9:in `perform'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:75:in `execute_job'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:52:in `block (2 levels) in process'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:122:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:122:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/active_record.rb:6:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/logging.rb:22:in `with_context'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/logging.rb:7:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:127:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:127:in `invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:51:in `block in process'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:98:in `stats'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:50:in `process'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'",
12
12
  "error_state": true,
13
13
  "success_state": false
@@ -18,8 +18,8 @@
18
18
  "state": "completed_with_no_errors",
19
19
  "created_at": "2014-11-14T11:32:17.740-08:00",
20
20
  "updated_at": "2014-11-14T11:32:28.662-08:00",
21
- "integration_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-i27sjquw-value-ss-venice-sitelink-unit-categorization/locations_integration_settings/g5-lis-1t0thj3p",
22
- "integration_setting_urn": "g5-lis-1t0thj3p",
21
+ "location_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-i27sjquw-value-ss-venice-sitelink-unit-categorization/locations_integration_settings/g5-lis-1t0thj3p",
22
+ "location_setting_urn": "g5-lis-1t0thj3p",
23
23
  "message": null,
24
24
  "error_state": false,
25
25
  "success_state": true
@@ -30,8 +30,8 @@
30
30
  "state": "completed_with_no_errors",
31
31
  "created_at": "2014-11-14T11:31:59.764-08:00",
32
32
  "updated_at": "2014-11-14T11:32:08.946-08:00",
33
- "integration_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-1soj8z8d-501-storage/locations_integration_settings/g5-lis-3",
34
- "integration_setting_urn": "g5-lis-3",
33
+ "location_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-1soj8z8d-501-storage/locations_integration_settings/g5-lis-3",
34
+ "location_setting_urn": "g5-lis-3",
35
35
  "message": null,
36
36
  "error_state": false,
37
37
  "success_state": true
@@ -42,8 +42,8 @@
42
42
  "state": "inventory_etl_transform_failure",
43
43
  "created_at": "2014-11-14T11:30:45.447-08:00",
44
44
  "updated_at": "2014-11-14T11:30:50.067-08:00",
45
- "integration_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-1sontt19-541-storage/locations_integration_settings/g5-lis-9",
46
- "integration_setting_urn": "g5-lis-9",
45
+ "location_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-1sontt19-541-storage/locations_integration_settings/g5-lis-9",
46
+ "location_setting_urn": "g5-lis-9",
47
47
  "message": "undefined method `*' for nil:NilClass\n/app/app/services/site_link/transformation/compute_in_store_rate_and_web_rate.rb:29:in `in_store_rate_from_web_rate'\n/app/app/services/site_link/transformation/compute_in_store_rate_and_web_rate.rb:13:in `block in \u003cclass:ComputeInStoreRateAndWebRate\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:15:in `block in reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `each'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer_log_decorator.rb:21:in `reduce'\n/app/app/services/site_link/transformation/transform_storage_unit.rb:10:in `block in \u003cclass:TransformStorageUnit\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/app/services/site_link/transformation/transform_storage_units.rb:18:in `block (2 levels) in \u003cclass:TransformStorageUnits\u003e'\n/app/app/services/site_link/transformation/transform_storage_units.rb:17:in `map'\n/app/app/services/site_link/transformation/transform_storage_units.rb:17:in `block in \u003cclass:TransformStorageUnits\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:15:in `block in reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `each'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer_log_decorator.rb:21:in `reduce'\n/app/app/services/site_link/transform.rb:9:in `block in \u003cclass:Transform\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/app/etl_strategies/site_link_etl_strategy.rb:10:in `transform'\n/app/app/etl_strategies/base_etl_strategy.rb:12:in `block in execute'\n/app/app/etl_strategies/base_etl_strategy.rb:25:in `safe'\n/app/app/etl_strategies/base_etl_strategy.rb:12:in `execute'\n/app/app/workers/etl_worker.rb:9:in `perform'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:75:in `execute_job'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:52:in `block (2 levels) in process'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:122:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:122:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/active_record.rb:6:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/logging.rb:22:in `with_context'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/logging.rb:7:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:127:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:127:in `invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:51:in `block in process'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:98:in `stats'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:50:in `process'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'",
48
48
  "error_state": true,
49
49
  "success_state": false
@@ -54,8 +54,8 @@
54
54
  "state": "inventory_etl_transform_failure",
55
55
  "created_at": "2014-11-14T11:29:57.957-08:00",
56
56
  "updated_at": "2014-11-14T11:30:02.971-08:00",
57
- "integration_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-i27smlhd-sitelink-test-system/locations_integration_settings/g5-lis-1t0s4n2j",
58
- "integration_setting_urn": "g5-lis-1t0s4n2j",
57
+ "location_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-i27smlhd-sitelink-test-system/locations_integration_settings/g5-lis-1t0s4n2j",
58
+ "location_setting_urn": "g5-lis-1t0s4n2j",
59
59
  "message": "undefined method `*' for nil:NilClass\n/app/app/services/site_link/transformation/compute_in_store_rate_and_web_rate.rb:29:in `in_store_rate_from_web_rate'\n/app/app/services/site_link/transformation/compute_in_store_rate_and_web_rate.rb:13:in `block in \u003cclass:ComputeInStoreRateAndWebRate\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:15:in `block in reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `each'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer_log_decorator.rb:21:in `reduce'\n/app/app/services/site_link/transformation/transform_storage_unit.rb:10:in `block in \u003cclass:TransformStorageUnit\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/app/services/site_link/transformation/transform_storage_units.rb:18:in `block (2 levels) in \u003cclass:TransformStorageUnits\u003e'\n/app/app/services/site_link/transformation/transform_storage_units.rb:17:in `map'\n/app/app/services/site_link/transformation/transform_storage_units.rb:17:in `block in \u003cclass:TransformStorageUnits\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:15:in `block in reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `each'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer.rb:14:in `reduce'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/organizer/with_reducer_log_decorator.rb:21:in `reduce'\n/app/app/services/site_link/transform.rb:9:in `block in \u003cclass:Transform\u003e'\n/app/vendor/bundle/ruby/2.1.0/gems/light-service-0.4.0/lib/light-service/action.rb:38:in `block in executed'\n/app/app/etl_strategies/site_link_etl_strategy.rb:10:in `transform'\n/app/app/etl_strategies/base_etl_strategy.rb:12:in `block in execute'\n/app/app/etl_strategies/base_etl_strategy.rb:25:in `safe'\n/app/app/etl_strategies/base_etl_strategy.rb:12:in `execute'\n/app/app/workers/etl_worker.rb:9:in `perform'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:75:in `execute_job'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:52:in `block (2 levels) in process'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:122:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:122:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/active_record.rb:6:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/logging.rb:22:in `with_context'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/server/logging.rb:7:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:127:in `call'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/middleware/chain.rb:127:in `invoke'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:51:in `block in process'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:98:in `stats'\n/app/vendor/bundle/ruby/2.1.0/gems/sidekiq-3.2.6/lib/sidekiq/processor.rb:50:in `process'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'\n/app/vendor/bundle/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'",
60
60
  "error_state": true,
61
61
  "success_state": false
@@ -66,8 +66,8 @@
66
66
  "state": "completed_with_no_errors",
67
67
  "created_at": "2014-11-14T11:27:22.466-08:00",
68
68
  "updated_at": "2014-11-14T11:27:36.617-08:00",
69
- "integration_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-i23xpxk1-pitfields-east-india-trading-company/locations_integration_settings/g5-lis-1t0tf3u0",
70
- "integration_setting_urn": "g5-lis-1t0tf3u0",
69
+ "location_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1soj8z7v-g5-selfstorage/locations/g5-cl-i23xpxk1-pitfields-east-india-trading-company/locations_integration_settings/g5-lis-1t0tf3u0",
70
+ "location_setting_urn": "g5-lis-1t0tf3u0",
71
71
  "message": null,
72
72
  "error_state": false,
73
73
  "success_state": true
@@ -78,8 +78,8 @@
78
78
  "state": "inventory_etl_load_failure",
79
79
  "created_at": "2014-11-14T10:21:39.057-08:00",
80
80
  "updated_at": "2014-11-14T10:21:47.331-08:00",
81
- "integration_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1skmeepf-clowns-monkeys-jokers/locations/g5-cl-1ssino43-test-rent-cafe/locations_integration_settings/g5-lis-1",
82
- "integration_setting_urn": "g5-lis-1",
81
+ "location_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1skmeepf-clowns-monkeys-jokers/locations/g5-cl-1ssino43-test-rent-cafe/locations_integration_settings/g5-lis-1",
82
+ "location_setting_urn": "g5-lis-1",
83
83
  "message": "inventory-service responded with 422: {\"external_id\":[\"has already been taken\"]}\ninventory-service responded with 422: {\"external_id\":[\"has already been taken\"]}",
84
84
  "error_state": true,
85
85
  "success_state": false
@@ -90,8 +90,8 @@
90
90
  "state": "completed_with_no_errors",
91
91
  "created_at": "2014-11-13T17:08:45.297-08:00",
92
92
  "updated_at": "2014-11-13T17:08:53.007-08:00",
93
- "integration_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1skmeepf-clowns-monkeys-jokers/locations/g5-cl-1skmeept-blahblahblah/locations_integration_settings/g5-lis-1t0n85r2",
94
- "integration_setting_urn": "g5-lis-1t0n85r2",
93
+ "location_setting_uid": "http://hub.g5dxm.com/clients/g5-c-1skmeepf-clowns-monkeys-jokers/locations/g5-cl-1skmeept-blahblahblah/locations_integration_settings/g5-lis-1t0n85r2",
94
+ "location_setting_urn": "g5-lis-1t0n85r2",
95
95
  "message": null,
96
96
  "error_state": false,
97
97
  "success_state": true
@@ -2,25 +2,25 @@
2
2
  {
3
3
  "uid": "http://localhost:5778/api/v1/jobs/g5-job-6i4h4jo",
4
4
  "urn": "g5-job-6i4h4jo",
5
- "integration_setting_urn": "int-6i4h4",
5
+ "location_setting_urn": "int-6i4h4",
6
6
  "state": "started",
7
7
  "error_state": true,
8
8
  "success_state": false,
9
9
  "created_at": "2014-11-10T14:57:49.216-08:00",
10
10
  "updated_at": "2014-11-10T15:12:23.111-08:00",
11
- "integration_setting_uid": "http://localhost/clients/g5-c-6i4h3un-ethan-bode/locations/g5-cl-6i4h3uo-zoe-krajcik/locations_integration_settings/g5-lis-6i4h3uo",
11
+ "location_setting_uid": "http://localhost/clients/g5-c-6i4h3un-ethan-bode/locations/g5-cl-6i4h3uo-zoe-krajcik/locations_integration_settings/g5-lis-6i4h3uo",
12
12
  "message": null
13
13
  },
14
14
  {
15
15
  "uid": "http://localhost:5778/api/v1/jobs/g5-job-6i4h4bb",
16
16
  "urn": "g5-job-6i4h4bb",
17
- "integration_setting_urn": "int-622h4",
17
+ "location_setting_urn": "int-622h4",
18
18
  "state": "started",
19
19
  "error_state": false,
20
20
  "success_state": true,
21
21
  "created_at": "2014-11-10T14:57:19.546-08:00",
22
22
  "updated_at": "2014-11-10T15:12:23.103-08:00",
23
- "integration_setting_uid": "http://localhost/clients/g5-c-6i4h3un-ethan-bode/locations/g5-cl-6i4h3un-retha-hane/locations_integration_settings/g5-lis-6i4h3un",
23
+ "location_setting_uid": "http://localhost/clients/g5-c-6i4h3un-ethan-bode/locations/g5-cl-6i4h3un-retha-hane/locations_integration_settings/g5-lis-6i4h3un",
24
24
  "message": null
25
25
  }
26
26
  ]}
@@ -1,10 +1,10 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe G5::Jobbing::JobRetriever do
4
- let!(:locations_integration_setting_urn_1) { 'urn1' }
5
- let!(:locations_integration_setting_urn_2) { 'urn2' }
4
+ let!(:locations_location_setting_urn_1) { 'urn1' }
5
+ let!(:locations_location_setting_urn_2) { 'urn2' }
6
6
 
7
- subject { G5::Jobbing::JobRetriever.new(location_setting_urns: [locations_integration_setting_urn_1, locations_integration_setting_urn_2]) }
7
+ subject { G5::Jobbing::JobRetriever.new(location_setting_urns: [locations_location_setting_urn_1, locations_location_setting_urn_2]) }
8
8
 
9
9
  describe :perform do
10
10
  let(:body) { fixture('jobs.json') }
@@ -20,18 +20,18 @@ describe G5::Jobbing::JobRetriever do
20
20
  result = subject.perform
21
21
  expect(result.length).to eq(2)
22
22
  expect(result.all? { |job| G5::Jobbing::Job == job.class }).to be_truthy
23
- expect(result.collect(&:integration_setting_uid)).to eq(%w(http://localhost/clients/g5-c-6i4h3un-ethan-bode/locations/g5-cl-6i4h3uo-zoe-krajcik/locations_integration_settings/g5-lis-6i4h3uo http://localhost/clients/g5-c-6i4h3un-ethan-bode/locations/g5-cl-6i4h3un-retha-hane/locations_integration_settings/g5-lis-6i4h3un))
23
+ expect(result.collect(&:location_setting_uid)).to eq(%w(http://localhost/clients/g5-c-6i4h3un-ethan-bode/locations/g5-cl-6i4h3uo-zoe-krajcik/locations_integration_settings/g5-lis-6i4h3uo http://localhost/clients/g5-c-6i4h3un-ethan-bode/locations/g5-cl-6i4h3un-retha-hane/locations_integration_settings/g5-lis-6i4h3un))
24
24
  expect(result.collect(&:error_state)).to eq([true, false])
25
25
  expect(result.collect(&:success_state)).to eq([false, true])
26
26
  end
27
27
  end
28
28
 
29
- its (:locations_as_parameter) { is_expected.to eq("[#{locations_integration_setting_urn_1},#{locations_integration_setting_urn_2}]") }
29
+ its (:locations_as_parameter) { is_expected.to eq("[#{locations_location_setting_urn_1},#{locations_location_setting_urn_2}]") }
30
30
 
31
31
  describe :jobs_url_for_locations do
32
32
  it 'filters by current and locations_integration_setting UIDs' do
33
33
  expect(subject).to receive(:locations_as_parameter).and_return('loc_param')
34
- expect(subject.jobs_url_for_locations).to match(/\/api\/v1\/jobs\?current=true&integration_setting_urn=loc_param/)
34
+ expect(subject.jobs_url_for_locations).to match(/\/api\/v1\/jobs\?current=true&location_setting_urn=loc_param/)
35
35
  end
36
36
  end
37
37
  end
@@ -4,8 +4,8 @@ describe G5::Jobbing::Job do
4
4
  let(:uid) { 'uid' }
5
5
  let(:urn) { 'urn' }
6
6
  let(:state) { 'state' }
7
- let(:integration_setting_uid) { 'isuid' }
8
- let(:integration_setting_urn) { 'is-urn' }
7
+ let(:location_setting_uid) { 'isuid' }
8
+ let(:location_setting_urn) { 'is-urn' }
9
9
  let(:error_state) { true }
10
10
  let(:success_state) { false }
11
11
  let(:message) { 'message' }
@@ -13,8 +13,8 @@ describe G5::Jobbing::Job do
13
13
  let(:updated_at) { DateTime.new(2013, 10, 10) }
14
14
 
15
15
  subject { G5::Jobbing::Job.new(uid: uid, urn: urn, state: state,
16
- integration_setting_uid: integration_setting_uid,
17
- integration_setting_urn: integration_setting_urn,
16
+ location_setting_uid: location_setting_uid,
17
+ location_setting_urn: location_setting_urn,
18
18
  error_state: error_state,
19
19
  success_state: success_state,
20
20
  message: message, created_at: created_at, updated_at: updated_at) }
@@ -24,8 +24,8 @@ describe G5::Jobbing::Job do
24
24
  its(:state) { is_expected.to eq(state) }
25
25
  its(:error_state) { is_expected.to eq(error_state) }
26
26
  its(:success_state) { is_expected.to eq(success_state) }
27
- its(:integration_setting_uid) { is_expected.to eq(integration_setting_uid) }
28
- its(:integration_setting_urn) { is_expected.to eq(integration_setting_urn) }
27
+ its(:location_setting_uid) { is_expected.to eq(location_setting_uid) }
28
+ its(:location_setting_urn) { is_expected.to eq(location_setting_urn) }
29
29
  its(:message) { is_expected.to eq(message) }
30
30
  its(:created_at) { is_expected.to eq(created_at) }
31
31
  its(:updated_at) { is_expected.to eq(updated_at) }
@@ -24,5 +24,5 @@ describe G5::Jobbing::JobStarter do
24
24
  end
25
25
  end
26
26
 
27
- its(:start_job_url) { is_expected.to match(/\/api\/v1\/job_runners\?integration_setting_urn=#{location_setting_urn}/) }
27
+ its(:start_job_url) { is_expected.to match(/\/api\/v1\/job_runners\?location_setting_urn=#{location_setting_urn}/) }
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: g5-jobbing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perry Hertler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-15 00:00:00.000000000 Z
11
+ date: 2014-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler