lipstick 1.0.0 → 1.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: 7b1a67bcd30dbfbcff960c0c4bfd691c2819df5f
4
- data.tar.gz: 273db582de5590a51bfa2171ede48c73fbe58af3
3
+ metadata.gz: 1cdd62a0a4eb63c741e28f92ad050f8e76e96924
4
+ data.tar.gz: 31a076bdf9230b917c4b5c70c249527b3a0300ea
5
5
  SHA512:
6
- metadata.gz: 4c93662136450e1e57c84b992544b66dde38eaf3c45d3196c0244cf04745b7dc99602445d51eef52513835f8fc4cab43d39eb148d8b874a1eb65c690be8a2856
7
- data.tar.gz: 358de74adc0fca404cc20f0e8287cadc92c8d6a23eb2a2257ac912d60f0d4e7e980878452122d72440a9c242bc962ec767cb964c9f44a906f03aba8b8212f362
6
+ metadata.gz: 6ed80539845896567249ca2276213e93cdacd31018b73580e4ce0ec09b50f4ae456139a4f2e5f9e5e8f5d0d55ffa9796859736db83ba88d0986c566d9af5c6fd
7
+ data.tar.gz: ebde4ee004603ae43f1b747437a92d13a4dc67f8326b7a92b4d43612a0c2179a4fd2d290822c2f1053c2bc02d397c9eeb7be3ca1ce7e9cdc6250e80466d30ca5
data/Gemfile CHANGED
@@ -10,6 +10,5 @@ group :development do
10
10
  gem "yard", "~> 0.7"
11
11
  gem "rdoc", "~> 3.12"
12
12
  gem "bundler", "~> 1.0"
13
- gem "jeweler", "~> 2.0.1"
14
13
  gem "simplecov", ">= 0"
15
14
  end
data/Gemfile.lock CHANGED
@@ -1,49 +1,10 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.4.0)
5
- builder (3.2.2)
6
- descendants_tracker (0.0.4)
7
- thread_safe (~> 0.3, >= 0.3.1)
8
4
  docile (1.1.5)
9
- faraday (0.9.2)
10
- multipart-post (>= 1.2, < 3)
11
- git (1.2.8)
12
- github_api (0.13.1)
13
- addressable (~> 2.4.0)
14
- descendants_tracker (~> 0.0.4)
15
- faraday (~> 0.8, < 0.10)
16
- hashie (>= 3.4)
17
- multi_json (>= 1.7.5, < 2.0)
18
- oauth2
19
- hashie (3.4.3)
20
- highline (1.6.21)
21
- jeweler (2.0.1)
22
- builder
23
- bundler (>= 1.0)
24
- git (>= 1.2.5)
25
- github_api
26
- highline (>= 1.6.15)
27
- nokogiri (>= 1.5.10)
28
- rake
29
- rdoc
30
5
  json (1.8.1)
31
- jwt (1.5.1)
32
- mini_portile2 (2.0.0)
33
6
  minitest (5.4.2)
34
7
  multi_json (1.11.2)
35
- multi_xml (0.5.5)
36
- multipart-post (2.0.0)
37
- nokogiri (1.6.7.2)
38
- mini_portile2 (~> 2.0.0.rc2)
39
- oauth2 (1.1.0)
40
- faraday (>= 0.8, < 0.10)
41
- jwt (~> 1.0, < 1.5.2)
42
- multi_json (~> 1.3)
43
- multi_xml (~> 0.5)
44
- rack (>= 1.2, < 3)
45
- rack (1.6.4)
46
- rake (10.3.2)
47
8
  rdoc (3.12.2)
48
9
  json (~> 1.4)
49
10
  simplecov (0.9.1)
@@ -51,7 +12,6 @@ GEM
51
12
  multi_json (~> 1.0)
52
13
  simplecov-html (~> 0.8.0)
53
14
  simplecov-html (0.8.0)
54
- thread_safe (0.3.5)
55
15
  yard (0.8.7.6)
56
16
 
57
17
  PLATFORMS
@@ -59,8 +19,10 @@ PLATFORMS
59
19
 
60
20
  DEPENDENCIES
61
21
  bundler (~> 1.0)
62
- jeweler (~> 2.0.1)
63
22
  minitest
64
23
  rdoc (~> 3.12)
65
24
  simplecov
66
25
  yard (~> 0.7)
