castle-rb 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/castle-rb.rb +51 -0
  3. data/lib/{castle → castle-rb}/client.rb +0 -0
  4. data/lib/{castle → castle-rb}/configuration.rb +0 -0
  5. data/lib/{castle → castle-rb}/errors.rb +0 -0
  6. data/lib/{castle → castle-rb}/ext/her.rb +0 -0
  7. data/lib/{castle → castle-rb}/jwt.rb +0 -0
  8. data/lib/{castle → castle-rb}/models/account.rb +0 -0
  9. data/lib/{castle → castle-rb}/models/backup_codes.rb +0 -0
  10. data/lib/{castle → castle-rb}/models/challenge.rb +0 -0
  11. data/lib/{castle → castle-rb}/models/context.rb +0 -0
  12. data/lib/{castle → castle-rb}/models/event.rb +0 -0
  13. data/lib/{castle → castle-rb}/models/model.rb +0 -0
  14. data/lib/{castle → castle-rb}/models/monitoring.rb +0 -0
  15. data/lib/{castle → castle-rb}/models/pairing.rb +0 -0
  16. data/lib/{castle → castle-rb}/models/recommendation.rb +0 -0
  17. data/lib/{castle → castle-rb}/models/session.rb +0 -0
  18. data/lib/{castle → castle-rb}/models/trusted_device.rb +0 -0
  19. data/lib/{castle → castle-rb}/models/user.rb +0 -0
  20. data/lib/{castle → castle-rb}/request.rb +0 -0
  21. data/lib/{castle → castle-rb}/session_store.rb +0 -0
  22. data/lib/{castle → castle-rb}/session_token.rb +0 -0
  23. data/lib/{castle → castle-rb}/support/cookie_store.rb +0 -0
  24. data/lib/{castle → castle-rb}/support/padrino.rb +0 -0
  25. data/lib/{castle → castle-rb}/support/rails.rb +0 -0
  26. data/lib/{castle → castle-rb}/support/sinatra.rb +0 -0
  27. data/lib/{castle → castle-rb}/token_store.rb +0 -0
  28. data/lib/{castle → castle-rb}/utils.rb +0 -0
  29. data/lib/castle-rb/version.rb +3 -0
  30. data/spec/spec_helper.rb +1 -1
  31. metadata +30 -30
  32. data/lib/castle.rb +0 -51
  33. data/lib/castle/version.rb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da65c9def9b0ff8c49dc58216030b24656a4c73c
4
- data.tar.gz: 7c8dacb82d986baf51a16adac10dc6cc86d3a909
3
+ metadata.gz: 044f4df4fdec6a5c05cac418db767b783ade84bf
4
+ data.tar.gz: 5ad7cc7f684515c57a497f5e7c672c09b81c99c7
5
5
  SHA512:
6
- metadata.gz: 17364b5ee431f2b715708b19e495c96bcea331cc0c8b537aa0ad819d7ac71d746777f88555026772b2c4d107dc8c930912badf5733a3576fbdad9c3baa459d23
7
- data.tar.gz: 8b1abb0fbee5840e9f8fb8e3a9b5cef3e1b217e2c2bc817e3e215d7aa73237f64eb57b9e375cada367672312b876b9c81e83b4696b2fb1d93b510d0af1295a7c
6
+ metadata.gz: 1bb216d7e733031e7fe10fe9b9a367e7c40b7f2c2b1047c0a521d7d12cc2edaf717e104d8b29b9da9e71856446b58a6472c86b774ab386fe9d2208e6bc581948
7
+ data.tar.gz: aa1f6b64f72947412abf27b952914052332279cdd9af7db70f3a6a261f905c3a246eb436dbe4edbed1b941fb23de318418481aa513cb62bacca289219b5e070b
data/lib/castle-rb.rb ADDED
@@ -0,0 +1,51 @@
1
+ require 'her'
2
+ require 'castle-rb/ext/her'
3
+ require 'faraday_middleware'
4
+ require 'multi_json'
5
+ require 'openssl'
6
+ require 'net/http'
7
+ require 'request_store'
8
+ require 'active_support/core_ext/hash/indifferent_access'
9
+
10
+ require 'castle-rb/version'
11
+
12
+ require 'castle-rb/configuration'
13
+ require 'castle-rb/client'
14
+ require 'castle-rb/errors'
15
+ require 'castle-rb/token_store'
16
+ require 'castle-rb/jwt'
17
+ require 'castle-rb/utils'
18
+ require 'castle-rb/request'
19
+ require 'castle-rb/session_token'
20
+
21
+ require 'castle-rb/support/cookie_store'
22
+ require 'castle-rb/support/rails' if defined?(Rails::Railtie)
23
+ if defined?(Sinatra::Base)
24
+ if defined?(Padrino)
25
+ require 'castle-rb/support/padrino'
26
+ else
27
+ require 'castle-rb/support/sinatra'
28
+ end
29
+ end
30
+
31
+ module Castle
32
+ API = Castle.setup_api
33
+
34
+ def self.secure_encode(properties = {})
35
+ ::JWT.encode(properties, Castle.config.api_secret)
36
+ end
37
+ end
38
+
39
+ # These need to be required after setting up Her
40
+ require 'castle-rb/models/model'
41
+ require 'castle-rb/models/account'
42
+ require 'castle-rb/models/event'
43
+ require 'castle-rb/models/challenge'
44
+ require 'castle-rb/models/context'
45
+ require 'castle-rb/models/monitoring'
46
+ require 'castle-rb/models/pairing'
47
+ require 'castle-rb/models/backup_codes'
48
+ require 'castle-rb/models/recommendation'
49
+ require 'castle-rb/models/session'
50
+ require 'castle-rb/models/trusted_device'
51
+ require 'castle-rb/models/user'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ module Castle
2
+ VERSION = "1.0.7"
3
+ end
data/spec/spec_helper.rb CHANGED
@@ -14,7 +14,7 @@ SimpleCov.start do
14
14
  add_filter 'spec'
