hasoffersv3 0.2.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +13 -0
  5. data/README.md +36 -3
  6. data/hasoffersv3.gemspec +4 -4
  7. data/lib/hasoffersv3/advertiser.rb +9 -11
  8. data/lib/hasoffersv3/advertiser_billing.rb +18 -20
  9. data/lib/hasoffersv3/advertiser_user.rb +2 -4
  10. data/lib/hasoffersv3/affiliate.rb +21 -23
  11. data/lib/hasoffersv3/affiliate_billing.rb +19 -21
  12. data/lib/hasoffersv3/affiliate_offer.rb +27 -27
  13. data/lib/hasoffersv3/application.rb +2 -4
  14. data/lib/hasoffersv3/base.rb +53 -38
  15. data/lib/hasoffersv3/client.rb +1 -1
  16. data/lib/hasoffersv3/configuration.rb +1 -0
  17. data/lib/hasoffersv3/conversion.rb +8 -15
  18. data/lib/hasoffersv3/employee.rb +17 -0
  19. data/lib/hasoffersv3/offer.rb +52 -54
  20. data/lib/hasoffersv3/offer_pixel.rb +22 -0
  21. data/lib/hasoffersv3/raw_log.rb +14 -16
  22. data/lib/hasoffersv3/report.rb +7 -21
  23. data/lib/hasoffersv3/version.rb +1 -1
  24. data/lib/hasoffersv3.rb +8 -3
  25. data/spec/lib/advertiser_billing_spec.rb +5 -4
  26. data/spec/lib/advertiser_spec.rb +1 -1
  27. data/spec/lib/advertiser_user_spec.rb +1 -1
  28. data/spec/lib/affiliate_billing_spec.rb +1 -1
  29. data/spec/lib/affiliate_offer_spec.rb +1 -1
  30. data/spec/lib/affiliate_spec.rb +1 -1
  31. data/spec/lib/conversion_spec.rb +3 -8
  32. data/spec/lib/employee_spec.rb +47 -0
  33. data/spec/lib/hasoffersv3_spec.rb +9 -1
  34. data/spec/lib/offer_pixel_spec.rb +76 -0
  35. data/spec/lib/offer_spec.rb +1 -1
  36. data/spec/lib/raw_log_spec.rb +1 -1
  37. data/spec/lib/report_spec.rb +5 -15
  38. metadata +8 -7
  39. data/.ruby-gemset +0 -1
  40. data/lib/hasoffersv3/adapter.rb +0 -30
  41. data/spec/lib/adapter_spec.rb +0 -20
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- hasoffersv3
@@ -1,30 +0,0 @@
1
- class HasOffersV3
2
- class Adapter
3
- attr_reader :configuration
4
-
5
- def initialize(configuration, target)
6
- @configuration = configuration
7
- @target = target
8
- end
9
-
10
- def with_configuration(&block)
11
- previous_config = HasOffersV3.configuration
12
- HasOffersV3.configuration = @configuration
13
- begin
14
- yield
15
- ensure
16
- HasOffersV3.configuration = previous_config
17
- end
18
- end
19
-
20
- def method_missing(meth, *args, &block)
21
- if @target.respond_to?(meth)
22
- with_configuration do
23
- @target.send(meth, *args, &block)
24
- end
25
- else
26
- super
27
- end
28
- end
29
- end
30
- end
@@ -1,20 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe HasOffersV3::Adapter do
4
-
5
- let(:configuration) { HasOffersV3::Configuration.new(host: 'example.com') }
6
- subject { HasOffersV3::Adapter.new(HasOffersV3::Offer, HasOffersV3::Offer) }
7
-
8
- describe '#with_configuration' do
9
- it 'should apply for block another config' do
10
- default_config = HasOffersV3.configuration
11
- expect(HasOffersV3::Offer.client.configuration).to eq(default_config)
12
-
13
- subject.with_configuration do
14
- expect(HasOffersV3::Offer.client.configuration).to eq(subject.configuration)
15
- end
16
-
17
- end
18
- end
19
-
20
- end