slurp 0.0.2 → 0.0.3

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/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use 1.9.3-p194-perf@slurp --create
@@ -0,0 +1,11 @@
1
+ defaults: &defaults
2
+ adapter: sqlite3
3
+ database: ":memory:"
4
+ verbosity: quiet
5
+
6
+ development:
7
+ <<: *defaults
8
+
9
+ test:
10
+ <<: *defaults
11
+
@@ -0,0 +1,10 @@
1
+ module Rails
2
+ class Application
3
+ class Configuration
4
+ def database_configuration
5
+ db_config = File.join(File.dirname(__FILE__), '..', '..', 'config', 'database.yml')
6
+ YAML::load(ERB.new(IO.read(db_config)).result)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,20 @@
1
+ require 'slurp'
2
+ require 'rails'
3
+
4
+ module Slurp
5
+ class Railtie < Rails::Railtie
6
+
7
+ if ENV['SLURP'] == '1'
8
+ config.before_initialize do
9
+ load File.join(File.dirname(__FILE__), 'configuration_extension.rb')
10
+ end
11
+
12
+ config.after_initialize do
13
+ if Rails.configuration.database_configuration[Rails.env]['database'] == ':memory:'
14
+ load "#{Rails.root}/db/schema.rb"
15
+ end
16
+ end
17
+ end
18
+
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module Slurp
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -13,9 +13,6 @@ Gem::Specification.new do |gem|
13
13
  gem.homepage = "http://github.com/vaskas/slurp"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
19
16
 
20
17
  gem.add_dependency 'rails'
21
18
  gem.add_dependency 'sqlite3'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slurp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -67,11 +67,15 @@ extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
69
  - .gitignore
70
+ - .rvmrc
70
71
  - Gemfile
71
72
  - LICENSE.txt
72
73
  - README.md
73
74
  - Rakefile
75
+ - config/database.yml
74
76
  - lib/slurp.rb
77
+ - lib/slurp/configuration_extension.rb
78
+ - lib/slurp/railtie.rb
75
79
  - lib/slurp/version.rb
76
80
  - slurp.gemspec
77
81
  homepage: http://github.com/vaskas/slurp