shipcloud 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/.gitignore +2 -1
- data/.travis.yml +8 -0
- data/Gemfile +0 -5
- data/README.md +1 -2
- data/Rakefile +9 -1
- data/lib/shipcloud.rb +2 -1
- data/lib/shipcloud/request/connection.rb +1 -2
- data/lib/shipcloud/version.rb +1 -1
- data/shipcloud.gemspec +5 -3
- data/spec/shipcloud_spec.rb +13 -2
- metadata +50 -22
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MWU3YzRmZDBmZWQyOTI5ZDJhMDYyMjU2ZTI2NDI0YjI0YTU0OGZjMDczZmIy
|
10
|
-
OTJhZWEyNzMwNDhlYTJjNTgzOTc4NzFkNTlmYmViODU4OTgzZjMzZDkzZmZk
|
11
|
-
N2EzMzdmMjI3ZWUwY2Y3M2Q0M2VjZDhhNGE1Y2NhMTFkZDYwNzc=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZjljMjBjMWIzMjU2ZjgyMTAyZGYzZjg4OTA2ZWJmMGY5ZGVjNzE0OTcyNDBh
|
14
|
-
OTRkYzA3NTZkNmJjNTIxODU4MmNlMzZjODVlMjYzNDFhYzAyOGI4ZTFjMmU0
|
15
|
-
NThlYzdiMWIzOGY2YjY0NTRmZGFhZmM4ODEwMTg4ZjUzNTFjMGY=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 266ce622e2711933494527c5f8399799c1e6e062
|
4
|
+
data.tar.gz: 0fcd0029452c89b96d40bd615fce634c848eff03
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d0981f70cd47a5fcf2e21b4980f22fb371ae9caacf9a23ce03fdad61d15e4534e0f5e9b8e1691dad6460e6ff4869c5971a5359a6065435e55e5199fe4b97d4a5
|
7
|
+
data.tar.gz: 6d4c9c07b4c63f935c2efe521f44e3c65e4c90299384bfd033d7a1222054c76ce91b11a7968d4a917eb89a12d758f0257736120bb70936b0c1ec400d15bc7889
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -25,7 +25,7 @@ Before using the shipcloud API, you need to set the API access key:
|
|
25
25
|
Shipcloud.api_key = 'your-api-key-goes-here'
|
26
26
|
```
|
27
27
|
|
28
|
-
Since Version 0.
|
28
|
+
Since Version 0.4.0, you can also do this via a configuration block, e.g. in an initializer:
|
29
29
|
|
30
30
|
```
|
31
31
|
Shipcloud.configure do |config|
|
@@ -63,4 +63,3 @@ shipment.tracking_url # -> http://track.shipcloud.io/uzdgu22z3ed12
|
|
63
63
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
64
64
|
4. Push to the branch (`git push origin my-new-feature`)
|
65
65
|
5. Create new Pull Request
|
66
|
-
|
data/Rakefile
CHANGED
data/lib/shipcloud.rb
CHANGED
@@ -49,12 +49,13 @@ module Shipcloud
|
|
49
49
|
|
50
50
|
|
51
51
|
class Configuration
|
52
|
-
attr_accessor :api_key, :api_base, :use_ssl
|
52
|
+
attr_accessor :api_key, :api_base, :use_ssl, :debug
|
53
53
|
|
54
54
|
def initialize
|
55
55
|
@api_key = nil
|
56
56
|
@api_base = 'api.shipcloud.io'
|
57
57
|
@use_ssl = true
|
58
|
+
@debug = false
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
@@ -12,12 +12,11 @@ module Shipcloud
|
|
12
12
|
@https = Net::HTTP.new(Shipcloud.configuration.api_base, Net::HTTP.https_default_port)
|
13
13
|
@https.use_ssl = true
|
14
14
|
@https.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
15
|
-
# @https.ca_file = File.join(ROOT_PATH, "data/shipcloud.crt")
|
16
15
|
else
|
17
16
|
@https = Net::HTTP.new(Shipcloud.configuration.api_base, Net::HTTP.http_default_port)
|
18
17
|
@https.use_ssl = false
|
19
18
|
end
|
20
|
-
@https.set_debug_output $stdout
|
19
|
+
@https.set_debug_output $stdout if Shipcloud.configuration.debug
|
21
20
|
end
|
22
21
|
|
23
22
|
def request
|
data/lib/shipcloud/version.rb
CHANGED
data/shipcloud.gemspec
CHANGED
@@ -19,7 +19,9 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "json"
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.6.0'
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.3.0'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 2.99.0'
|
25
|
+
spec.add_development_dependency 'webmock', '~> 1.18.0'
|
26
|
+
spec.add_development_dependency 'pry', '~> 0.10.0'
|
25
27
|
end
|
data/spec/shipcloud_spec.rb
CHANGED
@@ -65,14 +65,25 @@ describe Shipcloud do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
it 'defaults use_ssl to true' do
|
68
|
-
expect(Shipcloud.configuration.use_ssl).to
|
68
|
+
expect(Shipcloud.configuration.use_ssl).to be true
|
69
69
|
end
|
70
70
|
|
71
71
|
it 'overwrites the default ssl mode' do
|
72
72
|
Shipcloud.configure do |config|
|
73
73
|
config.use_ssl = false
|
74
74
|
end
|
75
|
-
expect(Shipcloud.configuration.use_ssl).to
|
75
|
+
expect(Shipcloud.configuration.use_ssl).to be false
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'defaults debug to false' do
|
79
|
+
expect(Shipcloud.configuration.debug).to be false
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'overwrites the default debug mode' do
|
83
|
+
Shipcloud.configure do |config|
|
84
|
+
config.debug = true
|
85
|
+
end
|
86
|
+
expect(Shipcloud.configuration.debug).to be true
|
76
87
|
end
|
77
88
|
end
|
78
89
|
end
|
metadata
CHANGED
@@ -1,71 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipcloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sthollmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
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: :runtime
|
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: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.6.0
|
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
|
-
version:
|
40
|
+
version: 1.6.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 10.3.0
|
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
|
-
version:
|
54
|
+
version: 10.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.99.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
|
-
version:
|
68
|
+
version: 2.99.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.18.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.18.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.10.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.10.0
|
69
97
|
description: A wrapper for the shipcloud API
|
70
98
|
email:
|
71
99
|
- stefan@webionate.de
|
@@ -73,8 +101,9 @@ executables: []
|
|
73
101
|
extensions: []
|
74
102
|
extra_rdoc_files: []
|
75
103
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .rspec
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".travis.yml"
|
78
107
|
- Gemfile
|
79
108
|
- LICENSE.txt
|
80
109
|
- README.md
|
@@ -108,17 +137,17 @@ require_paths:
|
|
108
137
|
- lib
|
109
138
|
required_ruby_version: !ruby/object:Gem::Requirement
|
110
139
|
requirements:
|
111
|
-
- -
|
140
|
+
- - ">="
|
112
141
|
- !ruby/object:Gem::Version
|
113
142
|
version: '0'
|
114
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
144
|
requirements:
|
116
|
-
- -
|
145
|
+
- - ">="
|
117
146
|
- !ruby/object:Gem::Version
|
118
147
|
version: '0'
|
119
148
|
requirements: []
|
120
149
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.0
|
150
|
+
rubygems_version: 2.3.0
|
122
151
|
signing_key:
|
123
152
|
specification_version: 4
|
124
153
|
summary: A wrapper for the shipcloud API
|
@@ -129,4 +158,3 @@ test_files:
|
|
129
158
|
- spec/shipcloud/shipment_spec.rb
|
130
159
|
- spec/shipcloud_spec.rb
|
131
160
|
- spec/spec_helper.rb
|
132
|
-
has_rdoc:
|