reshape 0.1 → 0.1.1
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.
- checksums.yaml +4 -4
- data/examples/config.ru +12 -5
- data/lib/reshape/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f972c334808f97a458c38892049ce1b440c96acd
|
4
|
+
data.tar.gz: 1b1073e896528f9210225f166ea62535a8004fa5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3c8ae33f59d13440e9414afde5ebf2abc8ffa79c3bce2b4aea0f0e768652da344ffedd7a9dfc287f8f53349d566f4d45b360db5d02ef135905a044e5dcbfeed
|
7
|
+
data.tar.gz: 18190ee325d0ea65cf810872407d3606d762f568023aa8ae970cac0f1157accf9ec6aceb08e6b19e3785be5ed8b0266b2dd3684256a5683f227c3fa888038497
|
data/examples/config.ru
CHANGED
@@ -4,8 +4,8 @@ require 'omniauth-shapeways'
|
|
4
4
|
require 'reshape'
|
5
5
|
|
6
6
|
# Get these keys from http://developer.shapeways.com
|
7
|
-
ENV['
|
8
|
-
ENV['
|
7
|
+
ENV['SHAPEWAYS_CONSUMER_KEY'] = ''
|
8
|
+
ENV['SHAPEWAYS_CONSUMER_SECRET'] = ''
|
9
9
|
|
10
10
|
# To run this example:
|
11
11
|
# $ bundle install
|
@@ -18,12 +18,19 @@ class App < Sinatra::Base
|
|
18
18
|
|
19
19
|
get '/auth/:provider/callback' do
|
20
20
|
auth = request.env['omniauth.auth']
|
21
|
+
|
22
|
+
puts '::::'
|
23
|
+
puts auth.credentials.token
|
24
|
+
puts auth.credentials.secret
|
25
|
+
|
21
26
|
client = Reshape::Client.new({
|
22
|
-
consumer_token: ENV['
|
27
|
+
consumer_token: ENV['SHAPEWAYS_CONSUMER_KEY'],
|
23
28
|
consumer_secret: ENV['SHAPEWAYS_CONSUMER_SECRET'],
|
24
29
|
oauth_token: auth.credentials.token,
|
25
|
-
oauth_secret: auth.credentials.secret
|
30
|
+
oauth_secret: auth.credentials.secret,
|
31
|
+
proxy: 'http://localhost:8888'
|
26
32
|
})
|
33
|
+
|
27
34
|
materials = client.materials
|
28
35
|
|
29
36
|
erb "<h1>#{params[:provider]}</h1>
|
@@ -39,7 +46,7 @@ end
|
|
39
46
|
use Rack::Session::Cookie
|
40
47
|
|
41
48
|
use OmniAuth::Builder do
|
42
|
-
provider :shapeways, ENV['
|
49
|
+
provider :shapeways, ENV['SHAPEWAYS_CONSUMER_KEY'], ENV['SHAPEWAYS_CONSUMER_SECRET']
|
43
50
|
end
|
44
51
|
|
45
52
|
run App.new
|
data/lib/reshape/version.rb
CHANGED