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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6db210b412a5969067d6cb80a4009e70684f6e51
4
- data.tar.gz: 19084f4c56bbf6be6cb8cdefd78c821de6ee8cfe
3
+ metadata.gz: d91e1db8aad407ae9330f99bf5315fdb546a4fe6
4
+ data.tar.gz: 2fe1195eb7d6e260441c63b01fdd55d21e4c0e9b
5
5
  SHA512:
6
- metadata.gz: 4cf9e0b23f5e1d2355ff006ffdbce036a226efd64121a889ab29d78bbce22a877c3ef40551956f9334b08a56d7e7c1a96cce893709a8220a90b3ef739688a7f9
7
- data.tar.gz: 090bc611257b4f0c54c21424b6e8ad77374c6fe8eef28d5c1236529efbc58046db7d8df33877082dc5d02204837de944d834d28ece9cbd4ecf7beb9a21d2f4be
6
+ metadata.gz: 80865a7d38be621cafc3d4c57ceec5723d448dcacf53b62c719c5ab9066cdf61caac2874f4f1f5f2930ad8a4e0dcf00b65193ee4e0a87f9405e193b56f373356
7
+ data.tar.gz: 8b74cfd0dd50508a269bba45cbcfa7889e13062b27c21ca41450893a3c48432d117ea54fd49d9db8cefb629384cc22261e4951e80671870ed642d8c5ce11caa3
@@ -5,7 +5,6 @@
5
5
  ---
6
6
  sudo: false
7
7
  rvm:
8
- - 1.9.3
9
8
  - 2.1.5
10
9
  gemfile:
11
10
  - gemfiles/activerecord-4.2/Gemfile.mysql2
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 -->
@@ -1,5 +1,5 @@
1
1
  module SchemaMonkey
2
2
  module Rails
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -1,5 +1,4 @@
1
1
  ruby:
2
- - 1.9.3
3
2
  - 2.1.5
4
3
  activerecord:
5
4
  - 4.2
@@ -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", "~> 1.0"
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"
@@ -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
- @client = Module.new do
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
- @client.reset
38
+ Client.reset
31
39
  end
32
40
 
33
41
  it "inserts client into app" do
34
- expect(@client).to be_inserted
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(@client).to be_inserted
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.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-03 00:00:00.000000000 Z
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: '1.0'
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: '1.0'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement