lipstick 1.0.0.pre → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODY3NmJjZmI3ODJkODBmMzVmNmMzYjZiYzUxODg2YTg0YjAyYTA2Nw==
5
- data.tar.gz: !binary |-
6
- MDYzZTM4ZWY1ODBkZmI4YjFiODQ2MmMyZmUzYTVjNTAyYzcwYTRjOA==
2
+ SHA1:
3
+ metadata.gz: 7b1a67bcd30dbfbcff960c0c4bfd691c2819df5f
4
+ data.tar.gz: 273db582de5590a51bfa2171ede48c73fbe58af3
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZWY5ZmU4ODM5NGYyMjlhMWQzNDU4ZTg2MTYwZWFhZGI2M2NmZjljMTBkNzZj
10
- YmUzNmY2ZDkwODQwY2I3YWMzNmQ5Zjc3OWM4OTE1Y2U0MDM4MmE1N2YyOGVi
11
- ZDY5MzA3MmJlMWYyY2VhZjk2ZWZjZTA2ZGQ3NzFjNzY1MDIwMGQ=
12
- data.tar.gz: !binary |-
13
- NDNjMTlhYWJhOGYzYmE5NDkxOWY3MWZiYjkyNjZlNjAzMDZiZTIzMmRjOGE2
14
- ODg3MmRmMTcxZWY2ODA5ODEyYTQ5Y2U5M2Q5NjQyNTMwMWQwYmUxNTdlNGJi
15
- M2E4MGZiZDc5YjQzYjIzZTIxYWQ5NTY1MDk0ZGExNzZjYzdkNTU=
6
+ metadata.gz: 4c93662136450e1e57c84b992544b66dde38eaf3c45d3196c0244cf04745b7dc99602445d51eef52513835f8fc4cab43d39eb148d8b874a1eb65c690be8a2856
7
+ data.tar.gz: 358de74adc0fca404cc20f0e8287cadc92c8d6a23eb2a2257ac912d60f0d4e7e980878452122d72440a9c242bc962ec767cb964c9f44a906f03aba8b8212f362
@@ -1,23 +1,22 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.6)
4
+ addressable (2.4.0)
5
5
  builder (3.2.2)
6
6
  descendants_tracker (0.0.4)
7
7
  thread_safe (~> 0.3, >= 0.3.1)
8
8
  docile (1.1.5)
9
- faraday (0.9.0)
9
+ faraday (0.9.2)
10
10
  multipart-post (>= 1.2, < 3)
11
11
  git (1.2.8)
12
- github_api (0.12.2)
13
- addressable (~> 2.3)
12
+ github_api (0.13.1)
13
+ addressable (~> 2.4.0)
14
14
  descendants_tracker (~> 0.0.4)
15
15
  faraday (~> 0.8, < 0.10)
16
- hashie (>= 3.3)
16
+ hashie (>= 3.4)
17
17
  multi_json (>= 1.7.5, < 2.0)
18
- nokogiri (~> 1.6.3)
19
18
  oauth2
20
- hashie (3.3.1)
19
+ hashie (3.4.3)
21
20
  highline (1.6.21)
22
21
  jeweler (2.0.1)
23
22
  builder
@@ -29,21 +28,21 @@ GEM
29
28
  rake
30
29
  rdoc
31
30
  json (1.8.1)
32
- jwt (1.0.0)
33
- mini_portile (0.6.1)
31
+ jwt (1.5.1)
32
+ mini_portile2 (2.0.0)
34
33
  minitest (5.4.2)
35
- multi_json (1.10.1)
34
+ multi_json (1.11.2)
36
35
  multi_xml (0.5.5)
37
36
  multipart-post (2.0.0)
38
- nokogiri (1.6.4.1)
39
- mini_portile (~> 0.6.0)
40
- oauth2 (1.0.0)
37
+ nokogiri (1.6.7.2)
38
+ mini_portile2 (~> 2.0.0.rc2)
39
+ oauth2 (1.1.0)
41
40
  faraday (>= 0.8, < 0.10)
42
- jwt (~> 1.0)
41
+ jwt (~> 1.0, < 1.5.2)
43
42
  multi_json (~> 1.3)
44
43
  multi_xml (~> 0.5)
45
- rack (~> 1.2)
46
- rack (1.5.2)
44
+ rack (>= 1.2, < 3)
45
+ rack (1.6.4)
47
46
  rake (10.3.2)
