mineral 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -1,4 +1,5 @@
1
1
  require 'active_support/ordered_hash'
2
+ require 'mineral/railtie'
2
3
  require 'mineral/response'
3
4
 
4
5
  module Mineral
@@ -6,10 +7,12 @@ module Mineral
6
7
  class Mineral
7
8
 
8
9
  cattr_accessor :mineral_paths
9
- self.mineral_paths = ["#{::Rails.root}/app/mineral"]
10
+ self.mineral_paths = []
10
11
  cattr_accessor :requested_minerals
11
12
 
12
13
  def self.minerals
14
+ mineral_paths << "#{::Rails.root}/app/mineral"
15
+ mineral_paths.uniq!
13
16
  matcher = /#{Regexp.escape('/app/mineral/')}(.*)\.rb\Z/
14
17
  mineral_glob = mineral_paths.map{ |base| "#{base}/**/*.rb" }
15
18
  all_minerals = {}
@@ -0,0 +1,9 @@
1
+ require 'mineral'
2
+
3
+ module Mineral
4
+ class Railtie < Rails::Railtie
5
+ initializer 'mineral.register_middleware' do |app|
6
+ app.config.middleware.insert_before ::ActionDispatch::Flash, Mineral::Rack::Mineral
7
+ end
8
+ end
9
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mineral}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jonbell"]
12
- s.date = %q{2011-09-30}
12
+ s.date = %q{2012-03-30}
13
13
  s.description = %q{Rack metal with a better interface}
14
14
  s.email = %q{jonbell@spamcop.net}
15
15
  s.extra_rdoc_files = [
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
22
22
  "Rakefile",
23
23
  "VERSION",
24
24
  "lib/mineral.rb",
25
+ "lib/mineral/railtie.rb",
25
26
  "lib/mineral/response.rb",
26
27
  "mineral.gemspec",
27
28
  "test/app/mineral/handler.rb",
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
7
+ - 3
8
8
  - 0
9
- version: 0.2.0
9
+ version: 0.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - jonbell
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-09-30 00:00:00 -05:00
17
+ date: 2012-03-30 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -74,6 +74,7 @@ files:
74
74
  - Rakefile
75
75
  - VERSION
76
76
  - lib/mineral.rb
77
+ - lib/mineral/railtie.rb
77
78
  - lib/mineral/response.rb
78
79
  - mineral.gemspec
79
80
  - test/app/mineral/handler.rb