schema_monkey_rails 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -53
- data/lib/schema_monkey_rails.rb +3 -8
- data/lib/schema_monkey_rails/version.rb +1 -1
- metadata +2 -5
- data/lib/schema_monkey_rails/railtie.rb +0 -15
- data/spec/rails_spec.rb +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 950acedc10cbe55ac489e70d924a5ae40ba23be0
|
4
|
+
data.tar.gz: 4d3351bf168ddbbd3215908b0c45727a407e5fc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 900f67ce74ed57cdafe9149c8ea9d23d95e08555fe80c73df53ebb11919a30fe95a1029693b2403ec7eb81058c5c6d6635a285cde5e8aa3b65c0334cbaeac4bf
|
7
|
+
data.tar.gz: 04c8776c4d72faf7c1191dfcffcafc21949620991013fb5c25633cf842c5f9690d87f834798bd7152ffd44c896ff22128651cde9b1f4feca4df9cd8d244ca170
|
data/README.md
CHANGED
@@ -1,57 +1,6 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/schema_monkey_rails.svg)](http://badge.fury.io/rb/schema_monkey_rails)
|
2
|
-
[![Build Status](https://secure.travis-ci.org/SchemaPlus/schema_monkey_rails.svg)](http://travis-ci.org/SchemaPlus/schema_monkey_rails)
|
3
|
-
[![Coverage Status](https://img.shields.io/coveralls/SchemaPlus/schema_monkey_rails.svg)](https://coveralls.io/r/SchemaPlus/schema_monkey_rails)
|
4
|
-
[![Dependency Status](https://gemnasium.com/lomba/schema_monkey_rails.svg)](https://gemnasium.com/SchemaPlus/schema_monkey_rails)
|
5
2
|
|
6
|
-
# SchemaMonkey::Rails
|
7
|
-
|
8
|
-
Arranges to insert [SchemaMonkey](https://github.com/SchemaPlus/schema_monkey) into a rails app--and with it will come all the ActiveRecord extensions based on it that you have included in your app.
|
9
|
-
|
10
|
-
## Installation & Usage
|
11
|
-
|
12
|
-
In your application's Gemfile
|
13
|
-
|
14
|
-
```ruby
|
15
|
-
gem "schema_monkey_rails"
|
16
|
-
```
|
17
|
-
|
18
|
-
That's all you need to do. When the gem is loaded, it will define a Railtie that will insert SchemaMonkey appropriately.
|
19
|
-
|
20
|
-
If `Rails::Railtie` isn't defined, this gem does nothing.
|
21
|
-
|
22
|
-
## Compatibility
|
23
|
-
|
24
|
-
SchemaMonkey::Rails is tested on:
|
25
|
-
|
26
|
-
<!-- SCHEMA_DEV: MATRIX - begin -->
|
27
|
-
<!-- These lines are auto-generated by schema_dev based on schema_dev.yml -->
|
28
|
-
* ruby **2.1.5** with activerecord **4.2**, using **mysql2**, **sqlite3** or **postgresql**
|
29
|
-
|
30
|
-
<!-- SCHEMA_DEV: MATRIX - end -->
|
31
3
|
|
4
|
+
# SchemaMonkey::Rails
|
32
5
|
|
33
|
-
|
34
|
-
|
35
|
-
* 0.1.0 - Initial release
|
36
|
-
|
37
|
-
## Development & Testing
|
38
|
-
|
39
|
-
Are you interested in contributing to SchemaMonkey::Rails? Thanks! Please follow the standard protocol: fork, feature branch, develop, push, and issue pull request.
|
40
|
-
|
41
|
-
Some things to know about to help you develop and test:
|
42
|
-
|
43
|
-
* **schema_dev**: SchemaMonkey::Rails uses [schema_dev](https://github.com/SchemaPlus/schema_dev) to
|
44
|
-
facilitate running rspec tests on the matrix of ruby, activerecord, and database
|
45
|
-
versions that the gem supports, both locally and on
|
46
|
-
[travis-ci](http://travis-ci.org/SchemaPlus/schema_monkey_rails)
|
47
|
-
|
48
|
-
To to run rspec locally on the full matrix, do:
|
49
|
-
|
50
|
-
$ schema_dev bundle install
|
51
|
-
$ schema_dev rspec
|
52
|
-
|
53
|
-
You can also run on just one configuration at a time; For info, see `schema_dev --help` or the [schema_dev](https://github.com/SchemaPlus/schema_dev) README.
|
54
|
-
|
55
|
-
The matrix of configurations is specified in `schema_dev.yml` in
|
56
|
-
the project root.
|
57
|
-
|
6
|
+
This gem is obsolete.
|
data/lib/schema_monkey_rails.rb
CHANGED
@@ -1,9 +1,4 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
module SchemaMonkey
|
4
|
-
module Rails
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
1
|
+
require 'active_support/all'
|
8
2
|
require_relative 'schema_monkey_rails/version'
|
9
|
-
|
3
|
+
|
4
|
+
ActiveSupport::Deprecation.warn "gem schema_monkey_rails is deprecated, it's no longer necessary. You may remove it from your Gemfile/gemspec"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_monkey_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronen barzel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -155,11 +155,9 @@ files:
|
|
155
155
|
- gemfiles/activerecord-4.2/Gemfile.postgresql
|
156
156
|
- gemfiles/activerecord-4.2/Gemfile.sqlite3
|
157
157
|
- lib/schema_monkey_rails.rb
|
158
|
-
- lib/schema_monkey_rails/railtie.rb
|
159
158
|
- lib/schema_monkey_rails/version.rb
|
160
159
|
- schema_dev.yml
|
161
160
|
- schema_monkey_rails.gemspec
|
162
|
-
- spec/rails_spec.rb
|
163
161
|
- spec/spec_helper.rb
|
164
162
|
homepage: https://github.com/SchemaPlus/schema_monkey_rails
|
165
163
|
licenses:
|
@@ -186,5 +184,4 @@ signing_key:
|
|
186
184
|
specification_version: 4
|
187
185
|
summary: Inserts SchemaMonkey into a rails app.
|
188
186
|
test_files:
|
189
|
-
- spec/rails_spec.rb
|
190
187
|
- spec/spec_helper.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module SchemaMonkey::Rails
|
2
|
-
class Railtie < ::Rails::Railtie
|
3
|
-
|
4
|
-
initializer 'schema_monkey.insert', :before => "active_record.initialize_database" do
|
5
|
-
ActiveSupport.on_load(:active_record) do
|
6
|
-
SchemaMonkey.insert
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
rake_tasks do
|
11
|
-
SchemaMonkey::Rake.insert('db:schema:dump', 'db:schema:load')
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
data/spec/rails_spec.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
module Client
|
4
|
-
module ActiveRecord
|
5
|
-
module Base
|
6
|
-
def self.prepended(base)
|
7
|
-
Client.inserted
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.inserted
|
13
|
-
@inserted = true
|
14
|
-
end
|
15
|
-
def self.inserted?
|
16
|
-
@inserted
|
17
|
-
end
|
18
|
-
def self.reset
|
19
|
-
@inserted = false
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
describe SchemaMonkey::Rails do
|
24
|
-
|
25
|
-
before(:all) do
|
26
|
-
# minimial setup for a rails app
|
27
|
-
Kernel.const_set "Dummy", Class.new(Rails::Application) { config.eager_load = true }
|
28
|
-
ENV['DATABASE_URL'] = "#{SchemaDev::Rspec.db_configuration[:adapter]}://localhost/dummy"
|
29
|
-
|
30
|
-
SchemaMonkey.register Client
|
31
|
-
|
32
|
-
Rake.application = Rake::Application.new
|
33
|
-
Rails.application.load_tasks
|
34
|
-
Rails.application.initialize!
|
35
|
-
end
|
36
|
-
|
37
|
-
after(:each) do
|
38
|
-
Client.reset
|
39
|
-
end
|
40
|
-
|
41
|
-
it "inserts client into app" do
|
42
|
-
expect(Client).to be_inserted
|
43
|
-
end
|
44
|
-
|
45
|
-
it "inserts client into rake" do
|
46
|
-
expect { Rake::Task["db:schema:dump"].invoke }.to raise_error(Errno::ENOENT)
|
47
|
-
expect(Client).to be_inserted
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|