48
47
  rdoc (3.12.2)
49
48
  json (~> 1.4)
@@ -52,7 +51,7 @@ GEM
52
51
  multi_json (~> 1.0)
53
52
  simplecov-html (~> 0.8.0)
54
53
  simplecov-html (0.8.0)
55
- thread_safe (0.3.4)
54
+ thread_safe (0.3.5)
56
55
  yard (0.8.7.6)
57
56
 
58
57
  PLATFORMS
@@ -0,0 +1,44 @@
1
+ # Lipstick
2
+
3
+ [![Version](https://badge.fury.io/rb/lipstick.svg)](http://badge.fury.io/rb/lipstick)
4
+ [![Downloads](https://img.shields.io/gem/dtv/lipstick.svg?style=flat-square)](https://rubygems.org/gems/lipstick)
5
+ [![Dependency Status](https://gemnasium.com/varyonic/lipstick.svg)](https://gemnasium.com/varyonic/lipstick)
6
+ [![Inline docs](http://inch-ci.org/github/varyonic/lipstick.svg)](http://inch-ci.org/github/varyonic/lipstick)
7
+
8
+ Unofficial ruby wrapper for the following Lime Light CRM APIs:
9
+
10
+ * [Membership API](http://help.limelightcrm.com/entries/317874-Membership-API-Documentation)
11
+ * [Transaction API](http://help.limelightcrm.com/entries/22934241-Transaction-API-Documentation)
12
+
13
+ Note this wrapper attempts to fix some of the inconsistencies in the underlying APIs.
14
+
15
+ Online documentation is available at [rubydoc.info](http://www.rubydoc.info/github/varyonic/lipstick/master/frames)
16
+
17
+ To run the tests you will need your own Lime Light CRM account with a valid campaign and test payment method. Populate ~/.lipstick/fixtures.yml as follows:
18
+
19
+ ```
20
+ credentials:
21
+ url: https://.../admin
22
+ username: ...
23
+ password: ...
24
+ test_card_number: '4...........'
25
+ ```
26
+ Run the tests with:
27
+
28
+ ```
29
+ bundle exec ruby -I lib:test test/test_lipstick.rb -v
30
+ ```
31
+
32
+ ## Contributing to lipstick
33
+
34
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
35
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
36
+ * Fork the project.
37
+ * Start a feature/bugfix branch.
38
+ * Commit and push until you are happy with your contribution.
39
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
40
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
41
+
42
+ Copyright (c) 2014 Piers Chambers and South Beach Skin Care, LLC. See LICENSE.txt for
43
+ further details.
44
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.pre
1
+ 1.0.0
@@ -2,28 +2,28 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: lipstick 1.0.0.pre ruby lib
5
+ # stub: lipstick 1.0.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "lipstick"
9
- s.version = "1.0.0.pre"
9
+ s.version = "1.0.0"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Piers Chambers"]
14
- s.date = "2014-11-28"
14
+ s.date = "2016-05-30"
15
15
  s.description = "Unofficial ruby wrapper for the Lime Light CRM membership and transaction APIs"
16
16
  s.email = "piers@varyonic.com"
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE.txt",
19
- "README.rdoc"
19
+ "README.md"
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
23
23
  "Gemfile",
24
24
  "Gemfile.lock",
25
25
  "LICENSE.txt",
26
- "README.rdoc",
26
+ "README.md",
27
27
  "Rakefile",
28
28
  "VERSION",
29
29
  "lib/lipstick.rb",
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
43
43
  ]
44
44
  s.homepage = "http://github.com/varyonic/lipstick"
45
45
  s.licenses = ["MIT"]
46
- s.rubygems_version = "2.2.2"
46
+ s.rubygems_version = "2.4.8"
47
47
  s.summary = "Unofficial ruby wrapper for the Lime Light CRM APIs."
48
48
 
49
49
  if s.respond_to? :specification_version then
@@ -10,7 +10,7 @@ describe 'Lipstick::Api::Session' do
10
10
  end
11
11
 
12
12
  describe '#campaign_find_active' do
13
- it "finds all active campaigns" do
13
+ it 'finds all active campaigns' do
14
14
  api_response = @session.campaign_find_active
15
15
  assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
16
16
  assert api_response.campaign_id.is_a?(Array)
@@ -20,7 +20,7 @@ describe 'Lipstick::Api::Session' do
20
20
  end
21
21
 
22
22
  describe '#campaign_view' do
23
- it "fetches attributes of a campaign" do
23
+ it 'fetches attributes of a campaign' do
24
24
  api_response = @session.campaign_find_active
25
25
  campaign_id = api_response.campaign_id.sample
26
26
  api_response = @session.campaign_view(campaign_id)
@@ -30,8 +30,8 @@ describe 'Lipstick::Api::Session' do
30
30
  end
31
31
  end
32
32
 
33
- context "sample campaign" do
34
- let (:order_params) {
33
+ context 'sample campaign' do
34
+ let(:order_params) do
35
35
  {
36
36
  campaign_id: @campaign_id,
37
37
  product_id: @product_id,
@@ -42,13 +42,13 @@ describe 'Lipstick::Api::Session' do
42
42
  credit_card_type: @credit_card_type,
43
43
  credit_card_number: fixtures(:test_card_number),
44
44
  expiration_date: '1219',
45
- "CVV" => '123',
45
+ 'CVV' => '123',
46
46
  tran_type: 'NewOrder',
47
47
  shipping_id: @shipping_method_id,
48
48
  ip_address: '127.0.0.1',
49
- upsell_count: 0,
49
+ upsell_count: 0
50
50
  }.update(address('shipping')).update(address('billing'))
51
- }
51
+ end
52
52
  before (:all) do
53
53
  api_response = @session.campaign_find_active
54
54
  @campaign_id = api_response.campaign_id.sample
@@ -59,7 +59,7 @@ describe 'Lipstick::Api::Session' do
59
59
  end
60
60
 
61
61
  describe '#new_order' do
62
- it "creates order" do
62
+ it 'creates order' do
63
63
  api_response = @session.new_order(order_params)
64
64
  assert api_response.code == 100
65
65
  assert api_response.test, "Expected #{api_response.test.inspect} to be true"
@@ -70,7 +70,7 @@ describe 'Lipstick::Api::Session' do
70
70
  end
71
71
  end
72
72
 
73
- context "existing order" do
73
+ context 'existing order' do
74
74
  before (:all) do
75
75
  api_response = @session.new_order(order_params)
76
76
  @order_id = api_response.order_id
@@ -78,7 +78,7 @@ describe 'Lipstick::Api::Session' do
78
78
  end
79
79
 
80
80
  describe '#customer_find_active_product' do
81
- it "fetches product ids" do
81
+ it 'fetches product ids' do
82
82
  api_response = @session.customer_find_active_product(@customer_id)
83
83
  assert api_response.code == 100
84
84
  assert api_response.product_ids.is_a?(Array)
@@ -87,7 +87,7 @@ describe 'Lipstick::Api::Session' do
87
87
  end
88
88
 
89
89
  describe '#order_find' do
90
- it "returns orders matching criteria" do
90
+ it 'returns orders matching criteria' do
91
91
  api_response = @session.order_find(Time.now - 120, Time.now)
92
92
  assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
93
93
  assert api_response.order_ids.is_a?(Array)
@@ -96,14 +96,14 @@ describe 'Lipstick::Api::Session' do
96
96
  end
97
97
 
98
98
  describe '#order_refund' do
99
- it "refunds the customer" do
99
+ it 'refunds the customer' do
100
100
  api_response = @session.order_refund(@order_id, 0.01)
101
101
  assert api_response.code == 100
102
102
  end
103
103
  end
104
104
 
105
105
  describe '#order_view' do
106
- it "returns details of an order" do
106
+ it 'returns details of an order' do
107
107
  api_response = @session.order_view(@order_id)
108
108
  assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
109
109
  end
@@ -116,13 +116,13 @@ describe 'Lipstick::Api::Session' do
116
116
  end
117
117
  end
118
118
 
119
- context "updated order" do
119
+ context 'updated order' do
120
120
  before (:each) do
121
121
  api_response = @session.order_update(@order_id, :tracking_number, 'LC123456789012345678US')
122
122
  end
123
123
 
124
124
  describe '#order_find_updated' do
125
- it "finds updated orders" do
125
+ it 'finds updated orders' do
126
126
  api_response = @session.order_find_updated(Time.now - 128, Time.now)
127
127
  assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
128
128
  assert api_response.order_ids.is_a?(Array)
@@ -132,21 +132,21 @@ describe 'Lipstick::Api::Session' do
132
132
  end
133
133
  end # existing order
134
134
 
135
- context "new order" do
135
+ context 'new order' do
136
136
  before (:each) do
137
137
  api_response = @session.new_order(order_params)
138
138
  @new_order_id = api_response.order_id
139
139
  end
140
140
 
141
141
  describe '#order_update_recurring' do
142
- it "cancels a new order" do
143
- api_response = @session.order_update_recurring(@new_order_id,'stop')
142
+ it 'cancels a new order' do
143
+ api_response = @session.order_update_recurring(@new_order_id, 'stop')
144
144
  assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
145
145
  end
146
146
  end
147
147
 
148
148
  describe '#order_void' do
149
- it "cancels a new order" do
149
+ it 'cancels a new order' do
150
150
  api_response = @session.order_void(@new_order_id)
151
151
  assert api_response.code == 100, "unexpected response: #{api_response.inspect}"
152
152
  end
@@ -155,7 +155,7 @@ describe 'Lipstick::Api::Session' do
155
155
  end # sample campaign
156
156
 
157
157
  describe '#shipping_method_find' do
158
- it "finds shipping methods" do
158
+ it 'finds shipping methods' do
159
159
  api_response = @session.shipping_method_find
160
160
  assert api_response.code == 100
161
161
  assert api_response.shipping_ids.is_a?(Array)
@@ -163,17 +163,17 @@ describe 'Lipstick::Api::Session' do
163
163
  end
164
164
  end
165
165
 
166
- describe "validate_credentials" do
167
- it "returns true if credentials valid" do
166
+ describe 'validate_credentials' do
167
+ it 'returns true if credentials valid' do
168
168
  api_response = @session.validate_credentials
169
- assert api_response.code == 100, "Credentials not valid."
169
+ assert api_response.code == 100, 'Credentials not valid.'
170
170
  end
171
171
 
172
- it "returns false if credentials invalid" do
172
+ it 'returns false if credentials invalid' do
173
173
  invalid_credentials = fixtures(:credentials).merge!(password: 'invalid')
174
174
  @invalid_session = Lipstick::Api::Session.new(invalid_credentials)
175
175
  api_response = @invalid_session.validate_credentials
176
- assert api_response.code == 200, "Invalid credentials not detected."
176
+ assert api_response.code == 200, 'Invalid credentials not detected.'
177
177
  end
178
178
  end
179
179
 
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lipstick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre
4
+ version: 1.0.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: 2014-11-28 00:00:00.000000000 Z
11
+ date: 2016-05-30 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
28
28
  name: yard
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.7'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.12'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.12'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.0.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 2.0.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: Unofficial ruby wrapper for the Lime Light CRM membership and transaction
@@ -101,13 +101,13 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files:
103
103
  - LICENSE.txt
104
- - README.rdoc
104
+ - README.md
105
105
  files:
106
- - .document
106
+ - ".document"
107
107
  - Gemfile
108
108
  - Gemfile.lock
109
109
  - LICENSE.txt
110
- - README.rdoc
110
+ - README.md
111
111
  - Rakefile
112
112
  - VERSION
113
113
  - lib/lipstick.rb
@@ -134,17 +134,17 @@ require_paths:
134
134
  - lib
135
135
  required_ruby_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ! '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - ! '>'
142
+ - - ">="
143
143
  - !ruby/object:Gem::Version
144
- version: 1.3.1
144
+ version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.2.2
147
+ rubygems_version: 2.4.8
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Unofficial ruby wrapper for the Lime Light CRM APIs.
@@ -1,24 +0,0 @@
1
- = Lipstick
2
-
3
- Unofficial ruby wrapper for the following Lime Light CRM APIs:
4
-
5
- * {Membership API}[http://help.limelightcrm.com/entries/317874-Membership-API-Documentation]
6
- * {Transaction API}[http://help.limelightcrm.com/entries/22934241-Transaction-API-Documentation]
7
-
8
- Note this wrapper attempts to fix some of the inconsistencies in the underlying APIs.
9
-
10
- To run the tests you will need your own Lime Light CRM account with a valid campaign and test payment method.
11
-
12
- == Contributing to lipstick
13
-
14
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
15
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
16
- * Fork the project.
17
- * Start a feature/bugfix branch.
18
- * Commit and push until you are happy with your contribution.
19
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
20
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
21
-
22
- Copyright (c) 2014 Piers Chambers and South Beach Skin Care, LLC. See LICENSE.txt for
23
- further details.
24
-