15
15
  end
16
16
 
17
- require 'castle'
17
+ require 'castle-rb'
18
18
 
19
19
  VCR.configure do |config|
20
20
  config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: castle-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: her
@@ -186,34 +186,34 @@ extensions: []
186
186
  extra_rdoc_files: []
187
187
  files:
188
188
  - README.md
189
- - lib/castle.rb
190
- - lib/castle/client.rb
191
- - lib/castle/configuration.rb
192
- - lib/castle/errors.rb
193
- - lib/castle/ext/her.rb
194
- - lib/castle/jwt.rb
195
- - lib/castle/models/account.rb
196
- - lib/castle/models/backup_codes.rb
197
- - lib/castle/models/challenge.rb
198
- - lib/castle/models/context.rb
199
- - lib/castle/models/event.rb
200
- - lib/castle/models/model.rb
201
- - lib/castle/models/monitoring.rb
202
- - lib/castle/models/pairing.rb
203
- - lib/castle/models/recommendation.rb
204
- - lib/castle/models/session.rb
205
- - lib/castle/models/trusted_device.rb
206
- - lib/castle/models/user.rb
207
- - lib/castle/request.rb
208
- - lib/castle/session_store.rb
209
- - lib/castle/session_token.rb
210
- - lib/castle/support/cookie_store.rb
211
- - lib/castle/support/padrino.rb
212
- - lib/castle/support/rails.rb
213
- - lib/castle/support/sinatra.rb
214
- - lib/castle/token_store.rb
215
- - lib/castle/utils.rb
216
- - lib/castle/version.rb
189
+ - lib/castle-rb.rb
190
+ - lib/castle-rb/client.rb
191
+ - lib/castle-rb/configuration.rb
192
+ - lib/castle-rb/errors.rb
193
+ - lib/castle-rb/ext/her.rb
194
+ - lib/castle-rb/jwt.rb
195
+ - lib/castle-rb/models/account.rb
196
+ - lib/castle-rb/models/backup_codes.rb
197
+ - lib/castle-rb/models/challenge.rb
198
+ - lib/castle-rb/models/context.rb
199
+ - lib/castle-rb/models/event.rb
200
+ - lib/castle-rb/models/model.rb
201
+ - lib/castle-rb/models/monitoring.rb
202
+ - lib/castle-rb/models/pairing.rb
203
+ - lib/castle-rb/models/recommendation.rb
204
+ - lib/castle-rb/models/session.rb
205
+ - lib/castle-rb/models/trusted_device.rb
206
+ - lib/castle-rb/models/user.rb
207
+ - lib/castle-rb/request.rb
208
+ - lib/castle-rb/session_store.rb
209
+ - lib/castle-rb/session_token.rb
210
+ - lib/castle-rb/support/cookie_store.rb
211
+ - lib/castle-rb/support/padrino.rb
212
+ - lib/castle-rb/support/rails.rb
213
+ - lib/castle-rb/support/sinatra.rb
214
+ - lib/castle-rb/token_store.rb
215
+ - lib/castle-rb/utils.rb
216
+ - lib/castle-rb/version.rb
217
217
  - spec/fixtures/vcr_cassettes/challenge_create.yml
218
218
  - spec/fixtures/vcr_cassettes/challenge_verify.yml
219
219
  - spec/fixtures/vcr_cassettes/session_create.yml
data/lib/castle.rb DELETED
@@ -1,51 +0,0 @@
1
- require 'her'
2
- require 'castle/ext/her'
3
- require 'faraday_middleware'
4
- require 'multi_json'
5
- require 'openssl'
6
- require 'net/http'
7
- require 'request_store'
8
- require 'active_support/core_ext/hash/indifferent_access'
9
-
10
- require 'castle/version'
11
-
12
- require 'castle/configuration'
13
- require 'castle/client'
14
- require 'castle/errors'
15
- require 'castle/token_store'
16
- require 'castle/jwt'
17
- require 'castle/utils'
18
- require 'castle/request'
19
- require 'castle/session_token'
20
-
21
- require 'castle/support/cookie_store'
22
- require 'castle/support/rails' if defined?(Rails::Railtie)
23
- if defined?(Sinatra::Base)
24
- if defined?(Padrino)
25
- require 'castle/support/padrino'
26
- else
27
- require 'castle/support/sinatra'
28
- end
29
- end
30
-
31
- module Castle
32
- API = Castle.setup_api
33
-
34
- def self.secure_encode(properties = {})
35
- ::JWT.encode(properties, Castle.config.api_secret)
36
- end
37
- end
38
-
39
- # These need to be required after setting up Her
40
- require 'castle/models/model'
41
- require 'castle/models/account'
42
- require 'castle/models/event'
43
- require 'castle/models/challenge'
44
- require 'castle/models/context'
45
- require 'castle/models/monitoring'
46
- require 'castle/models/pairing'
47
- require 'castle/models/backup_codes'
48
- require 'castle/models/recommendation'
49
- require 'castle/models/session'
50
- require 'castle/models/trusted_device'
51
- require 'castle/models/user'
@@ -1,3 +0,0 @@
1
- module Castle
2
- VERSION = "1.0.6"
3
- end