schema_monkey_rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/README.md +0 -1
- data/lib/schema_monkey_rails/version.rb +1 -1
- data/schema_dev.yml +0 -1
- data/schema_monkey_rails.gemspec +1 -1
- data/spec/rails_spec.rb +24 -16
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d91e1db8aad407ae9330f99bf5315fdb546a4fe6
|
4
|
+
data.tar.gz: 2fe1195eb7d6e260441c63b01fdd55d21e4c0e9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80865a7d38be621cafc3d4c57ceec5723d448dcacf53b62c719c5ab9066cdf61caac2874f4f1f5f2930ad8a4e0dcf00b65193ee4e0a87f9405e193b56f373356
|
7
|
+
data.tar.gz: 8b74cfd0dd50508a269bba45cbcfa7889e13062b27c21ca41450893a3c48432d117ea54fd49d9db8cefb629384cc22261e4951e80671870ed642d8c5ce11caa3
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -25,7 +25,6 @@ SchemaMonkey::Rails is tested on:
|
|
25
25
|
|
26
26
|
<!-- SCHEMA_DEV: MATRIX - begin -->
|
27
27
|
<!-- These lines are auto-generated by schema_dev based on schema_dev.yml -->
|
28
|
-
* ruby **1.9.3** with activerecord **4.2**, using **mysql2**, **sqlite3** or **postgresql**
|
29
28
|
* ruby **2.1.5** with activerecord **4.2**, using **mysql2**, **sqlite3** or **postgresql**
|
30
29
|
|
31
30
|
<!-- SCHEMA_DEV: MATRIX - end -->
|
data/schema_dev.yml
CHANGED
data/schema_monkey_rails.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.add_dependency "activerecord", "~> 4.2"
|
21
21
|
spec.add_dependency "rails"
|
22
|
-
spec.add_dependency "schema_monkey", "~>
|
22
|
+
spec.add_dependency "schema_monkey", "~> 2.0"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.7"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/spec/rails_spec.rb
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
require 'spec_helper'
|
2
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
|
+
|
3
23
|
describe SchemaMonkey::Rails do
|
4
24
|
|
5
25
|
before(:all) do
|
@@ -7,19 +27,7 @@ describe SchemaMonkey::Rails do
|
|
7
27
|
Kernel.const_set "Dummy", Class.new(Rails::Application) { config.eager_load = true }
|
8
28
|
ENV['DATABASE_URL'] = "#{SchemaDev::Rspec.db_configuration[:adapter]}://localhost/dummy"
|
9
29
|
|
10
|
-
|
11
|
-
def self.insert
|
12
|
-
@inserted = true
|
13
|
-
end
|
14
|
-
def self.inserted?
|
15
|
-
@inserted
|
16
|
-
end
|
17
|
-
def self.reset
|
18
|
-
@inserted = false
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
SchemaMonkey.register(@client)
|
30
|
+
SchemaMonkey.register Client
|
23
31
|
|
24
32
|
Rake.application = Rake::Application.new
|
25
33
|
Rails.application.load_tasks
|
@@ -27,16 +35,16 @@ describe SchemaMonkey::Rails do
|
|
27
35
|
end
|
28
36
|
|
29
37
|
after(:each) do
|
30
|
-
|
38
|
+
Client.reset
|
31
39
|
end
|
32
40
|
|
33
41
|
it "inserts client into app" do
|
34
|
-
expect(
|
42
|
+
expect(Client).to be_inserted
|
35
43
|
end
|
36
44
|
|
37
45
|
it "inserts client into rake" do
|
38
46
|
expect { Rake::Task["db:schema:dump"].invoke }.to raise_error(Errno::ENOENT)
|
39
|
-
expect(
|
47
|
+
expect(Client).to be_inserted
|
40
48
|
end
|
41
49
|
|
42
50
|
end
|
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.1.
|
4
|
+
version: 0.1.2
|
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-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|