fauna 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,4 @@
1
-
1
+ v0.1.1 Fix ActionDispatch::Reloader bug.
2
2
 
3
3
  v0.1. Refactor resource hierarchy. Add cache. Flesh out ActiveModel
4
4
  support.
@@ -2,11 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "fauna"
5
- s.version = "0.1"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Fauna, Inc."]
9
- s.cert_chain = ["/Users/eweaver/cloudburst/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
10
9
  s.date = "2013-02-08"
11
10
  s.description = "Official Ruby client for the Fauna API."
12
11
  s.email = ""
@@ -17,7 +16,6 @@ Gem::Specification.new do |s|
17
16
  s.require_paths = ["lib"]
18
17
  s.rubyforge_project = "fauna"
19
18
  s.rubygems_version = "1.8.23"
20
- s.signing_key = "/Users/eweaver/cloudburst/configuration/gem_certificates/evan_weaver-original-private_key.pem"
21
19
  s.summary = "Official Ruby client for the Fauna API."
22
20
  s.test_files = ["test/client_test.rb", "test/connection_test.rb", "test/model/association_test.rb", "test/model/class_test.rb", "test/model/follow_test.rb", "test/model/publisher_test.rb", "test/model/timeline_test.rb", "test/model/user_test.rb", "test/model/validation_test.rb", "test/readme_test.rb", "test/test_helper.rb"]
23
21
 
@@ -42,40 +42,47 @@ if defined?(Rails)
42
42
  @silent = true
43
43
  nil
44
44
  end
45
- end
46
-
47
- Fauna.auth!
48
-
49
- # Around filter to set up a default context
50
45
 
51
- if Fauna.connection && defined?(ActionController::Base)
52
- ApplicationController
46
+ # Around filter to set up a default context
53
47
 
54
- class ApplicationController
55
- around_filter :default_fauna_context
48
+ # ActionDispatch's Auto reloader blows away some of Fauna's schema
49
+ # configuration that does not live within the Model classes
50
+ # themselves. Add a callback to Reloader to reload the schema config
51
+ # before each request.
52
+ def self.install_around_filter!
53
+ if Fauna.connection && defined?(ActionController::Base)
54
+ ApplicationController.class_eval do
55
+ around_filter :default_fauna_context
56
56
 
57
- def default_fauna_context
58
- Fauna::Client.context(Fauna.connection) { yield }
57
+ def default_fauna_context
58
+ Fauna::Client.context(Fauna.connection) { yield }
59
+ end
60
+ end
59
61
  end
60
62
  end
61
- end
62
-
63
- # ActionDispatch's Auto reloader blows away some of Fauna's schema
64
- # configuration that does not live within the Model classes
65
- # themselves. Add a callback to Reloader to reload the schema config
66
- # before each request.
67
63
 
68
- if defined? ActionDispatch::Reloader
69
- ActionDispatch::Reloader.to_prepare do
70
- Fauna.configure_schema!
64
+ def self.install_reload_callback!
65
+ if defined? ActionDispatch::Reloader
66
+ ActionDispatch::Reloader.to_prepare do
67
+ Fauna.configure_schema!
68
+ Fauna.install_around_filter!
69
+ end
70
+ end
71
71
  end
72
- end
73
72
 
74
- # ActiveSupport::Inflector's 'humanize' method handles the _id
75
- # suffix for association fields, but not _ref.
76
- if defined? ActiveSupport::Inflector
77
- ActiveSupport::Inflector.inflections do |inflect|
78
- inflect.human /_ref$/i, ''
73
+ def self.install_inflections!
74
+ # ActiveSupport::Inflector's 'humanize' method handles the _id
75
+ # suffix for association fields, but not _ref.
76
+ if defined? ActiveSupport::Inflector
77
+ ActiveSupport::Inflector.inflections do |inflect|
78
+ inflect.human /_ref$/i, ''
79
+ end
80
+ end
79
81
  end
80
82
  end
83
+
84
+ Fauna.auth!
85
+ Fauna.install_around_filter!
86
+ Fauna.install_reload_callback!
87
+ Fauna.install_inflections!
81
88
  end
metadata CHANGED
@@ -1,41 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fauna
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Fauna, Inc.
9
9
  autorequire:
10
10
  bindir: bin
11
- cert_chain:
12
- - !binary |-
13
- LS0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hSdnZIV2NJTWdlZUM0d0RR
30
- WUpLb1pJaHZjTkFRRUZCUUFEZ2dFQkFHTFo3NWpmT0VXOE5zbDI2Q1R0CkpG
31
- cld4UVRjUVQvVWxqZWVmVkUzeFlyN2xjOW9RamJxTzNGT3l1ZWQzcVc3VGFO
32
- RXRaZlNIb1llVVNNWWJwdzEKWEF3b2NJUHVTUkZER000QitoZ1FHVkR4OFBN
33
- R2lKS29tNHFMWGpPNDBVWnNSN1F5Ti91ODY5Vmo0NUxVUm02aApNQmNQZXFD
34
- QVNJK1dOcHJqOSt1WmEya21IaWl0ckZxcWZNQk5sbTVJRmJuOVhlWVN0YTlB
35
- SFZ2czVRUXFWMm01CmhJUGZMcUN5eHNuL1lnT0d2bzZpd3lRVFd5VHN3YW1h
36
- QUMzSFJXWnhJUzFzZm4vU3NxYTdFN29RTWt2NUZBWHIKeDVyS2VQZlhJTmY4
37
- WFRKY3prbDlPQkVZZEU5YU5kSnNKcFhEMGFzTGdHVndCSUNTNUJqb2hwNm1p
38
- ekpjREMxKwp5WjA9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
11
+ cert_chain: []
39
12
  date: 2013-02-08 00:00:00.000000000 Z
40
13
  dependencies:
41
14
  - !ruby/object:Gem::Dependency
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1 +0,0 @@
1
- U7����bf��q��u��D�G����,q�Z�8u6����*����Қ�_�ļ�k/ؑ��.qg�����l�="͏�I+]=\c