26
+
27
+ BUNDLED WITH
28
+ 1.14.3
data/README.md CHANGED
@@ -29,6 +29,8 @@ Run the tests with:
29
29
  bundle exec ruby -I lib:test test/test_lipstick.rb -v
30
30
  ```
31
31
 
32
+ Manual cleanup may be required before re-running tests.
33
+
32
34
  ## Contributing to lipstick
33
35
 
34
36
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
data/Rakefile CHANGED
@@ -11,20 +11,6 @@ rescue Bundler::BundlerError => e
11
11
  end
12
12
  require 'rake'
13
13
 
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
17
- gem.name = "lipstick"
18
- gem.homepage = "http://github.com/varyonic/lipstick"
19
- gem.license = "MIT"
20
- gem.summary = %Q{Unofficial ruby wrapper for the Lime Light CRM APIs.}
21
- gem.description = %Q{Unofficial ruby wrapper for the Lime Light CRM membership and transaction APIs}
22
- gem.email = "piers@varyonic.com"
23
- gem.authors = ["Piers Chambers"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
14
  require 'rake/testtask'
29
15
  Rake::TestTask.new(:test) do |test|
30
16
  test.libs << 'lib' << 'test'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/lipstick.gemspec CHANGED
@@ -1,17 +1,11 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: lipstick 1.0.0 ruby lib
6
-
7
1
  Gem::Specification.new do |s|
8
2
  s.name = "lipstick"
9
- s.version = "1.0.0"
3
+ s.version = "1.1.0"
10
4
 
11
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
6
  s.require_paths = ["lib"]
13
7
  s.authors = ["Piers Chambers"]
14
- s.date = "2016-05-30"
8
+ s.date = "2017-04-07"
15
9
  s.description = "Unofficial ruby wrapper for the Lime Light CRM membership and transaction APIs"
16
10
  s.email = "piers@varyonic.com"
17
11
  s.extra_rdoc_files = [
@@ -46,31 +40,10 @@ Gem::Specification.new do |s|
46
40
  s.rubygems_version = "2.4.8"
47
41
  s.summary = "Unofficial ruby wrapper for the Lime Light CRM APIs."
48
42
 
49
- if s.respond_to? :specification_version then
50
- s.specification_version = 4
51
-
52
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
- s.add_development_dependency(%q<minitest>, [">= 0"])
54
- s.add_development_dependency(%q<yard>, ["~> 0.7"])
55
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
56
- s.add_development_dependency(%q<bundler>, ["~> 1.0"])
57
- s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
58
- s.add_development_dependency(%q<simplecov>, [">= 0"])
59
- else
60
- s.add_dependency(%q<minitest>, [">= 0"])
61
- s.add_dependency(%q<yard>, ["~> 0.7"])
62
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
63
- s.add_dependency(%q<bundler>, ["~> 1.0"])
64
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
65
- s.add_dependency(%q<simplecov>, [">= 0"])
66
- end
67
- else
68
- s.add_dependency(%q<minitest>, [">= 0"])
69
- s.add_dependency(%q<yard>, ["~> 0.7"])
70
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
71
- s.add_dependency(%q<bundler>, ["~> 1.0"])
72
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
73
- s.add_dependency(%q<simplecov>, [">= 0"])
74
- end
43
+ s.add_development_dependency(%q<minitest>, ["~> 0"])
44
+ s.add_development_dependency(%q<yard>, ["~> 0.7"])
45
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
46
+ s.add_development_dependency(%q<bundler>, ["~> 1.0"])
47
+ s.add_development_dependency(%q<simplecov>, ["~> 0"])
75
48
  end
76
49
 
@@ -3,6 +3,8 @@ require 'helper'
3
3
  include Lipstick::Fixtures
4
4
 
5
5
  describe 'Lipstick::Api::Session' do
6
+ i_suck_and_my_tests_are_order_dependent!
7
+
6
8
  before(:each) do
7
9
  params = fixtures(:credentials)
8
10
  params[:logger] = Logger.new(STDOUT) if ENV['DEBUG_LIPSTICK'] == 'true'
@@ -22,9 +24,10 @@ describe 'Lipstick::Api::Session' do
22
24
  describe '#campaign_view' do
23
25
  it 'fetches attributes of a campaign' do
24
26
  api_response = @session.campaign_find_active
27
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
25
28
  campaign_id = api_response.campaign_id.sample
26
29
  api_response = @session.campaign_view(campaign_id)
27
- assert api_response.code == 100
30
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
28
31
  assert api_response.product_id.is_a?(Array)
29
32
  assert api_response.shipping_id.is_a?(Array)
30
33
  end
@@ -51,6 +54,7 @@ describe 'Lipstick::Api::Session' do
51
54
  end
52
55
  before (:all) do
53
56
  api_response = @session.campaign_find_active
57
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
54
58
  @campaign_id = api_response.campaign_id.sample
55
59
  @campaign = @session.campaign_view(@campaign_id)
56
60
  @product_id = @campaign.product_id.sample
@@ -61,7 +65,7 @@ describe 'Lipstick::Api::Session' do
61
65
  describe '#new_order' do
62
66
  it 'creates order' do
63
67
  api_response = @session.new_order(order_params)
64
- assert api_response.code == 100
68
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
65
69
  assert api_response.test, "Expected #{api_response.test.inspect} to be true"
66
70
  assert api_response.customer_id.is_a?(Integer), "Expected #{api_response.customer_id.inspect} to be an integer"
67
71
  assert api_response.order_id.is_a?(Integer)
@@ -73,6 +77,7 @@ describe 'Lipstick::Api::Session' do
73
77
  context 'existing order' do
74
78
  before (:all) do
75
79
  api_response = @session.new_order(order_params)
80
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
76
81
  @order_id = api_response.order_id
77
82
  @customer_id = api_response.customer_id
78
83
  end
@@ -80,7 +85,7 @@ describe 'Lipstick::Api::Session' do
80
85
  describe '#customer_find_active_product' do
81
86
  it 'fetches product ids' do
82
87
  api_response = @session.customer_find_active_product(@customer_id)
83
- assert api_response.code == 100
88
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
84
89
  assert api_response.product_ids.is_a?(Array)
85
90
  assert api_response.product_ids[0].is_a?(Integer)
86
91
  end
@@ -98,7 +103,7 @@ describe 'Lipstick::Api::Session' do
98
103
  describe '#order_refund' do
99
104
  it 'refunds the customer' do
100
105
  api_response = @session.order_refund(@order_id, 0.01)
101
- assert api_response.code == 100
106
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
102
107
  end
103
108
  end
104
109
 
@@ -112,13 +117,14 @@ describe 'Lipstick::Api::Session' do
112
117
  describe '#order_update1' do
113
118
  it 'posts chages to an order' do
114
119
  api_response = @session.order_update(@order_id, :tracking_number, 'LC123456789012345678US')
115
- assert api_response.code == 100
120
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
116
121
  end
117
122
  end
118
123
 
119
124
  context 'updated order' do
120
125
  before (:each) do
121
126
  api_response = @session.order_update(@order_id, :tracking_number, 'LC123456789012345678US')
127
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
122
128
  end
123
129
 
124
130
  describe '#order_find_updated' do
@@ -135,6 +141,7 @@ describe 'Lipstick::Api::Session' do
135
141
  context 'new order' do
136
142
  before (:each) do
137
143
  api_response = @session.new_order(order_params)
144
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
138
145
  @new_order_id = api_response.order_id
139
146
  end
140
147
 
@@ -157,7 +164,7 @@ describe 'Lipstick::Api::Session' do
157
164
  describe '#shipping_method_find' do
158
165
  it 'finds shipping methods' do
159
166
  api_response = @session.shipping_method_find
160
- assert api_response.code == 100
167
+ assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
161
168
  assert api_response.shipping_ids.is_a?(Array)
162
169
  assert api_response.shipping_ids[0].is_a?(Integer)
163
170
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lipstick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piers Chambers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-30 00:00:00.000000000 Z
11
+ date: 2017-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
@@ -66,32 +66,18 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: jeweler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 2.0.1
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 2.0.1
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: simplecov
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - ">="
73
+ - - "~>"
88
74
  - !ruby/object:Gem::Version
89
75
  version: '0'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - ">="
80
+ - - "~>"
95
81
  - !ruby/object:Gem::Version
96
82
  version: '0'
97
83
  description: Unofficial ruby wrapper for the Lime Light CRM membership and transaction
@@ -144,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
130
  version: '0'
145
131
  requirements: []
146
132
  rubyforge_project:
147
- rubygems_version: 2.4.8
133
+ rubygems_version: 2.6.11
148
134
  signing_key:
149
135
  specification_version: 4
150
136
  summary: Unofficial ruby wrapper for the Lime Light CRM APIs.