json_voorhees 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4478a2de618d0f1f394dad97b96ea8b80f5b4f3c
4
- data.tar.gz: 51ba36b296823599cf4321aff4f7c4e7c9726f2a
3
+ metadata.gz: 406a76ed292129726c8f3cab15ad4d40c292935e
4
+ data.tar.gz: 7864fb740e76ad8927414721c87cbfc4bc0b485e
5
5
  SHA512:
6
- metadata.gz: f2e3da6c1d2997fb68583987e4049bf9aa6a26c21bfc73a5d588d7ec809554b823daec59d9fab55c88f2c5f399e673266c4a05657b96947e4018b1456a2282b5
7
- data.tar.gz: 75ef0de7b160a5f02be36db51ceae726690cde39b54706961f2effade5bd64fa0f41b9717af60a2e970dbcf130e0dd80114be13b08f26aa9773c890139a5dc9d
6
+ metadata.gz: 2fc2ea7b044075793c004f3367974e60a4b1c9b2884ece2b5a70937822ad9d5d3cb0582fbeb39c5e4734449dda6e5a8f5655c511496780c0669b5183bb09ad9e
7
+ data.tar.gz: 7c516b48e16f50a07274c6259be168cdb3305ac21f058871611172d09925cd5e096387525ce32a3c93321039323079222e70ed4c05382cfcd325e21bf96a174b
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # JsonVoorhees 0.4.0
1
+ # JsonVoorhees 0.5.0
2
2
 
3
3
  ## Introduction
4
4
 
@@ -93,13 +93,11 @@ model, controller, serializer, test and factory created with this tool are
93
93
  versioned. The main app hosts the application controllers and test suite. Everything
94
94
  else resides in engines for good modularity.
95
95
 
96
- ## To Do
96
+ ## Recent Additions
97
97
 
98
- 1. Figure out a better way to test this thing
99
- 2. Use option for namespaced engine or no engine
100
- 3. Maybe give an option to include pagination?
101
- 4. Option for websockets and paperclip?
102
- 5. Make the non defaults easier to user
98
+ If the api has routes that can be accessed without a logged in user, skip
99
+ the authenticate_user filter and call set_hash before the method. Now current_user
100
+ will return the current user or nil and the application will not render a 401.
103
101
 
104
102
  ## Reminder
105
103
 
@@ -112,3 +110,16 @@ class and put before_filters before all of the CRUD actions.
112
110
  Make sure the current_user has the correct permissions.
113
111
 
114
112
  If active admin is used (it is by default) the admin section username is admin and password is password. Otherwise the password is password123.
113
+
114
+ ## To Do
115
+
116
+ 1. Figure out a better way to test this thing
117
+ 2. Use option for namespaced engine or no engine
118
+ 3. Maybe give an option to include pagination?
119
+ 4. Option for websockets and paperclip?
120
+ 5. Make the non defaults easier to user
121
+ 6. Use Devise as the default user and admin user? This will make it easier for users to reset their password as this is already setup.
122
+ 7. Git clone arcadex, type_validator and defcon to make it easier for users to customize?
123
+ 8. Move the people engine into it's own gem?
124
+ 9. Create a whenever task to destroy expired tokens.
125
+ 10. Fix the breadcrumbs link in ActiveAdmin.
@@ -12,21 +12,22 @@ class Api::V1::ApiController < ::ActionController::API
12
12
  nil
13
13
  end
14
14
 
15
- def cors_set_access_control_headers
16
- response.headers['Access-Control-Allow-Origin'] = '*'
17
- response.headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'
18
- response.headers['Access-Control-Allow-Headers'] = 'Origin, Content-Type, Accept, Authorization, Token, Auth-Token, Email'
19
- response.headers['Access-Control-Max-Age'] = "1728000"
20
- end
21
-
22
- def cors_preflight_check
23
- if request.method == 'OPTIONS'
24
- request.headers['Access-Control-Allow-Origin'] = '*'
25
- request.headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'
26
- request.headers['Access-Control-Allow-Headers'] = 'X-Requested-With, X-Prototype-Version, Token, Auth-Token, Email'
27
- request.headers['Access-Control-Max-Age'] = '1728000'
28
- render :text => '', :content_type => 'text/plain'
29
- end
30
- end
15
+ def cors_set_access_control_headers
16
+ response.headers['Access-Control-Allow-Origin'] = '*'
17
+ response.headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'
18
+ response.headers['Access-Control-Allow-Headers'] = '*, Origin, Content-Type, Accept, Authorization, Token, Auth-Token, Email'
19
+ response.headers['Access-Control-Expose-Headers'] = '*'
20
+ response.headers['Access-Control-Max-Age'] = "1728000"
21
+ end
22
+
23
+ def cors_preflight_check
24
+ #if request.method == 'OPTIONS'
25
+ request.headers['Access-Control-Allow-Origin'] = '*'
26
+ request.headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'
27
+ request.headers['Access-Control-Allow-Headers'] = '*, X-Requested-With, X-Prototype-Version, Token, Auth-Token, Email'
28
+ request.headers['Access-Control-Max-Age'] = '1728000'
29
+ render :text => '', :content_type => 'text/plain'
30
+ #end
31
+ end
31
32
 
32
33
  end
@@ -41,7 +41,8 @@ class Api::V1::ApiController < ::ActionController::API
41
41
  def cors_set_access_control_headers
42
42
  response.headers['Access-Control-Allow-Origin'] = '*'
43
43
  response.headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'
44
- response.headers['Access-Control-Allow-Headers'] = 'Origin, Content-Type, Accept, Authorization, Token, Auth-Token, Email'
44
+ response.headers['Access-Control-Allow-Headers'] = '*, Origin, Content-Type, Accept, Authorization, Token, Auth-Token, Email'
45
+ response.headers['Access-Control-Expose-Headers'] = '*'
45
46
  response.headers['Access-Control-Max-Age'] = "1728000"
46
47
  end
47
48
 
@@ -49,7 +50,7 @@ class Api::V1::ApiController < ::ActionController::API
49
50
  #if request.method == 'OPTIONS'
50
51
  request.headers['Access-Control-Allow-Origin'] = '*'
51
52
  request.headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'
52
- request.headers['Access-Control-Allow-Headers'] = 'X-Requested-With, X-Prototype-Version, Token, Auth-Token, Email'
53
+ request.headers['Access-Control-Allow-Headers'] = '*, X-Requested-With, X-Prototype-Version, Token, Auth-Token, Email'
53
54
  request.headers['Access-Control-Max-Age'] = '1728000'
54
55
  render :text => '', :content_type => 'text/plain'
55
56
  #end
@@ -1,3 +1,3 @@
1
1
  module JsonVoorhees
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_voorhees
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cleophus Robinson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-11 00:00:00.000000000 Z
11
+ date: 2014-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails