schema_monkey 2.1.4 → 2.1.5

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: 56b443f53b18f1a6664d45246336164ee69f6727
4
- data.tar.gz: da045381e4b36a03af0852a606a3be218aa92a02
3
+ metadata.gz: 9d28d272416cca652ecf6e80328729dd7873c543
4
+ data.tar.gz: da46678264386222e26a2e55d6f229123f536179
5
5
  SHA512:
6
- metadata.gz: 090634decedc9626bf389ef26bf5f4faa843aa0084310c9f2ab404820f725e9b944abb235a7289f61bd79811987489f55872ec2264746ba9b30a691411da7aa4
7
- data.tar.gz: 4a54fc56c121a0b72eca7f171e6c914d50be95750c88860e745e0ab23a1f6773092dad7edc7de1561eddabbbcb74aeb6ca9be0ffd14f3fd4a2b17a71369d99d2
6
+ metadata.gz: 5eab33e39224ee8d9cf95cdba11d2395029f69ec750bc850f03f0129f1f4a37cbc90dbccb9113d957632addb936fdaa62318e357913acdaa6673a707ccec2319
7
+ data.tar.gz: 32195d3c462db3b25235eab9e9a7be5fa075430d739a0c5c4ee48f37d7302bec56863d2df77de505e756c0eeed2d3f77d0df001c74bd841c6584aac7ee9cd92f
data/README.md CHANGED
@@ -234,6 +234,7 @@ SchemaMonkey is tested on:
234
234
  <!-- SCHEMA_DEV: MATRIX - end -->
235
235
 
236
236
  ## Release Notes
237
+ * 2.1.5 -- Remove dependency on its-it :( #12
237
238
  * 2.1.4 -- Loosen dependency to allow AR 5.0, and include it in the test matrix
238
239
  * 2.1.3 -- Guard against multiple insertion of modules.
239
240
  * 2.1.2 -- Insert self earlier; don't wait for connection adapter to be instantiated. Fixes #6 re `db:schema:load`
@@ -1,6 +1,5 @@
1
1
  require 'active_record'
2
2
  require 'active_support/core_ext/string'
3
- require 'its-it'
4
3
  require 'modware'
5
4
 
6
5
  require_relative "schema_monkey/active_record"
@@ -35,7 +35,7 @@ module SchemaMonkey
35
35
  path = mod.to_s.sub(/^#{@root}::#{base}::/, '')
36
36
  if dbm
37
37
  path = path.split('::')
38
- if (i = path.find_index(&it =~ /\b#{dbm}\b/i)) # delete first occurence
38
+ if (i = path.find_index { |it| it =~ /\b#{dbm}\b/i }) # delete first occurence
39
39
  path.delete_at i
40
40
  end
41
41
  path = path.join('::').gsub(/#{dbm}/i, dbm.to_s) # canonicalize case for things like PostgreSQLAdapter
@@ -56,8 +56,8 @@ module SchemaMonkey
56
56
 
57
57
  modules = []
58
58
  modules += Module.descendants(container, can_load: accept)
59
- modules.select!(&it.to_s =~ accept) if accept
60
- modules.reject!(&it.to_s =~ reject) if reject
59
+ modules.select! { |it| it.to_s =~ accept } if accept
60
+ modules.reject! { |it| it.to_s =~ reject } if reject
61
61
  modules
62
62
  end
63
63
 
@@ -27,7 +27,7 @@ module SchemaMonkey
27
27
  def descendants(mod, can_load: nil)
28
28
  consts, auto = mod.constants.group_by{|c| !!mod.autoload?(c)}.values_at(false, true)
29
29
  consts ||= []
30
- consts += auto.select &it.to_s =~ can_load if can_load and auto
30
+ consts += auto.select { |it| it.to_s =~ can_load } if can_load and auto
31
31
  children = consts.map{|c| mod.const_get(c) }.select { |obj|
32
32
  obj.is_a?(::Module) rescue nil
33
33
  }
@@ -21,7 +21,7 @@ module SchemaMonkey
21
21
 
22
22
  def insert(dbm: nil)
23
23
  insert if dbm and not @inserted # first do all non-dbm-specific insertions
24
- @client_map.values.each &it.insert(dbm: dbm)
24
+ @client_map.values.each { |it| it.insert(dbm: dbm) }
25
25
  @inserted = true
26
26
  @inserted_dbm = dbm if dbm
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module SchemaMonkey
2
- VERSION = "2.1.4"
2
+ VERSION = "2.1.5"
3
3
  end
@@ -20,13 +20,13 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = ">= 2.1.0"
22
22
  spec.add_dependency "activerecord", ">= 4.2"
23
- spec.add_dependency "its-it"
24
23
  spec.add_dependency "modware", "~> 0.1"
25
24
 
26
25
  spec.add_development_dependency "bundler", "~> 1.7"
27
26
  spec.add_development_dependency "rake", "~> 10.0"
28
27
  spec.add_development_dependency "rspec", "~> 3.0"
29
28
  spec.add_development_dependency "rspec-given", "~> 3.6"
29
+ spec.add_development_dependency "its-it"
30
30
  spec.add_development_dependency "schema_dev", "~> 3.7"
31
31
  spec.add_development_dependency "simplecov"
32
32
  spec.add_development_dependency "simplecov-gem-profile"
@@ -9,6 +9,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
9
9
 
10
10
  require 'rspec'
11
11
  require 'rspec/given'
12
+ require 'its-it'
12
13
  require 'active_record'
13
14
  require 'schema_monkey'
14
15
  require 'schema_dev/rspec'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_monkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronen barzel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-19 00:00:00.000000000 Z
11
+ date: 2016-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
- - !ruby/object:Gem::Dependency
28
- name: its-it
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: modware
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +94,20 @@ dependencies:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
96
  version: '3.6'
97
+ - !ruby/object:Gem::Dependency
98
+ name: its-it
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: schema_dev
113
113
  requirement: !ruby/object:Gem::Requirement