ixtlan-core 0.7.5 → 0.8.0

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.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Ixtlan #
2
2
 
3
3
  this gem adds more security related headers to the response for a rails3 application. mainly inspired by
4
- [google-gets-a-1-for-browser-security](http://www.barracudalabs.com/wordpress/index.php/2011/07/21/google-gets-a-1-for-browser-security-3/)
4
+ [google-gets-a-1-for-browser-security](http://www.barracudalabs.com/wordpress/index.php/2011/07/21/)
5
5
  and
6
6
  [HttpCaching](http://code.google.com/p/doctype/wiki/ArticleHttpCaching).
7
7
  and
@@ -0,0 +1,3 @@
1
+ if defined?(Rails)
2
+ require 'ixtlan/core/railtie'
3
+ end
@@ -0,0 +1,3 @@
1
+ if defined?(Rails)
2
+ require 'ixtlan/core/railtie'
3
+ end
@@ -3,8 +3,6 @@ require 'ixtlan/core/cache_headers'
3
3
  require 'ixtlan/core/x_frame_headers'
4
4
  require 'ixtlan/core/x_content_type_headers'
5
5
  require 'ixtlan/core/x_xss_protection_headers'
6
- require 'ixtlan/core/active_record'
7
- require 'ixtlan/core/data_mapper'
8
6
  require 'ixtlan/core/configuration_rack'
9
7
  require 'ixtlan/core/configuration_manager'
10
8
  module Ixtlan
@@ -62,17 +60,6 @@ module Ixtlan
62
60
 
63
61
  config.after_initialize do |app|
64
62
  app.config.configuration_manager.setup(app.config.configuration_model) if app.config.respond_to? :configuration_model
65
-
66
- if defined? ::DataMapper
67
-
68
- ::DataMapper::Model.append_inclusions(Ixtlan::Core::DataMapper)
69
-
70
- elsif defined? ::ActiveRecord
71
-
72
- ::ActiveRecord::Base.send(:include,
73
- Ixtlan::Core::ActiveRecord)
74
-
75
- end
76
63
  end
77
64
  end
78
65
  end
metadata CHANGED
@@ -1,86 +1,124 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ixtlan-core
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 63
4
5
  prerelease:
5
- version: 0.7.5
6
+ segments:
7
+ - 0
8
+ - 8
9
+ - 0
10
+ version: 0.8.0
6
11
  platform: ruby
7
12
  authors:
8
- - mkristian
13
+ - mkristian
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2012-07-03 00:00:00 Z
18
+ date: 2013-01-16 00:00:00 Z
14
19
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: slf4r
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
23
- version: 0.4.2
24
- type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: ixtlan-generators
28
- prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - "="
33
- - !ruby/object:Gem::Version
34
- version: 0.1.2
35
- type: :development
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: rails
39
- prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - "="
44
- - !ruby/object:Gem::Version
45
- version: 3.0.9
46
- type: :development
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: rspec
50
- prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - "="
55
- - !ruby/object:Gem::Version
56
- version: 2.6.0
57
- type: :development
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
60
- name: cucumber
61
- prerelease: false
62
- requirement: &id005 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - "="
66
- - !ruby/object:Gem::Version
67
- version: 0.9.4
68
- type: :development
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
71
- name: ruby-maven
72
- prerelease: false
73
- requirement: &id006 !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - "="
77
- - !ruby/object:Gem::Version
78
- version: 3.0.4.0.29.0
79
- type: :development
80
- version_requirements: *id006
20
+ - !ruby/object:Gem::Dependency
21
+ name: slf4r
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 11
29
+ segments:
30
+ - 0
31
+ - 4
32
+ - 2
33
+ version: 0.4.2
34
+ type: :development
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: ixtlan-generators
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - "="
43
+ - !ruby/object:Gem::Version
44
+ hash: 31
45
+ segments:
46
+ - 0
47
+ - 1
48
+ - 2
49
+ version: 0.1.2
50
+ type: :development
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: rails
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - "="
59
+ - !ruby/object:Gem::Version
60
+ hash: 21
61
+ segments:
62
+ - 3
63
+ - 0
64
+ - 9
65
+ version: 3.0.9
66
+ type: :development
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ name: rspec
70
+ prerelease: false
71
+ requirement: &id004 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - "="
75
+ - !ruby/object:Gem::Version
76
+ hash: 23
77
+ segments:
78
+ - 2
79
+ - 6
80
+ - 0
81
+ version: 2.6.0
82
+ type: :development
83
+ version_requirements: *id004
84
+ - !ruby/object:Gem::Dependency
85
+ name: cucumber
86
+ prerelease: false
87
+ requirement: &id005 !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - "="
91
+ - !ruby/object:Gem::Version
92
+ hash: 51
93
+ segments:
94
+ - 0
95
+ - 9
96
+ - 4
97
+ version: 0.9.4
98
+ type: :development
99
+ version_requirements: *id005
100
+ - !ruby/object:Gem::Dependency
101
+ name: ruby-maven
102
+ prerelease: false
103
+ requirement: &id006 !ruby/object:Gem::Requirement
104
+ none: false
105
+ requirements:
106
+ - - "="
107
+ - !ruby/object:Gem::Version
108
+ hash: 331
109
+ segments:
110
+ - 3
111
+ - 0
112
+ - 4
113
+ - 0
114
+ - 29
115
+ - 0
116
+ version: 3.0.4.0.29.0
117
+ type: :development
118
+ version_requirements: *id006
81
119
  description: cache header control, dynamic configuration, and optimistic find on model via updated_at timestamp
82
120
  email:
83
- - m.kristian@web.de
121
+ - m.kristian@web.de
84
122
  executables: []
85
123
 
86
124
  extensions: []
@@ -88,70 +126,76 @@ extensions: []
88
126
  extra_rdoc_files: []
89
127
 
90
128
  files:
91
- - MIT-LICENSE
92
- - README.md
93
- - lib/ixtlan-core.rb
94
- - lib/ixtlan/core/x_xss_protection_headers.rb~
95
- - lib/ixtlan/core/x_frame_headers.rb
96
- - lib/ixtlan/core/active_record.rb
97
- - lib/ixtlan/core/configuration_rack.rb
98
- - lib/ixtlan/core/x_content_headers.rb~
99
- - lib/ixtlan/core/data_mapper.rb~
100
- - lib/ixtlan/core/active_record.rb~
101
- - lib/ixtlan/core/extra_headers.rb
102
- - lib/ixtlan/core/x_content_type_headers.rb
103
- - lib/ixtlan/core/x_content_type_headers.rb~
104
- - lib/ixtlan/core/cache_headers.rb
105
- - lib/ixtlan/core/optimistic_data_mapper.rb~
106
- - lib/ixtlan/core/data_mapper.rb
107
- - lib/ixtlan/core/heartbeat.rb
108
- - lib/ixtlan/core/x_xss_protection_headers.rb
109
- - lib/ixtlan/core/optimistic_active_record.rb~
110
- - lib/ixtlan/core/railtie.rb
111
- - lib/ixtlan/core/configuration_manager.rb
112
- - lib/ixtlan/core/controllers/configuration_controller.rb
113
- - lib/ixtlan/core/controllers/configuration_controller.rb~
114
- - spec/cache_headers_spec.rb~
115
- - spec/controller.rb
116
- - spec/controller.rb~
117
- - spec/cache_headers_spec.rb
118
- - spec/x_headers_spec.rb~
119
- - spec/x_headers_spec.rb
120
- - spec/configuration_manager_spec.rb~
121
- - spec/configuration_manager_spec.rb
122
- - features/step_definitions/simple_steps.rb
123
- - features/headers.feature
129
+ - MIT-LICENSE
130
+ - README.md
131
+ - lib/ixtlan-core.rb
132
+ - lib/ixtlan/core/x_xss_protection_headers.rb~
133
+ - lib/ixtlan/core/x_frame_headers.rb
134
+ - lib/ixtlan/core/configuration_rack.rb
135
+ - lib/ixtlan/core/x_content_headers.rb~
136
+ - lib/ixtlan/core/data_mapper.rb~
137
+ - lib/ixtlan/core/active_record.rb~
138
+ - lib/ixtlan/core/extra_headers.rb
139
+ - lib/ixtlan/core/x_content_type_headers.rb
140
+ - lib/ixtlan/core/x_content_type_headers.rb~
141
+ - lib/ixtlan/core/cache_headers.rb
142
+ - lib/ixtlan/core/optimistic_data_mapper.rb~
143
+ - lib/ixtlan/core/controllers/configuration_controller.rb
144
+ - lib/ixtlan/core/controllers/configuration_controller.rb~
145
+ - lib/ixtlan/core/heartbeat.rb
146
+ - lib/ixtlan/core/x_xss_protection_headers.rb
147
+ - lib/ixtlan/core/optimistic_active_record.rb~
148
+ - lib/ixtlan/core/railtie.rb
149
+ - lib/ixtlan/core/configuration_manager.rb
150
+ - lib/ixtlan/core.rb~
151
+ - lib/ixtlan/core.rb
152
+ - spec/cache_headers_spec.rb~
153
+ - spec/controller.rb
154
+ - spec/controller.rb~
155
+ - spec/cache_headers_spec.rb
156
+ - spec/x_headers_spec.rb~
157
+ - spec/x_headers_spec.rb
158
+ - spec/configuration_manager_spec.rb~
159
+ - spec/configuration_manager_spec.rb
160
+ - features/step_definitions/simple_steps.rb
161
+ - features/headers.feature
124
162
  homepage: http://github.com/mkristian/ixtlan-core
125
163
  licenses:
126
- - MIT-LICENSE
164
+ - MIT-LICENSE
127
165
  post_install_message:
128
166
  rdoc_options:
129
- - --main
130
- - README.md
167
+ - --main
168
+ - README.md
131
169
  require_paths:
132
- - lib
170
+ - lib
133
171
  required_ruby_version: !ruby/object:Gem::Requirement
134
172
  none: false
135
173
  requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: "0"
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ hash: 3
177
+ segments:
178
+ - 0
179
+ version: "0"
139
180
  required_rubygems_version: !ruby/object:Gem::Requirement
140
181
  none: false
141
182
  requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- version: "0"
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ hash: 3
186
+ segments:
187
+ - 0
188
+ version: "0"
145
189
  requirements: []
146
190
 
147
191
  rubyforge_project:
148
- rubygems_version: 1.8.24
192
+ rubygems_version: 1.8.15
149
193
  signing_key:
150
194
  specification_version: 3
151
195
  summary: cache header control, dynamic configuration, and optimistic find on model via updated_at timestamp
152
196
  test_files:
153
- - spec/cache_headers_spec.rb
154
- - spec/x_headers_spec.rb
155
- - spec/configuration_manager_spec.rb
156
- - features/headers.feature
157
- - features/step_definitions/simple_steps.rb
197
+ - spec/cache_headers_spec.rb
198
+ - spec/x_headers_spec.rb
199
+ - spec/configuration_manager_spec.rb
200
+ - features/headers.feature
201
+ - features/step_definitions/simple_steps.rb
@@ -1,25 +0,0 @@
1
- module Ixtlan
2
- module Core
3
- module ActiveRecord
4
-
5
- def self.included(base)
6
- warn 'deprecated: use ixtlan-optimistic instead'
7
- base.class_eval do
8
-
9
- def self.optimistic_find(updated_at, *args)
10
- if updated_at
11
- dummy = self.new
12
- dummy.updated_at = updated_at
13
- updated_at_date = dummy.updated_at
14
- # try different ways to use the date
15
- # TODO maybe there is a nicer way ??
16
- first(:conditions => ["id = ? and updated_at <= ? and updated_at >= ?", args[0], updated_at_date + 0.0005, updated_at_date - 0.0005])
17
- # TODO make it work with different PKs
18
- end
19
- end
20
-
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,22 +0,0 @@
1
- module Ixtlan
2
- module Core
3
- module DataMapper
4
-
5
- def self.included(base)
6
- warn 'deprecated: use ixtlan-optimistic instead'
7
- base.class_eval do
8
-
9
- def self.optimistic_get(updated_at, *args)
10
- if updated_at
11
- updated_at_date = new(:updated_at => updated_at).updated_at
12
- # TODO make it work with different PKs
13
- first(:id => args[0], :updated_at.gte => updated_at_date - 0.0005, :updated_at.lte => updated_at_date + 0.0005)
14
- end
15
- end
16
- end
17
-
18
- end
19
-
20
- end
21
- end
22
- end